What you do
- Clone the repository and run
./init.sh. - Answer prompts (approve each tool install).
- Optional: run
./init.sh --dry-runfirst to preview.
One-Command Setup
Installs everything the framework needs on your machine.
./init.shWhat the framework does
- Checks prerequisites (Git, Node.js, jq, Docker) and offers to install any missing.
- Resolves the tool matrix for your platform and offers to install the applicable security tools (Semgrep, gitleaks, Snyk for all projects; Lighthouse + OWASP ZAP for web).
- Clones the Development Guardrails for Claude Code (git hooks + session rules).
- Generates your project folder, CI + release pipelines, CLAUDE.md, and three state files:
phase-state.json,.claude/process-state.json(build-loop/UAT/Phase 3 ledger), and.claude/manifest.json(host, deployment, poc_mode, enforcement level). - Initializes git, seeds
.claude/bypass-audit.json, and runs a health check.
What you do
- Run the intake wizard and answer plain-language questions.
- Describe project name, what it does, who uses it, platform (web/desktop/mobile/etc), language, success criteria, and the four independent settings the framework tracks:
- Deployment: personal or organizational.
- Track: Light / Standard / Full (depth of Phase 3 rigor).
- POC mode: production, Sponsored POC, or Private POC (Sponsored is org-only; Phase 4 is blocked in POC mode until
scripts/upgrade-project.sh --to-production). - Enforcement level: strict / light / no (strict is default and forced for organizational Sponsored POC + Production).
- Review the generated
PROJECT_INTAKE.mdbefore moving on.
Project Intake
Tell the framework exactly what you're building and why.
bash scripts/intake-wizard.shdata_classification + ZDR attestation for the Phase 1 → 2 gate.What the framework does
- Walks you through a structured Q&A tailored to your chosen platform.
- Offers context-aware suggestions (e.g. auth options for web, notarization for macOS desktop).
- Auto-fills the resolved tool matrix so the AI knows exactly which tools apply.
- Captures data classification (public / internal / confidential / pii / financial / health / regulated) and ZDR attestation — enforced later at the Phase 1 → 2 gate.
- Writes a complete intake document — no free-form guessing required later.
What you do
- Start Claude Code (or your AI agent of choice).
- Paste the context-loading prompt from the README.
- Read the AI's summary. Correct any misunderstanding before it starts work.
Give the AI Its Context
The agent reads its instructions before it does anything.
claudeWhat the framework does
- The AI reads five files in order:
CLAUDE.md(its rules),PROJECT_INTAKE.md(what to build), the Builder's Guide (how to build), the Platform Module (platform know-how), andphase-state.json(current stage). - Summarizes the goal, constraints, current phase, and available tools.
- Asks you clarifying questions — it does not start coding blind.
What you do (organizational only)
- Record six blocking pre-conditions as dated rows in
APPROVAL_LOG.mdbefore Phase 0 can advance. - Personal projects and Private POCs skip this row entirely; Sponsored POCs need rows 1 & 4 up front and may defer the rest.
Pre-Phase 0 · Organizational Pre-Conditions
Six governance rows before Day 1 for organizational deployments. See docs/governance-framework.md §V & §IX.4.
check-phase-gate.sh (Pre-Phase 0)What the framework checks
- Six named rows each with an ISO-dated approval (per
templates/generated/approval-log-org.tmpllines 16–28):- AI deployment path — IT Security approval.
- Insurance clearance / broker confirmation.
- Liability entity designation.
- Named Project Sponsor.
- Backup maintainer designation.
- ITSM registration.
- Sponsored POC: rows 1 & 4 required, rows 2/3/5/6 deferred (verified later by
scripts/upgrade-project.sh --to-production). - Private POC: all six deferred.
- Governance mode is forced strict for organizational Sponsored POC + Production.
What you do
- Answer the AI's discovery questions about goals and users.
- Review the draft Product Manifesto.
- Approve it in
APPROVAL_LOG.md(or request revisions).
Phase 0 · Product Discovery
Turn the idea into a written product agreement.
What the framework does
- AI walks the seven Phase 0 sub-steps: 0.1 FRD, 0.2 User Journey (Skeptical PM persona), 0.3 Data Contract, 0.4 Product Manifesto & MVP Cutline, 0.5 Revenue Model (Std+), 0.6 Competency Matrix (drives mandatory CI tooling for any "No" domain), 0.7 Trademark & Legal (Std+).
- Generates supporting artifacts: user journey, data contract.
- Organizational deployments: sponsor reviews the Compliance Screening Matrix (SOX / PCI / GDPR / HIPAA / GLBA / SEC / records-retention / EU-AI-Act) — see governance-framework.md §VIII.11.
- Cannot proceed to Phase 1 until the phase gate is approved. (STRIDE threat model is Phase 1.3, not here.)
Your approval unlocks the next phase
- Personal deployments: self-review recorded in
APPROVAL_LOG.mdwith name and date. - Organizational deployments: Project Sponsor is the sole named approver for business justification + compliance screening. The Sponsor (not you) must author the git commit that adds their signature.
Phase Gate 0 → 1
Framework refuses to advance without written sign-off. On success, a snapshot is copied to
docs/snapshots/phase-0-to-1_YYYY-MM-DD/.
What the framework checks
- Reads
APPROVAL_LOG.mdand (organizational) runsgit blame --line-porcelainon the Approver row itself — the git-commit author of that specific line must not equal the approver's name (anti-self-approval FAIL). Personal deployments skip this check. - Confirms
PRODUCT_MANIFESTO.mdhas all 8 numbered sections filled with content (no placeholders), and NOStatus: Openlines remain — either causes a FAIL. - Compares the dated Phase 0 → 1 entry against
phase-state.json::gates.phase_0_to_1. (Note: the gate script reads both dates; the JSON value itself is populated byscripts/upgrade-project.shor edited by the approver during the sign-off commit — the gate does not auto-write it.) - On PASS,
check-phase-gate.shcreates a point-in-time snapshot atdocs/snapshots/phase-0-to-1_YYYY-MM-DD/.
What you do
- Review architecture options with tradeoffs (usually 2–3 candidates).
- Pick the architecture. Read the test plan.
- Approve at the Phase 1 → 2 gate.
Phase 1 · Architecture & Planning
Design the system on paper before writing any code.
What the framework does
- AI walks the Phase 1 sub-steps: 1.1 Business Strategy Gateway (Std+ Go/No-Go), 1.1.5 Market Signal Validation, 1.2 Architecture & Stack Selection (3 candidates, 10 first-class decisions, Competency Matrix as required input), 1.3 STRIDE Threat Model (Penetration Tester persona), 1.4 Data Model, 1.4.5 Data Migration Plan (only if replacing an existing system), 1.5 UI/UX Scaffolding (four-state Empty/Loading/Error/Success), 1.6 Project Bible (16 sections), 1.7 Data Classification & ZDR Attestation.
- Writes Architecture Decision Records (ADRs) explaining why each big choice was made, and rejected alternatives.
- Configures branch protection against the real git-host API (GitHub/GitLab/Bitbucket) via
scripts/lib/host.sh— free-tier limitations use an attestation escape hatch (github_free_tier,gitlab_free_tier_approvals). - Produces a test plan mapped to intake acceptance criteria.
Your approval unlocks Phase 2
- Personal: self-review recorded in
APPROVAL_LOG.md. - Organizational: Senior Technical Authority approves architecture, security posture, and data classification.
Phase Gate 1 → 2
Includes the mandatory Zero Data Retention gate (Invariant #16).
Snapshot: docs/snapshots/phase-1-to-2_YYYY-MM-DD/.
What the framework checks
- Dated "Phase 1 → Phase 2" entry in
APPROVAL_LOG.md; organizational adds a per-line git-blame check on the STA row. PROJECT_BIBLE.mdexists with ≥14 numbered sections and no YYYY-MM-DD placeholder dates remaining.- Mandatory ZDR gate (Invariant #16):
phase1_artifacts.data_classificationmust be one of public / internal / confidential / pii / financial / health / regulated. Anything above public requireszdr_attested=trueOR a writtenzdr_attestation_reason. FAIL otherwise. - Branch protection backstop: real API call verifies force-push disabled + (org) 1+ PR approver + CI status checks. Free-tier attestation limits are accepted only if recorded in
process-state.json. - Personal → organizational upgrades: recurring WARN until the Retroactive Phase 1 → 2 STA Approval row is filled.
What you do
- Answer clarifying questions when the AI asks.
- Review test assertions and code diffs for each feature.
- Every ~2 features: run a UAT session and triage any bugs found.
- Mark bugs Fix Now / Defer / Won't Fix / Post-MVP.
Phase 2 · Construction (Build Loop)
Build features one at a time, TDD-first, with security review baked in. Full sub-loop shown below.
What the framework does
- Runs the Feature Build Loop for every feature (detailed diagram below).
- Enforces the Build Loop checklist on
feat:commits:process-checklist.shrequires the first five steps (tests_written → documentation_updated) done before allowing the commit. Non-feat:prefixes (chore:,fix:,refactor:, etc.) bypass this check — this is a scope-limited, not universal, gate. The TDD file-ordering check is warning-only (per README §Enforcement). - Runs gitleaks + Semgrep (staged-files) on every commit; blocks
--no-verifyand captures any that get through in.claude/bypass-audit.json. - Blocks
gh pr createwhen UAT is in progress with < 9 steps completed, or Build Loop steps 1–4 done but not step 5. - Test-gate reminds you when
features_since_last_testreaches the interval; you invokescripts/test-gate.sh --check-batchto trigger the UAT. - Blocks Phase 2 → 3 on any open SEV-1 OR any SEV-2 (open OR deferred — deferred SEV-2 must be resolved or the feature removed; no third option).
- Organizational: biweekly Mid-Phase 2 Governance Checkpoint with the Senior Technical Authority (30-min status review, escalation on ADR-less architecture deviation, test pass < 80%, unresolved security findings, AI quality degradation).
Your approval unlocks Phase 3
- Personal: self-review in
APPROVAL_LOG.md. - Organizational: Senior Technical Authority signs.
- Reconcile
FEATURES.mdvs the Manifesto MVP Cutline — any additions require documented orchestrator approval.
Phase Gate 2 → 3
Bug gate blocks; MVP-Cutline reconciliation required.
Snapshot: docs/snapshots/phase-2-to-3_YYYY-MM-DD/.
What the framework checks
- Dated "Phase 2 → Phase 3" entry in
APPROVAL_LOG.md. FEATURES.mdandCHANGELOG.mdexist and are non-empty.- Bug gate via
test-gate.sh --check-phase-gate: SEV-1 open > 0 → BLOCKED; SEV-2 open > 0 → BLOCKED; SEV-2 Deferred > 0 → BLOCKED (must resolve or remove feature); SEV-3 open → WARN.
What you do
- Walk the mechanically-enforced 9-step Phase 3 checklist (
process-checklist.sh --start-phase3): integration testing, security hardening, chaos testing, accessibility audit, performance audit, contract testing, results archived, pre-launch preparation, legal review. - Run
evaluation-prompts/Projects/run-reviews.sh <module>to produce the six adversarial reviewer reports (Standard: recommended; Full: Security + Red Team REQUIRED). Address all Critical / High findings. - Personal: self-review recorded. Organizational: gather written sign-offs from both Application Owner AND IT Security — see the Gate 3 → 4 row below.
- Security-domain "No" or "Partially" on the Competency Matrix → mandatory Security Peer Review before go-live, regardless of track (governance-framework.md §V.C).
Phase 3 · Validation & Security
Nine substeps + adversarial reviews + track-specific pen test + attorney legal review. Exit rule: zero Critical or High-severity findings.
docs/test-results/ archive, sbom.json, HANDOFF.md, INCIDENT_RESPONSE.md, SECURITY.md, review manifest, penetration test report (Std+).What the framework does
- 3.1 Integration Testing — Platform Module E2E suite over the full User Journey.
- 3.2 Security Hardening — you run Semgrep (
--config=p/owasp-top-ten --config=p/security-audit) + Snyk + gitleaks + license check + SBOM (CycloneDX/syft) + threat-model validation. Web: OWASP ZAP baseline (all tracks) / active (Full). Framework archives artifacts todocs/test-results/[date]_[scan-type]_[pass|fail].[ext]. - 3.3 Chaos & Edge-Case Testing — input abuse defenses, error recovery, concurrency, global error boundaries.
- 3.4 UX & Accessibility Audit — WCAG AA baseline; Lighthouse ≥ 90 for web; Full Track requires explicit screen-reader testing.
- 3.5 Performance Audit — latency vs data contract, memory stability, minimum-supported-hardware validation.
- 3.5.5 Contract Testing (Std+ for APIs/IPC/file formats); 3.5.7 Load/Stress Testing (Full).
- 3.5.9 Test Results Archive —
docs/test-results/is referenced from the Phase 3 → 4 APPROVAL_LOG entry and folded into HANDOFF.md. - 3.6 Pre-Launch Preparation (Std+) — Final UAT with formal acceptance sign-off (Sponsored POC / Production); MANDATORY attorney review of Privacy Policy AND Terms of Service recorded in APPROVAL_LOG (builders-guide.md §Phase 3.6); license audit passing; trademark search.
- Six evaluation prompts are operator-invoked via
run-reviews.sh;check-phase-gate.shonly WARNs (not FAILs) whendocs/eval-results/review-manifest.jsonis missing. Personas: Senior Engineer (01), CIO (02), SVP IT Security (03), Corporate Legal (04), Technical User (05), Red Team (06).
The heaviest gate — governance sign-offs required
- Personal: self-review recorded in
APPROVAL_LOG.md(single approver). - Organizational — dual approval: BOTH Application Owner Approval AND IT Security Approval subsections in
APPROVAL_LOG.mdmust have populated Date rows.- Application Owner: accepts operational risk + go-live readiness.
- IT Security: reviews scan results, penetration test, threat-model validation, risk acceptance.
- Each subsection is verified independently by
validate_approval_section_dated— header presence alone does not satisfy the gate. - Approvers must author their own commit (anti-self-approval via per-line git blame; org projects FAIL on self-approval).
- Attorney/Legal review recorded for Privacy Policy + ToS if applicable (external users).
- ITSM deployment change ticket referenced in the Phase 4 Completion row.
- Sponsored POC / Production Full UAT: formal acceptance sign-off by product sponsor or designated tester.
- See governance-framework.md §V Approval Authority row for Phase 3 → 4.
Phase Gate 3 → 4
Two written signatures (org), pen test on Std+, artifact roster, hard-block for POC.
Snapshot: docs/snapshots/phase-3-to-4_YYYY-MM-DD/ — the point-in-time audit record.
What the framework checks (check-phase-gate.sh:901–1056)
- Dated "Phase 3 → Phase 4" entry within 15 lines of the header.
- Organizational: BOTH Application Owner AND IT Security Date rows populated — either missing → FAIL.
- Required artifacts:
HANDOFF.md,docs/INCIDENT_RESPONSE.md,sbom.json, non-emptydocs/test-results/(empty → FAIL),SECURITY.md(missing → WARN),docs/eval-results/review-manifest.json. - Penetration test: Standard track requires
*pen-test*|*pentest*|*penetration*files indocs/test-results/or an IT Security exemption recorded inAPPROVAL_LOG.md. Full track has NO exemption path. - POC hard-block: if
poc_modeis set inphase-state.json, Phase 4 is BLOCKED with::error::. Points atscripts/upgrade-project.sh --to-production, which verifies each of the six deferred Pre-Phase 0 rows (or requires--ack-preconditions=<N1,N2,…>, recorded in.claude/bypass-audit.json). - Release pipeline TODO check:
.github/workflows/release.ymlunconfigured TODOs → WARN. - Bug gate (via
test-gate.sh --check-phase-gate) must pass. - On PASS: point-in-time snapshot copied to
docs/snapshots/phase-3-to-4_YYYY-MM-DD/containing gate-checked artifacts plus PRODUCT_MANIFESTO / PROJECT_BIBLE / FEATURES / CHANGELOG / BUGS / USER_GUIDE / RELEASE_NOTES / APPROVAL_LOG / HANDOFF / INCIDENT_RESPONSE / sbom (see builders-guide.md §Phase 3 → 4 Snapshot Mechanism). - Every enforcement decision (proposal, block, pass, out-of-band commit, escalation) is appended to
.claude/bypass-audit.json— the durable audit ledger.
What you do
- POC → Production upgrade first: Phase 4 is hard-blocked for
poc_modeprojects at BOTHcheck-phase-gate.shANDprocess-checklist.sh --start-phase4. Runscripts/upgrade-project.sh --to-productionBEFORE Phase 4 can start. - Walk the 6-step Phase 4 checklist: production build, rollback tested, go-live verified, monitoring configured, handoff written, handoff tested.
- Kick off the release (signing keys, store credentials, deploy) using your chosen strategy: cut-over (Light), blue/green (Std+ web), rolling/canary (Std+ >1000 users), feature flags (any track, high-risk).
- Update
RELEASE_NOTES.mdand hand off to users. - Organizational: file the ITSM deployment change ticket (ID recorded in the APPROVAL_LOG Phase 4 Completion row); the backup maintainer validates
HANDOFF.md— must be able to build, test, deploy, and run scans from the doc alone.
Phase 4 · Release & Maintenance
Ship the MVP with a tested rollback and verified monitoring. Then maintain on a four-cadence schedule.
HANDOFF.md, docs/INCIDENT_RESPONSE.md (SEV-1..SEV-4 severity matrix + notification chains), monitoring configuration, Phase 4 Completion row in APPROVAL_LOG.md.What the framework does
- Runs the release pipeline (
.github/workflows/release.yml) for your platform: build, sign, package, distribute. - MANDATORY rollback test BEFORE go-live (Step 4.1.5): deploy candidate → execute documented rollback → verify data integrity + revert. "A rollback procedure that has never been tested is not a rollback procedure — it is a hope."
- MANDATORY monitoring verification (Step 4.3): trigger a test error, confirm the alert was received. "Configured is not verified."
- PLATFORM MODULE MANDATORY go-live checklist (Step 4.2): SSL/security headers (web), code signing/auto-updater (desktop), app-store metadata & certificates (mobile). Failure may result in deployment rejection.
- Updates CHANGELOG + RELEASE_NOTES with what shipped.
- Turns on the maintenance cadence — actual cadences are monthly (CHANGELOG + SBOM, 35d), quarterly (dependency audit, 95d), biannually (full Phase 3 security+perf re-run + AI provider terms re-verification, 185d). Verified on demand by
scripts/check-maintenance.sh. - Records the release + all post-launch changes in the APPROVAL_LOG "Approval History" table; the point-in-time
docs/snapshots/phase-3-to-4_YYYY-MM-DD/stays immutable.