cfsa-antigravity 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +14 -0
  2. package/package.json +1 -1
  3. package/template/.agent/instructions/commands.md +8 -32
  4. package/template/.agent/instructions/patterns.md +3 -3
  5. package/template/.agent/instructions/tech-stack.md +71 -23
  6. package/template/.agent/instructions/workflow.md +12 -1
  7. package/template/.agent/rules/completion-checklist.md +6 -0
  8. package/template/.agent/rules/security-first.md +3 -3
  9. package/template/.agent/rules/vertical-slices.md +1 -1
  10. package/template/.agent/skill-library/MANIFEST.md +6 -0
  11. package/template/.agent/skill-library/stack/devops/git-advanced/SKILL.md +972 -0
  12. package/template/.agent/skill-library/stack/devops/git-workflow/SKILL.md +420 -0
  13. package/template/.agent/skills/api-versioning/SKILL.md +44 -298
  14. package/template/.agent/skills/api-versioning/references/typescript.md +157 -0
  15. package/template/.agent/skills/architecture-mapping/SKILL.md +7 -7
  16. package/template/.agent/skills/bootstrap-agents/SKILL.md +151 -152
  17. package/template/.agent/skills/clean-code/SKILL.md +64 -118
  18. package/template/.agent/skills/clean-code/references/typescript.md +126 -0
  19. package/template/.agent/skills/database-schema-design/SKILL.md +93 -317
  20. package/template/.agent/skills/database-schema-design/references/relational.md +228 -0
  21. package/template/.agent/skills/error-handling-patterns/SKILL.md +62 -557
  22. package/template/.agent/skills/error-handling-patterns/references/go.md +162 -0
  23. package/template/.agent/skills/error-handling-patterns/references/python.md +262 -0
  24. package/template/.agent/skills/error-handling-patterns/references/rust.md +112 -0
  25. package/template/.agent/skills/error-handling-patterns/references/typescript.md +178 -0
  26. package/template/.agent/skills/idea-extraction/SKILL.md +119 -12
  27. package/template/.agent/skills/logging-best-practices/SKILL.md +108 -767
  28. package/template/.agent/skills/logging-best-practices/references/go.md +49 -0
  29. package/template/.agent/skills/logging-best-practices/references/python.md +52 -0
  30. package/template/.agent/skills/logging-best-practices/references/typescript.md +215 -0
  31. package/template/.agent/skills/migration-management/SKILL.md +127 -311
  32. package/template/.agent/skills/migration-management/references/relational.md +214 -0
  33. package/template/.agent/skills/parallel-feature-development/SKILL.md +34 -43
  34. package/template/.agent/skills/pipeline-rubrics/references/be-rubric.md +1 -1
  35. package/template/.agent/skills/pipeline-rubrics/references/ia-rubric.md +1 -1
  36. package/template/.agent/skills/prd-templates/SKILL.md +20 -3
  37. package/template/.agent/skills/prd-templates/references/be-spec-template.md +2 -2
  38. package/template/.agent/skills/prd-templates/references/decomposition-templates.md +2 -2
  39. package/template/.agent/skills/prd-templates/references/fe-spec-template.md +1 -1
  40. package/template/.agent/skills/prd-templates/references/ideation-domain-template.md +8 -2
  41. package/template/.agent/skills/prd-templates/references/ideation-index-template.md +25 -1
  42. package/template/.agent/skills/prd-templates/references/operational-templates.md +1 -1
  43. package/template/.agent/skills/prd-templates/references/placeholder-workflow-mapping.md +50 -21
  44. package/template/.agent/skills/prd-templates/references/skill-loading-protocol.md +32 -0
  45. package/template/.agent/skills/prd-templates/references/slice-completion-gates.md +21 -0
  46. package/template/.agent/skills/prd-templates/references/spec-coverage-sweep.md +3 -3
  47. package/template/.agent/skills/prd-templates/references/tdd-testing-policy.md +39 -0
  48. package/template/.agent/skills/prd-templates/references/vision-template.md +1 -1
  49. package/template/.agent/skills/regex-patterns/SKILL.md +122 -540
  50. package/template/.agent/skills/regex-patterns/references/go.md +44 -0
  51. package/template/.agent/skills/regex-patterns/references/javascript.md +63 -0
  52. package/template/.agent/skills/regex-patterns/references/python.md +77 -0
  53. package/template/.agent/skills/regex-patterns/references/rust.md +43 -0
  54. package/template/.agent/skills/session-continuity/SKILL.md +11 -9
  55. package/template/.agent/skills/session-continuity/protocols/02-progress-generation.md +2 -2
  56. package/template/.agent/skills/session-continuity/protocols/04-pattern-extraction.md +1 -1
  57. package/template/.agent/skills/session-continuity/protocols/05-session-close.md +1 -1
  58. package/template/.agent/skills/session-continuity/protocols/09-parallel-claim.md +1 -1
  59. package/template/.agent/skills/session-continuity/protocols/10-placeholder-verification-gate.md +57 -78
  60. package/template/.agent/skills/session-continuity/protocols/11-parallel-synthesis.md +1 -1
  61. package/template/.agent/skills/tdd-workflow/SKILL.md +94 -317
  62. package/template/.agent/skills/tdd-workflow/references/typescript.md +231 -0
  63. package/template/.agent/skills/testing-strategist/SKILL.md +74 -687
  64. package/template/.agent/skills/testing-strategist/references/typescript.md +328 -0
  65. package/template/.agent/skills/workflow-automation/SKILL.md +62 -154
  66. package/template/.agent/skills/workflow-automation/references/inngest.md +88 -0
  67. package/template/.agent/skills/workflow-automation/references/temporal.md +64 -0
  68. package/template/.agent/workflows/bootstrap-agents-fill.md +85 -143
  69. package/template/.agent/workflows/bootstrap-agents-provision.md +90 -107
  70. package/template/.agent/workflows/create-prd-architecture.md +16 -14
  71. package/template/.agent/workflows/create-prd-compile.md +11 -12
  72. package/template/.agent/workflows/create-prd-design-system.md +1 -1
  73. package/template/.agent/workflows/create-prd-security.md +9 -11
  74. package/template/.agent/workflows/create-prd-stack.md +10 -4
  75. package/template/.agent/workflows/create-prd.md +5 -6
  76. package/template/.agent/workflows/decompose-architecture-structure.md +3 -5
  77. package/template/.agent/workflows/decompose-architecture-validate.md +18 -1
  78. package/template/.agent/workflows/evolve-contract.md +11 -11
  79. package/template/.agent/workflows/ideate-discover.md +10 -6
  80. package/template/.agent/workflows/ideate-extract.md +61 -4
  81. package/template/.agent/workflows/ideate-validate.md +3 -3
  82. package/template/.agent/workflows/ideate.md +2 -2
  83. package/template/.agent/workflows/implement-slice-setup.md +25 -23
  84. package/template/.agent/workflows/implement-slice-tdd.md +51 -92
  85. package/template/.agent/workflows/implement-slice.md +4 -4
  86. package/template/.agent/workflows/plan-phase-preflight.md +6 -2
  87. package/template/.agent/workflows/plan-phase-write.md +6 -8
  88. package/template/.agent/workflows/resolve-ambiguity.md +1 -1
  89. package/template/.agent/workflows/update-architecture-map.md +22 -5
  90. package/template/.agent/workflows/validate-phase.md +26 -29
  91. package/template/.agent/workflows/verify-infrastructure.md +10 -10
  92. package/template/.agent/workflows/write-architecture-spec-design.md +17 -12
  93. package/template/.agent/workflows/write-be-spec-classify.md +25 -21
  94. package/template/.agent/workflows/write-be-spec.md +1 -1
  95. package/template/.agent/workflows/write-fe-spec-classify.md +6 -12
  96. package/template/.agent/workflows/write-fe-spec-write.md +1 -1
  97. package/template/AGENTS.md +1 -1
  98. package/template/GEMINI.md +3 -3
  99. package/template/docs/kit-architecture.md +34 -8
@@ -53,9 +53,9 @@ Read .agent/skills/concise-planning/SKILL.md and follow its methodology.
53
53
  Sort slices so each builds on the last:
54
54
  - Infrastructure slices first (DB schema, auth middleware)
55
55
 
56
- **Phase 1 special rule**: Before applying this rule, verify that `{{CI_CD_SKILL}}` and `{{HOSTING_SKILL}}` contain filled values (no literal `{{` characters). If unfilled, emit a **HARD STOP**: these placeholders are filled by `/create-prd-stack` — run it first.
56
+ **Phase 1 special rule**: Before applying this rule, read the surface stack map from `.agent/instructions/tech-stack.md` and verify that the **CI/CD** and **Hosting** cross-cutting categories have filled values. If empty, emit a **HARD STOP**: these are filled by `/create-prd-stack` — run it first.
57
57
 
58
- The `00-infrastructure` shard is always the first slice. Verify it covers: (1) CI/CD pipeline setup — read `.agent/skills/{{CI_CD_SKILL}}/SKILL.md`, (2) environment configuration (`.env.example`), (3) deployment pipeline — read `.agent/skills/{{HOSTING_SKILL}}/SKILL.md`, (4) project scaffolding from `.agent/instructions/structure.md` (directories, `README.md` files, base configs), (5) database initialization. Add missing items before proceeding.
58
+ The `00-infrastructure` shard is always the first slice. Verify it covers: (1) CI/CD pipeline setup — read the CI/CD skill(s) from the cross-cutting section of the surface stack map, (2) environment configuration (`.env.example`), (3) deployment pipeline — read the Hosting skill(s) from the cross-cutting section of the surface stack map, (4) project scaffolding from `.agent/instructions/structure.md` (directories, `README.md` files, base configs), (5) database initialization. Add missing items before proceeding.
59
59
 
60
60
  **Verification gates** (hard gates — add explicitly to the phase plan):
61
61
  - `/verify-infrastructure` MUST pass after the infrastructure slice, before any feature slice.
@@ -96,14 +96,12 @@ Read `.agent/skills/session-continuity/protocols/02-progress-generation.md` and
96
96
  ## 6.5. Bootstrap Completeness Gate
97
97
 
98
98
  Scan these four files for literal `{{` occurrences of `LANGUAGE_SKILL`, `HOSTING_SKILL`, `CI_CD_SKILL`, `ORM_SKILL`, `UNIT_TESTING_SKILL`, `E2E_TESTING_SKILL`:
99
- - `.agent/workflows/implement-slice-setup.md`
100
- - `.agent/workflows/implement-slice-tdd.md`
101
- - `.agent/workflows/verify-infrastructure.md`
102
- - `.agent/workflows/validate-phase.md`
103
99
 
104
- For each unfilled placeholder, read `docs/plans/*-architecture-design.md` to extract the confirmed value, then run `/bootstrap-agents` (see `.agent/workflows/bootstrap-agents.md`) with the corresponding key.
100
+ > **Note**: As of v3, these files no longer contain literal `{{` placeholders they reference the surface stack map. This gate now verifies that the surface stack map itself is fully populated for all surfaces involved in this phase.
105
101
 
106
- > STOP Re-scan the four files. Only proceed to Step 7 when zero `{{` patterns remain. If any remain unfilled after bootstrap, tell the user which placeholders could not be provisioned.
102
+ Read the surface stack map from `.agent/instructions/tech-stack.md`. Verify all per-surface and cross-cutting cells are filled. Verify `.agent/instructions/commands.md` has non-template values.
103
+
104
+ > ❌ STOP — Only proceed to Step 7 when the map is fully populated. If any cells are empty after bootstrap, tell the user which cells could not be provisioned.
107
105
 
108
106
  ## 7. Request review and next steps
109
107
 
@@ -29,7 +29,7 @@ Targeted ambiguity resolution for any pipeline document or layer. Uses the `reso
29
29
  If no argument was provided, ask the user which document or layer to resolve. Accept a layer name (`vision`, `architecture`, `ia`, `be`, `fe`) or a direct `@file` path.
30
30
 
31
31
  For layer names, resolve to the canonical document(s):
32
- - `ideation` → `docs/plans/ideation/ideation-index.md` + all domain files in `docs/plans/ideation/domains/`
32
+ - `ideation` → `docs/plans/ideation/ideation-index.md` + all domain files (in `docs/plans/ideation/domains/` and `docs/plans/ideation/surfaces/*/` for multi-product projects)
33
33
  - `architecture` → `docs/plans/YYYY-MM-DD-architecture-design.md` + `docs/plans/ENGINEERING-STANDARDS.md` + `docs/plans/data-placement-strategy.md`
34
34
  - `ia` → all files in `docs/plans/ia/` (excluding `index.md`)
35
35
  - `be` → all files in `docs/plans/be/` (excluding `index.md`)
@@ -39,7 +39,7 @@ Analyze the project structure using file exploration tools. Do not just stop at
39
39
  Read .agent/skills/architecture-mapping/SKILL.md and follow its component analysis methodology.
40
40
 
41
41
  Group files logically into components, but extract their exact contracts:
42
- - Use `grep_search` to find `z.object` or `interface` definitions.
42
+ - Use `grep_search` to find contract/validation schema definitions. Search for patterns appropriate to the project's contract library (e.g., `z.object` for Zod, `BaseModel` for Pydantic, `Joi.object` for Joi, `schema(` for Yup, `struct` for Rust/Go, or `interface`/`type` definitions for TypeScript). Check `.agent/instructions/tech-stack.md` for the project's confirmed contract library if unsure.
43
43
  - Document exact schema names, required environment variables, and binding names (e.g., KV namespaces, R2 buckets).
44
44
 
45
45
  ## 3. Map Explicit Data Flow and Relationships
@@ -65,10 +65,27 @@ Create or update `docs/ARCHITECTURE.md`.
65
65
 
66
66
  Ensure the document is human-readable, well-structured, and focuses on high-level system interactions rather than low-level functional documentation.
67
67
 
68
- ## 6. Present Results and Next Steps
68
+ ## 6. Phase completion gate
69
69
 
70
- Use `notify_user` to present a summary of the architecture map updates.
70
+ Read `docs/plans/*-architecture-design.md` **Phasing** section to determine the total number of planned phases.
71
+ Read `.agent/progress/index.md` to determine the current phase number N and how many phases have `status: complete`.
71
72
 
72
- ### Proposed next steps
73
+ ### If completed phases < total phases
73
74
 
74
- "Architecture map updated. Next: Run `/plan-phase` for the next phase, or if all phases are complete, the project is ready for deployment — refer to your CI/CD pipeline configuration and the deployment procedures documented in `docs/plans/ENGINEERING-STANDARDS.md`."
75
+ The pipeline has more phases to implement. Present:
76
+
77
+ > "Architecture map updated for Phase N. **Next**: Run `/plan-phase` for Phase [N+1]."
78
+
79
+ ### If completed phases = total phases
80
+
81
+ All phases are complete. The pipeline has reached its terminal state. Present:
82
+
83
+ > "✅ **All phases complete.** Architecture map updated. The project is ready for deployment.
84
+ >
85
+ > - Refer to `docs/plans/ENGINEERING-STANDARDS.md` for deployment procedures
86
+ > - Refer to your CI/CD pipeline configuration for automated deployment
87
+ > - Run `/validate-phase` for the final phase if not already done
88
+ >
89
+ > No further `/plan-phase` iterations are needed."
90
+
91
+ **Do NOT propose `/plan-phase` after the final phase.** The loop terminates here.
@@ -39,17 +39,11 @@ This is an optimization, not a requirement. Sequential validation is always corr
39
39
 
40
40
  ## 1. Run test suite
41
41
 
42
- Read .agent/skills/{{E2E_TESTING_SKILL}}/SKILL.md and follow its E2E test conventions.
43
-
44
- Run `{{TEST_COMMAND}}`.
45
-
46
- All tests must pass. Zero tolerance for failing tests.
42
+ Run the Test Cmd from `.agent/instructions/commands.md`. All tests must pass. Zero tolerance.
47
43
 
48
44
  ## 2. Check coverage
49
45
 
50
- Read .agent/skills/{{UNIT_TESTING_SKILL}}/SKILL.md and follow its test writing conventions.
51
-
52
- Run `{{TEST_COVERAGE_COMMAND}}`.
46
+ Run the Test Coverage Cmd from `.agent/instructions/commands.md`.
53
47
 
54
48
  Read `docs/plans/ENGINEERING-STANDARDS.md` and use the coverage thresholds defined in the "Test Coverage" section. If the file doesn't exist or thresholds aren't defined, fall back to these defaults:
55
49
  - Statements: 80%
@@ -59,21 +53,31 @@ Read `docs/plans/ENGINEERING-STANDARDS.md` and use the coverage thresholds defin
59
53
 
60
54
  Critical paths are defined as: auth flows, payment processing, data mutations, and permission/authorization checks.
61
55
 
56
+ ## 2.5. Mutation testing (critical paths)
57
+
58
+ **Optional but recommended.** If the project's test tooling supports mutation testing (e.g., Stryker for JS/TS, mutmut for Python, cargo-mutants for Rust):
59
+
60
+ 1. Run the mutation testing tool against critical path modules only (auth, payments, data mutations, permission checks)
61
+ 2. **Required**: Mutation score ≥ 70% on critical paths — if below, the tests are passing but not actually catching bugs
62
+ 3. **Recommended**: Mutation score ≥ 50% on non-critical paths — log as a finding but don't block
63
+
64
+ If mutation testing is not available in the project's tooling, skip and note in the validation report that mutation testing was not run.
65
+
62
66
  ## 3. Lint
63
67
 
64
- Run `{{LINT_COMMAND}}`.
68
+ Run the Lint Cmd from the surface stack map.
65
69
 
66
70
  Zero lint errors. Warnings should be reviewed and addressed.
67
71
 
68
72
  ## 4. Type check
69
73
 
70
- Run `{{TYPE_CHECK_COMMAND}}`.
74
+ Run the Type Check Cmd from the surface stack map.
71
75
 
72
76
  Zero type errors. Strict mode must be enabled.
73
77
 
74
78
  ## 5. Build
75
79
 
76
- Run `{{BUILD_COMMAND}}`.
80
+ Run the Build Cmd from the surface stack map.
77
81
 
78
82
  Build must succeed with no errors.
79
83
 
@@ -81,8 +85,6 @@ Build must succeed with no errors.
81
85
 
82
86
  ## 5.5. CI/CD pipeline verification
83
87
 
84
- Read .agent/skills/{{CI_CD_SKILL}}/SKILL.md and follow its pipeline configuration conventions.
85
-
86
88
  Verify the CI/CD pipeline is green for this phase's changes:
87
89
 
88
90
  1. Check that a CI/CD configuration file exists (e.g., `.github/workflows/`, `.gitlab-ci.yml`)
@@ -97,9 +99,7 @@ Verify the CI/CD pipeline is green for this phase's changes:
97
99
 
98
100
  ## 5.6. Staging deployment gate
99
101
 
100
- Read .agent/skills/{{HOSTING_SKILL}}/SKILL.md and follow its deployment conventions.
101
-
102
- 1. Deploy to staging using the deployment skill (`.agent/skills/deployment-procedures/SKILL.md`)
102
+ 1. Deploy to staging using `.agent/skills/deployment-procedures/SKILL.md`
103
103
  2. Verify deployment succeeded (no rollback triggered, no error logs in the deployment output)
104
104
  3. Run smoke tests against the staging environment:
105
105
  - Health check endpoint returns 200
@@ -114,9 +114,7 @@ Read .agent/skills/{{HOSTING_SKILL}}/SKILL.md and follow its deployment conventi
114
114
 
115
115
  ## 5.7. Migration verification
116
116
 
117
- Read .agent/skills/{{ORM_SKILL}}/SKILL.md and follow its migration and schema conventions.
118
-
119
- 1. Run the migration status command (e.g., `prisma migrate status`, `drizzle-kit status`, or equivalent for your ORM)
117
+ 1. Run the migration status command (e.g., `prisma migrate status`, `drizzle-kit status`, or equivalent)
120
118
  2. Verify there are no pending migrations and no failed migrations
121
119
  3. Verify the CI/CD pipeline ran migrations successfully as part of this phase's deployment
122
120
  4. Check that rollback scripts exist for each migration in this phase
@@ -134,22 +132,21 @@ Read `.agent/skills/prd-templates/references/spec-coverage-sweep.md` and follow
134
132
 
135
133
  ## 6. Accessibility audit (if UI changes)
136
134
 
137
- Read .agent/skills/{{ACCESSIBILITY_SKILL}}/SKILL.md and follow its methodology.
138
- Audit all new UI components in this phase for WCAG 2.1 AA compliance.
135
+ Audit all new UI components in this phase for WCAG 2.1 AA compliance using the Accessibility skill(s) from the cross-cutting section.
139
136
 
140
- ## 7. Performance check (if web surface exists)
137
+ ## 7. Performance check
141
138
 
142
- Check if the `web-performance-optimization` skill is installed (look for `.agent/skills/web-performance-optimization/SKILL.md`).
139
+ Check if the `performance-optimization` skill is installed (look for `.agent/skills/performance-optimization/SKILL.md`).
143
140
 
144
141
  **If installed**:
145
- 1. Read `.agent/skills/web-performance-optimization/SKILL.md`
146
- 2. Run the skill's audit protocol against the phase's changed pages/routes
147
- 3. Compare results to the targets in `docs/plans/ENGINEERING-STANDARDS.md` (LCP, FID, CLS, bundle size)
142
+ 1. Read `.agent/skills/performance-optimization/SKILL.md`
143
+ 2. Run the skill's audit protocol against the phase's changed pages/routes/endpoints
144
+ 3. Compare results to the targets in `docs/plans/ENGINEERING-STANDARDS.md` (response time budgets, bundle sizes, memory limits, or other surface-appropriate metrics)
148
145
  4. Report any metrics that exceed the defined thresholds
149
146
 
150
147
  **If not installed**:
151
- - Note: "No web performance skill installed. Skipping automated performance audit."
152
- - Manually verify that no obviously expensive operations were added (large synchronous imports, unoptimized images, missing lazy loading)
148
+ - Note: "No performance optimization skill installed. Skipping automated performance audit."
149
+ - Manually verify that no obviously expensive operations were added (large synchronous imports, unoptimized assets, missing lazy loading, N+1 queries, unbounded loops)
153
150
  - If performance is critical for this project, recommend installing the skill via `find-skills`
154
151
 
155
152
  ## 8. Security review
@@ -158,7 +155,7 @@ Read .agent/skills/adversarial-review/SKILL.md and follow its structured methodo
158
155
 
159
156
  Read .agent/skills/security-scanning-security-hardening/SKILL.md and run its full defense-in-depth audit protocol against the phase's changes (new endpoints, new data flows, new auth checks). Report findings with severity levels. Block the phase if any Critical or High severity issues are found.
160
157
 
161
- **Supplemental security checks (conditional)**: After the core audit completes, read `{{SECURITY_SKILLS}}` (comma-separated list of security skill directory names). For each skill directory name in the list, read `.agent/skills/[skill]/SKILL.md` and run its audit protocol as a supplement to the core audit.
158
+ **Supplemental security checks (conditional)**: After the core audit completes, read the Security skill(s) from the cross-cutting section of the surface stack map. For each listed skill directory name, read `.agent/skills/[skill]/SKILL.md` and run its audit protocol as a supplement to the core audit.
162
159
 
163
160
  Report any additional findings from supplemental audits with the same severity classification.
164
161
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Verify operational infrastructure after the infrastructure or auth slice — CI/CD green, staging live, migrations clean, auth working
3
3
  pipeline:
4
- position: 9.5
4
+ position: 7.5
5
5
  stage: verification
6
6
  predecessors: [implement-slice]
7
7
  successors: [implement-slice, validate-phase]
@@ -19,15 +19,15 @@ Operational verification gate that runs after the `00-infrastructure` slice and
19
19
 
20
20
  ## 0. Placeholder audit
21
21
 
22
- Scan the repository for any remaining `{{PLACEHOLDER}}` values:
22
+ Scan the surface stack map (`.agent/instructions/tech-stack.md`) for completeness:
23
23
 
24
- ```bash
25
- grep -rn '{{' --include='*.md' --include='*.ts' --include='*.json' . | grep -v node_modules | grep -v '.git/'
26
- ```
24
+ 1. Verify all per-surface rows have filled values for required columns
25
+ 2. Verify cross-cutting categories (Auth, Security, CI/CD, Hosting) have filled values
26
+ 3. Verify `.agent/instructions/commands.md` has non-template values
27
27
 
28
- **If any `{{PLACEHOLDER}}` values are found** → **STOP.** Run `/bootstrap-agents` to fill them before proceeding.
28
+ **If any map cells are empty** → **STOP.** Run `/bootstrap-agents` to populate them before proceeding.
29
29
 
30
- **Pass criteria**: Zero `{{PLACEHOLDER}}` values in the repository (excluding `node_modules` and `.git`).
30
+ **Pass criteria**: Surface stack map fully populated for all project surfaces.
31
31
 
32
32
  > Update report: Mark check 0 as `✅` in the report file.
33
33
 
@@ -55,7 +55,7 @@ Read `.agent/skills/prd-templates/references/infrastructure-report-template.md`
55
55
  Read .agent/skills/testing-strategist/SKILL.md and follow its methodology.
56
56
  Read .agent/skills/systematic-debugging/SKILL.md and follow its methodology.
57
57
 
58
- Read .agent/skills/{{CI_CD_SKILL}}/SKILL.md and follow its pipeline configuration conventions.
58
+ Load the CI/CD skill(s) from the cross-cutting section per the skill loading protocol (`.agent/skills/prd-templates/references/skill-loading-protocol.md`).
59
59
 
60
60
  Locate the CI/CD configuration file (e.g., `.github/workflows/`, `.gitlab-ci.yml`, `Jenkinsfile`).
61
61
 
@@ -98,7 +98,7 @@ Verify the CI/CD pipeline has run for the latest commit and ALL jobs are passing
98
98
 
99
99
  ## 4. Migration check
100
100
 
101
- Read .agent/skills/{{ORM_SKILL}}/SKILL.md and follow its migration and schema conventions.
101
+ Load the ORMs skill(s) from the `shared` surface row per the skill loading protocol.
102
102
 
103
103
  1. Run the migration status command (e.g., `prisma migrate status`, `drizzle-kit status`, or equivalent)
104
104
  2. Verify no pending or failed migrations
@@ -115,7 +115,7 @@ Read .agent/skills/{{ORM_SKILL}}/SKILL.md and follow its migration and schema co
115
115
 
116
116
  ## 5. Staging deployment
117
117
 
118
- Read .agent/skills/{{HOSTING_SKILL}}/SKILL.md and follow its deployment conventions.
118
+ Load the Hosting skill(s) from the cross-cutting section per the skill loading protocol.
119
119
  Read .agent/skills/deployment-procedures/SKILL.md and follow its pre-deployment checklist and verification protocol.
120
120
 
121
121
  1. Deploy to staging using the project's deployment process
@@ -22,9 +22,14 @@ Explore requirements, map all interactions, and define contracts, data models, a
22
22
 
23
23
  **Prerequisite**: Skeleton IA shard must exist in `docs/plans/ia/`. If it does not, tell the user to run `/decompose-architecture` first.
24
24
 
25
- ## 0. Placeholder guard
25
+ ## 0. Map guard
26
26
 
27
- Verify `{{DATABASE_SKILLS}}`, `{{SECURITY_SKILLS}}`, and `{{SURFACES}}` are filled (no literal `{{` characters). If any are unfilled → **HARD STOP**. For format and recovery mappings, see `.agent/skills/prd-templates/references/placeholder-guard-template.md` and `.agent/skills/session-continuity/protocols/10-placeholder-verification-gate.md`.
27
+ Read the surface stack map from `.agent/instructions/tech-stack.md`. Verify that the following have filled values:
28
+ - **Databases** column (per-surface, any row)
29
+ - **Security** category (cross-cutting)
30
+ - **Global Settings → Surfaces** list
31
+
32
+ If any are empty → **HARD STOP**: tell the user to run `/create-prd` first.
28
33
 
29
34
  ---
30
35
 
@@ -41,9 +46,9 @@ Before loading skills, check whether the shard file at `docs/plans/ia/[shard-nam
41
46
 
42
47
  ### 1a. Read the authoritative sources
43
48
 
44
- Read the following files and build a **reconciliation table** comparing what each source says about this shard's features. The relevant domain file in `docs/plans/ideation/domains/` is the **primary source of truth** for sub-features — the architecture design is secondary context.
49
+ Read the following files and build a **reconciliation table** comparing what each source says about this shard's features. Use the `ideation-index.md` Domain Documents table to find the correct domain file path (may be in `domains/` or `surfaces/{name}/` for multi-product projects). The ideation domain file is the **primary source of truth** for sub-features — the architecture design is secondary context.
45
50
 
46
- 1. The relevant domain file in `docs/plans/ideation/domains/`
51
+ 1. The relevant ideation domain file for this shard (path from `ideation-index.md` Domain Documents table)
47
52
  2. The shard's `## Features` section (from `/decompose-architecture-structure`)
48
53
  3. `docs/plans/ideation/ideation-index.md` — Must Have features for this domain
49
54
 
@@ -85,30 +90,28 @@ For each feature in the shard, document:
85
90
 
86
91
  ## 3. Define contracts
87
92
 
88
- Read .agent/skills/{{API_DESIGN_SKILL}}/SKILL.md and follow its methodology.
93
+ Read `.agent/skills/prd-templates/references/skill-loading-protocol.md` and load the API Design skill(s) from the cross-cutting section.
89
94
 
90
95
  For each interaction, define the contract shape:
91
96
  - Request shape (params, query, body)
92
97
  - Response shape (all fields typed)
93
98
  - Error shape (specific error codes)
94
- - Note: actual Zod schemas written in BE spec phase
99
+ - Note: actual {{CONTRACT_LIBRARY}} schemas written in BE spec phase
95
100
 
96
101
  **Review questions**: "Are there fields I'm missing from these requests/responses?" / "Are these error codes specific enough?"
97
102
 
98
103
  ## 4. Design data models
99
104
 
100
- Read each skill listed in `{{DATABASE_SKILLS}}` (comma-separated). For each skill directory name, read `.agent/skills/[skill]/SKILL.md` before proceeding. Also load these community skills for guidance:
105
+ Read `.agent/skills/prd-templates/references/skill-loading-protocol.md` and load the Databases skill(s) for this shard's surface. Also load:
101
106
  - `.agent/skills/database-schema-design/SKILL.md` — Schema design principles
102
107
  - `.agent/skills/error-handling-patterns/SKILL.md` — Error categories for contracts
103
108
  - `.agent/skills/technical-writer/SKILL.md` — Specification clarity
104
- - Tables/collections, fields, types
105
- - Relationships (graph edges, foreign keys, etc.)
106
- - Indexes for query patterns
107
- - Constraints and validation rules
109
+
110
+ Define for each entity: tables/collections, fields, types, relationships, indexes, constraints and validation rules.
108
111
 
109
112
  **Review questions**: "Does this schema capture everything this domain needs to store?" / "Are the relationships and cardinalities correct?" / "Are there derived/computed fields I should account for?"
110
113
 
111
- **Missing skill fallback**: If any database or security skill listed above is not installed and not in the MANIFEST, read `.agent/skills/find-skills/SKILL.md` and follow its discovery methodology before proceeding.
114
+ > **Decision recording**: For non-trivial data model decisions (schema approach, denormalization trade-offs, index strategy), read `.agent/skills/session-continuity/protocols/06-decision-analysis.md` and follow the **Decision Effect Analysis Protocol**.
112
115
 
113
116
  ## 5. Design access control
114
117
 
@@ -122,6 +125,8 @@ Read .agent/skills/security-scanning-security-hardening/SKILL.md and apply its a
122
125
 
123
126
  **Review questions**: "Can you think of a scenario where a user should be blocked that this matrix allows?" / "Can you think of a scenario where a user should be allowed that this matrix blocks?"
124
127
 
128
+ > **Decision recording**: For access control architecture decisions (role hierarchy, ownership model, escalation paths), read `.agent/skills/session-continuity/protocols/06-decision-analysis.md` and follow the **Decision Effect Analysis Protocol**. Record to `memory/decisions.md`.
129
+
125
130
  ## 5.5. Accessibility specifications
126
131
 
127
132
  Read `{{SURFACES}}` to determine the project's target surfaces.
@@ -73,37 +73,41 @@ Before classifying a shard as multi-domain, build a **sub-feature endpoint inven
73
73
  - For multi-domain: the proposed split boundaries
74
74
  - For structural reference: confirmation that no BE spec is needed
75
75
 
76
- ## 2.5. Verify tech stack skills are provisioned
76
+ ## 2.5. Verify surface stack map is populated
77
77
 
78
- Before loading the skill bundle, scan the skill bundle list in Step 3 for any values still containing literal `{{` characters.
78
+ Read the surface stack map from `.agent/instructions/tech-stack.md`. Determine this shard's surface from its directory path:
79
+ - `docs/plans/shared/be/` or `docs/plans/be/` → surface `shared`
80
+ - `docs/plans/web/be/` → surface `web`
81
+ - `docs/plans/desktop/be/` → surface `desktop`
82
+ - etc.
79
83
 
80
- If `{{LANGUAGE_SKILL}}`, `{{DATABASE_SKILLS}}`, `{{AUTH_SKILL}}`, `{{BACKEND_FRAMEWORK_SKILL}}`, `{{ORM_SKILL}}`, or `{{UNIT_TESTING_SKILL}}` are still unfilled **stop** and tell the user: *"Tech stack skills haven't been provisioned yet. The skill bundle placeholders are still unfilled. Run `/create-prd` first to make tech stack decisions and trigger bootstrap provisioning, then return to `/write-be-spec`."*
84
+ Check that the following map cells have filled values for this shard's surface:
85
+ - **Languages** (per-surface)
86
+ - **Databases** (per-surface)
87
+ - **BE Frameworks** (per-surface)
88
+ - **ORMs** (per-surface)
89
+ - **Unit Tests** (per-surface)
90
+ - **Auth** (cross-cutting)
81
91
 
82
- Only proceed to Step 3 when all skill bundle placeholders are filled with actual skill directory names.
92
+ If any required cells are empty **stop** and tell the user: *"Surface stack map is not fully populated for the `{surface}` surface. Run `/create-prd` first to make tech stack decisions and trigger bootstrap provisioning, then return to `/write-be-spec`."*
83
93
 
84
- ## 3. Load skill bundle
94
+ Only proceed to Step 3 when all required map cells are filled.
85
95
 
86
- Read .agent/skills/{{LANGUAGE_SKILL}}/SKILL.md and follow its language conventions.
87
- Read each skill listed in `{{DATABASE_SKILLS}}` (comma-separated). For each skill directory name, read `.agent/skills/[skill]/SKILL.md` before proceeding.
88
- Read .agent/skills/{{AUTH_SKILL}}/SKILL.md
89
- Read .agent/skills/{{BACKEND_FRAMEWORK_SKILL}}/SKILL.md
90
- Read .agent/skills/{{API_DESIGN_SKILL}}/SKILL.md
91
- Read .agent/skills/api-design-principles/SKILL.md
92
- Read .agent/skills/error-handling-patterns/SKILL.md
93
- Read .agent/skills/database-schema-design/SKILL.md
94
- Read .agent/skills/migration-management/SKILL.md
95
- Read .agent/skills/{{ORM_SKILL}}/SKILL.md and follow its migration and schema conventions.
96
- Read .agent/skills/{{UNIT_TESTING_SKILL}}/SKILL.md and follow its test writing conventions.
97
- Read .agent/skills/testing-strategist/SKILL.md
98
- Read .agent/skills/logging-best-practices/SKILL.md
96
+ ## 3. Load skill bundle
99
97
 
100
- **Missing skill fallback**: If any skill in the bundle above is not installed in `.agent/skills/` and is not in `.agent/skill-library/MANIFEST.md`, read `.agent/skills/find-skills/SKILL.md` and follow its discovery methodology to search for a community equivalent before proceeding without it.
98
+ Read `.agent/skills/prd-templates/references/skill-loading-protocol.md` and follow the **Skill Loading Protocol** for the `write-be-spec-classify` workflow. Load all categories listed in its table for this workflow, plus these bundled skills:
99
+ - `.agent/skills/api-design-principles/SKILL.md`
100
+ - `.agent/skills/error-handling-patterns/SKILL.md`
101
+ - `.agent/skills/database-schema-design/SKILL.md`
102
+ - `.agent/skills/migration-management/SKILL.md`
103
+ - `.agent/skills/testing-strategist/SKILL.md`
104
+ - `.agent/skills/logging-best-practices/SKILL.md`
101
105
 
102
- **Async/background processing (conditional)**: If the IA shard includes background processing, async operations, event-driven workflows, scheduled tasks, or queue-based processing, read `.agent/skills/workflow-automation/SKILL.md` and follow its methodology for durable workflow patterns (step functions, retry strategies, idempotency, fan-out).
106
+ **Async/background processing (conditional)**: If the IA shard includes background processing, async operations, event-driven workflows, or queue-based processing, also read `.agent/skills/workflow-automation/SKILL.md`.
103
107
 
104
108
  ### Ambiguity resolution
105
109
 
106
- When writing the BE spec, if any requirement cannot be resolved from `ideation-index.md`, `architecture-design.md`, `data-placement-strategy.md`, or upstream IA specs, **do not guess**. Instead, load and follow `.agent/skills/resolve-ambiguity/SKILL.md` to systematically resolve the ambiguity before proceeding.
110
+ When writing the BE spec, if any requirement cannot be resolved from `ideation-index.md`, `architecture-design.md`, `data-placement-strategy.md`, or upstream IA specs, **do not guess**. Load and follow `.agent/skills/resolve-ambiguity/SKILL.md` to resolve it first.
107
111
 
108
112
  ## 4. Read reference documents
109
113
 
@@ -66,7 +66,7 @@ Before presenting to the user, verify:
66
66
 
67
67
  Read .agent/skills/code-review-pro/SKILL.md and apply its adversarial review discipline to each checklist item.
68
68
 
69
- - [ ] Every endpoint has a Zod request AND response schema
69
+ - [ ] Every endpoint has a {{CONTRACT_LIBRARY}} request AND response schema
70
70
  - [ ] Every database table has defined fields, indexes, and permissions
71
71
  - [ ] Security constraints from IA shard reflected in middleware section
72
72
  - [ ] Error codes are specific (not generic 500s)
@@ -72,22 +72,16 @@ Not every FE spec maps 1:1 to a BE feature spec. Before writing anything, classi
72
72
  - For feature specs: the BE spec(s) and IA shard it maps to
73
73
  - For cross-cutting specs: confirmation that BE spec/IA shard mapping is skipped
74
74
 
75
- ## 3. Load skill bundle
75
+ Determine this shard's surface from its directory path (e.g., `docs/plans/web/fe/` surface `web`; flat `docs/plans/fe/` → surface `shared` or the project's single surface).
76
76
 
77
- Read .agent/skills/{{LANGUAGE_SKILL}}/SKILL.md and follow its language conventions.
78
- Read .agent/skills/{{FRONTEND_FRAMEWORK_SKILL}}/SKILL.md
79
- Read .agent/skills/{{FRONTEND_DESIGN_SKILL}}/SKILL.md and follow its design methodology.
80
- Read .agent/skills/{{ACCESSIBILITY_SKILL}}/SKILL.md
81
- Read .agent/skills/{{STATE_MANAGEMENT_SKILL}}/SKILL.md and follow its state management conventions.
82
- Read .agent/skills/error-handling-patterns/SKILL.md
83
- Read .agent/skills/testing-strategist/SKILL.md
84
- Read .agent/skills/technical-writer/SKILL.md
85
-
86
- **Missing skill fallback**: If any skill in the bundle above is not installed in `.agent/skills/` and is not in `.agent/skill-library/MANIFEST.md`, read `.agent/skills/find-skills/SKILL.md` and follow its discovery methodology to search for a community equivalent before proceeding without it.
77
+ Read `.agent/skills/prd-templates/references/skill-loading-protocol.md` and follow the **Skill Loading Protocol** for the `write-fe-spec-classify` workflow. Load all categories listed in its table for this workflow, plus these bundled skills:
78
+ - `.agent/skills/error-handling-patterns/SKILL.md`
79
+ - `.agent/skills/testing-strategist/SKILL.md`
80
+ - `.agent/skills/technical-writer/SKILL.md`
87
81
 
88
82
  ### Ambiguity resolution
89
83
 
90
- When writing the FE spec, if any requirement cannot be resolved from `ideation-index.md`, `architecture-design.md`, `data-placement-strategy.md`, or upstream IA/BE specs, **do not guess**. Instead, load and follow `.agent/skills/resolve-ambiguity/SKILL.md` to systematically resolve the ambiguity before proceeding.
84
+ When writing the FE spec, if any requirement cannot be resolved from `ideation-index.md`, `architecture-design.md`, `data-placement-strategy.md`, or upstream IA/BE specs, **do not guess**. Load and follow `.agent/skills/resolve-ambiguity/SKILL.md` to resolve it first.
91
85
 
92
86
  ## 4. Read source documents
93
87
 
@@ -27,7 +27,7 @@ Write the FE spec to `docs/plans/fe/`, update indexes, run quality checks, and p
27
27
 
28
28
  Read .agent/skills/technical-writer/SKILL.md and follow its methodology.
29
29
  Read .agent/skills/spec-writing/SKILL.md and follow its completeness testing and cross-reference checking methodology.
30
- Read .agent/skills/{{ACCESSIBILITY_SKILL}}/SKILL.md and follow its methodology.
30
+ Load the Accessibility skill(s) from the cross-cutting section per the skill loading protocol (`.agent/skills/prd-templates/references/skill-loading-protocol.md`).
31
31
  Read .agent/skills/testing-strategist/SKILL.md and follow its methodology.
32
32
 
33
33
  **Naming convention**: Numbered prefix matching feature position + kebab-case name (e.g., `01-auth-ui.md`). Cross-cutting: `00-` prefix.
@@ -173,4 +173,4 @@ graph TD
173
173
 
174
174
  ### Mandatory Validation
175
175
 
176
- **CRITICAL:** Run `{{VALIDATION_COMMAND}}` after **EVERY** code change. Do not finish a task until all pass.
176
+ **CRITICAL:** Run the Validation Cmd from `.agent/instructions/commands.md` after **EVERY** code change. Do not finish a task until all pass.
@@ -81,9 +81,9 @@ Once a stage is locked, downstream stages may not contradict it. To change a loc
81
81
  | 9 | `/implement-slice` | Slice acceptance criteria | Working code via Red→Green→Refactor | Implementation |
82
82
  | ↳ | `/implement-slice-setup` | Slice from phase plan | Progress check + skills + contracts + parallel mode | Implementation |
83
83
  | ↳ | `/implement-slice-tdd` | Contract + tests | Red→Green→Refactor + validation + progress tracking | Implementation |
84
- | 9.5 | `/verify-infrastructure` | Implemented infra or auth slice | Operational verification report | Verification |
84
+ | 7.5 | `/verify-infrastructure` | Implemented infra or auth slice | Operational verification report | Verification |
85
85
  | 10 | `/validate-phase` | Completed phase | Full validation gate | Verification |
86
- | 11 | `/evolve-contract` | Changed Zod schema | Safe schema migration | Maintenance |
86
+ | 11 | `/evolve-contract` | Changed `{{CONTRACT_LIBRARY}}` schema | Safe schema migration | Maintenance |
87
87
 
88
88
 
89
89
  > **Note**: Rows marked with ↳ are independently-invocable sub-workflows (shards)
@@ -176,4 +176,4 @@ graph TD
176
176
 
177
177
  ### Mandatory Validation
178
178
 
179
- **CRITICAL:** Run `{{VALIDATION_COMMAND}}` after **EVERY** code change. Do not finish a task until all pass.
179
+ **CRITICAL:** Run the Validation Cmd from `.agent/instructions/commands.md` after **EVERY** code change. Do not finish a task until all pass.
@@ -15,14 +15,16 @@ The intelligence of the kit lives entirely within the `.agent/` directory.
15
15
  ├── instructions/ # Core directives (the "brainstem")
16
16
  ├── progress/ # State and memory (the "hippocampus")
17
17
  ├── rules/ # Non-negotiable constraints (the "laws")
18
- ├── skills/ # Reusable capabilities (the "tools")
18
+ ├── skill-library/ # Installable skill packages (the "toolbox")
19
+ ├── skills/ # Active capabilities (the "tools")
19
20
  └── workflows/ # Structured processes (the "playbooks")
20
21
  ```
21
22
 
22
23
  ### Core Components
23
24
 
24
- * **Instructions:** (`workflow.md`, `tech-stack.md`, `structure.md`, `patterns.md`, etc.) Baseline knowledge the agent needs to operate in the specific environment. These files ship as templates with `{{PLACEHOLDER}}` markers — they are not static files. The bootstrap system fills them progressively as tech decisions are confirmed during `/create-prd`. An instruction file with unfilled placeholders is a broken agent context. `workflow.md` enforces the mandatory execution sequence: Understand Context -> Check Skills -> Execute -> Validate.
25
+ * **Instructions:** (`workflow.md`, `tech-stack.md`, `structure.md`, `patterns.md`, `commands.md`) Baseline knowledge the agent needs to operate in the specific environment. These files ship as templates with `{{PLACEHOLDER}}` markers — they are not static files. The bootstrap system fills them progressively as tech decisions are confirmed during `/create-prd`. An instruction file with unfilled placeholders is a broken agent context. `workflow.md` enforces the mandatory execution sequence: Understand Context -> Check Skills -> Execute -> Validate.
25
26
  * **Rules:** Preemptively loaded constraints that apply to *every* task. Includes security best practices (`security-first.md`), TDD mandates (`tdd-contract-first.md`), and vertical-slice enforcement (`vertical-slices.md`).
27
+ * **Skill Library:** (`.agent/skill-library/`) Installable skill packages organized by category (e.g., `stack/databases/`, `stack/frontend-frameworks/`). Skills are provisioned from here into `.agent/skills/` by the bootstrap system when tech decisions are confirmed. Contains `MANIFEST.md` with the full taxonomy.
26
28
  * **Skills:** Modular capabilities (e.g., `technical-writer`, `brainstorming`). Agents load these explicitly when a task requires them, preventing context bloat.
27
29
  * **Workflows:** Step-by-step markdown checklists invoked via `/slash-commands` (e.g., `/create-prd`, `/implement-slice`). They chain skills together to achieve complex, multi-stage goals.
28
30
 
@@ -136,7 +138,7 @@ This directory acts as the agent's long-term and working memory.
136
138
 
137
139
  ### Cross-references
138
140
 
139
- - **Dated File Convention** — See below in this section (Section 2) — governs which artifact paths use glob patterns vs. hardcoded names.
141
+ - **Dated File Convention** — See below in this section (Section 3) — governs which artifact paths use glob patterns vs. hardcoded names.
140
142
  - **Placeholder Verification Gate Protocol** — See Section 4.5 — governs the Step 0 guard that prevents workflows from reading `{{PLACEHOLDER}}`-dependent skills before bootstrap has run.
141
143
  - **Kit Maintenance Checklist** — See Section 6 — governs what must be updated when new workflows or skills are added.
142
144
  - **Surface Model** — `.agent/skills/prd-templates/references/surface-model.md` — The authoritative reference for surface types (web/mobile/cli/etc.) and implementation layers, and how the two models relate.
@@ -183,6 +185,29 @@ Workflow files declare skills in two places with different semantics:
183
185
 
184
186
  **Leaf workflows (shards)** should have body reads that match their frontmatter — if a skill is listed in a shard's frontmatter, the shard body should contain a corresponding `Read` instruction.
185
187
 
188
+ ### Shared References (`prd-templates/references/`)
189
+
190
+ The `prd-templates` skill contains a `references/` directory with 23 shared reference files that are consumed by multiple workflows. These references eliminate content duplication by centralizing:
191
+
192
+ | Reference Category | Examples | Used By |
193
+ |---|---|---|
194
+ | **Document templates** | `architecture-design-template.md`, `be-spec-template.md`, `fe-spec-template.md` | Spec and PRD writing workflows |
195
+ | **Shared policies** | `tdd-testing-policy.md`, `slice-completion-gates.md` | Implementation and validation workflows |
196
+ | **Classification procedures** | `fe-classification-procedures.md`, `placeholder-guard-template.md` | Classify shards of spec workflows |
197
+ | **Design system** | `design-system-decisions.md`, `design-system-prerequisite-check.md` | FE spec and PRD workflows |
198
+ | **Cross-cutting protocols** | `skill-loading-protocol.md`, `spec-coverage-sweep.md`, `surface-model.md` | 15+ workflows |
199
+
200
+ When a workflow needs a policy, template, or procedure, it references the shared file rather than inlining the content. This keeps workflows focused on orchestration logic and keeps shared policies maintainable in one place.
201
+
202
+ ### Skill Loading Protocol
203
+
204
+ Workflows that need stack-specific skills (Languages, Databases, FE Frameworks, etc.) reference `.agent/skills/prd-templates/references/skill-loading-protocol.md` instead of repeating the loading instructions inline. The protocol centralizes:
205
+
206
+ - How to read the surface stack map in `tech-stack.md`
207
+ - Which skill categories to load per workflow
208
+ - The missing-skill fallback procedure
209
+ - Surface stack map verification before loading
210
+
186
211
  ---
187
212
 
188
213
  ## 4.5. Bootstrap System
@@ -224,10 +249,11 @@ Two distinct gate types enforce placeholder readiness at different pipeline stag
224
249
 
225
250
  | Gate type | Where it runs | When | Purpose |
226
251
  |---|---|---|---|
227
- | **Spec-phase gate** | Step 0 of specification workflows (`create-prd-architecture`, `write-architecture-spec-design`, `write-fe-spec-classify`) | Before any skill reads | Guard spec authoring from unfilled stack placeholders |
228
- | **Implementation-phase gate** | `/implement-slice-setup` Step -1 | Before any code is written | Guard code generation from broken agent context across all seven instruction files |
252
+ | **Spec-phase gate** | Step 0 of specification workflows (`write-architecture-spec-design`, `write-be-spec-classify`, `write-fe-spec-classify`) | Before any skill reads | Guard spec authoring from unfilled stack placeholders |
253
+ | **Planning-phase gate** | `/plan-phase-write` | Before slice planning | Guard phase planning from unfilled CI/CD and Hosting skill placeholders |
254
+ | **Implementation-phase gate** | `/implement-slice-setup` Step -1 | Before any code is written | Guard code generation from broken agent context across all five instruction files |
229
255
 
230
- Both gates emit a **four-part hard stop message** per unfilled placeholder:
256
+ All three gates emit a **four-part hard stop message** per unfilled placeholder:
231
257
 
232
258
  1. **Which exact `{{PLACEHOLDER}}` is unfilled** — the literal placeholder name
233
259
  2. **Which pipeline stage fills it** — the `/create-prd-stack` decision that triggers bootstrap
@@ -242,7 +268,7 @@ For detailed per-workflow placeholder mappings and recovery commands, see `.agen
242
268
 
243
269
  ### Implementation-Phase Placeholder Gate
244
270
 
245
- Before any implementation begins, `/implement-slice-setup` (Step -1) scans all seven instruction files for unfilled `{{` patterns. If any are found, implementation stops with a specific remediation path per file. This gate is the last line of defense against broken agent context reaching the implementation phase.
271
+ Before any implementation begins, `/implement-slice-setup` (Step -1) scans all five instruction files for unfilled `{{` patterns. If any are found, implementation stops with a specific remediation path per file. This gate is the last line of defense against broken agent context reaching the implementation phase.
246
272
 
247
273
  ---
248
274
 
@@ -252,7 +278,7 @@ Before any implementation begins, `/implement-slice-setup` (Step -1) scans all s
252
278
 
253
279
  The defining architectural pattern of the code produced by this kit.
254
280
 
255
- 1. **Contract (Zod):** Define the schema first.
281
+ 1. **Contract ({{CONTRACT_LIBRARY}}):** Define the schema first.
256
282
  2. **Tests (Failing):** Write tests that assert against the contract.
257
283
  3. **Implementation:** Write the code to make the tests pass.
258
284