buildflow-dev 1.0.6 → 4.0.1
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/README.md +273 -25
- package/package.json +4 -2
- package/src/commands/init.js +19 -0
- package/src/commands/install.js +3 -2
- package/templates/CLAUDE.md +49 -29
- package/templates/commands/build.md +89 -34
- package/templates/commands/check.md +59 -24
- package/templates/commands/debug.md +68 -0
- package/templates/commands/deploy.md +80 -0
- package/templates/commands/hotfix.md +94 -0
- package/templates/commands/plan.md +64 -22
- package/templates/commands/ship.md +109 -47
- package/templates/commands/spec.md +147 -0
- package/templates/commands/start.md +38 -8
- package/templates/commands/test.md +82 -0
|
@@ -1,56 +1,91 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: buildflow-ship
|
|
3
|
-
description: Finalize phase with
|
|
3
|
+
description: Finalize phase with spec gate, security gate, and context pruning
|
|
4
4
|
allowed-tools: Read, Write, Bash
|
|
5
5
|
agents: strategist, security-auditor
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# /buildflow-ship
|
|
9
9
|
|
|
10
|
-
Finalize current phase.
|
|
10
|
+
Finalize current phase. Three gates run before shipping: spec compliance, security scan, and test pass. After shipping, session context is pruned so the next phase starts clean.
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Context Packet (load only these)
|
|
13
|
+
- `.buildflow/specs/acceptance.md`
|
|
14
|
+
- `.buildflow/core/state.md`
|
|
15
|
+
- `.buildflow/memory/light.md`
|
|
16
|
+
- Git diff of changed files (not full codebase)
|
|
17
|
+
|
|
18
|
+
## MANDATORY Gate 0: Spec Compliance Check
|
|
19
|
+
|
|
20
|
+
Read `.buildflow/specs/acceptance.md`. Verify every AC is satisfied.
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
Spec Gate
|
|
24
|
+
─────────
|
|
25
|
+
AC-001 ✓
|
|
26
|
+
AC-002 ✓
|
|
27
|
+
AC-003 ✗ FAIL — password reset not implemented
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**If any AC is ✗ FAIL → BLOCK:**
|
|
31
|
+
```
|
|
32
|
+
🔴 SHIP BLOCKED — Spec Not Complete
|
|
33
|
+
|
|
34
|
+
These acceptance criteria are not satisfied:
|
|
35
|
+
[AC-003] password reset not implemented
|
|
36
|
+
|
|
37
|
+
Fix them with /buildflow-build or /buildflow-modify, then re-run /buildflow-ship.
|
|
38
|
+
Override (skips spec gate only): /buildflow-ship --skip-spec
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
**If all ACs pass → proceed to Gate 1.**
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## MANDATORY Gate 1: Pre-Ship Security Scan
|
|
13
46
|
|
|
14
47
|
Spawn Security Auditor in `--pre-ship` mode:
|
|
15
|
-
- Scan
|
|
48
|
+
- Scan changed files only (git diff since last commit)
|
|
16
49
|
- Check for secrets
|
|
17
50
|
- Check critical injection patterns
|
|
18
51
|
- Check auth bypass risks
|
|
19
52
|
- Check critical dependency CVEs
|
|
20
|
-
- Token cost: ~10K
|
|
21
|
-
|
|
22
|
-
### Gate Outcomes
|
|
23
53
|
|
|
24
54
|
**Critical found → BLOCK:**
|
|
25
55
|
```
|
|
26
56
|
🔴 SHIP BLOCKED — Critical Security Issues
|
|
27
57
|
|
|
28
|
-
|
|
29
|
-
[C1] [Issue] at [file:line]
|
|
58
|
+
[C1] [issue] at [file:line]
|
|
30
59
|
Fix: [specific action]
|
|
31
60
|
|
|
32
61
|
Run /buildflow-modify for surgical fixes.
|
|
33
62
|
Override (not recommended): /buildflow-ship --force
|
|
34
63
|
```
|
|
35
64
|
|
|
36
|
-
**High found → WARN:**
|
|
65
|
+
**High found → WARN (non-blocking):**
|
|
37
66
|
```
|
|
38
|
-
⚠️ Security Warnings
|
|
39
|
-
[H1] [
|
|
40
|
-
Risk: [...]
|
|
41
|
-
Fix later: /buildflow-audit for details
|
|
67
|
+
⚠️ Security Warnings
|
|
68
|
+
[H1] [issue] — fix in next phase
|
|
42
69
|
```
|
|
43
70
|
|
|
44
|
-
**Clean → proceed
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
71
|
+
**Clean → proceed.**
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## MANDATORY Gate 2: Tests Pass
|
|
76
|
+
|
|
77
|
+
Run the test suite one final time.
|
|
78
|
+
If any test fails: BLOCK. "Fix test failures before shipping."
|
|
79
|
+
|
|
80
|
+
---
|
|
48
81
|
|
|
49
|
-
## Step 1: Pre-Ship Checklist
|
|
50
|
-
- [ ] All
|
|
51
|
-
- [ ]
|
|
52
|
-
- [ ]
|
|
53
|
-
- [ ]
|
|
82
|
+
## Step 1: Pre-Ship Checklist (summary)
|
|
83
|
+
- [ ] All ACs satisfied (Gate 0)
|
|
84
|
+
- [ ] Security gate passed (Gate 1)
|
|
85
|
+
- [ ] All tests passing (Gate 2)
|
|
86
|
+
- [ ] `/buildflow-check` run and reviewed
|
|
87
|
+
|
|
88
|
+
---
|
|
54
89
|
|
|
55
90
|
## Step 2: Retrospective
|
|
56
91
|
Ask:
|
|
@@ -61,37 +96,64 @@ Ask:
|
|
|
61
96
|
|
|
62
97
|
Save to `.buildflow/phases/[N]/retro.md`
|
|
63
98
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Step 3: Context Pruning (token efficiency)
|
|
102
|
+
|
|
103
|
+
After a successful ship, prune `light.md` to stay lean for the next phase:
|
|
104
|
+
|
|
105
|
+
**Archive** these from `light.md` to `phases/[N]/retro.md`:
|
|
106
|
+
- Phase-specific task lists
|
|
107
|
+
- Wave completion details
|
|
108
|
+
- Build timestamps
|
|
109
|
+
- Hotfix history older than current phase
|
|
68
110
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
111
|
+
**Keep** in `light.md`:
|
|
112
|
+
- app_name, framework, language
|
|
113
|
+
- current_phase (update to N+1 or "complete")
|
|
114
|
+
- spec_status (reset to "none" for next phase)
|
|
115
|
+
- style_fingerprint
|
|
116
|
+
- last 2 architectural decisions
|
|
117
|
+
- onboard_status
|
|
118
|
+
|
|
119
|
+
**Target:** `light.md` must be under 3K tokens after pruning.
|
|
120
|
+
|
|
121
|
+
Update `light.md`:
|
|
122
|
+
```yaml
|
|
123
|
+
current_phase: [N+1 or complete]
|
|
124
|
+
last_ship_date: [today]
|
|
125
|
+
spec_status: none
|
|
126
|
+
plan_status: none
|
|
127
|
+
context_pruned: [today]
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Step 4: Update Docs
|
|
133
|
+
- README if public-facing features shipped
|
|
134
|
+
- `vision.md` if pivots occurred during the phase
|
|
135
|
+
|
|
136
|
+
---
|
|
74
137
|
|
|
75
138
|
## Step 5: Tag Release
|
|
76
139
|
```bash
|
|
77
140
|
git add .
|
|
78
|
-
git commit -m "
|
|
79
|
-
git tag "
|
|
141
|
+
git commit -m "ship: phase [N] complete"
|
|
142
|
+
git tag "phase-[N]-complete"
|
|
80
143
|
```
|
|
81
144
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
phase
|
|
86
|
-
|
|
87
|
-
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Step 6: Next Phase
|
|
148
|
+
Suggest next phase based on remaining roadmap items.
|
|
149
|
+
"Phase [N] shipped. Run `/buildflow-spec` to define the next phase."
|
|
150
|
+
|
|
151
|
+
---
|
|
88
152
|
|
|
89
|
-
##
|
|
90
|
-
|
|
153
|
+
## Override Flags
|
|
154
|
+
- `--skip-spec` — skips spec gate only. Logs to `security/DEBT.md`: "Spec gate skipped — [reason]"
|
|
155
|
+
- `--force` — skips security gate. Requires typed confirmation. Logged with timestamp.
|
|
91
156
|
|
|
92
|
-
|
|
93
|
-
If used, adds to `.buildflow/security/DEBT.md` and requires:
|
|
94
|
-
- Typed confirmation: "I understand the risk"
|
|
95
|
-
- Logged with timestamp
|
|
157
|
+
Neither flag skips the test gate.
|
|
96
158
|
|
|
97
|
-
## Token Budget: ~22K (including
|
|
159
|
+
## Token Budget: ~22K (including gates)
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: buildflow-spec
|
|
3
|
+
description: Generate formal PRD, Technical Design, and Acceptance Criteria before planning
|
|
4
|
+
allowed-tools: Read, Write, WebSearch
|
|
5
|
+
agent: strategist
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /buildflow-spec
|
|
9
|
+
|
|
10
|
+
Spec-Driven Development layer. Produces three locked spec artifacts before any code is planned or written. The Architect, Builder, and Reviewer agents all reference these during execution.
|
|
11
|
+
|
|
12
|
+
Run this after `/buildflow-start` and before `/buildflow-plan`.
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
- `/buildflow-spec` — generate full spec from vision
|
|
16
|
+
- `/buildflow-spec prd` — regenerate PRD only
|
|
17
|
+
- `/buildflow-spec tdd` — regenerate Technical Design only
|
|
18
|
+
- `/buildflow-spec acceptance` — regenerate acceptance criteria only
|
|
19
|
+
- `/buildflow-spec --review` — re-read and review existing specs without regenerating
|
|
20
|
+
|
|
21
|
+
## Context Packet (load only these — nothing else)
|
|
22
|
+
- `.buildflow/core/vision.md`
|
|
23
|
+
- `.buildflow/memory/light.md` (summary fields only: app_name, framework, phase)
|
|
24
|
+
- `.buildflow/specs/` (existing specs if regenerating)
|
|
25
|
+
|
|
26
|
+
## Step 1: Validate Vision Exists
|
|
27
|
+
Read `.buildflow/core/vision.md`.
|
|
28
|
+
If empty or missing: "Run /buildflow-start first to capture the project vision."
|
|
29
|
+
|
|
30
|
+
## Step 2: Clarify Ambiguities
|
|
31
|
+
Before writing specs, ask only questions that are unanswered in vision.md:
|
|
32
|
+
- What does success look like for the user? (measurable outcome, not a feature)
|
|
33
|
+
- What is explicitly OUT of scope for this phase?
|
|
34
|
+
- Are there known constraints? (tech stack lock-in, deadline, budget, team size)
|
|
35
|
+
- Any third-party integrations required?
|
|
36
|
+
|
|
37
|
+
Ask all questions at once. Do not ask one at a time.
|
|
38
|
+
Maximum 5 questions. Skip any already answered in vision.md.
|
|
39
|
+
|
|
40
|
+
## Step 3: Generate PRD
|
|
41
|
+
Write `.buildflow/specs/PRD.md`:
|
|
42
|
+
|
|
43
|
+
```markdown
|
|
44
|
+
# Product Requirements Document
|
|
45
|
+
**App:** [name] **Phase:** [N] **Date:** [today]
|
|
46
|
+
|
|
47
|
+
## Problem Statement
|
|
48
|
+
[One paragraph: what problem exists, who has it, why current solutions fail]
|
|
49
|
+
|
|
50
|
+
## Users
|
|
51
|
+
| User Type | Goal | Key Pain Point |
|
|
52
|
+
|-----------|------|----------------|
|
|
53
|
+
| [type] | [goal] | [pain] |
|
|
54
|
+
|
|
55
|
+
## Features — In Scope
|
|
56
|
+
| ID | Feature | Priority | Success Metric |
|
|
57
|
+
|----|---------|----------|----------------|
|
|
58
|
+
| F-01 | [name] | Must-have / Should-have / Nice-to-have | [measurable] |
|
|
59
|
+
|
|
60
|
+
## Out of Scope
|
|
61
|
+
- [what we are explicitly NOT building this phase]
|
|
62
|
+
|
|
63
|
+
## Constraints
|
|
64
|
+
- [tech, timeline, team, budget constraints]
|
|
65
|
+
|
|
66
|
+
## Success Criteria
|
|
67
|
+
Phase is complete when:
|
|
68
|
+
- [ ] [measurable outcome 1]
|
|
69
|
+
- [ ] [measurable outcome 2]
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Step 4: Generate Technical Design Doc
|
|
73
|
+
Write `.buildflow/specs/TDD.md`:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
# Technical Design Document
|
|
77
|
+
**App:** [name] **Phase:** [N] **Date:** [today]
|
|
78
|
+
|
|
79
|
+
## Architecture Overview
|
|
80
|
+
[Brief description of the system architecture]
|
|
81
|
+
|
|
82
|
+
## Components
|
|
83
|
+
| Component | Responsibility | Interface |
|
|
84
|
+
|-----------|---------------|-----------|
|
|
85
|
+
| [name] | [what it does] | [API / function / event] |
|
|
86
|
+
|
|
87
|
+
## Data Model
|
|
88
|
+
[Key entities and their relationships — use simple table or diagram]
|
|
89
|
+
|
|
90
|
+
## API Contracts
|
|
91
|
+
| Endpoint / Function | Input | Output | Auth Required |
|
|
92
|
+
|--------------------|-------|--------|---------------|
|
|
93
|
+
| [name] | [type] | [type] | yes/no |
|
|
94
|
+
|
|
95
|
+
## Technology Decisions
|
|
96
|
+
| Decision | Choice | Reason | Alternatives Rejected |
|
|
97
|
+
|----------|--------|--------|----------------------|
|
|
98
|
+
| [area] | [choice] | [why] | [what else was considered] |
|
|
99
|
+
|
|
100
|
+
## Known Risks
|
|
101
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
102
|
+
|------|-----------|--------|-----------|
|
|
103
|
+
| [risk] | low/med/high | low/med/high | [how to mitigate] |
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Step 5: Generate Acceptance Criteria
|
|
107
|
+
Write `.buildflow/specs/acceptance.md`:
|
|
108
|
+
|
|
109
|
+
Each AC must be:
|
|
110
|
+
- **Testable** — a human or automated test can verify it
|
|
111
|
+
- **Binary** — pass or fail, no partial credit
|
|
112
|
+
- **Specific** — no vague terms like "works correctly"
|
|
113
|
+
|
|
114
|
+
```markdown
|
|
115
|
+
# Acceptance Criteria
|
|
116
|
+
**App:** [name] **Phase:** [N] **Date:** [today]
|
|
117
|
+
|
|
118
|
+
## [Feature F-01 name]
|
|
119
|
+
- AC-001: Given [context], when [action], then [outcome]
|
|
120
|
+
- AC-002: Given [context], when [action], then [outcome]
|
|
121
|
+
|
|
122
|
+
## [Feature F-02 name]
|
|
123
|
+
- AC-003: Given [context], when [action], then [outcome]
|
|
124
|
+
|
|
125
|
+
## Non-Functional
|
|
126
|
+
- AC-NF-001: [performance/security/accessibility requirement]
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Step 6: Spec Review Gate
|
|
130
|
+
Show a summary of all three specs. Ask:
|
|
131
|
+
|
|
132
|
+
> "Do these specs accurately capture what you want to build? (yes / revise [area])"
|
|
133
|
+
|
|
134
|
+
- If yes: lock specs. Update `light.md`:
|
|
135
|
+
```yaml
|
|
136
|
+
spec_status: locked
|
|
137
|
+
spec_phase: [N]
|
|
138
|
+
ac_count: [N]
|
|
139
|
+
```
|
|
140
|
+
- If revise: ask what's wrong, update the relevant section, repeat Step 6.
|
|
141
|
+
|
|
142
|
+
Do not proceed until the user approves.
|
|
143
|
+
|
|
144
|
+
## Step 7: Next Step
|
|
145
|
+
"Specs locked. Run `/buildflow-plan` — the Architect will map tasks to your acceptance criteria."
|
|
146
|
+
|
|
147
|
+
## Token Budget: ~18K
|
|
@@ -9,31 +9,61 @@ agent: strategist
|
|
|
9
9
|
|
|
10
10
|
Begin your project. Works for both greenfield and existing codebases.
|
|
11
11
|
|
|
12
|
+
## Context Packet (load only these)
|
|
13
|
+
- `.buildflow/memory/light.md`
|
|
14
|
+
- `.buildflow/you/preferences.md`
|
|
15
|
+
|
|
16
|
+
Do NOT load: specs, phases, codebase files — this is vision only.
|
|
17
|
+
|
|
12
18
|
## Step 1: Load Memory
|
|
13
19
|
Read `.buildflow/memory/light.md` and `.buildflow/you/preferences.md`.
|
|
20
|
+
If `light.md` is over 3K tokens: prune it now (see pruning rules below).
|
|
14
21
|
|
|
15
22
|
## Step 2: Detect Mode
|
|
16
23
|
|
|
17
|
-
**Greenfield (no src/ code):**
|
|
24
|
+
**Greenfield (no src/ code yet):**
|
|
18
25
|
Ask vision questions one at a time:
|
|
19
26
|
1. What are you building?
|
|
20
27
|
2. Who is it for?
|
|
21
28
|
3. What problem does it solve?
|
|
22
29
|
4. What's the simplest useful version?
|
|
23
|
-
5. Timeline, team size,
|
|
30
|
+
5. Timeline, team size, constraints?
|
|
24
31
|
6. Confidence in the idea (1-5)?
|
|
25
32
|
|
|
26
33
|
**Existing codebase (src/ exists):**
|
|
27
34
|
Check if `.buildflow/codebase/MAP.md` exists.
|
|
28
|
-
- If NO: "Run
|
|
29
|
-
- If YES: Load MAP.md. Ask about goals for this
|
|
35
|
+
- If NO: "Run `/buildflow-onboard` first to analyze your codebase."
|
|
36
|
+
- If YES: Load MAP.md summary only (not full file). Ask about goals for this session.
|
|
30
37
|
|
|
31
38
|
## Step 3: Save Vision
|
|
32
|
-
Write to `.buildflow/core/vision.md
|
|
39
|
+
Write to `.buildflow/core/vision.md`.
|
|
40
|
+
Initialize `light.md` with:
|
|
41
|
+
```yaml
|
|
42
|
+
app_name: [name]
|
|
43
|
+
framework: [detected or stated]
|
|
44
|
+
language: [detected or stated]
|
|
45
|
+
phase: 0
|
|
46
|
+
spec_status: none
|
|
47
|
+
plan_status: none
|
|
48
|
+
onboard_status: [yes/no]
|
|
49
|
+
last_session: [today]
|
|
50
|
+
```
|
|
33
51
|
|
|
34
52
|
## Step 4: Recommend Next Step
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
53
|
+
|
|
54
|
+
| Situation | Next command |
|
|
55
|
+
|-----------|-------------|
|
|
56
|
+
| Greenfield, confidence 4–5 | `/buildflow-spec` — define what to build formally |
|
|
57
|
+
| Greenfield, confidence 1–3 | `/buildflow-think [topic]` — research first |
|
|
58
|
+
| Existing project, not onboarded | `/buildflow-onboard` — map codebase first |
|
|
59
|
+
| Existing project, onboarded | `/buildflow-spec` or `/buildflow-modify` |
|
|
60
|
+
| Emergency fix needed | `/buildflow-hotfix "description"` |
|
|
61
|
+
|
|
62
|
+
## light.md Pruning Rules
|
|
63
|
+
If `light.md` exceeds 3K tokens on session start:
|
|
64
|
+
- Remove: completed phase task lists, wave details, build timestamps older than last phase
|
|
65
|
+
- Archive these to the most recent `phases/[N]/retro.md`
|
|
66
|
+
- Keep: app_name, framework, language, current_phase, spec_status, style_fingerprint, last 2 decisions
|
|
67
|
+
- After pruning: report "Context pruned: light.md reduced from [X] → [Y] tokens"
|
|
38
68
|
|
|
39
69
|
## Token Budget: ~8K
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: buildflow-test
|
|
3
|
+
description: Run tests, verify UI flow, and auto-fix failures until all pass
|
|
4
|
+
allowed-tools: Read, Write, Bash, Grep, Glob
|
|
5
|
+
agent: reviewer
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /buildflow-test
|
|
9
|
+
|
|
10
|
+
Standalone test + fix loop. Runs the test suite, checks UI flow and functionality, and automatically fixes failures — repeats until everything passes or the fix limit is reached.
|
|
11
|
+
|
|
12
|
+
Use this when:
|
|
13
|
+
- You want to re-verify a wave that was already built
|
|
14
|
+
- You made a manual code change and want to test it
|
|
15
|
+
- `/buildflow-build` stopped and you want to resume testing from where it left off
|
|
16
|
+
|
|
17
|
+
For automated testing during builds, this loop is already built into `/buildflow-build` — you don't need to run `/buildflow-test` separately after each wave unless you want to re-check.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
- `/buildflow-test` — test current wave/phase output
|
|
21
|
+
- `/buildflow-test wave-2` — test a specific wave
|
|
22
|
+
- `/buildflow-test ui` — focus on UI alignment and flow only
|
|
23
|
+
- `/buildflow-test --full` — run full suite including integration and e2e
|
|
24
|
+
|
|
25
|
+
## Step 1: Load Context
|
|
26
|
+
Read `.buildflow/phases/[N]/PLAN.md` to know what this wave was supposed to deliver.
|
|
27
|
+
Read `.buildflow/memory/light.md` for framework and test setup.
|
|
28
|
+
|
|
29
|
+
## Step 2: Detect Test Setup
|
|
30
|
+
Identify:
|
|
31
|
+
- Test framework (Jest, Vitest, Pytest, Go test, Cargo, etc.)
|
|
32
|
+
- Test command (`npm test`, `pytest`, `go test ./...`, etc.)
|
|
33
|
+
- E2E framework if present (Playwright, Cypress, etc.)
|
|
34
|
+
- Dev server command if UI is involved
|
|
35
|
+
|
|
36
|
+
## Step 3: Run Tests
|
|
37
|
+
```bash
|
|
38
|
+
npm test # or pytest / go test etc.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Also check:
|
|
42
|
+
- If frontend code changed: start dev server, verify UI renders and flows work, no console errors
|
|
43
|
+
- No import errors or missing modules
|
|
44
|
+
- Previously passing tests still pass (no regressions)
|
|
45
|
+
|
|
46
|
+
## Step 4: Fix Loop (runs automatically on failure)
|
|
47
|
+
|
|
48
|
+
If any test fails:
|
|
49
|
+
1. Identify root cause (trace error → file → line → why)
|
|
50
|
+
2. Apply minimal fix — only change what broke, do not refactor surrounding code
|
|
51
|
+
3. Re-run the full test suite
|
|
52
|
+
4. Repeat until all tests pass
|
|
53
|
+
|
|
54
|
+
Maximum fix attempts: 5.
|
|
55
|
+
If still failing after 5 attempts: stop, report what's unresolved, and ask the user how to proceed.
|
|
56
|
+
|
|
57
|
+
Fix attempt log format:
|
|
58
|
+
```
|
|
59
|
+
Fix attempt [X]/5
|
|
60
|
+
Error: [error message]
|
|
61
|
+
Root cause: [explanation]
|
|
62
|
+
Fix applied: [what changed]
|
|
63
|
+
Result: [pass / still failing]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Step 5: Report
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Test Results
|
|
70
|
+
────────────
|
|
71
|
+
✓ PASS Tests: 24/24 passing
|
|
72
|
+
✓ PASS Functional: signup flow works end-to-end
|
|
73
|
+
✓ PASS UI: form renders correctly, validation messages shown
|
|
74
|
+
⚠ WARN No test for empty email edge case (non-blocking)
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Step 6: Decision
|
|
78
|
+
- All pass: "Ready to continue to next wave or /buildflow-ship."
|
|
79
|
+
- Warnings only: "Non-blocking. Proceed or address first — your call."
|
|
80
|
+
- Unresolved after 5 attempts: "Manual intervention needed. Use /buildflow-debug for deeper analysis."
|
|
81
|
+
|
|
82
|
+
## Token Budget: ~25K (more if fix loop runs multiple iterations)
|