@tekyzinc/gsd-t 2.31.16 → 2.31.17

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.
@@ -19,10 +19,11 @@ Identify:
19
19
  - Which tasks are unblocked (no pending dependencies)
20
20
  - Which tasks are blocked (waiting on checkpoints)
21
21
 
22
- ## Step 2: QA Setup
22
+ ## Step 2: QA Subagent
23
23
 
24
- After completing each task, spawn a QA subagent via the Task tool to run tests:
24
+ In solo mode, QA runs inside each domain subagent (see Step 3). In team mode, the lead spawns QA subagents at each domain checkpoint using the pattern below.
25
25
 
26
+ **QA subagent prompt:**
26
27
  ```
27
28
  Task subagent (general-purpose, model: haiku):
28
29
  "Run the full test suite for this project and report pass/fail counts.
@@ -31,21 +32,9 @@ Write edge case tests for any new code paths in this task: {task description}.
31
32
  Report: test pass/fail status and any coverage gaps found."
32
33
  ```
33
34
 
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
35
  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
36
  `| {DT_START} | gsd-t-execute | Step 2 | haiku | {DURATION}s | {severity} | {finding} |`
46
37
 
47
- QA failure on any task blocks proceeding to the next task.
48
-
49
38
  ## Step 3: Choose Execution Mode
50
39
 
51
40
  ### Wave Scheduling (read first)
@@ -60,42 +49,81 @@ Before choosing solo or team mode, read the `## Wave Execution Groups` section i
60
49
 
61
50
  **If no wave groups are defined** (older plans): fall back to the `Execution Order` list.
62
51
 
63
- ### Solo Mode (default)
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`.
76
-
77
- For each task:
78
- 1. Read the task description, files list, and contract refs
79
- 2. Read the relevant contract(s) implement EXACTLY what they specify
80
- 3. Read the domain's constraints.md follow all patterns
81
- 4. **Destructive Action Guard**: Before implementing, check if the task involves any 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 with what exists, what will change, what will break, and a safe migration path. Wait for explicit approval before proceeding.
82
- 5. Implement the task
83
- 6. Verify acceptance criteria are met
84
- 7. **Write comprehensive tests for every new or changed code path** (MANDATORY — no exceptions):
85
- a. **Unit/integration tests**: Cover the happy path, common edge cases, error cases, and boundary conditions for every new or modified function
86
- b. **Playwright E2E tests** (if UI/routes/flows/modes changed): Detect `playwright.config.*` or Playwright in dependencies. If present:
87
- - Create NEW specs for new features, pages, modes, or flows — not just update existing ones
88
- - Cover: happy path, form validation errors, empty states, loading states, error states, responsive breakpoints
89
- - Cover: all feature modes/flags (e.g., if `--component` mode was added, test `--component` mode specifically)
90
- - Cover: common edge cases (network errors, invalid input, rapid clicking, back/forward navigation)
91
- - Use descriptive test names that explain the scenario being tested
92
- c. If no test framework exists: set one up as part of the task (at minimum, Playwright for E2E)
93
- d. **"No feature code without test code"** implementation and tests are ONE deliverable, not two separate steps
94
- 8. **Run ALL tests** unit, integration, and full Playwright suite. Fix any failures before proceeding (up to 2 attempts)
95
- 9. Run the Pre-Commit Gate checklist from CLAUDE.md — update ALL affected docs BEFORE committing
96
- 10. **Commit immediately** after each task: `feat({domain}/task-{N}): {description}` — do NOT batch commits at phase end
97
- 11. Update `.gsd-t/progress.md` mark task complete
98
- 12. If you've reached a CHECKPOINT in integration-points.md, pause and verify the contract before continuing
52
+ ### Solo Mode (default) — Domain Subagent Pattern
53
+
54
+ Each domain's work runs in an isolated Task subagent with a fresh context window. The orchestrator (this agent) stays lightweight — it only spawns subagents, collects summaries, verifies checkpoints, and updates progress.
55
+
56
+ **OBSERVABILITY LOGGING (MANDATORY) — repeat for every domain subagent spawn:**
57
+
58
+ Before spawning — run via Bash:
59
+ `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}`
60
+
61
+ After subagent returns run via Bash:
62
+ `T_END=$(date +%s) && DT_END=$(date +"%Y-%m-%d %H:%M") && TOK_END=${CLAUDE_CONTEXT_TOKENS_USED:-0} && DURATION=$((T_END-T_START))`
63
+
64
+ Compute tokens and compaction:
65
+ - No compaction (TOK_END >= TOK_START): `TOKENS=$((TOK_END-TOK_START))`, COMPACTED=null
66
+ - Compaction detected (TOK_END < TOK_START): `TOKENS=$(((TOK_MAX-TOK_START)+TOK_END))`, COMPACTED=$DT_END
67
+
68
+ Append to `.gsd-t/token-log.md` (create with header `| Datetime-start | Datetime-end | Command | Step | Model | Duration(s) | Notes | Tokens | Compacted |` if missing):
69
+ `| {DT_START} | {DT_END} | gsd-t-execute | domain:{domain-name} | sonnet | {DURATION}s | {N} tasks, {pass/fail} | {TOKENS} | {COMPACTED} |`
70
+
71
+ **For each domain (in wave order), spawn:**
72
+
73
+ ```
74
+ Task subagent (general-purpose, model: sonnet, mode: bypassPermissions):
75
+ "You are executing all tasks for the {domain-name} domain.
76
+
77
+ Read before starting (load your own context do not assume anything):
78
+ 1. CLAUDE.md project conventions (CRITICAL)
79
+ 2. .gsd-t/domains/{domain-name}/scope.md what you own
80
+ 3. .gsd-t/domains/{domain-name}/constraints.md patterns to follow
81
+ 4. ALL files in .gsd-t/contracts/ your interfaces
82
+ 5. .gsd-t/domains/{domain-name}/tasks.mdyour task list
83
+ 6. .gsd-t/contracts/integration-points.mdwave order and checkpoints
84
+
85
+ Execute each incomplete task in order:
86
+ 1. Read task description, files list, and contract refs
87
+ 2. Read relevant contracts implement EXACTLY what they specify
88
+ 3. Destructive Action Guard: if task involves DROP TABLE, schema changes that lose
89
+ data, removing working modules, or replacing architecture patterns → write a
90
+ NEEDS-APPROVAL entry to .gsd-t/deferred-items.md, skip the task, continue
91
+ 4. Implement the task
92
+ 5. Verify acceptance criteria are met
93
+ 6. Write comprehensive tests (MANDATORY — no feature code without test code):
94
+ - Unit/integration: happy path + edge cases + error cases for every new/changed function
95
+ - Playwright E2E (if UI/routes/flows changed): new specs for new features, cover
96
+ all modes, form validation, empty/loading/error states, common edge cases
97
+ - If no test framework exists: set one up as part of this task
98
+ 7. Run ALL tests — unit, integration, Playwright. Fix failures (up to 2 attempts)
99
+ 8. Run Pre-Commit Gate checklist from CLAUDE.md — update all affected docs BEFORE committing
100
+ 9. Commit immediately: feat({domain-name}/task-{N}): {description}
101
+ 10. Update .gsd-t/progress.md — mark task complete
102
+ 11. Spawn QA subagent (model: haiku) after each task:
103
+ 'Run the full test suite. Read .gsd-t/contracts/ for definitions.
104
+ Report: pass/fail counts and coverage gaps.'
105
+ If QA fails, fix before proceeding. Append issues to .gsd-t/qa-issues.md.
106
+
107
+ Deviation rules:
108
+ - Bug blocking progress → fix, max 3 attempts; if still blocked, log to
109
+ .gsd-t/deferred-items.md and continue to next task
110
+ - Missing dependency task requires → add minimum needed, document in commit message
111
+ - Non-trivial blocker → fix and log to .gsd-t/deferred-items.md
112
+ - Architectural change required → write NEEDS-APPROVAL to .gsd-t/deferred-items.md,
113
+ skip the task, continue — never self-approve structural changes
114
+
115
+ When all tasks are complete, report:
116
+ - Tasks completed: N/N
117
+ - Test results: pass/fail counts
118
+ - Commits made: list of commit hashes
119
+ - Deferred items (if any): list from .gsd-t/deferred-items.md"
120
+ ```
121
+
122
+ **After each domain subagent returns (orchestrator responsibilities):**
123
+ 1. Log to `.gsd-t/token-log.md` (see observability block above)
124
+ 2. Check `.gsd-t/deferred-items.md` for any `NEEDS-APPROVAL` entries — if found, STOP and present to user before spawning the next domain
125
+ 3. If a CHECKPOINT is reached per `integration-points.md`, verify contract compliance (see Step 4) before proceeding to the next wave/domain
126
+ 4. Update `.gsd-t/progress.md` with domain completion status
99
127
 
100
128
  ### Team Mode (when agent teams are enabled)
101
129
  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:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "2.31.16",
3
+ "version": "2.31.17",
4
4
  "description": "GSD-T: Contract-Driven Development for Claude Code — 46 slash commands with backlog management, impact analysis, test sync, milestone archival, and PRD generation",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",