fix(doctor): add AGENTS.md size check to rig-level priming
The AGENTS.md file at rig level (e.g., gastown/AGENTS.md) should be a thin bootstrap pointer (<20 lines), not full context. This adds a check in checkRigPriming() to flag large AGENTS.md files, similar to how CLAUDE.md is checked in checkAgentPriming(). Also fixes missing filepath import in beads.go that was breaking the build. Closes: bd-mfrs6 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -191,6 +191,20 @@ func (c *PrimingCheck) checkRigPriming(townRoot string) []primingIssue {
|
||||
})
|
||||
}
|
||||
|
||||
// Check AGENTS.md is minimal at rig level (bootstrap pointer, not full context)
|
||||
agentsMdPath := filepath.Join(rigPath, "AGENTS.md")
|
||||
if fileExists(agentsMdPath) {
|
||||
lines := c.countLines(agentsMdPath)
|
||||
if lines > 20 {
|
||||
issues = append(issues, primingIssue{
|
||||
location: rigName,
|
||||
issueType: "large_agents_md",
|
||||
description: fmt.Sprintf("AGENTS.md has %d lines (should be <20 for bootstrap pointer)", lines),
|
||||
fixable: false, // Requires manual review
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Check witness priming
|
||||
witnessPath := filepath.Join(rigPath, "witness")
|
||||
if dirExists(witnessPath) {
|
||||
|
||||
Reference in New Issue
Block a user