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.
- package/package.json +1 -1
- package/template/.agent/kit-sync.md +3 -3
- package/template/.agent/skills/idea-extraction/SKILL.md +61 -18
- package/template/.agent/skills/prd-templates/references/architecture-completeness-checklist.md +28 -0
- package/template/.agent/skills/prd-templates/references/be-spec-classification.md +41 -0
- package/template/.agent/skills/prd-templates/references/bootstrap-verification-protocol.md +50 -0
- package/template/.agent/skills/prd-templates/references/constraint-exploration.md +41 -0
- package/template/.agent/skills/prd-templates/references/decision-confirmation-protocol.md +68 -0
- package/template/.agent/skills/prd-templates/references/decision-propagation.md +121 -0
- package/template/.agent/skills/prd-templates/references/domain-exhaustion-criteria.md +37 -0
- package/template/.agent/skills/prd-templates/references/engagement-tier-protocol.md +58 -0
- package/template/.agent/skills/prd-templates/references/evolution-layer-guidance.md +91 -0
- package/template/.agent/skills/prd-templates/references/expansion-modes.md +27 -0
- package/template/.agent/skills/prd-templates/references/folder-seeding-protocol.md +77 -0
- package/template/.agent/skills/prd-templates/references/input-classification.md +23 -0
- package/template/.agent/skills/prd-templates/references/map-guard-protocol.md +44 -0
- package/template/.agent/skills/prd-templates/references/persona-completeness-gate.md +20 -0
- package/template/.agent/skills/prd-templates/references/shard-boundary-analysis.md +76 -0
- package/template/.agent/skills/prd-templates/references/write-verification-protocol.md +57 -0
- package/template/.agent/workflows/create-prd-architecture.md +17 -23
- package/template/.agent/workflows/create-prd-compile.md +31 -22
- package/template/.agent/workflows/create-prd-design-system.md +18 -14
- package/template/.agent/workflows/create-prd-security.md +22 -24
- package/template/.agent/workflows/create-prd-stack.md +20 -11
- package/template/.agent/workflows/create-prd.md +27 -99
- package/template/.agent/workflows/decompose-architecture-structure.md +14 -4
- package/template/.agent/workflows/decompose-architecture-validate.md +29 -80
- package/template/.agent/workflows/decompose-architecture.md +27 -60
- package/template/.agent/workflows/evolve-contract.md +7 -2
- package/template/.agent/workflows/evolve-feature-cascade.md +34 -78
- package/template/.agent/workflows/evolve-feature-classify.md +22 -56
- package/template/.agent/workflows/ideate-discover.md +89 -100
- package/template/.agent/workflows/ideate-extract.md +42 -138
- package/template/.agent/workflows/ideate-validate.md +57 -133
- package/template/.agent/workflows/ideate.md +32 -19
- package/template/.agent/workflows/implement-slice-setup.md +15 -5
- package/template/.agent/workflows/implement-slice-tdd.md +21 -5
- package/template/.agent/workflows/plan-phase-write.md +30 -1
- package/template/.agent/workflows/propagate-decision-apply.md +23 -90
- package/template/.agent/workflows/propagate-decision-scan.md +20 -91
- package/template/.agent/workflows/remediate-pipeline-execute.md +6 -1
- package/template/.agent/workflows/validate-phase-quality.md +14 -3
- package/template/.agent/workflows/validate-phase-readiness.md +1 -1
- package/template/.agent/workflows/verify-infrastructure.md +2 -0
- package/template/.agent/workflows/write-architecture-spec-deepen.md +8 -2
- package/template/.agent/workflows/write-architecture-spec-design.md +11 -14
- package/template/.agent/workflows/write-be-spec-classify.md +26 -104
- package/template/.agent/workflows/write-be-spec-write.md +49 -3
- package/template/.agent/workflows/write-be-spec.md +1 -1
- package/template/.agent/workflows/write-fe-spec-write.md +62 -3
- package/template/.agent/workflows/write-fe-spec.md +1 -1
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Evolution Layer Guidance
|
|
2
|
+
|
|
3
|
+
Reference for `/evolve-feature-classify` Step 4 and `/evolve-feature-cascade` Step 1 — specifies what to write at each pipeline layer when evolving a feature.
|
|
4
|
+
|
|
5
|
+
## Entry Point Writing Depth
|
|
6
|
+
|
|
7
|
+
### Ideation Layer (`docs/plans/ideation/`)
|
|
8
|
+
|
|
9
|
+
1. **Placement**: Read `ideation-index.md` Structure Map. Identify the domain folder. Create new domain if needed.
|
|
10
|
+
2. **Classification Gate**: Apply Node Classification Gate from `.agent/skills/idea-extraction/SKILL.md` — leaf feature or sub-domain folder.
|
|
11
|
+
3. **Write**: Use `.agent/skills/prd-templates/references/fractal-feature-template.md`. Include:
|
|
12
|
+
- Feature description (what and why)
|
|
13
|
+
- Affected personas
|
|
14
|
+
- Success criteria
|
|
15
|
+
- Constraints
|
|
16
|
+
- Role Lens — which personas interact and how
|
|
17
|
+
4. **Update parent index**: Add to parent domain's `*-index.md` children table
|
|
18
|
+
5. **Update CX files**: If cross-domain interactions exist, update parent `*-cx.md` and/or `ideation-cx.md`
|
|
19
|
+
6. **Update `ideation-index.md`**: Add to MoSCoW Summary at appropriate priority
|
|
20
|
+
|
|
21
|
+
### Architecture Layer (`architecture-design.md`)
|
|
22
|
+
|
|
23
|
+
- Technical constraint description
|
|
24
|
+
- Affected components
|
|
25
|
+
- Non-functional requirements (performance, scalability, compliance)
|
|
26
|
+
- Integration points
|
|
27
|
+
|
|
28
|
+
### IA Layer (specific IA shard)
|
|
29
|
+
|
|
30
|
+
- Domain interactions (new/modified user flows)
|
|
31
|
+
- Contracts (new/modified API contracts)
|
|
32
|
+
- Data models (new entities, fields, relationships)
|
|
33
|
+
- Access control (RBAC implications)
|
|
34
|
+
|
|
35
|
+
### BE Layer (BE spec)
|
|
36
|
+
|
|
37
|
+
- New API endpoints
|
|
38
|
+
- Updated schemas
|
|
39
|
+
- Middleware requirements
|
|
40
|
+
- Validation rules
|
|
41
|
+
|
|
42
|
+
### FE Layer (FE spec)
|
|
43
|
+
|
|
44
|
+
- New components
|
|
45
|
+
- State management updates
|
|
46
|
+
- New routes
|
|
47
|
+
- Accessibility requirements
|
|
48
|
+
|
|
49
|
+
### Phase Plan
|
|
50
|
+
|
|
51
|
+
- New slices or updated slice acceptance criteria
|
|
52
|
+
|
|
53
|
+
## Cascade Layer Guidance
|
|
54
|
+
|
|
55
|
+
When cascading through downstream layers in `/evolve-feature-cascade`:
|
|
56
|
+
|
|
57
|
+
| Layer | What to Add |
|
|
58
|
+
|-------|------------|
|
|
59
|
+
| Architecture | New components, system diagram references, NFRs, integration points |
|
|
60
|
+
| IA | New domain interactions, updated contracts, data model changes, access control updates |
|
|
61
|
+
| BE | New API endpoints, updated schemas, middleware requirements, validation rules |
|
|
62
|
+
| FE | New components, state management updates, new routes, accessibility requirements |
|
|
63
|
+
| Phase plan | New slices or updated slice acceptance criteria |
|
|
64
|
+
|
|
65
|
+
## Impact Assessment Format
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
69
|
+
Implementation Impact
|
|
70
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
71
|
+
In-progress slices affected: [list or "none"]
|
|
72
|
+
Completed slices that may need revisiting: [list or "none"]
|
|
73
|
+
New slices needed: [list or "none"]
|
|
74
|
+
Phase plan update required: [yes/no]
|
|
75
|
+
|
|
76
|
+
Recommended action: [specific next step]
|
|
77
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Completion Summary Format
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
84
|
+
Feature Evolution Complete
|
|
85
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
86
|
+
Entry point: [document]
|
|
87
|
+
Layers updated: [list]
|
|
88
|
+
New content: [summary]
|
|
89
|
+
Implementation: [impact summary]
|
|
90
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
91
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Expansion Mode Options
|
|
2
|
+
|
|
3
|
+
Present these options after engagement tier selection. All input types see the same options.
|
|
4
|
+
|
|
5
|
+
| # | Mode | When to Recommend | Description |
|
|
6
|
+
|---|------|-------------------|-------------|
|
|
7
|
+
| 1 | **Full exploration** | 3+ domains | Breadth-before-depth with Deep Think |
|
|
8
|
+
| 2 | **Process as-is** | Thin input where user is confident | Proceed with what's captured |
|
|
9
|
+
| 3 | **Expand vertically** | Domains exist but are shallow | Drill deeper into existing features |
|
|
10
|
+
| 4 | **Expand horizontally** | Domains are deep but coverage gaps exist | Add new domains |
|
|
11
|
+
| 5 | **Cross-cutting concerns** | Domains mapped but interactions unexplored | Map feature interactions |
|
|
12
|
+
| 6 | **Combination** | User has specific priorities | User specifies dimensions and order |
|
|
13
|
+
| 7 | **Audit ambiguity first** | Unclear whether depth or breadth is needed | Inline ambiguity check before deciding |
|
|
14
|
+
|
|
15
|
+
## Default Recommendations
|
|
16
|
+
|
|
17
|
+
| Input Type | Default |
|
|
18
|
+
|---|---|
|
|
19
|
+
| Rich document (≥3 domains) | Full exploration |
|
|
20
|
+
| Rich document (<3 domains) | Expand vertically |
|
|
21
|
+
| Thin document | Full exploration |
|
|
22
|
+
| Verbal / one-liner | Full exploration |
|
|
23
|
+
| Re-run (continue) | Audit ambiguity first |
|
|
24
|
+
|
|
25
|
+
## Recording
|
|
26
|
+
|
|
27
|
+
Write the selected mode to `ideation-index.md` under `## Expansion Mode` immediately after user selection.
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Folder Seeding Protocol
|
|
2
|
+
|
|
3
|
+
Rules for creating the `docs/plans/ideation/` folder structure during `/ideate-extract`.
|
|
4
|
+
|
|
5
|
+
## Additive-Only Rule
|
|
6
|
+
|
|
7
|
+
The `docs/plans/ideation/` directory already exists in the kit with `.gitkeep` and `README.md`. You are ADDING files into this existing directory.
|
|
8
|
+
|
|
9
|
+
- Do NOT delete, overwrite, or replace the directory itself
|
|
10
|
+
- Do NOT remove any existing files (`.gitkeep`, `README.md`)
|
|
11
|
+
- Create new files alongside what already exists
|
|
12
|
+
|
|
13
|
+
## Base Structure (All Project Shapes)
|
|
14
|
+
|
|
15
|
+
After seeding, the folder should contain kit-shipped files PLUS new pipeline files:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
docs/plans/ideation/
|
|
19
|
+
├── .gitkeep ← KIT-SHIPPED — do not touch
|
|
20
|
+
├── README.md ← KIT-SHIPPED — do not touch
|
|
21
|
+
├── ideation-index.md ← NEW: super-index (from ideation-index-template)
|
|
22
|
+
├── ideation-cx.md ← NEW: global cross-cuts (from ideation-crosscut-template)
|
|
23
|
+
└── meta/ ← NEW: created by this step
|
|
24
|
+
├── problem-statement.md
|
|
25
|
+
├── personas.md
|
|
26
|
+
├── competitive-landscape.md
|
|
27
|
+
└── constraints.md
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For multi-product projects, additionally create `surfaces/` with sub-folders per surface.
|
|
31
|
+
|
|
32
|
+
## Templates
|
|
33
|
+
|
|
34
|
+
Read these templates when creating files:
|
|
35
|
+
|
|
36
|
+
- `.agent/skills/prd-templates/references/ideation-index-template.md` (super-index)
|
|
37
|
+
- `.agent/skills/prd-templates/references/ideation-crosscut-template.md` (global CX)
|
|
38
|
+
- `.agent/skills/prd-templates/references/fractal-node-index-template.md` (node index)
|
|
39
|
+
- `.agent/skills/prd-templates/references/fractal-cx-template.md` (node CX)
|
|
40
|
+
- `.agent/skills/prd-templates/references/fractal-feature-template.md` (feature file)
|
|
41
|
+
|
|
42
|
+
## Domain Seeding Rules
|
|
43
|
+
|
|
44
|
+
Domains come from the **confirmed classification table** (Step 1.4.5), NOT from source headings.
|
|
45
|
+
|
|
46
|
+
### Placement by Structural Classification
|
|
47
|
+
|
|
48
|
+
| Classification | Placement |
|
|
49
|
+
|---|---|
|
|
50
|
+
| Single-surface | `docs/plans/ideation/{NN}-{slug}/` |
|
|
51
|
+
| Hub-and-spoke | Surface-exclusive in `surfaces/{surface}/{NN}-{slug}/`, shared in hub surface |
|
|
52
|
+
| Peer | Surface-exclusive in `surfaces/{surface}/{NN}-{slug}/`, shared in `shared/{NN}-{slug}/` |
|
|
53
|
+
|
|
54
|
+
### Node Type → Action
|
|
55
|
+
|
|
56
|
+
| Gate Result | Action |
|
|
57
|
+
|---|---|
|
|
58
|
+
| **Domain** | Create domain folder with `{slug}-index.md` + `{slug}-cx.md` |
|
|
59
|
+
| **Sub-domain** | Create sub-domain folder nested inside parent domain |
|
|
60
|
+
| **Feature** | Create feature file inside parent domain or sub-domain |
|
|
61
|
+
| **Cross-cut** | Add entries to appropriate CX files (domain-level or global) |
|
|
62
|
+
| **Not-a-product-domain** | Add notes to `meta/constraints.md` for `/create-prd` |
|
|
63
|
+
|
|
64
|
+
After all nodes are created, update `ideation-index.md` structure map with paths.
|
|
65
|
+
|
|
66
|
+
## Content Seeding by Input Type
|
|
67
|
+
|
|
68
|
+
| Input Type | Content Strategy |
|
|
69
|
+
|---|---|
|
|
70
|
+
| **Rich document** | Seed each node with content from source using classification table citations. Run fidelity check: every major concept in source must map to SOMETHING in the output. Add `> Source: path/to/original.md` to index. |
|
|
71
|
+
| **Chat transcript** | Noise filter → extract signal → seed domain folders with structured output |
|
|
72
|
+
| **Thin document** | Create domain folders with depth markers on feature files |
|
|
73
|
+
| **Verbal / one-liner** | Create domain folders with scaffolding. Feature files are `[SURFACE]`. |
|
|
74
|
+
|
|
75
|
+
## Post-Seeding Verification Gate
|
|
76
|
+
|
|
77
|
+
After creating all files, verify that `docs/plans/ideation/.gitkeep` and `docs/plans/ideation/README.md` still exist. If EITHER file is missing → **STOP**: "Kit-shipped files were destroyed during seeding. Restore `.gitkeep` and/or `README.md` to `docs/plans/ideation/` before continuing."
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Input Classification Table
|
|
2
|
+
|
|
3
|
+
Classify user-provided input to determine which mode the `idea-extraction` skill operates in.
|
|
4
|
+
|
|
5
|
+
| Input Type | Detection Criteria | Extraction Mode |
|
|
6
|
+
|---|---|---|
|
|
7
|
+
| **Rich document** | >5KB, detailed docs, design conversations, prior specs | Extraction |
|
|
8
|
+
| **Thin document** | <5KB, structured but shallow (bullet list, rough PRD) | Expansion |
|
|
9
|
+
| **Conversational dump** | Chat logs, unstructured conversation transcripts | Extraction (with noise filtering) |
|
|
10
|
+
| **Verbal / one-liner** | User describes idea in chat, no files | Interview |
|
|
11
|
+
| **Nothing** | "I want to build an app" or similar zero-context input | Interview (deep) |
|
|
12
|
+
|
|
13
|
+
## Mode References
|
|
14
|
+
|
|
15
|
+
Each mode's full process is defined in `.agent/skills/idea-extraction/SKILL.md`:
|
|
16
|
+
|
|
17
|
+
- **Extraction Mode** → `## Input-Adaptive Modes → Extraction Mode — Rich Input`
|
|
18
|
+
- **Expansion Mode** → `## Input-Adaptive Modes → Expansion Mode — Thin Input`
|
|
19
|
+
- **Interview Mode** → `## Input-Adaptive Modes → Interview Mode — No Input / One-Liner`
|
|
20
|
+
|
|
21
|
+
## Proportionality Rule (Extraction Mode only)
|
|
22
|
+
|
|
23
|
+
If source input > 50KB, total ideation output must be ≥ 30% of source line count.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Map Guard Protocol
|
|
2
|
+
|
|
3
|
+
**Purpose**: Enforce strict surface stack map verification before any workflow step that depends on tech stack decisions. No timing fallbacks. No conversation-confirmed values.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Procedure
|
|
8
|
+
|
|
9
|
+
### 1. Read the Map
|
|
10
|
+
|
|
11
|
+
Read the surface stack map from `.agent/instructions/tech-stack.md`.
|
|
12
|
+
|
|
13
|
+
### 2. Check Required Cells
|
|
14
|
+
|
|
15
|
+
For the current workflow, verify that every cell the workflow depends on is filled (non-empty, no `{{PLACEHOLDER}}` literal).
|
|
16
|
+
|
|
17
|
+
Required cells vary by workflow — check the `requires_placeholders` frontmatter of the current workflow file, or the specific cells referenced in the workflow steps.
|
|
18
|
+
|
|
19
|
+
### 3. Hard Gate
|
|
20
|
+
|
|
21
|
+
**If ANY required cell is empty:**
|
|
22
|
+
|
|
23
|
+
> **HARD STOP** — The surface stack map has empty cells required by this workflow.
|
|
24
|
+
>
|
|
25
|
+
> | Empty Cell | Recovery |
|
|
26
|
+
> |---|---|
|
|
27
|
+
> | Languages / Databases / Frameworks | Run `/create-prd-stack` |
|
|
28
|
+
> | Auth / Security | Run `/create-prd-security` |
|
|
29
|
+
> | CI/CD / Hosting | Run `/create-prd-stack` (dev tooling axis) |
|
|
30
|
+
> | Commands section | Run `/bootstrap-agents` |
|
|
31
|
+
> | `structure.md` | Run `/create-prd-compile` Step 9.5 |
|
|
32
|
+
> | `patterns.md` | Run `/bootstrap-agents-provision` |
|
|
33
|
+
>
|
|
34
|
+
> Do NOT proceed. Do NOT use conversation-confirmed values. Do NOT apply timing fallbacks. If the cell should have been filled by a previous workflow step, the previous step has a bug — surface it.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## What This Replaces
|
|
39
|
+
|
|
40
|
+
This protocol replaces all instances of the timing fallback pattern:
|
|
41
|
+
|
|
42
|
+
> ~~"If a cell is empty but the value was just confirmed in the current conversation... proceed using the conversation-confirmed value"~~
|
|
43
|
+
|
|
44
|
+
That pattern is **permanently banned**. It creates an escape hatch that allows agents to bypass map guards entirely. If a cell is empty, the upstream workflow that should have filled it has a bug. Surface the bug, don't work around it.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Persona Completeness Gate
|
|
2
|
+
|
|
3
|
+
Applies to every persona in `meta/personas.md` during ideation.
|
|
4
|
+
|
|
5
|
+
## Required Fields (6)
|
|
6
|
+
|
|
7
|
+
Every persona must have all 6 fields populated before proceeding past persona exploration:
|
|
8
|
+
|
|
9
|
+
1. **Name + specific role** — not generic ("Shop Owner" not "User")
|
|
10
|
+
2. **Specific pain point** — the problem this product solves for them
|
|
11
|
+
3. **Current workaround** — how they solve it today without this product
|
|
12
|
+
4. **Success criteria** — what "solved" looks like for them (measurable)
|
|
13
|
+
5. **Switching trigger** — what event would make them adopt this product
|
|
14
|
+
6. **Edge case or constraint** — at least one thing unique to this persona (regulatory, workflow, scale)
|
|
15
|
+
|
|
16
|
+
## Enforcement
|
|
17
|
+
|
|
18
|
+
If any field is absent for any persona → probe the user before proceeding.
|
|
19
|
+
|
|
20
|
+
Reference: `.agent/skills/pipeline-rubrics/references/ideation-rubric.md` Dimension 2.
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Shard Boundary Analysis
|
|
2
|
+
|
|
3
|
+
Reference data for the decompose-architecture workflow — shard boundary heuristics, load thresholds, classification types, and split proposal format.
|
|
4
|
+
|
|
5
|
+
## Fractal Tree Signals for Shard Boundaries
|
|
6
|
+
|
|
7
|
+
| Signal | What It Means for Sharding |
|
|
8
|
+
|--------|---------------------------|
|
|
9
|
+
| Deep fractal tree (3+ levels) | Domain is complex enough for its own shard |
|
|
10
|
+
| Many children (5+ features) | Consider splitting into multiple shards |
|
|
11
|
+
| Dense CX file (5+ cross-cuts) | High coupling — keep together in one shard, or isolate carefully |
|
|
12
|
+
| Rich Role Matrix (3+ roles with access) | Shard needs multi-role IA spec coverage |
|
|
13
|
+
| Hub-and-spoke shared domains | Shared domains often become `00-*` cross-cutting shards |
|
|
14
|
+
| Leaf features marked `[EXHAUSTED]` | Most confident for shard scoping — behavior is fully defined |
|
|
15
|
+
|
|
16
|
+
## Standard Boundary Heuristics
|
|
17
|
+
|
|
18
|
+
- Features that share the same data models belong together
|
|
19
|
+
- Features that can be developed/deployed independently are candidates for separation
|
|
20
|
+
- Features that share the same access control model may belong together
|
|
21
|
+
- Cross-cutting concerns (auth, API conventions, error handling) become `00-*` shards
|
|
22
|
+
|
|
23
|
+
## Shard Load Thresholds (Pre-check from Ideation)
|
|
24
|
+
|
|
25
|
+
| Ideation Sub-Areas | Pre-Check Action |
|
|
26
|
+
|---|---|
|
|
27
|
+
| ≤6 | ✅ No concern — proceed |
|
|
28
|
+
| 7–9 | ⚠️ **Pre-flag for split review** — note in the shard skeleton |
|
|
29
|
+
| ≥10 | 🚩 **Proactive split proposal** — present to user NOW before calibration gate |
|
|
30
|
+
|
|
31
|
+
## Sub-feature Count Thresholds (Calibration Gate)
|
|
32
|
+
|
|
33
|
+
Count sub-features using the **bullet/named-item rule**: count every bullet or named item under `## Features`, excluding group headers that introduce a group but are not themselves a concrete capability. Sub-bullets count independently. Test: "Would a product manager list this as a separate line item in a release note?"
|
|
34
|
+
|
|
35
|
+
| Sub-feature Count | Action |
|
|
36
|
+
|-------------------|--------|
|
|
37
|
+
| **≤6** | ✅ OK — proceed |
|
|
38
|
+
| **7–9** | ⚠️ Flag for user review — present sub-feature list and ask: "Keep as-is, or split?" |
|
|
39
|
+
| **≥10** | 🛑 **Hard stop** — present mandatory split proposal. No shard may exit with ≥10 sub-features. |
|
|
40
|
+
|
|
41
|
+
## Shard Document Type Classification
|
|
42
|
+
|
|
43
|
+
| Classification | Expected BE Specs |
|
|
44
|
+
|---------------|-------------------|
|
|
45
|
+
| **Feature domain** | 1 |
|
|
46
|
+
| **Multi-domain** | N (split along sub-feature boundaries) |
|
|
47
|
+
| **Cross-cutting** | 1 (`00-*`) |
|
|
48
|
+
| **Structural reference** | 0 |
|
|
49
|
+
|
|
50
|
+
Annotation format for shard skeletons:
|
|
51
|
+
```markdown
|
|
52
|
+
> **Document Type** (preliminary): Feature domain | Multi-domain | Cross-cutting | Structural reference
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Split Proposal Format
|
|
56
|
+
|
|
57
|
+
When a shard exceeds the ≥10 threshold:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
Shard [NN] — [domain name] has [N] sub-features (threshold: ≥10 → mandatory split)
|
|
61
|
+
|
|
62
|
+
Current sub-features:
|
|
63
|
+
1. [sub-feature]
|
|
64
|
+
2. [sub-feature]
|
|
65
|
+
...
|
|
66
|
+
|
|
67
|
+
Proposed split:
|
|
68
|
+
[NN]a — [new domain name] → file: docs/plans/ia/[NN]a-[domain].md
|
|
69
|
+
Sub-features: 1, 3, 5
|
|
70
|
+
[NN]b — [new domain name] → file: docs/plans/ia/[NN]b-[domain].md
|
|
71
|
+
Sub-features: 2, 4, 6
|
|
72
|
+
|
|
73
|
+
Split rationale: [why these groups are independent]
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
**After any split**: Update `docs/plans/ia/decomposition-plan.md` with the revised table and re-run the Must Have coverage gate.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Write Verification Protocol
|
|
2
|
+
|
|
3
|
+
**Purpose**: Every file write MUST be verified by reading the file back. This protocol eliminates the ~18 instances of "write the completed section" without verification.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Procedure
|
|
8
|
+
|
|
9
|
+
### 1. Write
|
|
10
|
+
|
|
11
|
+
Write the content to the target file at the specified section.
|
|
12
|
+
|
|
13
|
+
### 2. Read Back
|
|
14
|
+
|
|
15
|
+
Immediately after writing, read the target file. Locate the section header that was just written.
|
|
16
|
+
|
|
17
|
+
### 3. Verify
|
|
18
|
+
|
|
19
|
+
Check ALL of these conditions:
|
|
20
|
+
|
|
21
|
+
- [ ] The section header exists in the file
|
|
22
|
+
- [ ] The section content is non-empty (not just a header with no body)
|
|
23
|
+
- [ ] The content matches what was intended (key fields present, no truncation)
|
|
24
|
+
|
|
25
|
+
### 4. Handle Failure
|
|
26
|
+
|
|
27
|
+
**If ANY check fails:**
|
|
28
|
+
|
|
29
|
+
1. Log: "Write verification failed for `[file]` section `[section]`."
|
|
30
|
+
2. Retry the write once.
|
|
31
|
+
3. Read back again and re-verify.
|
|
32
|
+
4. If second attempt fails → **STOP**: "Unable to write `[section]` to `[file]` after 2 attempts. Investigate before proceeding."
|
|
33
|
+
|
|
34
|
+
### 5. Confirm
|
|
35
|
+
|
|
36
|
+
After successful verification, log: `Write verified: [file] § [section]`
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## When to Use
|
|
41
|
+
|
|
42
|
+
Any workflow step that says:
|
|
43
|
+
- "Write the completed [section]"
|
|
44
|
+
- "Write [content] to [file]"
|
|
45
|
+
- "Update [file] with [content]"
|
|
46
|
+
- "Append [content] to [file]"
|
|
47
|
+
|
|
48
|
+
MUST follow this protocol. There are no exceptions. A write instruction without read-back verification is an enforcement failure.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Scope
|
|
53
|
+
|
|
54
|
+
This protocol applies to **spec and instruction file writes** — the documents that drive downstream pipeline behavior. It does NOT apply to:
|
|
55
|
+
- Progress tracking file writes (those have their own verification in the completion checklist)
|
|
56
|
+
- Temporary/scratch files
|
|
57
|
+
- Audit report writes (those are progressive and self-verifying)
|
|
@@ -24,23 +24,17 @@ Design the high-level system architecture and data strategy. Create the data pla
|
|
|
24
24
|
|
|
25
25
|
## 0. Map guard
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
Follow the map guard protocol (`.agent/skills/prd-templates/references/map-guard-protocol.md`). Required cells for this shard:
|
|
28
28
|
|
|
29
|
-
| Map Location | Column/Category |
|
|
30
|
-
|
|
31
|
-
| Cross-Cutting | Hosting |
|
|
32
|
-
| Per-Surface (shared) | ORMs |
|
|
33
|
-
| Per-Surface (shared) | Databases |
|
|
29
|
+
| Map Location | Column/Category | Why this matters |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| Cross-Cutting | Hosting | Deployment topology (Step 4.3) needs hosting-specific conventions. |
|
|
32
|
+
| Per-Surface (shared) | ORMs | Migration strategy (Step 5.4) needs ORM-specific schema conventions. |
|
|
33
|
+
| Per-Surface (shared) | Databases | Data strategy (Step 5) needs database-specific schema design patterns. |
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
**HARD GATE** — If ANY required cell is empty → STOP. No timing fallbacks. No conversation-confirmed values. See map guard protocol for recovery.
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
Read `## Engagement Tier` from `docs/plans/ideation/ideation-index.md`.
|
|
40
|
-
|
|
41
|
-
**Tier behavior for architecture decisions:**
|
|
42
|
-
- 🤖 **Auto**: Agent designs system architecture + data strategy via Deep Think. Writes reasoning. Marks decisions `[AUTO-CONFIRMED]`. User reviews at end of shard.
|
|
43
|
-
- 🤝 **Hybrid** / 💬 **Interactive**: Present each major section, walk through, wait for user confirmation (current behavior).
|
|
37
|
+
Read the engagement tier protocol (`.agent/skills/prd-templates/references/engagement-tier-protocol.md`) — apply the tier behavior for architecture decisions.
|
|
44
38
|
|
|
45
39
|
---
|
|
46
40
|
|
|
@@ -76,9 +70,9 @@ For each component, also define:
|
|
|
76
70
|
- "Are there failure modes I haven't accounted for?"
|
|
77
71
|
- For multi-surface: "What happens if the sync layer goes down? Can each surface degrade gracefully?"
|
|
78
72
|
|
|
79
|
-
|
|
73
|
+
Follow the decision confirmation protocol (`.agent/skills/prd-templates/references/decision-confirmation-protocol.md`) — do not write until explicitly confirmed.
|
|
80
74
|
|
|
81
|
-
Write the completed `## System Architecture` section to `docs/plans/architecture-draft.md` (create the file if it does not exist). Do not wait until the end — write this section as soon as it is completed and confirmed by the user.
|
|
75
|
+
Write the completed `## System Architecture` section to `docs/plans/architecture-draft.md` (create the file if it does not exist). Do not wait until the end — write this section as soon as it is completed and confirmed by the user. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
|
|
82
76
|
|
|
83
77
|
> **Decision recording**: For each non-trivial architecture decision (technology choices, deployment topology, API style, failure handling strategy), read `.agent/skills/session-continuity/protocols/06-decision-analysis.md` and follow the **Decision Effect Analysis Protocol**. Architecture decisions have the highest downstream impact in the pipeline — record them to `memory/decisions.md` with the Philosopher + Devil's Advocate deliberation.
|
|
84
78
|
|
|
@@ -88,7 +82,7 @@ Write the completed `## System Architecture` section to `docs/plans/architecture
|
|
|
88
82
|
|
|
89
83
|
Read `.agent/skills/error-handling-patterns/SKILL.md` and follow its Error Architecture Interview methodology. All 5 decisions must receive explicit user confirmation before proceeding to Data Strategy. This step is a hard gate — do not proceed until all five decisions are confirmed.
|
|
90
84
|
|
|
91
|
-
Write the completed decisions to `docs/plans/architecture-draft.md` under a new top-level `## Error Architecture` section (between `## System Architecture` and `## Data Strategy`). The section must contain five sub-sections matching the five decisions above (`### Global Error Envelope`, `### Error Propagation Chain`, `### Unhandled Exception Strategy`, `### Client Fallback Contract`, `### Error Boundary Strategy`), with the locked canonical JSON example included verbatim under `### Global Error Envelope`.
|
|
85
|
+
Write the completed decisions to `docs/plans/architecture-draft.md` under a new top-level `## Error Architecture` section (between `## System Architecture` and `## Data Strategy`). The section must contain five sub-sections matching the five decisions above (`### Global Error Envelope`, `### Error Propagation Chain`, `### Unhandled Exception Strategy`, `### Client Fallback Contract`, `### Error Boundary Strategy`), with the locked canonical JSON example included verbatim under `### Global Error Envelope`. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
|
|
92
86
|
|
|
93
87
|
## 5. Data strategy
|
|
94
88
|
|
|
@@ -111,22 +105,22 @@ For multi-surface projects, additionally define:
|
|
|
111
105
|
- "Does every entity have a clear owner?"
|
|
112
106
|
- "Are there query patterns I'm missing that could become hot paths?"
|
|
113
107
|
|
|
114
|
-
|
|
108
|
+
Follow the decision confirmation protocol (`.agent/skills/prd-templates/references/decision-confirmation-protocol.md`) — do not write until explicitly confirmed.
|
|
115
109
|
|
|
116
|
-
Write the completed `## Data Strategy` section to `docs/plans/architecture-draft.md`.
|
|
110
|
+
Write the completed `## Data Strategy` section to `docs/plans/architecture-draft.md`. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
|
|
117
111
|
|
|
118
112
|
### 5.5. Cross-Store Entity Consistency
|
|
119
113
|
|
|
120
114
|
Read .agent/skills/database-schema-design/SKILL.md and follow its Cross-Store Entity Consistency Protocol for every entity that spans more than one store.
|
|
121
115
|
|
|
122
|
-
Write the completed cross-store consistency table to `docs/plans/architecture-draft.md` as part of the `## Data Strategy` section.
|
|
116
|
+
Write the completed cross-store consistency table to `docs/plans/architecture-draft.md` as part of the `## Data Strategy` section. Follow the write verification protocol (`.agent/skills/prd-templates/references/write-verification-protocol.md`).
|
|
123
117
|
|
|
124
118
|
### Data placement strategy document
|
|
125
119
|
|
|
126
120
|
Read `.agent/skills/prd-templates/references/data-placement-template.md` for the template structure. Create `docs/plans/data-placement-strategy.md` using the template, filling each section with the data decisions confirmed above.
|
|
127
121
|
|
|
128
|
-
###
|
|
122
|
+
### Next step
|
|
129
123
|
|
|
130
|
-
|
|
124
|
+
**STOP** — do NOT proceed to any other workflow. The only valid next step is `/create-prd-security`.
|
|
131
125
|
|
|
132
|
-
> If
|
|
126
|
+
> If invoked standalone, surface via `notify_user` and wait for user confirmation.
|
|
@@ -20,29 +20,25 @@ requires_map_columns: [Unit Tests, E2E Tests, CI/CD]
|
|
|
20
20
|
|
|
21
21
|
Document the development methodology and phasing strategy. Compile the architecture design document and engineering standards.
|
|
22
22
|
|
|
23
|
-
**Prerequisite**: Security model and integration points must be defined (from `/create-prd-security`).
|
|
23
|
+
**Prerequisite**: Security model and integration points must be defined (from `/create-prd-security`).
|
|
24
|
+
|
|
25
|
+
Verify `docs/plans/architecture-draft.md` exists. If it does not → **STOP**: "architecture-draft.md is missing. Previous shards should have created it. Run `/create-prd-architecture` first."
|
|
24
26
|
|
|
25
27
|
---
|
|
26
28
|
|
|
27
29
|
## 0. Map guard
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
| Map Location | Column/Category | Recovery | Why this matters |
|
|
32
|
-
|---|---|---|---|
|
|
33
|
-
| Per-Surface (any) | Unit Tests | Run `/create-prd-stack` to confirm unit testing framework, then bootstrap. | Development methodology (Step 8) needs framework-specific TDD patterns. |
|
|
34
|
-
| Per-Surface (any) | E2E Tests | Run `/create-prd-stack` to confirm E2E testing framework, then bootstrap. | Development methodology (Step 8) needs E2E-specific test conventions. |
|
|
35
|
-
| Cross-Cutting | CI/CD | Run `/create-prd-stack` to confirm CI/CD platform, then bootstrap. | Phasing strategy (Step 9) needs platform-specific pipeline patterns. |
|
|
31
|
+
Follow the map guard protocol (`.agent/skills/prd-templates/references/map-guard-protocol.md`). Required cells for this shard:
|
|
36
32
|
|
|
37
|
-
|
|
33
|
+
| Map Location | Column/Category | Why this matters |
|
|
34
|
+
|---|---|---|
|
|
35
|
+
| Per-Surface (any) | Unit Tests | Development methodology (Step 8) needs framework-specific TDD patterns. |
|
|
36
|
+
| Per-Surface (any) | E2E Tests | Development methodology (Step 8) needs E2E-specific test conventions. |
|
|
37
|
+
| Cross-Cutting | CI/CD | Phasing strategy (Step 9) needs platform-specific pipeline patterns. |
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
**HARD GATE** — If ANY required cell is empty → STOP. No timing fallbacks. No conversation-confirmed values. See map guard protocol for recovery.
|
|
40
40
|
|
|
41
|
-
Read
|
|
42
|
-
|
|
43
|
-
**Tier behavior for compile decisions:**
|
|
44
|
-
- 🤖 **Auto**: Agent selects methodology, phasing, and performance budgets via Deep Think. Writes reasoning. Marks `[AUTO-CONFIRMED]`. User reviews compiled documents.
|
|
45
|
-
- 🤝 **Hybrid** / 💬 **Interactive**: Present each decision, wait for user confirmation (current behavior).
|
|
41
|
+
Read the engagement tier protocol (`.agent/skills/prd-templates/references/engagement-tier-protocol.md`) — apply the tier behavior for compile decisions.
|
|
46
42
|
|
|
47
43
|
---
|
|
48
44
|
|
|
@@ -59,7 +55,7 @@ Document the agreed approach:
|
|
|
59
55
|
4. **Spec layers** — IA → BE → FE pipeline
|
|
60
56
|
5. **Quality gates** — What must pass before merge
|
|
61
57
|
|
|
62
|
-
Write the completed `## Development Methodology` section to `docs/plans/architecture-draft.md` immediately after user confirmation.
|
|
58
|
+
Write the completed `## Development Methodology` 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`).
|
|
63
59
|
|
|
64
60
|
## 9. Phasing strategy
|
|
65
61
|
|
|
@@ -83,9 +79,9 @@ Each phase should have a rough timeline estimate and must pass the full validati
|
|
|
83
79
|
- "Are there features in Phase 2 that actually depend on something not in Phase 1?"
|
|
84
80
|
- "Is the Phase 1 scope achievable without cutting quality?"
|
|
85
81
|
|
|
86
|
-
|
|
82
|
+
Follow the decision confirmation protocol (`.agent/skills/prd-templates/references/decision-confirmation-protocol.md`) — do not write until explicitly confirmed.
|
|
87
83
|
|
|
88
|
-
Write the completed `## Phasing Strategy` section to `docs/plans/architecture-draft.md` immediately after user confirmation.
|
|
84
|
+
Write the completed `## Phasing Strategy` 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`).
|
|
89
85
|
|
|
90
86
|
## 9.5. Lock project directory structure
|
|
91
87
|
|
|
@@ -95,7 +91,7 @@ Based on the locked tech stack, generate a canonical directory tree.
|
|
|
95
91
|
2. Present the tree to the user with one-line descriptions per top-level directory. Adapt the tree to the actual stack — e.g., a CLI project won't have `components/`, a monorepo will have `apps/` and `packages/`
|
|
96
92
|
3. Build an architecture separation table mapping each concern to its directory and runtime
|
|
97
93
|
4. **Present to user**: Show the directory tree and architecture table. Ask: "Does this structure match your expectations?" **Do not proceed until explicit approval.**
|
|
98
|
-
5. After approval, fire bootstrap with: `PROJECT_STRUCTURE`, `ARCHITECTURE_TABLE`, `CONTRACTS_DIR`, `BUILD_OUTPUT_DIR`
|
|
94
|
+
5. After approval, fire bootstrap with: `PROJECT_STRUCTURE`, `ARCHITECTURE_TABLE`, `CONTRACTS_DIR`, `BUILD_OUTPUT_DIR`. **HARD GATE**: Follow the bootstrap verification protocol (`.agent/skills/prd-templates/references/bootstrap-verification-protocol.md`) — verify all 4 keys.
|
|
99
95
|
6. Append a `## Directory Structure` section to `docs/plans/architecture-draft.md`
|
|
100
96
|
|
|
101
97
|
> If invoked standalone, surface via `notify_user`.
|
|
@@ -106,7 +102,18 @@ Read .agent/skills/technical-writer/SKILL.md and follow its methodology.
|
|
|
106
102
|
|
|
107
103
|
Read .agent/skills/technical-writer/SKILL.md and apply its clarity and structure standards throughout document compilation.
|
|
108
104
|
|
|
109
|
-
Read `docs/plans/architecture-draft.md` as the authoritative source.
|
|
105
|
+
Read `docs/plans/architecture-draft.md` as the authoritative source.
|
|
106
|
+
|
|
107
|
+
**Section validation**: Before compiling, verify these sections exist in architecture-draft.md:
|
|
108
|
+
- `## System Architecture`
|
|
109
|
+
- `## Error Architecture`
|
|
110
|
+
- `## Data Strategy`
|
|
111
|
+
- `## Security Model`
|
|
112
|
+
- `## Integration Points` (or explicit "no integrations" note)
|
|
113
|
+
|
|
114
|
+
If any required section is missing → **STOP**: "architecture-draft.md is missing `[section]`. This section should have been written by a previous shard. Run the relevant shard: architecture → `/create-prd-architecture`, security → `/create-prd-security`."
|
|
115
|
+
|
|
116
|
+
Read `.agent/skills/prd-templates/references/architecture-design-template.md` for the document structure. Compile it into `docs/plans/YYYY-MM-DD-architecture-design.md` (use today's date).
|
|
110
117
|
|
|
111
118
|
> **Depth rule**: Each section must contain the full detail gathered during steps 3-9. If a section is under 200 words, it's almost certainly too shallow. Apply the two-implementer test.
|
|
112
119
|
|
|
@@ -142,6 +149,8 @@ Call `notify_user` presenting:
|
|
|
142
149
|
|
|
143
150
|
> **Both documents must be approved before proceeding. Do NOT proceed until the user sends a message explicitly approving this output.**
|
|
144
151
|
|
|
145
|
-
###
|
|
152
|
+
### Next step
|
|
153
|
+
|
|
154
|
+
**STOP** — do NOT propose `/decompose-architecture` or any other pipeline workflow. The only valid next step is:
|
|
146
155
|
|
|
147
|
-
|
|
156
|
+
- `/audit-ambiguity architecture` — unconditionally mandatory. The self-check above cannot replace an independent audit.
|