cfsa-antigravity 2.7.0 → 2.9.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 (51) hide show
  1. package/package.json +1 -1
  2. package/template/.agent/kit-sync.md +3 -3
  3. package/template/.agent/skills/idea-extraction/SKILL.md +61 -18
  4. package/template/.agent/skills/prd-templates/references/architecture-completeness-checklist.md +28 -0
  5. package/template/.agent/skills/prd-templates/references/be-spec-classification.md +41 -0
  6. package/template/.agent/skills/prd-templates/references/bootstrap-verification-protocol.md +50 -0
  7. package/template/.agent/skills/prd-templates/references/constraint-exploration.md +41 -0
  8. package/template/.agent/skills/prd-templates/references/decision-confirmation-protocol.md +68 -0
  9. package/template/.agent/skills/prd-templates/references/decision-propagation.md +121 -0
  10. package/template/.agent/skills/prd-templates/references/domain-exhaustion-criteria.md +37 -0
  11. package/template/.agent/skills/prd-templates/references/engagement-tier-protocol.md +58 -0
  12. package/template/.agent/skills/prd-templates/references/evolution-layer-guidance.md +91 -0
  13. package/template/.agent/skills/prd-templates/references/expansion-modes.md +27 -0
  14. package/template/.agent/skills/prd-templates/references/folder-seeding-protocol.md +77 -0
  15. package/template/.agent/skills/prd-templates/references/input-classification.md +23 -0
  16. package/template/.agent/skills/prd-templates/references/map-guard-protocol.md +44 -0
  17. package/template/.agent/skills/prd-templates/references/persona-completeness-gate.md +20 -0
  18. package/template/.agent/skills/prd-templates/references/shard-boundary-analysis.md +76 -0
  19. package/template/.agent/skills/prd-templates/references/write-verification-protocol.md +57 -0
  20. package/template/.agent/workflows/create-prd-architecture.md +17 -23
  21. package/template/.agent/workflows/create-prd-compile.md +31 -22
  22. package/template/.agent/workflows/create-prd-design-system.md +18 -14
  23. package/template/.agent/workflows/create-prd-security.md +22 -24
  24. package/template/.agent/workflows/create-prd-stack.md +20 -11
  25. package/template/.agent/workflows/create-prd.md +27 -99
  26. package/template/.agent/workflows/decompose-architecture-structure.md +14 -4
  27. package/template/.agent/workflows/decompose-architecture-validate.md +29 -80
  28. package/template/.agent/workflows/decompose-architecture.md +27 -60
  29. package/template/.agent/workflows/evolve-contract.md +7 -2
  30. package/template/.agent/workflows/evolve-feature-cascade.md +34 -78
  31. package/template/.agent/workflows/evolve-feature-classify.md +22 -56
  32. package/template/.agent/workflows/ideate-discover.md +89 -100
  33. package/template/.agent/workflows/ideate-extract.md +42 -138
  34. package/template/.agent/workflows/ideate-validate.md +57 -133
  35. package/template/.agent/workflows/ideate.md +32 -19
  36. package/template/.agent/workflows/implement-slice-setup.md +15 -5
  37. package/template/.agent/workflows/implement-slice-tdd.md +21 -5
  38. package/template/.agent/workflows/plan-phase-write.md +30 -1
  39. package/template/.agent/workflows/propagate-decision-apply.md +23 -90
  40. package/template/.agent/workflows/propagate-decision-scan.md +20 -91
  41. package/template/.agent/workflows/remediate-pipeline-execute.md +6 -1
  42. package/template/.agent/workflows/validate-phase-quality.md +14 -3
  43. package/template/.agent/workflows/validate-phase-readiness.md +1 -1
  44. package/template/.agent/workflows/verify-infrastructure.md +2 -0
  45. package/template/.agent/workflows/write-architecture-spec-deepen.md +8 -2
  46. package/template/.agent/workflows/write-architecture-spec-design.md +11 -14
  47. package/template/.agent/workflows/write-be-spec-classify.md +26 -104
  48. package/template/.agent/workflows/write-be-spec-write.md +49 -3
  49. package/template/.agent/workflows/write-be-spec.md +1 -1
  50. package/template/.agent/workflows/write-fe-spec-write.md +62 -3
  51. package/template/.agent/workflows/write-fe-spec.md +1 -1
@@ -31,9 +31,7 @@ Establish the structural UI architecture — navigation paradigm, layout grid, p
31
31
 
32
32
  Read `## Engagement Tier` from `docs/plans/ideation/ideation-index.md`.
33
33
 
34
- **Tier behavior for design system decisions** (all 7 decisions are product decisions):
35
- - 🤖 **Auto**: Agent selects based on design direction + constraints via Deep Think. Writes reasoning. Marks `[AUTO-CONFIRMED]`. User reviews compiled `design-system.md` at Step 9.
36
- - 🤝 **Hybrid** / 💬 **Interactive**: Present options, wait for explicit confirmation per decision (current behavior).
34
+ Read the engagement tier protocol (`.agent/skills/prd-templates/references/engagement-tier-protocol.md`) — apply the tier behavior for design system decisions (all 7 decisions are product decisions).
37
35
 
38
36
  1. Read `docs/plans/ideation/meta/constraints.md` — extract the **Project Surfaces** section. Read `docs/plans/ideation/ideation-index.md` — extract the feature inventory from the MoSCoW Summary.
39
37
  2. Read `.agent/skills/brand-guidelines/SKILL.md` — extract the confirmed `DESIGN_DIRECTION`.
@@ -50,9 +48,13 @@ Present surface-appropriate options from the **Navigation Paradigm Options** sec
50
48
 
51
49
  > **Decision prompt**: "Which navigation pattern fits your app's usage pattern and audience?"
52
50
 
53
- **Wait for explicit user confirmation before proceeding.**
51
+ **Tier-aware confirmation** *(applies to all 7 decisions in this shard)*:
52
+ - **Interactive/Hybrid** → "Wait for explicit user confirmation" means present and wait.
53
+ - **Auto** → auto-confirm with Deep Think reasoning. Write the decision with `[AUTO-CONFIRMED]` tag. The Auto Tier Review Checkpoint in `/ideate-validate` or the review in Step 9 is where the user can override.
54
+
55
+ **Wait for explicit user confirmation before proceeding** *(Interactive/Hybrid)* or auto-confirm with Deep Think *(Auto)*.
54
56
 
55
- On confirmation, write the `## Navigation Paradigm` section to `docs/plans/design-system.md` immediately.
57
+ On confirmation, write the `## Navigation Paradigm` section to `docs/plans/design-system.md` immediately. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
56
58
 
57
59
  ---
58
60
 
@@ -67,7 +69,7 @@ Provide a **default recommendation** based on the confirmed design direction:
67
69
 
68
70
  **Wait for explicit user confirmation before proceeding.**
69
71
 
70
- On confirmation, write the `## Layout Grid` table to `docs/plans/design-system.md`.
72
+ On confirmation, write the `## Layout Grid` table to `docs/plans/design-system.md`. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
71
73
 
72
74
  ---
73
75
 
@@ -77,7 +79,7 @@ Based on the feature inventory from `ideation-index.md`, propose a named archety
77
79
 
78
80
  Present the proposed archetypes to the user. Ask whether any are missing or should be renamed. **Wait for explicit user confirmation before proceeding.**
79
81
 
80
- On confirmation, write the `## Page Archetypes` section to `docs/plans/design-system.md`.
82
+ On confirmation, write the `## Page Archetypes` section to `docs/plans/design-system.md`. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
81
83
 
82
84
  ---
83
85
 
@@ -89,7 +91,7 @@ Present the derived list. Ask: (1) Are any components missing? (2) Should any be
89
91
 
90
92
  **Wait for explicit user confirmation before proceeding.**
91
93
 
92
- On confirmation, write the `## Global Component Inventory` section to `docs/plans/design-system.md`. This serves as the **Component Inventory Seed** — all FE specs must consume (not re-invent) these global components.
94
+ On confirmation, write the `## Global Component Inventory` section to `docs/plans/design-system.md`. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`). This serves as the **Component Inventory Seed** — all FE specs must consume (not re-invent) these global components.
93
95
 
94
96
  ---
95
97
 
@@ -97,7 +99,7 @@ On confirmation, write the `## Global Component Inventory` section to `docs/plan
97
99
 
98
100
  Present the options from the **Motion Language Options** in `design-system-decisions.md`. Present a recommendation based on the confirmed design direction. **Wait for explicit user confirmation before proceeding.**
99
101
 
100
- On confirmation, write the `## Motion Language` section to `docs/plans/design-system.md`.
102
+ On confirmation, write the `## Motion Language` section to `docs/plans/design-system.md`. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
101
103
 
102
104
  ---
103
105
 
@@ -105,7 +107,7 @@ On confirmation, write the `## Motion Language` section to `docs/plans/design-sy
105
107
 
106
108
  Present the options from the **Data Density Options** in `design-system-decisions.md`. If **Hybrid** is selected, ask the user to define per-archetype density rules. **Wait for explicit user confirmation before proceeding.**
107
109
 
108
- On confirmation, write the `## Data Density Philosophy` section to `docs/plans/design-system.md`.
110
+ On confirmation, write the `## Data Density Philosophy` section to `docs/plans/design-system.md`. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
109
111
 
110
112
  ---
111
113
 
@@ -113,7 +115,7 @@ On confirmation, write the `## Data Density Philosophy` section to `docs/plans/d
113
115
 
114
116
  Two-part decision. Present the loading state, error state, and empty state options from the **Global State Design Language Options** in `design-system-decisions.md`. Present recommendations based on the confirmed design direction. **Wait for explicit user confirmation before proceeding.**
115
117
 
116
- On confirmation, write the `## Global State Design Language` section to `docs/plans/design-system.md`.
118
+ On confirmation, write the `## Global State Design Language` section to `docs/plans/design-system.md`. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
117
119
 
118
120
  ---
119
121
 
@@ -128,10 +130,12 @@ Verify:
128
130
 
129
131
  If any section is incomplete, loop back to the relevant decision step and resolve with the user.
130
132
 
133
+ **Completeness loop guard**: If the same section fails completeness 2 times → **STOP**: present the incomplete section to the user with what's missing and ask: "Provide the missing content directly, or accept this section as-is with a note?"
134
+
131
135
  ---
132
136
 
133
- ### Propose next step
137
+ ### Next step
134
138
 
135
- Design system decisions are locked. Next: Run `/create-prd-architecture` to design the system architecture and data strategy.
139
+ **STOP** do NOT proceed to any other workflow. The only valid next step is `/create-prd-architecture`.
136
140
 
137
- > If this shard was invoked standalone (not from `/create-prd`), surface this via `notify_user`.
141
+ > If invoked standalone, surface via `notify_user` and wait for user confirmation.
@@ -26,22 +26,16 @@ Define the security model with full compliance escalation, and document all inte
26
26
 
27
27
  ## 0. Map guard
28
28
 
29
- Read the surface stack map from `.agent/instructions/tech-stack.md`. Check the following cross-cutting categories for filled values:
29
+ Follow the map guard protocol (`.agent/skills/prd-templates/references/map-guard-protocol.md`). Required cells for this shard:
30
30
 
31
- | Map Location | Category | Recovery | Why this matters |
32
- |---|---|---|---|
33
- | Cross-Cutting | Security | Run `/create-prd-stack` to confirm security framework, then bootstrap. | Security model (Step 6) needs stack-specific threat analysis patterns. |
34
- | Cross-Cutting | Auth | Run `/create-prd-stack` to confirm auth provider, then bootstrap. | Authentication design (Step 6.1) needs provider-specific auth flow patterns. |
31
+ | Map Location | Category | Why this matters |
32
+ |---|---|---|
33
+ | Cross-Cutting | Security | Security model (Step 6) needs stack-specific threat analysis patterns. |
34
+ | Cross-Cutting | Auth | Authentication design (Step 6.1) needs provider-specific auth flow patterns. |
35
35
 
36
- > **Timing fallback**: During `/create-prd`, the map may be partially populated. If a cell is empty but the value was just confirmed in the current conversation (from `/create-prd-stack`), proceed using the conversation-confirmed value. Bootstrap will fill the map after `/create-prd` completes.
36
+ **HARD GATE** If ANY required cell is empty STOP. No timing fallbacks. No conversation-confirmed values. See map guard protocol for recovery.
37
37
 
38
- If cells are empty AND the value hasn't been confirmed in conversation → **HARD STOP**: tell the user to run `/create-prd-stack` first.
39
-
40
- Read `## Engagement Tier` from `docs/plans/ideation/ideation-index.md`.
41
-
42
- **Tier behavior for security decisions:**
43
- - 🤖 **Auto**: Agent designs security model + attack surface + integrations via Deep Think. Writes reasoning. Marks `[AUTO-CONFIRMED]`. User reviews at end of shard.
44
- - 🤝 **Hybrid** / 💬 **Interactive**: Present each section, walk through, wait for user confirmation (current behavior).
38
+ Read the engagement tier protocol (`.agent/skills/prd-templates/references/engagement-tier-protocol.md`) apply the tier behavior for security decisions.
45
39
 
46
40
  ---
47
41
 
@@ -52,6 +46,9 @@ Read .agent/skills/security-scanning-security-hardening/SKILL.md and follow its
52
46
  Load the Auth and Security skill(s) from the cross-cutting section per the skill loading protocol (`.agent/skills/prd-templates/references/skill-loading-protocol.md`).
53
47
 
54
48
  1. **Authentication** — How do users prove identity?
49
+
50
+ **No-auth project detection**: If the ideation output indicates no user accounts, no login, and no personalized data (e.g., a static content site, CLI tool, or public API) → skip items 1-2 and 5. Write a `## Security Model` section that documents WHY auth is not needed, and cover only items 3-4 and 6-8. If the project has partial auth (e.g., admin-only auth, API keys but no user accounts), scope items 1-2 to the applicable auth surface only.
51
+
55
52
  2. **Authorization** — RBAC vs ABAC? Permission model?
56
53
  3. **Data protection** — PII handling, encryption at rest/transit
57
54
  4. **Input validation** — Where and how? (Zod recommended for TypeScript)
@@ -76,13 +73,13 @@ Read .agent/skills/resolve-ambiguity/SKILL.md and follow its methodology.
76
73
  - "Can you think of a way to bypass any of these controls?"
77
74
  - "Are there edge cases in the age/payment/compliance flows I haven't covered?"
78
75
 
79
- Refine based on discussion before proceeding.
76
+ Follow the decision confirmation protocol (`.agent/skills/prd-templates/references/decision-confirmation-protocol.md`) — do not write until explicitly confirmed.
80
77
 
81
78
  **Bootstrap fire — security decision confirmed**
82
79
 
83
- If the security model confirmed a specific security framework or compliance approach (e.g., crypto patterns, custom HSM approach), read `.agent/workflows/bootstrap-agents.md` and invoke `/bootstrap-agents SECURITY=[confirmed value]` to provision additional skills. Note: surface-triggered security skills (`owasp-web-security`, `csp-cors-headers`, `input-sanitization`, `api-security-checklist`, `dependency-auditing`, `desktop-security-sandboxing`) are provisioned automatically by bootstrap when surfaces are confirmed in `/create-prd-stack` — no manual fire needed for those.
80
+ If the security model confirmed a specific security framework or compliance approach (e.g., crypto patterns, custom HSM approach), read `.agent/workflows/bootstrap-agents.md` and invoke `/bootstrap-agents SECURITY=[confirmed value]` to provision additional skills. **HARD GATE**: Follow the bootstrap verification protocol (`.agent/skills/prd-templates/references/bootstrap-verification-protocol.md`). Note: surface-triggered security skills (`owasp-web-security`, `csp-cors-headers`, `input-sanitization`, `api-security-checklist`, `dependency-auditing`, `desktop-security-sandboxing`) are provisioned automatically by bootstrap when surfaces are confirmed in `/create-prd-stack` — no manual fire needed for those.
84
81
 
85
- Write the completed `## Security Model` section to `docs/plans/architecture-draft.md` immediately after user confirmation. Do not wait for later steps.
82
+ Write the completed `## Security Model` section to `docs/plans/architecture-draft.md` immediately after user confirmation. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`). Do not wait for later steps.
86
83
 
87
84
  ## 6.5. Attack Surface Review
88
85
 
@@ -92,10 +89,12 @@ Read .agent/skills/security-scanning-security-hardening/SKILL.md and follow its
92
89
  - "Are there any attack vectors I've missed for your specific domain?"
93
90
  - "Do the OWASP mechanisms look correct, or are any of them actually handled differently?"
94
91
 
95
- Write the completed `## Security — Attack Surface` section to `docs/plans/architecture-draft.md` immediately after user confirmation.
92
+ Write the completed `## Security — Attack Surface` section to `docs/plans/architecture-draft.md` immediately after user confirmation. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
96
93
 
97
94
  ## 7. Integration points
98
95
 
96
+ **0-integrations check**: Scan the ideation output and architecture for external service dependencies. If there are genuinely 0 external integrations (no auth provider, no email service, no payment processor, no analytics, no CDN) → write a brief `## Integration Points` section stating: "No external service integrations identified. All functionality is self-contained." Skip the per-service framework below.
97
+
99
98
  For each external service:
100
99
 
101
100
  1. **What it provides** — Specific features used
@@ -103,21 +102,20 @@ For each external service:
103
102
  3. **Fallback strategy** — Graceful degradation plan
104
103
  4. **Cost model** — Pricing tier, expected usage
105
104
 
106
- Write the completed `## Integration Points` section to `docs/plans/architecture-draft.md` immediately after user confirmation.
105
+ Write the completed `## Integration Points` section to `docs/plans/architecture-draft.md` immediately after user confirmation. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
107
106
 
108
107
  ## 7.5. Observability Architecture
109
108
 
110
- Read .agent/skills/logging-best-practices/SKILL.md and follow its Observability Architecture Interview — all 5 decisions (logging, tracing, alerting, dashboards, retention) must be confirmed. Fire bootstrap per the skill's instructions for each confirmed tool.
109
+ Read .agent/skills/logging-best-practices/SKILL.md and follow its Observability Architecture Interview — all 5 decisions (logging, tracing, alerting, dashboards, retention) must be confirmed. Fire bootstrap per the skill's instructions for each confirmed tool. **HARD GATE**: Follow the bootstrap verification protocol (`.agent/skills/prd-templates/references/bootstrap-verification-protocol.md`).
111
110
 
112
111
  **Present to user**: Show the observability architecture decisions. Ask:
113
112
  - "Are these logging levels and PII exclusions correct for your compliance requirements?"
114
113
  - "Are the alerting thresholds appropriate for your expected traffic?"
115
114
 
116
- Write the completed `## Observability Architecture` section to `docs/plans/architecture-draft.md` immediately after user confirmation.
117
-
118
- ### Propose next step
115
+ Write the completed `## Observability Architecture` section to `docs/plans/architecture-draft.md` immediately after user confirmation. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
119
116
 
120
- Security model and integration points are defined. Next: Run `/create-prd-compile` to document the development methodology, phasing strategy, and compile the final architecture design document and Engineering Standards.
117
+ ### Next step
121
118
 
122
- > If this shard was invoked standalone (not from `/create-prd`), surface this via `notify_user`.
119
+ **STOP** do NOT proceed to any other workflow. The only valid next step is `/create-prd-compile`.
123
120
 
121
+ > If invoked standalone, surface via `notify_user` and wait for user confirmation.
@@ -27,11 +27,12 @@ Build the decision constraints map from the ideation output, then walk through e
27
27
 
28
28
  Before any tech stack decision, read `docs/plans/ideation/meta/constraints.md` to build the **decision constraints map**.
29
29
 
30
+ - **If `meta/constraints.md` does not exist** → **STOP**: "Constraints file missing. Run `/ideate` to completion — constraint exploration is required before tech stack decisions."
31
+ - **If it exists but has no `## Project Surfaces` section** → **STOP**: "Constraints file is missing Project Surfaces. Run `/ideate-validate` to complete constraint exploration."
32
+
30
33
  Also read `docs/plans/ideation/ideation-index.md` — specifically `## Structural Classification` (authoritative surface list and project shape) and `## Engagement Tier` (gate behavior for this session).
31
34
 
32
- **Tier behavior for tech stack decisions:**
33
- - 🤖 **Auto**: Agent uses constraints + Deep Think to select best-fit option per axis. Records reasoning. Writes decisions. User reviews all stack decisions at end of shard.
34
- - 🤝 **Hybrid** / 💬 **Interactive**: Present options, wait for user confirmation per axis (current behavior).
35
+ Read the engagement tier protocol (`.agent/skills/prd-templates/references/engagement-tier-protocol.md`) — apply the tier behavior for tech stack decisions.
35
36
 
36
37
  Build the constraints map:
37
38
 
@@ -58,8 +59,10 @@ Score Fit from 1–5 based on how well the option matches the constraints map. I
58
59
  1. Ask the constraint questions for this axis
59
60
  2. Filter options based on answers
60
61
  3. Present the filtered option table with recommendation
61
- 4. **Interactive/Hybrid**: Wait for user confirmation. **Auto**: Select highest-fit option via Deep Think, write reasoning to `architecture-draft.md`, mark as `[AUTO-CONFIRMED]`.
62
- 5. Fire bootstrap with only that key: read `.agent/workflows/bootstrap-agents.md` and call with `PIPELINE_STAGE=create-prd` + the confirmed key
62
+ 4. Follow the decision confirmation protocol (`.agent/skills/prd-templates/references/decision-confirmation-protocol.md`) tier-aware.
63
+ 5. Fire bootstrap with only that key: read `.agent/workflows/bootstrap-agents.md` and call with `PIPELINE_STAGE=create-prd` + the confirmed key. **HARD GATE**: Follow the bootstrap verification protocol (`.agent/skills/prd-templates/references/bootstrap-verification-protocol.md`). If bootstrap verification fails:
64
+ - **1st failure** → retry bootstrap once with the same key
65
+ - **2nd failure** → **STOP**: tell the user which key failed verification and ask: "Retry, skip this skill provisioning, or abort?"
63
66
  6. Move to next axis
64
67
 
65
68
  > **Note on backend axis bootstrap keys**: `BACKEND_FRAMEWORK` and `API_LAYER` are distinct bootstrap keys and must each fire as a separate `/bootstrap-agents` call — do not combine them.
@@ -70,21 +73,27 @@ Score Fit from 1–5 based on how well the option matches the constraints map. I
70
73
 
71
74
  Get explicit user decisions *(Interactive/Hybrid)* or auto-select with Deep Think reasoning *(Auto)* — no "TBD" allowed. Use the brainstorming skill's approach — one decision at a time.
72
75
 
76
+ **User indecision handling**: If the user expresses uncertainty ("I don't know", "not sure", "you pick") on any decision:
77
+ - Present your recommendation with clear reasoning
78
+ - If user accepts → proceed with it
79
+ - If user remains uncertain → read `.agent/skills/resolve-ambiguity/SKILL.md` and apply its methodology to narrow the decision space
80
+ - If after ambiguity resolution the user still can't decide → lock your recommendation with a note: "[Agent-recommended, user deferred]" — this can be revisited later via `/propagate-decision`
81
+
73
82
  > **Decision recording**: For each confirmed tech stack decision, read `.agent/skills/session-continuity/protocols/06-decision-analysis.md` and follow the **Decision Effect Analysis Protocol**. Tech stack choices have high downstream impact (they constrain frameworks, skills, deployment, and testing). Record each decision to `memory/decisions.md` with upstream/downstream effects.
74
83
 
75
84
  ### Database: Persistence Map Interview
76
85
 
77
86
  Instead of a single DATABASE decision pass, use the following structured persistence map interview to identify all required stores.
78
87
 
79
- Read .agent/skills/database-schema-design/SKILL.md and follow its Persistence Map Interview methodology (Sub-steps A–E). Fire bootstrap per the skill's instructions for each confirmed store.
88
+ Read .agent/skills/database-schema-design/SKILL.md and follow its Persistence Map Interview methodology (Sub-steps A–E). Fire bootstrap per the skill's instructions for each confirmed store. **HARD GATE**: Follow the bootstrap verification protocol (`.agent/skills/prd-templates/references/bootstrap-verification-protocol.md`) after each store is confirmed.
80
89
 
81
90
  ### Design Direction
82
91
 
83
- Read `.agent/skills/design-direction/SKILL.md` and follow its interview methodology to determine the project's visual direction. After confirmation, fire bootstrap with `DESIGN_DIRECTION=[confirmed direction]`.
92
+ Read `.agent/skills/design-direction/SKILL.md` and follow its interview methodology to determine the project's visual direction. After confirmation, fire bootstrap with `DESIGN_DIRECTION=[confirmed direction]`. **HARD GATE**: Follow the bootstrap verification protocol (`.agent/skills/prd-templates/references/bootstrap-verification-protocol.md`).
84
93
 
85
94
  ### Development tooling
86
95
 
87
- Read `.agent/skills/tech-stack-catalog/references/dev-tooling-decisions.md` for the tooling axes and bootstrap keys. After the user confirms all development tooling, fire bootstrap immediately with all keys listed in that reference file.
96
+ Read `.agent/skills/tech-stack-catalog/references/dev-tooling-decisions.md` for the tooling axes and bootstrap keys. After the user confirms all development tooling, fire bootstrap immediately with all keys listed in that reference file. **HARD GATE**: Follow the bootstrap verification protocol (`.agent/skills/prd-templates/references/bootstrap-verification-protocol.md`) — verify every key.
88
97
 
89
98
  ### After each tech decision
90
99
 
@@ -94,8 +103,8 @@ Read each installed skill's SKILL.md before proceeding. Append the confirmed dec
94
103
 
95
104
  Read `.agent/workflows/bootstrap-agents.md` and call it with `PIPELINE_STAGE=create-prd` plus only the keys just decided. Bootstrap runs after **each confirmed decision**, not in a batch at the end. At the end of all tech decisions, call bootstrap once more with `ARCHITECTURE_DOC` set to the dated filename.
96
105
 
97
- ### Propose next step
106
+ ### Next step
98
107
 
99
- All tech stack decisions are locked. Next: Run `/create-prd-architecture` to design the system architecture and data strategy.
108
+ **STOP** do NOT proceed to any other workflow. The only valid next step is `/create-prd-architecture`.
100
109
 
101
- > If invoked standalone, surface via `notify_user`.
110
+ > If invoked standalone, surface via `notify_user` and wait for user confirmation.
@@ -19,13 +19,7 @@ Transform the ideation output into a production-grade architecture design docume
19
19
  **Input**: `docs/plans/ideation/ideation-index.md` (must exist and be approved)
20
20
  **Output**: `docs/plans/YYYY-MM-DD-architecture-design.md` + `docs/plans/ENGINEERING-STANDARDS.md` + `docs/plans/data-placement-strategy.md`
21
21
 
22
- > **Depth standard**: Every section of the architecture document must be specified
23
- > to the point where a developer cannot misinterpret it. If you can write a
24
- > one-paragraph section summary, it's not detailed enough. Each section should
25
- > define every field, every flow, every error case, every permission boundary.
26
- > The specificity-standards rule (`.agent/rules/specificity-standards.md`) applies to every
27
- > word of the output. One-line placeholders like `[Auth, authorization, rate limits]`
28
- > are not architecture — they are headings waiting for content.
22
+ > **Depth standard**: Every section must be specified to the point where a developer cannot misinterpret it. The specificity-standards rule (`.agent/rules/specificity-standards.md`) applies to every word of the output.
29
23
 
30
24
  ---
31
25
 
@@ -33,43 +27,30 @@ Transform the ideation output into a production-grade architecture design docume
33
27
 
34
28
  Read `docs/plans/ideation/ideation-index.md`.
35
29
 
36
- If the file doesn't exist, tell the user to run `/ideate` first. Do not proceed without approved ideation output.
30
+ If the file doesn't exist → **STOP**: tell the user to run `/ideate` first.
37
31
 
38
- Use the **Structure Map** in `ideation-index.md` to locate specific files:
39
- - Constraints + surface classification → `meta/constraints.md`
40
- - Personas `meta/personas.md`
41
- - Domain details → fractal tree under `domains/` (or `surfaces/` for multi-product). Each domain is a **folder** containing `*-index.md` (children + Role Matrix), `*-cx.md` (cross-cuts), and child feature `.md` files. Walk the tree to the depth needed.
42
- - Cross-cutting concerns → `ideation-cx.md` (global cross-surface) + per-domain `*-cx.md` files within the fractal tree
43
- - Role coverage → Role Matrix in each domain index, Role Lens in each feature file (use for RBAC planning in security shard)
32
+ **Completeness validation**: If the file exists, verify it contains these required sections:
33
+ - `## Structural Classification`
34
+ - `## Engagement Tier`
35
+ - `## MoSCoW Summary` (with at least 1 Must Have feature)
44
36
 
45
- Pay special attention to the **Project Surfaces** section in `meta/constraints.md`it determines which tech stack axes apply.
37
+ If any required section is missing **STOP**: "ideation-index.md is incomplete missing `[section]`. Run `/ideate` to complete ideation before proceeding."
46
38
 
47
- Also read `## Engagement Tier` from `ideation-index.md`. If not set during ideation, ask now:
39
+ Use the **Structure Map** in `ideation-index.md` to locate: constraints, personas, domain details (fractal tree), cross-cutting concerns, and role coverage.
48
40
 
49
- > **How involved do you want to be?**
50
- > 1. 🤖 **Auto** — I design the full architecture via Deep Think. You review the compiled output.
51
- > 2. 🤝 **Hybrid** *(recommended)* — Structural steps auto. Architecture/product decisions pause for you.
52
- > 3. 💬 **Interactive** — I pause at every step.
41
+ Pay special attention to **Project Surfaces** in `meta/constraints.md` it determines which tech stack axes apply.
53
42
 
54
- **Wait for user answer.** If an ideation tier exists, present it as default. Write to `ideation-index.md` immediately.
43
+ Read `## Engagement Tier` from `ideation-index.md`. If not set, ask the user and write immediately.
55
44
 
56
- Each shard reads the tier and adapts gates: **Auto** = all gates auto-confirm with Deep Think reasoning. **Hybrid** = structural auto, architecture/product pause. **Interactive** = all pause.
45
+ Read `.agent/skills/prd-templates/references/engagement-tier-protocol.md` — each shard reads the tier and adapts gates.
57
46
 
58
47
  ---
59
48
 
60
49
  ## 2. Load skills
61
50
 
62
- ### Bundled skills
51
+ Read each skill SKILL.md listed in the frontmatter `skills` array.
63
52
 
64
- These skills are included in the kit read each SKILL.md:
65
- 1. `.agent/skills/api-design-principles/SKILL.md` — API design principles
66
- 3. `.agent/skills/security-scanning-security-hardening/SKILL.md` — Security model
67
- 4. `.agent/skills/clean-code/SKILL.md` — Architecture principles
68
- 5. `.agent/skills/brainstorming/SKILL.md` — For collaborative decisions
69
-
70
- ### Stack-specific skill discovery
71
-
72
- Check `.agent/skills/` for relevant skills. Read `.agent/skills/find-skills/SKILL.md` for guidance on discovering community skills for your chosen stack.
53
+ Check `.agent/skills/` for stack-specific skills. Read `.agent/skills/find-skills/SKILL.md` for community skill discovery.
73
54
 
74
55
  ---
75
56
 
@@ -83,103 +64,50 @@ Check `.agent/skills/` for relevant skills. Read `.agent/skills/find-skills/SKIL
83
64
  | 3 | [`create-prd-security`](.agent/workflows/create-prd-security.md) | Security model, compliance escalation, integration points |
84
65
  | 4 | [`create-prd-compile`](.agent/workflows/create-prd-compile.md) | Development methodology, phasing, compile architecture-design.md + ENGINEERING-STANDARDS.md |
85
66
 
86
- > **Progressive working artifact**: `docs/plans/architecture-draft.md` is written incrementally by shards 1–3 (stack decisions, system architecture, data strategy, security model, integration points) and read by shard 4 (compile) to produce the final dated `architecture-design.md`.
67
+ > **Progressive working artifact**: `docs/plans/architecture-draft.md` is written incrementally by shards 1–3 and read by shard 4 to compile the final dated `architecture-design.md`.
87
68
 
88
69
  ---
89
70
 
90
71
  ## Orchestration
91
72
 
92
73
  ### Step A — Run `.agent/workflows/create-prd-stack.md`
93
-
94
- Builds the constraints map from `ideation/meta/constraints.md`, presents tech stack options per axis, gets user decisions, fires bootstrap after each confirmation.
95
-
96
74
  ### Step A.5 — Run `.agent/workflows/create-prd-design-system.md`
97
-
98
- Establishes the structural UI architecture — navigation paradigm, layout grid, page archetypes, global component inventory, motion language, data density philosophy, and global state design language. Produces `docs/plans/design-system.md` which all FE specs must consume.
99
-
100
75
  ### Step B — Run `.agent/workflows/create-prd-architecture.md`
101
-
102
- Designs system architecture (components, data flow, deployment topology, API surface) and data strategy (placement, schema, queries, migrations, PII boundaries). Creates `docs/plans/data-placement-strategy.md`.
103
-
104
76
  ### Step C — Run `.agent/workflows/create-prd-security.md`
105
-
106
- Defines the security model (auth, authorization, validation, rate limits). Escalates compliance-heavy domains to full-depth sections. Documents integration points with failure modes and fallbacks.
107
-
108
77
  ### Step D — Run `.agent/workflows/create-prd-compile.md`
109
78
 
110
- Documents development methodology and phasing strategy. Compiles `docs/plans/YYYY-MM-DD-architecture-design.md` and `docs/plans/ENGINEERING-STANDARDS.md`.
111
-
112
79
  ---
113
80
 
114
81
  ## Step E — Quality gate
115
82
 
116
83
  ### Self-check against Architecture rubric
117
84
 
118
- Read .agent/skills/pipeline-rubrics/SKILL.md and apply its Architecture rubric for the self-check.
119
-
120
- Before presenting to the user, self-check both documents against the **Architecture Rubric** (12 dimensions) from `/audit-ambiguity`:
85
+ Read `.agent/skills/pipeline-rubrics/references/architecture-rubric.md` and apply all 15 dimensions as the self-check.
121
86
 
122
- | # | Dimension | Check |
123
- |---|-----------|-------|
124
- | 1 | Tech Stack Decisiveness | Is every applicable axis decided with rationale? No TBDs? |
125
- | 2 | System Architecture | Are all components, flows, and failure modes documented? |
126
- | 3 | Data Strategy | Are placement, schema, queries, migrations, and PII boundaries defined? |
127
- | 4 | Security Model | Are auth, authz, validation, rate limits, and CSP fully specified? |
128
- | 5 | Compliance Depth | Are regulated domains (minors, payments, health) given full-depth sections? |
129
- | 6 | API Design | Are surface, versioning, conventions, errors, and pagination defined? |
130
- | 7 | Integration Robustness | Do all externals have failure + fallback plans? |
131
- | 8 | Phasing Clarity | Are phases dependency-ordered with entry/exit criteria? |
132
- | 9 | Engineering Standards | Are all thresholds concrete? No TBDs in ENGINEERING-STANDARDS.md? |
133
- | 10 | Persistence Architecture | Is the persistence map complete? Do all cross-store entities have a consistency contract (canonical ID, creation sequence, deletion cascade, read join)? |
134
- | 11 | Error Architecture | Is the global error envelope defined with all four fields? Are all five error decisions confirmed (envelope, propagation chain, unhandled exceptions, client fallback, error boundaries)? |
135
- | 12 | Attack Surface Coverage | Is the attack surface review complete? Are OWASP Top 10 (web) and API Top 10 (API) addressed with named mechanisms? Are security headers configured? Is the observability architecture documented? |
87
+ Read `.agent/skills/prd-templates/references/architecture-completeness-checklist.md` and verify all items.
136
88
 
137
- Also verify completeness:
89
+ For any dimension that scores ⚠️ or ❌ → resolve it NOW. Loop back to the relevant shard.
138
90
 
139
- - [ ] Every "Must Have" feature from `ideation-index.md` MoSCoW list has a home in the architecture
140
- - [ ] Security model addresses all compliance constraints from `ideation/meta/constraints.md`
141
- - [ ] Compliance-heavy domains have their own top-level sections (not buried as sub-bullets)
142
- - [ ] All relevant skills installed for chosen stack
143
- - [ ] Validation command in Engineering Standards matches `AGENTS.md` validation command
144
- - [ ] For multi-surface: sync strategy defined, data ownership clear, conflict resolution specified
145
- - [ ] For cross-platform: platform-specific considerations documented for each target OS
146
- - [ ] Design system document exists at docs/plans/design-system.md and all seven decision areas are filled (no placeholders)
91
+ **Remediation loop guard**: Track remediation attempts per dimension. After **3 failed attempts** on the same dimension → **STOP**: present the dimension to the user as a known gap with context on what was tried. Include it in the review presentation as an unresolved item for user decision.
147
92
 
148
- For any dimension that scores ⚠️ or ❌, resolve it NOW. Loop back to the relevant step and resolve with the user.
149
-
150
- > ❌ STOP — do not call notify_user until all dimensions score ✅.
93
+ > STOP do not call notify_user until all dimensions score and all checklist items pass.
151
94
 
152
95
  ### Depth audit
153
96
 
154
- Before presenting to the user, re-read the entire architecture document and for EACH section ask:
155
-
156
- > "Could a developer implement this without asking a single clarifying question?"
157
-
158
- If the answer is no for ANY section:
159
- 1. Identify what's missing (field types? flow steps? error cases? permission rules?)
160
- 2. Add the missing detail NOW — do not flag it, resolve it
161
- 3. Re-check the section
162
-
163
- This is the single most important step. The difference between a useful architecture document and a useless one is whether this audit is done honestly. A 2,000-word architecture doc is almost certainly too shallow for any non-trivial project.
97
+ Re-read the entire architecture document and for EACH section ask: "Could a developer implement this without asking a single clarifying question?"
164
98
 
165
- If gaps are found, loop back to the relevant step and resolve with the user.
99
+ If no identify what's missing, add the detail NOW, re-check.
166
100
 
167
- > **Note**: This is an internal self-check, not a formal audit. For a rigorous,
168
- > independent audit with evidence citations, run `/audit-ambiguity architecture` as a
169
- > separate step after this workflow completes.
101
+ > **Note**: This is an internal self-check. For a rigorous independent audit, run `/audit-ambiguity architecture` after this workflow completes.
170
102
 
171
103
  ## Step F — Request review and next steps
172
104
 
173
- Use `notify_user` to present to the user:
174
- - **Both** the architecture design document and the Engineering Standards document
175
- - Summary of the self-check results (all 12 dimensions + completeness checklist)
176
- - Any areas where you resolved gaps during the self-check
105
+ Use `notify_user` to present both documents with self-check results.
177
106
 
178
- Both documents must be approved before proceeding. Do NOT proceed to the next step until the user sends a message explicitly approving this output. Proposing next steps is not the same as receiving approval. Wait for explicit approval before continuing.
107
+ **STOP** do NOT proceed until the user explicitly approves.
179
108
 
180
- ### Proposed next steps
109
+ ### Next step
181
110
 
182
- Once approved, present the user with the appropriate next step:
111
+ **STOP** do NOT propose `/decompose-architecture` or any other pipeline workflow. The only valid next step is:
183
112
 
184
- - **Default recommendation**: Run `/audit-ambiguity architecture` — recommended for all projects, especially those with compliance constraints
185
- - **Skip condition**: Only skip `/audit-ambiguity architecture` if all 12 dimensions scored ✅ AND the project has zero compliance constraints. In that case, recommend `/decompose-architecture` directly.
113
+ - `/audit-ambiguity architecture` — unconditionally mandatory. The self-check above cannot replace an independent audit. After the audit passes, the next step is `/decompose-architecture`.
@@ -19,7 +19,10 @@ pipeline:
19
19
 
20
20
  Create directory structure, shard skeleton files, and all layer indexes.
21
21
 
22
- **Prerequisite**: Read the approved domain boundaries from `docs/plans/ia/decomposition-plan.md`. If this file does not exist, the boundaries have not been approved — tell the user to run `/decompose-architecture` Steps 3-4.5 first.
22
+ **Prerequisite**: Read the approved domain boundaries from `docs/plans/ia/decomposition-plan.md`.
23
+
24
+ - If this file does not exist → **STOP**: "Decomposition plan missing. Run `/decompose-architecture` Steps 3-4.5 first."
25
+ - If the file exists but contains no `## Domain Boundary Table` → **STOP**: "Decomposition plan is incomplete — no domain boundary table found. Run `/decompose-architecture` Step 3 to generate domain boundaries."
23
26
 
24
27
  ---
25
28
 
@@ -55,6 +58,13 @@ Read `.agent/skills/prd-templates/SKILL.md` and follow its Shard Seeding Procedu
55
58
 
56
59
  Fallback for domains not covered in the ideation domain folders is defined in the skill's Shard Seeding Procedure.
57
60
 
61
+ **Post-creation verification**: After all skeletons are created, list the `docs/plans/ia/` directory. Verify:
62
+ - Every shard in the decomposition plan has a corresponding `.md` file
63
+ - `00-infrastructure.md` exists regardless of domain decomposition
64
+ - No empty files (0 bytes)
65
+
66
+ If any skeleton is missing → create it now. Do not proceed to index creation with missing skeletons.
67
+
58
68
  ## 6. Create IA index
59
69
 
60
70
  Read `.agent/skills/prd-templates/references/decomposition-templates.md` for the **IA Index** template. Create `docs/plans/ia/index.md` using the template, populating the shards table with all shards created in Step 5.
@@ -73,8 +83,8 @@ Read `.agent/skills/prd-templates/references/decomposition-templates.md` for the
73
83
 
74
84
  For multi-surface projects, each surface's own `index.md` contains the standard three-layer table (IA/BE/FE) scoped to that surface, following the same format as the single-surface master index.
75
85
 
76
- ### Propose next step
86
+ ### Next step
77
87
 
78
- Directory structure, shard skeletons, and all layer indexes are created. Next: Run `/decompose-architecture-validate` to identify deep dive candidates, annotate shard types, validate the dependency graph, and generate the spec pipeline tracker.
88
+ **STOP** do NOT proceed to any other workflow. The only valid next step is `/decompose-architecture-validate`.
79
89
 
80
- > If this shard was invoked standalone (not from `/decompose-architecture`), surface this via `notify_user`.
90
+ > If invoked standalone, surface via `notify_user` and wait for user confirmation.