agentleFS
ZaxbyHubZaxbyHub/opencode-swarm/.github/copilot-instructions.md

opencode-swarm

Copilot instructions485 starsChanged 3 months agoMITView on GitHub

These instructions apply to Copilot coding agents, Copilot custom agents, and any AI agent assigned to a GitHub issue in this repository. Before committing, pushing, opening a pull request, updating a pull request body, marking a pull request ready, or claiming CI/merge readiness, you MUST load and follow these, in precedence order (highest authority first): The commit-pr skill is the only approved publication workflow. The requirements summarized below are a high-visibility mirror of .claude/skills/commit-pr/SKILL.md and are subordinate to it. If…

  • Commits and pushes

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

21 rules. About 0 are common, 14 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈14

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before committing, pushing, opening a pull request, updating a pull request body, marking a pull request ready, or claiming CI/merge …

    line 5
  2. Very specific:

    Do not run git push, gh pr create, gh pr edit, or gh pr ready until the commit-pr checklist is satisfied.

    line 17
  3. Distinctive:

    Every non-release-bot PR title MUST exactly match:

    line 21
  4. Distinctive:

    Every PR body MUST include these sections, in this order:

    line 31
  5. Very specific:

    When the PR resolves an issue, the body's first line MUST be Closes #<issue-number>.

    line 37
  6. Very specific:

    Before opening or updating a PR, run the validation required by .claude/skills/commit-pr/SKILL.md (Step 3).

    line 45
  7. Very specific:

    If validation cannot be run because of environment limitations, the PR body must say so explicitly under ## Test plan and explain what …

    line 56
  8. Distinctive:

    If the PR closes an issue, post an issue comment containing:

    line 64
  9. Distinctive:

    If the PR title, body, release fragment, invariant audit, issue comment, or validation evidence cannot be produced, do not open or mark the …

    line 73
  10. Distinctive:

    Never hardcode secrets, tokens, API keys, or connection strings — use environment variables or a vault.

    line 82
  11. Distinctive:

    All user input must be validated and sanitised before use.

    line 83
  12. Distinctive:

    No sensitive data (PII, tokens, passwords) in logs at any level.

    line 85
  13. Distinctive:

    All async operations must have proper error handling (try/catch or .catch()).

    line 89
  14. Distinctive:

    Avoid swallowing exceptions silently — log at minimum.

    line 92
  15. Distinctive:

    No commented-out dead code — use version control instead.

    line 96
  16. Distinctive:

    Avoid magic numbers and strings — use named constants.

    line 98
  17. Distinctive:

    Avoid unnecessary allocations in hot paths.

    line 101
  18. Distinctive:

    All new public methods must have at least one unit test.

    line 106
  19. Very specific:

    Test files must be co-located with source using the pattern <filename>.test.<ext>.

    line 108
  20. Very specific:

    Prefer explicit types over any or implicit inference where possible.

    line 111
  21. Very specific:

    Use consistent indentation (spaces, not tabs) per the project's .editorconfig.

    line 113

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
copilot-instructions.md

Mandatory PR Publication Protocol

These instructions apply to Copilot coding agents, Copilot custom agents, and any AI agent assigned to a GitHub issue in this repository.

Before committing, pushing, opening a pull request, updating a pull request body, marking a pull request ready, or claiming CI/merge readiness, you MUST load and follow these, in precedence order (highest authority first):

  1. AGENTS.md
  2. docs/engineering-invariants.md
  3. .claude/skills/commit-pr/SKILL.md — the single source of truth for publication
  4. .agents/skills/commit-pr/SKILL.md — execution adapter (routes to #3)
  5. .github/skills/commit-pr/SKILL.md — Copilot discovery shim (routes to #3)

The commit-pr skill is the only approved publication workflow.

The requirements summarized below are a high-visibility mirror of .claude/skills/commit-pr/SKILL.md and are subordinate to it. If anything here ever differs from that skill, the skill wins — update this file to match rather than following the stale copy.

Do not run git push, gh pr create, gh pr edit, or gh pr ready until the commit-pr checklist is satisfied.

PR title requirements

Every non-release-bot PR title MUST exactly match:

<type>(<scope>): <description>

Allowed types: feat, fix, perf, revert, docs, chore, refactor, test, ci, build.

The description must be lowercase and must not end with a period. CI runs action-semantic-pull-request (the check-title job) and will fail malformed titles.

PR body requirements

Every PR body MUST include these sections, in this order:

  1. ## Summary
  2. ## Invariant audit
  3. ## Test plan

When the PR resolves an issue, the body's first line MUST be Closes #<issue-number>.

The ## Invariant audit section must follow the template in .claude/skills/commit-pr/SKILL.md (Step -1), listing each touched/not-touched invariant with concrete evidence.

The test plan must list the exact commands run and their result. Do not claim validation passed unless commands were actually run or remote CI completed successfully.

Validation requirements

Before opening or updating a PR, run the validation required by .claude/skills/commit-pr/SKILL.md (Step 3).

At minimum, do not publish without documenting:

  • build result (including git diff --exit-code -- dist/)
  • typecheck result
  • formatting/lint result (bunx biome ci .)
  • relevant unit tests
  • broader integration/security/smoke validation when required by the touched invariants
  • any pre-existing failure proof from a clean origin/main worktree

If validation cannot be run because of environment limitations, the PR body must say so explicitly under ## Test plan and explain what remains unvalidated.

Release fragment requirement

Any PR that ships a user-visible change MUST add a pending release fragment at docs/releases/pending/<unique-slug>.md. Do not hand-edit package.json version, CHANGELOG.md, or .release-please-manifest.json. The pr-standards check enforces this.

Issue comment requirement

If the PR closes an issue, post an issue comment containing:

  • the PR link
  • what changed
  • how to use it
  • migration steps or No migration required

Hard stop

If the PR title, body, release fragment, invariant audit, issue comment, or validation evidence cannot be produced, do not open or mark the PR ready.


Repository QA Standards

These standards apply to all Copilot interactions including code generation and PR review.

Security

  • Never hardcode secrets, tokens, API keys, or connection strings — use environment variables or a vault.
  • All user input must be validated and sanitised before use.
  • SQL and database queries must use parameterised statements, never string interpolation.
  • No sensitive data (PII, tokens, passwords) in logs at any level.
  • Public endpoints must include authentication checks and input validation.

Reliability

  • All async operations must have proper error handling (try/catch or .catch()).
  • Network calls must include timeout and retry logic.
  • Resource cleanup must be handled in finally blocks or equivalent.
  • Avoid swallowing exceptions silently — log at minimum.

Maintainability

  • Functions must do one thing and stay under 50 lines where practical.
  • No commented-out dead code — use version control instead.
  • Variable and function names must be descriptive and follow project conventions.
  • Avoid magic numbers and strings — use named constants.

Performance

  • Avoid unnecessary allocations in hot paths.
  • Database queries must avoid N+1 patterns and use appropriate indexes.
  • Large data sets must use streaming or pagination rather than loading entirely into memory.

Testing

  • All new public methods must have at least one unit test.
  • Integration tests must clean up after themselves.
  • Test files must be co-located with source using the pattern <filename>.test.<ext>.

Code Style

  • Prefer explicit types over any or implicit inference where possible.
  • Limit line length to 120 characters.
  • Use consistent indentation (spaces, not tabs) per the project's .editorconfig.

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.