@tekyzinc/gsd-t 2.24.8 → 2.28.12
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 +55 -0
- package/README.md +5 -3
- package/bin/gsd-t.js +23 -0
- package/commands/checkin.md +5 -1
- package/commands/gsd-t-complete-milestone.md +6 -16
- package/commands/gsd-t-debug.md +27 -13
- package/commands/gsd-t-discuss.md +28 -4
- package/commands/gsd-t-execute.md +45 -17
- package/commands/gsd-t-health.md +138 -0
- package/commands/gsd-t-help.md +2 -0
- package/commands/gsd-t-init-scan-setup.md +29 -6
- package/commands/gsd-t-init.md +40 -6
- package/commands/gsd-t-integrate.md +15 -6
- package/commands/gsd-t-partition.md +1 -14
- package/commands/gsd-t-pause.md +78 -0
- package/commands/gsd-t-plan.md +79 -9
- package/commands/gsd-t-quick.md +27 -13
- package/commands/gsd-t-resume.md +6 -3
- package/commands/gsd-t-scan.md +23 -5
- package/commands/gsd-t-status.md +17 -0
- package/commands/gsd-t-test-sync.md +8 -9
- package/commands/gsd-t-verify.md +15 -15
- package/commands/gsd-t-wave.md +9 -5
- package/docs/GSD-T-README.md +2 -0
- package/docs/architecture.md +54 -14
- package/docs/infrastructure.md +15 -7
- package/docs/requirements.md +17 -6
- package/docs/workflows.md +45 -5
- package/examples/settings.json +3 -2
- package/package.json +2 -2
- package/scripts/gsd-t-heartbeat.js +3 -3
- package/scripts/gsd-t-statusline.js +94 -0
- package/scripts/gsd-t-tools.js +163 -0
- package/templates/CLAUDE-global.md +22 -14
package/commands/gsd-t-init.md
CHANGED
|
@@ -20,11 +20,31 @@ If yes, read `.gsd/` state and create equivalent `.gsd-t/` structure.
|
|
|
20
20
|
|
|
21
21
|
## Step 2: Copy Local Settings
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
1. **Ensure `~/.claude/settings.local` exists**:
|
|
24
|
+
- If it does NOT exist, create it now with these default permissions:
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"permissions": {
|
|
28
|
+
"allow": [
|
|
29
|
+
"Edit",
|
|
30
|
+
"Write",
|
|
31
|
+
"Bash",
|
|
32
|
+
"Read",
|
|
33
|
+
"WebSearch",
|
|
34
|
+
"WebFetch",
|
|
35
|
+
"Skill"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"outputStyle": "default"
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
After creating it, log: "Created ~/.claude/settings.local with default permissions — update the allow list to match your security preferences."
|
|
42
|
+
|
|
43
|
+
2. **Copy to project**: If `.claude/settings.local.json` does NOT already exist in the project root:
|
|
44
|
+
- Create the `.claude/` directory in the project root if it doesn't exist
|
|
45
|
+
- Copy `~/.claude/settings.local` → `.claude/settings.local.json`
|
|
46
|
+
|
|
47
|
+
Skip the copy (step 2) silently if the target already exists.
|
|
28
48
|
|
|
29
49
|
## Step 3: Create Directory Structure
|
|
30
50
|
|
|
@@ -36,7 +56,21 @@ Skip silently if the source file doesn't exist or the target already exists.
|
|
|
36
56
|
│ └── .gitkeep
|
|
37
57
|
├── backlog.md
|
|
38
58
|
├── backlog-settings.md
|
|
39
|
-
|
|
59
|
+
├── progress.md
|
|
60
|
+
├── token-log.md
|
|
61
|
+
└── qa-issues.md
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Create `token-log.md` with header row:
|
|
65
|
+
```
|
|
66
|
+
| Date | Command | Step | Model | Duration(s) | Notes |
|
|
67
|
+
|------|---------|------|-------|-------------|-------|
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Create `qa-issues.md` with header row:
|
|
71
|
+
```
|
|
72
|
+
| Date | Command | Step | Model | Duration(s) | Severity | Finding |
|
|
73
|
+
|------|---------|------|-------|-------------|----------|---------|
|
|
40
74
|
```
|
|
41
75
|
|
|
42
76
|
## Step 4: Initialize Backlog
|
|
@@ -88,17 +88,26 @@ Result: PASS
|
|
|
88
88
|
Result: PARTIAL — needs pagination contract addition
|
|
89
89
|
```
|
|
90
90
|
|
|
91
|
-
## Step 5:
|
|
91
|
+
## Step 5: Contract Compliance Testing
|
|
92
92
|
|
|
93
|
-
Spawn
|
|
93
|
+
Spawn a QA subagent via the Task tool to verify contract compliance at all domain boundaries:
|
|
94
94
|
|
|
95
95
|
```
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
96
|
+
Task subagent (general-purpose, model: haiku):
|
|
97
|
+
"Run contract compliance tests for this integration. Read .gsd-t/contracts/ for all contract definitions.
|
|
98
|
+
Test every domain boundary: verify that producers and consumers match their contract shapes.
|
|
99
|
+
Run the full test suite.
|
|
100
|
+
Report: boundary-by-boundary test results with pass/fail counts."
|
|
100
101
|
```
|
|
101
102
|
|
|
103
|
+
**OBSERVABILITY LOGGING (MANDATORY):**
|
|
104
|
+
Before spawning: run `date +%s` via Bash → save as START
|
|
105
|
+
After subagent returns: run `date +%s` → compute `DURATION=$((END-START))`
|
|
106
|
+
Append to `.gsd-t/token-log.md` (create with header `| Date | Command | Step | Model | Duration(s) | Notes |` if missing):
|
|
107
|
+
`| {YYYY-MM-DD HH:MM} | gsd-t-integrate | Step 5 | haiku | {DURATION}s | {pass/fail}, {N} boundaries tested |`
|
|
108
|
+
If QA found issues, append each to `.gsd-t/qa-issues.md` (create with header `| Date | Command | Step | Model | Duration(s) | Severity | Finding |` if missing):
|
|
109
|
+
`| {YYYY-MM-DD HH:MM} | gsd-t-integrate | Step 5 | haiku | {DURATION}s | {severity} | {finding} |`
|
|
110
|
+
|
|
102
111
|
QA failure blocks integration completion.
|
|
103
112
|
|
|
104
113
|
## Step 6: Document Ripple
|
|
@@ -175,20 +175,7 @@ Before finalizing the partition:
|
|
|
175
175
|
2. **Verify passing**: If any tests fail, assign them to the appropriate domain as pre-existing issues
|
|
176
176
|
3. **Map tests to domains**: Note which test files belong to which domain — this informs task planning
|
|
177
177
|
|
|
178
|
-
## Step 7:
|
|
179
|
-
|
|
180
|
-
After contracts are written, spawn the QA teammate to generate contract test skeletons:
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
Teammate "qa": Read commands/gsd-t-qa.md for your full instructions.
|
|
184
|
-
Phase context: partition. Read .gsd-t/contracts/ for contract definitions.
|
|
185
|
-
Generate contract test skeleton files for every contract.
|
|
186
|
-
Report: number of test files generated and total test cases.
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Wait for QA agent to complete before proceeding. QA failure blocks partition completion.
|
|
190
|
-
|
|
191
|
-
## Step 8: Validate
|
|
178
|
+
## Step 7: Validate
|
|
192
179
|
|
|
193
180
|
Before finishing, verify:
|
|
194
181
|
- [ ] Every file in `src/` is owned by exactly one domain
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# GSD-T: Pause — Save Exact Position for Later Resume
|
|
2
|
+
|
|
3
|
+
You are capturing the precise current position in an active GSD-T phase so the user can resume later with zero re-orientation overhead.
|
|
4
|
+
|
|
5
|
+
## Step 1: Gather Current State
|
|
6
|
+
|
|
7
|
+
Read the following (use whatever is already in context first — only read files if needed):
|
|
8
|
+
|
|
9
|
+
1. `.gsd-t/progress.md` — milestone name, current status/phase, version
|
|
10
|
+
2. `.gsd-t/domains/*/tasks.md` — identify which tasks are done, in-progress, or pending
|
|
11
|
+
3. Last entry in the Decision Log (from progress.md)
|
|
12
|
+
4. `$ARGUMENTS` — if user provided a note, capture it verbatim
|
|
13
|
+
|
|
14
|
+
## Step 2: Determine Exact Position
|
|
15
|
+
|
|
16
|
+
Identify:
|
|
17
|
+
- **Milestone**: current milestone name
|
|
18
|
+
- **Phase**: current phase (PARTITIONED, PLANNED, EXECUTED, etc.)
|
|
19
|
+
- **Domain** (if in execute/test-sync): which domain was being worked on
|
|
20
|
+
- **Task** (if in execute): which task number was in progress or next up
|
|
21
|
+
- **Last completed action**: what was the last thing that finished
|
|
22
|
+
- **Next action**: what should happen first when resuming
|
|
23
|
+
- **Blockers**: any known blockers or open questions
|
|
24
|
+
|
|
25
|
+
## Step 3: Create Continue-Here File
|
|
26
|
+
|
|
27
|
+
Generate a timestamp: `{YYYY}-{MM}-{DD}T{HH}{MM}{SS}` (local time, no separators in time part).
|
|
28
|
+
|
|
29
|
+
Create `.gsd-t/continue-here-{timestamp}.md`:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
# Continue Here — {YYYY-MM-DD HH:MM}
|
|
33
|
+
|
|
34
|
+
## Snapshot
|
|
35
|
+
- **Milestone**: {milestone name}
|
|
36
|
+
- **Phase**: {phase}
|
|
37
|
+
- **Version**: {version from progress.md}
|
|
38
|
+
- **Paused at**: {domain} → Task {N} | Between phases | {other description}
|
|
39
|
+
|
|
40
|
+
## Last Completed
|
|
41
|
+
{description of the last thing that finished — specific task, commit, or action}
|
|
42
|
+
|
|
43
|
+
## Next Action
|
|
44
|
+
{exactly what to do first when resuming — specific, actionable}
|
|
45
|
+
|
|
46
|
+
## Open Items
|
|
47
|
+
{any known blockers, pending decisions, or things to watch out for}
|
|
48
|
+
{None if clean}
|
|
49
|
+
|
|
50
|
+
## User Note
|
|
51
|
+
{$ARGUMENTS if provided, otherwise: _No note provided._}
|
|
52
|
+
|
|
53
|
+
## Resume Command
|
|
54
|
+
/user:gsd-t-resume
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## Step 4: Confirm to User
|
|
58
|
+
|
|
59
|
+
Output:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
⏸ Paused: {milestone name} — {phase}
|
|
63
|
+
|
|
64
|
+
Saved position: .gsd-t/continue-here-{timestamp}.md
|
|
65
|
+
Next action: {next action summary}
|
|
66
|
+
|
|
67
|
+
To resume: /user:gsd-t-resume
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Step 5: Do NOT Stop Work (unless user asked to pause all work)
|
|
71
|
+
|
|
72
|
+
This command only saves position. If the user invoked /pause mid-task intending to stop:
|
|
73
|
+
- They will close the session themselves
|
|
74
|
+
- Do not auto-continue executing tasks after creating the file
|
|
75
|
+
|
|
76
|
+
If invoked with $ARGUMENTS containing "and continue" or similar, create the file and then continue the current task normally.
|
|
77
|
+
|
|
78
|
+
$ARGUMENTS
|
package/commands/gsd-t-plan.md
CHANGED
|
@@ -12,6 +12,9 @@ Read ALL of these:
|
|
|
12
12
|
5. `.gsd-t/domains/*/constraints.md` — every domain constraint
|
|
13
13
|
6. `docs/` — requirements, architecture, schema, design
|
|
14
14
|
7. Existing source code (if any) — understand current state
|
|
15
|
+
8. `.gsd-t/CONTEXT.md` (if exists — from discuss phase) — **MANDATORY READ if present**
|
|
16
|
+
|
|
17
|
+
**If CONTEXT.md exists:** Every Locked Decision listed in it MUST be mapped to at least one task in Step 2. Do NOT proceed to execute if any Locked Decision is unmapped.
|
|
15
18
|
|
|
16
19
|
## Step 2: Create Task Lists Per Domain
|
|
17
20
|
|
|
@@ -49,9 +52,25 @@ For each domain, write `.gsd-t/domains/{domain-name}/tasks.md`:
|
|
|
49
52
|
5. **Ordered**: Tasks within a domain are numbered in execution order
|
|
50
53
|
6. **No implicit knowledge**: Don't assume the executing agent remembers previous tasks — reference contracts and files explicitly
|
|
51
54
|
|
|
55
|
+
### REQ Traceability
|
|
56
|
+
|
|
57
|
+
After creating task lists, append a traceability table to `docs/requirements.md`:
|
|
58
|
+
|
|
59
|
+
```markdown
|
|
60
|
+
## Requirements Traceability (updated by plan phase)
|
|
61
|
+
| REQ-ID | Requirement Summary | Domain | Task(s) | Status |
|
|
62
|
+
|--------|---------------------|--------|---------|--------|
|
|
63
|
+
| REQ-001 | {summary} | {domain} | Task 1, Task 3 | pending |
|
|
64
|
+
| REQ-002 | {summary} | {domain} | Task 2 | pending |
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
- Every REQ-ID must map to at least one domain/task — orphaned requirements are a planning gap
|
|
68
|
+
- Every task group should trace back to at least one REQ-ID — tasks with no REQ reference may be scope creep
|
|
69
|
+
- Report: orphaned requirements (no task) and unanchored tasks (no REQ)
|
|
70
|
+
|
|
52
71
|
## Step 3: Map Cross-Domain Dependencies
|
|
53
72
|
|
|
54
|
-
Update `.gsd-t/contracts/integration-points.md` with the full dependency graph
|
|
73
|
+
Update `.gsd-t/contracts/integration-points.md` with the full dependency graph **and wave groupings**:
|
|
55
74
|
|
|
56
75
|
```markdown
|
|
57
76
|
# Integration Points
|
|
@@ -68,11 +87,37 @@ Update `.gsd-t/contracts/integration-points.md` with the full dependency graph:
|
|
|
68
87
|
- UNLOCKS: auth Task 3 (user lookup), ui Task 3 (data fetching)
|
|
69
88
|
- VERIFY: Lead confirms schema matches schema-contract.md
|
|
70
89
|
|
|
71
|
-
### Second Checkpoint
|
|
90
|
+
### Second Checkpoint
|
|
72
91
|
- GATE: auth Task 4 (auth middleware) must complete
|
|
73
92
|
- UNLOCKS: ui Task 5 (protected routes)
|
|
74
93
|
- VERIFY: Lead confirms auth endpoints match api-contract.md
|
|
75
94
|
|
|
95
|
+
## Wave Execution Groups
|
|
96
|
+
|
|
97
|
+
Waves allow parallel execution within a wave and sequential execution between waves.
|
|
98
|
+
Each wave contains domains/tasks that can safely run in parallel (no shared files, no cross-domain dependencies within the wave).
|
|
99
|
+
|
|
100
|
+
### Wave 1 — Independent (parallel)
|
|
101
|
+
- data-layer: Tasks 1-3
|
|
102
|
+
- auth: Tasks 1-2
|
|
103
|
+
- **Shared files**: NONE — safe to run in parallel
|
|
104
|
+
- **Completes when**: All listed tasks done
|
|
105
|
+
|
|
106
|
+
### Wave 2 — After Wave 1 Checkpoint (parallel)
|
|
107
|
+
- CHECKPOINT: Lead verifies schema-contract.md before Wave 2 starts
|
|
108
|
+
- auth: Tasks 3-4
|
|
109
|
+
- ui: Tasks 1-2
|
|
110
|
+
- **Shared files**: NONE — safe to run in parallel
|
|
111
|
+
- **Completes when**: All listed tasks done
|
|
112
|
+
|
|
113
|
+
### Wave 3 — After Wave 2 Checkpoint (sequential)
|
|
114
|
+
- CHECKPOINT: Lead verifies api-contract.md before Wave 3 starts
|
|
115
|
+
- ui: Tasks 3-5
|
|
116
|
+
- **Note**: Sequential — each task depends on the previous
|
|
117
|
+
|
|
118
|
+
### Integration
|
|
119
|
+
- INTEGRATION: Wire all domains together
|
|
120
|
+
|
|
76
121
|
## Execution Order (for solo mode)
|
|
77
122
|
1. data-layer Tasks 1-3
|
|
78
123
|
2. auth Tasks 1-2 (parallel-safe with data-layer)
|
|
@@ -84,6 +129,12 @@ Update `.gsd-t/contracts/integration-points.md` with the full dependency graph:
|
|
|
84
129
|
8. INTEGRATION: wire everything together
|
|
85
130
|
```
|
|
86
131
|
|
|
132
|
+
### Wave Grouping Rules:
|
|
133
|
+
1. **Same wave** = no shared files, no dependency between them
|
|
134
|
+
2. **Different wave** = one depends on the other's output, OR they modify the same file
|
|
135
|
+
3. **CHECKPOINT between waves** = lead verifies contract compliance before unlocking next wave
|
|
136
|
+
4. Always check domain `scope.md` files for file ownership — overlapping files → different waves
|
|
137
|
+
|
|
87
138
|
## Step 4: Estimate Scope
|
|
88
139
|
|
|
89
140
|
Add to each domain's `tasks.md`:
|
|
@@ -118,18 +169,37 @@ Before finalizing the plan:
|
|
|
118
169
|
2. **Verify passing**: Document any pre-existing failures — assign them to appropriate domain tasks
|
|
119
170
|
3. **Include test tasks**: Ensure each domain's task list includes test creation/update tasks where acceptance criteria require verification
|
|
120
171
|
|
|
121
|
-
## Step 7:
|
|
172
|
+
## Step 7: Plan Validation
|
|
122
173
|
|
|
123
|
-
|
|
174
|
+
Spawn a Task subagent to validate the plan before proceeding:
|
|
124
175
|
|
|
125
176
|
```
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
177
|
+
Task subagent (general-purpose, model: haiku):
|
|
178
|
+
"Validate this GSD-T plan. Read:
|
|
179
|
+
- .gsd-t/domains/*/tasks.md (all task lists)
|
|
180
|
+
- .gsd-t/contracts/ (all contracts)
|
|
181
|
+
- docs/requirements.md (including traceability table)
|
|
182
|
+
- .gsd-t/CONTEXT.md (if exists)
|
|
183
|
+
|
|
184
|
+
Check:
|
|
185
|
+
1. REQ coverage: every REQ-ID in requirements.md maps to at least one task
|
|
186
|
+
2. Locked Decisions (from CONTEXT.md if present): every Locked Decision maps to at least one task
|
|
187
|
+
3. Task completeness: every task has files, contract refs, and acceptance criteria
|
|
188
|
+
4. Cross-domain dependencies: all BLOCKED-BY references point to real tasks
|
|
189
|
+
5. Contract existence: every task referencing a contract has that contract file present
|
|
190
|
+
|
|
191
|
+
Report: PASS (all checks pass) or FAIL with specific gaps listed."
|
|
130
192
|
```
|
|
131
193
|
|
|
132
|
-
|
|
194
|
+
**OBSERVABILITY LOGGING (MANDATORY):**
|
|
195
|
+
Before spawning: run `date +%s` via Bash → save as START
|
|
196
|
+
After subagent returns: run `date +%s` → compute `DURATION=$((END-START))`
|
|
197
|
+
Append to `.gsd-t/token-log.md` (create with header `| Date | Command | Step | Model | Duration(s) | Notes |` if missing):
|
|
198
|
+
`| {YYYY-MM-DD HH:MM} | gsd-t-plan | Step 7 | haiku | {DURATION}s | {PASS/FAIL}, iteration {N} |`
|
|
199
|
+
If validation FAIL, append each gap to `.gsd-t/qa-issues.md` (create with header `| Date | Command | Step | Model | Duration(s) | Severity | Finding |` if missing):
|
|
200
|
+
`| {YYYY-MM-DD HH:MM} | gsd-t-plan | Step 7 | haiku | {DURATION}s | medium | {gap description} |`
|
|
201
|
+
|
|
202
|
+
**If FAIL**: Fix the identified gaps (up to 3 iterations). If still failing after 3 iterations, STOP and report to user with the specific gaps. Plan cannot proceed until validation PASSES.
|
|
133
203
|
|
|
134
204
|
## Step 8: Update Progress
|
|
135
205
|
|
package/commands/gsd-t-quick.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
You are executing a small, focused task that doesn't need full phase planning. This is for bug fixes, config changes, small features, and ad-hoc work.
|
|
4
4
|
|
|
5
|
+
## Step 0: Launch via Subagent
|
|
6
|
+
|
|
7
|
+
To give this task a fresh context window and prevent compaction during consecutive quick runs, always execute via a Task subagent.
|
|
8
|
+
|
|
9
|
+
**If you are the orchestrating agent** (you received the slash command directly):
|
|
10
|
+
Spawn a fresh subagent using the Task tool:
|
|
11
|
+
```
|
|
12
|
+
subagent_type: general-purpose
|
|
13
|
+
prompt: "You are running gsd-t-quick for this request: {$ARGUMENTS}
|
|
14
|
+
Working directory: {current project root}
|
|
15
|
+
Read CLAUDE.md and .gsd-t/progress.md for project context, then execute gsd-t-quick starting at Step 1."
|
|
16
|
+
```
|
|
17
|
+
Wait for the subagent to complete. Relay its summary to the user. **Do not execute Steps 1–5 yourself.**
|
|
18
|
+
|
|
19
|
+
**If you are the spawned subagent** (your prompt says "starting at Step 1"):
|
|
20
|
+
Continue to Step 1 below.
|
|
21
|
+
|
|
5
22
|
## Step 1: Load Context (Fast)
|
|
6
23
|
|
|
7
24
|
Read:
|
|
@@ -24,20 +41,17 @@ Should I proceed with quick mode or use the full execute workflow?"
|
|
|
24
41
|
### If it's within a single domain or pre-partition:
|
|
25
42
|
Proceed.
|
|
26
43
|
|
|
27
|
-
## Step 3:
|
|
28
|
-
|
|
29
|
-
Spawn the QA teammate to handle testing for this quick task:
|
|
44
|
+
## Step 3: Execute
|
|
30
45
|
|
|
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
|
-
```
|
|
46
|
+
### Deviation Rules
|
|
37
47
|
|
|
38
|
-
|
|
48
|
+
When you encounter unexpected situations:
|
|
49
|
+
1. **Bug blocking progress** → Fix it, up to 3 attempts. If still blocked, add to `.gsd-t/deferred-items.md` and skip.
|
|
50
|
+
2. **Missing dependency clearly needed** → Add minimum required code to unblock. Note in commit.
|
|
51
|
+
3. **Blocker (missing file, wrong API)** → Fix blocker and continue. Log if non-trivial.
|
|
52
|
+
4. **Architectural change required** → STOP. Apply Destructive Action Guard. Never self-approve.
|
|
39
53
|
|
|
40
|
-
|
|
54
|
+
**3-attempt limit**: Stop looping after 3 failed fix attempts. Log and move on.
|
|
41
55
|
|
|
42
56
|
1. Identify exactly which files need to change
|
|
43
57
|
2. **Destructive Action Guard**: Check if this task involves destructive or structural changes (DROP TABLE, removing columns, deleting data, replacing architecture patterns, removing working modules, changing schema in ways that conflict with existing data). If YES → STOP and present the change to the user with what exists today, what will change, what will break, and a safe migration path. Wait for explicit approval.
|
|
@@ -46,7 +60,7 @@ QA failure blocks the commit.
|
|
|
46
60
|
5. Verify it works
|
|
47
61
|
6. Commit: `[quick] {description}`
|
|
48
62
|
|
|
49
|
-
## Step
|
|
63
|
+
## Step 4: Document Ripple (if GSD-T is active)
|
|
50
64
|
|
|
51
65
|
If `.gsd-t/progress.md` exists, assess what documentation was affected and update ALL relevant files:
|
|
52
66
|
|
|
@@ -65,7 +79,7 @@ If `.gsd-t/progress.md` exists, assess what documentation was affected and updat
|
|
|
65
79
|
|
|
66
80
|
### Skip what's not affected — most quick tasks will only touch 1-2 of these.
|
|
67
81
|
|
|
68
|
-
## Step
|
|
82
|
+
## Step 5: Test & Verify (MANDATORY)
|
|
69
83
|
|
|
70
84
|
Quick does not mean skip testing. Before committing:
|
|
71
85
|
|
package/commands/gsd-t-resume.md
CHANGED
|
@@ -15,8 +15,9 @@ You are resuming work after an interruption. This handles both same-session paus
|
|
|
15
15
|
|
|
16
16
|
Read in this exact order:
|
|
17
17
|
1. `CLAUDE.md` — project context and conventions
|
|
18
|
-
2. `.gsd-t/
|
|
19
|
-
3. `.gsd-t/
|
|
18
|
+
2. **Check for continue-here files first**: List `.gsd-t/continue-here-*.md` files. If any exist, read the most recent one (highest timestamp). It contains exact position, next action, and open items — use this as the primary resume point.
|
|
19
|
+
3. `.gsd-t/progress.md` — current status, decisions, blockers (always read this too)
|
|
20
|
+
4. `.gsd-t/contracts/` — all contract files
|
|
20
21
|
4. `.gsd-t/domains/*/scope.md` — domain boundaries
|
|
21
22
|
5. `.gsd-t/domains/*/tasks.md` — task lists with completion status
|
|
22
23
|
6. `.gsd-t/domains/*/constraints.md` — domain rules
|
|
@@ -25,13 +26,15 @@ Read in this exact order:
|
|
|
25
26
|
|
|
26
27
|
## Step 2: Determine Current Position
|
|
27
28
|
|
|
28
|
-
From progress.md (or conversation context if same-session), identify:
|
|
29
|
+
From the continue-here file (if present) OR progress.md (or conversation context if same-session), identify:
|
|
29
30
|
- Current milestone and status
|
|
30
31
|
- Which phase we're in
|
|
31
32
|
- Which tasks are done, in progress, or blocked
|
|
32
33
|
- Any pending decisions or user-input-needed items
|
|
33
34
|
- Last entry in the Decision Log
|
|
34
35
|
|
|
36
|
+
**If a continue-here file was found**: Use its "Next Action" field as the primary resume point. The continue-here file is more precise than progress.md alone. After resuming, delete the continue-here file (it has been consumed).
|
|
37
|
+
|
|
35
38
|
## Step 3: Report and Continue
|
|
36
39
|
|
|
37
40
|
**Level 3 (Full Auto)**: Log a brief status line and auto-resume from the current task/phase. Do NOT wait for user input.
|
package/commands/gsd-t-scan.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
You are the lead agent performing a comprehensive analysis of an existing codebase. Your job is to understand the architecture, identify business rules, surface vulnerabilities, find inefficiencies, and produce an actionable tech debt register.
|
|
4
4
|
|
|
5
|
+
## Step 0: Launch via Subagent
|
|
6
|
+
|
|
7
|
+
Scans are long-running and context-heavy. Always execute via a Task subagent for a fresh context window.
|
|
8
|
+
|
|
9
|
+
**If you are the orchestrating agent** (you received the slash command directly):
|
|
10
|
+
Spawn a fresh subagent using the Task tool:
|
|
11
|
+
```
|
|
12
|
+
subagent_type: general-purpose
|
|
13
|
+
prompt: "You are running gsd-t-scan. Working directory: {current project root}
|
|
14
|
+
Read CLAUDE.md and .gsd-t/progress.md for project context, then execute gsd-t-scan starting at Step 1.
|
|
15
|
+
IMPORTANT: Step 2 requires team mode — spawn 5 teammates (architecture, business-rules, security, quality, contracts)
|
|
16
|
+
running in parallel. Do not skip team mode or run dimensions sequentially."
|
|
17
|
+
```
|
|
18
|
+
Wait for the subagent to complete. Relay its summary to the user. **Do not execute Steps 1+ yourself.**
|
|
19
|
+
|
|
20
|
+
**If you are the spawned subagent** (your prompt says "starting at Step 1"):
|
|
21
|
+
Continue to Step 1 below. At Step 2, use team mode — spawn the 5 teammates in parallel.
|
|
22
|
+
|
|
5
23
|
## Step 1: Load Existing Context
|
|
6
24
|
|
|
7
25
|
Read:
|
|
@@ -22,15 +40,15 @@ ALL TEAMMATES read first:
|
|
|
22
40
|
- CLAUDE.md (if exists)
|
|
23
41
|
- .gsd-t/contracts/ (if exists)
|
|
24
42
|
|
|
25
|
-
- Teammate "architecture": Analyze project structure, tech stack,
|
|
43
|
+
- Teammate "architecture" (model: haiku): Analyze project structure, tech stack,
|
|
26
44
|
data flow, patterns. Write findings to .gsd-t/scan/architecture.md
|
|
27
|
-
- Teammate "business-rules": Extract all embedded business logic,
|
|
45
|
+
- Teammate "business-rules" (model: haiku): Extract all embedded business logic,
|
|
28
46
|
validation, auth rules, workflows. Write to .gsd-t/scan/business-rules.md
|
|
29
|
-
- Teammate "security": Full security audit — auth, injection, exposure,
|
|
47
|
+
- Teammate "security" (model: sonnet): Full security audit — auth, injection, exposure,
|
|
30
48
|
dependencies. Write to .gsd-t/scan/security.md
|
|
31
|
-
- Teammate "quality": Dead code, duplication, complexity, test gaps,
|
|
49
|
+
- Teammate "quality" (model: sonnet): Dead code, duplication, complexity, test gaps,
|
|
32
50
|
performance, stale deps. Write to .gsd-t/scan/quality.md
|
|
33
|
-
- Teammate "contracts": Compare .gsd-t/contracts/ to actual implementation,
|
|
51
|
+
- Teammate "contracts" (model: haiku): Compare .gsd-t/contracts/ to actual implementation,
|
|
34
52
|
find drift and undocumented interfaces. Write to .gsd-t/scan/contract-drift.md
|
|
35
53
|
(skip if no contracts exist)
|
|
36
54
|
|
package/commands/gsd-t-status.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
You are checking the current state of the project across all domains.
|
|
4
4
|
|
|
5
|
+
## Launch via Subagent
|
|
6
|
+
|
|
7
|
+
To keep the main conversation context lean, run status via a Task subagent.
|
|
8
|
+
|
|
9
|
+
**If you are the orchestrating agent** (you received the slash command directly):
|
|
10
|
+
Spawn a fresh subagent using the Task tool:
|
|
11
|
+
```
|
|
12
|
+
subagent_type: general-purpose
|
|
13
|
+
model: haiku
|
|
14
|
+
prompt: "You are running gsd-t-status. Working directory: {current project root}
|
|
15
|
+
Read .gsd-t/progress.md and execute the full status report workflow."
|
|
16
|
+
```
|
|
17
|
+
Wait for the subagent to complete. Relay its output to the user. **Do not read files yourself.**
|
|
18
|
+
|
|
19
|
+
**If you are the spawned subagent** (your prompt says "running gsd-t-status"):
|
|
20
|
+
Continue below.
|
|
21
|
+
|
|
5
22
|
## Read These Files
|
|
6
23
|
|
|
7
24
|
1. `.gsd-t/progress.md`
|
|
@@ -21,18 +21,17 @@ Identify:
|
|
|
21
21
|
- Naming conventions
|
|
22
22
|
- Test run commands (from package.json scripts, Makefile, or CI config)
|
|
23
23
|
|
|
24
|
-
## Step 2:
|
|
24
|
+
## Step 2: Contract Coverage Audit
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Perform inline contract testing and gap analysis:
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
```
|
|
28
|
+
1. Read all contracts in `.gsd-t/contracts/` — identify the interface each one defines
|
|
29
|
+
2. For each contract, check whether a test file exists that validates it
|
|
30
|
+
3. Run the full test suite: `npm test` (or project equivalent)
|
|
31
|
+
4. Identify gaps: contracts with no tests, stale tests referencing removed APIs, uncovered code paths
|
|
32
|
+
5. Report: coverage gaps, stale tests, and recommended test tasks
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
Test-sync cannot complete if critical contract gaps remain unaddressed.
|
|
36
35
|
|
|
37
36
|
## Step 3: Map Code to Tests
|
|
38
37
|
|
package/commands/gsd-t-verify.md
CHANGED
|
@@ -12,18 +12,17 @@ Read:
|
|
|
12
12
|
5. `docs/requirements.md` — original requirements
|
|
13
13
|
6. All source code
|
|
14
14
|
|
|
15
|
-
## Step 2:
|
|
15
|
+
## Step 2: Full Test Audit (Inline)
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Run the full test audit directly:
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
```
|
|
19
|
+
1. Run the full test suite: `npm test` (or project equivalent) — record pass/fail counts
|
|
20
|
+
2. Read all contracts in `.gsd-t/contracts/` — verify each has at least one test validating it
|
|
21
|
+
3. Check acceptance criteria from domain task lists — verify each is tested
|
|
22
|
+
4. Run E2E suite if `playwright.config.*` exists
|
|
23
|
+
5. Report: comprehensive test results with pass/fail counts and coverage gaps
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
Verification cannot complete if any test fails or critical contract gaps remain.
|
|
27
26
|
|
|
28
27
|
## Step 3: Define Verification Dimensions
|
|
29
28
|
|
|
@@ -40,6 +39,12 @@ Standard dimensions (adjust based on project):
|
|
|
40
39
|
5. **E2E Tests**: Run the FULL Playwright suite — all specs must pass. If new features lack specs, create them before proceeding.
|
|
41
40
|
6. **Security**: Auth flows, input validation, data exposure, dependencies
|
|
42
41
|
7. **Integration Integrity**: Do the seams between domains hold under stress?
|
|
42
|
+
8. **Requirements Traceability Close-Out**: Mark verified requirements as complete and report orphans:
|
|
43
|
+
- Read `docs/requirements.md` traceability table (added by plan phase)
|
|
44
|
+
- For each REQ-ID that is fully implemented and tested: update Status to `complete` in the traceability table
|
|
45
|
+
- **Orphan report**: List any REQ-IDs with no task mapping (planning gap) and any tasks with no REQ-ID (potential scope creep)
|
|
46
|
+
- Orphaned requirements = WARN (not blocking unless critical)
|
|
47
|
+
- Update `docs/requirements.md` with the close-out results
|
|
43
48
|
|
|
44
49
|
## Step 4: Execute Verification
|
|
45
50
|
|
|
@@ -101,12 +106,7 @@ Teammate assignments:
|
|
|
101
106
|
- Secret/credential handling
|
|
102
107
|
Report: severity-ranked findings.
|
|
103
108
|
|
|
104
|
-
|
|
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.
|
|
109
|
+
Lead: After receiving teammate reports, spawn a Task subagent to run the full test suite and contract audit. Collect all reports, synthesize, create remediation plan.
|
|
110
110
|
```
|
|
111
111
|
|
|
112
112
|
## Step 5: Compile Verification Report
|
package/commands/gsd-t-wave.md
CHANGED
|
@@ -120,14 +120,18 @@ Spawn agent → `commands/gsd-t-complete-milestone.md`
|
|
|
120
120
|
|
|
121
121
|
### Between Each Phase
|
|
122
122
|
|
|
123
|
-
After each agent completes:
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
After each agent completes, run this spot-check before proceeding:
|
|
124
|
+
|
|
125
|
+
1. **Status check**: Read `.gsd-t/progress.md` — verify the phase updated status correctly (no FAILED markers, status matches expected phase completion state)
|
|
126
|
+
2. **Git check**: Run `git log --oneline -5` — verify commits were made during this phase (if execute/integrate: at least one commit per task completed)
|
|
127
|
+
3. **Filesystem check**: Verify key output files exist on disk — e.g., for partition: `.gsd-t/domains/*/scope.md` and `.gsd-t/contracts/` files; for execute: newly created source files; for verify: `.gsd-t/verify-report.md`. Do not trust agent-reported completions alone.
|
|
128
|
+
4. Report to user:
|
|
126
129
|
```
|
|
127
130
|
✅ {Phase} complete — {agent's one-line summary}
|
|
131
|
+
📋 Spot-check: {N} commits | {N} output files verified | no FAILED markers
|
|
128
132
|
```
|
|
129
|
-
|
|
130
|
-
|
|
133
|
+
5. If spot-check fails: report the discrepancy, re-spawn the phase agent once to correct it, then re-verify. If still failing: stop and report to user.
|
|
134
|
+
6. Proceed to next phase
|
|
131
135
|
|
|
132
136
|
## Step 4: Autonomy Behavior
|
|
133
137
|
|
package/docs/GSD-T-README.md
CHANGED
|
@@ -112,6 +112,8 @@ GSD-T reads all state files and tells you exactly where you left off.
|
|
|
112
112
|
| `/user:gsd-t-resume` | Restore context, continue | Manual |
|
|
113
113
|
| `/user:gsd-t-quick` | Fast task with GSD-T guarantees | Manual |
|
|
114
114
|
| `/user:gsd-t-debug` | Systematic debugging with state | Manual |
|
|
115
|
+
| `/user:gsd-t-health` | Validate .gsd-t/ structure, optionally repair | Manual |
|
|
116
|
+
| `/user:gsd-t-pause` | Save exact position for reliable resume | Manual |
|
|
115
117
|
| `/user:gsd-t-log` | Sync progress Decision Log with recent git activity | Manual |
|
|
116
118
|
| `/user:gsd-t-version-update` | Update GSD-T to latest version | Manual |
|
|
117
119
|
| `/user:gsd-t-version-update-all` | Update GSD-T + all registered projects | Manual |
|