CONSTITUTION.md — 16 Engineering Principles
The non-negotiable principles governing Forge:
- Zero Core LLM Calls: The kernel is strictly deterministic; zero non-deterministic API dependencies.
- Exit Code Governance: All gates block via system exit codes (0 = proceed, non-zero = halt).
- Git is the Single Truth: No external database, service, or cache.
- Data-Driven Artifacts: Workflow stages are nodes in a deterministic DAG.
- AST Anchors: Knowledge is bound to syntax trees, not brittle line numbers.
- Mechanical Drift Detection: Staleness is computed mathematically from diffs and digests.
- Pre-Implementation Specification: Behavioral delta specs must be written before code.
- Strict TDD: Implementation proceeds task by task under Red-Green-Refactor.
- Claim-Touch Accounting: Diff $\cap$ Anchors must be 100% accounted for.
- One-Way Ratchet: Complexity can escalate tracks, never downgrade.
- Evidence Before Claims: No completion claims without fresh verification command execution.
- Host Neutrality: Skills contain zero proprietary vendor prompts; mechanism lives in CLI.
- Deterministic Derived Tier: Derived files are formatted with LF and sorted keys.
- Controlled Retirement: Claims can only be retired on 4 legitimate grounds.
- Pre-Commit Enforcement: Drift prevention hooks guard the repository boundary.
- Version Skew Pinning: Repositories detect and warn against kernel version discrepancies.