get-shit-done-cc 1.6.0 → 1.6.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
@@ -123,8 +123,13 @@ function writeSettings(settingsPath, settings) {
123
123
 
124
124
  /**
125
125
  * Recursively copy directory, replacing paths in .md files
126
+ * Deletes existing destDir first to remove orphaned files from previous versions
126
127
  */
127
128
  function copyWithPathReplacement(srcDir, destDir, pathPrefix) {
129
+ // Clean install: remove existing destination to prevent orphaned files
130
+ if (fs.existsSync(destDir)) {
131
+ fs.rmSync(destDir, { recursive: true });
132
+ }
128
133
  fs.mkdirSync(destDir, { recursive: true });
129
134
 
130
135
  const entries = fs.readdirSync(srcDir, { withFileTypes: true });
@@ -187,10 +192,30 @@ function install(isGlobal) {
187
192
  console.log(` ${green}✓${reset} Installed get-shit-done`);
188
193
 
189
194
  // Copy agents to ~/.claude/agents (subagents must be at root level)
195
+ // Only delete gsd-*.md files to preserve user's custom agents
190
196
  const agentsSrc = path.join(src, 'agents');
191
197
  if (fs.existsSync(agentsSrc)) {
192
198
  const agentsDest = path.join(claudeDir, 'agents');
193
- copyWithPathReplacement(agentsSrc, agentsDest, pathPrefix);
199
+ fs.mkdirSync(agentsDest, { recursive: true });
200
+
201
+ // Remove old GSD agents (gsd-*.md) before copying new ones
202
+ if (fs.existsSync(agentsDest)) {
203
+ for (const file of fs.readdirSync(agentsDest)) {
204
+ if (file.startsWith('gsd-') && file.endsWith('.md')) {
205
+ fs.unlinkSync(path.join(agentsDest, file));
206
+ }
207
+ }
208
+ }
209
+
210
+ // Copy new agents (don't use copyWithPathReplacement which would wipe the folder)
211
+ const agentEntries = fs.readdirSync(agentsSrc, { withFileTypes: true });
212
+ for (const entry of agentEntries) {
213
+ if (entry.isFile() && entry.name.endsWith('.md')) {
214
+ let content = fs.readFileSync(path.join(agentsSrc, entry.name), 'utf8');
215
+ content = content.replace(/~\/\.claude\//g, pathPrefix);
216
+ fs.writeFileSync(path.join(agentsDest, entry.name), content);
217
+ }
218
+ }
194
219
  console.log(` ${green}✓${reset} Installed agents`);
195
220
  }
196
221
 
@@ -77,6 +77,57 @@ You're ahead of the latest release (development version?).
77
77
  STOP here if ahead.
78
78
  </step>
79
79
 
80
+ <step name="show_changes_and_confirm">
81
+ **If update available**, fetch and show what's new BEFORE updating:
82
+
83
+ 1. Fetch changelog (same as fetch_changelog step)
84
+ 2. Extract entries between installed and latest versions
85
+ 3. Display preview and ask for confirmation:
86
+
87
+ ```
88
+ ## GSD Update Available
89
+
90
+ **Installed:** 1.5.10
91
+ **Latest:** 1.5.15
92
+
93
+ ### What's New
94
+ ────────────────────────────────────────────────────────────
95
+
96
+ ## [1.5.15] - 2026-01-20
97
+
98
+ ### Added
99
+ - Feature X
100
+
101
+ ## [1.5.14] - 2026-01-18
102
+
103
+ ### Fixed
104
+ - Bug fix Y
105
+
106
+ ────────────────────────────────────────────────────────────
107
+
108
+ ⚠️ **Note:** The installer performs a clean install of GSD folders:
109
+ - `~/.claude/commands/gsd/` will be wiped and replaced
110
+ - `~/.claude/get-shit-done/` will be wiped and replaced
111
+ - `~/.claude/agents/gsd-*` files will be replaced
112
+
113
+ Your custom files in other locations are preserved:
114
+ - Custom commands in `~/.claude/commands/your-stuff/` ✓
115
+ - Custom agents not prefixed with `gsd-` ✓
116
+ - Custom hooks ✓
117
+ - Your CLAUDE.md files ✓
118
+
119
+ If you've modified any GSD files directly, back them up first.
120
+ ```
121
+
122
+ Use AskUserQuestion:
123
+ - Question: "Proceed with update?"
124
+ - Options:
125
+ - "Yes, update now"
126
+ - "No, cancel"
127
+
128
+ **If user cancels:** STOP here.
129
+ </step>
130
+
80
131
  <step name="run_update">
81
132
  Run the update:
82
133
 
@@ -93,63 +144,18 @@ rm -f ~/.claude/cache/gsd-update-check.json
93
144
  ```
94
145
  </step>
95
146
 
96
- <step name="fetch_changelog">
97
- Fetch changelog from GitHub:
98
-
99
- Use WebFetch tool with:
100
- - URL: `https://raw.githubusercontent.com/glittercowboy/get-shit-done/main/CHANGELOG.md`
101
- - Prompt: "Extract all version entries with their dates and changes. Return the raw markdown for each version section."
102
-
103
- **If fetch fails:**
104
- Fall back to local:
105
- ```bash
106
- cat ~/.claude/get-shit-done/CHANGELOG.md 2>/dev/null
107
- ```
108
- </step>
109
-
110
- <step name="extract_changes">
111
- From the changelog, extract entries between:
112
- - **From:** installed version (exclusive)
113
- - **To:** latest version (inclusive)
114
-
115
- Parse each `## [X.Y.Z]` section and collect all versions in the range.
116
- </step>
117
-
118
147
  <step name="display_result">
119
- Format beautiful output:
148
+ Format completion message (changelog was already shown in confirmation step):
120
149
 
121
150
  ```
122
151
  ╔═══════════════════════════════════════════════════════════╗
123
152
  ║ GSD Updated: v1.5.10 → v1.5.15 ║
124
153
  ╚═══════════════════════════════════════════════════════════╝
125
154
 
126
- ✨ What's New
127
- ────────────────────────────────────────────────────────────
128
-
129
- ## [1.5.15] - 2026-01-20
130
-
131
- ### Added
132
- - Feature X
133
- - Feature Y
134
-
135
- ## [1.5.14] - 2026-01-18
136
-
137
- ### Fixed
138
- - Bug in feature A
139
-
140
- ────────────────────────────────────────────────────────────
141
-
142
155
  ⚠️ Restart Claude Code to pick up the new commands.
143
156
 
144
157
  [View full changelog](https://github.com/glittercowboy/get-shit-done/blob/main/CHANGELOG.md)
145
158
  ```
146
-
147
- **Key elements:**
148
- - Box header with version transition
149
- - All changelog entries in the range
150
- - **BREAKING:** changes surfaced prominently
151
- - Restart reminder (critical for picking up new commands)
152
- - Link to full changelog
153
159
  </step>
154
160
 
155
161
  </process>
@@ -158,8 +164,9 @@ Format beautiful output:
158
164
  - [ ] Installed version read correctly
159
165
  - [ ] Latest version checked via npm
160
166
  - [ ] Update skipped if already current
167
+ - [ ] Changelog fetched and displayed BEFORE update
168
+ - [ ] Clean install warning shown
169
+ - [ ] User confirmation obtained
161
170
  - [ ] Update executed successfully
162
- - [ ] Changelog fetched (remote or local fallback)
163
- - [ ] Changes between versions displayed
164
171
  - [ ] Restart reminder shown
165
172
  </success_criteria>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "get-shit-done-cc",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "A meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES.",
5
5
  "bin": {
6
6
  "get-shit-done-cc": "bin/install.js"