gsd-opencode 1.20.4 → 1.22.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/agents/gsd-codebase-mapper.md +9 -1
- package/agents/gsd-debugger.md +66 -10
- package/agents/gsd-executor.md +36 -16
- package/agents/gsd-integration-checker.md +2 -0
- package/agents/gsd-nyquist-auditor.md +178 -0
- package/agents/gsd-phase-researcher.md +28 -34
- package/agents/gsd-plan-checker.md +42 -78
- package/agents/gsd-planner.md +139 -24
- package/agents/gsd-project-researcher.md +11 -1
- package/agents/gsd-research-synthesizer.md +13 -3
- package/agents/gsd-roadmapper.md +25 -15
- package/agents/gsd-verifier.md +29 -6
- package/bin/dm/lib/constants.js +6 -1
- package/bin/dm/src/services/file-ops.js +14 -1
- package/commands/gsd/gsd-add-phase.md +6 -6
- package/commands/gsd/gsd-add-tests.md +41 -0
- package/commands/gsd/gsd-add-todo.md +7 -7
- package/commands/gsd/gsd-audit-milestone.md +9 -9
- package/commands/gsd/gsd-check-profile.md +3 -3
- package/commands/gsd/gsd-check-todos.md +7 -7
- package/commands/gsd/gsd-cleanup.md +2 -2
- package/commands/gsd/gsd-complete-milestone.md +6 -6
- package/commands/gsd/gsd-debug.md +11 -7
- package/commands/gsd/gsd-discuss-phase.md +26 -19
- package/commands/gsd/gsd-execute-phase.md +13 -13
- package/commands/gsd/gsd-health.md +7 -7
- package/commands/gsd/gsd-help.md +2 -2
- package/commands/gsd/gsd-insert-phase.md +6 -6
- package/commands/gsd/gsd-join-discord.md +1 -1
- package/commands/gsd/gsd-list-phase-assumptions.md +6 -6
- package/commands/gsd/gsd-map-codebase.md +8 -8
- package/commands/gsd/gsd-new-milestone.md +12 -12
- package/commands/gsd/gsd-new-project.md +12 -12
- package/commands/gsd/gsd-pause-work.md +6 -6
- package/commands/gsd/gsd-plan-milestone-gaps.md +9 -9
- package/commands/gsd/gsd-plan-phase.md +14 -13
- package/commands/gsd/gsd-progress.md +8 -8
- package/commands/gsd/gsd-quick.md +17 -13
- package/commands/gsd/gsd-reapply-patches.md +19 -11
- package/commands/gsd/gsd-remove-phase.md +7 -7
- package/commands/gsd/gsd-research-phase.md +12 -11
- package/commands/gsd/gsd-resume-work.md +8 -8
- package/commands/gsd/gsd-set-profile.md +6 -6
- package/commands/gsd/gsd-settings.md +7 -7
- package/commands/gsd/gsd-update.md +5 -5
- package/commands/gsd/gsd-validate-phase.md +35 -0
- package/commands/gsd/gsd-verify-work.md +11 -11
- package/get-shit-done/bin/gsd-tools.cjs +45 -6
- package/get-shit-done/bin/lib/commands.cjs +11 -19
- package/get-shit-done/bin/lib/config.cjs +8 -1
- package/get-shit-done/bin/lib/core.cjs +131 -16
- package/get-shit-done/bin/lib/init.cjs +28 -12
- package/get-shit-done/bin/lib/milestone.cjs +34 -8
- package/get-shit-done/bin/lib/phase.cjs +74 -50
- package/get-shit-done/bin/lib/roadmap.cjs +7 -7
- package/get-shit-done/bin/lib/state.cjs +294 -63
- package/get-shit-done/bin/lib/template.cjs +3 -3
- package/get-shit-done/bin/lib/verify.cjs +56 -8
- package/get-shit-done/references/checkpoints.md +1 -1
- package/get-shit-done/references/decimal-phase-calculation.md +6 -6
- package/get-shit-done/references/git-integration.md +3 -3
- package/get-shit-done/references/git-planning-commit.md +2 -2
- package/get-shit-done/references/model-profile-resolution.md +1 -1
- package/get-shit-done/references/model-profiles.md +1 -0
- package/get-shit-done/references/phase-argument-parsing.md +4 -4
- package/get-shit-done/references/planning-config.md +10 -6
- package/get-shit-done/references/questioning.md +17 -0
- package/get-shit-done/references/verification-patterns.md +1 -1
- package/get-shit-done/templates/DEBUG.md +7 -2
- package/get-shit-done/templates/VALIDATION.md +18 -46
- package/get-shit-done/templates/codebase/structure.md +3 -3
- package/get-shit-done/templates/config.json +2 -2
- package/get-shit-done/templates/context.md +14 -0
- package/get-shit-done/templates/phase-prompt.md +10 -10
- package/get-shit-done/templates/retrospective.md +54 -0
- package/get-shit-done/templates/roadmap.md +1 -1
- package/get-shit-done/workflows/add-phase.md +3 -2
- package/get-shit-done/workflows/add-tests.md +351 -0
- package/get-shit-done/workflows/add-todo.md +4 -3
- package/get-shit-done/workflows/audit-milestone.md +40 -5
- package/get-shit-done/workflows/check-todos.md +3 -2
- package/get-shit-done/workflows/cleanup.md +1 -1
- package/get-shit-done/workflows/complete-milestone.md +69 -5
- package/get-shit-done/workflows/diagnose-issues.md +2 -2
- package/get-shit-done/workflows/discovery-phase.md +6 -6
- package/get-shit-done/workflows/discuss-phase.md +194 -58
- package/get-shit-done/workflows/execute-phase.md +29 -23
- package/get-shit-done/workflows/execute-plan.md +22 -18
- package/get-shit-done/workflows/health.md +5 -2
- package/get-shit-done/workflows/help.md +4 -1
- package/get-shit-done/workflows/insert-phase.md +3 -2
- package/get-shit-done/workflows/map-codebase.md +3 -2
- package/get-shit-done/workflows/new-milestone.md +12 -10
- package/get-shit-done/workflows/new-project.md +44 -49
- package/get-shit-done/workflows/pause-work.md +2 -2
- package/get-shit-done/workflows/plan-milestone-gaps.md +3 -3
- package/get-shit-done/workflows/plan-phase.md +155 -73
- package/get-shit-done/workflows/progress.md +8 -7
- package/get-shit-done/workflows/quick.md +158 -10
- package/get-shit-done/workflows/remove-phase.md +5 -4
- package/get-shit-done/workflows/research-phase.md +5 -4
- package/get-shit-done/workflows/resume-project.md +3 -2
- package/get-shit-done/workflows/set-profile.md +3 -2
- package/get-shit-done/workflows/settings.md +6 -6
- package/get-shit-done/workflows/transition.md +5 -5
- package/get-shit-done/workflows/update.md +45 -19
- package/get-shit-done/workflows/validate-phase.md +167 -0
- package/get-shit-done/workflows/verify-phase.md +10 -9
- package/get-shit-done/workflows/verify-work.md +18 -4
- package/package.json +1 -1
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Project Retrospective
|
|
2
|
+
|
|
3
|
+
*A living document updated after each milestone. Lessons feed forward into future planning.*
|
|
4
|
+
|
|
5
|
+
## Milestone: v{version} — {name}
|
|
6
|
+
|
|
7
|
+
**Shipped:** {date}
|
|
8
|
+
**Phases:** {count} | **Plans:** {count} | **Sessions:** {count}
|
|
9
|
+
|
|
10
|
+
### What Was Built
|
|
11
|
+
- {Key deliverable 1}
|
|
12
|
+
- {Key deliverable 2}
|
|
13
|
+
- {Key deliverable 3}
|
|
14
|
+
|
|
15
|
+
### What Worked
|
|
16
|
+
- {Efficiency win or successful pattern}
|
|
17
|
+
- {What went smoothly}
|
|
18
|
+
|
|
19
|
+
### What Was Inefficient
|
|
20
|
+
- {Missed opportunity}
|
|
21
|
+
- {What took longer than expected}
|
|
22
|
+
|
|
23
|
+
### Patterns Established
|
|
24
|
+
- {New pattern or convention that should persist}
|
|
25
|
+
|
|
26
|
+
### Key Lessons
|
|
27
|
+
1. {Specific, actionable lesson}
|
|
28
|
+
2. {Another lesson}
|
|
29
|
+
|
|
30
|
+
### Cost Observations
|
|
31
|
+
- Model mix: {X}% opus, {Y}% sonnet, {Z}% haiku
|
|
32
|
+
- Sessions: {count}
|
|
33
|
+
- Notable: {efficiency observation}
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Cross-Milestone Trends
|
|
38
|
+
|
|
39
|
+
### Process Evolution
|
|
40
|
+
|
|
41
|
+
| Milestone | Sessions | Phases | Key Change |
|
|
42
|
+
|-----------|----------|--------|------------|
|
|
43
|
+
| v{X} | {N} | {M} | {What changed in process} |
|
|
44
|
+
|
|
45
|
+
### Cumulative Quality
|
|
46
|
+
|
|
47
|
+
| Milestone | Tests | Coverage | Zero-Dep Additions |
|
|
48
|
+
|-----------|-------|----------|-------------------|
|
|
49
|
+
| v{X} | {N} | {Y}% | {count} |
|
|
50
|
+
|
|
51
|
+
### Top Lessons (Verified Across Milestones)
|
|
52
|
+
|
|
53
|
+
1. {Lesson verified by multiple milestones}
|
|
54
|
+
2. {Another cross-validated lesson}
|
|
@@ -105,7 +105,7 @@ Phases execute in numeric order: 2 → 2.1 → 2.2 → 3 → 3.1 → 4
|
|
|
105
105
|
|
|
106
106
|
<guidelines>
|
|
107
107
|
**Initial planning (v1.0):**
|
|
108
|
-
- Phase count depends on
|
|
108
|
+
- Phase count depends on granularity setting (coarse: 3-5, standard: 5-8, fine: 8-12)
|
|
109
109
|
- Each phase delivers something coherent
|
|
110
110
|
- Phases can have 1+ plans (split if >3 tasks or multiple subsystems)
|
|
111
111
|
- Plans use naming: {phase}-{plan}-PLAN.md (e.g., 01-02-PLAN.md)
|
|
@@ -29,7 +29,8 @@ Exit.
|
|
|
29
29
|
Load phase operation context:
|
|
30
30
|
|
|
31
31
|
```bash
|
|
32
|
-
INIT=$(node
|
|
32
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "0")
|
|
33
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
33
34
|
```
|
|
34
35
|
|
|
35
36
|
Check `roadmap_exists` from init JSON. If false:
|
|
@@ -44,7 +45,7 @@ Exit.
|
|
|
44
45
|
**Delegate the phase addition to gsd-tools:**
|
|
45
46
|
|
|
46
47
|
```bash
|
|
47
|
-
RESULT=$(node
|
|
48
|
+
RESULT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" phase add "${description}")
|
|
48
49
|
```
|
|
49
50
|
|
|
50
51
|
The CLI handles:
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Generate unit and E2E tests for a completed phase based on its SUMMARY.md, CONTEXT.md, and implementation. Classifies each changed file into TDD (unit), E2E (browser), or Skip categories, presents a test plan for user approval, then generates tests following RED-GREEN conventions.
|
|
3
|
+
|
|
4
|
+
Users currently hand-craft `/gsd-quick` prompts for test generation after each phase. This workflow standardizes the process with proper classification, quality gates, and gap reporting.
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<required_reading>
|
|
8
|
+
read all files referenced by the invoking prompt's execution_context before starting.
|
|
9
|
+
</required_reading>
|
|
10
|
+
|
|
11
|
+
<process>
|
|
12
|
+
|
|
13
|
+
<step name="parse_arguments">
|
|
14
|
+
Parse `$ARGUMENTS` for:
|
|
15
|
+
- Phase number (integer, decimal, or letter-suffix) → store as `$PHASE_ARG`
|
|
16
|
+
- Remaining text after phase number → store as `$EXTRA_INSTRUCTIONS` (optional)
|
|
17
|
+
|
|
18
|
+
Example: `/gsd-add-tests 12 focus on edge cases` → `$PHASE_ARG=12`, `$EXTRA_INSTRUCTIONS="focus on edge cases"`
|
|
19
|
+
|
|
20
|
+
If no phase argument provided:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
ERROR: Phase number required
|
|
24
|
+
Usage: /gsd-add-tests <phase> [additional instructions]
|
|
25
|
+
Example: /gsd-add-tests 12
|
|
26
|
+
Example: /gsd-add-tests 12 focus on edge cases in the pricing module
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Exit.
|
|
30
|
+
</step>
|
|
31
|
+
|
|
32
|
+
<step name="init_context">
|
|
33
|
+
Load phase operation context:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init phase-op "${PHASE_ARG}")
|
|
37
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Extract from init JSON: `phase_dir`, `phase_number`, `phase_name`.
|
|
41
|
+
|
|
42
|
+
Verify the phase directory exists. If not:
|
|
43
|
+
```
|
|
44
|
+
ERROR: Phase directory not found for phase ${PHASE_ARG}
|
|
45
|
+
Ensure the phase exists in .planning/phases/
|
|
46
|
+
```
|
|
47
|
+
Exit.
|
|
48
|
+
|
|
49
|
+
read the phase artifacts (in order of priority):
|
|
50
|
+
1. `${phase_dir}/*-SUMMARY.md` — what was implemented, files changed
|
|
51
|
+
2. `${phase_dir}/CONTEXT.md` — acceptance criteria, decisions
|
|
52
|
+
3. `${phase_dir}/*-VERIFICATION.md` — user-verified scenarios (if UAT was done)
|
|
53
|
+
|
|
54
|
+
If no SUMMARY.md exists:
|
|
55
|
+
```
|
|
56
|
+
ERROR: No SUMMARY.md found for phase ${PHASE_ARG}
|
|
57
|
+
This command works on completed phases. Run /gsd-execute-phase first.
|
|
58
|
+
```
|
|
59
|
+
Exit.
|
|
60
|
+
|
|
61
|
+
Present banner:
|
|
62
|
+
```
|
|
63
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
64
|
+
GSD ► ADD TESTS — Phase ${phase_number}: ${phase_name}
|
|
65
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
66
|
+
```
|
|
67
|
+
</step>
|
|
68
|
+
|
|
69
|
+
<step name="analyze_implementation">
|
|
70
|
+
Extract the list of files modified by the phase from SUMMARY.md ("Files Changed" or equivalent section).
|
|
71
|
+
|
|
72
|
+
For each file, classify into one of three categories:
|
|
73
|
+
|
|
74
|
+
| Category | Criteria | Test Type |
|
|
75
|
+
|----------|----------|-----------|
|
|
76
|
+
| **TDD** | Pure functions where `expect(fn(input)).toBe(output)` is writable | Unit tests |
|
|
77
|
+
| **E2E** | UI behavior verifiable by browser automation | Playwright/E2E tests |
|
|
78
|
+
| **Skip** | Not meaningfully testable or already covered | None |
|
|
79
|
+
|
|
80
|
+
**TDD classification — apply when:**
|
|
81
|
+
- Business logic: calculations, pricing, tax rules, validation
|
|
82
|
+
- Data transformations: mapping, filtering, aggregation, formatting
|
|
83
|
+
- Parsers: CSV, JSON, XML, custom format parsing
|
|
84
|
+
- Validators: input validation, schema validation, business rules
|
|
85
|
+
- State machines: status transitions, workflow steps
|
|
86
|
+
- Utilities: string manipulation, date handling, number formatting
|
|
87
|
+
|
|
88
|
+
**E2E classification — apply when:**
|
|
89
|
+
- Keyboard shortcuts: key bindings, modifier keys, chord sequences
|
|
90
|
+
- Navigation: page transitions, routing, breadcrumbs, back/forward
|
|
91
|
+
- Form interactions: submit, validation errors, field focus, autocomplete
|
|
92
|
+
- Selection: row selection, multi-select, shift-click ranges
|
|
93
|
+
- Drag and drop: reordering, moving between containers
|
|
94
|
+
- Modal dialogs: open, close, confirm, cancel
|
|
95
|
+
- Data grids: sorting, filtering, inline editing, column resize
|
|
96
|
+
|
|
97
|
+
**Skip classification — apply when:**
|
|
98
|
+
- UI layout/styling: CSS classes, visual appearance, responsive breakpoints
|
|
99
|
+
- Configuration: config files, environment variables, feature flags
|
|
100
|
+
- Glue code: dependency injection setup, middleware registration, routing tables
|
|
101
|
+
- Migrations: database migrations, schema changes
|
|
102
|
+
- Simple CRUD: basic create/read/update/delete with no business logic
|
|
103
|
+
- Type definitions: records, DTOs, interfaces with no logic
|
|
104
|
+
|
|
105
|
+
read each file to verify classification. Don't classify based on filename alone.
|
|
106
|
+
</step>
|
|
107
|
+
|
|
108
|
+
<step name="present_classification">
|
|
109
|
+
Present the classification to the user for confirmation before proceeding:
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
question(
|
|
113
|
+
header: "Test Classification",
|
|
114
|
+
question: |
|
|
115
|
+
## Files classified for testing
|
|
116
|
+
|
|
117
|
+
### TDD (Unit Tests) — {N} files
|
|
118
|
+
{list of files with brief reason}
|
|
119
|
+
|
|
120
|
+
### E2E (Browser Tests) — {M} files
|
|
121
|
+
{list of files with brief reason}
|
|
122
|
+
|
|
123
|
+
### Skip — {K} files
|
|
124
|
+
{list of files with brief reason}
|
|
125
|
+
|
|
126
|
+
{if $EXTRA_INSTRUCTIONS: "Additional instructions: ${EXTRA_INSTRUCTIONS}"}
|
|
127
|
+
|
|
128
|
+
How would you like to proceed?
|
|
129
|
+
options:
|
|
130
|
+
- "Approve and generate test plan"
|
|
131
|
+
- "Adjust classification (I'll specify changes)"
|
|
132
|
+
- "Cancel"
|
|
133
|
+
)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
If user selects "Adjust classification": apply their changes and re-present.
|
|
137
|
+
If user selects "Cancel": exit gracefully.
|
|
138
|
+
</step>
|
|
139
|
+
|
|
140
|
+
<step name="discover_test_structure">
|
|
141
|
+
Before generating the test plan, discover the project's existing test structure:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
# Find existing test directories
|
|
145
|
+
find . -type d -name "*test*" -o -name "*spec*" -o -name "*__tests__*" 2>/dev/null | head -20
|
|
146
|
+
# Find existing test files for convention matching
|
|
147
|
+
find . -type f \( -name "*.test.*" -o -name "*.spec.*" -o -name "*Tests.fs" -o -name "*Test.fs" \) 2>/dev/null | head -20
|
|
148
|
+
# Check for test runners
|
|
149
|
+
ls package.json *.sln 2>/dev/null
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Identify:
|
|
153
|
+
- Test directory structure (where unit tests live, where E2E tests live)
|
|
154
|
+
- Naming conventions (`.test.ts`, `.spec.ts`, `*Tests.fs`, etc.)
|
|
155
|
+
- Test runner commands (how to execute unit tests, how to execute E2E tests)
|
|
156
|
+
- Test framework (xUnit, NUnit, Jest, Playwright, etc.)
|
|
157
|
+
|
|
158
|
+
If test structure is ambiguous, ask the user:
|
|
159
|
+
```
|
|
160
|
+
question(
|
|
161
|
+
header: "Test Structure",
|
|
162
|
+
question: "I found multiple test locations. Where should I create tests?",
|
|
163
|
+
options: [list discovered locations]
|
|
164
|
+
)
|
|
165
|
+
```
|
|
166
|
+
</step>
|
|
167
|
+
|
|
168
|
+
<step name="generate_test_plan">
|
|
169
|
+
For each approved file, create a detailed test plan.
|
|
170
|
+
|
|
171
|
+
**For TDD files**, plan tests following RED-GREEN-REFACTOR:
|
|
172
|
+
1. Identify testable functions/methods in the file
|
|
173
|
+
2. For each function: list input scenarios, expected outputs, edge cases
|
|
174
|
+
3. Note: since code already exists, tests may pass immediately — that's OK, but verify they test the RIGHT behavior
|
|
175
|
+
|
|
176
|
+
**For E2E files**, plan tests following RED-GREEN gates:
|
|
177
|
+
1. Identify user scenarios from CONTEXT.md/VERIFICATION.md
|
|
178
|
+
2. For each scenario: describe the user action, expected outcome, assertions
|
|
179
|
+
3. Note: RED gate means confirming the test would fail if the feature were broken
|
|
180
|
+
|
|
181
|
+
Present the complete test plan:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
question(
|
|
185
|
+
header: "Test Plan",
|
|
186
|
+
question: |
|
|
187
|
+
## Test Generation Plan
|
|
188
|
+
|
|
189
|
+
### Unit Tests ({N} tests across {M} files)
|
|
190
|
+
{for each file: test file path, list of test cases}
|
|
191
|
+
|
|
192
|
+
### E2E Tests ({P} tests across {Q} files)
|
|
193
|
+
{for each file: test file path, list of test scenarios}
|
|
194
|
+
|
|
195
|
+
### Test Commands
|
|
196
|
+
- Unit: {discovered test command}
|
|
197
|
+
- E2E: {discovered e2e command}
|
|
198
|
+
|
|
199
|
+
Ready to generate?
|
|
200
|
+
options:
|
|
201
|
+
- "Generate all"
|
|
202
|
+
- "Cherry-pick (I'll specify which)"
|
|
203
|
+
- "Adjust plan"
|
|
204
|
+
)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
If "Cherry-pick": ask user which tests to include.
|
|
208
|
+
If "Adjust plan": apply changes and re-present.
|
|
209
|
+
</step>
|
|
210
|
+
|
|
211
|
+
<step name="execute_tdd_generation">
|
|
212
|
+
For each approved TDD test:
|
|
213
|
+
|
|
214
|
+
1. **Create test file** following discovered project conventions (directory, naming, imports)
|
|
215
|
+
|
|
216
|
+
2. **write test** with clear arrange/act/assert structure:
|
|
217
|
+
```
|
|
218
|
+
// Arrange — set up inputs and expected outputs
|
|
219
|
+
// Act — call the function under test
|
|
220
|
+
// Assert — verify the output matches expectations
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
3. **Run the test**:
|
|
224
|
+
```bash
|
|
225
|
+
{discovered test command}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
4. **Evaluate result:**
|
|
229
|
+
- **Test passes**: Good — the implementation satisfies the test. Verify the test checks meaningful behavior (not just that it compiles).
|
|
230
|
+
- **Test fails with assertion error**: This may be a genuine bug discovered by the test. Flag it:
|
|
231
|
+
```
|
|
232
|
+
⚠️ Potential bug found: {test name}
|
|
233
|
+
Expected: {expected}
|
|
234
|
+
Actual: {actual}
|
|
235
|
+
File: {implementation file}
|
|
236
|
+
```
|
|
237
|
+
Do NOT fix the implementation — this is a test-generation command, not a fix command. Record the finding.
|
|
238
|
+
- **Test fails with error (import, syntax, etc.)**: This is a test error. Fix the test and re-run.
|
|
239
|
+
</step>
|
|
240
|
+
|
|
241
|
+
<step name="execute_e2e_generation">
|
|
242
|
+
For each approved E2E test:
|
|
243
|
+
|
|
244
|
+
1. **Check for existing tests** covering the same scenario:
|
|
245
|
+
```bash
|
|
246
|
+
grep -r "{scenario keyword}" {e2e test directory} 2>/dev/null
|
|
247
|
+
```
|
|
248
|
+
If found, extend rather than duplicate.
|
|
249
|
+
|
|
250
|
+
2. **Create test file** targeting the user scenario from CONTEXT.md/VERIFICATION.md
|
|
251
|
+
|
|
252
|
+
3. **Run the E2E test**:
|
|
253
|
+
```bash
|
|
254
|
+
{discovered e2e command}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
4. **Evaluate result:**
|
|
258
|
+
- **GREEN (passes)**: Record success
|
|
259
|
+
- **RED (fails)**: Determine if it's a test issue or a genuine application bug. Flag bugs:
|
|
260
|
+
```
|
|
261
|
+
⚠️ E2E failure: {test name}
|
|
262
|
+
Scenario: {description}
|
|
263
|
+
Error: {error message}
|
|
264
|
+
```
|
|
265
|
+
- **Cannot run**: Report blocker. Do NOT mark as complete.
|
|
266
|
+
```
|
|
267
|
+
🛑 E2E blocker: {reason tests cannot run}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
**No-skip rule:** If E2E tests cannot execute (missing dependencies, environment issues), report the blocker and mark the test as incomplete. Never mark success without actually running the test.
|
|
271
|
+
</step>
|
|
272
|
+
|
|
273
|
+
<step name="summary_and_commit">
|
|
274
|
+
Create a test coverage report and present to user:
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
278
|
+
GSD ► TEST GENERATION COMPLETE
|
|
279
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
280
|
+
|
|
281
|
+
## Results
|
|
282
|
+
|
|
283
|
+
| Category | Generated | Passing | Failing | Blocked |
|
|
284
|
+
|----------|-----------|---------|---------|---------|
|
|
285
|
+
| Unit | {N} | {n1} | {n2} | {n3} |
|
|
286
|
+
| E2E | {M} | {m1} | {m2} | {m3} |
|
|
287
|
+
|
|
288
|
+
## Files Created/Modified
|
|
289
|
+
{list of test files with paths}
|
|
290
|
+
|
|
291
|
+
## Coverage Gaps
|
|
292
|
+
{areas that couldn't be tested and why}
|
|
293
|
+
|
|
294
|
+
## Bugs Discovered
|
|
295
|
+
{any assertion failures that indicate implementation bugs}
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Record test generation in project state:
|
|
299
|
+
```bash
|
|
300
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" state-snapshot
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
If there are passing tests to commit:
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
git add {test files}
|
|
307
|
+
git commit -m "test(phase-${phase_number}): add unit and E2E tests from add-tests command"
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
Present next steps:
|
|
311
|
+
|
|
312
|
+
```
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## ▶ Next Up
|
|
316
|
+
|
|
317
|
+
{if bugs discovered:}
|
|
318
|
+
**Fix discovered bugs:** `/gsd-quick fix the {N} test failures discovered in phase ${phase_number}`
|
|
319
|
+
|
|
320
|
+
{if blocked tests:}
|
|
321
|
+
**Resolve test blockers:** {description of what's needed}
|
|
322
|
+
|
|
323
|
+
{otherwise:}
|
|
324
|
+
**All tests passing!** Phase ${phase_number} is fully tested.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
**Also available:**
|
|
329
|
+
- `/gsd-add-tests {next_phase}` — test another phase
|
|
330
|
+
- `/gsd-verify-work {phase_number}` — run UAT verification
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
```
|
|
334
|
+
</step>
|
|
335
|
+
|
|
336
|
+
</process>
|
|
337
|
+
|
|
338
|
+
<success_criteria>
|
|
339
|
+
- [ ] Phase artifacts loaded (SUMMARY.md, CONTEXT.md, optionally VERIFICATION.md)
|
|
340
|
+
- [ ] All changed files classified into TDD/E2E/Skip categories
|
|
341
|
+
- [ ] Classification presented to user and approved
|
|
342
|
+
- [ ] Project test structure discovered (directories, conventions, runners)
|
|
343
|
+
- [ ] Test plan presented to user and approved
|
|
344
|
+
- [ ] TDD tests generated with arrange/act/assert structure
|
|
345
|
+
- [ ] E2E tests generated targeting user scenarios
|
|
346
|
+
- [ ] All tests executed — no untested tests marked as passing
|
|
347
|
+
- [ ] Bugs discovered by tests flagged (not fixed)
|
|
348
|
+
- [ ] Test files committed with proper message
|
|
349
|
+
- [ ] Coverage gaps documented
|
|
350
|
+
- [ ] Next steps presented to user
|
|
351
|
+
</success_criteria>
|
|
@@ -12,7 +12,8 @@ read all files referenced by the invoking prompt's execution_context before star
|
|
|
12
12
|
Load todo context:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
INIT=$(node
|
|
15
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init todos)
|
|
16
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
16
17
|
```
|
|
17
18
|
|
|
18
19
|
Extract from init JSON: `commit_docs`, `date`, `timestamp`, `todo_count`, `todos`, `pending_dir`, `todos_dir_exists`.
|
|
@@ -83,7 +84,7 @@ Use values from init context: `timestamp` and `date` are already available.
|
|
|
83
84
|
|
|
84
85
|
Generate slug for the title:
|
|
85
86
|
```bash
|
|
86
|
-
slug=$(node
|
|
87
|
+
slug=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" generate-slug "$title" --raw)
|
|
87
88
|
```
|
|
88
89
|
|
|
89
90
|
write to `.planning/todos/pending/${date}-${slug}.md`:
|
|
@@ -118,7 +119,7 @@ If `.planning/STATE.md` exists:
|
|
|
118
119
|
Commit the todo and any updated state:
|
|
119
120
|
|
|
120
121
|
```bash
|
|
121
|
-
node
|
|
122
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: capture todo - [title]" --files .planning/todos/pending/[filename] .planning/STATE.md
|
|
122
123
|
```
|
|
123
124
|
|
|
124
125
|
Tool respects `commit_docs` config and gitignore automatically.
|
|
@@ -11,21 +11,22 @@ read all files referenced by the invoking prompt's execution_context before star
|
|
|
11
11
|
## 0. Initialize Milestone Context
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
INIT=$(node
|
|
14
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init milestone-op)
|
|
15
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
15
16
|
```
|
|
16
17
|
|
|
17
18
|
Extract from init JSON: `milestone_version`, `milestone_name`, `phase_count`, `completed_phases`, `commit_docs`.
|
|
18
19
|
|
|
19
20
|
Resolve integration checker model:
|
|
20
21
|
```bash
|
|
21
|
-
|
|
22
|
+
integration_checker_model=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" resolve-model gsd-integration-checker --raw)
|
|
22
23
|
```
|
|
23
24
|
|
|
24
25
|
## 1. Determine Milestone Scope
|
|
25
26
|
|
|
26
27
|
```bash
|
|
27
28
|
# Get phases in milestone (sorted numerically, handles decimals)
|
|
28
|
-
node
|
|
29
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" phases list
|
|
29
30
|
```
|
|
30
31
|
|
|
31
32
|
- Parse version from arguments or detect current from ROADMAP.md
|
|
@@ -39,7 +40,7 @@ For each phase directory, read the VERIFICATION.md:
|
|
|
39
40
|
|
|
40
41
|
```bash
|
|
41
42
|
# For each phase, use find-phase to resolve the directory (handles archived phases)
|
|
42
|
-
PHASE_INFO=$(node
|
|
43
|
+
PHASE_INFO=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" find-phase 01 --raw)
|
|
43
44
|
# Extract directory from JSON, then read VERIFICATION.md from that directory
|
|
44
45
|
# Repeat for each phase number from ROADMAP.md
|
|
45
46
|
```
|
|
@@ -104,7 +105,7 @@ For each phase's VERIFICATION.md, extract the expanded requirements table:
|
|
|
104
105
|
For each phase's SUMMARY.md, extract `requirements-completed` from YAML frontmatter:
|
|
105
106
|
```bash
|
|
106
107
|
for summary in .planning/phases/*-*/*-SUMMARY.md; do
|
|
107
|
-
node
|
|
108
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" summary-extract "$summary" --fields requirements_completed | jq -r '.requirements_completed'
|
|
108
109
|
done
|
|
109
110
|
```
|
|
110
111
|
|
|
@@ -127,6 +128,30 @@ For each REQ-ID, determine status using all three sources:
|
|
|
127
128
|
|
|
128
129
|
**Orphan detection:** Requirements present in REQUIREMENTS.md traceability table but absent from ALL phase VERIFICATION.md files MUST be flagged as orphaned. Orphaned requirements are treated as `unsatisfied` — they were assigned but never verified by any phase.
|
|
129
130
|
|
|
131
|
+
## 5.5. Nyquist Compliance Discovery
|
|
132
|
+
|
|
133
|
+
Skip if `workflow.nyquist_validation` is explicitly `false` (absent = enabled).
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
NYQUIST_CONFIG=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" config get workflow.nyquist_validation --raw 2>/dev/null)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
If `false`: skip entirely.
|
|
140
|
+
|
|
141
|
+
For each phase directory, check `*-VALIDATION.md`. If exists, parse frontmatter (`nyquist_compliant`, `wave_0_complete`).
|
|
142
|
+
|
|
143
|
+
Classify per phase:
|
|
144
|
+
|
|
145
|
+
| Status | Condition |
|
|
146
|
+
|--------|-----------|
|
|
147
|
+
| COMPLIANT | `nyquist_compliant: true` and all tasks green |
|
|
148
|
+
| PARTIAL | VALIDATION.md exists, `nyquist_compliant: false` or red/pending |
|
|
149
|
+
| MISSING | No VALIDATION.md |
|
|
150
|
+
|
|
151
|
+
Add to audit YAML: `nyquist: { compliant_phases, partial_phases, missing_phases, overall }`
|
|
152
|
+
|
|
153
|
+
Discovery only — never auto-calls `/gsd-validate-phase`.
|
|
154
|
+
|
|
130
155
|
## 6. Aggregate into v{version}-MILESTONE-AUDIT.md
|
|
131
156
|
|
|
132
157
|
Create `.planning/v{version}-v{version}-MILESTONE-AUDIT.md` with:
|
|
@@ -227,6 +252,14 @@ All requirements covered. Cross-phase integration verified. E2E flows complete.
|
|
|
227
252
|
{For each flow gap:}
|
|
228
253
|
- **{flow name}:** breaks at {step}
|
|
229
254
|
|
|
255
|
+
### Nyquist Coverage
|
|
256
|
+
|
|
257
|
+
| Phase | VALIDATION.md | Compliant | Action |
|
|
258
|
+
|-------|---------------|-----------|--------|
|
|
259
|
+
| {phase} | exists/missing | true/false/partial | `/gsd-validate-phase {N}` |
|
|
260
|
+
|
|
261
|
+
Phases needing validation: run `/gsd-validate-phase {N}` for each flagged phase.
|
|
262
|
+
|
|
230
263
|
───────────────────────────────────────────────────────────────
|
|
231
264
|
|
|
232
265
|
## ▶ Next Up
|
|
@@ -293,5 +326,7 @@ All requirements met. No critical blockers. Accumulated tech debt needs review.
|
|
|
293
326
|
- [ ] Integration checker spawned with milestone requirement IDs
|
|
294
327
|
- [ ] v{version}-MILESTONE-AUDIT.md created with structured requirement gap objects
|
|
295
328
|
- [ ] FAIL gate enforced — any unsatisfied requirement forces gaps_found status
|
|
329
|
+
- [ ] Nyquist compliance scanned for all milestone phases (if enabled)
|
|
330
|
+
- [ ] Missing VALIDATION.md phases flagged with validate-phase suggestion
|
|
296
331
|
- [ ] Results presented with actionable next steps
|
|
297
332
|
</success_criteria>
|
|
@@ -12,7 +12,8 @@ read all files referenced by the invoking prompt's execution_context before star
|
|
|
12
12
|
Load todo context:
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
INIT=$(node
|
|
15
|
+
INIT=$(node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" init todos)
|
|
16
|
+
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
|
|
16
17
|
```
|
|
17
18
|
|
|
18
19
|
Extract from init JSON: `todo_count`, `todos`, `pending_dir`.
|
|
@@ -154,7 +155,7 @@ If todo was moved to done/, commit the change:
|
|
|
154
155
|
|
|
155
156
|
```bash
|
|
156
157
|
git rm --cached .planning/todos/pending/[filename] 2>/dev/null || true
|
|
157
|
-
node
|
|
158
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "docs: start work on todo - [title]" --files .planning/todos/done/[filename] .planning/STATE.md
|
|
158
159
|
```
|
|
159
160
|
|
|
160
161
|
Tool respects `commit_docs` config and gitignore automatically.
|
|
@@ -122,7 +122,7 @@ Repeat for all milestones in the cleanup set.
|
|
|
122
122
|
Commit the changes:
|
|
123
123
|
|
|
124
124
|
```bash
|
|
125
|
-
node
|
|
125
|
+
node "$HOME/.config/opencode/get-shit-done/bin/gsd-tools.cjs" commit "chore: archive phase directories from completed milestones" --files .planning/milestones/ .planning/phases/
|
|
126
126
|
```
|
|
127
127
|
|
|
128
128
|
</step>
|