gsd-cc 0.2.0 → 0.2.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/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', 'plan', 'seed', 'status', '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.2.1",
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",
@@ -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
 
@@ -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)
@@ -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.