@tekyzinc/gsd-t 2.24.8 → 2.28.13
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 +50 -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 +20 -6
- package/commands/gsd-t-partition.md +1 -14
- package/commands/gsd-t-pause.md +78 -0
- package/commands/gsd-t-plan.md +84 -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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,61 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to GSD-T are documented here. Updated with each release.
|
|
4
4
|
|
|
5
|
+
## [2.28.10] - 2026-02-18
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- **Milestone 13: Tooling & UX** — Infrastructure and UX improvements:
|
|
9
|
+
- **`scripts/gsd-t-tools.js`**: New zero-dependency Node.js CLI utility returning compact JSON. Subcommands: `state get/set` (read/write progress.md keys), `validate` (check required files), `parse progress --section` (extract named sections), `list domains|contracts`, `git pre-commit-check` (branch/status/last-commit), `template scope|tasks <domain>`
|
|
10
|
+
- **`scripts/gsd-t-statusline.js`**: New statusline script for Claude Code. Reads GSD-T project state and optionally reads `CLAUDE_CONTEXT_TOKENS_USED`/`CLAUDE_CONTEXT_TOKENS_MAX` env vars to show a color-coded context usage bar (green→yellow→orange→red). Configure via `"statusLine": "node ~/.claude/scripts/gsd-t-statusline.js"` in `settings.json`
|
|
11
|
+
- **`gsd-t-health`**: New slash command validating `.gsd-t/` project structure. Checks all required files, directories, version consistency, status validity, contract integrity, and domain integrity. `--repair` creates any missing files from templates. Reports HEALTHY / DEGRADED / BROKEN
|
|
12
|
+
- **`gsd-t-pause`**: New slash command saving exact position to `.gsd-t/continue-here-{timestamp}.md` with milestone, phase, domain, task, last completed action, next action, and open items
|
|
13
|
+
- Both scripts automatically installed to `~/.claude/scripts/` during `npx @tekyzinc/gsd-t install/update`
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
- **`gsd-t-resume`**: Now reads the most recent `.gsd-t/continue-here-*.md` file (if present) as the primary resume point before falling back to `progress.md`. Deletes the continue-here file after consuming it
|
|
17
|
+
- **`gsd-t-plan`**: Wave Execution Groups added to `integration-points.md` format — groups tasks into parallel-safe waves with checkpoints between them. Wave rules: same-wave tasks share no files and have no dependencies; different-wave tasks depend on each other's output or modify shared files
|
|
18
|
+
- **`gsd-t-execute`**: Reads Wave Execution Groups from `integration-points.md` and executes wave-by-wave. Tasks within a wave are parallel-safe; checkpoints between waves verify contract compliance before proceeding. Team mode now spawns teammates only within the same wave
|
|
19
|
+
- **`gsd-t-health`** and **`gsd-t-pause`** added to all reference files (help, README, GSD-T-README, CLAUDE-global template, user CLAUDE.md)
|
|
20
|
+
- Total command count: 43 → **45** (41 GSD-T workflow + 4 utility)
|
|
21
|
+
|
|
22
|
+
## [2.27.10] - 2026-02-18
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- **Milestone 12: Planning Intelligence** — Three improvements to correctness across milestones:
|
|
26
|
+
- **CONTEXT.md from discuss**: `gsd-t-discuss` now creates `.gsd-t/CONTEXT.md` with three sections — Locked Decisions (plan must implement exactly), Deferred Ideas (plan must NOT implement), and Claude's Discretion (free to decide). New Step 5 added to discuss; steps renumbered
|
|
27
|
+
- **Plan fidelity enforcement**: `gsd-t-plan` reads CONTEXT.md and maps every Locked Decision to at least one task. Also produces a REQ-ID → domain/task traceability table in `docs/requirements.md`
|
|
28
|
+
- **Plan validation checker**: A Task subagent validates the plan after creation — checks REQ coverage, Locked Decision mapping, task completeness, cross-domain dependencies, and contract existence. Max 3 fix iterations before stopping
|
|
29
|
+
- **Requirements close-out in verify**: `gsd-t-verify` marks matched requirements as `complete` in the traceability table and reports orphaned requirements and unanchored tasks
|
|
30
|
+
|
|
31
|
+
## [2.26.10] - 2026-02-18
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
- **Milestone 11: Execution Quality** — Three improvements to execution reliability:
|
|
35
|
+
- **Deviation Rules**: `execute`, `quick`, and `debug` now include a 4-rule deviation protocol — auto-fix bugs (3-attempt limit), add minimum missing dependencies, fix blockers, and STOP for architectural changes. Failed attempts log to `.gsd-t/deferred-items.md`
|
|
36
|
+
- **Atomic per-task commits**: `execute` now commits after each task using `feat({domain}/task-{N}): {description}` format instead of batching at phase end. Team mode instructions updated with the same requirement
|
|
37
|
+
- **Wave spot-check**: Between-phase verification in `wave` now checks git log (commits present), filesystem (output files exist), and FAILED markers in progress.md — not just agent-reported status
|
|
38
|
+
|
|
39
|
+
## [2.25.10] - 2026-02-18
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
- **Milestone 10: Token Efficiency** — QA overhead significantly reduced across all phases:
|
|
43
|
+
- `partition` and `plan`: QA spawn removed (no code produced in these phases)
|
|
44
|
+
- `test-sync`, `verify`, `complete-milestone`: contract testing and gap analysis performed inline (no QA teammate)
|
|
45
|
+
- `execute`, `integrate`: QA now spawned via lightweight Task subagent instead of TeamCreate teammate
|
|
46
|
+
- `quick`, `debug`: QA spawn removed; tests run inline in the existing Test & Verify step; both commands now self-spawn as Task subagents (Step 0) for fresh context windows
|
|
47
|
+
- `scan`, `status`: wrap themselves as Task subagents for fresh context on each invocation
|
|
48
|
+
- Global CLAUDE.md QA Mandatory section updated to reflect the new per-command QA method
|
|
49
|
+
|
|
50
|
+
## [2.24.10] - 2026-02-18
|
|
51
|
+
|
|
52
|
+
### Changed
|
|
53
|
+
- **Versioning scheme: patch numbers are always 2 digits**: Patch segment now starts at 10 (not 0) after any minor or major reset. Incrementing continues normally (10→11→12…). Semver validity is preserved — no leading zeros. `checkin.md` and `gsd-t-complete-milestone.md` updated with the new convention. `gsd-t-init` will initialize new projects at `0.1.10`
|
|
54
|
+
|
|
55
|
+
## [2.24.9] - 2026-02-18
|
|
56
|
+
|
|
57
|
+
### Changed
|
|
58
|
+
- **Default model**: Example settings.json updated from `claude-opus-4-6` to `claude-sonnet-4-6` (faster, lower token usage)
|
|
59
|
+
|
|
5
60
|
## [2.24.8] - 2026-02-18
|
|
6
61
|
|
|
7
62
|
### Fixed
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ A methodology for reliable, parallelizable development using Claude Code with op
|
|
|
18
18
|
npx @tekyzinc/gsd-t install
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
This installs
|
|
21
|
+
This installs 41 GSD-T commands + 4 utility commands (45 total) to `~/.claude/commands/` and the global CLAUDE.md to `~/.claude/CLAUDE.md`. Works on Windows, Mac, and Linux.
|
|
22
22
|
|
|
23
23
|
### Start Using It
|
|
24
24
|
|
|
@@ -143,6 +143,8 @@ This will replace changed command files, back up your CLAUDE.md if customized, a
|
|
|
143
143
|
| `/user:gsd-t-resume` | Restore context, continue | Manual |
|
|
144
144
|
| `/user:gsd-t-quick` | Fast task with GSD-T guarantees | Manual |
|
|
145
145
|
| `/user:gsd-t-debug` | Systematic debugging with state | Manual |
|
|
146
|
+
| `/user:gsd-t-health` | Validate .gsd-t/ structure, optionally repair | Manual |
|
|
147
|
+
| `/user:gsd-t-pause` | Save exact position for reliable resume | Manual |
|
|
146
148
|
| `/user:gsd-t-log` | Sync progress Decision Log with recent git activity | Manual |
|
|
147
149
|
| `/user:gsd-t-version-update` | Update GSD-T to latest version | Manual |
|
|
148
150
|
| `/user:gsd-t-version-update-all` | Update GSD-T + all registered projects | Manual |
|
|
@@ -294,8 +296,8 @@ get-stuff-done-teams/
|
|
|
294
296
|
├── LICENSE
|
|
295
297
|
├── bin/
|
|
296
298
|
│ └── gsd-t.js # CLI installer
|
|
297
|
-
├── commands/ #
|
|
298
|
-
│ ├── gsd-t-*.md #
|
|
299
|
+
├── commands/ # 45 slash commands
|
|
300
|
+
│ ├── gsd-t-*.md # 41 GSD-T workflow commands
|
|
299
301
|
│ ├── gsd.md # GSD-T smart router
|
|
300
302
|
│ ├── branch.md # Git branch helper
|
|
301
303
|
│ ├── checkin.md # Auto-version + commit/push helper
|
package/bin/gsd-t.js
CHANGED
|
@@ -456,6 +456,26 @@ function configureUpdateCheckHook(scriptPath) {
|
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
+
// ─── Utility Scripts ─────────────────────────────────────────────────────────
|
|
460
|
+
|
|
461
|
+
const UTILITY_SCRIPTS = ["gsd-t-tools.js", "gsd-t-statusline.js"];
|
|
462
|
+
|
|
463
|
+
function installUtilityScripts() {
|
|
464
|
+
ensureDir(SCRIPTS_DIR);
|
|
465
|
+
for (const script of UTILITY_SCRIPTS) {
|
|
466
|
+
const src = path.join(PKG_SCRIPTS, script);
|
|
467
|
+
const dest = path.join(SCRIPTS_DIR, script);
|
|
468
|
+
if (!fs.existsSync(src)) continue;
|
|
469
|
+
const srcContent = fs.readFileSync(src, "utf8");
|
|
470
|
+
const destContent = fs.existsSync(dest) ? fs.readFileSync(dest, "utf8") : "";
|
|
471
|
+
if (normalizeEol(srcContent) !== normalizeEol(destContent)) {
|
|
472
|
+
copyFile(src, dest, script);
|
|
473
|
+
} else {
|
|
474
|
+
info(`${script} unchanged`);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
|
|
459
479
|
// ─── Commands ────────────────────────────────────────────────────────────────
|
|
460
480
|
|
|
461
481
|
function installCommands(isUpdate) {
|
|
@@ -576,6 +596,9 @@ function doInstall(opts = {}) {
|
|
|
576
596
|
|
|
577
597
|
heading("Update Check (Session Start)");
|
|
578
598
|
installUpdateCheck();
|
|
599
|
+
|
|
600
|
+
heading("Utility Scripts");
|
|
601
|
+
installUtilityScripts();
|
|
579
602
|
saveInstalledVersion();
|
|
580
603
|
|
|
581
604
|
showInstallSummary(gsdtCommands.length, utilityCommands.length);
|
package/commands/checkin.md
CHANGED
|
@@ -16,7 +16,11 @@ Automatically stage, commit, and push all updated files to GitHub with automatic
|
|
|
16
16
|
- **minor**: New features, new commands, new capabilities
|
|
17
17
|
- **major**: Breaking changes, major rework, incompatible API changes
|
|
18
18
|
6. Read the current version from `package.json`
|
|
19
|
-
7. Bump the version according to the determined type
|
|
19
|
+
7. Bump the version according to the determined type:
|
|
20
|
+
- **patch**: increment patch by 1 (e.g., `2.24.10` → `2.24.11`)
|
|
21
|
+
- **minor**: increment minor, reset patch to **10** (e.g., `2.24.11` → `2.25.10`)
|
|
22
|
+
- **major**: increment major, reset minor to 0, reset patch to **10** (e.g., `2.24.11` → `3.0.10`)
|
|
23
|
+
- **Patch numbers are always 2 digits (≥10).** After any minor/major reset, start at 10, never 0 or 1.
|
|
20
24
|
8. Update the version in `package.json`
|
|
21
25
|
9. If `.gsd-t/progress.md` exists, check for a `## Version` line and update it (or add one after the `## Date` line)
|
|
22
26
|
|
|
@@ -111,9 +111,10 @@ GSD-T tracks project version in `.gsd-t/progress.md` using semantic versioning:
|
|
|
111
111
|
Determine the version bump based on the milestone:
|
|
112
112
|
1. Read current version from `.gsd-t/progress.md`
|
|
113
113
|
2. Assess milestone scope:
|
|
114
|
-
- Was this a major/breaking milestone? → bump **major**, reset minor
|
|
115
|
-
- Was this a feature milestone? → bump **minor**, reset patch to
|
|
116
|
-
- Was this a bugfix/cleanup/debt milestone? → bump **patch**
|
|
114
|
+
- Was this a major/breaking milestone? → bump **major**, reset minor to 0, reset patch to **10**
|
|
115
|
+
- Was this a feature milestone? → bump **minor**, reset patch to **10**
|
|
116
|
+
- Was this a bugfix/cleanup/debt milestone? → bump **patch** (increment by 1)
|
|
117
|
+
- **Patch numbers are always 2 digits (≥10).** After any minor/major reset, start at 10, never 0 or 1.
|
|
117
118
|
3. Update version in `.gsd-t/progress.md`
|
|
118
119
|
4. If a package manifest exists (`package.json`, `pyproject.toml`, `Cargo.toml`, etc.), update its version to match
|
|
119
120
|
5. Update `README.md` version badge or version reference if present
|
|
@@ -175,20 +176,9 @@ Before creating the git tag, verify all documentation is up to date:
|
|
|
175
176
|
|
|
176
177
|
### This is the LAST GATE before tagging — nothing should be undocumented.
|
|
177
178
|
|
|
178
|
-
## Step 10:
|
|
179
|
+
## Step 10: Test Verification
|
|
179
180
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
```
|
|
183
|
-
Teammate "qa": Read commands/gsd-t-qa.md for your full instructions.
|
|
184
|
-
Phase context: complete-milestone. Read .gsd-t/contracts/ for contract definitions.
|
|
185
|
-
Run final test audit before milestone archive. Verify all contract tests pass.
|
|
186
|
-
Report: final test pass/fail counts and any unresolved gaps.
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Wait for QA agent to complete. QA failure blocks milestone completion.
|
|
190
|
-
|
|
191
|
-
Then verify the milestone is truly complete:
|
|
181
|
+
Verify the milestone is truly complete:
|
|
192
182
|
|
|
193
183
|
1. **Run the full test suite**: Execute ALL tests — unit, integration, and E2E
|
|
194
184
|
2. **Run Playwright E2E** (if configured): Detect `playwright.config.*` or Playwright in dependencies. If present, run the full Playwright suite. If specs are missing or stale, invoke `gsd-t-test-sync` first.
|
package/commands/gsd-t-debug.md
CHANGED
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
You are debugging an issue in a contract-driven project. Your approach should identify whether the bug is within a domain or at a contract boundary.
|
|
4
4
|
|
|
5
|
+
## Step 0: Launch via Subagent
|
|
6
|
+
|
|
7
|
+
To give this debug session a fresh context window and prevent compaction, 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-debug for this issue: {$ARGUMENTS}
|
|
14
|
+
Working directory: {current project root}
|
|
15
|
+
Read CLAUDE.md and .gsd-t/progress.md for project context, then execute gsd-t-debug 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
|
|
6
23
|
|
|
7
24
|
Read:
|
|
@@ -40,20 +57,17 @@ The contract didn't specify something it should have. Symptoms:
|
|
|
40
57
|
|
|
41
58
|
→ Update the contract, then fix implementations on both sides.
|
|
42
59
|
|
|
43
|
-
## Step 3:
|
|
44
|
-
|
|
45
|
-
Spawn the QA teammate to handle regression testing:
|
|
60
|
+
## Step 3: Debug (Solo or Team)
|
|
46
61
|
|
|
47
|
-
|
|
48
|
-
Teammate "qa": Read commands/gsd-t-qa.md for your full instructions.
|
|
49
|
-
Phase context: debug. Read .gsd-t/contracts/ for relevant contracts.
|
|
50
|
-
Write a regression test for the bug once root cause is identified.
|
|
51
|
-
Report: regression test status and related test coverage.
|
|
52
|
-
```
|
|
62
|
+
### Deviation Rules
|
|
53
63
|
|
|
54
|
-
|
|
64
|
+
When you encounter unexpected situations during the fix:
|
|
65
|
+
1. **Related bug found while tracing** → Fix it immediately (up to 3 attempts). Log to `.gsd-t/deferred-items.md` if it recurs.
|
|
66
|
+
2. **Missing functionality required for the fix** → Add minimum needed. Note in commit message.
|
|
67
|
+
3. **Blocker (missing file, wrong API response)** → Fix blocker and continue. Log if non-trivial.
|
|
68
|
+
4. **Architectural change required to fix correctly** → STOP. Explain what exists, what needs to change, what breaks, and a migration path. Wait for user approval. Never self-approve.
|
|
55
69
|
|
|
56
|
-
|
|
70
|
+
**3-attempt limit**: If your fix doesn't work after 3 attempts, log to `.gsd-t/deferred-items.md` and stop trying.
|
|
57
71
|
|
|
58
72
|
### Solo Mode
|
|
59
73
|
1. Reproduce the issue
|
|
@@ -77,7 +91,7 @@ Create an agent team to debug:
|
|
|
77
91
|
First to find root cause: message the lead with findings.
|
|
78
92
|
```
|
|
79
93
|
|
|
80
|
-
## Step
|
|
94
|
+
## Step 4: Document Ripple
|
|
81
95
|
|
|
82
96
|
After fixing, assess what documentation was affected by the change and update ALL relevant files:
|
|
83
97
|
|
|
@@ -97,7 +111,7 @@ After fixing, assess what documentation was affected by the change and update AL
|
|
|
97
111
|
|
|
98
112
|
### Skip what's not affected — don't update docs for the sake of updating them.
|
|
99
113
|
|
|
100
|
-
## Step
|
|
114
|
+
## Step 5: Test Verification (run tests confirming fix)
|
|
101
115
|
|
|
102
116
|
Before committing, ensure the fix is solid:
|
|
103
117
|
|
|
@@ -81,7 +81,31 @@ For each decision:
|
|
|
81
81
|
2. Update domain `scope.md` and `constraints.md` if the decision affects boundaries
|
|
82
82
|
3. Add to `.gsd-t/progress.md` Decision Log with date and rationale
|
|
83
83
|
|
|
84
|
-
## Step 5:
|
|
84
|
+
## Step 5: Create CONTEXT.md
|
|
85
|
+
|
|
86
|
+
After finalizing decisions, create or update `.gsd-t/CONTEXT.md`:
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
# Discuss CONTEXT — {Milestone Name}
|
|
90
|
+
Generated: {date}
|
|
91
|
+
|
|
92
|
+
## Locked Decisions
|
|
93
|
+
Decisions made in this session. The plan phase MUST implement each of these exactly.
|
|
94
|
+
- {Decision 1 — specific and implementable}
|
|
95
|
+
- {Decision 2}
|
|
96
|
+
|
|
97
|
+
## Deferred Ideas
|
|
98
|
+
Good ideas surfaced but NOT in scope for this milestone. Plan must NOT implement these.
|
|
99
|
+
- {Idea 1 — brief description of what was deferred and why}
|
|
100
|
+
|
|
101
|
+
## Claude's Discretion
|
|
102
|
+
Implementation details not specified — Claude can choose freely when executing.
|
|
103
|
+
- {Detail 1 — e.g., "Use either X or Y approach for the logging layer"}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The plan phase planner must read this file and map every Locked Decision to at least one task. If a Locked Decision has no corresponding task, the plan is incomplete.
|
|
107
|
+
|
|
108
|
+
## Step 6: Document Ripple
|
|
85
109
|
|
|
86
110
|
Decisions don't just affect contracts — they can change the broader documentation:
|
|
87
111
|
|
|
@@ -97,7 +121,7 @@ Decisions don't just affect contracts — they can change the broader documentat
|
|
|
97
121
|
|
|
98
122
|
### Skip what's not affected.
|
|
99
123
|
|
|
100
|
-
## Step
|
|
124
|
+
## Step 7: Test Verification
|
|
101
125
|
|
|
102
126
|
If decisions resulted in contract or code changes:
|
|
103
127
|
|
|
@@ -105,7 +129,7 @@ If decisions resulted in contract or code changes:
|
|
|
105
129
|
2. **Verify passing**: All tests must pass. If any fail from contract changes, fix before proceeding (up to 2 attempts)
|
|
106
130
|
3. **Flag test gaps**: If decisions created new requirements with no test coverage, note them for the plan phase
|
|
107
131
|
|
|
108
|
-
## Step
|
|
132
|
+
## Step 8: Validate Contracts
|
|
109
133
|
|
|
110
134
|
After all updates:
|
|
111
135
|
- [ ] All contracts are internally consistent (no conflicting types/shapes)
|
|
@@ -113,7 +137,7 @@ After all updates:
|
|
|
113
137
|
- [ ] Every domain's constraints reflect the decisions made
|
|
114
138
|
- [ ] Integration points are updated with any new dependencies
|
|
115
139
|
|
|
116
|
-
## Step
|
|
140
|
+
## Step 9: Report and Stop
|
|
117
141
|
|
|
118
142
|
Present to the user:
|
|
119
143
|
1. Decisions made (with brief rationale)
|
|
@@ -19,23 +19,60 @@ Identify:
|
|
|
19
19
|
- Which tasks are unblocked (no pending dependencies)
|
|
20
20
|
- Which tasks are blocked (waiting on checkpoints)
|
|
21
21
|
|
|
22
|
-
## Step 2:
|
|
22
|
+
## Step 2: QA Setup
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
After completing each task, spawn a QA subagent via the Task tool to run tests:
|
|
25
25
|
|
|
26
26
|
```
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
Task subagent (general-purpose, model: haiku):
|
|
28
|
+
"Run the full test suite for this project and report pass/fail counts.
|
|
29
|
+
Read .gsd-t/contracts/ for contract definitions.
|
|
30
|
+
Write edge case tests for any new code paths in this task: {task description}.
|
|
31
|
+
Report: test pass/fail status and any coverage gaps found."
|
|
31
32
|
```
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
**OBSERVABILITY LOGGING (MANDATORY):**
|
|
35
|
+
Before spawning — run via Bash:
|
|
36
|
+
`T_START=$(date +%s) && DT_START=$(date +"%Y-%m-%d %H:%M") && TOK_START=${CLAUDE_CONTEXT_TOKENS_USED:-0} && TOK_MAX=${CLAUDE_CONTEXT_TOKENS_MAX:-200000}`
|
|
37
|
+
After subagent returns — run via Bash:
|
|
38
|
+
`T_END=$(date +%s) && DT_END=$(date +"%Y-%m-%d %H:%M") && TOK_END=${CLAUDE_CONTEXT_TOKENS_USED:-0} && DURATION=$((T_END-T_START))`
|
|
39
|
+
Compute tokens and compaction:
|
|
40
|
+
- No compaction (TOK_END >= TOK_START): `TOKENS=$((TOK_END-TOK_START))`, COMPACTED=null
|
|
41
|
+
- Compaction detected (TOK_END < TOK_START): `TOKENS=$(((TOK_MAX-TOK_START)+TOK_END))`, COMPACTED=$DT_END
|
|
42
|
+
Append to `.gsd-t/token-log.md` (create with header `| Datetime-start | Datetime-end | Command | Step | Model | Duration(s) | Notes | Tokens | Compacted |` if missing):
|
|
43
|
+
`| {DT_START} | {DT_END} | gsd-t-execute | Step 2 | haiku | {DURATION}s | task: {task-name}, {pass/fail} | {TOKENS} | {COMPACTED} |`
|
|
44
|
+
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):
|
|
45
|
+
`| {DT_START} | gsd-t-execute | Step 2 | haiku | {DURATION}s | {severity} | {finding} |`
|
|
46
|
+
|
|
47
|
+
QA failure on any task blocks proceeding to the next task.
|
|
34
48
|
|
|
35
49
|
## Step 3: Choose Execution Mode
|
|
36
50
|
|
|
51
|
+
### Wave Scheduling (read first)
|
|
52
|
+
|
|
53
|
+
Before choosing solo or team mode, read the `## Wave Execution Groups` section in `.gsd-t/contracts/integration-points.md` (added by the plan phase).
|
|
54
|
+
|
|
55
|
+
**If wave groups are present**:
|
|
56
|
+
- Execute wave-by-wave: complete all tasks in Wave 1 before starting Wave 2
|
|
57
|
+
- Within each wave, tasks marked as parallel-safe can run concurrently (team mode) or be interleaved (solo mode)
|
|
58
|
+
- At each wave boundary: run the CHECKPOINT — verify contract compliance — before proceeding
|
|
59
|
+
- File conflict detection: if two tasks in the same wave list the same file in their `scope.md` ownership, move one to the next wave
|
|
60
|
+
|
|
61
|
+
**If no wave groups are defined** (older plans): fall back to the `Execution Order` list.
|
|
62
|
+
|
|
37
63
|
### Solo Mode (default)
|
|
38
|
-
Execute tasks yourself following the execution order in `integration-points.md`.
|
|
64
|
+
Execute tasks yourself following the wave groups (or execution order) in `integration-points.md`.
|
|
65
|
+
|
|
66
|
+
### Deviation Rules (MANDATORY for every task)
|
|
67
|
+
|
|
68
|
+
When you encounter unexpected situations during a task:
|
|
69
|
+
|
|
70
|
+
1. **Bug in existing code blocking progress** → Fix it immediately, up to 3 attempts. If still blocked after 3 attempts, add to `.gsd-t/deferred-items.md` and move to the next task.
|
|
71
|
+
2. **Missing functionality that the task clearly requires** → Add the minimum required code to unblock the task. Do not gold-plate. Document in commit message.
|
|
72
|
+
3. **Blocker (missing file, wrong API, broken dependency)** → Fix the blocker and continue. Add a note to `.gsd-t/deferred-items.md` if the fix was more than trivial.
|
|
73
|
+
4. **Architectural change required** → STOP immediately. Do NOT proceed. Apply the Destructive Action Guard: explain what exists, what needs to change, what breaks, and a migration path. Wait for explicit user approval.
|
|
74
|
+
|
|
75
|
+
**3-attempt limit**: If any fix attempt fails 3 times, move on — don't loop. Log to `.gsd-t/deferred-items.md`.
|
|
39
76
|
|
|
40
77
|
For each task:
|
|
41
78
|
1. Read the task description, files list, and contract refs
|
|
@@ -56,12 +93,12 @@ For each task:
|
|
|
56
93
|
d. **"No feature code without test code"** — implementation and tests are ONE deliverable, not two separate steps
|
|
57
94
|
8. **Run ALL tests** — unit, integration, and full Playwright suite. Fix any failures before proceeding (up to 2 attempts)
|
|
58
95
|
9. Run the Pre-Commit Gate checklist from CLAUDE.md — update ALL affected docs BEFORE committing
|
|
59
|
-
10. Commit
|
|
96
|
+
10. **Commit immediately** after each task: `feat({domain}/task-{N}): {description}` — do NOT batch commits at phase end
|
|
60
97
|
11. Update `.gsd-t/progress.md` — mark task complete
|
|
61
98
|
12. If you've reached a CHECKPOINT in integration-points.md, pause and verify the contract before continuing
|
|
62
99
|
|
|
63
100
|
### Team Mode (when agent teams are enabled)
|
|
64
|
-
Spawn teammates for
|
|
101
|
+
Spawn teammates for domains within the same wave. Only domains in the same wave can run in parallel — do not spawn teammates for domains in different waves simultaneously:
|
|
65
102
|
|
|
66
103
|
```
|
|
67
104
|
Create an agent team for execution:
|
|
@@ -86,18 +123,14 @@ RULES FOR ALL TEAMMATES:
|
|
|
86
123
|
- After completing each task, message the lead with:
|
|
87
124
|
"DONE: {domain} Task {N} - {summary of what was created/modified}"
|
|
88
125
|
- If you need to deviate from a contract, STOP and message the lead
|
|
89
|
-
- Commit after each task
|
|
126
|
+
- **Commit immediately after each task**: `feat({domain}/task-{N}): {description}` — do NOT batch commits
|
|
127
|
+
- **Deviation Rules**: (1) Bug blocking progress → fix, 3 attempts max; (2) Missing dependency → add minimum needed; (3) Blocker → fix and log to deferred-items.md; (4) Architectural change → STOP, message lead, never self-approve
|
|
90
128
|
|
|
91
129
|
Teammate assignments:
|
|
92
130
|
- Teammate "{domain-1}": Execute .gsd-t/domains/{domain-1}/tasks.md
|
|
93
131
|
- Teammate "{domain-2}": Execute .gsd-t/domains/{domain-2}/tasks.md
|
|
94
132
|
- Teammate "{domain-3}": Execute .gsd-t/domains/{domain-3}/tasks.md
|
|
95
|
-
|
|
96
|
-
Phase context: execute. Read .gsd-t/contracts/ for contract definitions.
|
|
97
|
-
Run tests continuously as tasks complete. Write edge case tests.
|
|
98
|
-
Report: test pass/fail status after each task completion.
|
|
99
|
-
|
|
100
|
-
Lead responsibilities:
|
|
133
|
+
Lead responsibilities (QA is handled via Task subagent — spawn one after each domain checkpoint):
|
|
101
134
|
- Use delegate mode (Shift+Tab)
|
|
102
135
|
- Track completions from teammate messages
|
|
103
136
|
- When a CHECKPOINT is reached:
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# GSD-T: Health — Validate Project Structure
|
|
2
|
+
|
|
3
|
+
You are diagnosing the health of a GSD-T project. Check every required file and directory, report findings, and optionally repair missing pieces.
|
|
4
|
+
|
|
5
|
+
## Step 0: Launch via Subagent (default)
|
|
6
|
+
|
|
7
|
+
When invoked directly by the user, spawn yourself as a Task subagent for a fresh context window:
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Task subagent (general-purpose, model: haiku):
|
|
11
|
+
"Run the GSD-T health check. Read commands/gsd-t-health.md for your full instructions.
|
|
12
|
+
Arguments: {$ARGUMENTS}
|
|
13
|
+
Skip Step 0 — you are already the subagent."
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Return the subagent's output and stop. Only skip Step 0 if you are already running as a subagent.
|
|
17
|
+
|
|
18
|
+
## Step 1: Determine Mode
|
|
19
|
+
|
|
20
|
+
If `--repair` appears in $ARGUMENTS, set `REPAIR=true`. Otherwise `REPAIR=false`.
|
|
21
|
+
|
|
22
|
+
## Step 2: Check Required Structure
|
|
23
|
+
|
|
24
|
+
Check each item below. Record status as `OK`, `MISSING`, or `INVALID`.
|
|
25
|
+
|
|
26
|
+
### Root files
|
|
27
|
+
| File | Check |
|
|
28
|
+
|------|-------|
|
|
29
|
+
| `CLAUDE.md` | Exists and non-empty |
|
|
30
|
+
| `README.md` | Exists and non-empty |
|
|
31
|
+
| `.gsd-t/progress.md` | Exists, has `## Status:` and `## Version:` sections |
|
|
32
|
+
| `.gsd-t/backlog.md` | Exists |
|
|
33
|
+
| `.gsd-t/backlog-settings.md` | Exists |
|
|
34
|
+
|
|
35
|
+
### Required directories
|
|
36
|
+
| Directory | Check |
|
|
37
|
+
|-----------|-------|
|
|
38
|
+
| `.gsd-t/contracts/` | Exists |
|
|
39
|
+
| `.gsd-t/domains/` | Exists |
|
|
40
|
+
| `docs/` | Exists |
|
|
41
|
+
|
|
42
|
+
### Docs
|
|
43
|
+
| File | Check |
|
|
44
|
+
|------|-------|
|
|
45
|
+
| `docs/requirements.md` | Exists |
|
|
46
|
+
| `docs/architecture.md` | Exists |
|
|
47
|
+
| `docs/workflows.md` | Exists |
|
|
48
|
+
| `docs/infrastructure.md` | Exists |
|
|
49
|
+
|
|
50
|
+
### Active milestone (if any)
|
|
51
|
+
Read `.gsd-t/progress.md` to find active milestone. For each domain listed as active:
|
|
52
|
+
- `.gsd-t/domains/{domain}/scope.md` — exists?
|
|
53
|
+
- `.gsd-t/domains/{domain}/tasks.md` — exists?
|
|
54
|
+
- `.gsd-t/contracts/` — at least one `.md` contract file present?
|
|
55
|
+
|
|
56
|
+
## Step 3: Additional Checks
|
|
57
|
+
|
|
58
|
+
1. **Version consistency**: Read `## Version:` from `.gsd-t/progress.md`. If `package.json` exists, compare — they should match.
|
|
59
|
+
2. **Status validity**: Read `## Status:` value. Confirm it's one of: `DEFINED`, `PARTITIONED`, `DISCUSSED`, `PLANNED`, `EXECUTED`, `SYNCED`, `INTEGRATED`, `VERIFIED`, `VERIFIED-WITH-WARNINGS`, `VERIFY-FAILED`, `COMPLETED`.
|
|
60
|
+
3. **Decision Log**: Confirm `## Decision Log` section exists and has at least one entry.
|
|
61
|
+
4. **Contract integrity**: For each `.md` file in `.gsd-t/contracts/`, confirm it's non-empty.
|
|
62
|
+
5. **Domain integrity**: For each directory in `.gsd-t/domains/`, confirm at least `scope.md` exists.
|
|
63
|
+
|
|
64
|
+
## Step 4: Report Findings
|
|
65
|
+
|
|
66
|
+
Output a health report in this format:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
GSD-T Health Report
|
|
70
|
+
═══════════════════════════════════════════════════════════
|
|
71
|
+
|
|
72
|
+
Core Files
|
|
73
|
+
✓ CLAUDE.md
|
|
74
|
+
✓ README.md
|
|
75
|
+
✗ .gsd-t/progress.md — MISSING
|
|
76
|
+
✓ .gsd-t/backlog.md
|
|
77
|
+
|
|
78
|
+
Directories
|
|
79
|
+
✓ .gsd-t/contracts/
|
|
80
|
+
✗ docs/ — MISSING
|
|
81
|
+
|
|
82
|
+
Docs
|
|
83
|
+
✓ docs/requirements.md
|
|
84
|
+
✗ docs/architecture.md — MISSING
|
|
85
|
+
|
|
86
|
+
Active Milestone: {name | none}
|
|
87
|
+
✓ .gsd-t/domains/{domain}/scope.md
|
|
88
|
+
✗ .gsd-t/domains/{domain}/tasks.md — MISSING
|
|
89
|
+
|
|
90
|
+
Additional Checks
|
|
91
|
+
✓ Version: 2.27.10 (consistent with package.json)
|
|
92
|
+
✓ Status: PLANNED (valid)
|
|
93
|
+
✓ Decision Log: present
|
|
94
|
+
✗ contracts/api-contract.md — EMPTY
|
|
95
|
+
|
|
96
|
+
═══════════════════════════════════════════════════════════
|
|
97
|
+
Summary: {N} OK | {N} missing | {N} invalid
|
|
98
|
+
Overall: {HEALTHY | DEGRADED | BROKEN}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Status thresholds:
|
|
102
|
+
- **HEALTHY**: 0 missing, 0 invalid
|
|
103
|
+
- **DEGRADED**: 1-3 missing/invalid (non-critical)
|
|
104
|
+
- **BROKEN**: 4+ missing/invalid OR progress.md missing OR contracts/ missing
|
|
105
|
+
|
|
106
|
+
## Step 5: Repair (if --repair)
|
|
107
|
+
|
|
108
|
+
If `REPAIR=true` and any items are MISSING (not INVALID), create them now:
|
|
109
|
+
|
|
110
|
+
| Missing item | Repair action |
|
|
111
|
+
|--------------|---------------|
|
|
112
|
+
| `CLAUDE.md` | Create from `templates/CLAUDE-project.md` (with `{Project Name}` = directory name) |
|
|
113
|
+
| `README.md` | Create minimal `# {Project Name}\n\n_No description yet._\n` |
|
|
114
|
+
| `.gsd-t/progress.md` | Create from `templates/progress.md` |
|
|
115
|
+
| `.gsd-t/backlog.md` | Create from `templates/backlog.md` |
|
|
116
|
+
| `.gsd-t/backlog-settings.md` | Create from `templates/backlog-settings.md` |
|
|
117
|
+
| `.gsd-t/contracts/` | Create empty directory |
|
|
118
|
+
| `.gsd-t/domains/` | Create empty directory |
|
|
119
|
+
| `docs/` | Create directory |
|
|
120
|
+
| `docs/requirements.md` | Create from `templates/requirements.md` |
|
|
121
|
+
| `docs/architecture.md` | Create from `templates/architecture.md` |
|
|
122
|
+
| `docs/workflows.md` | Create from `templates/workflows.md` |
|
|
123
|
+
| `docs/infrastructure.md` | Create from `templates/infrastructure.md` |
|
|
124
|
+
| Domain `scope.md` | Create minimal scope with domain name as heading |
|
|
125
|
+
| Domain `tasks.md` | Create minimal task list with `## Tasks\n_No tasks defined yet._` |
|
|
126
|
+
|
|
127
|
+
After repair, re-run the checks and report the final state.
|
|
128
|
+
|
|
129
|
+
**Do NOT repair INVALID items** (e.g., empty contracts, bad status values) — flag them for user action.
|
|
130
|
+
|
|
131
|
+
## Step 6: Next Steps
|
|
132
|
+
|
|
133
|
+
If HEALTHY → "✅ GSD-T structure is healthy — all required files present."
|
|
134
|
+
If DEGRADED with --repair done → "✅ Repaired {N} missing files. Run /user:gsd-t-health again to confirm."
|
|
135
|
+
If DEGRADED without --repair → "⚠ Run /user:gsd-t-health --repair to create {N} missing files."
|
|
136
|
+
If BROKEN → "🔴 Project structure is broken. Run /user:gsd-t-health --repair or /user:gsd-t-init to rebuild."
|
|
137
|
+
|
|
138
|
+
$ARGUMENTS
|
package/commands/gsd-t-help.md
CHANGED
|
@@ -51,6 +51,8 @@ UTILITIES Manual
|
|
|
51
51
|
resume Restore context after break
|
|
52
52
|
quick Fast task with GSD-T guarantees
|
|
53
53
|
debug Systematic debugging with state
|
|
54
|
+
health Validate .gsd-t/ structure, optionally repair missing files
|
|
55
|
+
pause Save exact position for reliable resume later
|
|
54
56
|
promote-debt Convert techdebt items to milestones
|
|
55
57
|
populate Auto-populate docs from existing codebase
|
|
56
58
|
log Sync progress Decision Log with recent git activity
|
|
@@ -39,15 +39,38 @@ All subsequent steps run from inside the project directory.
|
|
|
39
39
|
|
|
40
40
|
Execute the full init workflow (same as `/user:gsd-t-init`):
|
|
41
41
|
|
|
42
|
-
1. Create `.gsd-t/` directory structure (contracts/, domains/, progress.md, backlog.md, backlog-settings.md)
|
|
42
|
+
1. Create `.gsd-t/` directory structure (contracts/, domains/, progress.md, backlog.md, backlog-settings.md, token-log.md, qa-issues.md)
|
|
43
43
|
2. Ensure `CLAUDE.md` exists (create starter if missing, append GSD-T section if present without it)
|
|
44
44
|
3. Create `docs/` with all 4 living document templates (skip existing files)
|
|
45
45
|
4. Ensure `README.md` exists
|
|
46
|
-
5.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
46
|
+
5. **Copy project settings**:
|
|
47
|
+
- First, ensure `~/.claude/settings.local` exists. If it does NOT, create it with these defaults:
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"permissions": {
|
|
51
|
+
"allow": [
|
|
52
|
+
"Edit",
|
|
53
|
+
"Write",
|
|
54
|
+
"Bash",
|
|
55
|
+
"Read",
|
|
56
|
+
"WebSearch",
|
|
57
|
+
"WebFetch",
|
|
58
|
+
"Skill"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"outputStyle": "default"
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
Log: "Created ~/.claude/settings.local with default permissions — update the allow list to match your security preferences."
|
|
65
|
+
- Then, if `.claude/settings.local.json` does NOT already exist in the project root:
|
|
66
|
+
- Create `.claude/` directory in the project root if needed
|
|
67
|
+
- Copy `~/.claude/settings.local` → `.claude/settings.local.json`
|
|
68
|
+
- Skip the copy silently if the target already exists
|
|
69
|
+
6. Map existing codebase if code exists
|
|
70
|
+
7. Initialize backlog with auto-derived categories
|
|
71
|
+
8. Register project in `~/.claude/.gsd-t-projects`
|
|
72
|
+
|
|
73
|
+
**If `.gsd-t/` already exists**: Skip init — it's already done. Log and continue to scan. Still check and copy settings.local (step 5) even if init is skipped.
|
|
51
74
|
|
|
52
75
|
## Step 4: Deep Codebase Scan (gsd-t-scan)
|
|
53
76
|
|