internal-audit is a small local-first CLI that checks whether a repository matches a declared intent.yaml contract.
It does not call any cloud service, LLM, or telemetry endpoint.
Source checkout:
git clone <repo-url>
cd internal-audit
pip install -e .
python scripts/smoke_test.pySource checkout usage:
If you have not installed IA as a package, run commands with PYTHONPATH=src.
PowerShell:
$env:PYTHONPATH="src"
python -m ia.cli checkmacOS/Linux:
PYTHONPATH=src python -m ia.cli checkOr install from the repo:
python -m pip install -e .
ia checkVerify a target repository:
cd /path/to/your/project
ia init
ia checkDo not run ia check from the internal-audit repo root unless you intentionally want to scan IA's own demo and validation fixtures. Run IA from the project you want to verify.
Expected output:
Wrote audit_receipt.md
Wrote audit_receipt.json
Final decision: PASS
Use this when you are working directly from the IA source tree:
git clone <repo-url>
cd internal-audit
pip install -e .
python scripts/smoke_test.py
python scripts/hardening_validation.py
python scripts/adversarial_validation.py
python scripts/break_corpus.pyFrom the IA source checkout, you can also run the CLI module directly:
python -m ia.cli verify
python -m ia.cli check
python -m ia.cli demoUse this when you want IA available as a normal command in another repository after installing it from this repo or another package source you control:
pip install /path/to/internal-audit
cd /path/to/target-repo
ia scaffold
ia checkIf intent.yaml does not exist yet:
ia init
ia checkInitialize a contract:
ia initVerify the current repository:
ia verifyAgent-friendly alias:
ia checkCreate Codex-ready scaffolding:
ia scaffoldRun the built-in drift demo:
ia demoIA is designed to sit after code generation, not before it.
Recommended workflow:
- Agent generates or edits code.
- Agent runs
ia check. - If IA returns
FAIL, the agent stops, readsaudit_receipt.md, repairs drift, and rerunsia check. - If IA returns
PASS, the agent continues.
Agent setup docs:
Ready-to-paste prompts:
Auto-setup prototype:
- IA v0.2 Auto Setup Feasibility Spike
- This is a prototype only.
- It is not current v0.1 default behavior.
- It requires Codex or another cooperating agent to follow
AGENTS.mdor equivalent startup instructions.
+-------------------+
| intent.yaml |
| declared contract |
+---------+---------+
|
v
+-------------------+
| ia verify/check |
| parse + scan repo |
+---------+---------+
|
+--------------+--------------+
| | |
v v v
telemetry local-first shell/delete
detector detector detectors
\ | /
\ | /
+------------+------------+
|
v
+-------------------+
| audit_receipt.md |
| audit_receipt.json|
+-------------------+
ia init creates this file when intent.yaml is missing:
no_telemetry: true
local_first: true
read_only: false
no_shell_execution: trueThe parser is intentionally small for v0.1. It supports only flat boolean lines like key: true or key: false, ignores blank lines and # comments, and rejects nested YAML.
pass_repo=>PASSfail_repo=>FAIL- receipts generated:
audit_receipt.mdandaudit_receipt.json
IA v0.1 intentionally uses a minimal boolean-only intent.yaml parser to remain offline and dependency-free.