gsd-cc 0.1.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.1.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",
@@ -12,6 +12,10 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
12
12
 
13
13
  You are the GSD-CC router. Your job is to read the current project state and suggest **exactly one** next action. Not a menu. Not "what do you want to do?". One clear recommendation.
14
14
 
15
+ ## Language
16
+
17
+ Read the `language` field from `.gsd/STATE.md`. All output — messages, suggestions, file content — must use that language. If no language is set, default to English.
18
+
15
19
  ## Step 1: Detect State
16
20
 
17
21
  Check what exists on disk:
@@ -143,6 +147,7 @@ When routing to a sub-skill, tell the user what you're doing and then invoke the
143
147
  - Reconciliation → `/gsd-cc-unify`
144
148
  - Auto mode → `/gsd-cc-auto`
145
149
  - Status overview → `/gsd-cc-status`
150
+ - Update skills → `/gsd-cc-update`
146
151
 
147
152
  Power users can invoke these directly. But the default path only needs `/gsd-cc` + Enter.
148
153
 
@@ -12,6 +12,10 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
12
12
 
13
13
  You execute one task at a time from the current slice plan. Each task has a plan with acceptance criteria and boundaries. Follow the plan precisely.
14
14
 
15
+ ## Language
16
+
17
+ Read the `language` field from `.gsd/STATE.md`. All output — messages, summaries, commit messages — must use that language. If no language is set, default to English.
18
+
15
19
  ## Step 1: Determine Current Task
16
20
 
17
21
  1. Read `.gsd/STATE.md` — get `current_slice` and `current_task`
@@ -11,6 +11,10 @@ allowed-tools: Read, Write, Bash, Glob
11
11
 
12
12
  You start the auto-loop that executes tasks autonomously, each in a fresh context window.
13
13
 
14
+ ## Language
15
+
16
+ Read the `language` field from `.gsd/STATE.md`. All output — messages, status updates — must use that language. If no language is set, default to English.
17
+
14
18
  ## Step 1: Check Prerequisites
15
19
 
16
20
  Before starting, verify ALL of these:
@@ -80,10 +84,10 @@ Resolve the script location:
80
84
 
81
85
  ```bash
82
86
  # Check local first, then global
83
- if [[ -f ".claude/skills/gsd/auto/auto-loop.sh" ]]; then
84
- SCRIPT=".claude/skills/gsd/auto/auto-loop.sh"
85
- elif [[ -f "$HOME/.claude/skills/gsd/auto/auto-loop.sh" ]]; then
86
- 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"
87
91
  fi
88
92
  ```
89
93
 
@@ -12,6 +12,10 @@ allowed-tools: Read, Write, Edit, Glob, Grep
12
12
 
13
13
  You help the user resolve ambiguities BEFORE planning begins. Your job is to identify gray areas in the current slice and turn them into concrete decisions.
14
14
 
15
+ ## Language
16
+
17
+ Read the `language` field from `.gsd/STATE.md`. All output — messages, questions, decision records — must use that language. If no language is set, default to English.
18
+
15
19
  ## Step 1: Load Context
16
20
 
17
21
  1. Read `.gsd/STATE.md` — get `current_slice` and `milestone`
@@ -11,6 +11,10 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
11
11
 
12
12
  You turn a slice description into a set of executable task plans. Each task gets BDD acceptance criteria and explicit boundaries. The result is a set of files that `/gsd-cc-apply` or `auto-loop.sh` can execute without ambiguity.
13
13
 
14
+ ## Language
15
+
16
+ Read the `language` field from `.gsd/STATE.md`. All output — messages, plans, acceptance criteria, boundaries — must use that language. If no language is set, default to English.
17
+
14
18
  ## Step 1: Load Context
15
19
 
16
20
  Read these files (all that exist):
@@ -197,8 +201,8 @@ One file per task, using the PLAN.xml template format:
197
201
 
198
202
  Before finishing, check against `checklists/planning-ready.md`:
199
203
 
200
- Read: `~/.claude/skills/gsd/checklists/planning-ready.md`
201
- (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`)
202
206
 
203
207
  Verify ALL of these:
204
208
 
@@ -14,13 +14,26 @@ You are a project coach. You think WITH the user, not interrogate them. Your job
14
14
 
15
15
  ## Behavior
16
16
 
17
- ### Step 1: Ask What They're Building
17
+ ### Step 0: Language Selection
18
18
 
19
- Start with a simple, open question:
19
+ Before anything else, ask the user which language to use:
20
20
 
21
21
  ```
22
22
  No .gsd/ directory found. Let's start a new project.
23
23
 
24
+ Which language should I use? (e.g. English, Deutsch, Français, ...)
25
+ Default: English
26
+ ```
27
+
28
+ If the user responds with a project description instead of a language, default to English and continue with Step 1 using their response as the project description.
29
+
30
+ Store the chosen language. **All communication, generated files, plans, acceptance criteria, UNIFY reports, and status output will use this language from now on.**
31
+
32
+ ### Step 1: Ask What They're Building
33
+
34
+ If not already answered in Step 0, ask:
35
+
36
+ ```
24
37
  What are you building?
25
38
  Tell me in a sentence or two — I'll figure out the rest.
26
39
  ```
@@ -52,14 +65,14 @@ If ambiguous, ask ONE clarifying question. Don't overthink it.
52
65
 
53
66
  Read the type-specific guide from:
54
67
  ```
55
- ~/.claude/skills/gsd/seed/types/{type}/guide.md
68
+ ~/.claude/skills/gsd-cc-seed/types/{type}/guide.md
56
69
  ```
57
70
 
58
- 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.
59
72
 
60
73
  Also read the config:
61
74
  ```
62
- ~/.claude/skills/gsd/seed/types/{type}/config.md
75
+ ~/.claude/skills/gsd-cc-seed/types/{type}/config.md
63
76
  ```
64
77
 
65
78
  The guide contains numbered sections with `Explore` and `Suggest` fields. The config sets the rigor level and section count.
@@ -95,8 +108,8 @@ Walk through the guide sections **one at a time**. For each section:
95
108
 
96
109
  After completing all sections, mentally check against `checklists/planning-ready.md`:
97
110
 
98
- Read: `~/.claude/skills/gsd/seed/../../checklists/planning-ready.md`
99
- (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`)
100
113
 
101
114
  Verify:
102
115
  - Is there enough information to create a roadmap?
@@ -111,7 +124,7 @@ Create the `.gsd/` directory and write these files:
111
124
 
112
125
  #### `.gsd/PLANNING.md`
113
126
 
114
- 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:
115
128
  - Vision (from their initial description + refinements)
116
129
  - Users (from user/auth discussions)
117
130
  - Requirements v1, v2, Out of Scope (from exploration)
@@ -137,7 +150,8 @@ Short project vision — 3-5 sentences max. This is the "elevator pitch" that ev
137
150
  ```json
138
151
  {
139
152
  "type": "{type}",
140
- "rigor": "{rigor}"
153
+ "rigor": "{rigor}",
154
+ "language": "{language}"
141
155
  }
142
156
  ```
143
157
 
@@ -150,6 +164,7 @@ Initialize from the STATE.md template with:
150
164
  - `phase: seed-complete`
151
165
  - `rigor: {rigor}`
152
166
  - `project_type: {type}`
167
+ - `language: {language}`
153
168
  - `auto_mode: false`
154
169
  - `last_updated: {now ISO}`
155
170
 
@@ -11,6 +11,10 @@ allowed-tools: Read, Glob, Grep, Bash
11
11
 
12
12
  You show a clear, concise overview of where the project stands. No actions — just information and one suggested next step.
13
13
 
14
+ ## Language
15
+
16
+ Read the `language` field from `.gsd/STATE.md`. All output — messages, progress reports — must use that language. If no language is set, default to English.
17
+
14
18
  ## Step 1: Read State
15
19
 
16
20
  1. Read `.gsd/STATE.md`
@@ -7,6 +7,7 @@ loop_position: 0
7
7
  unify_required: false
8
8
  rigor: standard
9
9
  project_type: application
10
+ language: English
10
11
  auto_mode: false
11
12
  last_updated: {{ISO_DATE}}
12
13
  ---
@@ -13,6 +13,10 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
13
13
 
14
14
  UNIFY is not optional. It runs after every slice. The `/gsd-cc` router blocks all other actions until UNIFY is complete. This is the single most important quality mechanism in GSD-CC.
15
15
 
16
+ ## Language
17
+
18
+ Read the `language` field from `.gsd/STATE.md`. All output — messages, UNIFY reports, deviation analysis — must use that language. If no language is set, default to English.
19
+
16
20
  ## Why UNIFY Exists
17
21
 
18
22
  - Without UNIFY, the next slice builds on assumptions instead of facts.
@@ -163,14 +167,14 @@ If the roadmap needs an update, describe what should change but do NOT modify th
163
167
 
164
168
  Check against `checklists/unify-complete.md`:
165
169
 
166
- Read: `~/.claude/skills/gsd/checklists/unify-complete.md`
167
- (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`)
168
172
 
169
173
  Verify ALL items pass. If any fails, fix the UNIFY document before proceeding.
170
174
 
171
175
  ## Step 9: Write UNIFY.md
172
176
 
173
- 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.
174
178
 
175
179
  Set frontmatter:
176
180
  ```yaml
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: gsd-cc-update
3
+ description: >
4
+ Update GSD-CC skills to the latest version from npm. Use when user says
5
+ /gsd-cc-update, /gsd-cc update, or asks to update GSD-CC.
6
+ allowed-tools: Read, Bash, Glob
7
+ ---
8
+
9
+ # /gsd-cc-update — Update GSD-CC
10
+
11
+ You update GSD-CC to the latest version by running the installer.
12
+
13
+ ## Step 1: Detect Current Installation
14
+
15
+ Check where GSD-CC is installed:
16
+
17
+ ```
18
+ 1. Check ~/.claude/skills/gsd-cc/SKILL.md (global)
19
+ 2. Check ./.claude/skills/gsd-cc/SKILL.md (local)
20
+ ```
21
+
22
+ Use `Glob` to find which exists. If both exist, update both.
23
+
24
+ ## Step 2: Get Current Version
25
+
26
+ Run:
27
+ ```bash
28
+ npm view gsd-cc version
29
+ ```
30
+
31
+ This shows the latest available version on npm.
32
+
33
+ Also check if a `package.json` exists in the installed skills directory's parent to find the current version. If not available, report "unknown".
34
+
35
+ ## Step 3: Confirm with User
36
+
37
+ Show:
38
+ ```
39
+ GSD-CC Update
40
+
41
+ Installed: {current_version or "unknown"}
42
+ Latest: {latest_version}
43
+ Location: {global and/or local path}
44
+
45
+ Update now? (y/n)
46
+ ```
47
+
48
+ If the versions match, tell the user they're already on the latest version and stop.
49
+
50
+ ## Step 4: Run Update
51
+
52
+ Based on where it's installed, run:
53
+
54
+ - **Global only:** `npx gsd-cc@latest --global`
55
+ - **Local only:** `npx gsd-cc@latest --local`
56
+ - **Both:** `npx gsd-cc@latest --global && npx gsd-cc@latest --local`
57
+
58
+ ## Step 5: Confirm
59
+
60
+ ```
61
+ ✓ GSD-CC updated to {version}.
62
+ Your .gsd/ project state is unchanged.
63
+ ```
64
+
65
+ ## Safety
66
+
67
+ - **Never touch .gsd/ directory.** The update only replaces skill files, not project state.
68
+ - **Existing project state (STATE.md, plans, summaries) is preserved.**
69
+ - **Custom project types** in `seed/types/` will be overwritten if they share a name with built-in types. Warn the user if custom types are detected.