gsd-cc 0.2.0 → 0.3.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/bin/install.js CHANGED
@@ -26,6 +26,12 @@ ${cyan} ██████╗ ███████╗██████╗
26
26
  Get Shit Done on Claude Code ${dim}v${pkg.version}${reset}
27
27
  `;
28
28
 
29
+ // Sub-skills that get their own top-level directory under .claude/skills/
30
+ const SUB_SKILLS = ['apply', 'auto', 'discuss', 'help', 'plan', 'seed', 'status', 'tutorial', 'unify', 'update'];
31
+
32
+ // Shared directories that go into gsd-cc-shared/
33
+ const SHARED_DIRS = ['checklists', 'prompts', 'templates'];
34
+
29
35
  // Parse args
30
36
  const args = process.argv.slice(2);
31
37
  const hasGlobal = args.includes('--global') || args.includes('-g');
@@ -39,8 +45,8 @@ if (hasHelp) {
39
45
  console.log(` ${yellow}Usage:${reset} npx gsd-cc [options]
40
46
 
41
47
  ${yellow}Options:${reset}
42
- ${cyan}-g, --global${reset} Install globally to ~/.claude/skills/gsd/ ${dim}(default)${reset}
43
- ${cyan}-l, --local${reset} Install locally to ./.claude/skills/gsd/
48
+ ${cyan}-g, --global${reset} Install globally to ~/.claude/skills/ ${dim}(default)${reset}
49
+ ${cyan}-l, --local${reset} Install locally to ./.claude/skills/
44
50
  ${cyan}--uninstall${reset} Remove GSD-CC skills
45
51
  ${cyan}-h, --help${reset} Show this help message
46
52
 
@@ -88,13 +94,13 @@ function removeDir(dir) {
88
94
  }
89
95
 
90
96
  /**
91
- * Resolve target directory
97
+ * Resolve skills base directory
92
98
  */
93
- function getTargetDir(isGlobal) {
99
+ function getSkillsBase(isGlobal) {
94
100
  if (isGlobal) {
95
- return path.join(os.homedir(), '.claude', 'skills', 'gsd');
101
+ return path.join(os.homedir(), '.claude', 'skills');
96
102
  }
97
- return path.join(process.cwd(), '.claude', 'skills', 'gsd');
103
+ return path.join(process.cwd(), '.claude', 'skills');
98
104
  }
99
105
 
100
106
  /**
@@ -102,10 +108,10 @@ function getTargetDir(isGlobal) {
102
108
  */
103
109
  function install(isGlobal) {
104
110
  const skillsSrc = path.join(__dirname, '..', 'skills', 'gsd');
105
- const targetDir = getTargetDir(isGlobal);
111
+ const skillsBase = getSkillsBase(isGlobal);
106
112
  const label = isGlobal
107
- ? targetDir.replace(os.homedir(), '~')
108
- : targetDir.replace(process.cwd(), '.');
113
+ ? skillsBase.replace(os.homedir(), '~')
114
+ : skillsBase.replace(process.cwd(), '.');
109
115
 
110
116
  if (!fs.existsSync(skillsSrc)) {
111
117
  console.error(` ${red}Error:${reset} Skills source not found at ${skillsSrc}`);
@@ -114,28 +120,40 @@ function install(isGlobal) {
114
120
 
115
121
  console.log(` Installing to ${cyan}${label}${reset}\n`);
116
122
 
117
- // Copy skills
118
- copyDir(skillsSrc, targetDir);
123
+ let fileCount = 0;
119
124
 
120
- // Make auto-loop.sh executable if it exists
121
- const autoLoop = path.join(targetDir, 'auto', 'auto-loop.sh');
122
- if (fs.existsSync(autoLoop)) {
123
- fs.chmodSync(autoLoop, 0o755);
125
+ // 1. Install main router: gsd-cc/SKILL.md
126
+ const routerDest = path.join(skillsBase, 'gsd-cc');
127
+ fs.mkdirSync(routerDest, { recursive: true });
128
+ fs.copyFileSync(path.join(skillsSrc, 'SKILL.md'), path.join(routerDest, 'SKILL.md'));
129
+ fileCount++;
130
+
131
+ // 2. Install each sub-skill as its own top-level directory
132
+ for (const skill of SUB_SKILLS) {
133
+ const srcDir = path.join(skillsSrc, skill);
134
+ const destDir = path.join(skillsBase, `gsd-cc-${skill}`);
135
+
136
+ if (fs.existsSync(srcDir)) {
137
+ copyDir(srcDir, destDir);
138
+ fileCount += countFiles(destDir);
139
+ }
124
140
  }
125
141
 
126
- // Count installed files
127
- let fileCount = 0;
128
- function countFiles(dir) {
129
- const entries = fs.readdirSync(dir, { withFileTypes: true });
130
- for (const entry of entries) {
131
- if (entry.isDirectory()) {
132
- countFiles(path.join(dir, entry.name));
133
- } else {
134
- fileCount++;
135
- }
142
+ // 3. Install shared resources (templates, checklists, prompts)
143
+ const sharedDest = path.join(skillsBase, 'gsd-cc-shared');
144
+ for (const dir of SHARED_DIRS) {
145
+ const srcDir = path.join(skillsSrc, dir);
146
+ if (fs.existsSync(srcDir)) {
147
+ copyDir(srcDir, path.join(sharedDest, dir));
148
+ fileCount += countFiles(path.join(sharedDest, dir));
136
149
  }
137
150
  }
138
- countFiles(targetDir);
151
+
152
+ // 4. Make auto-loop.sh executable
153
+ const autoLoop = path.join(skillsBase, 'gsd-cc-auto', 'auto-loop.sh');
154
+ if (fs.existsSync(autoLoop)) {
155
+ fs.chmodSync(autoLoop, 0o755);
156
+ }
139
157
 
140
158
  console.log(` ${green}✓${reset} Installed ${fileCount} files to ${label}`);
141
159
  console.log(`
@@ -143,23 +161,48 @@ function install(isGlobal) {
143
161
  `);
144
162
  }
145
163
 
164
+ /**
165
+ * Count files in a directory recursively
166
+ */
167
+ function countFiles(dir) {
168
+ let count = 0;
169
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
170
+ for (const entry of entries) {
171
+ if (entry.isDirectory()) {
172
+ count += countFiles(path.join(dir, entry.name));
173
+ } else {
174
+ count++;
175
+ }
176
+ }
177
+ return count;
178
+ }
179
+
146
180
  /**
147
181
  * Uninstall skills
148
182
  */
149
183
  function uninstall() {
150
- const globalDir = getTargetDir(true);
151
- const localDir = getTargetDir(false);
184
+ const locations = [getSkillsBase(true), getSkillsBase(false)];
185
+ const allDirs = ['gsd-cc', ...SUB_SKILLS.map(s => `gsd-cc-${s}`), 'gsd-cc-shared', 'gsd'];
152
186
 
153
187
  let removed = false;
154
188
 
155
- if (removeDir(globalDir)) {
156
- console.log(` ${green}✓${reset} Removed global install (${globalDir.replace(os.homedir(), '~')})`);
157
- removed = true;
158
- }
189
+ for (const base of locations) {
190
+ const label = base.includes(os.homedir())
191
+ ? base.replace(os.homedir(), '~')
192
+ : base.replace(process.cwd(), '.');
159
193
 
160
- if (removeDir(localDir)) {
161
- console.log(` ${green}✓${reset} Removed local install (${localDir.replace(process.cwd(), '.')})`);
162
- removed = true;
194
+ let removedFromLocation = false;
195
+ for (const dir of allDirs) {
196
+ const fullPath = path.join(base, dir);
197
+ if (removeDir(fullPath)) {
198
+ removedFromLocation = true;
199
+ }
200
+ }
201
+
202
+ if (removedFromLocation) {
203
+ console.log(` ${green}✓${reset} Removed GSD-CC from ${label}`);
204
+ removed = true;
205
+ }
163
206
  }
164
207
 
165
208
  if (!removed) {
@@ -178,12 +221,12 @@ function promptLocation() {
178
221
  output: process.stdout,
179
222
  });
180
223
 
181
- const globalPath = getTargetDir(true).replace(os.homedir(), '~');
224
+ const globalPath = getSkillsBase(true).replace(os.homedir(), '~');
182
225
 
183
226
  console.log(` ${yellow}Where would you like to install?${reset}
184
227
 
185
228
  ${cyan}1${reset}) Global ${dim}(${globalPath})${reset} — available in all projects
186
- ${cyan}2${reset}) Local ${dim}(./.claude/skills/gsd/)${reset} — this project only
229
+ ${cyan}2${reset}) Local ${dim}(./.claude/skills/)${reset} — this project only
187
230
  `);
188
231
 
189
232
  rl.question(` Choice ${dim}[1]${reset}: `, (answer) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-cc",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "Get Shit Done on Claude Code — structured AI development with your Max plan",
5
5
  "author": "Philipp Briese (https://github.com/0ui-labs)",
6
6
  "homepage": "https://github.com/0ui-labs/GSD-CC#readme",
@@ -148,6 +148,8 @@ When routing to a sub-skill, tell the user what you're doing and then invoke the
148
148
  - Auto mode → `/gsd-cc-auto`
149
149
  - Status overview → `/gsd-cc-status`
150
150
  - Update skills → `/gsd-cc-update`
151
+ - Help → `/gsd-cc-help`
152
+ - Tutorial → `/gsd-cc-tutorial`
151
153
 
152
154
  Power users can invoke these directly. But the default path only needs `/gsd-cc` + Enter.
153
155
 
@@ -84,10 +84,10 @@ Resolve the script location:
84
84
 
85
85
  ```bash
86
86
  # Check local first, then global
87
- if [[ -f ".claude/skills/gsd/auto/auto-loop.sh" ]]; then
88
- SCRIPT=".claude/skills/gsd/auto/auto-loop.sh"
89
- elif [[ -f "$HOME/.claude/skills/gsd/auto/auto-loop.sh" ]]; then
90
- SCRIPT="$HOME/.claude/skills/gsd/auto/auto-loop.sh"
87
+ if [[ -f ".claude/skills/gsd-cc-auto/auto-loop.sh" ]]; then
88
+ SCRIPT=".claude/skills/gsd-cc-auto/auto-loop.sh"
89
+ elif [[ -f "$HOME/.claude/skills/gsd-cc-auto/auto-loop.sh" ]]; then
90
+ SCRIPT="$HOME/.claude/skills/gsd-cc-auto/auto-loop.sh"
91
91
  fi
92
92
  ```
93
93
 
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: gsd-cc-help
3
+ description: >
4
+ Show available GSD-CC commands and how they work. Use when user says
5
+ /gsd-cc-help, /gsd-cc help, or asks what commands are available.
6
+ allowed-tools: Read, Glob
7
+ ---
8
+
9
+ # /gsd-cc-help — Command Reference
10
+
11
+ ## Language
12
+
13
+ Read the `language` field from `.gsd/STATE.md` if it exists. All output must use that language. If no project exists or no language is set, default to English.
14
+
15
+ ## Output
16
+
17
+ Show this reference, adapted to the configured language:
18
+
19
+ ```
20
+ GSD-CC — Get Shit Done on Claude Code
21
+
22
+ MAIN COMMAND
23
+ /gsd-cc Reads project state, suggests the next action.
24
+ This is the only command you need.
25
+
26
+ PHASE COMMANDS (power users)
27
+ /gsd-cc-seed Start a new project — guided ideation
28
+ /gsd-cc-discuss Resolve ambiguities before planning
29
+ /gsd-cc-plan Break a slice into tasks with acceptance criteria
30
+ /gsd-cc-apply Execute the next task (manual mode)
31
+ /gsd-cc-auto Start autonomous execution via claude -p
32
+ /gsd-cc-unify Mandatory plan-vs-actual reconciliation
33
+
34
+ INFO & MANAGEMENT
35
+ /gsd-cc-status Show project progress and AC tracking
36
+ /gsd-cc-update Update GSD-CC to the latest version
37
+ /gsd-cc-help This help screen
38
+ /gsd-cc-tutorial Guided walkthrough with a sample project
39
+
40
+ THE FLOW
41
+ 1. /gsd-cc → Seed (what are you building?)
42
+ 2. /gsd-cc → Roadmap (milestones and slices)
43
+ 3. /gsd-cc → Plan (tasks with ACs and boundaries)
44
+ 4. /gsd-cc → Execute (manual or auto)
45
+ 5. /gsd-cc → UNIFY (mandatory quality check)
46
+ 6. /gsd-cc → Next slice or milestone complete
47
+
48
+ PROJECT FILES
49
+ .gsd/STATE.md Current position and progress
50
+ .gsd/PLANNING.md Project brief from ideation
51
+ .gsd/PROJECT.md Elevator pitch (3-5 sentences)
52
+ .gsd/M001-ROADMAP.md Milestones and slices
53
+ .gsd/S01-PLAN.md Slice plan with architecture notes
54
+ .gsd/S01-T01-PLAN.md Task plan with ACs and boundaries
55
+ .gsd/S01-T01-SUMMARY.md What actually happened
56
+ .gsd/S01-UNIFY.md Plan vs. actual comparison
57
+ .gsd/DECISIONS.md All decisions, append-only
58
+ .gsd/COSTS.jsonl Token usage tracking (auto-mode)
59
+
60
+ TIPS
61
+ • You only need /gsd-cc — it always knows what to do next
62
+ • Type "auto" when asked to run tasks autonomously
63
+ • Come back tomorrow — state survives between sessions
64
+ • UNIFY cannot be skipped — it's what keeps quality high
65
+ ```
66
+
67
+ ## After showing help
68
+
69
+ If a `.gsd/` directory exists, add a one-line status: where the project currently is and what the suggested next step would be.
@@ -201,8 +201,8 @@ One file per task, using the PLAN.xml template format:
201
201
 
202
202
  Before finishing, check against `checklists/planning-ready.md`:
203
203
 
204
- Read: `~/.claude/skills/gsd/checklists/planning-ready.md`
205
- (or `./.claude/skills/gsd/checklists/planning-ready.md`)
204
+ Read: `~/.claude/skills/gsd-cc-shared/checklists/planning-ready.md`
205
+ (or `./.claude/skills/gsd-cc-shared/checklists/planning-ready.md`)
206
206
 
207
207
  Verify ALL of these:
208
208
 
@@ -65,14 +65,14 @@ If ambiguous, ask ONE clarifying question. Don't overthink it.
65
65
 
66
66
  Read the type-specific guide from:
67
67
  ```
68
- ~/.claude/skills/gsd/seed/types/{type}/guide.md
68
+ ~/.claude/skills/gsd-cc-seed/types/{type}/guide.md
69
69
  ```
70
70
 
71
- If installed locally, check `./.claude/skills/gsd/seed/types/{type}/guide.md` instead.
71
+ If installed locally, check `./.claude/skills/gsd-cc-seed/types/{type}/guide.md` instead.
72
72
 
73
73
  Also read the config:
74
74
  ```
75
- ~/.claude/skills/gsd/seed/types/{type}/config.md
75
+ ~/.claude/skills/gsd-cc-seed/types/{type}/config.md
76
76
  ```
77
77
 
78
78
  The guide contains numbered sections with `Explore` and `Suggest` fields. The config sets the rigor level and section count.
@@ -108,8 +108,8 @@ Walk through the guide sections **one at a time**. For each section:
108
108
 
109
109
  After completing all sections, mentally check against `checklists/planning-ready.md`:
110
110
 
111
- Read: `~/.claude/skills/gsd/seed/../../checklists/planning-ready.md`
112
- (or `./.claude/skills/gsd/checklists/planning-ready.md`)
111
+ Read: `~/.claude/skills/gsd-cc-shared/checklists/planning-ready.md`
112
+ (or `./.claude/skills/gsd-cc-shared/checklists/planning-ready.md`)
113
113
 
114
114
  Verify:
115
115
  - Is there enough information to create a roadmap?
@@ -124,7 +124,7 @@ Create the `.gsd/` directory and write these files:
124
124
 
125
125
  #### `.gsd/PLANNING.md`
126
126
 
127
- Use the template from `templates/PLANNING.md`. Fill in all sections from the conversation:
127
+ Use the template from `~/.claude/skills/gsd-cc-shared/templates/PLANNING.md` (or `./.claude/skills/gsd-cc-shared/templates/PLANNING.md`). Fill in all sections from the conversation:
128
128
  - Vision (from their initial description + refinements)
129
129
  - Users (from user/auth discussions)
130
130
  - Requirements v1, v2, Out of Scope (from exploration)
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: gsd-cc-tutorial
3
+ description: >
4
+ Interactive walkthrough that builds a small sample project step by step.
5
+ Use when user says /gsd-cc-tutorial, /gsd-cc tutorial, or asks for a
6
+ guided introduction to GSD-CC.
7
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
8
+ ---
9
+
10
+ # /gsd-cc-tutorial — Guided Walkthrough
11
+
12
+ You guide the user through building a small project with GSD-CC, explaining each phase as it happens. This is a teaching mode — go slow, explain what's happening and why.
13
+
14
+ ## Language
15
+
16
+ Ask the user which language to use before starting, just like `/gsd-cc-seed` does. Default to English.
17
+
18
+ ## Step 1: Welcome
19
+
20
+ ```
21
+ Welcome to the GSD-CC Tutorial!
22
+
23
+ I'll walk you through building a small project from start to finish.
24
+ You'll see every phase in action: Seed → Plan → Execute → UNIFY.
25
+
26
+ The whole tutorial takes about 10-15 minutes.
27
+
28
+ We'll build a simple CLI tool together — small enough to finish quickly,
29
+ big enough to see every GSD-CC feature.
30
+
31
+ Ready? (yes to start)
32
+ ```
33
+
34
+ Wait for confirmation.
35
+
36
+ ## Step 2: Explain the Philosophy
37
+
38
+ Briefly explain (3-4 sentences max):
39
+ - Claude Code is the agent, GSD-CC tells it what to do and when
40
+ - Projects are broken into Milestones → Slices → Tasks
41
+ - Each task fits one context window (fresh session, no context rot)
42
+ - UNIFY checks that what was built matches what was planned
43
+
44
+ Then say: "Let's start. I'll run `/gsd-cc-seed` now — this is the ideation phase."
45
+
46
+ ## Step 3: Run Seed (with commentary)
47
+
48
+ Delegate to `/gsd-cc-seed` but with a twist: use this project idea:
49
+
50
+ ```
51
+ A Node.js CLI tool called "mdcount" that counts words, sentences,
52
+ and reading time in Markdown files. Takes a file path as argument,
53
+ outputs a summary.
54
+ ```
55
+
56
+ Let the user confirm or pick their own idea. If they pick their own, use that instead.
57
+
58
+ Before each seed question, add a brief explanation:
59
+ - "Now I'll ask about [topic]. This helps me understand [why]."
60
+
61
+ After seed completes, explain what was created:
62
+ - "Seed created 5 files in .gsd/. Let me show you the key one..."
63
+ - Show a brief excerpt of PLANNING.md
64
+
65
+ ## Step 4: Run Roadmap (with commentary)
66
+
67
+ Say: "Next, /gsd-cc would create a roadmap. For this small project, we'll have 1 milestone with 2-3 slices."
68
+
69
+ Create the roadmap. After creation, explain:
70
+ - What a milestone is (a major deliverable)
71
+ - What a slice is (a coherent work unit, 2-7 tasks)
72
+ - Why ordering matters (foundations first)
73
+
74
+ ## Step 5: Run Plan (with commentary)
75
+
76
+ Say: "Now I'll plan the first slice in detail. Each task gets acceptance criteria (Given/When/Then) and boundaries (what NOT to touch)."
77
+
78
+ Delegate to `/gsd-cc-plan`. After planning, show:
79
+ - One task plan as an example
80
+ - Highlight the acceptance criteria format
81
+ - Highlight the boundaries section
82
+ - "These boundaries prevent Claude from going on tangents — a common problem in AI coding."
83
+
84
+ ## Step 6: Execute One Task (manual)
85
+
86
+ Say: "Let's execute the first task manually so you can see what happens."
87
+
88
+ Delegate to `/gsd-cc-apply` for T01 only. After execution:
89
+ - Show the SUMMARY.md that was created
90
+ - Explain how it compares to the plan
91
+ - "In auto-mode, this happens for every task without you doing anything."
92
+
93
+ ## Step 7: Explain Auto-Mode
94
+
95
+ Don't actually run auto-mode (that would take too long for a tutorial). Instead explain:
96
+ - "For the remaining tasks, you'd type `/gsd-cc` and choose 'auto'"
97
+ - "Auto-mode runs each task in a fresh `claude -p` session"
98
+ - "It uses your Max Plan — no API costs"
99
+ - "When all tasks in a slice are done, UNIFY runs automatically"
100
+
101
+ ## Step 8: Explain UNIFY
102
+
103
+ Explain what UNIFY does:
104
+ - Compares what was planned vs. what was built
105
+ - Documents deviations and decisions
106
+ - Cannot be skipped — the router blocks until it's done
107
+ - "This is what prevents 'it sort of works but doesn't match the design'"
108
+
109
+ ## Step 9: Wrap Up
110
+
111
+ ```
112
+ That's GSD-CC!
113
+
114
+ What you learned:
115
+ ✓ Seed — turns your idea into a structured plan
116
+ ✓ Roadmap — breaks it into milestones and slices
117
+ ✓ Plan — creates tasks with acceptance criteria + boundaries
118
+ ✓ Apply — executes tasks (manual or auto)
119
+ ✓ UNIFY — mandatory quality check after each slice
120
+
121
+ Next steps:
122
+ 1. Delete this tutorial project: rm -rf .gsd/
123
+ 2. Start your real project: /gsd-cc
124
+ 3. Or explore: /gsd-cc-help for all commands
125
+
126
+ Happy building!
127
+ ```
128
+
129
+ ## Rules
130
+
131
+ - **Go slow.** This is teaching, not production. Pause between phases.
132
+ - **Explain the WHY**, not just the what. Users should understand the design decisions.
133
+ - **Keep the project small.** 1 milestone, 2-3 slices, 2-3 tasks per slice max.
134
+ - **Only execute 1 task.** The tutorial should take 10-15 minutes, not an hour.
135
+ - **Be encouraging.** The user is learning something new.
@@ -167,14 +167,14 @@ If the roadmap needs an update, describe what should change but do NOT modify th
167
167
 
168
168
  Check against `checklists/unify-complete.md`:
169
169
 
170
- Read: `~/.claude/skills/gsd/checklists/unify-complete.md`
171
- (or `./.claude/skills/gsd/checklists/unify-complete.md`)
170
+ Read: `~/.claude/skills/gsd-cc-shared/checklists/unify-complete.md`
171
+ (or `./.claude/skills/gsd-cc-shared/checklists/unify-complete.md`)
172
172
 
173
173
  Verify ALL items pass. If any fails, fix the UNIFY document before proceeding.
174
174
 
175
175
  ## Step 9: Write UNIFY.md
176
176
 
177
- Write `.gsd/S{nn}-UNIFY.md` using the template from `templates/UNIFY.md`. Include all sections from Steps 2-7.
177
+ Write `.gsd/S{nn}-UNIFY.md` using the template from `~/.claude/skills/gsd-cc-shared/templates/UNIFY.md` (or `./.claude/skills/gsd-cc-shared/templates/UNIFY.md`). Include all sections from Steps 2-7.
178
178
 
179
179
  Set frontmatter:
180
180
  ```yaml
@@ -15,8 +15,8 @@ You update GSD-CC to the latest version by running the installer.
15
15
  Check where GSD-CC is installed:
16
16
 
17
17
  ```
18
- 1. Check ~/.claude/skills/gsd/SKILL.md (global)
19
- 2. Check ./.claude/skills/gsd/SKILL.md (local)
18
+ 1. Check ~/.claude/skills/gsd-cc/SKILL.md (global)
19
+ 2. Check ./.claude/skills/gsd-cc/SKILL.md (local)
20
20
  ```
21
21
 
22
22
  Use `Glob` to find which exists. If both exist, update both.