pi-gsd 1.3.4 → 1.4.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.
|
@@ -241,7 +241,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
241
241
|
lines.push(` → /gsd-discuss-phase ${n} Gather context first`);
|
|
242
242
|
lines.push(` → /gsd-plan-phase ${n} Jump straight to planning`);
|
|
243
243
|
} else if (next.summaries < next.plans) {
|
|
244
|
-
lines.push(
|
|
244
|
+
lines.push(
|
|
245
|
+
` → /gsd-execute-phase ${n} ${next.summaries}/${next.plans} plans done`,
|
|
246
|
+
);
|
|
245
247
|
} else {
|
|
246
248
|
lines.push(` → /gsd-verify-work ${n} All plans done, verify UAT`);
|
|
247
249
|
}
|
|
@@ -254,10 +256,15 @@ export default function (pi: ExtensionAPI) {
|
|
|
254
256
|
return lines;
|
|
255
257
|
};
|
|
256
258
|
|
|
257
|
-
const formatProgress = (
|
|
259
|
+
const formatProgress = (
|
|
260
|
+
cwd: string,
|
|
261
|
+
): { text: string; data: GsdProgress | null } => {
|
|
258
262
|
const data = runJson<GsdProgress>("progress json", cwd);
|
|
259
263
|
if (!data)
|
|
260
|
-
return {
|
|
264
|
+
return {
|
|
265
|
+
text: "❌ No GSD project found. Run /gsd-new-project to initialise.",
|
|
266
|
+
data: null,
|
|
267
|
+
};
|
|
261
268
|
|
|
262
269
|
const done = data.phases.filter((p) => p.status === "Complete").length;
|
|
263
270
|
const total = data.phases.length;
|
|
@@ -279,16 +286,21 @@ export default function (pi: ExtensionAPI) {
|
|
|
279
286
|
return { text: lines.join("\n"), data };
|
|
280
287
|
};
|
|
281
288
|
|
|
282
|
-
const formatStats = (
|
|
289
|
+
const formatStats = (
|
|
290
|
+
cwd: string,
|
|
291
|
+
): { text: string; data: GsdStats | null } => {
|
|
283
292
|
const data = runJson<GsdStats>("stats json", cwd);
|
|
284
293
|
if (!data)
|
|
285
|
-
return {
|
|
294
|
+
return {
|
|
295
|
+
text: "❌ No GSD project found. Run /gsd-new-project to initialise.",
|
|
296
|
+
data: null,
|
|
297
|
+
};
|
|
286
298
|
|
|
287
299
|
const reqPct =
|
|
288
300
|
data.requirements_total > 0
|
|
289
301
|
? Math.round(
|
|
290
|
-
|
|
291
|
-
|
|
302
|
+
(data.requirements_complete / data.requirements_total) * 100,
|
|
303
|
+
)
|
|
292
304
|
: 0;
|
|
293
305
|
|
|
294
306
|
const lines = [
|
|
@@ -386,10 +398,15 @@ export default function (pi: ExtensionAPI) {
|
|
|
386
398
|
pi.registerCommand("gsd-health", {
|
|
387
399
|
description: "Check .planning/ integrity (instant)",
|
|
388
400
|
handler: async (args, ctx) => {
|
|
389
|
-
ctx.ui.notify(
|
|
401
|
+
ctx.ui.notify(
|
|
402
|
+
formatHealth(ctx.cwd, !!args?.includes("--repair")),
|
|
403
|
+
"info",
|
|
404
|
+
);
|
|
390
405
|
},
|
|
391
406
|
getArgumentCompletions: (prefix) => {
|
|
392
|
-
const options = [
|
|
407
|
+
const options = [
|
|
408
|
+
{ value: "--repair", label: "--repair Auto-fix issues" },
|
|
409
|
+
];
|
|
393
410
|
return options.filter((o) => o.value.startsWith(prefix));
|
|
394
411
|
},
|
|
395
412
|
});
|
|
@@ -445,7 +462,9 @@ export default function (pi: ExtensionAPI) {
|
|
|
445
462
|
`⏩ ${reason}`,
|
|
446
463
|
`→ ${action}`,
|
|
447
464
|
...(pending.length > 1
|
|
448
|
-
? [
|
|
465
|
+
? [
|
|
466
|
+
` (${pending.length - 1} more phase${pending.length > 2 ? "s" : ""} pending after this)`,
|
|
467
|
+
]
|
|
449
468
|
: []),
|
|
450
469
|
`━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━`,
|
|
451
470
|
].join("\n"),
|
|
@@ -471,6 +490,8 @@ export default function (pi: ExtensionAPI) {
|
|
|
471
490
|
" /gsd-validate-phase N Validate completion",
|
|
472
491
|
" /gsd-next Auto-advance",
|
|
473
492
|
" /gsd-autonomous Run all phases",
|
|
493
|
+
" /gsd-plan-milestone Plan all phases at once",
|
|
494
|
+
" /gsd-execute-milestone Execute all phases with gates",
|
|
474
495
|
"",
|
|
475
496
|
"Quick:",
|
|
476
497
|
" /gsd-quick <task> Tracked ad-hoc task",
|
|
@@ -497,7 +518,7 @@ export default function (pi: ExtensionAPI) {
|
|
|
497
518
|
});
|
|
498
519
|
|
|
499
520
|
|
|
500
|
-
|
|
521
|
+
// ── tool_result: context usage monitor ───────────────────────────────────
|
|
501
522
|
const WARNING_THRESHOLD = 35; // warn when remaining % ≤ 35
|
|
502
523
|
const CRITICAL_THRESHOLD = 25; // critical when remaining % ≤ 25
|
|
503
524
|
const DEBOUNCE_CALLS = 5; // minimum tool uses between repeated warnings
|
package/README.md
CHANGED
|
@@ -139,6 +139,8 @@ 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
|
+
| `/gsd-plan-milestone` command | ❌ | ✔️ | Plan all unplanned phases — one mode question, scope pre-check per phase, context-safe checkpoint |
|
|
143
|
+
| `/gsd-execute-milestone` command | ❌ | ✔️ | Execute all phases — scope guardian (pre+post), UAT gates, recovery loop, worktree isolation + merge |
|
|
142
144
|
|
|
143
145
|
Legend: ✔️ done · ⚡ enhanced · ⚠️ in progress · 📃 planned · ❌ not available
|
|
144
146
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsd-execute-milestone
|
|
3
|
+
description: Execute all planned phases in the milestone — scope guardian, UAT gates, recovery loop
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Execute every pending phase in the current milestone in a single orchestrated session.
|
|
8
|
+
|
|
9
|
+
**Opens with one mode question** (interactive vs silent), then works through all phases that have plans but aren't complete yet.
|
|
10
|
+
|
|
11
|
+
**Per-phase flow:**
|
|
12
|
+
1. Scope pre-check — lightweight alignment against REQUIREMENTS.md
|
|
13
|
+
2. Execute phase
|
|
14
|
+
3. Scope post-check — full audit of deliverables vs requirements
|
|
15
|
+
4. Verify / UAT
|
|
16
|
+
5. Gate check — UAT pass rate, context remaining, scope status
|
|
17
|
+
6. On failure: --repair → self-correct → ask (interactive) or HANDOFF.md (silent)
|
|
18
|
+
7. Checkpoint commit
|
|
19
|
+
|
|
20
|
+
**Always operates in an isolated worktree** — will offer to create one if not already in a worktree.
|
|
21
|
+
|
|
22
|
+
**Creates/Updates:**
|
|
23
|
+
- Phase SUMMARY.md, UAT.md, VERIFICATION.md per phase
|
|
24
|
+
- `.planning/HANDOFF.md` on hard stop
|
|
25
|
+
- `.planning/STATE.md` checkpointed after each phase
|
|
26
|
+
|
|
27
|
+
**After this command:** Run `/gsd-audit-milestone` to review before archiving.
|
|
28
|
+
</objective>
|
|
29
|
+
|
|
30
|
+
<execution_context>
|
|
31
|
+
@.pi/gsd/workflows/execute-milestone.md
|
|
32
|
+
@.pi/gsd/references/ui-brand.md
|
|
33
|
+
@.planning/REQUIREMENTS.md
|
|
34
|
+
@.planning/ROADMAP.md
|
|
35
|
+
@.planning/STATE.md
|
|
36
|
+
</execution_context>
|
|
37
|
+
|
|
38
|
+
<context>
|
|
39
|
+
Optional flags:
|
|
40
|
+
- `--from N` — Start from phase N (skip earlier completed phases)
|
|
41
|
+
- `--silent` — Skip mode question, run in silent mode
|
|
42
|
+
- `--interactive` — Skip mode question, run in interactive mode
|
|
43
|
+
- `--uat-threshold N` — Minimum UAT pass rate % to continue (default: 80)
|
|
44
|
+
- `--no-worktree-check` — Skip worktree isolation check
|
|
45
|
+
|
|
46
|
+
Phase execution queue, progress, and state are resolved at runtime via `pi-gsd-tools roadmap analyze` and `pi-gsd-tools progress json`.
|
|
47
|
+
</context>
|
|
48
|
+
|
|
49
|
+
<process>
|
|
50
|
+
Execute the execute-milestone workflow from @.pi/gsd/workflows/execute-milestone.md end-to-end.
|
|
51
|
+
Ask the mode question first. Preserve all gates: scope guardian (pre + post), UAT gate, context gate, recovery loop.
|
|
52
|
+
Never skip the HANDOFF.md on unrecoverable stop.
|
|
53
|
+
</process>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gsd-plan-milestone
|
|
3
|
+
description: Plan all unplanned phases in the current milestone — one interview, then churn
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<objective>
|
|
7
|
+
Plan every unplanned phase in the current milestone in a single orchestrated session.
|
|
8
|
+
|
|
9
|
+
**Opens with one mode question** (interactive vs silent), then works through all unplanned phases in roadmap order. Each phase gets a lightweight scope pre-check against REQUIREMENTS.md before planning begins.
|
|
10
|
+
|
|
11
|
+
**Creates:**
|
|
12
|
+
- PLAN.md files for every unplanned phase
|
|
13
|
+
- Scope alignment notes (if any deviations detected)
|
|
14
|
+
- Checkpoint commits after each phase
|
|
15
|
+
|
|
16
|
+
**After this command:** Run `/gsd-execute-milestone` to execute all planned phases.
|
|
17
|
+
</objective>
|
|
18
|
+
|
|
19
|
+
<execution_context>
|
|
20
|
+
@.pi/gsd/workflows/plan-milestone.md
|
|
21
|
+
@.pi/gsd/references/ui-brand.md
|
|
22
|
+
@.planning/REQUIREMENTS.md
|
|
23
|
+
@.planning/ROADMAP.md
|
|
24
|
+
</execution_context>
|
|
25
|
+
|
|
26
|
+
<context>
|
|
27
|
+
Optional flags:
|
|
28
|
+
- `--from N` — Start planning from phase N (skip already-planned phases before N)
|
|
29
|
+
- `--silent` — Skip mode question, run in silent mode
|
|
30
|
+
- `--interactive` — Skip mode question, run in interactive mode
|
|
31
|
+
|
|
32
|
+
Phase list, state, and plan status are resolved at runtime via `pi-gsd-tools roadmap analyze` and `pi-gsd-tools progress json`.
|
|
33
|
+
</context>
|
|
34
|
+
|
|
35
|
+
<process>
|
|
36
|
+
Execute the plan-milestone workflow from @.pi/gsd/workflows/plan-milestone.md end-to-end.
|
|
37
|
+
Ask the mode question first. Preserve all gates (scope pre-check, planning, checkpoint, context limit).
|
|
38
|
+
</process>
|