pi-gsd 1.6.4 → 1.6.6
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/.gsd/extensions/pi-gsd-hooks.ts +4 -3
- package/README.md +16 -1
- package/package.json +6 -1
- package/scripts/postinstall.js +30 -9
|
@@ -274,17 +274,18 @@ export default function (pi: ExtensionAPI) {
|
|
|
274
274
|
? Math.round((data.total_summaries / data.total_plans) * 100)
|
|
275
275
|
: 0;
|
|
276
276
|
|
|
277
|
-
|
|
277
|
+
const lines = [
|
|
278
|
+
`━━ GSD Progress ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`,
|
|
278
279
|
`📋 ${data.milestone_name} (${data.milestone_version})`,
|
|
279
280
|
``,
|
|
280
281
|
`Phases ${bar(phasePct)} ${done}/${total} (${phasePct}%)`,
|
|
281
282
|
`Plans ${bar(planPct)} ${data.total_summaries}/${data.total_plans} (${planPct}%)`,
|
|
282
283
|
``,
|
|
283
284
|
`Next steps:`,
|
|
284
|
-
|
|
285
|
+
...nextSteps(data.phases),
|
|
285
286
|
``,
|
|
286
287
|
`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`,
|
|
287
|
-
]
|
|
288
|
+
];
|
|
288
289
|
return { text: lines.join("\n"), data };
|
|
289
290
|
};
|
|
290
291
|
|
package/README.md
CHANGED
|
@@ -157,16 +157,31 @@ Projects started with the original GSD work without migration.
|
|
|
157
157
|
## Development
|
|
158
158
|
|
|
159
159
|
```sh
|
|
160
|
-
# Type-check
|
|
160
|
+
# Type-check (covers src/ + .gsd/extensions/)
|
|
161
161
|
npm run typecheck
|
|
162
162
|
|
|
163
163
|
# Build CLI (TypeScript → dist/pi-gsd-tools.js)
|
|
164
164
|
npm run build
|
|
165
165
|
|
|
166
|
+
# Unified gate: typecheck + build
|
|
167
|
+
npm run check
|
|
168
|
+
|
|
166
169
|
# Validate integrity
|
|
167
170
|
node scripts/validate-model-profiles.cjs
|
|
168
171
|
```
|
|
169
172
|
|
|
173
|
+
### Pre-commit hook
|
|
174
|
+
|
|
175
|
+
The pre-commit hook runs `ralphi check` (typecheck + build) via [prek](https://github.com/j178/prek).
|
|
176
|
+
prek is a dev-only tool — install it once:
|
|
177
|
+
|
|
178
|
+
```sh
|
|
179
|
+
# macOS / Linux (Homebrew)
|
|
180
|
+
brew install prek
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
The hook fires automatically on `git commit`. Without prek installed, commits still work but the gate is skipped.
|
|
184
|
+
|
|
170
185
|
---
|
|
171
186
|
|
|
172
187
|
## License
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-gsd",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.6",
|
|
4
4
|
"description": "Get Shit Done - Unofficial port of the renowned AI-native project-planning spec-driven toolkit",
|
|
5
5
|
"main": "dist/pi-gsd-tools.js",
|
|
6
6
|
"bin": {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
"build": "tsup src/cli.ts --format cjs --out-dir dist --minify --no-splitting && mv dist/cli.js dist/pi-gsd-tools.js && chmod +x dist/pi-gsd-tools.js",
|
|
12
12
|
"dev": "tsup src/cli.ts --format cjs --out-dir dist --watch",
|
|
13
13
|
"typecheck": "tsc --noEmit",
|
|
14
|
+
"check": "tsc --noEmit && npm run build",
|
|
14
15
|
"postinstall": "node scripts/postinstall.js",
|
|
15
16
|
"prepublishOnly": "npm run build"
|
|
16
17
|
},
|
|
@@ -56,6 +57,9 @@
|
|
|
56
57
|
"registry": "https://registry.npmjs.org/"
|
|
57
58
|
},
|
|
58
59
|
"pi": {
|
|
60
|
+
"extensions": [
|
|
61
|
+
"./.gsd/extensions"
|
|
62
|
+
],
|
|
59
63
|
"skills": [
|
|
60
64
|
"./skills"
|
|
61
65
|
],
|
|
@@ -70,6 +74,7 @@
|
|
|
70
74
|
"zod": "^3.25.76"
|
|
71
75
|
},
|
|
72
76
|
"devDependencies": {
|
|
77
|
+
"@mariozechner/pi-coding-agent": "^0.65.0",
|
|
73
78
|
"@types/node": "^22.0.0",
|
|
74
79
|
"tsup": "^8.0.0",
|
|
75
80
|
"typescript": "^5.0.0"
|
package/scripts/postinstall.js
CHANGED
|
@@ -219,14 +219,31 @@ function main() {
|
|
|
219
219
|
installed++;
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
// ── Pi extension
|
|
223
|
-
//
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
222
|
+
// ── Pi extension — served from npm package via pi.extensions in package.json ─────
|
|
223
|
+
// No local copying needed. Cleanup stale files from old install approach.
|
|
224
|
+
const extDir = path.join(PROJECT_ROOT, ".pi", "extensions");
|
|
225
|
+
const staleExts = ["gsd-hooks.ts", "pi-gsd-hooks.ts"];
|
|
226
|
+
for (const name of staleExts) {
|
|
227
|
+
const stale = path.join(extDir, name);
|
|
228
|
+
if (fs.existsSync(stale)) {
|
|
229
|
+
fs.rmSync(stale);
|
|
230
|
+
log("ok", `.pi/extensions/${name} (removed — extension now served from package)`);
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
const settingsFile2 = path.join(PROJECT_ROOT, ".pi", "settings.json");
|
|
234
|
+
if (fs.existsSync(settingsFile2)) {
|
|
235
|
+
try {
|
|
236
|
+
const settings2 = JSON.parse(fs.readFileSync(settingsFile2, "utf8"));
|
|
237
|
+
if (Array.isArray(settings2.extensions)) {
|
|
238
|
+
const cleaned2 = settings2.extensions.filter((e) => !staleExts.some((n) => e.endsWith(n)));
|
|
239
|
+
if (cleaned2.length !== settings2.extensions.length) {
|
|
240
|
+
settings2.extensions = cleaned2;
|
|
241
|
+
fs.writeFileSync(settingsFile2, JSON.stringify(settings2, null, "\t"), "utf8");
|
|
242
|
+
log("ok", ".pi/settings.json (removed stale extension entries)");
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
} catch { /* ignore */ }
|
|
246
|
+
}
|
|
230
247
|
// ── Pi prompt templates — cleanup stale local copies ───────────────────────
|
|
231
248
|
// Prompts are served directly from the npm package (user scope).
|
|
232
249
|
// Local copies in .pi/prompts/ cause collision warnings on every pi update.
|
|
@@ -394,7 +411,11 @@ function installPiExtension(projectRoot, pkgDir, force, callback) {
|
|
|
394
411
|
} else if (cleaned.length !== extensions.length) {
|
|
395
412
|
// Removed stale entry but extDest already present
|
|
396
413
|
settings.extensions = cleaned;
|
|
397
|
-
fs.writeFileSync(
|
|
414
|
+
fs.writeFileSync(
|
|
415
|
+
settingsFile,
|
|
416
|
+
JSON.stringify(settings, null, "\t"),
|
|
417
|
+
"utf8",
|
|
418
|
+
);
|
|
398
419
|
log("ok", ".pi/settings.json (removed stale gsd-hooks.ts entry)");
|
|
399
420
|
}
|
|
400
421
|
} catch (e) {
|