| name | agents-md |
| description | Build or rebuild AGENTS.md with progressive disclosure. Use when: /harn:agents-md, 'create AGENTS.md', 'update agent instructions', 'too many instructions' |
AGENTS.md Builder
Generate a lean, effective AGENTS.md using progressive disclosure principles.
Rules
- Under 60 lines — ideally under 100, never over 300
- No directory trees — agents discover structure on their own
- No bloated context — point to skill files for domain-specific rules
- Progressive disclosure — load detailed instructions only when relevant
Process
- Read the current project root (package.json, README, existing AGENTS.md)
- Identify: stack, entry points, architectural constraints
- Generate AGENTS.md with sections:
- North Star (1-2 sentences)
- System of Record (stack, entry points)
- Constraints (hard rules)
- Active Harness Hooks (what's automated)
- Skills (progressive disclosure pointers)
- Escape Hatch (what to do when stuck)
- If existing AGENTS.md is over 100 lines, refactor it:
- Extract domain rules into separate skill files
- Keep only pointers in AGENTS.md
Workflow
- Understand → Read code, check LEARNED.md for gotchas
- Plan → Break task into steps, update CHECKPOINT.json
- Implement → Write code within architectural constraints
- Verify → Run quality gate before finishing
- Document → Update LEARNED.md if something was tricky
Context Budget
- Keep this file under 60 lines — load skills/ on demand
- Delegate research to sub-agents — only summaries return
- After 30+ tool calls, compact and update CHECKPOINT.json
Escape Hatches
- Quality gate stuck? Stop hook checks
stop_hook_active — retry lets you through
- Security guard wrong? Report false positive, use alternative command
- Same error 3 times? Stop and ask the human