Add audit subagent for codebases, agents, and processes - #4
Draft
CDave79 wants to merge 1 commit into
Draft
Conversation
Introduce a read-only auditor subagent that inspects a target directory across three domains — codebase, agents, and processes — using confined list_dir/read_file tools and emitting structured, severity-sorted findings as a markdown report. Wire it into the coordinator as delegate_audit and expose an `npm run audit` script. The auditor never writes to the target.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a third specialist subagent — an auditor — to the existing coordinator/subagent system. It performs a read-only audit of a target directory across three domains and produces a structured, severity-sorted markdown report.
.gitignorehygiene, secret management.How it works
src/agents/auditor.ts— new subagent. Maps the tree withlist_dir, reads files withread_file(both confined to the audit root via a path-escape guard, 64 KB read cap, ignoresnode_modules/.git/dist/etc.), records findings via a structuredrecord_findingtool, then renders a markdown report sorted by severity and grouped by domain. It never writes to the target.src/coordinator.ts— exposes the auditor asdelegate_audit(target, scope)alongside the existing research/writing tools.package.json— adds annpm run auditscript.README.md— documents the auditor, the updated architecture diagram, and usage.Usage
Verification
npm run typecheckpasses.ANTHROPIC_API_KEY(not run in CI).Notes
CLAUDE.mdis stale independent of this change (it still describes the repo as "freshly initialized" with onlyREADME.md, predating the existingsrc/tree). I left a full refresh of it out of scope here — happy to follow up in a separate change.https://claude.ai/code/session_0163nHqJ7tB7zwySim4BidgW
Generated by Claude Code