agentleFS
agent-shagent-sh/agentsys/AGENTS.md

agentsys

AGENTS.md993 starsChanged 2 months agoMITView on GitHub

Cross-tool compatible: Works across all 5 platforms - Claude Code, OpenCode, Codex CLI, Cursor, and Kiro. 1. Production project - Real users depend on this. Test thoroughly and verify all edge cases before committing. WHY: Breaking changes affect all plugin users immediately. 2. Plugin for OTHER projects - Optimize for plugin users, not internal dev convenience. WHY: Every decision MUST improve the experience for developers using this in their repos. 3. Use CHANGELOG.md for completion tracking - MUST use CHANGELOG.md…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 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

23 rules. About 0 are common, 16 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈16

    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. Very specific:

    Use CHANGELOG.md for completion tracking: - MUST use CHANGELOG.md for release notes.

    line 16
  2. Distinctive:

    PR reviews: - Wait 3 min for auto-reviewers, address ALL comments (Copilot, Claude, Gemini, Codex).

    line 22
  3. Distinctive:

    Especially Before release, and when delivering ANY work: - Check the relevant checklist for completion requirements:

    line 36
  4. Very specific:

    Run the /enhance command on new or modified commands, agents, skills, hooks or prompts

    line 39
  5. Distinctive:

    Verify cross-platform compatibility (OpenCode + Codex)

    line 40
  6. Very specific:

    Update bin/cli.js mappings if new command/agent added

    line 41
  7. Distinctive:

    Only mark complete after ALL checklist items are done *WHY: Checklists exist because we kept missing things.

    line 42
  8. Very specific:

    Use plain text markers: - MUST use [OK], [ERROR], [WARN], [CRITICAL] for status.

    line 45
  9. Distinctive:

    Use markdown formatting instead of decorative borders *WHY: Emojis and ASCII art waste tokens.

    line 47
  10. Distinctive:

    Always run git hooks: - Run all pre-commit and pre-push hooks.

    line 55
  11. Distinctive:

    Fix all test failures: - NEVER skip or ignore a failing test because it's "out of scope" or "pre-existing".

    line 60
  12. Distinctive:

    If a test fails during your work, fix it before proceeding

    line 61
  13. Distinctive:

    No test is someone else's problem *WHY: Skipping failures erodes test trust.

    line 62
  14. Very specific:

    Report script failures before manual fallback: - When any project script fails (npm test/run/build, scripts/*, agentsys-dev, node …

    line 65
  15. Distinctive:

    NEVER silently fall back to doing the work by hand *WHY: Silent fallbacks mask broken tooling.

    line 69
  16. Distinctive:

    Wait 3 min after PR creation (initial auto-reviews)

    line 240
  17. Distinctive:

    Use CHANGELOG.md for completion tracking (not summary files)

    line 269
  18. Very specific:

    BEFORE starting → Read the relevant checklist (checklists/*.md)

    line 270
  19. Distinctive:

    BEFORE delivering any work, especially releases → Go through that checklist item by item

    line 271
  20. Distinctive:

    Create PRs for non-trivial changes </end-reminder>

    line 274
  21. Very specific:

    When work in a git worktree is finished - merged, banked, or abandoned - clean it up as part of finishing: git worktree remove <path> AND …

    line 281
  22. Distinctive:

    Every use of /tmp (or any scratch space) is cleaned by the task that created it: delete scratch files and dirs when the task closes, not …

    line 285
  23. Distinctive:

    Every feature or fix needs quality tests that cover the changed behavior.

    line 292

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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

Project Memory: AgentSys

Cross-tool compatible: Works across all 5 platforms - Claude Code, OpenCode, Codex CLI, Cursor, and Kiro.

<project-memory><critical-rules> ## Critical Rules (Priority Order)
  1. Production project - Real users depend on this. Test thoroughly and verify all edge cases before committing. WHY: Breaking changes affect all plugin users immediately.
  2. Plugin for OTHER projects - Optimize for plugin users, not internal dev convenience. WHY: Every decision MUST improve the experience for developers using this in their repos.
  3. Use CHANGELOG.md for completion tracking - MUST use CHANGELOG.md for release notes. NEVER create *_AUDIT.md, *_SUMMARY.md, *_COMPLETION.md files. WHY: Summary files clutter repos and add no value. Report completion verbally.
  4. Unless it is a very small change of max few lines, or an urgent hotfix, MUST create PRs for all changes - No direct pushes to main. WHY: PRs enable reviews, CI checks, and rollback if needed. Direct pushes are risky.
  5. PR reviews - Wait 3 min for auto-reviewers, address ALL comments (Copilot, Claude, Gemini, Codex). WHY: Skipping comments leads to merged issues. Every comment must be addressed or explained.
  6. Read checklists BEFORE multi-file changes - MUST read the relevant checklist before starting:
    • Cross-platform work → checklists/cross-platform-compatibility.md (MASTER REF)
    • Release → checklists/release.md
    • New command → checklists/new-command.md
    • New agent → checklists/new-agent.md
    • New skill → checklists/new-skill.md
    • New lib module → checklists/new-lib-module.md
    • OpenCode plugin update → checklists/update-opencode-plugin.md
    • Repo intel changes → checklists/repo-intel.md WHY: Multi-file changes have hidden dependencies. Checklists prevent missed updates.
  7. Especially Before release, and when delivering ANY work - Check the relevant checklist for completion requirements:
    • Identify which checklist applies to your work (see rule #6)
    • Go through EVERY item in that checklist and apply it (e.g. run commands, which files to bump versions in, etc)
    • Run the /enhance command on new or modified commands, agents, skills, hooks or prompts
    • Verify cross-platform compatibility (OpenCode + Codex)
    • Update bin/cli.js mappings if new command/agent added
    • Only mark complete after ALL checklist items are done WHY: Checklists exist because we kept missing things. They are the definition of "done".
  8. Use plain text markers - MUST use [OK], [ERROR], [WARN], [CRITICAL] for status. NEVER use emojis or ASCII art boxes.
    • Save tokens - conciseness and clarity over decorations
    • Use markdown formatting instead of decorative borders WHY: Emojis and ASCII art waste tokens. AI models parse plain text better.
  9. gh/git on Windows - Escape $ as \$ in GraphQL queries, avoid != in jq (use == "A" or == "B").
    • gh pr checks uses state not conclusion - returns UPPERCASE: SUCCESS, FAILURE, PENDING
    • Single quotes unreliable - use double quotes with escaped inner quotes WHY: Windows shell interprets $ and ! differently. These cause silent failures.
  10. Always run git hooks - Run all pre-commit and pre-push hooks. If a hook blocks, fix the reported issue.
  • Hooks catch problems before they reach the repo
  • Fix the root cause, then retry WHY: Hooks are safety nets. Bypassing them defeats their purpose.
  1. Fix all test failures - NEVER skip or ignore a failing test because it's "out of scope" or "pre-existing". Always fix it.
  • If a test fails during your work, fix it before proceeding
  • No test is someone else's problem WHY: Skipping failures erodes test trust. Every green run must mean everything works.
  1. Report script failures before manual fallback - When any project script fails (npm test/run/build, scripts/*, agentsys-dev, node bin/dev-cli.js), you MUST:
  • Report the failure with exact error output to the user
  • Diagnose the root cause of the failure
  • Fix the script/tooling issue, not work around it manually
  • NEVER silently fall back to doing the work by hand WHY: Silent fallbacks mask broken tooling. A failed script needs fixing, not bypassing.</critical-rules>
<architecture> ## Architecture<!-- GEN:START:claude-architecture -->
lib/          → Shared library (vendored to plugins)
plugins/      → 24 plugins, 49 agents (39 file-based + 10 role-based), 44 skills
adapters/     → Platform adapters (opencode-plugin/, opencode/, codex/)
checklists/   → Action checklists (9 files)
bin/cli.js    → npm CLI installer
PluginAgentsSkillsPurpose
next-task81Master workflow orchestration
prepare-delivery34Pre-ship quality gates
gate-and-ship00Quality gates then ship
ship11PR creation and deployment
deslop11AI slop cleanup
audit-project101Multi-agent code review
drift-detect11Plan drift detection
enhance89Code quality analyzers
sync-docs11Documentation sync
repo-intel31Unified static analysis
banthis01Durable negative behavior memory
perf68Performance investigation
learn11Topic research and learning guides
agnix01Agent config linting
consult11Cross-tool AI consultation
debate11Multi-perspective debate analysis
skill-curator01Skill authoring and review
system-prompt-curator01System prompt curation
skillers22Workflow pattern learning
onboard11Codebase onboarding
can-i-help11Contributor guidance
zig-lsp00
mojo01
ada-spark01
<!-- GEN:END:claude-architecture -->

Pattern: Command → Agent → Skill (orchestration → invocation → implementation) </architecture>

<commands> ## Commands

Core Workflow

  • /next-task - Master workflow: task → implementation → PR → merge
  • /prepare-delivery - Pre-ship quality gates: deslop, review, validation, docs sync
  • /gate-and-ship - Quality gates then ship (/prepare-delivery + /ship)
  • /ship - PR creation, CI monitoring, merge
  • /enhance - Run all enhancement analyzers

Analysis

  • /audit-project - Multi-agent code review
  • /deslop - Clean AI slop patterns
  • /drift-detect - Compare plan vs implementation
  • /perf - Performance investigation
  • /repo-intel - Unified static analysis - git history, AST symbols, project metadata

Maintenance

  • /sync-docs - Update documentation to match code

Dev Commands

npx agentsys-dev status           # Project health (version, counts, branch)
npx agentsys-dev validate         # Run all validators
npx agentsys-dev validate plugins # Run single validator
npx agentsys-dev bump <version>   # Bump all version files (e.g., 3.7.3)
npx agentsys-dev sync-lib         # Sync lib/ to plugins/
npx agentsys-dev test             # Run test suite
npx agentsys-dev preflight         # Change-aware checklist enforcement
npx agentsys-dev preflight --all   # Run all checks
npx agentsys-dev preflight --release # All checks + release extras
npx agentsys-dev gen-docs          # Auto-generate doc sections
npx agentsys-dev gen-docs --check  # Validate docs are fresh (CI)
npx agentsys-dev new plugin <name>  # Scaffold new plugin
npx agentsys-dev new agent <name> --plugin=<plugin>  # Scaffold new agent
npx agentsys-dev new skill <name> --plugin=<plugin>  # Scaffold new skill
npx agentsys-dev new command <name> --plugin=<plugin>  # Scaffold new command
npx agentsys-dev --help           # Show all commands

# Or invoke directly:
node bin/dev-cli.js <command>

# npm aliases still work:
npm test                     # Run tests (do before commits)
npm run validate             # All validators via dev-cli
npm run preflight            # Change-aware preflight checks
npm run preflight:all        # All preflight checks
npm run preflight:release    # Release preflight
npm run gen-docs             # Auto-generate documentation
npm run gen-docs:check       # Check if docs are stale
npm run new:plugin           # Scaffold new plugin
npm run new:agent            # Scaffold new agent
npm run new:skill            # Scaffold new skill
npm run new:command          # Scaffold new command
npm run bump <version>       # Bump versions via dev-cli
npm pack                     # Build package
agentsys                # Run installer
</commands><agents> ## Agents

49 agents across 24 plugins (16 have agents; gate-and-ship is commands-only; banthis, skill-curator, system-prompt-curator, and agnix are skill/command-only; zig-lsp is config-only with no commands or agents; mojo and ada-spark are skill-only). Key agents by model:

ModelResolves toAgentsUse Case
opusClaude Opus 5.5exploration, planning, implementation, perf-orchestrator, debate-orchestrator, skillers-recommenderComplex reasoning, analysis
sonnetClaude Sonnet 5task-discoverer, delivery-validator (prepare-delivery), ci-fixer, deslop-agent, reporters, learn, release-agent, skillers-compactorValidation, structured checks
haikuClaude Haiku 4.5worktree-manager, ci-monitor, simple-fixerMechanical execution

See README.md and docs/reference/AGENTS.md for full agent list. </agents>

<skills> ## Skills

44 skills across plugins. Agents invoke skills for reusable implementation.

CategoryKey Skills
Workfloworchestrate-review, discover-tasks, validate-delivery
Enhancementenhance-* (9 skills for plugins, agents, docs, prompts, hooks), skill-curator, system-prompt-curator
Performancebaseline, benchmark, profile, theory-tester
Cleanupdeslop, sync-docs, drift-analysis, repo-intel
Memorybanthis

See README.md for full skill list. </skills>

<state-files> ## State Files
FileLocationPurpose
tasks.json{stateDir}/Active task registry
flow.json{stateDir}/ (worktree)Workflow progress
preference.json{stateDir}/sources/Cached task source
suppressions.json~/.<claude|opencode|codex>/enhance/Auto-learned suppressions

Platform-aware state directory:

  • Claude Code: .claude/
  • OpenCode: .opencode/
  • Codex: .codex/
  • Cursor: .cursor/
  • Kiro: .kiro/</state-files>
<workflow-agents> ## Workflow Agents (MUST-CALL)

Cannot skip in /next-task:

  • exploration-agent → before planning
  • planning-agent → before implementation
  • Phase 9 review loop → MUST use orchestrate-review skill
  • prepare-delivery:delivery-validator → before sync-docs:sync-docs-agent
  • sync-docs:sync-docs-agent → before /ship</workflow-agents>
<pr-auto-review> ## PR Auto-Review

4 reviewers: Copilot, Claude, Gemini, Codex

  1. Wait 3 min after PR creation (initial auto-reviews)
  2. Claude-review may take 10+ min - wait for it
  3. Read ALL comments
  4. Address EVERY comment
  5. Iterate until zero unresolved</pr-auto-review>
<model-selection> ## Model Selection
ModelWhen to Use
OpusComplex reasoning, analysis where imperfection compounds
SonnetValidation, pattern matching, most agents
HaikuMechanical execution, no judgment needed
</model-selection><priorities> ## Core Priorities
  1. User DX (plugin users)
  2. Worry-free automation
  3. Token efficiency
  4. Quality output
  5. Simplicity</priorities>
<end-reminder> **REMEMBER**: - Use CHANGELOG.md for completion tracking (not summary files) - BEFORE starting → Read the relevant checklist (`checklists/*.md`) - BEFORE delivering any work, especially releases → Go through that checklist item by item - 5 platforms: Claude Code + OpenCode + Codex + Cursor + Kiro - ALL must work - Agent/Skill pattern: Agents invoke skills, skills have implementation - Create PRs for non-trivial changes </end-reminder></project-memory>

Worktree and tmp hygiene (owner, 2026-08-17)

  • When work in a git worktree is finished - merged, banked, or abandoned - clean it up as part of finishing: git worktree remove <path> AND delete its branch (git branch -d; -D only once the owner's merge/abandon decision is recorded). A closed lane leaves no wt-* directory and no stale branch behind.
  • Every use of /tmp (or any scratch space) is cleaned by the task that created it: delete scratch files and dirs when the task closes, not when disk pressure finds them. Motivating incident 2026-08-17: 7 GB of dead lane dirs in /tmp plus an unthrottled upload storm flooded 25 GB of swap and stalled the rig.

Maintainer conventions

  • Every feature or fix needs quality tests that cover the changed behavior.
  • In prose, use a single dash with spaces, not an em dash or a doubled dash.
  • Report script failures before manual fallback. Never silently bypass broken tooling.

Validation scope

Choose checks that cover the changed behavior. For CPU-only tooling, documentation and configuration changes, run the relevant CPU tests, static checks and configuration validation. Do not require a blanket GPU gate for those changes. Require GPU qualification when GPU, runtime or model behavior, or related claims, change. Preserve applicable native, model and hardware qualification gates. CPU checks do not qualify GPU behavior.

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.