@tekyzinc/gsd-t 2.8.1 → 2.9.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/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 31 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 32 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
 
@@ -101,6 +101,7 @@ This will replace changed command files, back up your CLAUDE.md if customized, a
101
101
 
102
102
  | Command | Purpose |
103
103
  |---------|---------|
104
+ | `/user:gsd-t-setup` | Generate or restructure project CLAUDE.md |
104
105
  | `/user:gsd-t-init` | Initialize GSD-T structure in project |
105
106
  | `/user:gsd-t-project` | Full project → milestone roadmap |
106
107
  | `/user:gsd-t-feature` | Major feature → impact analysis + milestones |
@@ -268,8 +269,8 @@ get-stuff-done-teams/
268
269
  ├── LICENSE
269
270
  ├── bin/
270
271
  │ └── gsd-t.js # CLI installer
271
- ├── commands/ # 34 slash commands
272
- │ ├── gsd-t-*.md # 31 GSD-T workflow commands
272
+ ├── commands/ # 35 slash commands
273
+ │ ├── gsd-t-*.md # 32 GSD-T workflow commands
273
274
  │ ├── branch.md # Git branch helper
274
275
  │ ├── checkin.md # Auto-version + commit/push helper
275
276
  │ └── Claude-md.md # Reload CLAUDE.md directives
@@ -15,6 +15,7 @@ GETTING STARTED
15
15
  ───────────────────────────────────────────────────────────────────────────────
16
16
  prompt Help formulate your idea before committing to a command
17
17
  brainstorm Creative exploration, rethinking, and idea generation
18
+ setup Generate or restructure project CLAUDE.md
18
19
  init Initialize GSD-T structure in current project
19
20
  project New project → requirements → milestone roadmap
20
21
  feature Major feature → impact analysis → milestones
@@ -131,6 +132,12 @@ Use these when user asks for help on a specific command:
131
132
  - **Use when**: You want to explore ideas, challenge assumptions, or break out of tunnel vision
132
133
  - **Modes**: Ideation, Enhancement, Rethink, Unstuck, Blue Sky
133
134
 
135
+ ### setup
136
+ - **Summary**: Generate or restructure the project-level CLAUDE.md
137
+ - **Auto-invoked**: No
138
+ - **Creates/Updates**: `CLAUDE.md`
139
+ - **Use when**: Starting a new project, migrating from GSD, or restructuring an existing CLAUDE.md to complement the global one
140
+
134
141
  ### init
135
142
  - **Summary**: Initialize GSD-T directory structure in current project
136
143
  - **Auto-invoked**: No
@@ -0,0 +1,213 @@
1
+ # GSD-T: Setup — Generate or Restructure Project CLAUDE.md
2
+
3
+ You are generating or restructuring the project-level CLAUDE.md for the current project. The goal is a well-structured file that complements the global `~/.claude/CLAUDE.md` without duplicating it.
4
+
5
+ ## Step 1: Read Global Context
6
+
7
+ Read `~/.claude/CLAUDE.md` to understand what's already covered globally:
8
+ - Prime Directives
9
+ - GSD-T workflow, commands, living documents
10
+ - Versioning, Destructive Action Guard, Pre-Commit Gate
11
+ - Autonomous Execution Rules, Workflow Preferences defaults
12
+ - Code Standards defaults
13
+
14
+ **Rule**: Anything in the global file should NOT be repeated in the project file. The project file only contains project-specific information and overrides.
15
+
16
+ ## Step 2: Scan the Project
17
+
18
+ Gather as much as possible automatically:
19
+
20
+ ### 2a: Project Identity
21
+ - Project name from `package.json`, `pyproject.toml`, `go.mod`, `Cargo.toml`, repo name, or directory name
22
+ - Description from package manifest or README
23
+
24
+ ### 2b: Tech Stack Detection
25
+ Scan for and identify:
26
+ - **Language**: from file extensions, configs (`tsconfig.json`, `pyproject.toml`, `go.mod`, etc.)
27
+ - **Framework**: from dependencies (`package.json`, `requirements.txt`, `Pipfile`, etc.)
28
+ - **Database**: from dependencies, config files, docker-compose, `.env` vars
29
+ - **Frontend**: from dependencies, directory structure (`client/`, `src/components/`)
30
+ - **Testing**: from test configs (`vitest.config`, `pytest.ini`, `jest.config`, etc.)
31
+ - **Deployment**: from `Dockerfile`, CI/CD configs, cloud configs
32
+
33
+ ### 2c: Project Structure
34
+ - Scan directories to build "Where Things Live" table
35
+ - Identify key entry points, config files, and module boundaries
36
+
37
+ ### 2d: Existing Conventions
38
+ - **Naming**: Sample 5-10 files and functions to detect naming patterns (snake_case, camelCase, kebab-case, PascalCase)
39
+ - **File organization**: Flat, feature-based, layer-based?
40
+ - **Import style**: Absolute, relative, aliases?
41
+
42
+ ### 2e: Existing Documentation
43
+ - Check for `docs/` directory and which living documents exist
44
+ - Check for `.gsd-t/` directory (already initialized?)
45
+ - Check for `.env.example` or environment docs
46
+
47
+ ### 2f: Git State
48
+ - Current branch (for Branch Guard)
49
+ - Remote URL (for reference)
50
+
51
+ ## Step 3: Check Existing CLAUDE.md
52
+
53
+ ### If CLAUDE.md exists:
54
+
55
+ Read it and categorize every section:
56
+
57
+ 1. **Project-specific (KEEP)**: Overview, Tech Stack, Branch Guard, Where Things Live, Conventions, Testing, Environment Variables, Deployed URLs, Reference Projects, project-specific "Don't Do" rules
58
+ 2. **Global duplicate (REMOVE)**: Anything that duplicates the global CLAUDE.md — Prime Directives, GSD-T workflow descriptions, Destructive Action Guard (unless project-specific additions), Pre-Commit Gate, Autonomous Execution Rules
59
+ 3. **GSD/legacy sections (MIGRATE)**: `## GSD Workflow Preferences` or similar → extract project-specific preferences into `## Workflow Preferences` using the new format
60
+ 4. **Stale content (FLAG)**: Sections that reference outdated tech, removed features, or incorrect paths
61
+
62
+ Present findings to user:
63
+ ```
64
+ CLAUDE.md Analysis:
65
+ KEEP: {N} project-specific sections
66
+ REMOVE: {N} sections that duplicate global CLAUDE.md
67
+ MIGRATE: {N} GSD sections → Workflow Preferences format
68
+ FLAG: {N} potentially stale sections
69
+ ```
70
+
71
+ ### If no CLAUDE.md exists:
72
+
73
+ Note: "No existing CLAUDE.md — will generate from scratch."
74
+
75
+ ## Step 4: Ask Targeted Questions
76
+
77
+ Only ask what could NOT be auto-detected. Skip questions where the answer is already clear from scanning.
78
+
79
+ **Potential questions** (ask only if not auto-detected):
80
+
81
+ 1. **Branch Guard**: "Which branch should commits target?" (skip if only `main` or `master` exists)
82
+ 2. **Autonomy Level**: "What autonomy level? Level 1 (Supervised), Level 2 (Standard — default), Level 3 (Full Auto)" (skip if existing CLAUDE.md already declares it)
83
+ 3. **Workflow Preferences**: "Any overrides to the global defaults? (Research Policy, Phase Flow)" (skip if user has no overrides)
84
+ 4. **Deployed URLs**: "Production, staging, and local URLs?" (skip if found in .env or existing docs)
85
+ 5. **Project-specific rules**: "Any 'never do' rules specific to this project?" (skip if existing CLAUDE.md already has them)
86
+
87
+ **Do NOT ask about**:
88
+ - Tech stack (auto-detected)
89
+ - Naming conventions (auto-detected)
90
+ - Testing framework (auto-detected)
91
+ - File structure (auto-detected)
92
+ - Anything already covered by the global CLAUDE.md
93
+
94
+ ## Step 5: Generate CLAUDE.md
95
+
96
+ Build the file using this structure. Include only sections that have real content — omit empty sections entirely.
97
+
98
+ ```markdown
99
+ # {Project Name}
100
+
101
+ ## Branch Guard
102
+ **Expected branch**: {branch}
103
+
104
+ ## Project Overview
105
+ {Brief description — what problem does this solve and for whom?}
106
+
107
+ ### Architecture
108
+ {High-level architecture summary if the project has one — e.g., "Three-tier WebSocket bridge" with a diagram. Keep it concise. Details belong in docs/architecture.md}
109
+
110
+ ## Where Things Live
111
+
112
+ | Need to find... | Look here |
113
+ |-----------------|-----------|
114
+ | {component} | {path} |
115
+
116
+ ## Key Technologies
117
+ {Bulleted list of language, framework, database, testing, etc.}
118
+
119
+ ## Documentation
120
+ - Requirements: docs/requirements.md
121
+ - Architecture: docs/architecture.md
122
+ - Workflows: docs/workflows.md
123
+ - Infrastructure: docs/infrastructure.md
124
+
125
+ ## Autonomy Level
126
+ **Level {N} — {Name}** (pause at {description})
127
+
128
+ ## Workflow Preferences
129
+ <!-- Override global defaults. Delete what you don't need to override. -->
130
+
131
+ ### Research Policy
132
+ {project-specific overrides, or omit section}
133
+
134
+ ### Phase Flow
135
+ {project-specific overrides, or omit section}
136
+
137
+ ## Testing
138
+ {Framework, file organization, naming, running instructions}
139
+
140
+ ## Code Patterns to Follow
141
+ {Project-specific conventions that differ from or extend global defaults}
142
+
143
+ ### Naming Conventions
144
+ {If different from global defaults}
145
+
146
+ ## Running the App
147
+ {Dev server, build commands, first-time setup}
148
+
149
+ ## Environment Variables
150
+ | Variable | Purpose | Default |
151
+ |----------|---------|---------|
152
+ | {VAR} | {purpose} | {default} |
153
+
154
+ ## Deployed URLs
155
+ - **Production**: {url}
156
+ - **Staging**: {url}
157
+ - **Local**: http://localhost:{port}
158
+
159
+ ## Don't Do These Things
160
+ {Project-specific rules only — don't repeat global rules}
161
+
162
+ ## GSD-T Workflow
163
+ This project uses contract-driven development.
164
+ - State: .gsd-t/progress.md
165
+ - Contracts: .gsd-t/contracts/
166
+ - Domains: .gsd-t/domains/
167
+
168
+ ## Current Status
169
+ See `.gsd-t/progress.md` for current milestone/phase state.
170
+ ```
171
+
172
+ ### Section Rules:
173
+ - **NEVER duplicate** global CLAUDE.md content (Destructive Action Guard, Pre-Commit Gate, Prime Directives, etc.)
174
+ - **ALWAYS include**: Branch Guard, GSD-T Workflow, Current Status
175
+ - **Include if relevant**: Where Things Live, Testing, Code Patterns, Environment Variables
176
+ - **Omit if empty**: Deployed URLs (if not deployed), Architecture (if trivial), Workflow Preferences (if no overrides)
177
+
178
+ ## Step 6: Present and Confirm
179
+
180
+ Show the generated CLAUDE.md content to the user with a summary:
181
+
182
+ ```
183
+ Generated CLAUDE.md for {Project Name}:
184
+ Sections: {N} ({list of section names})
185
+ Auto-detected: {tech stack, conventions, structure}
186
+ From existing: {N} sections preserved
187
+ Removed: {N} global duplicates
188
+
189
+ {Show the full generated content}
190
+
191
+ Write this as CLAUDE.md? (This will replace the existing file if one exists.)
192
+ ```
193
+
194
+ Wait for user confirmation before writing.
195
+
196
+ ## Step 7: Write and Verify
197
+
198
+ 1. Write the CLAUDE.md file
199
+ 2. Verify it's valid markdown (no broken tables, unclosed code blocks)
200
+ 3. If `.gsd-t/progress.md` exists, log the setup in the Decision Log
201
+
202
+ ## Document Ripple
203
+
204
+ ### Always update:
205
+ 1. **`.gsd-t/progress.md`** — Log "Project CLAUDE.md generated/restructured via gsd-t-setup" in Decision Log (if .gsd-t/ exists)
206
+
207
+ ### Skip: No other files are affected by CLAUDE.md generation.
208
+
209
+ ## Test Verification
210
+
211
+ No tests to run — this command produces a configuration file, not code.
212
+
213
+ $ARGUMENTS
@@ -71,6 +71,7 @@ GSD-T reads all state files and tells you exactly where you left off.
71
71
 
72
72
  | Command | Purpose |
73
73
  |---------|---------|
74
+ | `/user:gsd-t-setup` | Generate or restructure project CLAUDE.md |
74
75
  | `/user:gsd-t-init` | Initialize GSD-T structure in project |
75
76
  | `/user:gsd-t-project` | Full project → milestone roadmap |
76
77
  | `/user:gsd-t-feature` | Major feature → impact analysis + milestones |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tekyzinc/gsd-t",
3
- "version": "2.8.1",
4
- "description": "GSD-T: Contract-Driven Development for Claude Code — 34 slash commands with backlog management, impact analysis, test sync, and milestone archival",
3
+ "version": "2.9.0",
4
+ "description": "GSD-T: Contract-Driven Development for Claude Code — 35 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-feature` | Major feature → impact analysis + milestones |
35
35
  | `/user:gsd-t-scan` | Deep codebase analysis → techdebt.md |
36
36
  | `/user:gsd-t-promote-debt` | Convert debt items to milestones |
37
+ | `/user:gsd-t-setup` | Generate or restructure project CLAUDE.md |
37
38
  | `/user:gsd-t-init` | Initialize project structure |
38
39
  | `/user:gsd-t-milestone` | Define new milestone |
39
40
  | `/user:gsd-t-partition` | Decompose into domains + contracts |