feat(agents): add disallowedTools frontmatter to non-writer agents (#378)#382
Conversation
) Enforce capability boundaries at the harness level for four high-use agents that should never edit code: - monitor: disallowedTools: [Edit, Agent] (Write kept — may write .map/ evidence artifacts) - research-agent: disallowedTools: [Edit, Agent] (Write kept — may append to research artifact in MAP-planning mode) - predictor: disallowedTools: [Edit, Write, Agent] - evaluator: disallowedTools: [Edit, Write, Agent] task-decomposer already has permissionMode: plan and is unchanged. actor and final-verifier are intentionally excluded as legitimate writers. Propagates .jinja source through make render-templates to all generated trees (.claude/agents/, src/mapify_cli/templates/agents/). Adds TestAgentCapabilityHardening in tests/test_agent_frontmatter.py with 15 targeted assertions pinning the new contracts and guarding against silent removal. Updates docs/ARCHITECTURE.md with capability constraint notes per agent. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ncmsm1CnxkN9e6cgLGoDT8
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (14)
📝 WalkthroughWalkthroughChangesThe PR adds explicit Agent capability hardening
Estimated code review effort: 2 (Simple) | ~10 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Fixes #378 — enforce capability boundaries at the harness level for four high-use agents that should never edit code. Previously these agents relied on prompt-text alone; now the harness enforces the restriction directly.
Changes per agent:
monitor:disallowedTools: [Edit, Agent]— Write kept (may write.map/evidence artifacts)research-agent:disallowedTools: [Edit, Agent]— Write kept (may append to research artifact in MAP-planning mode)predictor:disallowedTools: [Edit, Write, Agent]evaluator:disallowedTools: [Edit, Write, Agent]task-decomposeralready haspermissionMode: planand is unchanged.actorandfinal-verifierare intentionally excluded as legitimate writers.Files changed:
src/mapify_cli/templates_src/agents/{monitor,research-agent,predictor,evaluator}.md.jinja— source editsmake render-templatesto.claude/agents/andsrc/mapify_cli/templates/agents/tests/test_agent_frontmatter.py— newTestAgentCapabilityHardeningclass with 15 targeted assertionsdocs/ARCHITECTURE.md— capability constraint notes added per agent specTest plan
uv run python -m pytest tests/test_agent_frontmatter.py -v— 17 passed (15 new capability tests + 2 existing)uv run python -m pytest tests/test_template_render.py -v— all render parity + check-render tests passuv run python -m pytest tests/ -v— 4074 passed, 4 skippeduv run ruff check src/ tests/— all checks passedmake render-templates— propagated cleanly to all generated treesGenerated by Claude Code
Summary by CodeRabbit
New Features
Tests