@tekyzinc/gsd-t 2.14.2 → 2.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [2.15.1] - 2026-02-13
6
+
7
+ ### Changed
8
+ - `gsd-t-gap-analysis` now uses agent team mode automatically — one teammate per requirement section for parallel scanning and classification, with solo fallback
9
+
10
+ ## [2.15.0] - 2026-02-13
11
+
12
+ ### Added
13
+ - `/user:gsd-t-gap-analysis` command — requirements gap analysis against existing codebase
14
+ - Parses spec into discrete numbered requirements, scans codebase, classifies each as implemented/partial/incorrect/not-implemented
15
+ - Evidence-based classification with file:line references for each requirement
16
+ - Severity levels: Critical (incorrect), High (partial), Medium (not implemented), Low (deferrable)
17
+ - Generates `.gsd-t/gap-analysis.md` with requirements breakdown, gap matrix, and summary stats
18
+ - Re-run support with diff against previous gap analysis (resolved, new, changed, unchanged)
19
+ - Optional merge of parsed requirements into `docs/requirements.md`
20
+ - Auto-groups gaps into recommended milestones/features/quick-fixes for promotion
21
+ - Autonomy-aware: Level 3 proceeds with flagged assumptions, Level 1-2 pauses for clarification
22
+ - Total commands: 37 GSD-T + 3 utility = 40
23
+
5
24
  ## [2.14.2] - 2026-02-13
6
25
 
7
26
  ### Changed
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 36 GSD-T commands + 3 utility commands to `~/.claude/commands/` and the global CLAUDE.md to `~/.claude/CLAUDE.md`. Works on Windows, Mac, and Linux.
21
+ This installs 37 GSD-T commands + 3 utility commands 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
 
@@ -114,6 +114,7 @@ This will replace changed command files, back up your CLAUDE.md if customized, a
114
114
  | `/user:gsd-t-project` | Full project → milestone roadmap | Manual |
115
115
  | `/user:gsd-t-feature` | Major feature → impact analysis + milestones | Manual |
116
116
  | `/user:gsd-t-scan` | Deep codebase analysis → techdebt.md | Manual |
117
+ | `/user:gsd-t-gap-analysis` | Requirements gap analysis — spec vs. existing code | Manual |
117
118
  | `/user:gsd-t-promote-debt` | Convert techdebt items to milestones | Manual |
118
119
  | `/user:gsd-t-populate` | Auto-populate docs from existing codebase | Manual |
119
120
 
@@ -279,8 +280,8 @@ get-stuff-done-teams/
279
280
  ├── LICENSE
280
281
  ├── bin/
281
282
  │ └── gsd-t.js # CLI installer
282
- ├── commands/ # 39 slash commands
283
- │ ├── gsd-t-*.md # 36 GSD-T workflow commands
283
+ ├── commands/ # 40 slash commands
284
+ │ ├── gsd-t-*.md # 37 GSD-T workflow commands
284
285
  │ ├── branch.md # Git branch helper
285
286
  │ ├── checkin.md # Auto-version + commit/push helper
286
287
  │ └── Claude-md.md # Reload CLAUDE.md directives
@@ -0,0 +1,234 @@
1
+ # GSD-T: Gap Analysis — Requirements vs. Existing Code
2
+
3
+ You are performing a gap analysis between a provided specification and the existing codebase. The user pastes requirements or a spec, and you systematically identify what's done, what's partial, what's wrong, and what's missing.
4
+
5
+ ## Step 1: Load Context
6
+
7
+ Read (if they exist):
8
+ 1. `CLAUDE.md` — project context
9
+ 2. `.gsd-t/progress.md` — current state
10
+ 3. `docs/requirements.md` — existing requirements
11
+ 4. `docs/architecture.md` — system structure
12
+
13
+ ## Step 2: Parse Requirements
14
+
15
+ Break the provided spec into numbered discrete requirements. Each requirement should be:
16
+ - **Atomic** — one testable behavior or capability per item
17
+ - **Clear** — unambiguous language
18
+ - **Categorized** — group related items under section headers
19
+
20
+ Present the breakdown:
21
+
22
+ ```
23
+ ## Parsed Requirements
24
+
25
+ ### {Section 1}
26
+ R1. {Discrete requirement}
27
+ R2. {Discrete requirement}
28
+
29
+ ### {Section 2}
30
+ R3. {Discrete requirement}
31
+ ...
32
+ ```
33
+
34
+ For large specs, show progress: "Analyzing section {N} of {total}: {section name}..."
35
+
36
+ ## Step 3: Clarification Check
37
+
38
+ Review each requirement for ambiguity. If any are unclear:
39
+
40
+ - At **Level 3 (Full Auto)**: Proceed with reasonable assumptions. Flag each assumption in the gap analysis with `[ASSUMED: {assumption}]`
41
+ - At **Level 1 or 2**: Present the ambiguous items and ask for clarification before proceeding
42
+
43
+ ```
44
+ ⚠ {N} requirements need clarification:
45
+ R{X}: "{requirement}" — {what's unclear}
46
+ R{Y}: "{requirement}" — {what's unclear}
47
+
48
+ Discuss now or proceed with assumptions?
49
+ ```
50
+
51
+ ## Step 4: System Scan + Gap Classification (Team Mode)
52
+
53
+ Automatically use agent teams to scan and classify requirements in parallel. Each teammate handles one requirement section independently.
54
+
55
+ ### Classification Reference
56
+
57
+ | Status | Meaning | Action Needed |
58
+ |--------|---------|---------------|
59
+ | **Implemented** | Code exists and fully matches the requirement | None — verify with tests |
60
+ | **Partial** | Some code exists but incomplete | Finish implementation |
61
+ | **Incorrect** | Code exists but doesn't match the requirement | Fix implementation |
62
+ | **Not Implemented** | No code exists for this requirement | Build from scratch |
63
+
64
+ | Severity | Criteria |
65
+ |----------|----------|
66
+ | **Critical** | Incorrect implementation — existing code actively contradicts the requirement |
67
+ | **High** | Partial implementation — core functionality exists but key pieces are missing |
68
+ | **Medium** | Not implemented — required but no code exists yet |
69
+ | **Low** | Not implemented — nice-to-have or can be deferred |
70
+
71
+ ### Team Execution
72
+
73
+ ```
74
+ Create an agent team for gap analysis:
75
+
76
+ ALL TEAMMATES must read before starting:
77
+ 1. CLAUDE.md — project conventions
78
+ 2. docs/architecture.md — system structure
79
+ 3. docs/requirements.md — existing requirements
80
+ 4. .gsd-t/contracts/ — domain interfaces
81
+
82
+ Classification rules:
83
+ - For each requirement, search the codebase for relevant code
84
+ - Cite specific files and line numbers as evidence
85
+ - Classify as: Implemented / Partial / Incorrect / Not Implemented
86
+ - Assign severity: Critical / High / Medium / Low
87
+ - Flag assumptions with [ASSUMED: {reason}]
88
+
89
+ Output format per requirement:
90
+ | ID | Requirement | Status | Severity | Evidence |
91
+
92
+ Teammate assignments (one per requirement section):
93
+ - Teammate "section-1": Scan and classify {Section 1} (R1–R{N})
94
+ - Teammate "section-2": Scan and classify {Section 2} (R{N+1}–R{M})
95
+ - Teammate "section-3": Scan and classify {Section 3} (R{M+1}–R{P})
96
+ (add more teammates as needed — one per section)
97
+
98
+ Lead responsibilities:
99
+ - Distribute requirement sections to teammates
100
+ - Collect classification results from each teammate
101
+ - Resolve conflicts (two teammates found different evidence for the same code)
102
+ - Merge all results into the unified gap analysis document
103
+ - Update .gsd-t/progress.md after completion
104
+ ```
105
+
106
+ ### Fallback: Solo Mode
107
+
108
+ If agent teams are not available or the spec has only 1 section, run sequentially:
109
+ - Scan the codebase for each requirement
110
+ - Read source files, test files, config, schema, contracts, and docs
111
+ - Classify each requirement with evidence
112
+
113
+ ## Step 6: Generate Gap Analysis Document
114
+
115
+ Create `.gsd-t/gap-analysis.md`:
116
+
117
+ ```markdown
118
+ # Gap Analysis
119
+
120
+ ## Project: {project name}
121
+ ## Date: {date}
122
+ ## Spec Source: {brief description of the provided spec}
123
+
124
+ ## Requirements Breakdown
125
+
126
+ ### {Section 1}
127
+ | ID | Requirement | Status | Severity | Evidence |
128
+ |----|-------------|--------|----------|----------|
129
+ | R1 | {requirement} | Implemented | — | `src/auth/login.ts:45` handles email login |
130
+ | R2 | {requirement} | Partial | High | `src/auth/login.ts` has login but no password reset flow |
131
+ | R3 | {requirement} | Incorrect | Critical | `src/auth/session.ts:20` uses localStorage instead of httpOnly cookies |
132
+ | R4 | {requirement} | Not Implemented | Medium | No code found for this feature |
133
+
134
+ ### {Section 2}
135
+ | ID | Requirement | Status | Severity | Evidence |
136
+ |----|-------------|--------|----------|----------|
137
+ ...
138
+
139
+ ## Summary
140
+
141
+ | Status | Count | % |
142
+ |--------|-------|---|
143
+ | Implemented | {n} | {%} |
144
+ | Partial | {n} | {%} |
145
+ | Incorrect | {n} | {%} |
146
+ | Not Implemented | {n} | {%} |
147
+ | **Total** | **{n}** | **100%** |
148
+
149
+ ## Assumptions Made
150
+ - R{X}: {assumption made during analysis}
151
+ - R{Y}: {assumption made during analysis}
152
+
153
+ ## Recommended Actions
154
+
155
+ ### Milestone: {recommended name}
156
+ - R{X}: {brief description} (Severity: {level})
157
+ - R{Y}: {brief description} (Severity: {level})
158
+
159
+ ### Feature: {recommended name}
160
+ - R{X}: {brief description} (Severity: {level})
161
+
162
+ ### Quick Fixes
163
+ - R{X}: {brief description} (Severity: {level})
164
+ ```
165
+
166
+ ## Step 7: Merge to Requirements (Optional)
167
+
168
+ After generating the gap analysis, offer:
169
+
170
+ ```
171
+ Gap analysis complete: {implemented}/{total} requirements met ({%}%).
172
+ {critical} critical, {high} high, {medium} medium, {low} low severity gaps.
173
+
174
+ Merge parsed requirements into docs/requirements.md? (Y/N)
175
+ ```
176
+
177
+ If yes, merge the discrete requirements into `docs/requirements.md`, marking each with its current status.
178
+
179
+ ## Step 8: Present Promotion Options
180
+
181
+ Show the recommended groupings and offer promotion paths:
182
+
183
+ ```
184
+ ## Recommended Next Steps
185
+
186
+ 1. {Milestone name} — {N} gaps ({critical} critical, {high} high)
187
+ → /user:gsd-t-milestone "{name}"
188
+
189
+ 2. {Feature name} — {N} gaps
190
+ → /user:gsd-t-feature "{name}"
191
+
192
+ 3. Quick fixes — {N} items
193
+ → /user:gsd-t-quick "{description}"
194
+
195
+ Promote any of these now, or review the gap analysis first?
196
+ ```
197
+
198
+ At **Level 3**: Present the recommendations and wait for user direction. Do NOT auto-promote — the user decides which gaps to act on.
199
+
200
+ ## Step 9: Re-run Support
201
+
202
+ If `.gsd-t/gap-analysis.md` already exists from a previous run:
203
+
204
+ 1. Read the previous gap analysis
205
+ 2. After generating the new one, produce a diff summary:
206
+
207
+ ```
208
+ ## Changes Since Last Analysis ({previous date})
209
+
210
+ ### Resolved (were gaps, now implemented)
211
+ - R{X}: {requirement}
212
+
213
+ ### New Gaps (not in previous analysis)
214
+ - R{X}: {requirement} — {status}
215
+
216
+ ### Changed Status
217
+ - R{X}: {status before} → {status now}
218
+
219
+ ### Unchanged Gaps
220
+ - {N} gaps remain from previous analysis
221
+ ```
222
+
223
+ ## Document Ripple
224
+
225
+ After generating the gap analysis, update affected documentation:
226
+
227
+ ### Always update:
228
+ 1. **`.gsd-t/progress.md`** — Log the gap analysis in the Decision Log with date and summary stats
229
+
230
+ ### Check if affected:
231
+ 2. **`docs/requirements.md`** — If user approved merge in Step 7
232
+ 3. **`.gsd-t/techdebt.md`** — If incorrect implementations were found, add them as tech debt items
233
+
234
+ $ARGUMENTS
@@ -25,6 +25,7 @@ GETTING STARTED Manual
25
25
  project New project → requirements → milestone roadmap
26
26
  feature Major feature → impact analysis → milestones
27
27
  scan Deep codebase analysis → techdebt.md
28
+ gap-analysis Requirements gap analysis — spec vs. existing code
28
29
 
29
30
  MILESTONE WORKFLOW [auto] = in wave
30
31
  ───────────────────────────────────────────────────────────────────────────────
@@ -183,6 +184,14 @@ Use these when user asks for help on a specific command:
183
184
  - **Creates**: `.gsd-t/scan/`, `.gsd-t/techdebt.md`
184
185
  - **Use when**: Understanding an existing codebase or auditing technical debt
185
186
 
187
+ ### gap-analysis
188
+ - **Summary**: Gap analysis — paste a spec, identify what's done, partial, incorrect, or missing
189
+ - **Auto-invoked**: No
190
+ - **Creates**: `.gsd-t/gap-analysis.md`
191
+ - **Reads**: Codebase, `docs/requirements.md`, `docs/architecture.md`, `.gsd-t/contracts/`
192
+ - **Use when**: You have a spec or requirements doc and need to know what's already built vs. what's missing
193
+ - **Features**: Re-run diffing, severity classification, evidence-backed classifications, optional requirements merge, promotable gap groupings
194
+
186
195
  ### milestone
187
196
  - **Summary**: Define a specific deliverable milestone within a project
188
197
  - **Auto-invoked**: No
package/commands/gsd-t.md CHANGED
@@ -22,6 +22,7 @@ From `$ARGUMENTS`, classify the request into one of these categories:
22
22
  | Run full cycle on current milestone | `gsd-t-wave` | "run it", "execute", "let it rip", "full cycle", "wave" |
23
23
  | Debug or investigate a problem | `gsd-t-debug` | "bug", "broken", "not working", "error", "investigate", "why does" |
24
24
  | Understand or audit codebase | `gsd-t-scan` | "audit", "analyze", "scan", "tech debt", "what's wrong with" |
25
+ | Compare spec to existing code | `gsd-t-gap-analysis` | "compare", "gap analysis", "spec", "requirements check", "what's implemented", "what's missing" |
25
26
  | Explore ideas or rethink approach | `gsd-t-brainstorm` | "brainstorm", "what if", "explore", "rethink", "ideas for" |
26
27
  | Help articulate a vague idea | `gsd-t-prompt` | "I want to", "how should I", "help me think about" |
27
28
  | Generate or fix project CLAUDE.md | `gsd-t-setup` | "setup CLAUDE.md", "restructure CLAUDE.md" |
@@ -83,6 +83,7 @@ GSD-T reads all state files and tells you exactly where you left off.
83
83
  | `/user:gsd-t-project` | Full project → milestone roadmap | Manual |
84
84
  | `/user:gsd-t-feature` | Major feature → impact analysis + milestones | Manual |
85
85
  | `/user:gsd-t-scan` | Deep codebase analysis → techdebt.md | Manual |
86
+ | `/user:gsd-t-gap-analysis` | Requirements gap analysis — spec vs. existing code | Manual |
86
87
  | `/user:gsd-t-promote-debt` | Convert techdebt items to milestones | Manual |
87
88
  | `/user:gsd-t-populate` | Auto-populate docs from existing codebase | Manual |
88
89
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "2.14.2",
4
- "description": "GSD-T: Contract-Driven Development for Claude Code — 39 slash commands with backlog management, impact analysis, test sync, and milestone archival",
3
+ "version": "2.15.1",
4
+ "description": "GSD-T: Contract-Driven Development for Claude Code — 40 slash commands with backlog management, impact analysis, test sync, and milestone archival",
5
5
  "author": "Tekyz, Inc.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -34,6 +34,7 @@ PROJECT or FEATURE or SCAN
34
34
  | `/user:gsd-t-project` | Full project → milestone roadmap |
35
35
  | `/user:gsd-t-feature` | Major feature → impact analysis + milestones |
36
36
  | `/user:gsd-t-scan` | Deep codebase analysis → techdebt.md |
37
+ | `/user:gsd-t-gap-analysis` | Requirements gap analysis — spec vs. existing code |
37
38
  | `/user:gsd-t-promote-debt` | Convert debt items to milestones |
38
39
  | `/user:gsd-t-setup` | Generate or restructure project CLAUDE.md |
39
40
  | `/user:gsd-t-init` | Initialize project structure |