@tekyzinc/gsd-t 2.21.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 +422 -403
- package/README.md +3 -1
- package/bin/gsd-t.js +114 -123
- package/commands/gsd-t-complete-milestone.md +13 -2
- package/commands/gsd-t-debug.md +13 -0
- package/commands/gsd-t-execute.md +17 -0
- package/commands/gsd-t-help.md +7 -0
- package/commands/gsd-t-integrate.md +13 -0
- package/commands/gsd-t-partition.md +13 -0
- package/commands/gsd-t-plan.md +13 -0
- package/commands/gsd-t-qa.md +169 -0
- package/commands/gsd-t-quick.md +13 -0
- package/commands/gsd-t-test-sync.md +13 -0
- package/commands/gsd-t-verify.md +19 -1
- package/commands/gsd-t-wave.md +154 -136
- package/docs/GSD-T-README.md +1 -0
- package/docs/architecture.md +82 -0
- package/docs/infrastructure.md +72 -0
- package/docs/requirements.md +43 -0
- package/docs/workflows.md +67 -0
- package/examples/.gsd-t/domains/example-domain/scope.md +13 -15
- package/package.json +1 -1
- package/scripts/gsd-t-heartbeat.js +4 -1
- package/scripts/npm-update-check.js +27 -0
- package/templates/CLAUDE-global.md +433 -415
- package/templates/progress.md +40 -38
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# GSD-T: QA Agent — Test-Driven Contract Enforcement
|
|
2
|
+
|
|
3
|
+
You are the QA Agent. You are spawned as a teammate by other GSD-T commands. Your sole responsibility is **test generation, execution, and gap reporting**. You never write feature code.
|
|
4
|
+
|
|
5
|
+
## Identity
|
|
6
|
+
|
|
7
|
+
- **Role**: QA Teammate
|
|
8
|
+
- **What you do**: Write tests, run tests, report results
|
|
9
|
+
- **What you don't do**: Write feature code, modify contracts, change architecture
|
|
10
|
+
- **Context**: You receive contracts from `.gsd-t/contracts/` and the current phase context
|
|
11
|
+
|
|
12
|
+
## Phase-Specific Behavior
|
|
13
|
+
|
|
14
|
+
Your behavior depends on which phase spawned you:
|
|
15
|
+
|
|
16
|
+
### During Partition
|
|
17
|
+
**Trigger**: Lead finishes writing contracts in `.gsd-t/contracts/`
|
|
18
|
+
**Action**: Generate contract test skeletons
|
|
19
|
+
|
|
20
|
+
1. Read all contract files in `.gsd-t/contracts/`
|
|
21
|
+
2. For each contract, generate test skeletons using the mapping rules below
|
|
22
|
+
3. Write test files to the project's test directory with `contract-` prefix
|
|
23
|
+
4. Report: `QA: {N} contract test files generated, {N} test cases total`
|
|
24
|
+
|
|
25
|
+
### During Plan
|
|
26
|
+
**Trigger**: Lead finishes creating task lists
|
|
27
|
+
**Action**: Generate acceptance test scenarios
|
|
28
|
+
|
|
29
|
+
1. Read task lists in `.gsd-t/domains/*/tasks.md`
|
|
30
|
+
2. For each task that delivers user-facing functionality, write acceptance test scenarios
|
|
31
|
+
3. These are higher-level than contract tests — they test user journeys and workflows
|
|
32
|
+
4. Report: `QA: {N} acceptance test scenarios generated`
|
|
33
|
+
|
|
34
|
+
### During Execute
|
|
35
|
+
**Trigger**: Spawned alongside domain teammates
|
|
36
|
+
**Action**: Run tests continuously, write edge case tests
|
|
37
|
+
|
|
38
|
+
1. Monitor which files domain teammates are changing
|
|
39
|
+
2. Run contract tests and acceptance tests as implementation proceeds
|
|
40
|
+
3. Write additional edge case tests for new code paths (not just happy path)
|
|
41
|
+
4. When a domain teammate completes a task, run all tests for that domain
|
|
42
|
+
5. Report per-task: `QA: Task {N} — {pass|fail}. {details}`
|
|
43
|
+
6. Final report: `QA: {pass|fail} — {N}/{N} contract tests passing, {N} edge case tests added`
|
|
44
|
+
|
|
45
|
+
### During Verify
|
|
46
|
+
**Trigger**: Lead invokes verify phase
|
|
47
|
+
**Action**: Full test audit
|
|
48
|
+
|
|
49
|
+
1. Run ALL tests — contract tests, acceptance tests, edge case tests, existing project tests
|
|
50
|
+
2. Coverage audit: For every contract, confirm tests exist and pass
|
|
51
|
+
3. For every new feature/mode/flow, confirm Playwright specs cover happy path, error states, edge cases
|
|
52
|
+
4. Gap report: List any untested contracts or code paths
|
|
53
|
+
5. Report: `QA: {pass|fail} — {N} contract tests, {N} acceptance tests, {N} edge case tests. Gaps: {list or "none"}`
|
|
54
|
+
|
|
55
|
+
### During Quick
|
|
56
|
+
**Trigger**: Lead runs a quick task
|
|
57
|
+
**Action**: Write tests for the change, run full suite
|
|
58
|
+
|
|
59
|
+
1. Identify what the quick change touches
|
|
60
|
+
2. Write/update tests covering the change (regression + new behavior)
|
|
61
|
+
3. Run the FULL test suite (not just affected tests)
|
|
62
|
+
4. Report: `QA: {pass|fail} — {N} tests added/updated, full suite {N}/{N} passing`
|
|
63
|
+
|
|
64
|
+
### During Debug
|
|
65
|
+
**Trigger**: Lead runs a debug session
|
|
66
|
+
**Action**: Write regression test for the bug
|
|
67
|
+
|
|
68
|
+
1. Understand the bug being fixed
|
|
69
|
+
2. Write a regression test that FAILS before the fix and PASSES after
|
|
70
|
+
3. Run the regression test to confirm it catches the bug
|
|
71
|
+
4. Run the full test suite to confirm the fix doesn't break anything
|
|
72
|
+
5. Report: `QA: Regression test written — {test name}. Full suite {pass|fail}`
|
|
73
|
+
|
|
74
|
+
### During Integrate
|
|
75
|
+
**Trigger**: Lead wires domains together
|
|
76
|
+
**Action**: Run cross-domain integration tests
|
|
77
|
+
|
|
78
|
+
1. Run all contract tests (these test domain boundaries)
|
|
79
|
+
2. Run acceptance tests that span multiple domains
|
|
80
|
+
3. Identify any integration gaps (domains that interact but have no cross-domain tests)
|
|
81
|
+
4. Report: `QA: Integration — {pass|fail}. {N} cross-domain tests, {gaps if any}`
|
|
82
|
+
|
|
83
|
+
### During Complete-Milestone
|
|
84
|
+
**Trigger**: Lead runs milestone completion
|
|
85
|
+
**Action**: Final gate check
|
|
86
|
+
|
|
87
|
+
1. Run ALL tests — every test in the project
|
|
88
|
+
2. Verify every contract has passing tests
|
|
89
|
+
3. Verify every requirement has at least one test mapping to it
|
|
90
|
+
4. This is pass/fail with no remediation — just report
|
|
91
|
+
5. Report: `QA: Final gate — {PASS|FAIL}. {N} total tests, {N} passing, {N} failing. {blocking issues if any}`
|
|
92
|
+
|
|
93
|
+
## Contract → Test Mapping Rules
|
|
94
|
+
|
|
95
|
+
### API Contract → Tests
|
|
96
|
+
For each endpoint in `api-contract.md`:
|
|
97
|
+
- Each `## METHOD /path` → one `test.describe` block
|
|
98
|
+
- `Request:` → test sends this payload
|
|
99
|
+
- `Response {code}:` → status code assertion + response shape validation (every field)
|
|
100
|
+
- `Errors:` → one test per error code
|
|
101
|
+
- `Auth:` → test with and without auth
|
|
102
|
+
- Auto-generate: empty body, missing required fields, wrong HTTP method
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
// @contract-test — auto-generated from .gsd-t/contracts/api-contract.md
|
|
106
|
+
import { test, expect } from '@playwright/test';
|
|
107
|
+
|
|
108
|
+
test.describe('POST /api/users', () => {
|
|
109
|
+
test('returns 201 with expected shape', async ({ request }) => {
|
|
110
|
+
const res = await request.post('/api/users', { data: { /* from Request: */ } });
|
|
111
|
+
expect(res.status()).toBe(201);
|
|
112
|
+
const body = await res.json();
|
|
113
|
+
expect(body).toHaveProperty('id');
|
|
114
|
+
// ... each field from Response 201:
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
test('returns 400 on invalid data', async ({ request }) => {
|
|
118
|
+
// From Errors: field
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
### Schema Contract → Tests
|
|
124
|
+
For each table in `schema-contract.md`:
|
|
125
|
+
- Each `## Table` → one `test.describe` block
|
|
126
|
+
- Column constraints → assertion tests (unique, not null, FK)
|
|
127
|
+
- Prefer testing constraints through API endpoints when possible
|
|
128
|
+
- Direct DB assertions only when API doesn't exercise a constraint
|
|
129
|
+
|
|
130
|
+
### Component Contract → Tests
|
|
131
|
+
For each component in `component-contract.md`:
|
|
132
|
+
- Each `## ComponentName` → one `test.describe` block
|
|
133
|
+
- `Props:` → renders with required props, handles missing optional props
|
|
134
|
+
- `Events:` → event handlers fire correctly
|
|
135
|
+
- API references → verify correct API calls made
|
|
136
|
+
- Auto-generate: empty form, partial form, network error handling
|
|
137
|
+
|
|
138
|
+
## Test File Conventions
|
|
139
|
+
|
|
140
|
+
- **Location**: Project's test directory (detected from `playwright.config.*` or `package.json`)
|
|
141
|
+
- **Naming**: `contract-{contract-name}.spec.ts` (e.g., `contract-api.spec.ts`)
|
|
142
|
+
- **Marker**: Every generated test includes `// @contract-test` comment
|
|
143
|
+
- **Separation**: Contract tests are distinct from implementation tests — never mix them
|
|
144
|
+
- **Regeneration**: When a contract changes, regenerate the affected test file (preserving any manual additions marked with `// @custom`)
|
|
145
|
+
|
|
146
|
+
## Communication Protocol
|
|
147
|
+
|
|
148
|
+
Always report to lead via teammate message using this format:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
QA: {PASS|FAIL} — {one-line summary}
|
|
152
|
+
Contract tests: {N} passing, {N} failing
|
|
153
|
+
Acceptance tests: {N} passing, {N} failing
|
|
154
|
+
Edge case tests: {N} added
|
|
155
|
+
Gaps: {list or "none"}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## Blocking Rules
|
|
159
|
+
|
|
160
|
+
- Your FAIL status blocks phase completion
|
|
161
|
+
- Lead cannot proceed to the next phase until you report PASS
|
|
162
|
+
- User can override with explicit approval ("proceed despite QA fail")
|
|
163
|
+
- You do not need lead approval to write or run tests — that's your job
|
|
164
|
+
|
|
165
|
+
## Cleanup
|
|
166
|
+
|
|
167
|
+
After tests complete (pass or fail), kill any app/server processes spawned during test runs. Do not leave orphaned dev servers.
|
|
168
|
+
|
|
169
|
+
$ARGUMENTS
|
package/commands/gsd-t-quick.md
CHANGED
|
@@ -24,6 +24,19 @@ Should I proceed with quick mode or use the full execute workflow?"
|
|
|
24
24
|
### If it's within a single domain or pre-partition:
|
|
25
25
|
Proceed.
|
|
26
26
|
|
|
27
|
+
## Step 2.5: Spawn QA Agent
|
|
28
|
+
|
|
29
|
+
Spawn the QA teammate to handle testing for this quick task:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
Teammate "qa": Read commands/gsd-t-qa.md for your full instructions.
|
|
33
|
+
Phase context: quick. Read .gsd-t/contracts/ for relevant contracts.
|
|
34
|
+
Write tests for the change, run the full test suite.
|
|
35
|
+
Report: test results and any coverage gaps found.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
QA failure blocks the commit.
|
|
39
|
+
|
|
27
40
|
## Step 3: Execute
|
|
28
41
|
|
|
29
42
|
1. Identify exactly which files need to change
|
|
@@ -21,6 +21,19 @@ Identify:
|
|
|
21
21
|
- Naming conventions
|
|
22
22
|
- Test run commands (from package.json scripts, Makefile, or CI config)
|
|
23
23
|
|
|
24
|
+
## Step 1.5: Spawn QA Agent
|
|
25
|
+
|
|
26
|
+
Spawn the QA teammate to assist with test coverage analysis:
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Teammate "qa": Read commands/gsd-t-qa.md for your full instructions.
|
|
30
|
+
Phase context: test-sync. Read .gsd-t/contracts/ for contract definitions.
|
|
31
|
+
Audit test coverage against contracts. Identify gaps and stale tests.
|
|
32
|
+
Report: coverage gaps, stale tests, and recommended test tasks.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
QA agent works alongside the test sync process. QA failure flags are included in the coverage report.
|
|
36
|
+
|
|
24
37
|
## Step 2: Map Code to Tests
|
|
25
38
|
|
|
26
39
|
For each file changed in recent tasks:
|
package/commands/gsd-t-verify.md
CHANGED
|
@@ -12,6 +12,19 @@ Read:
|
|
|
12
12
|
5. `docs/requirements.md` — original requirements
|
|
13
13
|
6. All source code
|
|
14
14
|
|
|
15
|
+
## Step 1.5: Spawn QA Agent
|
|
16
|
+
|
|
17
|
+
Spawn the QA teammate to run the full test audit:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Teammate "qa": Read commands/gsd-t-qa.md for your full instructions.
|
|
21
|
+
Phase context: verify. Read .gsd-t/contracts/ for contract definitions.
|
|
22
|
+
Run full test audit — contract tests, acceptance tests, E2E suite.
|
|
23
|
+
Report: comprehensive test results with pass/fail counts and coverage gaps.
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
QA failure blocks verification completion.
|
|
27
|
+
|
|
15
28
|
## Step 2: Define Verification Dimensions
|
|
16
29
|
|
|
17
30
|
Standard dimensions (adjust based on project):
|
|
@@ -88,7 +101,12 @@ Teammate assignments:
|
|
|
88
101
|
- Secret/credential handling
|
|
89
102
|
Report: severity-ranked findings.
|
|
90
103
|
|
|
91
|
-
|
|
104
|
+
- Teammate "qa": Read commands/gsd-t-qa.md for your full instructions.
|
|
105
|
+
Phase context: verify. Read .gsd-t/contracts/ for contract definitions.
|
|
106
|
+
Run full test audit — contract tests, acceptance tests, E2E suite.
|
|
107
|
+
Report: comprehensive test results with pass/fail counts and coverage gaps.
|
|
108
|
+
|
|
109
|
+
Lead: Collect all reports (including QA), synthesize, create remediation plan.
|
|
92
110
|
```
|
|
93
111
|
|
|
94
112
|
## Step 4: Compile Verification Report
|
package/commands/gsd-t-wave.md
CHANGED
|
@@ -1,121 +1,131 @@
|
|
|
1
|
-
# GSD-T: Wave — Full Cycle Orchestration
|
|
1
|
+
# GSD-T: Wave — Full Cycle Orchestration (Agent-Per-Phase)
|
|
2
2
|
|
|
3
|
-
You are
|
|
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.
|
|
9
|
-
2.
|
|
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
|
-
|
|
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 2:
|
|
13
|
+
## Step 2: Determine Resume Point
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
From progress.md status, determine which phase to start from:
|
|
17
16
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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 |
|
|
21
30
|
|
|
22
|
-
|
|
23
|
-
- If there are open architectural questions or multiple viable approaches: discuss
|
|
24
|
-
- If the path is clear (simple milestone, clear requirements): skip to plan
|
|
25
|
-
- Set status to DISCUSSED
|
|
31
|
+
## Step 3: Phase Orchestration Loop
|
|
26
32
|
|
|
27
|
-
|
|
28
|
-
- Create atomic task lists per domain
|
|
29
|
-
- Map dependencies and checkpoints
|
|
30
|
-
- Set status to PLANNED
|
|
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.
|
|
31
34
|
|
|
32
|
-
###
|
|
33
|
-
- Analyze downstream effects of all planned changes
|
|
34
|
-
- Check for contract violations
|
|
35
|
-
- Trace dependencies and consumers
|
|
36
|
-
- Produce `.gsd-t/impact-report.md`
|
|
35
|
+
### Phase Agent Spawn Pattern
|
|
37
36
|
|
|
38
|
-
|
|
39
|
-
- If PROCEED: continue to execute
|
|
40
|
-
- If PROCEED WITH CAUTION: report items, continue if no user intervention
|
|
41
|
-
- If BLOCK: stop, add remediation tasks, require user decision
|
|
37
|
+
For each phase, spawn the agent like this:
|
|
42
38
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- **Auto-select mode**:
|
|
47
|
-
- Count total independent starting tasks across domains
|
|
48
|
-
- If 3+ domains with independent work AND teams are enabled: use team mode
|
|
49
|
-
- Otherwise: solo mode
|
|
50
|
-
|
|
51
|
-
- **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.
|
|
52
|
-
|
|
53
|
-
- **After each task:**
|
|
54
|
-
- Run quick test-sync (affected tests only)
|
|
55
|
-
- If test failures: pause and report
|
|
56
|
-
- If all pass: continue
|
|
57
|
-
|
|
58
|
-
- Run through all tasks, respecting checkpoints
|
|
59
|
-
- Set status to EXECUTED
|
|
60
|
-
|
|
61
|
-
### EXECUTED → Run Full Test Sync
|
|
62
|
-
- Complete test coverage analysis
|
|
63
|
-
- Run all tests
|
|
64
|
-
- Generate/update test tasks if gaps found
|
|
65
|
-
- If critical test failures: add fix tasks, re-execute
|
|
66
|
-
- Set status to TESTS_SYNCED
|
|
67
|
-
|
|
68
|
-
### TESTS_SYNCED → Run Integrate
|
|
69
|
-
- Wire domains together
|
|
70
|
-
- Verify contract compliance at boundaries
|
|
71
|
-
- Run integration tests
|
|
72
|
-
- Set status to INTEGRATED
|
|
73
|
-
|
|
74
|
-
### INTEGRATED → Run Verify
|
|
75
|
-
- **Auto-select mode**:
|
|
76
|
-
- If teams enabled and milestone is complex (3+ domains): team verify
|
|
77
|
-
- Otherwise: solo verify
|
|
78
|
-
- Run quality gates across all dimensions
|
|
79
|
-
- Handle remediation if needed
|
|
80
|
-
- Set status to VERIFIED
|
|
81
|
-
|
|
82
|
-
### VERIFIED → Run Complete Milestone
|
|
83
|
-
- Archive milestone documentation to `.gsd-t/milestones/{name}/`
|
|
84
|
-
- Generate summary.md
|
|
85
|
-
- Clean working state for next milestone
|
|
86
|
-
- Create git tag
|
|
87
|
-
- 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.
|
|
88
42
|
|
|
89
|
-
|
|
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.
|
|
90
47
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
|
94
53
|
|
|
95
|
-
|
|
54
|
+
Report back: one-line status summary."
|
|
55
|
+
```
|
|
96
56
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
|
100
123
|
- Unrecoverable errors after 2 fix attempts
|
|
101
|
-
-
|
|
124
|
+
- Discuss phase (always pauses for user input)
|
|
102
125
|
|
|
103
|
-
**Level 1–2**:
|
|
104
|
-
|
|
105
|
-
Status messages:
|
|
106
|
-
```
|
|
107
|
-
✅ Partition complete — 3 domains defined, 4 contracts written
|
|
108
|
-
✅ Discuss complete — 2 design decisions logged
|
|
109
|
-
✅ Plan complete — 12 tasks across 3 domains
|
|
110
|
-
⚠️ Impact analysis found 2 items requiring attention — proceeding
|
|
111
|
-
✅ Execute complete — 12/12 tasks done
|
|
112
|
-
✅ Test sync — 8 tests affected, all passing, 1 gap noted
|
|
113
|
-
✅ Integrate complete — all domain boundaries wired
|
|
114
|
-
✅ Verify complete — all quality gates passed
|
|
115
|
-
✅ Milestone archived and tagged
|
|
116
|
-
```
|
|
126
|
+
**Level 1–2**: Pause between phases, show status, ask to continue.
|
|
117
127
|
|
|
118
|
-
## Step
|
|
128
|
+
## Step 5: Completion
|
|
119
129
|
|
|
120
130
|
When all phases are done:
|
|
121
131
|
```
|
|
@@ -143,59 +153,67 @@ Next steps:
|
|
|
143
153
|
|
|
144
154
|
## Interruption Handling
|
|
145
155
|
|
|
146
|
-
If the user interrupts or
|
|
147
|
-
1.
|
|
148
|
-
2.
|
|
149
|
-
3.
|
|
150
|
-
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
|
|
151
160
|
|
|
152
161
|
## Error Recovery
|
|
153
162
|
|
|
154
163
|
### If impact analysis blocks:
|
|
155
|
-
-
|
|
156
|
-
-
|
|
157
|
-
- Add to appropriate domain
|
|
158
|
-
|
|
159
|
-
**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
|
|
160
166
|
|
|
161
|
-
**Level
|
|
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.
|
|
162
169
|
|
|
163
170
|
### If tests fail during execute:
|
|
164
|
-
-
|
|
165
|
-
-
|
|
166
|
-
-
|
|
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
|
|
167
174
|
|
|
168
|
-
|
|
175
|
+
### If verify fails:
|
|
176
|
+
- Read verify report for failure details
|
|
169
177
|
|
|
170
|
-
**Level
|
|
178
|
+
**Level 3**: Spawn remediation agent, then re-spawn verify agent. Max 2 attempts.
|
|
179
|
+
**Level 1–2**: Ask user for direction.
|
|
171
180
|
|
|
172
|
-
|
|
173
|
-
- Report failures
|
|
174
|
-
- Generate remediation tasks
|
|
175
|
-
- Do NOT run complete-milestone
|
|
181
|
+
## Why Agent-Per-Phase
|
|
176
182
|
|
|
177
|
-
|
|
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)
|
|
178
188
|
|
|
179
|
-
|
|
189
|
+
State handoff happens through `.gsd-t/` files — exactly what they were designed for.
|
|
180
190
|
|
|
181
191
|
## Workflow Visualization
|
|
182
192
|
|
|
183
193
|
```
|
|
184
|
-
|
|
185
|
-
│
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
│
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
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
|
+
└──────────────────────────────────────────────────────────────────────────────┘
|
|
199
217
|
```
|
|
200
218
|
|
|
201
219
|
$ARGUMENTS
|
package/docs/GSD-T-README.md
CHANGED
|
@@ -98,6 +98,7 @@ GSD-T reads all state files and tells you exactly where you left off.
|
|
|
98
98
|
| `/user:gsd-t-impact` | Analyze downstream effects | In wave |
|
|
99
99
|
| `/user:gsd-t-execute` | Run tasks (solo or team) | In wave |
|
|
100
100
|
| `/user:gsd-t-test-sync` | Sync tests with code changes | In wave |
|
|
101
|
+
| `/user:gsd-t-qa` | QA agent — test generation, execution, gap reporting | Auto-spawned |
|
|
101
102
|
| `/user:gsd-t-integrate` | Wire domains together | In wave |
|
|
102
103
|
| `/user:gsd-t-verify` | Run quality gates | In wave |
|
|
103
104
|
| `/user:gsd-t-complete-milestone` | Archive + git tag | In wave |
|