autonomous-ai-agency / agent
CLAUDE.md9 starsChanged 3 months agoMITView on GitHub
RISKY MODULE. This package orchestrates multi-step AI task execution and writes files to the filesystem. The invariants you must not break are CLAUDE.md rules 16–20; the SSRF boundary is rule 14; agent/tools.py and agent/web_reach.py are both gated by rule 15. Read those first. This file covers what the package is and how to extend it. The three-role orchestration loop: AgentRunner.run() in loop.py drives the cycle. RepowiseIntelligence in repowise.py provides codebase understanding. WorkspaceTools in tools.py is the only place that writes…
- Reads credentials
In this repository109 other files it gives its agents.
- AGENTS.mdAGENTS.md
- docs/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- router/CLAUDE.mdCLAUDE.md
- .agents/skills/llms.txtllms.txt
- agent-harnessSkill
- auto-fixSkill
- brain-dumpSkill
- industrial-brutalist-uiSkill
- changelog-enforcerSkill
- checkpoint-strategySkill
- context-primeSkill
- cooldown-resumeSkill
- council-reviewSkill
- data-quality-auditSkill
- debug-tracerSkill
- dependency-auditSkill
- deslopSkill
- docs-syncSkill
- duplicate-threadSkill
- email-triageSkill
- fabric-patternsSkill
- feature-flagSkill
- git-hygieneSkill
- graphifySkill
- implementation-plannerSkill
- insightsSkill
- issue-resolverSkill
- learn-ruleSkill
- local-ai-querySkill
- lr-schedule-advisorSkill
- minimalist-uiSkill
- modularity-reviewSkill
- full-output-enforcementSkill
- parallel-agentsSkill
- parallel-worktreesSkill
- prompt-librarySkill
- prompt-transparencySkill
- pro-workflowSkill
- redesign-existing-projectsSkill
- release-readinessSkill
- replay-learningsSkill
- repo-memory-updaterSkill
- repowise-intelligenceSkill
- researchSkill
- resource-panelSkill
- risky-module-reviewSkill
- sandboxed-execSkill
- scope-guardSkill
- self-improveSkill
- session-handoffSkill
- skill-composerSkill
- smart-commitSkill
- high-end-visual-designSkill
- stitch-design-tasteSkill
- system-prompt-auditSkill
- task-alive-updatesSkill
- task-scoperSkill
- design-taste-frontendSkill
- test-first-executorSkill
- The first 60 shown.
The file
We split this CLAUDE.md into the rules it gives an agent
5 rules. About 0 are common, 0 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 58
Add a dispatch case in _dispatch_tool() — it is checked after the tool registry.
- Very specific: line 59
Document the tool in agent/models.py (ToolCall schema).
- Very specific: line 60
Add tests in tests/test_agent_tools.py, or tests/test_repowise_intelligence.py for intelligence tools.
- Very specific: line 71
Add it to build_tool_prompt() in prompts.py — rule 19.
- Very specific: line 73
Test the module directly, plus one test asserting the registry exposes it (see tests/test_web_reach.py).
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.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.
Files
CLAUDE.md — agent/
RISKY MODULE. This package orchestrates multi-step AI task execution and writes files to the filesystem.
The invariants you must not break are
CLAUDE.mdrules 16–20; the SSRF boundary is rule 14;agent/tools.pyandagent/web_reach.pyare both gated by rule 15. Read those first. This file covers what the package is and how to extend it.
What this package does
The three-role orchestration loop:
Planner → produces an AgentPlan with ordered steps
Executor → applies file changes per step
Verifier → validates each change before it is writtenAgentRunner.run() in loop.py drives the cycle. RepowiseIntelligence in
repowise.py provides codebase understanding. WorkspaceTools in tools.py is the
only place that writes to the filesystem.
Per-role models come from AGENT_PLANNER_MODEL, AGENT_EXECUTOR_MODEL,
AGENT_VERIFIER_MODEL, and AGENT_JUDGE_MODEL, all defaulting to
nvidia/nemotron-3-super-120b-a12b (the judge falls back to the verifier's model). Override in .env to test without large
models.
Security surface
tools.py → apply_diff() writes arbitrary content to disk. It resolves paths but
does not enforce a strict root boundary by default — any change to path handling must
keep resolved paths inside self.root, and must never take a raw path from untrusted
input.
loop.py → _local_safety_check() scans generated code for hardcoded secrets (JWT
secret keys, fake user DBs). Add new risky patterns here — OS command injection, eval
— as you find them. The verifier LLM is best-effort and is not a security layer on its
own.
loop.py → _commit_step() auto-commits when auto_commit=True. Never pass an
unsanitised step description as a commit message.
Adding a new tool
Two supported paths. Pick one.
A. Hardcoded dispatch — for filesystem or container operations that need self._mcp
routing or other AgentRunner state (see read_file, write_file, run_command):
- Implement the operation in
tools.py. - Add a dispatch case in
_dispatch_tool()— it is checked after the tool registry. - Document the tool in
agent/models.py(ToolCallschema). - Add tests in
tests/test_agent_tools.py, ortests/test_repowise_intelligence.pyfor intelligence tools.
B. Capability registry — for self-contained capabilities with no AgentRunner state
dependency (see web_reach.py's fetch_url / web_search):
- Implement it as its own module, with its own tests. Fail soft — never raise; return a result dict the model can read.
- Register it with
registry.agent_tool(...)from a_register_*_tools()function called by_register_builtin_tools()incapability_registry.py._dispatch_tool()already checks the registry first, so no dispatch-chain edit is needed. - Add it to
build_tool_prompt()inprompts.py— rule 19. Registration alone is silent. - Test the module directly, plus one test asserting the registry exposes it (see
tests/test_web_reach.py).
Any tool accepting a URL, path, or other externally-influenced target needs its
SSRF/traversal guard before the first network or filesystem call — unsafe_target_reason()
in web_reach.py is the pattern. That is rule 14, and it is not optional.
Testing
| File | Covers |
tests/test_agent_runner.py | AgentRunner integration, via mocks and monkeypatching |
tests/test_agent_tools.py | WorkspaceTools units |
tests/test_web_reach.py | Web Reach capabilities and registry exposure |
pytest -x tests/test_agent_runner.py tests/test_agent_tools.pySkills worth invoking here
risky-module-review (required by rule 15 for tools.py and web_reach.py),
test-first-executor, implementation-planner.
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
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.

