docs: add sub-agent usage guidance to AGENTS.md
Mandates use of agent tool for parallel work and context management. Encourages batching file reads into 2-3 agent calls instead of sequential reads. 💘 Generated with Crush Assisted-by: GLM-5.1 via Crush <crush@charm.land>
This commit is contained in:
20
AGENTS.md
20
AGENTS.md
@@ -10,6 +10,26 @@
|
|||||||
3. **Read docs/PRD.md** - Understand requirements (source of truth)
|
3. **Read docs/PRD.md** - Understand requirements (source of truth)
|
||||||
4. **Check current state**: `ls -lh output/` and `git log --oneline -10`
|
4. **Check current state**: `ls -lh output/` and `git log --oneline -10`
|
||||||
|
|
||||||
|
### Use Sub-Agents Liberally (MANDATORY)
|
||||||
|
|
||||||
|
**You MUST use the agent tool to parallelize work and manage context.**
|
||||||
|
|
||||||
|
- **Audit/review tasks**: Dispatch multiple agents in parallel to read different files, test suites, or doc sets simultaneously
|
||||||
|
- **Context management**: Use agents for large file reads to keep main context lean. Agents can read, search, and analyze without bloating your context window
|
||||||
|
- **Never read 10+ files sequentially**: Batch them into 2-3 agent calls instead
|
||||||
|
- **Pattern**: Read 3-4 files yourself for immediate edits, dispatch agents for everything else
|
||||||
|
|
||||||
|
**Good patterns:**
|
||||||
|
```
|
||||||
|
# Parallel audit of different subsystems:
|
||||||
|
agent("Read all hooks in config/hooks/live/ and report issues")
|
||||||
|
agent("Read all test files and count tests, find stale ones")
|
||||||
|
agent("Read all docs and check PRD alignment")
|
||||||
|
|
||||||
|
# Context management for large files:
|
||||||
|
agent("Read src/security-hardening.sh and report all functions and issues")
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## ⚠️ CRITICAL RULES - READ THESE FIRST
|
## ⚠️ CRITICAL RULES - READ THESE FIRST
|
||||||
|
|||||||
Reference in New Issue
Block a user