pi-gsd 1.11.3 → 1.11.5

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.
@@ -19,8 +19,10 @@
19
19
  import { execSync } from "node:child_process";
20
20
  import {
21
21
  existsSync,
22
+ lstatSync,
22
23
  mkdirSync,
23
24
  readFileSync,
25
+ rmSync,
24
26
  statSync,
25
27
  symlinkSync,
26
28
  writeFileSync,
@@ -38,7 +40,20 @@ import type { ContextUsage, ExtensionAPI } from "@mariozechner/pi-coding-agent";
38
40
  const ensureHarnessSymlink = (cwd: string): void => {
39
41
  try {
40
42
  const dest = join(cwd, ".pi", "gsd");
41
- if (existsSync(dest)) return; // already there (symlink or real dir)
43
+ // If dest exists, verify it's a valid symlink with files inside.
44
+ // A stale real directory (from old build or worktree) must be replaced.
45
+ if (existsSync(dest)) {
46
+ try {
47
+ const stat = statSync(dest);
48
+ if (stat.isSymbolicLink?.() || lstatSync(dest).isSymbolicLink()) return; // valid symlink, done
49
+ // Real directory — check if it has the expected files
50
+ if (existsSync(join(dest, "workflows", "execute-phase.md"))) return; // looks complete
51
+ // Stale/incomplete directory — remove and replace with symlink
52
+ rmSync(dest, { recursive: true, force: true });
53
+ } catch {
54
+ return; // can't inspect, leave it
55
+ }
56
+ }
42
57
 
43
58
  // Walk up from this extension file to the package root:
44
59
  // <pkg>/.gsd/extensions/pi-gsd-hooks.ts → <pkg>
package/README.md CHANGED
@@ -139,8 +139,10 @@ Switch profile: `/gsd-set-profile <profile>`
139
139
  | Instant commands (no LLM cost) | ❌ | ✔️ | `/gsd-progress`, `/gsd-stats`, `/gsd-health`, `/gsd-help`, `/gsd-next` - zero LLM, editor pivot |
140
140
  | `/gsd-next` auto-advance | ❌ | ✔️ | Deterministic phase routing, pre-fills editor with the correct next command |
141
141
  | Prompt-dispatch for all skills | ❌ | ✔️ | 54 pi prompt templates - clean autocomplete, arg hints, direct workflow dispatch |
142
- | `ui-brand` context modularity | ❌ | ✔️ | `<core>` tag splits ui-brand.md — planning gets 103 lines, UI commands get full 166 |
143
- | `syncReferenceToCore` utility | ❌ | ✔️ | Auto-derives `-core.md` from any `<core>`-tagged reference; syncs on session start + after tool writes |
142
+ | `ui-brand` context modularity | ❌ | ✔️ | `<core>` tag splits ui-brand.md — planning gets 103 lines, UI commands get full 166 |
143
+ | `syncReferenceToCore` utility | ❌ | ✔️ | Auto-derives `-core.md` from any `<core>`-tagged reference; syncs on session start + after tool writes |
144
+ | Programmatic `@file` injection | ❌ | ✔️ | Extension intercepts `@.pi/gsd/...` refs, injects file contents before LLM sees them — zero tool calls |
145
+ | Auto harness symlink + self-repair | ❌ | ✔️ | `.pi/gsd/` → package harness; detects stale dirs, replaces with symlink; fallback to package root |
144
146
  | `/gsd-plan-milestone` command | ❌ | ✔️ | Plan all unplanned phases - one mode question, scope pre-check per phase, context-safe checkpoint |
145
147
  | `/gsd-execute-milestone` command | ❌ | ✔️ | Execute all phases + scope guardian + auto gap/debt retry loop (insert-phase) + audit→complete→cleanup |
146
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-gsd",
3
- "version": "1.11.3",
3
+ "version": "1.11.5",
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": {