Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/plans/phase-0-extraction-guardrails.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

**Scope:** Contract extraction from Next.js app code (`interfacectl generate-contract`). Phase-scoped and revisitable.

## How extraction works

- **Input:** Next.js app directory (contains `app/`).
- **Method:** Filesystem walk + regex. No JSX, TypeScript, or CSS parsing.
- **Output:**
- `contracts/generated/<surface>.contract.json` — schema-valid contract with extracted facts under `x_extracted`.
- `contracts/generated/<surface>.extraction.json` — machine-readable extraction report and warnings.
- **Validation:** `validate-extracted` compares policy expectations (`surfaces[].phase0` in the policy contract) to extracted reality and fails CI on mismatch.

---

## No heavy AST in Phase 0
Expand Down