Repository navigation
v1.7: Enforcement Pyramid + Cost Reduction
Three enforcement gaps identified from the VenLink audit (10 code quality findings) and the NC System retrospective (260K LOC integration gaps), plus a significant cost reduction in the hook pipeline.
Three enforcement tiers shipped
1. Code Quality Enforcement Pipeline
Pushes rule enforcement down the pyramid — from "agent reads the doc" to ruff + AST hooks.
- Reference ruff config with 17 rule sets at `standards/code/ruff-reference.toml`
- Ruff audit mapping 34 standard rules to equivalents (20 direct, 14 guidance-only)
- 2 custom AST hooks: global mutable state (CQ-001) + no-op functions (CQ-002)
- Enforcement annotations on 7 existing standards docs (33 rules annotated)
- 3 new standards: import-discipline, test-isolation, fixture-fidelity
- Compiler `--audit-enforcement` flag validates annotation-to-ruff cross-references
2. Cross-Cutting Concept Registry
Extends the invariants framework with cross-boundary semantic contracts.
- `CONCEPT-NNN` entries in `INVARIANTS.md` with DbC fields (precondition / postcondition / invariant)
- Vocabulary registries for synonym drift detection across bounded contexts
- `check-concepts.sh` verify-phase hook + `check-vocabulary.py` scanner
- 3 VenLink-derived example concepts (tenant ownership, vendor status vocabulary, event handler lifecycle)
3. Integration Seam Test Evidence Gate
Answers the question "for every declared integration boundary, does a test exist that exercises it?"
- `SEAMS.md` manifest for cross-boundary integration seams
- L1 / L2 / L3 evidence levels (exists / exercises both sides / real deps, no mocks)
- `check-seam-evidence.sh` verify-phase hook
- Progressive adoption (no `SEAMS.md` = warning only)
Performance and cost
- Stop hook replaced: Sonnet 4.5 agent → bash `ci-gate.sh`. Zero model invocations on conversational turns. When code is modified, runs pytest / mypy / ruff / invariants mechanically.
- Default gate model: haiku (cheap/fast for mechanical checklists). Sonnet reserved for adversarial review where reasoning matters.
- No pinned model IDs — short aliases (`sonnet`, `opus`, `haiku`) resolve to the latest at runtime.
Other
- `spec-enforcer` registered as agent #21, wired into `/build` Step 7 for adversarial AC verification
- `tasks.py` path fixed for consumer projects (`~/.claude/scripts/tasks.py`)
Numbers
| Metric | v1.6 | v1.7 |
|---|---|---|
| Gates | 14 | 17 |
| Hooks | 11 | 14 |
| Agents | 20 | 21 |
| Standards | 33 | 38 |
| Tests | 302 | 409 |
Upgrade
```
git pull
python3 compile-sdlc.py spec/etc_sdlc.yaml
./install.sh
```