@tekyzinc/gsd-t 2.14.2 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  All notable changes to GSD-T are documented here. Updated with each release.
4
4
 
5
+ ## [2.15.0] - 2026-02-13
6
+
7
+ ### Added
8
+ - `/user:gsd-t-gap-analysis` command — requirements gap analysis against existing codebase
9
+ - Parses spec into discrete numbered requirements, scans codebase, classifies each as implemented/partial/incorrect/not-implemented
10
+ - Evidence-based classification with file:line references for each requirement
11
+ - Severity levels: Critical (incorrect), High (partial), Medium (not implemented), Low (deferrable)
12
+ - Generates `.gsd-t/gap-analysis.md` with requirements breakdown, gap matrix, and summary stats
13
+ - Re-run support with diff against previous gap analysis (resolved, new, changed, unchanged)
14
+ - Optional merge of parsed requirements into `docs/requirements.md`
15
+ - Auto-groups gaps into recommended milestones/features/quick-fixes for promotion
16
+ - Autonomy-aware: Level 3 proceeds with flagged assumptions, Level 1-2 pauses for clarification
17
+ - Total commands: 37 GSD-T + 3 utility = 40
18
+
5
19
  ## [2.14.2] - 2026-02-13
6
20
 
7
21
  ### 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,203 @@
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
52
+
53
+ Scan the existing codebase to understand current state. Read:
54
+ - Source files relevant to each requirement
55
+ - Test files for coverage evidence
56
+ - Configuration and schema files
57
+ - Existing contracts in `.gsd-t/contracts/`
58
+ - Documentation in `docs/`
59
+
60
+ Build an understanding of what exists before classifying.
61
+
62
+ ## Step 5: Gap Classification
63
+
64
+ For each requirement, classify with evidence:
65
+
66
+ | Status | Meaning | Action Needed |
67
+ |--------|---------|---------------|
68
+ | **Implemented** | Code exists and fully matches the requirement | None — verify with tests |
69
+ | **Partial** | Some code exists but incomplete | Finish implementation |
70
+ | **Incorrect** | Code exists but doesn't match the requirement | Fix implementation |
71
+ | **Not Implemented** | No code exists for this requirement | Build from scratch |
72
+
73
+ Assign severity to gaps:
74
+
75
+ | Severity | Criteria |
76
+ |----------|----------|
77
+ | **Critical** | Incorrect implementation — existing code actively contradicts the requirement |
78
+ | **High** | Partial implementation — core functionality exists but key pieces are missing |
79
+ | **Medium** | Not implemented — required but no code exists yet |
80
+ | **Low** | Not implemented — nice-to-have or can be deferred |
81
+
82
+ ## Step 6: Generate Gap Analysis Document
83
+
84
+ Create `.gsd-t/gap-analysis.md`:
85
+
86
+ ```markdown
87
+ # Gap Analysis
88
+
89
+ ## Project: {project name}
90
+ ## Date: {date}
91
+ ## Spec Source: {brief description of the provided spec}
92
+
93
+ ## Requirements Breakdown
94
+
95
+ ### {Section 1}
96
+ | ID | Requirement | Status | Severity | Evidence |
97
+ |----|-------------|--------|----------|----------|
98
+ | R1 | {requirement} | Implemented | — | `src/auth/login.ts:45` handles email login |
99
+ | R2 | {requirement} | Partial | High | `src/auth/login.ts` has login but no password reset flow |
100
+ | R3 | {requirement} | Incorrect | Critical | `src/auth/session.ts:20` uses localStorage instead of httpOnly cookies |
101
+ | R4 | {requirement} | Not Implemented | Medium | No code found for this feature |
102
+
103
+ ### {Section 2}
104
+ | ID | Requirement | Status | Severity | Evidence |
105
+ |----|-------------|--------|----------|----------|
106
+ ...
107
+
108
+ ## Summary
109
+
110
+ | Status | Count | % |
111
+ |--------|-------|---|
112
+ | Implemented | {n} | {%} |
113
+ | Partial | {n} | {%} |
114
+ | Incorrect | {n} | {%} |
115
+ | Not Implemented | {n} | {%} |
116
+ | **Total** | **{n}** | **100%** |
117
+
118
+ ## Assumptions Made
119
+ - R{X}: {assumption made during analysis}
120
+ - R{Y}: {assumption made during analysis}
121
+
122
+ ## Recommended Actions
123
+
124
+ ### Milestone: {recommended name}
125
+ - R{X}: {brief description} (Severity: {level})
126
+ - R{Y}: {brief description} (Severity: {level})
127
+
128
+ ### Feature: {recommended name}
129
+ - R{X}: {brief description} (Severity: {level})
130
+
131
+ ### Quick Fixes
132
+ - R{X}: {brief description} (Severity: {level})
133
+ ```
134
+
135
+ ## Step 7: Merge to Requirements (Optional)
136
+
137
+ After generating the gap analysis, offer:
138
+
139
+ ```
140
+ Gap analysis complete: {implemented}/{total} requirements met ({%}%).
141
+ {critical} critical, {high} high, {medium} medium, {low} low severity gaps.
142
+
143
+ Merge parsed requirements into docs/requirements.md? (Y/N)
144
+ ```
145
+
146
+ If yes, merge the discrete requirements into `docs/requirements.md`, marking each with its current status.
147
+
148
+ ## Step 8: Present Promotion Options
149
+
150
+ Show the recommended groupings and offer promotion paths:
151
+
152
+ ```
153
+ ## Recommended Next Steps
154
+
155
+ 1. {Milestone name} — {N} gaps ({critical} critical, {high} high)
156
+ → /user:gsd-t-milestone "{name}"
157
+
158
+ 2. {Feature name} — {N} gaps
159
+ → /user:gsd-t-feature "{name}"
160
+
161
+ 3. Quick fixes — {N} items
162
+ → /user:gsd-t-quick "{description}"
163
+
164
+ Promote any of these now, or review the gap analysis first?
165
+ ```
166
+
167
+ At **Level 3**: Present the recommendations and wait for user direction. Do NOT auto-promote — the user decides which gaps to act on.
168
+
169
+ ## Step 9: Re-run Support
170
+
171
+ If `.gsd-t/gap-analysis.md` already exists from a previous run:
172
+
173
+ 1. Read the previous gap analysis
174
+ 2. After generating the new one, produce a diff summary:
175
+
176
+ ```
177
+ ## Changes Since Last Analysis ({previous date})
178
+
179
+ ### Resolved (were gaps, now implemented)
180
+ - R{X}: {requirement}
181
+
182
+ ### New Gaps (not in previous analysis)
183
+ - R{X}: {requirement} — {status}
184
+
185
+ ### Changed Status
186
+ - R{X}: {status before} → {status now}
187
+
188
+ ### Unchanged Gaps
189
+ - {N} gaps remain from previous analysis
190
+ ```
191
+
192
+ ## Document Ripple
193
+
194
+ After generating the gap analysis, update affected documentation:
195
+
196
+ ### Always update:
197
+ 1. **`.gsd-t/progress.md`** — Log the gap analysis in the Decision Log with date and summary stats
198
+
199
+ ### Check if affected:
200
+ 2. **`docs/requirements.md`** — If user approved merge in Step 7
201
+ 3. **`.gsd-t/techdebt.md`** — If incorrect implementations were found, add them as tech debt items
202
+
203
+ $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.0",
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 |