feat(code-audit): add README auditor as first code-audit slice#17
Merged
Conversation
Introduces a second domain alongside the thesis pipeline: factual-claim
audit of technical artefacts against the actual codebase. The README
auditor (`openworkers audit readme <repo>`) is the first slice; PR /
compliance / architecture auditors will follow on the same primitives.
The trust gate ("no verdict without evidence") is enforced in
providers/code_audit_agents.py::_enforce_trust_gate after the LLM
returns, not delegated to prompts. The audited README is excluded from
its own evidence pool so fabricated claims cannot self-verify.
New modules:
- core/sources/ — SourceAdapter ABC + LocalRepoAdapter (grep + scope guard)
- core/schemas_audit.py — Pydantic audit models (kept separate from
the thesis schemas so the two domains evolve independently)
- core/orchestrator/readme_flow.py — ReadmeAuditOrchestrator
- providers/code_audit_agents.py — planner/checker/critic + trust gate
- prompts/code_audit/*.md — audit templates with explicit JSON schemas
- apps/cli/main.py — `audit readme` subcommand alongside `thesis ...`
- tests/code_audit/ + tests/fixtures/sample_repo/ — fixture-driven
end-to-end test including an explicit trust-gate-override assertion
Docs:
- AGENTS.md — onboarding for future agents/contributors
- README.md — new "Code audit" section
- ROADMAP.md — new "Code-audit track" section
- CHANGELOG.md — Unreleased entry
Verification: 153/153 tests pass (existing thesis suite + 3 new),
mypy strict clean on new modules, ruff clean on new files
(2 pre-existing warnings in cmd_corpus/cmd_ingest predate this slice),
black formatted.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.
Introduces a second domain alongside the thesis pipeline: factual-claim audit of technical artefacts against the actual codebase. The README auditor (
openworkers audit readme <repo>) is the first slice; PR / compliance / architecture auditors will follow on the same primitives.The trust gate ("no verdict without evidence") is enforced in providers/code_audit_agents.py::_enforce_trust_gate after the LLM returns, not delegated to prompts. The audited README is excluded from its own evidence pool so fabricated claims cannot self-verify.
New modules:
audit readmesubcommand alongsidethesis ...Docs:
Verification: 153/153 tests pass (existing thesis suite + 3 new), mypy strict clean on new modules, ruff clean on new files (2 pre-existing warnings in cmd_corpus/cmd_ingest predate this slice), black formatted.
Summary
Changes
Testing
pytest tests/ -vpassesruff check .passesblack --check .passesmypy core/ providers/ --strict --ignore-missing-importspassesChecklist