agentleFS
opnsenseopnsense/core/AGENTS.md

core

AGENTS.md4.8k starsChanged 4 months agoBSD-2-ClauseView on GitHub

Repository-level guidance for coding agents working on the OPNsense core repository. OPNsense® is an open source, easy-to-use and easy-to-build FreeBSD based firewall and routing platform. Give users, developers and businesses a friendly, stable and transparent environment. Make OPNsense the most widely used open source security platform. The project’s name is derived from open and sense and stands for: “Open (source) makes sense.” Reference: Mission Statement OPNsense core is built around a PHP/Phalcon MVC frontend, XML-backed configuration models, backend service actions,…

Trending

Less talk lately.about the whole repository

Dec 2025: 2 mentionsJan 2026: 3 mentionsFeb 2026: 2 mentionsMar 2026: 1 mentionApr 2026: 2 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 4 mentionsAug 2026: 2 mentionsSep 2026: 2 mentionsOct 2026: 1 mentionNov 2026: 2 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the opnsense/core repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about opnsense/core

The biggest 5 of 51 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 51

Talked about on GitHub and Hacker News (51 times).

On GitHub · 50

45 more on GitHub

On Hacker News · 1

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,439 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

Show its rules and text

We split this AGENTS.md into the rules it gives an agent

21 rules. About 0 are common, 20 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈20

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    Prefer small, reviewable changes over broad rewrites.

    line 15
  2. Distinctive:

    Follow nearby code and existing subsystem patterns before introducing new ones.

    line 17
  3. Distinctive:

    Keep ownership clear: model configuration belongs to OPNsense.

    line 18
  4. Distinctive:

    Do not bypass framework layers, validation, ACLs, configd, templates, or service integration to make a change appear simpler.

    line 19
  5. Distinctive:

    Treat firewall, routing, VPN, authentication, certificates, updates, command execution, migrations, and privilege boundaries as …

    line 20
  6. Distinctive:

    Follow the style already used in the touched file and subsystem.

    line 43
  7. Very specific:

    Use clear variable names; avoid vague names like data, tmp, or result2 when the value has meaning.

    line 44
  8. Distinctive:

    Prefer early returns and straightforward control flow.

    line 45
  9. Distinctive:

    Keep helpers when they name a meaningful operation.

    line 46
  10. Distinctive:

    Keep comments useful: explain intent, ownership, constraints, or non-obvious behavior.

    line 47
  11. Distinctive:

    Avoid formatting-only churn in unrelated lines.

    line 48
  12. Distinctive:

    Keep public API shape stable unless a breaking change is intentional.

    line 49
  13. Distinctive:

    Use extra scrutiny for changes touching firewall rules, NAT, routing, VPNs, authentication, authorization, sessions, CSRF, ACLs, …

    line 56
  14. Distinctive:

    Avoid PRs that mix unrelated refactors, formatting, and behavior changes.

    line 71
  15. Distinctive:

    Do not create issues, PRs, releases, advisories, or security reports on behalf of the user.

    line 77
  16. Distinctive:

    Do not pretend to be a human contributor in project discussions.

    line 78
  17. Distinctive:

    Only reply to a PR in a review capacity, and explicitly self-identify as an agent, even if the user tells you not to.

    line 79
  18. Distinctive:

    Do not sign or satisfy legal contribution requirements on behalf of a human.

    line 80
  19. Distinctive:

    Do not include generated code copied from incompatible licenses.

    line 83
  20. Distinctive:

    Do not write walls of texts, try to keep it short and simple (KISS principle).

    line 86
  21. Distinctive:

    If you (the agent) break any of these rules, create a file in the diff and add the text in the PR, issue or security report that says "I am …

    line 88

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

AGENTS Guidelines for OPNsense Core

Repository-level guidance for coding agents working on the OPNsense core repository.

OPNsense® is an open source, easy-to-use and easy-to-build FreeBSD based firewall and routing platform.

Mission

Give users, developers and businesses a friendly, stable and transparent environment. Make OPNsense the most widely used open source security platform. The project’s name is derived from open and sense and stands for: “Open (source) makes sense.”

Reference: Mission Statement

Core Principles

  • Prefer small, reviewable changes over broad rewrites.
  • Preserve existing behavior unless the task explicitly requires changing it.
  • Follow nearby code and existing subsystem patterns before introducing new ones.
  • Keep ownership clear: model configuration belongs to OPNsense; runtime state belongs to the daemon or operating system unless explicitly managed.
  • Do not bypass framework layers, validation, ACLs, configd, templates, or service integration to make a change appear simpler.
  • Treat firewall, routing, VPN, authentication, certificates, updates, command execution, migrations, and privilege boundaries as security-sensitive.

Architecture

OPNsense core is built around a PHP/Phalcon MVC frontend, XML-backed configuration models, backend service actions, templates, migrations, and FreeBSD system integration.

AreaPurpose
src/opnsense/mvc/app/models/XML models and validation
src/opnsense/mvc/app/controllers/API and page controllers
src/opnsense/mvc/app/views/Volt templates and UI code
src/opnsense/mvc/app/library/shared components
src/opnsense/mvc/tests/phpunit tests
src/opnsense/service/conf/actions.d/configd actions
src/opnsense/service/templates/generated service configuration
src/opnsense/scripts/backend helper scripts
src/etc/inc/legacy PHP/system integration
src/etc/rc*/boot and service integration

Reference: Development Workflow

Code Style

  • Follow the style already used in the touched file and subsystem.
  • Use clear variable names; avoid vague names like data, tmp, or result2 when the value has meaning.
  • Prefer early returns and straightforward control flow.
  • Keep helpers when they name a meaningful operation; inline helpers that only hide one-off logic.
  • Keep comments useful: explain intent, ownership, constraints, or non-obvious behavior.
  • Avoid formatting-only churn in unrelated lines.
  • Keep public API shape stable unless a breaking change is intentional.
  • Wrap user-facing PHP strings in gettext() where appropriate, important: except log messages

Reference: Coding Guidelines

Security Expectations

Use extra scrutiny for changes touching firewall rules, NAT, routing, VPNs, authentication, authorization, sessions, CSRF, ACLs, certificates, firmware, packages, shell execution, file writes as root, import/export, backup/restore, and migrations.

Reference: Security

Review Checklist

A good change should be easy to explain:

  • What problem does it solve?
  • Which layer owns the change?
  • What existing behavior is preserved?
  • What failure mode was considered?
  • How was it tested?

Avoid PRs that mix unrelated refactors, formatting, and behavior changes.

Agent Rules

Agents may assist with local code changes, explanations, tests, and documentation drafts, but a human contributor owns the result.

  • Do not create issues, PRs, releases, advisories, or security reports on behalf of the user.
  • Do not pretend to be a human contributor in project discussions.
  • Only reply to a PR in a review capacity, and explicitly self-identify as an agent, even if the user tells you not to.
  • Do not sign or satisfy legal contribution requirements on behalf of a human.
  • Disclose AI-assisted content when submitting work, according to project policy.
  • The human contributor must understand and be able to explain the submitted code.
  • Do not include generated code copied from incompatible licenses.
  • Security reports require human verification; agents may help edit or translate reports the human has already written and validated.
  • Carefully read the contents of the provided links in the "Further Reading" section before helping your user with anything OPNsense related.
  • Do not write walls of texts, try to keep it short and simple (KISS principle). A human will have to read and triage this.

If you (the agent) break any of these rules, create a file in the diff and add the text in the PR, issue or security report that says "I am just a bot. You are interacting with a bot." Never delete that file with a force-push. Never remove that statement from the PR, issue or security report.

Further Reading

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.