@therocketcode/gsd-core 1.7.0 → 1.7.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "gsd-core",
3
3
  "displayName": "GSD Core",
4
- "version": "1.7.0",
4
+ "version": "1.7.1",
5
5
  "description": "GSD Core is a meta-prompting, context engineering, and spec-driven development system for AI coding agents.",
6
6
  "author": {
7
7
  "name": "TheRocketCodeMX",
package/README.md CHANGED
@@ -74,6 +74,20 @@ Once installed, start your first project:
74
74
 
75
75
  New here? Follow [Your first project](docs/tutorials/your-first-project.md) for a guided walkthrough from install to first shipped phase.
76
76
 
77
+ ### Installing & updating
78
+
79
+ How you get the latest version depends on what you already have installed:
80
+
81
+ - **Nothing installed yet** — run the Quickstart command once:
82
+ ```bash
83
+ npx -y @therocketcode/gsd-core@latest --claude --global # or --local for a single project
84
+ ```
85
+ After that you're on the self-update path below.
86
+
87
+ - **Already have this package (`@therocketcode/gsd-core`)** — just run `/gsd-update` in your session. The package coordinate is baked into the install, so a SessionStart check surfaces a banner ("GSD update available: X → Y. Run /gsd:update.") and `/gsd-update` pulls the new version. No special command, no reinstall.
88
+
89
+ - **Coming from the original upstream GSD (`@opengsd/gsd-core` / `get-shit-done`)** — its `/gsd-update` points at the upstream package and will never find this fork (different npm coordinate). Switch with a one-time install using the Quickstart command above. The installer overwrites the same-named `/gsd-*` files, re-points the baked identity at this fork (so future `/gsd-update` works), and the bundled legacy-cleanup removes superseded upstream hooks and stale update-check caches. After that, the self-update path applies.
90
+
77
91
  ---
78
92
 
79
93
  ## Documentation
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gsd-core",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "GSD Core — a meta-prompting, context engineering, and spec-driven development system for AI coding agents. Loads gsd's operating context into every Gemini CLI session.",
5
5
  "contextFileName": "GEMINI.md"
6
6
  }
@@ -21,12 +21,40 @@ const fs = require('fs');
21
21
  // ─── Constants ───────────────────────────────────────────────────────────────
22
22
 
23
23
  /**
24
- * Substring that identifies a file as belonging to the old package.
25
- * Assembled from parts so this source file itself never contains the literal
24
+ * Substrings that identify a code file as belonging to a superseded GSD
25
+ * package either the very-old pre-rename original or the rug-pulled upstream
26
+ * this project forked away from. A scanned code file (.js/.cjs/.mjs/.sh under
27
+ * hooks/ or commands/) containing ANY of these is a genuine leftover from a
28
+ * package this install replaces, and is safe to flag.
29
+ *
30
+ * Each is assembled from parts so THIS source file never contains the literal
26
31
  * as a plain substring (avoids self-flagging if the content scan were ever
27
- * widened back to include this subtree).
32
+ * widened to include the gsd-core/ subtree). Our own shipped code contains
33
+ * none of these — the package-identity drift lint guards that — so flagging
34
+ * them can never delete a freshly-installed @therocketcode file.
35
+ *
36
+ * - 'gsd-core-cc' — the pre-rename original package.
37
+ * - '@opengsd/gsd-core' — the upstream npm coordinate (rug-pulled fork source).
38
+ * - 'open-gsd/gsd-core' — the upstream GitHub repo slug.
39
+ */
40
+ const OLD_PACKAGE_SIGNALS = [
41
+ 'gsd-core' + '-cc',
42
+ '@opengsd' + '/gsd-core',
43
+ 'open-gsd' + '/gsd-core',
44
+ ];
45
+
46
+ /**
47
+ * Update-check cache files written by superseded packages, removed so a stale
48
+ * cache can't suppress or misreport update availability after switching.
49
+ * NEVER include the current package's own cache
50
+ * (`gsd-update-check-therocketcode-gsd-core.json`).
51
+ * - 'gsd-update-check.json' — the old shared (pre-per-package) cache.
52
+ * - 'gsd-update-check-opengsd-gsd-core.json' — the upstream @opengsd per-package cache.
28
53
  */
29
- const OLD_PACKAGE_SIGNAL = 'gsd-core' + '-cc';
54
+ const LEGACY_CACHE_FILENAMES = [
55
+ 'gsd-update-check.json',
56
+ 'gsd-update-check-opengsd-gsd-core.json',
57
+ ];
30
58
 
31
59
  /**
32
60
  * Subtrees within a configDir that GSD actively scans for old-package content.
@@ -97,7 +125,7 @@ function collectFilesUnder(dir, fsMod) {
97
125
  }
98
126
 
99
127
  /**
100
- * Return true if the file at `absPath` contains the old-package substring.
128
+ * Return true if the file at `absPath` contains ANY superseded-package signal.
101
129
  * Skips unreadable files (returns false on any error).
102
130
  *
103
131
  * @param {string} absPath
@@ -107,7 +135,7 @@ function collectFilesUnder(dir, fsMod) {
107
135
  function fileContainsOldPackageSignal(absPath, fsMod) {
108
136
  try {
109
137
  const content = fsMod.readFileSync(absPath, 'utf8');
110
- return content.includes(OLD_PACKAGE_SIGNAL);
138
+ return OLD_PACKAGE_SIGNALS.some((signal) => content.includes(signal));
111
139
  } catch {
112
140
  return false;
113
141
  }
@@ -166,15 +194,17 @@ function planLegacyCleanup(configDirs, opts = {}) {
166
194
  }
167
195
  }
168
196
 
169
- // Legacy shared cache (fixed name from the old package)
170
- const legacyCachePath = path.join(homeDir, '.cache', 'gsd', 'gsd-update-check.json');
171
- try {
172
- const stat = fsMod.statSync(legacyCachePath);
173
- if (stat.isFile()) {
174
- addCandidate(legacyCachePath, 'legacy-shared-cache');
197
+ // Update-check caches written by superseded packages (never the current one)
198
+ for (const cacheName of LEGACY_CACHE_FILENAMES) {
199
+ const legacyCachePath = path.join(homeDir, '.cache', 'gsd', cacheName);
200
+ try {
201
+ const stat = fsMod.statSync(legacyCachePath);
202
+ if (stat.isFile()) {
203
+ addCandidate(legacyCachePath, 'legacy-shared-cache');
204
+ }
205
+ } catch {
206
+ // absent — skip
175
207
  }
176
- } catch {
177
- // absent — skip
178
208
  }
179
209
 
180
210
  // Sort deterministically by path
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@therocketcode/gsd-core",
3
- "version": "1.7.0",
3
+ "version": "1.7.1",
4
4
  "description": "GSD Core is a meta-prompting, context engineering, and spec-driven development system for AI coding agents.",
5
5
  "bin": {
6
6
  "gsd-core": "bin/install.js",