@tekyzinc/gsd-t 2.22.0 → 2.23.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/CHANGELOG.md CHANGED
@@ -2,6 +2,11 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [2.23.0] - 2026-02-17
6
+
7
+ ### Changed
8
+ - **Wave orchestrator rewrite**: `gsd-t-wave` now spawns an independent agent for each phase instead of executing all phases inline. Each phase agent gets a fresh context window (~200K tokens), eliminating cross-phase context accumulation and preventing mid-wave compaction. The orchestrator stays lightweight (~30KB), reading only progress.md between phases. Phase sequence is unchanged — only the execution model changed. Estimated 75-85% reduction in peak context usage during waves
9
+
5
10
  ## [2.22.0] - 2026-02-17
6
11
 
7
12
  ### Added
@@ -1,125 +1,131 @@
1
- # GSD-T: Wave — Full Cycle Orchestration
1
+ # GSD-T: Wave — Full Cycle Orchestration (Agent-Per-Phase)
2
2
 
3
- You are running a complete GSD-T cycle through all phases for the current milestone. This is the "just go" command it runs partition discuss plan impact execute test-sync integrate verify → complete-milestone in sequence, using teams where beneficial.
3
+ You are the wave orchestrator. You do NOT execute phases yourself. Instead, you spawn an **independent agent for each phase**, giving each a fresh context window. This eliminates context accumulation across phases and prevents mid-wave compaction.
4
4
 
5
- ## Step 1: Load State
5
+ ## Step 1: Load State (Lightweight)
6
6
 
7
- Read:
8
- 1. `CLAUDE.md`
9
- 2. `.gsd-t/progress.md`
10
- 3. All `.gsd-t/` files
7
+ Read ONLY:
8
+ 1. `.gsd-t/progress.md` — current status, milestone name, phase state
9
+ 2. `CLAUDE.md` — autonomy level only (scan for Level 1/2/3)
11
10
 
12
- Determine current status and resume from wherever the milestone left off.
11
+ Do NOT read contracts, domains, docs, or source code. You are the orchestrator phase agents handle their own context loading.
13
12
 
14
- ## Step 1.5: QA Agent Spawning
13
+ ## Step 2: Determine Resume Point
15
14
 
16
- Every phase that produces or validates code will automatically spawn a QA teammate. The QA agent is spawned per-phase (not once for the entire wave) because each phase has different QA responsibilities. Each phase's command file contains its own QA spawn instructions — follow them when executing that phase.
15
+ From progress.md status, determine which phase to start from:
17
16
 
18
- ## Step 2: Execute Remaining Phases
17
+ | Status | Next Phase |
18
+ |--------|------------|
19
+ | READY | Need milestone first — prompt user or run milestone |
20
+ | INITIALIZED / DEFINED | Partition |
21
+ | PARTITIONED | Discuss (or skip to Plan if path is clear) |
22
+ | DISCUSSED | Plan |
23
+ | PLANNED | Impact |
24
+ | IMPACT_ANALYZED | Execute |
25
+ | EXECUTED | Test-Sync |
26
+ | TESTS_SYNCED | Integrate |
27
+ | INTEGRATED | Verify |
28
+ | VERIFIED | Complete |
29
+ | VERIFY_FAILED | Remediate → re-Verify |
19
30
 
20
- Work through each phase that hasn't been completed:
31
+ ## Step 3: Phase Orchestration Loop
21
32
 
22
- ### INITIALIZED or DEFINED Run Partition
23
- - Decompose into domains with contracts
24
- - Set status to PARTITIONED
33
+ For each remaining phase, spawn an **independent agent** using the Task tool. Each agent gets a fresh context window, loads its own state from files, and reports back.
25
34
 
26
- ### PARTITIONED Run Discuss (if needed)
27
- - If there are open architectural questions or multiple viable approaches: discuss
28
- - If the path is clear (simple milestone, clear requirements): skip to plan
29
- - Set status to DISCUSSED
35
+ ### Phase Agent Spawn Pattern
30
36
 
31
- ### DISCUSSED Run Plan
32
- - Create atomic task lists per domain
33
- - Map dependencies and checkpoints
34
- - Set status to PLANNED
37
+ For each phase, spawn the agent like this:
35
38
 
36
- ### PLANNED → Run Impact Analysis
37
- - Analyze downstream effects of all planned changes
38
- - Check for contract violations
39
- - Trace dependencies and consumers
40
- - Produce `.gsd-t/impact-report.md`
41
-
42
- **Decision Gate:**
43
- - If PROCEED: continue to execute
44
- - If PROCEED WITH CAUTION: report items, continue if no user intervention
45
- - If BLOCK: stop, add remediation tasks, require user decision
46
-
47
- - Set status to IMPACT_ANALYZED
48
-
49
- ### IMPACT_ANALYZED → Run Execute
50
- - **Auto-select mode**:
51
- - Count total independent starting tasks across domains
52
- - If 3+ domains with independent work AND teams are enabled: use team mode
53
- - Otherwise: solo mode
54
-
55
- - **Destructive Action Guard**: Before each task, check if it involves destructive or structural changes (DROP TABLE, schema changes that lose data, removing existing modules, replacing architecture patterns). If YES → STOP and present the change to the user. Wait for explicit approval. This applies at ALL autonomy levels.
56
-
57
- - **After each task:**
58
- - Run quick test-sync (affected tests only)
59
- - If test failures: pause and report
60
- - If all pass: continue
61
-
62
- - Run through all tasks, respecting checkpoints
63
- - Set status to EXECUTED
64
-
65
- ### EXECUTED → Run Full Test Sync
66
- - Complete test coverage analysis
67
- - Run all tests
68
- - Generate/update test tasks if gaps found
69
- - If critical test failures: add fix tasks, re-execute
70
- - Set status to TESTS_SYNCED
71
-
72
- ### TESTS_SYNCED → Run Integrate
73
- - Wire domains together
74
- - Verify contract compliance at boundaries
75
- - Run integration tests
76
- - Set status to INTEGRATED
77
-
78
- ### INTEGRATED → Run Verify
79
- - **Auto-select mode**:
80
- - If teams enabled and milestone is complex (3+ domains): team verify
81
- - Otherwise: solo verify
82
- - Run quality gates across all dimensions
83
- - Handle remediation if needed
84
- - Set status to VERIFIED
85
-
86
- ### VERIFIED → Run Complete Milestone
87
- - Archive milestone documentation to `.gsd-t/milestones/{name}/`
88
- - Generate summary.md
89
- - Clean working state for next milestone
90
- - Create git tag
91
- - Set status to COMPLETED
39
+ ```
40
+ Task agent (subagent_type: "general-purpose", mode: "bypassPermissions"):
41
+ "Execute the {PHASE} phase of the current GSD-T milestone.
92
42
 
93
- ## Step 3: Phase Transitions
43
+ Read and follow the full instructions in commands/gsd-t-{phase}.md
44
+ Read .gsd-t/progress.md for current milestone and state.
45
+ Read CLAUDE.md for project conventions.
46
+ Read .gsd-t/contracts/ for domain interfaces.
94
47
 
95
- Between each phase:
96
- 1. Update `.gsd-t/progress.md`
97
- 2. Report brief status to user
48
+ Complete the phase fully:
49
+ - Follow every step in the command file
50
+ - Update .gsd-t/progress.md status when done
51
+ - Run document ripple as specified
52
+ - Commit your work
98
53
 
99
- ### Autonomy Behavior
54
+ Report back: one-line status summary."
55
+ ```
100
56
 
101
- **Level 3 (Full Auto)**: Auto-advance to the next phase after logging status. Only STOP for:
102
- - Destructive Action Guard violations (always)
103
- - Impact analysis BLOCK verdict (always)
57
+ ### Phase Sequence
58
+
59
+ Execute phases in this order, spawning one agent per phase:
60
+
61
+ #### 1. PARTITION
62
+ Spawn agent → `commands/gsd-t-partition.md`
63
+ - After: Read `progress.md`, verify status = PARTITIONED
64
+ - If failed: Report error, stop
65
+
66
+ #### 2. DISCUSS (conditional)
67
+ - Check: Are there open architectural questions or multiple viable approaches?
68
+ - If YES: Spawn agent → `commands/gsd-t-discuss.md`
69
+ - **Note**: Discuss always pauses for user input, even at Level 3. The discuss agent will interact with the user directly.
70
+ - If NO (path is clear): Skip to Plan
71
+
72
+ #### 3. PLAN
73
+ Spawn agent → `commands/gsd-t-plan.md`
74
+ - After: Read `progress.md`, verify status = PLANNED
75
+
76
+ #### 4. IMPACT
77
+ Spawn agent → `commands/gsd-t-impact.md`
78
+ - After: Read `progress.md` and `.gsd-t/impact-report.md`
79
+ - **Decision Gate**:
80
+ - PROCEED → continue to Execute
81
+ - PROCEED WITH CAUTION → log items, continue
82
+ - BLOCK → stop, report to user, wait for decision
83
+
84
+ #### 5. EXECUTE
85
+ Spawn agent → `commands/gsd-t-execute.md`
86
+ - This is the heaviest phase. The execute agent will handle its own domain agent spawning and QA agent internally.
87
+ - After: Read `progress.md`, verify status = EXECUTED
88
+
89
+ #### 6. TEST-SYNC
90
+ Spawn agent → `commands/gsd-t-test-sync.md`
91
+ - After: Read `progress.md`, verify status = TESTS_SYNCED
92
+
93
+ #### 7. INTEGRATE
94
+ Spawn agent → `commands/gsd-t-integrate.md`
95
+ - After: Read `progress.md`, verify status = INTEGRATED
96
+
97
+ #### 8. VERIFY
98
+ Spawn agent → `commands/gsd-t-verify.md`
99
+ - After: Read `progress.md`, check status:
100
+ - VERIFIED → proceed to Complete
101
+ - VERIFY_FAILED → handle remediation (see Error Recovery)
102
+
103
+ #### 9. COMPLETE
104
+ Spawn agent → `commands/gsd-t-complete-milestone.md`
105
+ - After: Read `progress.md`, verify status = COMPLETED
106
+
107
+ ### Between Each Phase
108
+
109
+ After each agent completes:
110
+ 1. Read `.gsd-t/progress.md` to verify the phase updated status correctly
111
+ 2. Report brief status to user:
112
+ ```
113
+ ✅ {Phase} complete — {agent's one-line summary}
114
+ ```
115
+ 3. If status was NOT updated correctly: report error and stop
116
+ 4. Proceed to next phase
117
+
118
+ ## Step 4: Autonomy Behavior
119
+
120
+ **Level 3 (Full Auto)**: Auto-advance to next phase after each agent completes. Only STOP for:
121
+ - Destructive Action Guard violations (reported by phase agent)
122
+ - Impact analysis BLOCK verdict
104
123
  - Unrecoverable errors after 2 fix attempts
105
- - The Discuss phase (always pauses for user input, even at Level 3)
124
+ - Discuss phase (always pauses for user input)
106
125
 
107
- **Level 1–2**: If any phase produces findings that need user input, STOP and ask. If all clear, continue to next phase.
126
+ **Level 1–2**: Pause between phases, show status, ask to continue.
108
127
 
109
- Status messages:
110
- ```
111
- ✅ Partition complete — 3 domains defined, 4 contracts written
112
- ✅ Discuss complete — 2 design decisions logged
113
- ✅ Plan complete — 12 tasks across 3 domains
114
- ⚠️ Impact analysis found 2 items requiring attention — proceeding
115
- ✅ Execute complete — 12/12 tasks done
116
- ✅ Test sync — 8 tests affected, all passing, 1 gap noted
117
- ✅ Integrate complete — all domain boundaries wired
118
- ✅ Verify complete — all quality gates passed
119
- ✅ Milestone archived and tagged
120
- ```
121
-
122
- ## Step 4: Completion
128
+ ## Step 5: Completion
123
129
 
124
130
  When all phases are done:
125
131
  ```
@@ -147,59 +153,67 @@ Next steps:
147
153
 
148
154
  ## Interruption Handling
149
155
 
150
- If the user interrupts or the session needs to end:
151
- 1. Finish the current atomic task
152
- 2. Save all state to `.gsd-t/progress.md`
153
- 3. Note exactly where to resume: "{phase} {domain} — Task {N}"
154
- 4. Report: "Paused at {location}. Run `/user:gsd-t-resume` to continue."
156
+ If the user interrupts or a phase agent fails:
157
+ 1. The current phase agent saves its own state to `.gsd-t/progress.md`
158
+ 2. Report: "Paused at {phase}. Run `/user:gsd-t-resume` to continue."
159
+ 3. Resume will pick up from the last completed phase
155
160
 
156
161
  ## Error Recovery
157
162
 
158
163
  ### If impact analysis blocks:
159
- - Report blocking issues
160
- - Generate remediation tasks
161
- - Add to appropriate domain
162
-
163
- **Level 3 (Full Auto)**: Auto-execute remediation tasks, then re-run impact analysis. Only STOP if remediation fails after 2 attempts.
164
+ - Read the impact report from the agent's output
165
+ - Report blocking issues to user
164
166
 
165
- **Level 1–2**: Ask: "Address blockers now, or pause?" If address: execute remediation tasks, re-run impact. If pause: save state, exit.
167
+ **Level 3**: Spawn a remediation agent to fix blocking issues, then re-spawn impact agent. Max 2 attempts.
168
+ **Level 1–2**: Ask user for direction.
166
169
 
167
170
  ### If tests fail during execute:
168
- - Pause execution
169
- - Report failing tests
170
- - Generate fix tasks
171
+ - The execute agent handles test failures internally (up to 2 fix attempts)
172
+ - If still failing after 2 attempts, the execute agent reports failure
173
+ - Orchestrator stops and reports to user
171
174
 
172
- **Level 3 (Full Auto)**: Auto-execute fix tasks and re-run tests (up to 2 fix attempts). If still failing, STOP and report to user.
175
+ ### If verify fails:
176
+ - Read verify report for failure details
173
177
 
174
- **Level 1–2**: Ask: "Fix now or continue?" If fix: execute fix tasks, re-run tests. If continue: note failures, proceed (will catch in verify).
178
+ **Level 3**: Spawn remediation agent, then re-spawn verify agent. Max 2 attempts.
179
+ **Level 1–2**: Ask user for direction.
175
180
 
176
- ### If verify fails:
177
- - Report failures
178
- - Generate remediation tasks
179
- - Do NOT run complete-milestone
181
+ ## Why Agent-Per-Phase
180
182
 
181
- **Level 3 (Full Auto)**: Auto-execute remediation tasks and re-run verify (up to 2 attempts). If still failing, STOP and report to user.
183
+ Each phase agent gets a **fresh context window** (~200K tokens). This means:
184
+ - Phase 7 doesn't carry the context baggage from phases 1-6
185
+ - Mid-phase compaction is eliminated for standard-sized phases
186
+ - Each agent loads only what it needs from state files
187
+ - The orchestrator stays lightweight (~30KB total)
182
188
 
183
- **Level 1–2**: Ask: "Address issues now?" If yes: execute remediation, re-run verify. If no: save state with VERIFY_FAILED status.
189
+ State handoff happens through `.gsd-t/` files exactly what they were designed for.
184
190
 
185
191
  ## Workflow Visualization
186
192
 
187
193
  ```
188
- ┌─────────┐ ┌─────────┐ ┌──────┐ ┌────────┐ ┌─────────┐
189
- PARTITION│ DISCUSS │ → │ PLAN │ → │ IMPACT │ → │ EXECUTE │
190
- └─────────┘ └─────────┘ └──────┘ └────────┘ └────┬────┘
191
-
192
- BLOCK? test-sync
193
- ↓ after each
194
- remediate task
195
- │ │
196
- ┌──────────┐ ┌────────┐ ┌───────────┐ ┌────────┴────────┐
197
- COMPLETE ← │ VERIFY │ ← │ INTEGRATE │ ← └── │ FULL TEST-SYNC │
198
- └──────────┘ └────────┘ └───────────┘ └─────────────────┘
199
-
200
-
201
- archive
202
- git tag
194
+ ┌──────────────────────────────────────────────────────────────────────────────┐
195
+ Wave Orchestrator (lightweight)
196
+ │ │
197
+ ┌─────────┐ ┌─────────┐ ┌──────┐ ┌────────┐ ┌─────────┐
198
+ │ │PARTITION│ → │ DISCUSS │ → │ PLAN │ → │ IMPACT │ → │ EXECUTE │ │
199
+ │ │ agent 1 │ │ agent 2 │ │agent 3│ │agent 4 │ │ agent 5 │ │
200
+ │ └────┬────┘ └────┬────┘ └───┬──┘ └───┬────┘ └────┬────┘ │
201
+ ↓ ↓ ↓ ↓ ↓
202
+ status status status status status │
203
+ check check check check + check
204
+ │ gate │
205
+
206
+ │ ┌──────────┐ ┌────────┐ ┌───────────┐ ┌─────────────────┐ │
207
+ │ COMPLETE │ ← │ VERIFY │ ← │ INTEGRATE │ ←──── │ FULL TEST-SYNC │ │
208
+ agent 9 │ │agent 8 │ │ agent 7 │ │ agent 6 │ │
209
+ │ └────┬────┘ └────┬────┘ └─────┬─────┘ └────────┬────────┘ │
210
+ │ ↓ ↓ ↓ ↓ │
211
+ │ archive status + status status │
212
+ │ git tag gate check check check │
213
+ │ │
214
+ │ Each agent: fresh context window, reads state from files, dies when done │
215
+ │ Orchestrator: ~30KB total, never compacts │
216
+ └──────────────────────────────────────────────────────────────────────────────┘
203
217
  ```
204
218
 
205
219
  $ARGUMENTS
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "2.22.0",
3
+ "version": "2.23.0",
4
4
  "description": "GSD-T: Contract-Driven Development for Claude Code — 42 slash commands with backlog management, impact analysis, test sync, and milestone archival",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",