ArchSutra AI / Handbook
Testing and proof
Real, reproducible evidence: test results, CI matrix, labeled-fixture evaluation, sample outputs, and what is not proven.
Trust should be earned with evidence you can re-run. Everything below is reproducible from a clean clone.
1. Reproduce it yourself#
git clone https://github.com/shahvatsalofficial/archsutra-ai
cd archsutra-ai
npm ci
npm test # builds, then runs 20 tests
node scripts/eval.mjs # labeled-fixture precision / recall
node dist/cli.js verify . # validates skills, agents, links, diagrams
node dist/cli.js audit . # the tool audits itself2. Automated test results#
Captured output (Node 24, Windows 11; stored at docs/proof/test-results.txt):
✔ redact masks secrets and never returns the value
✔ safeJoin rejects traversal
✔ walk skips node_modules, respects file limit and flags truncation
✔ walk does not follow symlinks
✔ map detects modules, cycles and stack
✔ audit finds seeded problems with evidence and redacted excerpts
✔ audit on a clean small project has no high-severity findings
✔ audit does not flag secrets inside test files or env lookups
✔ install/uninstall roundtrip is idempotent and reversible
✔ install refuses to overwrite foreign files without --force and backs up when forced
✔ uninstall keeps files the user modified
✔ copilot and claude agent profiles contain only supported frontmatter
✔ mermaid checker flags bad diagrams
✔ repository itself verifies (skills, agents, links)
✔ cli: version, help, unknown command, model-only command exit codes
✔ cli: audit --json emits schema-valid output; --fail-on sets exit 1
✔ cli: export writes files, honours --dry-run, blocks escaping --output
✔ cli: install blocked on conflict returns exit 1, doctor reports
✔ labeled fixtures: precision and recall on seeded rules
✔ audit ignores rule text quoted inside html/json/markdown and fixture manifests (dogfooding regressions)
tests 20 pass 20 fail 0Note: the symlink test returns early (passes without asserting) on systems where creating a symlink or junction is not permitted. CI on Linux and macOS exercises the junction path where allowed.
3. Continuous integration#
Workflow: .github/workflows/ci.yml. Matrix: Ubuntu, Windows, macOS x Node 20, 22 = 6 jobs. Each job runs npm ci, typecheck, tests, verify, a self-audit with --fail-on high, and a check that production dependencies are empty.
Result on the release commit: all 6 jobs succeeded. Live status and history: https://github.com/shahvatsalofficial/archsutra-ai/actions
A first CI run failed on Node 20 because the test script used a glob unsupported by Node 20's test runner; the fix (use node --test auto-discovery) was committed and all 6 jobs then passed. This is a real example of CI catching a portability bug.
Additional workflows: CodeQL static analysis (JavaScript/TypeScript, weekly and on push), Dependabot, and the docs-site deploy.
4. Labeled-fixture evaluation#
Two fixtures with ground-truth expectations live in fixtures/:
| Fixture | Description | Expected rules |
|---|---|---|
brownfield-monolith | layered monolith with deliberate violations (SQL interpolation, eval, disabled TLS verification, module cycle, layer inversion, root container, unpinned image, latest dependency, no lockfile, no CI/tests/README) | 12 |
clean-service | small well-formed service (README, lockfile, tests, CI, pinned non-root Dockerfile) | 0 |
Result (docs/proof/eval-results.json):
| Metric | Value |
|---|---|
| True positives | 12 |
| False positives | 0 |
| False negatives | 0 |
| Precision | 1.00 |
| Recall | 1.00 |
How to read this honestly. The fixtures were written by the rule author. This is a regression suite that proves the rules do what they were designed to do, not an estimate of real-world accuracy. Real repositories will produce false positives and false negatives. A community-contributed corpus of real, labeled repositories is a roadmap item; until then, do not quote these numbers as accuracy.
5. Sample outputs (real, generated by the tool)#
Generated from the brownfield-monolith fixture:
| Artifact | Link |
|---|---|
| Audit report | examples/brownfield-monolith/sample-output/audit-report.md |
| Current state with Mermaid diagrams | current-state.md |
| Findings JSON (schema 1.0.0) | findings.json |
| SARIF 2.1.0 | findings.sarif |
Summary of that run: 12 findings (0 critical, 3 high, 7 medium, 2 low); Security rated weak, Maintainability adequate; Reliability, Performance, Scalability, Data integrity and Cost not assessed.
6. Self-audit (dogfooding)#
The tool audits its own repository in CI with the gate --fail-on high; on the release commit it reports no findings. Dogfooding is how two classes of false positive were found and fixed before release: rule text quoted inside generated HTML or JSON reports (TLS and IaC rules), and deliberately flawed fixture manifests (container and lockfile rules). Each now has a regression test. Command output: docs/proof/verify-output.txt.
7. Requirement-to-test map#
| Requirement | Test |
|---|---|
| F-01 bounded walk | walk skips node_modules, respects file limit and flags truncation |
| F-01 symlinks | walk does not follow symlinks |
| F-05, F-06 map, cycles | map detects modules, cycles and stack |
| F-10, F-11 rules, evidence | audit finds seeded problems with evidence and redacted excerpts |
| F-12 redaction | redact masks secrets ..., audit finds seeded problems ... (asserts no secret in JSON) |
| F-10 false positives | audit on a clean small project ..., audit does not flag secrets inside test files ... |
| F-14 fail-on | cli: audit --json ... --fail-on |
| F-20 to F-24 export | cli: export writes files, honours --dry-run, blocks escaping --output |
| F-30 to F-34 verify | repository itself verifies, mermaid checker flags bad diagrams |
| F-40 to F-43 install | install/uninstall roundtrip ..., install refuses to overwrite ..., uninstall keeps files the user modified |
| F-44 doctor | cli: install blocked on conflict returns exit 1, doctor reports |
| F-45 frontmatter | copilot and claude agent profiles contain only supported frontmatter |
| F-55 model commands | cli: version, help, unknown command, model-only command exit codes |
| Rule accuracy on fixtures | labeled fixtures: precision and recall on seeded rules |
8. What is not proven#
| Claim | Status |
|---|---|
| Skills are discovered and followed inside live Claude Code, Cursor, Codex, Copilot, Gemini CLI | Not verified. Only file generation is tested |
| Mermaid diagrams render | Structurally checked; rendering verified manually in a browser for the handbook site only |
| Accuracy on real-world repositories | Not measured |
| Performance on very large monorepos | Bounded by design; no benchmark published |
| Any legal or regulatory compliance | Not claimed |
If you can verify one of these, please open a "Host smoke test report" issue.