Repository navigation
docs: Phase 0 and Phase 1 contract-first gating documentation - #4
Merged
Merged
Conversation
- Phase 0: Add docs/contract-baseline.md with minimal contract format, required fields, optional color policy, deprecated allowedColors, schema path, and validation entry points - Phase 1: Update README and API to state validate is canonical gate; CI examples use --exit-codes v2; document INTERFACECTL_EXIT_CODES; position enforce --mode fail as optional policy-on-diff - Add docs/strategy.md and docs/feature-plan.template.md (README refs) - Add docs/plans/contract-first-enforcement-alignment.md and phase-0-1-execution-plan.md Refs: docs/plans/phase-0-1-execution-plan.md Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Strategy check
What changed
interfacectl validateis the canonical generation-time gate for contract compliance. All CI examples now use--exit-codes v2. Documented env vars: SURFACES_ROOT, SURFACES_CONTRACT, SURFACES_CONFIG, INTERFACECTL_EXIT_CODES (confirmed in code). Positioned enforce --mode fail as optional policy-on-diff.Why it matters
Readers can understand the contract format without reading the JSON schema alone. Teams have a single recommended command (validate with v2) for gating. CI examples use stable exit codes. Env var names are locked and documented.
Contract and enforcement notes
Tests
No test changes. Verified:
pnpm run buildandpnpm run testpass. Raninterfacectl validate --root packages/interfacectl-cli/test/fixtures/minimal-project --contract contracts/ui.contract.json --exit-codes v2from repo root; exit 0 when compliant.Phase 0 and Phase 1 PR Review Checklist
Acceptance criteria satisfied
From docs/plans/phase-0-1-execution-plan.md:
Phase 0: (1) docs/contract-baseline.md describes minimal contract, optional color policy, deprecated allowedColors; (2) schema path and validation entry points named; (3) no schema or validator code changes.
Phase 1: (1) README and API state validate is recommended gate; CI command includes --exit-codes v2; (2) README CI example shows --exit-codes v2 and documents INTERFACECTL_EXIT_CODES; (3) No gate command added; (4) validate against minimal-project fixture exits 0 when compliant (verified).
Made with Cursor