cfsa-antigravity 2.19.0 → 2.19.2

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 (200) hide show
  1. package/package.json +1 -1
  2. package/template/.agent/kit-sync.md +3 -3
  3. package/template/.claude/commands/audit-ambiguity-execute.md +6 -0
  4. package/template/.claude/commands/audit-ambiguity-rubrics.md +6 -0
  5. package/template/.claude/commands/audit-ambiguity.md +6 -0
  6. package/template/.claude/commands/bootstrap-agents-fill.md +6 -0
  7. package/template/.claude/commands/bootstrap-agents-provision.md +6 -0
  8. package/template/.claude/commands/bootstrap-agents.md +6 -0
  9. package/template/.claude/commands/create-prd-architecture.md +6 -0
  10. package/template/.claude/commands/create-prd-compile.md +6 -0
  11. package/template/.claude/commands/create-prd-design-system.md +6 -0
  12. package/template/.claude/commands/create-prd-security.md +6 -0
  13. package/template/.claude/commands/create-prd-stack.md +6 -0
  14. package/template/.claude/commands/decompose-architecture-structure.md +6 -0
  15. package/template/.claude/commands/decompose-architecture-validate.md +6 -0
  16. package/template/.claude/commands/evolve-contract.md +6 -0
  17. package/template/.claude/commands/evolve-feature-cascade.md +6 -0
  18. package/template/.claude/commands/evolve-feature-classify.md +6 -0
  19. package/template/.claude/commands/evolve-feature.md +6 -0
  20. package/template/.claude/commands/ideate-discover.md +6 -0
  21. package/template/.claude/commands/ideate-extract.md +6 -0
  22. package/template/.claude/commands/ideate-validate.md +6 -0
  23. package/template/.claude/commands/implement-slice-setup.md +6 -0
  24. package/template/.claude/commands/implement-slice-tdd.md +6 -0
  25. package/template/.claude/commands/plan-phase-preflight.md +6 -0
  26. package/template/.claude/commands/plan-phase-write.md +6 -0
  27. package/template/.claude/commands/propagate-decision-apply.md +6 -0
  28. package/template/.claude/commands/propagate-decision-scan.md +6 -0
  29. package/template/.claude/commands/propagate-decision.md +6 -0
  30. package/template/.claude/commands/remediate-pipeline-assess.md +6 -0
  31. package/template/.claude/commands/remediate-pipeline-execute.md +6 -0
  32. package/template/.claude/commands/remediate-pipeline.md +6 -0
  33. package/template/.claude/commands/remediate-shard-split.md +6 -0
  34. package/template/.claude/commands/resolve-ambiguity.md +6 -0
  35. package/template/.claude/commands/setup-workspace-cicd.md +6 -0
  36. package/template/.claude/commands/setup-workspace-data.md +6 -0
  37. package/template/.claude/commands/setup-workspace-hosting.md +6 -0
  38. package/template/.claude/commands/setup-workspace-scaffold.md +6 -0
  39. package/template/.claude/commands/sync-kit.md +6 -0
  40. package/template/.claude/commands/update-architecture-map.md +6 -0
  41. package/template/.claude/commands/validate-phase-quality.md +6 -0
  42. package/template/.claude/commands/validate-phase-readiness.md +6 -0
  43. package/template/.claude/commands/verify-infrastructure.md +6 -0
  44. package/template/.claude/commands/write-architecture-spec-deepen.md +6 -0
  45. package/template/.claude/commands/write-architecture-spec-design.md +6 -0
  46. package/template/.claude/commands/write-be-spec-classify.md +6 -0
  47. package/template/.claude/commands/write-be-spec-write.md +6 -0
  48. package/template/.claude/commands/write-fe-spec-classify.md +6 -0
  49. package/template/.claude/commands/write-fe-spec-write.md +6 -0
  50. package/template/.claude/skills/accessibility/SKILL.md +522 -0
  51. package/template/.claude/skills/accessibility/references/WCAG.md +162 -0
  52. package/template/.claude/skills/accessibility/references/ia-spec-checklist.md +35 -0
  53. package/template/.claude/skills/adversarial-review/SKILL.md +90 -0
  54. package/template/.claude/skills/antigravity-workflows/SKILL.md +81 -0
  55. package/template/.claude/skills/antigravity-workflows/resources/implementation-playbook.md +36 -0
  56. package/template/.claude/skills/api-design-principles/SKILL.md +169 -0
  57. package/template/.claude/skills/api-design-principles/assets/api-design-checklist.md +155 -0
  58. package/template/.claude/skills/api-design-principles/assets/rest-api-template.py +182 -0
  59. package/template/.claude/skills/api-design-principles/references/graphql-schema-design.md +583 -0
  60. package/template/.claude/skills/api-design-principles/references/rest-best-practices.md +408 -0
  61. package/template/.claude/skills/api-design-principles/resources/implementation-playbook.md +513 -0
  62. package/template/.claude/skills/api-versioning/SKILL.md +166 -0
  63. package/template/.claude/skills/api-versioning/references/typescript.md +157 -0
  64. package/template/.claude/skills/architecture-mapping/SKILL.md +219 -0
  65. package/template/.claude/skills/bootstrap-agents/SKILL.md +258 -0
  66. package/template/.claude/skills/brainstorming/SKILL.md +177 -0
  67. package/template/.claude/skills/brand-guidelines/SKILL.md +44 -0
  68. package/template/.claude/skills/clean-code/SKILL.md +196 -0
  69. package/template/.claude/skills/clean-code/references/typescript.md +126 -0
  70. package/template/.claude/skills/code-review-pro/SKILL.md +152 -0
  71. package/template/.claude/skills/concise-planning/SKILL.md +107 -0
  72. package/template/.claude/skills/cross-layer-consistency/SKILL.md +117 -0
  73. package/template/.claude/skills/database-schema-design/SKILL.md +205 -0
  74. package/template/.claude/skills/database-schema-design/references/relational.md +228 -0
  75. package/template/.claude/skills/deployment-procedures/SKILL.md +241 -0
  76. package/template/.claude/skills/design-anti-cliche/SKILL.md +159 -0
  77. package/template/.claude/skills/design-direction/SKILL.md +45 -0
  78. package/template/.claude/skills/error-handling-patterns/SKILL.md +226 -0
  79. package/template/.claude/skills/error-handling-patterns/references/go.md +162 -0
  80. package/template/.claude/skills/error-handling-patterns/references/python.md +262 -0
  81. package/template/.claude/skills/error-handling-patterns/references/rust.md +112 -0
  82. package/template/.claude/skills/error-handling-patterns/references/typescript.md +178 -0
  83. package/template/.claude/skills/find-skills/SKILL.md +145 -0
  84. package/template/.claude/skills/git-advanced/SKILL.md +972 -0
  85. package/template/.claude/skills/git-workflow/SKILL.md +420 -0
  86. package/template/.claude/skills/idea-extraction/SKILL.md +644 -0
  87. package/template/.claude/skills/logging-best-practices/SKILL.md +192 -0
  88. package/template/.claude/skills/logging-best-practices/references/go.md +49 -0
  89. package/template/.claude/skills/logging-best-practices/references/python.md +52 -0
  90. package/template/.claude/skills/logging-best-practices/references/typescript.md +215 -0
  91. package/template/.claude/skills/migration-management/SKILL.md +200 -0
  92. package/template/.claude/skills/migration-management/references/relational.md +214 -0
  93. package/template/.claude/skills/minimalist-surgical-development/SKILL.md +135 -0
  94. package/template/.claude/skills/parallel-agents/SKILL.md +165 -0
  95. package/template/.claude/skills/parallel-debugging/SKILL.md +135 -0
  96. package/template/.claude/skills/parallel-feature-development/SKILL.md +157 -0
  97. package/template/.claude/skills/performance-budgeting/SKILL.md +144 -0
  98. package/template/.claude/skills/pipeline-rubrics/SKILL.md +51 -0
  99. package/template/.claude/skills/pipeline-rubrics/references/architecture-rubric.md +19 -0
  100. package/template/.claude/skills/pipeline-rubrics/references/be-rubric.md +21 -0
  101. package/template/.claude/skills/pipeline-rubrics/references/fe-rubric.md +20 -0
  102. package/template/.claude/skills/pipeline-rubrics/references/ia-rubric.md +19 -0
  103. package/template/.claude/skills/pipeline-rubrics/references/scoring.md +32 -0
  104. package/template/.claude/skills/pipeline-rubrics/references/vision-rubric.md +12 -0
  105. package/template/.claude/skills/prd-templates/SKILL.md +107 -0
  106. package/template/.claude/skills/prd-templates/references/architecture-completeness-checklist.md +28 -0
  107. package/template/.claude/skills/prd-templates/references/architecture-design-template.md +88 -0
  108. package/template/.claude/skills/prd-templates/references/be-spec-classification.md +41 -0
  109. package/template/.claude/skills/prd-templates/references/be-spec-template.md +107 -0
  110. package/template/.claude/skills/prd-templates/references/bootstrap-verification-protocol.md +50 -0
  111. package/template/.claude/skills/prd-templates/references/constraint-exploration.md +41 -0
  112. package/template/.claude/skills/prd-templates/references/data-placement-template.md +74 -0
  113. package/template/.claude/skills/prd-templates/references/decision-confirmation-protocol.md +68 -0
  114. package/template/.claude/skills/prd-templates/references/decision-propagation.md +121 -0
  115. package/template/.claude/skills/prd-templates/references/decomposition-templates.md +226 -0
  116. package/template/.claude/skills/prd-templates/references/deep-ideation-loading-protocol.md +114 -0
  117. package/template/.claude/skills/prd-templates/references/design-system-decisions.md +198 -0
  118. package/template/.claude/skills/prd-templates/references/design-system-prerequisite-check.md +18 -0
  119. package/template/.claude/skills/prd-templates/references/domain-exhaustion-criteria.md +37 -0
  120. package/template/.claude/skills/prd-templates/references/engagement-tier-protocol.md +58 -0
  121. package/template/.claude/skills/prd-templates/references/engineering-standards-template.md +126 -0
  122. package/template/.claude/skills/prd-templates/references/evolution-layer-guidance.md +91 -0
  123. package/template/.claude/skills/prd-templates/references/expansion-modes.md +27 -0
  124. package/template/.claude/skills/prd-templates/references/fe-classification-procedures.md +47 -0
  125. package/template/.claude/skills/prd-templates/references/fe-spec-template.md +90 -0
  126. package/template/.claude/skills/prd-templates/references/feature-ledger-protocol.md +149 -0
  127. package/template/.claude/skills/prd-templates/references/folder-seeding-protocol.md +77 -0
  128. package/template/.claude/skills/prd-templates/references/fractal-cx-template.md +58 -0
  129. package/template/.claude/skills/prd-templates/references/fractal-feature-template.md +93 -0
  130. package/template/.claude/skills/prd-templates/references/fractal-node-index-template.md +55 -0
  131. package/template/.claude/skills/prd-templates/references/gate-applicability.md +92 -0
  132. package/template/.claude/skills/prd-templates/references/ideation-crosscut-template.md +36 -0
  133. package/template/.claude/skills/prd-templates/references/ideation-index-template.md +111 -0
  134. package/template/.claude/skills/prd-templates/references/ideation-meta-template.md +126 -0
  135. package/template/.claude/skills/prd-templates/references/infrastructure-report-template.md +71 -0
  136. package/template/.claude/skills/prd-templates/references/input-classification.md +23 -0
  137. package/template/.claude/skills/prd-templates/references/map-guard-protocol.md +65 -0
  138. package/template/.claude/skills/prd-templates/references/operational-templates.md +116 -0
  139. package/template/.claude/skills/prd-templates/references/persona-completeness-gate.md +20 -0
  140. package/template/.claude/skills/prd-templates/references/placeholder-guard-template.md +21 -0
  141. package/template/.claude/skills/prd-templates/references/placeholder-workflow-mapping.md +50 -0
  142. package/template/.claude/skills/prd-templates/references/shard-boundary-analysis.md +103 -0
  143. package/template/.claude/skills/prd-templates/references/shard-split-remediation.md +157 -0
  144. package/template/.claude/skills/prd-templates/references/skill-loading-protocol.md +36 -0
  145. package/template/.claude/skills/prd-templates/references/slice-completion-gates.md +29 -0
  146. package/template/.claude/skills/prd-templates/references/spec-coverage-sweep.md +44 -0
  147. package/template/.claude/skills/prd-templates/references/surface-model.md +61 -0
  148. package/template/.claude/skills/prd-templates/references/tdd-testing-policy.md +39 -0
  149. package/template/.claude/skills/prd-templates/references/vision-template.md +57 -0
  150. package/template/.claude/skills/prd-templates/references/workflow-checkpoint-protocol.md +112 -0
  151. package/template/.claude/skills/prd-templates/references/write-verification-protocol.md +57 -0
  152. package/template/.claude/skills/prompt-engineer/SKILL.md +203 -0
  153. package/template/.claude/skills/regex-patterns/SKILL.md +333 -0
  154. package/template/.claude/skills/regex-patterns/references/go.md +44 -0
  155. package/template/.claude/skills/regex-patterns/references/javascript.md +63 -0
  156. package/template/.claude/skills/regex-patterns/references/python.md +77 -0
  157. package/template/.claude/skills/regex-patterns/references/rust.md +43 -0
  158. package/template/.claude/skills/resolve-ambiguity/SKILL.md +278 -0
  159. package/template/.claude/skills/security-scanning-security-hardening/SKILL.md +231 -0
  160. package/template/.claude/skills/session-continuity/SKILL.md +732 -0
  161. package/template/.claude/skills/session-continuity/protocols/01-session-resumption.md +38 -0
  162. package/template/.claude/skills/session-continuity/protocols/02-progress-generation.md +85 -0
  163. package/template/.claude/skills/session-continuity/protocols/03-progress-update.md +70 -0
  164. package/template/.claude/skills/session-continuity/protocols/04-pattern-extraction.md +60 -0
  165. package/template/.claude/skills/session-continuity/protocols/05-session-close.md +37 -0
  166. package/template/.claude/skills/session-continuity/protocols/06-decision-analysis.md +84 -0
  167. package/template/.claude/skills/session-continuity/protocols/07-spec-pipeline-generation.md +48 -0
  168. package/template/.claude/skills/session-continuity/protocols/08-spec-pipeline-update.md +55 -0
  169. package/template/.claude/skills/session-continuity/protocols/09-parallel-claim.md +122 -0
  170. package/template/.claude/skills/session-continuity/protocols/10-placeholder-verification-gate.md +83 -0
  171. package/template/.claude/skills/session-continuity/protocols/11-parallel-synthesis.md +21 -0
  172. package/template/.claude/skills/session-continuity/protocols/ambiguity-gates.md +48 -0
  173. package/template/.claude/skills/skill-creator/SKILL.md +203 -0
  174. package/template/.claude/skills/skill-creator/references/.gitkeep +0 -0
  175. package/template/.claude/skills/skill-creator/scripts/.gitkeep +0 -0
  176. package/template/.claude/skills/spec-writing/SKILL.md +110 -0
  177. package/template/.claude/skills/systematic-debugging/CREATION-LOG.md +119 -0
  178. package/template/.claude/skills/systematic-debugging/SKILL.md +297 -0
  179. package/template/.claude/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  180. package/template/.claude/skills/systematic-debugging/condition-based-waiting.md +115 -0
  181. package/template/.claude/skills/systematic-debugging/defense-in-depth.md +122 -0
  182. package/template/.claude/skills/systematic-debugging/find-polluter.sh +63 -0
  183. package/template/.claude/skills/systematic-debugging/root-cause-tracing.md +169 -0
  184. package/template/.claude/skills/systematic-debugging/test-academic.md +14 -0
  185. package/template/.claude/skills/systematic-debugging/test-pressure-1.md +58 -0
  186. package/template/.claude/skills/systematic-debugging/test-pressure-2.md +68 -0
  187. package/template/.claude/skills/systematic-debugging/test-pressure-3.md +69 -0
  188. package/template/.claude/skills/tdd-workflow/SKILL.md +186 -0
  189. package/template/.claude/skills/tdd-workflow/references/typescript.md +231 -0
  190. package/template/.claude/skills/tech-stack-catalog/SKILL.md +49 -0
  191. package/template/.claude/skills/tech-stack-catalog/references/constraint-questions.md +237 -0
  192. package/template/.claude/skills/tech-stack-catalog/references/dev-tooling-decisions.md +37 -0
  193. package/template/.claude/skills/tech-stack-catalog/references/surface-decision-tables.md +69 -0
  194. package/template/.claude/skills/technical-writer/SKILL.md +242 -0
  195. package/template/.claude/skills/testing-strategist/SKILL.md +319 -0
  196. package/template/.claude/skills/testing-strategist/references/typescript.md +328 -0
  197. package/template/.claude/skills/verification-before-completion/SKILL.md +97 -0
  198. package/template/.claude/skills/workflow-automation/SKILL.md +166 -0
  199. package/template/.claude/skills/workflow-automation/references/inngest.md +88 -0
  200. package/template/.claude/skills/workflow-automation/references/temporal.md +64 -0
@@ -0,0 +1,28 @@
1
+ # Architecture Completeness Checklist
2
+
3
+ Apply after the architecture rubric self-check. All items must pass.
4
+
5
+ ## Feature Coverage
6
+ - [ ] Every "Must Have" feature from `ideation-index.md` MoSCoW list has a home in the architecture
7
+
8
+ ## Security Coverage
9
+ - [ ] Security model addresses all compliance constraints from `ideation/meta/constraints.md`
10
+ - [ ] Compliance-heavy domains have their own top-level sections (not buried as sub-bullets)
11
+
12
+ ## Stack Coverage
13
+ - [ ] All relevant skills installed for chosen stack
14
+
15
+ ## Standards Coverage
16
+ - [ ] Validation command in Engineering Standards matches `AGENTS.md` validation command
17
+
18
+ ## Multi-Surface (if applicable)
19
+ - [ ] Sync strategy defined
20
+ - [ ] Data ownership clear
21
+ - [ ] Conflict resolution specified
22
+
23
+ ## Cross-Platform (if applicable)
24
+ - [ ] Platform-specific considerations documented for each target OS
25
+
26
+ ## Design System
27
+ - [ ] Design system document exists at `docs/plans/design-system.md`
28
+ - [ ] All seven decision areas are filled (no placeholders)
@@ -0,0 +1,88 @@
1
+ # Architecture Design Template
2
+
3
+ Use this template when compiling `docs/plans/YYYY-MM-DD-architecture-design.md`.
4
+
5
+ ```markdown
6
+ # [Project Name] — Architecture Design
7
+
8
+ > **Ideation**: [link to ideation-index.md]
9
+ > **Date**: YYYY-MM-DD
10
+ > **Status**: Draft | Review | Approved
11
+ > **Project Type**: [Single-surface: web/desktop/mobile/CLI/API | Multi-surface: list surfaces]
12
+
13
+ ## Tech Stack
14
+ [Explicit decision for each applicable axis with rationale — not just the choice,
15
+ but WHY this choice over alternatives, what trade-offs were accepted, and what
16
+ constraints drove the decision. For multi-surface projects, organized by surface.]
17
+
18
+ ## System Architecture
19
+ [Component diagram, data flow, deployment topology — every service named, every
20
+ communication path documented, every failure mode identified. For multi-surface:
21
+ include surface interconnection diagram and shared domain boundary.]
22
+
23
+ ## Data Strategy
24
+ [Placement, schema design, query patterns, migrations — which data lives where
25
+ and why, what the hot paths are, how schema evolves. For multi-surface: data
26
+ ownership, sync protocol, conflict resolution.]
27
+
28
+ ## Error Architecture
29
+ [Global error envelope with locked example JSON — all four fields defined with types. Error
30
+ propagation chain per layer (DB → service → API handler → transport → client) — what is caught,
31
+ logged, and exposed at each layer. Unhandled exception strategy — process-level catch, log fields,
32
+ client response, alerting timeline. Client fallback contract per surface — offline mode decision,
33
+ UI behaviour on network failure, retry strategy, timeout threshold. Error boundary strategy per
34
+ applicable surface — boundary placement and fallback rendering.]
35
+
36
+ ## Security Model
37
+ [Auth, authorization, validation, rate limits — every flow specified step-by-step,
38
+ every permission rule scoped, every error case handled]
39
+
40
+ ## Compliance & Safety
41
+ [If applicable — full depth on minors/payments/health/regulated domains.
42
+ This section may be the largest in the document if compliance constraints
43
+ are significant. Every account type, every consent flow, every content filter,
44
+ every notification trigger, every audit requirement.]
45
+
46
+ ## API Design
47
+ [Surface type, versioning, conventions — endpoint naming, request/response shapes,
48
+ error format, pagination strategy. For multi-surface: shared API contract format.]
49
+
50
+ ## Integration Points
51
+ [External services, failure modes, fallbacks, cost models — for each: what it
52
+ provides, what happens when it's down, what the fallback is]
53
+
54
+ ## Observability Architecture
55
+ [Logging strategy — library named, structured JSON (yes/no for prod), log levels per environment,
56
+ PII field names that are never logged (named explicitly), log destination. Tracing strategy —
57
+ service boundaries traced, sampling rate per environment, trace ID propagation to API clients.
58
+ Alerting thresholds — error rate %, latency threshold + duration, queue depth warning, delivery
59
+ mechanism named. Launch dashboards — minimum required panels named, tool named, owner named.
60
+ Retention — log retention duration, trace retention duration, compliance alignment.]
61
+
62
+ ## Development Methodology
63
+ [Contract-first, TDD, vertical slices, spec layers, quality gates — the full
64
+ process, not just labels]
65
+
66
+ ## Phasing
67
+ [Phase breakdown with feature allocation, dependency order, and timeline estimates.
68
+ Each phase has explicit entry/exit criteria. For multi-surface: per-surface or
69
+ cross-surface phasing strategy.]
70
+
71
+ ## Directory Structure
72
+ [The approved source directory tree from Step 9.5, with one-line descriptions per directory.
73
+ Includes: contracts directory path, test layout, build output path, surface subtrees for multi-surface projects.]
74
+
75
+ ## Architecture Separation
76
+ [The concern/location/runtime table from Step 9.5 — maps each architectural concern to its
77
+ directory and the runtime where it executes.]
78
+
79
+ ## Installed Skills
80
+ [List of skills installed during this workflow with versions]
81
+
82
+ ## Decisions Log
83
+ [Every decision made during this workflow with rationale — not just what was
84
+ decided, but what alternatives were considered and why they were rejected]
85
+
86
+ ## Open Questions
87
+ [Anything needing resolution before decomposition — with owner and deadline]
88
+ ```
@@ -0,0 +1,41 @@
1
+ # BE Spec Classification Guide
2
+
3
+ Use when classifying an IA shard during `/write-be-spec-classify` Step 2.
4
+
5
+ ## Classification Types
6
+
7
+ | Classification | Description | BE Spec Output | Detection Criteria |
8
+ |---------------|-------------|----------------|-------------------|
9
+ | **Feature domain** | Defines user interactions, data models, and API-facing behavior for a single cohesive domain | 1 BE spec | Has data model + user flows + access model that imply API endpoints |
10
+ | **Multi-domain** | Covers multiple distinct backend sub-systems with independent APIs | N BE specs (split along sub-feature boundaries) | Section headers map to independent API surfaces; data models don't overlap; could be developed by different teams |
11
+ | **Cross-cutting** | Defines shared patterns consumed by all feature specs (auth, API conventions, error handling) | 1 cross-cutting BE spec (`00-*`) | Content is about "how all endpoints work" not "what this feature does" |
12
+ | **Structural reference** | Maps structure, naming, or routing without defining API behavior | 0 BE specs | No data model, no user flows, no endpoints — just reference tables |
13
+ | **Composite** | Contains both a structural reference section AND feature behavior | Depends — feature portion may belong in another shard's BE spec | Look for cross-references pointing feature content to its owning domain |
14
+
15
+ ## Multi-Domain Split Heuristic
16
+
17
+ Before classifying as multi-domain, build a **sub-feature endpoint inventory**:
18
+
19
+ | Sub-feature | Expected endpoints | Data model(s) | Independent? |
20
+ |-------------|-------------------|---------------|-------------|
21
+ | [sub-feature] | `POST /api/...`, `GET /api/...` | [table/collection names] | [Yes/No] |
22
+
23
+ **Split criterion**: Two or more independent groups each have their own data model and could be assigned to a different developer without coordination → split. Section header count alone is NOT the criterion — independence of data models and API surfaces is.
24
+
25
+ ## Endpoint Completeness Reconciliation Table
26
+
27
+ Use during `/write-be-spec-write` Step 7 before writing spec sections:
28
+
29
+ | Sub-feature | Expected endpoints | Specced? | Notes |
30
+ |-------------|-------------------|----------|-------|
31
+ | [sub-feature] | `POST /api/...` | ✅ | — |
32
+ | [sub-feature] | `GET /api/...` | ❌ | [Deferred to Phase N — reason] |
33
+
34
+ **Rule**: For every unspecced expected endpoint, either add it to the spec or add an explicit `[Deferred to Phase N — reason]` note. An empty Notes column for an unspecced endpoint is a spec failure.
35
+
36
+ ## Naming Convention
37
+
38
+ - Same number prefix as the IA shard source
39
+ - Kebab-case feature name
40
+ - Multi-domain splits: append letter suffix (e.g., `09a-chat-api.md`, `09b-agent-flow-api.md`)
41
+ - Cross-cutting specs: `00-` prefix (e.g., `00-api-conventions.md`)
@@ -0,0 +1,107 @@
1
+ # BE Spec Template
2
+
3
+ Use this template when writing BE specs to `docs/plans/be/[NN-feature-name].md`.
4
+
5
+ ```markdown
6
+ # [Feature] — Backend Specification
7
+
8
+ > **IA Source**: [link to IA shard]
9
+ > **Deep Dives**: [links to consumed deep dives, if any]
10
+ > **Status**: Draft | Review | Complete
11
+
12
+ ## Split Group _(include only if this spec resulted from a split)_
13
+
14
+ > **Split origin**: [IA shard that was split, e.g., `09-messaging`]
15
+ > **Companion specs**: [sibling BE spec files, e.g., `09b-agent-flow-api.md`]
16
+ > **Shared entities**: [data models shared across companions, e.g., `Message`, `Thread`]
17
+
18
+ ## IA Source Map
19
+
20
+ [Which IA shard sections, deep dives, and cross-shard references
21
+ inform each part of this BE spec. This is the traceability record
22
+ that lets a reviewer verify nothing was missed or invented.]
23
+
24
+ | BE Spec Section | IA Source | Section/Lines |
25
+ |-----------------|----------|---------------|
26
+ | API Endpoints | [primary-shard.md] | § User Flows |
27
+ | Database Schema | [primary-shard.md] | § Data Model |
28
+ | Middleware | [cross-ref-shard.md] | § Access Control (lines N–M) |
29
+ | Error Handling | [primary-shard.md] | § Edge Cases |
30
+ | [specific subsystem] | [deep-dive.md] | § Key Decisions |
31
+
32
+ ## API Endpoints
33
+ ## Request/Response Contracts ({{CONTRACT_LIBRARY}} schemas)
34
+ ## Database Schema
35
+ ## Middleware & Policies
36
+ ## Data Flow
37
+ ## Error Handling
38
+ ## Open Questions
39
+
40
+ ## Changelog
41
+
42
+ | Date | Change | Workflow | Sections Affected |
43
+ |------|--------|----------|-------------------|
44
+ | [date] | Initial creation | /write-be-spec | All |
45
+ ```
46
+
47
+ ## Quality Gates Checklist
48
+
49
+ Apply after writing every BE spec:
50
+
51
+ - [ ] Every endpoint has a {{CONTRACT_LIBRARY}} request AND response schema
52
+ - [ ] Every database table has defined fields, indexes, and permissions
53
+ - [ ] Security constraints from IA shard reflected in middleware section
54
+ - [ ] Error codes are specific (not generic 500s)
55
+ - [ ] Rate limits specified per endpoint
56
+ - [ ] Access control requirements mapped to middleware checks
57
+ - [ ] Every deep dive key decision is reflected in the spec (not ignored)
58
+ - [ ] Every cross-shard reference has been resolved (no dangling pointers)
59
+ - [ ] IA Source Map is complete — no BE spec section lacks a traceable IA source
60
+ - [ ] Testability criteria from IA shard reflected as performance targets
61
+
62
+ ## BE Spec Seed Stub
63
+
64
+ Use when creating a spec file during classification:
65
+
66
+ ```markdown
67
+ # [Feature] — Backend Specification
68
+
69
+ > **IA Source**: [link to IA shard]
70
+ > **Deep Dives**: [links, if any]
71
+ > **Status**: Classifying
72
+
73
+ ## Classification
74
+ - **Type**: [single-domain | multi-domain-split | cross-cutting | structural reference]
75
+ - **IA Source**: [shard name]
76
+ - **BE Spec(s) to produce**: [list]
77
+
78
+ ## Referenced Material Inventory
79
+ [Primary shard, cross-refs with file + section + line numbers]
80
+ ```
81
+
82
+ ## FE Spec Seed Stub
83
+
84
+ Use when creating a spec file during FE classification:
85
+
86
+ ```markdown
87
+ # [Feature] — Frontend Specification
88
+
89
+ > **BE Source**: [link to BE spec(s)]
90
+ > **IA Source**: [link to IA shard]
91
+ > **Status**: Classifying
92
+
93
+ ## Classification
94
+ - **Type**: [feature spec | cross-cutting]
95
+ - **BE Source(s)**: [list]
96
+ - **IA Source**: [shard name]
97
+
98
+ ## Referenced Material Inventory
99
+ [same format as BE classify stub]
100
+
101
+ ## Design Requirements (extracted from brand-guidelines)
102
+ **Direction**: [confirmed direction]
103
+ **Typography**: [extracted]
104
+ **Colors**: [extracted]
105
+ **Motion**: [extracted]
106
+ **Anti-patterns**: [extracted]
107
+ ```
@@ -0,0 +1,50 @@
1
+ # Bootstrap Verification Protocol
2
+
3
+ **Purpose**: Every bootstrap invocation MUST be verified. This protocol replaces all inline "fire bootstrap" instructions with a hard-gated fire→verify→stop cycle.
4
+
5
+ ---
6
+
7
+ ## Procedure
8
+
9
+ ### 1. Fire
10
+
11
+ Read `.agent/workflows/bootstrap-agents.md` and execute with the provided key(s).
12
+
13
+ ### 2. Verify
14
+
15
+ After bootstrap returns, verify that the target was actually filled:
16
+
17
+ | Key Type | Where to Verify | How to Verify |
18
+ |----------|----------------|---------------|
19
+ | Language/Framework/DB/ORM | Surface stack map in `.agent/instructions/tech-stack.md` | The cell for the provided key's surface row is no longer empty |
20
+ | CI/CD, Hosting, Auth, Security | Cross-cutting section of surface stack map | The cell is no longer empty |
21
+ | Design direction | `.agent/skills/brand-guidelines/SKILL.md` | `{{DESIGN_DIRECTION}}` no longer appears as literal text |
22
+ | Project structure | `.agent/instructions/structure.md` | `{{PROJECT_STRUCTURE}}` no longer appears as literal text |
23
+ | Dev tooling | `.agent/instructions/commands.md` | Template values are replaced with real commands |
24
+ | New dependency skill | `.agent/skills/[skill-name]/SKILL.md` | The skill directory exists and `SKILL.md` is readable |
25
+
26
+ ### 3. Hard Gate
27
+
28
+ > **HARD STOP** — If any verification check fails, do NOT proceed. Report to the user:
29
+ >
30
+ > "Bootstrap was invoked with `[KEY]=[VALUE]` but verification failed:
31
+ > - Expected `[target file]` cell `[cell name]` to contain `[VALUE]`
32
+ > - Actual: `[what was found — empty, still placeholder, etc.]`
33
+ >
34
+ > This is a bootstrap bug. Do not proceed until resolved."
35
+
36
+ ### 4. Log
37
+
38
+ After successful verification, note in the current workflow step: `Bootstrap verified: [KEY]=[VALUE] → [target cell] confirmed filled.`
39
+
40
+ ---
41
+
42
+ ## When to Use
43
+
44
+ Any workflow step that says:
45
+ - "fire bootstrap"
46
+ - "invoke `/bootstrap-agents`"
47
+ - "execute bootstrap"
48
+ - "read bootstrap-agents.md and execute"
49
+
50
+ MUST follow this protocol. There are no exceptions. A bootstrap fire without verification is an enforcement failure.
@@ -0,0 +1,41 @@
1
+ # Constraint Exploration Questions
2
+
3
+ Use during `/ideate-validate` Step 8 to explore constraints with the user. Write answers to `docs/plans/ideation/meta/constraints.md`.
4
+
5
+ ## Core Constraint Categories
6
+
7
+ 1. **Budget** — Self-funded? VC-backed? Monthly infrastructure ceiling?
8
+ 2. **Timeline** — Launch target? Phased rollout?
9
+ 3. **Team** — Solo dev? Small team? Skill gaps?
10
+ 4. **Compliance** — GDPR, PCI, COPPA, HIPAA, SOC 2? Age restrictions?
11
+ 5. **Performance** — Expected scale (users, requests, data)? Latency requirements?
12
+ 6. **Surface classification validation** — Verify the structural classification from `ideation-index.md` (set in `ideate-extract` Step 1.3) still holds. Have any new surfaces been discovered during exploration? Has the project shape changed?
13
+
14
+ ## Deep Think Prompt
15
+
16
+ > "Based on the product type and user personas, what constraints would I expect that haven't been mentioned? For example, does this product handle payments (PCI)? Does it serve minors (COPPA)? Does it store health data (HIPAA)?"
17
+
18
+ ## Tier-Specific Behavior
19
+
20
+ | Tier | Behavior |
21
+ |---|---|
22
+ | **Interactive/Hybrid** | Present each constraint question to user, wait for answers. Write each confirmed constraint immediately. |
23
+ | **Auto** | Self-interview using Deep Think. Write all answers with reasoning immediately. Mark each answer as `[AUTO-CONFIRMED]` for traceability. |
24
+
25
+ ## Success Metrics (Per Persona)
26
+
27
+ For each persona, define concrete success metrics:
28
+ - What metric proves this product solves the persona's problem?
29
+ - What's the target number? (specific — not "good response times")
30
+ - What's the measurement method?
31
+
32
+ Write to `ideation-index.md` (or link to domain files where the metric applies).
33
+
34
+ ## Competitive Positioning
35
+
36
+ If not already explored during `/ideate-discover`:
37
+ - Name 2-4 direct competitors
38
+ - For each: what they do well, where they fail, how we differentiate
39
+ - What's the moat? (network effects, data, expertise, switching costs)
40
+
41
+ Write to `docs/plans/ideation/meta/competitive-landscape.md`.
@@ -0,0 +1,74 @@
1
+ # Data Placement Strategy Template
2
+
3
+ Use this template to create `docs/plans/data-placement-strategy.md` during `/create-prd-architecture`.
4
+
5
+ ```markdown
6
+ # Data Placement Strategy
7
+
8
+ ## N-Tier Model Responsibilities
9
+
10
+ Define each tier in the system and what it is responsible for:
11
+
12
+ | Tier | Responsibility | Examples |
13
+ |------|---------------|----------|
14
+ | [Client / Edge / API / Database / Cache / Object Storage / External Service] | [What this tier owns and manages] | [Specific technologies] |
15
+
16
+ ## Complete Data Placement Map
17
+
18
+ For every data type in the system, specify its canonical owner:
19
+
20
+ | Data Type | Canonical Owner | Stored Content | Encryption | Rationale |
21
+ |-----------|----------------|----------------|------------|-----------|
22
+ | [e.g., User profile] | [e.g., Database] | [Fields stored] | [at-rest / in-transit / both / none] | [Why this placement] |
23
+ | [e.g., Session tokens] | [e.g., Cache] | [Token data] | [encryption approach] | [Why this placement] |
24
+ | [e.g., Uploaded files] | [e.g., Object storage] | [File content + metadata] | [encryption approach] | [Why this placement] |
25
+
26
+ ## Security Boundaries
27
+
28
+ For each tier, explicitly state what it stores AND what it does NOT store:
29
+
30
+ | Tier | Stores | Does NOT Store |
31
+ |------|--------|---------------|
32
+ | [Client] | [e.g., UI state, cached display data] | [e.g., raw PII, API secrets, decryption keys] |
33
+ | [Edge/CDN] | [e.g., static assets, cached public responses] | [e.g., user-specific data, PII] |
34
+ | [API Server] | [e.g., request context, short-lived auth tokens] | [e.g., persistent user data, raw credentials] |
35
+ | [Database] | [e.g., user records, PII (encrypted)] | [e.g., API secrets, session tokens] |
36
+ | [Cache] | [e.g., computed values, session data] | [e.g., PII, source-of-truth records] |
37
+
38
+ ## PII Boundaries
39
+
40
+ - Which fields contain PII (enumerate every one)
41
+ - Where PII is stored vs where it is NOT stored
42
+ - How PII is isolated from AI/analytics pipelines
43
+ - PII access logging requirements
44
+
45
+ ## GDPR/Compliance Data Lifecycle
46
+
47
+ | Data Category | Retention Period | Deletion Trigger | Deletion Responsibility | Verification |
48
+ |--------------|-----------------|-----------------|------------------------|-------------|
49
+ | [e.g., Account data] | [e.g., Account lifetime + 30 days] | [e.g., Account deletion request] | [e.g., API server → database cascade] | [How deletion is verified] |
50
+ | [e.g., Usage analytics] | [e.g., 90 days] | [e.g., TTL expiry] | [e.g., Database auto-purge] | [How deletion is verified] |
51
+
52
+ ## Tenancy Model
53
+
54
+ [Single-tenant / Multi-tenant / Hybrid]
55
+ - Isolation mechanism: [e.g., row-level security, schema-per-tenant, database-per-tenant]
56
+ - Data co-mingling rules: [What data is shared vs isolated]
57
+ - Cross-tenant query prevention: [How enforced]
58
+
59
+ ## Sync Protocol (multi-surface only)
60
+
61
+ - What data syncs between surfaces
62
+ - Sync frequency and mechanism
63
+ - Conflict resolution strategy
64
+ - Network partition behavior
65
+
66
+ ## Summary Table
67
+
68
+ | Layer | Stores | Does NOT Store |
69
+ |-------|--------|---------------|
70
+ | [Layer 1] | [List] | [List] |
71
+ | [Layer 2] | [List] | [List] |
72
+ ```
73
+
74
+ This document is consumed by `/write-be-spec` and `/write-architecture-spec` to ensure every spec places data consistently.
@@ -0,0 +1,68 @@
1
+ # Decision Confirmation Protocol
2
+
3
+ **Purpose**: Every decision that gets written to a spec or instruction file MUST be explicitly confirmed before writing. This protocol replaces all "refine based on discussion" patterns.
4
+
5
+ ---
6
+
7
+ ## Procedure
8
+
9
+ ### 1. Present
10
+
11
+ Present the decision to the user with:
12
+ - The specific question or choice
13
+ - Your recommendation and reasoning
14
+ - The options (if applicable)
15
+ - Where the decision will be written (file + section)
16
+
17
+ ### 2. Wait for Confirmation
18
+
19
+ **HARD GATE** — Do NOT write anything until the user explicitly confirms.
20
+
21
+ Acceptable confirmations: explicit "yes", "approved", "confirmed", "go ahead", "looks good", selection of an option, or equivalent affirmative.
22
+
23
+ NOT acceptable: silence, moving on to other topics, ambiguous responses. If ambiguous → ask again.
24
+
25
+ ### 3. Handle Requests for Changes
26
+
27
+ If the user requests changes:
28
+ 1. Apply the requested changes to your proposed content
29
+ 2. Re-present the updated version
30
+ 3. Return to Step 2 — wait for confirmation again
31
+
32
+ Do NOT write a partially-confirmed version. The full content must be confirmed before writing.
33
+
34
+ ### 4. Write
35
+
36
+ After confirmation, write the decision to the target file + section.
37
+
38
+ ### 5. Verify Write
39
+
40
+ Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`):
41
+ - Read back the target file
42
+ - Verify the section header exists and content matches what was confirmed
43
+ - If missing or mismatched → write failed, retry
44
+
45
+ ---
46
+
47
+ ## Tier-Aware Variant (for /create-prd workflows)
48
+
49
+ When the current engagement tier is known:
50
+
51
+ | Tier | Behavior |
52
+ |------|----------|
53
+ | **Interactive** | Full present → wait → confirm → write cycle per decision |
54
+ | **Hybrid** | Group related decisions, present batch, confirm batch, write batch |
55
+ | **Auto** | Use Deep Think reasoning, write with `[AUTO-CONFIRMED]` tag, present all auto-confirmed decisions for batch review at end of shard |
56
+
57
+ **Even in Auto mode**, the user reviews and can reject auto-confirmed decisions at the batch review step. Rejection triggers re-presentation at Interactive tier for that decision.
58
+
59
+ ---
60
+
61
+ ## What This Replaces
62
+
63
+ This protocol replaces all instances of:
64
+
65
+ > ~~"Refine based on discussion before proceeding"~~
66
+ > ~~"Adjust based on feedback"~~
67
+
68
+ Those patterns allow agents to skip refinement and write unconfirmed content. This protocol requires explicit confirmation before any write.
@@ -0,0 +1,121 @@
1
+ # Decision Propagation Reference
2
+
3
+ Templates, formats, and scan procedures for `/propagate-decision` workflows.
4
+
5
+ ## Decision Type Sources
6
+
7
+ | Decision Type | Source Document | Downstream Scope |
8
+ |--------------|-----------------|-------------------|
9
+ | **structure** | `.agent/instructions/structure.md` | All IA shards, BE specs, FE specs |
10
+ | **tech-stack** | `.agent/instructions/tech-stack.md` + architecture doc | All IA shards, BE specs, FE specs |
11
+ | **auth-model** | Architecture doc (auth/security section) | All BE specs with middleware, all FE specs with auth flows |
12
+ | **data-placement** | `docs/plans/data-placement-strategy.md` | All IA shards with data models, all BE specs with storage |
13
+ | **patterns** | `.agent/instructions/patterns.md` | All IA shards, BE specs with implementation patterns, FE specs with component patterns |
14
+ | **error-architecture** | Architecture doc `## Error Architecture` (5 sub-sections) | All BE specs, all FE specs |
15
+
16
+ ## Selection Menu Format
17
+
18
+ ```
19
+ Decision propagation pre-scan:
20
+
21
+ [1] structure — structure.md — inconsistencies detected in X documents
22
+ [2] tech-stack — tech-stack.md — inconsistencies detected in X documents
23
+ [3] auth-model — architecture doc — inconsistencies detected in X documents
24
+ [4] data-placement — data-placement-strategy.md — inconsistencies detected in X documents
25
+ [5] patterns — patterns.md — inconsistencies detected in X documents
26
+ [6] error-architecture — architecture doc ## Error Architecture — inconsistencies detected in X documents
27
+
28
+ [A] All with inconsistencies
29
+ [Q] Quit — no propagation needed
30
+ ```
31
+
32
+ ## Error-Architecture Scan Procedure
33
+
34
+ **Source extraction:**
35
+ - Locate `docs/plans/*-architecture-design.md` using glob
36
+ - Read `## Error Architecture` and extract locked decisions from: `### Global Error Envelope`, `### Error Propagation Chain`, `### Unhandled Exception Strategy`, `### Client Fallback Contract`, `### Error Boundary Strategy`
37
+
38
+ **BE spec conformance** (scan `docs/plans/be/`):
39
+ - Check error envelope by locked name and canonical field names
40
+ - Check propagation chain rules
41
+ - Classify: explicit contradiction / implicit assumption / consistent
42
+
43
+ **FE spec conformance** (scan `docs/plans/fe/`):
44
+ - Check client fallback contract for surface type
45
+ - Check error boundary placement
46
+ - Same classification
47
+
48
+ ## Contradiction Display Format
49
+
50
+ ```
51
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
52
+ Contradiction N of X
53
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
54
+ Document: [path]
55
+ Section: [section name]
56
+ Current: [current text]
57
+ Locked: [locked value]
58
+ Fix to: [proposed fix]
59
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
60
+ [Y] Apply fix and move to next
61
+ [n] Skip this item
62
+ [skip] Skip entire document
63
+ [stop-and-save] Save progress and stop
64
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
65
+ ```
66
+
67
+ ## Assumption Display Format
68
+
69
+ ```
70
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
71
+ Assumption N of X
72
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
73
+ Document: [path]
74
+ Section: [section name]
75
+ Current: [current text]
76
+ Issue: [ambiguity description]
77
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
78
+ [Y] Flag for /resolve-ambiguity
79
+ [n] Ignore
80
+ [skip] Skip entire document
81
+ [stop-and-save] Save progress and stop
82
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
83
+ ```
84
+
85
+ ## Impact Report Format
86
+
87
+ ### Explicit Contradictions
88
+
89
+ | Document | Line | Current Text | Locked Value | Decision Type |
90
+ |----------|------|--------------|--------------|---------------|
91
+ | [path] | [N] | [text] | [value] | [type] |
92
+
93
+ ### Implicit Assumptions
94
+
95
+ | Document | Line | Current Text | Concern | Decision Type |
96
+ |----------|------|--------------|---------|---------------|
97
+ | [path] | [N] | [text] | [concern] | [type] |
98
+
99
+ ### Summary
100
+
101
+ - **Explicit contradictions**: X items across Y documents
102
+ - **Implicit assumptions**: X items across Y documents
103
+ - **Consistent references**: X items (no action needed)
104
+
105
+ ## Completion Summary Format
106
+
107
+ ```
108
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
109
+ Propagation Complete
110
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
111
+ Fixed: X contradictions across Y documents
112
+ Flagged: X implicit assumptions for /resolve-ambiguity
113
+ Skipped: X items
114
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
115
+
116
+ Recommended next steps:
117
+ 1. Run `/resolve-ambiguity` to address the X flagged assumptions
118
+ (see docs/audits/propagation-ambiguity-[date].md)
119
+ 2. Run `/remediate-pipeline` to audit all layers with the corrected specs
120
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
121
+ ```