ArchSutra AI / Handbook
Contributor guide
How to set up, extend and release ArchSutra AI; coding rules and review checklist.
Short rules are in CONTRIBUTING.md. This is the detailed version.
1. Setup#
git clone https://github.com/shahvatsalofficial/archsutra-ai
cd archsutra-ai
npm ci
npm testWindows, macOS and Linux are supported. Use Node 20 or newer.
2. Principles#
- Deterministic, offline, read-only by default.
- Evidence over opinion: every finding cites a location or says it is
unknown. - Never print secrets. Route excerpts through
excerpt(). - Honesty over marketing: support levels, caveats,
not assessed. - Small modules; no new runtime dependency without a maintainer decision.
- Tests with every behavior change.
3. Add an audit rule#
- Pick an ID:
AS-<AREA>-<NNN>(SEC,ARC,OPS,SUP,IAC,AI,DOC). - Implement in
src/audit.ts(line rule inLINE_RULES, or a structural check). Fill every Finding field, includingcaveats. - Decide test-path behavior (
skipTests) and doc-file behavior. - Add a seeded case to
fixtures/brownfield-monolithand itsexpected.json, or a new fixture; ensureclean-servicestill yields none. - Add a unit test for the true positive and one for a likely false positive.
- Document in
docs/handbook/12-rule-catalog.md. - Run
npm test; precision and recall on fixtures must stay 1.00.
Avoid committing realistic secrets in fixtures. Build such strings at runtime inside tests (see FAKE_AWS), otherwise GitHub push protection may block the push.
4. Add an agent role#
Copy an existing file in agents/. Keep frontmatter name: archsutra-<id> and a one-line description. Required headings: Purpose, When to invoke, Required inputs, Tools and policy, Outputs, Quality criteria, Escalation. Keep it read-only. archsutra verify . enforces the structure.
5. Add or change a skill#
skills/<kebab-name>/SKILL.md with frontmatter name (equal to the directory), description (1-1024 characters, say what and when), optional license. Keep the body under 500 lines; move detail to references/. Follow the Agent Skills specification.
6. Add a host adapter#
- Read the vendor's current documentation. Record the URL.
- Add a
HostSpectoHOSTS(start asexperimental). - If the host needs a custom agent format, extend
renderAgentand emit only documented keys. - The roundtrip test iterates all hosts automatically; add host-specific assertions if needed.
- Update the compatibility matrix with what you actually tested.
7. Code style#
- TypeScript strict; no
anyunless interfacing with parsed JSON. - Prefer pure functions and explicit return types on exports.
- Comments explain why; keep them sparse.
- No network, no
child_processin the CLI.
8. Pull request checklist#
- [ ]
npm testpasses locally - [ ]
npm run verifypasses - [ ] New behavior has tests, including a negative case
- [ ] No secrets, no realistic secret-like strings committed
- [ ] Docs updated (handbook, matrix, rule catalog, changelog)
- [ ] Support claims match verification evidence
9. Release process (maintainers)#
- Update
CHANGELOG.mdandpackage.jsonversion (semantic versioning). npm test,npm run verify,node scripts/eval.mjs,node scripts/build-docs.mjs.- Regenerate proof files under
docs/proof/and sample outputs. - Commit, push, wait for the 6-job CI matrix.
- Tag
vX.Y.Zand create a GitHub release with notes copied from the changelog. - (Future) publish to npm after name and trademark checks.
10. Regenerating the documentation site#
Handbook Markdown in docs/handbook/ is the source. Run:
node scripts/build-docs.mjsThis writes docs/index.html, docs/handbook/*.html, docs/assets/, sitemap.xml and robots.txt. The pages.yml workflow deploys docs/ to GitHub Pages on push.
11. Governance#
Maintainer: Vatsal Shah. Decisions are made in issues and pull requests, recorded as ADRs when significant (docs/decisions/, template in templates/adr.md). Contributors are credited through git history and release notes. Conduct: Code of Conduct.