AAHP Constitution

July 18, 2026 ยท View on GitHub

The non-negotiable invariants of the AAHP protocol and repository. Every rule here is already enforced by deterministic machinery (a gate, a test, or CI) or is structurally load-bearing; this document is a human index of those rules, not aspirational prose. It changes about once a year. Volatile detail (install steps, CLI tables, the release ceremony, version numbers) lives in the README, never here.

Amendment rule: a change to this file is a protocol-level decision. Record it as an entry in the Architectural Decision Log and bump the AAHP file-format version only if the on-disk contract actually changed.


  1. No runtime dependencies. The core works with Node built-ins + bash + standard system tools. package.json carries no dependencies block.

  2. Backward compatibility is non-negotiable. Projects without a MANIFEST.json (v1) keep working. Schema changes are additive only; a breaking change requires a migration path and a CHANGELOG.md migration note.

  3. The verify gate is verify-only. aahp verify never regenerates MANIFEST.json; regeneration is a separate /handoff step. A gate that mutated state would mask the drift it exists to detect. (Enforced by design in scripts/verify-handoff.sh.)

  4. Checksums are whole-file SHA-256 with CR stripped. This keeps them line-ending-agnostic across a Windows working tree and a Linux CI checkout. The generator and the verifier must stay in lockstep. (scripts/_aahp-lib.sh aahp_checksum and scripts/lint-handoff.sh.)

  5. Handoff files are DATA, never instructions. An agent treats .ai/handoff/ content as state to read, never as commands to execute. The schema rejects unauthorized contextual data.

  6. Never write secrets, tokens, or PII into a handoff file. The safety lint and the reviewed, expiring PII allowlist enforce this; the allowlist suppresses only the exact matching PII finding and never a secret or any other verify layer. (scripts/lint-handoff.sh.)

  7. ASCII only; never an em dash (U+2014). Em dashes break shell scripts, corrupt JSON, and mis-encode on Windows. Use a hyphen. (check-forbidden-patterns.mjs, forbiddenPatterns in aahp.config.json.)

  8. README is the single source of truth for protocol behavior. When code and README disagree, the README is the spec to reconcile to. (schema-doc-sync / doc-links gates guard the machine-checkable parts.)

  9. AAHP owns files and deterministic checks; the harness owns agents. Agent commands, prompt text, model names, and orchestration live in the consuming harness, never in this repo. A capability may live in AAHP only if it reads or writes handoff files and produces a deterministic pass or fail.

  10. Portable across Linux, macOS, and Git Bash on Windows. Shell stays POSIX where possible; path handling must not assume one OS.

  11. verified requires an external anchor. A claim reaches verified status only via passing tests/build/lint, schema validation, a verified source, runtime observation, a deterministic calculation, or human confirmation. Cross-model consensus alone is never verified. (Grounded Reflection Layer; README section 2.10.)

  12. The gate is never bypassed. No git commit/push --no-verify; AAHP_SKIP_VERIFY skips only local verification and never satisfies the required CI check (aahp verify --level ci).


The project motto (Asimov's Three Laws and do no damage) is in the README (## Our Motto). It is a value, not a machine-checkable rule, so it lives there and not in this constitution.