gsd-pi 2.23.0 → 2.25.0
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/README.md +2 -1
- package/dist/cli.js +12 -3
- package/dist/headless.d.ts +4 -0
- package/dist/headless.js +118 -10
- package/dist/help-text.js +22 -7
- package/dist/models-resolver.d.ts +0 -11
- package/dist/models-resolver.js +0 -15
- package/dist/resource-loader.d.ts +0 -1
- package/dist/resource-loader.js +64 -18
- package/dist/resources/GSD-WORKFLOW.md +12 -9
- package/dist/resources/extensions/bg-shell/overlay.ts +18 -17
- package/dist/resources/extensions/get-secrets-from-user.ts +5 -23
- package/dist/resources/extensions/gsd/activity-log.ts +5 -3
- package/dist/resources/extensions/gsd/auto-dispatch.ts +51 -2
- package/dist/resources/extensions/gsd/auto-prompts.ts +87 -0
- package/dist/resources/extensions/gsd/auto-recovery.ts +41 -2
- package/dist/resources/extensions/gsd/auto-worktree.ts +134 -4
- package/dist/resources/extensions/gsd/auto.ts +307 -77
- package/dist/resources/extensions/gsd/cache.ts +3 -1
- package/dist/resources/extensions/gsd/commands.ts +176 -10
- package/dist/resources/extensions/gsd/complexity.ts +1 -0
- package/dist/resources/extensions/gsd/dashboard-overlay.ts +38 -0
- package/dist/resources/extensions/gsd/doctor.ts +58 -11
- package/dist/resources/extensions/gsd/exit-command.ts +2 -2
- package/dist/resources/extensions/gsd/git-service.ts +74 -14
- package/dist/resources/extensions/gsd/gitignore.ts +1 -0
- package/dist/resources/extensions/gsd/gsd-db.ts +78 -1
- package/dist/resources/extensions/gsd/guided-flow.ts +109 -12
- package/dist/resources/extensions/gsd/index.ts +48 -2
- package/dist/resources/extensions/gsd/memory-extractor.ts +352 -0
- package/dist/resources/extensions/gsd/memory-store.ts +441 -0
- package/dist/resources/extensions/gsd/migrate/command.ts +2 -2
- package/dist/resources/extensions/gsd/parallel-eligibility.ts +233 -0
- package/dist/resources/extensions/gsd/parallel-merge.ts +156 -0
- package/dist/resources/extensions/gsd/parallel-orchestrator.ts +496 -0
- package/dist/resources/extensions/gsd/preferences.ts +65 -1
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/discuss-headless.md +86 -0
- package/dist/resources/extensions/gsd/prompts/discuss.md +4 -4
- package/dist/resources/extensions/gsd/prompts/execute-task.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/queue.md +1 -1
- package/dist/resources/extensions/gsd/prompts/reassess-roadmap.md +1 -1
- package/dist/resources/extensions/gsd/prompts/research-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +40 -61
- package/dist/resources/extensions/gsd/provider-error-pause.ts +29 -2
- package/dist/resources/extensions/gsd/session-status-io.ts +197 -0
- package/dist/resources/extensions/gsd/state.ts +72 -30
- package/dist/resources/extensions/gsd/tests/agent-end-provider-error.test.ts +81 -0
- package/dist/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +20 -3
- package/dist/resources/extensions/gsd/tests/auto-preflight.test.ts +1 -0
- package/dist/resources/extensions/gsd/tests/auto-recovery.test.ts +256 -2
- package/dist/resources/extensions/gsd/tests/auto-worktree-milestone-merge.test.ts +34 -0
- package/dist/resources/extensions/gsd/tests/auto-worktree.test.ts +58 -0
- package/dist/resources/extensions/gsd/tests/complete-milestone.test.ts +8 -1
- package/dist/resources/extensions/gsd/tests/derive-state-db.test.ts +9 -15
- package/dist/resources/extensions/gsd/tests/derive-state-deps.test.ts +9 -0
- package/dist/resources/extensions/gsd/tests/derive-state-draft.test.ts +8 -0
- package/dist/resources/extensions/gsd/tests/derive-state.test.ts +14 -0
- package/dist/resources/extensions/gsd/tests/git-service.test.ts +70 -4
- package/dist/resources/extensions/gsd/tests/gsd-db.test.ts +2 -2
- package/dist/resources/extensions/gsd/tests/integration-mixed-milestones.test.ts +8 -0
- package/dist/resources/extensions/gsd/tests/md-importer.test.ts +2 -3
- package/dist/resources/extensions/gsd/tests/memory-extractor.test.ts +180 -0
- package/dist/resources/extensions/gsd/tests/memory-store.test.ts +345 -0
- package/dist/resources/extensions/gsd/tests/migrate-writer-integration.test.ts +5 -5
- package/dist/resources/extensions/gsd/tests/parallel-orchestration.test.ts +656 -0
- package/dist/resources/extensions/gsd/tests/parallel-workers-multi-milestone-e2e.test.ts +354 -0
- package/dist/resources/extensions/gsd/tests/queue-reorder-e2e.test.ts +1 -0
- package/dist/resources/extensions/gsd/tests/smart-entry-draft.test.ts +1 -1
- package/dist/resources/extensions/gsd/tests/validate-milestone.test.ts +316 -0
- package/dist/resources/extensions/gsd/tests/visualizer-data.test.ts +147 -2
- package/dist/resources/extensions/gsd/tests/visualizer-overlay.test.ts +88 -10
- package/dist/resources/extensions/gsd/tests/visualizer-views.test.ts +314 -87
- package/dist/resources/extensions/gsd/tests/worker-registry.test.ts +148 -0
- package/dist/resources/extensions/gsd/triage-ui.ts +1 -1
- package/dist/resources/extensions/gsd/types.ts +15 -1
- package/dist/resources/extensions/gsd/visualizer-data.ts +291 -10
- package/dist/resources/extensions/gsd/visualizer-overlay.ts +237 -28
- package/dist/resources/extensions/gsd/visualizer-views.ts +462 -48
- package/dist/resources/extensions/gsd/worktree.ts +9 -2
- package/dist/resources/extensions/search-the-web/native-search.ts +15 -5
- package/dist/resources/extensions/subagent/index.ts +5 -0
- package/dist/resources/extensions/subagent/worker-registry.ts +99 -0
- package/dist/update-check.d.ts +9 -0
- package/dist/update-check.js +97 -0
- package/package.json +6 -1
- package/packages/pi-agent-core/dist/agent-loop.js +2 -0
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/src/agent-loop.ts +2 -0
- package/packages/pi-ai/dist/providers/anthropic.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/anthropic.js +55 -7
- package/packages/pi-ai/dist/providers/anthropic.js.map +1 -1
- package/packages/pi-ai/dist/providers/azure-openai-responses.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/azure-openai-responses.js +12 -4
- package/packages/pi-ai/dist/providers/azure-openai-responses.js.map +1 -1
- package/packages/pi-ai/dist/providers/google-vertex.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/google-vertex.js +21 -9
- package/packages/pi-ai/dist/providers/google-vertex.js.map +1 -1
- package/packages/pi-ai/dist/providers/mistral.js +3 -0
- package/packages/pi-ai/dist/providers/mistral.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-completions.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-completions.js +12 -4
- package/packages/pi-ai/dist/providers/openai-completions.js.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses.d.ts.map +1 -1
- package/packages/pi-ai/dist/providers/openai-responses.js +12 -4
- package/packages/pi-ai/dist/providers/openai-responses.js.map +1 -1
- package/packages/pi-ai/dist/types.d.ts +23 -1
- package/packages/pi-ai/dist/types.d.ts.map +1 -1
- package/packages/pi-ai/dist/types.js.map +1 -1
- package/packages/pi-ai/src/providers/anthropic.ts +59 -9
- package/packages/pi-ai/src/providers/azure-openai-responses.ts +16 -4
- package/packages/pi-ai/src/providers/google-vertex.ts +32 -17
- package/packages/pi-ai/src/providers/mistral.ts +3 -0
- package/packages/pi-ai/src/providers/openai-completions.ts +16 -4
- package/packages/pi-ai/src/providers/openai-responses.ts +16 -4
- package/packages/pi-ai/src/types.ts +19 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js +1 -1
- package/packages/pi-coding-agent/dist/core/agent-session.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js +1 -1
- package/packages/pi-coding-agent/dist/core/settings-manager.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js +17 -0
- package/packages/pi-coding-agent/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts +4 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js +72 -0
- package/packages/pi-coding-agent/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/packages/pi-coding-agent/src/core/agent-session.ts +1 -1
- package/packages/pi-coding-agent/src/core/settings-manager.ts +2 -2
- package/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +18 -0
- package/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +84 -0
- package/scripts/postinstall.js +7 -109
- package/src/resources/GSD-WORKFLOW.md +12 -9
- package/src/resources/extensions/bg-shell/overlay.ts +18 -17
- package/src/resources/extensions/get-secrets-from-user.ts +5 -23
- package/src/resources/extensions/gsd/activity-log.ts +5 -3
- package/src/resources/extensions/gsd/auto-dispatch.ts +51 -2
- package/src/resources/extensions/gsd/auto-prompts.ts +87 -0
- package/src/resources/extensions/gsd/auto-recovery.ts +41 -2
- package/src/resources/extensions/gsd/auto-worktree.ts +134 -4
- package/src/resources/extensions/gsd/auto.ts +307 -77
- package/src/resources/extensions/gsd/cache.ts +3 -1
- package/src/resources/extensions/gsd/commands.ts +176 -10
- package/src/resources/extensions/gsd/complexity.ts +1 -0
- package/src/resources/extensions/gsd/dashboard-overlay.ts +38 -0
- package/src/resources/extensions/gsd/doctor.ts +58 -11
- package/src/resources/extensions/gsd/exit-command.ts +2 -2
- package/src/resources/extensions/gsd/git-service.ts +74 -14
- package/src/resources/extensions/gsd/gitignore.ts +1 -0
- package/src/resources/extensions/gsd/gsd-db.ts +78 -1
- package/src/resources/extensions/gsd/guided-flow.ts +109 -12
- package/src/resources/extensions/gsd/index.ts +48 -2
- package/src/resources/extensions/gsd/memory-extractor.ts +352 -0
- package/src/resources/extensions/gsd/memory-store.ts +441 -0
- package/src/resources/extensions/gsd/migrate/command.ts +2 -2
- package/src/resources/extensions/gsd/parallel-eligibility.ts +233 -0
- package/src/resources/extensions/gsd/parallel-merge.ts +156 -0
- package/src/resources/extensions/gsd/parallel-orchestrator.ts +496 -0
- package/src/resources/extensions/gsd/preferences.ts +65 -1
- package/src/resources/extensions/gsd/prompts/complete-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/discuss-headless.md +86 -0
- package/src/resources/extensions/gsd/prompts/discuss.md +4 -4
- package/src/resources/extensions/gsd/prompts/execute-task.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/queue.md +1 -1
- package/src/resources/extensions/gsd/prompts/reassess-roadmap.md +1 -1
- package/src/resources/extensions/gsd/prompts/research-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +40 -61
- package/src/resources/extensions/gsd/provider-error-pause.ts +29 -2
- package/src/resources/extensions/gsd/session-status-io.ts +197 -0
- package/src/resources/extensions/gsd/state.ts +72 -30
- package/src/resources/extensions/gsd/tests/agent-end-provider-error.test.ts +81 -0
- package/src/resources/extensions/gsd/tests/auto-budget-alerts.test.ts +20 -3
- package/src/resources/extensions/gsd/tests/auto-preflight.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/auto-recovery.test.ts +256 -2
- package/src/resources/extensions/gsd/tests/auto-worktree-milestone-merge.test.ts +34 -0
- package/src/resources/extensions/gsd/tests/auto-worktree.test.ts +58 -0
- package/src/resources/extensions/gsd/tests/complete-milestone.test.ts +8 -1
- package/src/resources/extensions/gsd/tests/derive-state-db.test.ts +9 -15
- package/src/resources/extensions/gsd/tests/derive-state-deps.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/derive-state-draft.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/derive-state.test.ts +14 -0
- package/src/resources/extensions/gsd/tests/git-service.test.ts +70 -4
- package/src/resources/extensions/gsd/tests/gsd-db.test.ts +2 -2
- package/src/resources/extensions/gsd/tests/integration-mixed-milestones.test.ts +8 -0
- package/src/resources/extensions/gsd/tests/md-importer.test.ts +2 -3
- package/src/resources/extensions/gsd/tests/memory-extractor.test.ts +180 -0
- package/src/resources/extensions/gsd/tests/memory-store.test.ts +345 -0
- package/src/resources/extensions/gsd/tests/migrate-writer-integration.test.ts +5 -5
- package/src/resources/extensions/gsd/tests/parallel-orchestration.test.ts +656 -0
- package/src/resources/extensions/gsd/tests/parallel-workers-multi-milestone-e2e.test.ts +354 -0
- package/src/resources/extensions/gsd/tests/queue-reorder-e2e.test.ts +1 -0
- package/src/resources/extensions/gsd/tests/smart-entry-draft.test.ts +1 -1
- package/src/resources/extensions/gsd/tests/validate-milestone.test.ts +316 -0
- package/src/resources/extensions/gsd/tests/visualizer-data.test.ts +147 -2
- package/src/resources/extensions/gsd/tests/visualizer-overlay.test.ts +88 -10
- package/src/resources/extensions/gsd/tests/visualizer-views.test.ts +314 -87
- package/src/resources/extensions/gsd/tests/worker-registry.test.ts +148 -0
- package/src/resources/extensions/gsd/triage-ui.ts +1 -1
- package/src/resources/extensions/gsd/types.ts +15 -1
- package/src/resources/extensions/gsd/visualizer-data.ts +291 -10
- package/src/resources/extensions/gsd/visualizer-overlay.ts +237 -28
- package/src/resources/extensions/gsd/visualizer-views.ts +462 -48
- package/src/resources/extensions/gsd/worktree.ts +9 -2
- package/src/resources/extensions/search-the-web/native-search.ts +15 -5
- package/src/resources/extensions/subagent/index.ts +5 -0
- package/src/resources/extensions/subagent/worker-registry.ts +99 -0
|
@@ -75,6 +75,7 @@ const KNOWN_PREFERENCE_KEYS = new Set<string>([
|
|
|
75
75
|
"token_profile",
|
|
76
76
|
"phases",
|
|
77
77
|
"auto_visualize",
|
|
78
|
+
"parallel",
|
|
78
79
|
]);
|
|
79
80
|
|
|
80
81
|
export interface GSDSkillRule {
|
|
@@ -171,6 +172,7 @@ export interface GSDPreferences {
|
|
|
171
172
|
token_profile?: TokenProfile;
|
|
172
173
|
phases?: PhaseSkipPreferences;
|
|
173
174
|
auto_visualize?: boolean;
|
|
175
|
+
parallel?: import("./types.js").ParallelConfig;
|
|
174
176
|
}
|
|
175
177
|
|
|
176
178
|
export interface LoadedGSDPreferences {
|
|
@@ -688,6 +690,7 @@ export function resolveProfileDefaults(profile: TokenProfile): Partial<GSDPrefer
|
|
|
688
690
|
skip_research: true,
|
|
689
691
|
skip_reassess: true,
|
|
690
692
|
skip_slice_research: true,
|
|
693
|
+
skip_milestone_validation: true,
|
|
691
694
|
},
|
|
692
695
|
};
|
|
693
696
|
case "balanced":
|
|
@@ -767,6 +770,9 @@ function mergePreferences(base: GSDPreferences, override: GSDPreferences): GSDPr
|
|
|
767
770
|
phases: (base.phases || override.phases)
|
|
768
771
|
? { ...(base.phases ?? {}), ...(override.phases ?? {}) }
|
|
769
772
|
: undefined,
|
|
773
|
+
parallel: (base.parallel || override.parallel)
|
|
774
|
+
? { ...(base.parallel ?? {}), ...(override.parallel ?? {}) } as import("./types.js").ParallelConfig
|
|
775
|
+
: undefined,
|
|
770
776
|
};
|
|
771
777
|
}
|
|
772
778
|
|
|
@@ -909,8 +915,9 @@ export function validatePreferences(preferences: GSDPreferences): {
|
|
|
909
915
|
if (p.skip_research !== undefined) validatedPhases.skip_research = !!p.skip_research;
|
|
910
916
|
if (p.skip_reassess !== undefined) validatedPhases.skip_reassess = !!p.skip_reassess;
|
|
911
917
|
if (p.skip_slice_research !== undefined) validatedPhases.skip_slice_research = !!p.skip_slice_research;
|
|
918
|
+
if (p.skip_milestone_validation !== undefined) validatedPhases.skip_milestone_validation = !!p.skip_milestone_validation;
|
|
912
919
|
// Warn on unknown phase keys
|
|
913
|
-
const knownPhaseKeys = new Set(["skip_research", "skip_reassess", "skip_slice_research"]);
|
|
920
|
+
const knownPhaseKeys = new Set(["skip_research", "skip_reassess", "skip_slice_research", "skip_milestone_validation"]);
|
|
914
921
|
for (const key of Object.keys(p)) {
|
|
915
922
|
if (!knownPhaseKeys.has(key)) {
|
|
916
923
|
warnings.push(`unknown phases key "${key}" — ignored`);
|
|
@@ -1152,6 +1159,51 @@ export function validatePreferences(preferences: GSDPreferences): {
|
|
|
1152
1159
|
}
|
|
1153
1160
|
}
|
|
1154
1161
|
|
|
1162
|
+
// ─── Parallel Config ────────────────────────────────────────────────────
|
|
1163
|
+
if (preferences.parallel && typeof preferences.parallel === "object") {
|
|
1164
|
+
const p = preferences.parallel as unknown as Record<string, unknown>;
|
|
1165
|
+
const parallel: Record<string, unknown> = {};
|
|
1166
|
+
|
|
1167
|
+
if (p.enabled !== undefined) {
|
|
1168
|
+
if (typeof p.enabled === "boolean") parallel.enabled = p.enabled;
|
|
1169
|
+
else errors.push("parallel.enabled must be a boolean");
|
|
1170
|
+
}
|
|
1171
|
+
if (p.max_workers !== undefined) {
|
|
1172
|
+
if (typeof p.max_workers === "number" && p.max_workers >= 1 && p.max_workers <= 4) {
|
|
1173
|
+
parallel.max_workers = Math.floor(p.max_workers);
|
|
1174
|
+
} else {
|
|
1175
|
+
errors.push("parallel.max_workers must be a number between 1 and 4");
|
|
1176
|
+
}
|
|
1177
|
+
}
|
|
1178
|
+
if (p.budget_ceiling !== undefined) {
|
|
1179
|
+
if (typeof p.budget_ceiling === "number" && p.budget_ceiling > 0) {
|
|
1180
|
+
parallel.budget_ceiling = p.budget_ceiling;
|
|
1181
|
+
} else {
|
|
1182
|
+
errors.push("parallel.budget_ceiling must be a positive number");
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
if (p.merge_strategy !== undefined) {
|
|
1186
|
+
const validStrategies = new Set(["per-slice", "per-milestone"]);
|
|
1187
|
+
if (typeof p.merge_strategy === "string" && validStrategies.has(p.merge_strategy)) {
|
|
1188
|
+
parallel.merge_strategy = p.merge_strategy;
|
|
1189
|
+
} else {
|
|
1190
|
+
errors.push("parallel.merge_strategy must be one of: per-slice, per-milestone");
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
if (p.auto_merge !== undefined) {
|
|
1194
|
+
const validModes = new Set(["auto", "confirm", "manual"]);
|
|
1195
|
+
if (typeof p.auto_merge === "string" && validModes.has(p.auto_merge)) {
|
|
1196
|
+
parallel.auto_merge = p.auto_merge;
|
|
1197
|
+
} else {
|
|
1198
|
+
errors.push("parallel.auto_merge must be one of: auto, confirm, manual");
|
|
1199
|
+
}
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
if (Object.keys(parallel).length > 0) {
|
|
1203
|
+
validated.parallel = parallel as unknown as import("./types.js").ParallelConfig;
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1155
1207
|
// ─── Git Preferences ───────────────────────────────────────────────────
|
|
1156
1208
|
if (preferences.git && typeof preferences.git === "object") {
|
|
1157
1209
|
const git: Record<string, unknown> = {};
|
|
@@ -1369,3 +1421,15 @@ export function updatePreferencesModels(models: GSDModelConfigV2): void {
|
|
|
1369
1421
|
|
|
1370
1422
|
writeFileSync(prefsPath, content, "utf-8");
|
|
1371
1423
|
}
|
|
1424
|
+
|
|
1425
|
+
// ─── Parallel Config Resolver ──────────────────────────────────────────────
|
|
1426
|
+
|
|
1427
|
+
export function resolveParallelConfig(prefs: GSDPreferences | undefined): import("./types.js").ParallelConfig {
|
|
1428
|
+
return {
|
|
1429
|
+
enabled: prefs?.parallel?.enabled ?? false,
|
|
1430
|
+
max_workers: Math.max(1, Math.min(4, prefs?.parallel?.max_workers ?? 2)),
|
|
1431
|
+
budget_ceiling: prefs?.parallel?.budget_ceiling,
|
|
1432
|
+
merge_strategy: prefs?.parallel?.merge_strategy ?? "per-milestone",
|
|
1433
|
+
auto_merge: prefs?.parallel?.auto_merge ?? "confirm",
|
|
1434
|
+
};
|
|
1435
|
+
}
|
|
@@ -28,7 +28,7 @@ Then:
|
|
|
28
28
|
7. Write `{{sliceUatPath}}` — a concrete UAT script with real test cases derived from the slice plan and task summaries. Include preconditions, numbered steps with expected outcomes, and edge cases. This must NOT be a placeholder or generic template — tailor every test case to what this slice actually built.
|
|
29
29
|
8. Review task summaries for `key_decisions`. Append any significant decisions to `.gsd/DECISIONS.md` if missing.
|
|
30
30
|
9. Mark {{sliceId}} done in `{{roadmapPath}}` (change `[ ]` to `[x]`)
|
|
31
|
-
10. Do not
|
|
31
|
+
10. Do not run git commands — the system commits your changes and handles any merge after this unit succeeds.
|
|
32
32
|
11. Update `.gsd/PROJECT.md` if it exists — refresh current state if needed.
|
|
33
33
|
12. Update `.gsd/STATE.md`
|
|
34
34
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Headless Milestone Creation
|
|
2
|
+
|
|
3
|
+
You are creating a GSD milestone from a provided specification document. This is a **headless** (non-interactive) flow — do NOT ask the user any questions. Work entirely from the provided specification.
|
|
4
|
+
|
|
5
|
+
## Provided Specification
|
|
6
|
+
|
|
7
|
+
{{seedContext}}
|
|
8
|
+
|
|
9
|
+
## Your Task
|
|
10
|
+
|
|
11
|
+
### Step 1: Reflect
|
|
12
|
+
|
|
13
|
+
Summarize your understanding of the specification concretely:
|
|
14
|
+
- What is being built
|
|
15
|
+
- Major capabilities/features
|
|
16
|
+
- Scope estimate (how many milestones × slices)
|
|
17
|
+
- Any ambiguities or gaps you notice
|
|
18
|
+
|
|
19
|
+
### Step 2: Investigate
|
|
20
|
+
|
|
21
|
+
Scout the codebase to understand what already exists:
|
|
22
|
+
- `ls` the project root and key directories
|
|
23
|
+
- Search for relevant existing code, patterns, dependencies
|
|
24
|
+
- Check library docs if needed (`resolve_library` / `get_library_docs`)
|
|
25
|
+
|
|
26
|
+
### Step 3: Make Decisions
|
|
27
|
+
|
|
28
|
+
For any ambiguities or gaps in the specification:
|
|
29
|
+
- Make your best-guess decision based on the spec's intent, codebase patterns, and domain conventions
|
|
30
|
+
- Document each assumption clearly in the Context file
|
|
31
|
+
|
|
32
|
+
### Step 4: Assess Scope
|
|
33
|
+
|
|
34
|
+
Based on reflection + investigation:
|
|
35
|
+
- Is this a single milestone or multiple milestones?
|
|
36
|
+
- If multi-milestone: plan the full sequence with dependencies
|
|
37
|
+
|
|
38
|
+
### Step 5: Write Artifacts
|
|
39
|
+
|
|
40
|
+
**Milestone ID**: {{milestoneId}}
|
|
41
|
+
|
|
42
|
+
Use these templates exactly:
|
|
43
|
+
|
|
44
|
+
{{inlinedTemplates}}
|
|
45
|
+
|
|
46
|
+
**For single milestone**, write in this order:
|
|
47
|
+
1. `mkdir -p .gsd/milestones/{{milestoneId}}/slices`
|
|
48
|
+
2. Write `.gsd/PROJECT.md` (using Project template)
|
|
49
|
+
3. Write `.gsd/REQUIREMENTS.md` (using Requirements template)
|
|
50
|
+
4. Write `{{contextPath}}` (using Context template) — preserve the specification's exact terminology, emphasis, and specific framing. Do not paraphrase domain-specific language into generics. Document assumptions under an "Assumptions" section.
|
|
51
|
+
5. Write `{{roadmapPath}}` (using Roadmap template) — decompose into demoable vertical slices with checkboxes, risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, requirement coverage, and a boundary map. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice.
|
|
52
|
+
6. Seed `.gsd/DECISIONS.md` (using Decisions template)
|
|
53
|
+
7. Update `.gsd/STATE.md`
|
|
54
|
+
8. {{commitInstruction}}
|
|
55
|
+
9. Say exactly: "Milestone {{milestoneId}} ready."
|
|
56
|
+
|
|
57
|
+
**For multi-milestone**, write in this order:
|
|
58
|
+
1. Create all milestone directories: `mkdir -p .gsd/milestones/{M###}/slices` for each
|
|
59
|
+
2. Write `.gsd/PROJECT.md` — full vision across ALL milestones (using Project template)
|
|
60
|
+
3. Write `.gsd/REQUIREMENTS.md` — full capability contract (using Requirements template)
|
|
61
|
+
4. Seed `.gsd/DECISIONS.md` (using Decisions template)
|
|
62
|
+
5. Write PRIMARY `{{contextPath}}` — full context with all assumptions documented
|
|
63
|
+
6. Write PRIMARY `{{roadmapPath}}` — detailed slices for the first milestone only
|
|
64
|
+
7. For each remaining milestone, write full CONTEXT.md with `depends_on` frontmatter:
|
|
65
|
+
```yaml
|
|
66
|
+
---
|
|
67
|
+
depends_on: [M001, M002]
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
# M003: Title
|
|
71
|
+
```
|
|
72
|
+
Each context file should be rich enough that a future agent — with no memory of this conversation — can understand the intent, constraints, dependencies, what the milestone unlocks, and what "done" looks like.
|
|
73
|
+
8. Update `.gsd/STATE.md`
|
|
74
|
+
9. {{multiMilestoneCommitInstruction}}
|
|
75
|
+
10. Say exactly: "Milestone {{milestoneId}} ready."
|
|
76
|
+
|
|
77
|
+
## Critical Rules
|
|
78
|
+
|
|
79
|
+
- **DO NOT ask the user any questions** — this is headless mode
|
|
80
|
+
- **Preserve the specification's terminology** — don't paraphrase domain-specific language
|
|
81
|
+
- **Document assumptions** — when you make a judgment call, note it in CONTEXT.md under "Assumptions"
|
|
82
|
+
- **Investigate before writing** — always scout the codebase first
|
|
83
|
+
- **Use depends_on frontmatter** for multi-milestone sequences (the state machine reads this field to determine execution order)
|
|
84
|
+
- **Anti-reduction rule** — if the spec describes a big vision, plan the big vision. Do not ask "what's the minimum viable version?" or reduce scope. Phase complex/risky work into later milestones — do not cut it.
|
|
85
|
+
- **Naming convention** — directories use bare IDs (`M001/`, `S01/`), files use ID-SUFFIX format (`M001-CONTEXT.md`, `M001-ROADMAP.md`)
|
|
86
|
+
- **End with "Milestone {{milestoneId}} ready."** — this triggers auto-start detection
|
|
@@ -201,9 +201,9 @@ When writing context.md, preserve the user's exact terminology, emphasis, and sp
|
|
|
201
201
|
5. Write `{{roadmapPath}}` — use the **Roadmap** output template below. Decompose into demoable vertical slices with checkboxes, risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, requirement coverage, and a boundary map. If the milestone crosses multiple runtime boundaries, include an explicit final integration slice that proves the assembled system works end-to-end in a real environment.
|
|
202
202
|
6. Seed `.gsd/DECISIONS.md` — use the **Decisions** output template below. Append rows for any architectural or pattern decisions made during discussion.
|
|
203
203
|
7. Update `.gsd/STATE.md`
|
|
204
|
-
8.
|
|
204
|
+
8. {{commitInstruction}}
|
|
205
205
|
|
|
206
|
-
After writing the files
|
|
206
|
+
After writing the files, say exactly: "Milestone {{milestoneId}} ready." — nothing else. Auto-mode will start automatically.
|
|
207
207
|
|
|
208
208
|
### Multi-Milestone
|
|
209
209
|
|
|
@@ -271,8 +271,8 @@ For single-milestone projects, do NOT write this file — it is only for multi-m
|
|
|
271
271
|
#### Phase 4: Finalize
|
|
272
272
|
|
|
273
273
|
7. Update `.gsd/STATE.md`
|
|
274
|
-
8.
|
|
274
|
+
8. {{multiMilestoneCommitInstruction}}
|
|
275
275
|
|
|
276
|
-
After writing the files
|
|
276
|
+
After writing the files, say exactly: "Milestone M001 ready." — nothing else. Auto-mode will start automatically.
|
|
277
277
|
|
|
278
278
|
{{inlinedTemplates}}
|
|
@@ -63,7 +63,7 @@ Then:
|
|
|
63
63
|
14. Read the template at `~/.gsd/agent/extensions/gsd/templates/task-summary.md`
|
|
64
64
|
15. Write `{{taskSummaryPath}}`
|
|
65
65
|
16. Mark {{taskId}} done in `{{planPath}}` (change `[ ]` to `[x]`)
|
|
66
|
-
17. Do not
|
|
66
|
+
17. Do not run git commands — the system reads your task summary after completion and creates a meaningful commit from it (type inferred from title, message from your one-liner, key files from frontmatter). Write a clear, specific one-liner in the summary — it becomes the commit message.
|
|
67
67
|
18. Update `.gsd/STATE.md`
|
|
68
68
|
|
|
69
69
|
All work stays in your working directory: `{{workingDirectory}}`.
|
|
@@ -104,5 +104,5 @@ Once the user confirms depth:
|
|
|
104
104
|
1. Use the **Context** output template below
|
|
105
105
|
2. `mkdir -p` the milestone directory if needed
|
|
106
106
|
3. Write `{{milestoneId}}-CONTEXT.md` — preserve the user's exact terminology, emphasis, and framing. Do not paraphrase nuance into generic summaries. The context file is downstream agents' only window into this conversation.
|
|
107
|
-
4.
|
|
107
|
+
4. {{commitInstruction}}
|
|
108
108
|
5. Say exactly: `"{{milestoneId}} context written."` — nothing else.
|
|
@@ -55,7 +55,7 @@ Once the user is ready to wrap up:
|
|
|
55
55
|
- **Constraints** — anything the user flagged as a hard constraint
|
|
56
56
|
- **Integration Points** — what this slice consumes and produces
|
|
57
57
|
- **Open Questions** — anything still unresolved, with current thinking
|
|
58
|
-
4.
|
|
58
|
+
4. {{commitInstruction}}
|
|
59
59
|
5. Say exactly: `"{{sliceId}} context written."` — nothing else.
|
|
60
60
|
|
|
61
61
|
{{inlinedTemplates}}
|
|
@@ -59,7 +59,7 @@ Then:
|
|
|
59
59
|
- **Scope sanity:** Target 2–5 steps and 3–8 files per task. 10+ steps or 12+ files — must split. Each task must be completable in a single fresh context window.
|
|
60
60
|
- **Feature completeness:** Every task produces real, user-facing progress — not just internal scaffolding.
|
|
61
61
|
9. If planning produced structural decisions, append them to `.gsd/DECISIONS.md`
|
|
62
|
-
10.
|
|
62
|
+
10. {{commitInstruction}}
|
|
63
63
|
11. Update `.gsd/STATE.md`
|
|
64
64
|
|
|
65
65
|
The slice directory and tasks/ subdirectory already exist. Do NOT mkdir. All work stays in your working directory: `{{workingDirectory}}`.
|
|
@@ -96,7 +96,7 @@ Then, after all milestone directories and context files are written:
|
|
|
96
96
|
4. If `.gsd/REQUIREMENTS.md` exists and the queued work introduces new in-scope capabilities or promotes Deferred items, update it.
|
|
97
97
|
5. If discussion produced decisions relevant to existing work, append to `.gsd/DECISIONS.md`.
|
|
98
98
|
6. Append to `.gsd/QUEUE.md`.
|
|
99
|
-
7.
|
|
99
|
+
7. {{commitInstruction}}
|
|
100
100
|
|
|
101
101
|
**Do NOT write roadmaps for queued milestones.**
|
|
102
102
|
**Do NOT update `.gsd/STATE.md`.**
|
|
@@ -57,7 +57,7 @@ Write `{{assessmentPath}}` with a brief confirmation that roadmap coverage still
|
|
|
57
57
|
1. Rewrite the remaining (unchecked) slices in `{{roadmapPath}}`. Keep completed slices exactly as they are (`[x]`). Update the boundary map for changed slices. Update the proof strategy if risks changed. Update requirement coverage if ownership or scope changed.
|
|
58
58
|
2. Write `{{assessmentPath}}` explaining what changed and why — keep it brief and concrete.
|
|
59
59
|
3. If `.gsd/REQUIREMENTS.md` exists and requirement ownership or status changed, update it.
|
|
60
|
-
4.
|
|
60
|
+
4. {{commitInstruction}}
|
|
61
61
|
|
|
62
62
|
**You MUST write the file `{{assessmentPath}}` before finishing.**
|
|
63
63
|
|
|
@@ -46,7 +46,7 @@ Research what this slice needs. Narrate key findings and surprises as you go —
|
|
|
46
46
|
2. **Skill Discovery ({{skillDiscoveryMode}}):**{{skillDiscoveryInstructions}}
|
|
47
47
|
3. Explore relevant code for this slice's scope. For targeted exploration, use `rg`, `find`, and reads. For broad or unfamiliar subsystems, use `scout` to map the relevant area first.
|
|
48
48
|
4. Use `resolve_library` / `get_library_docs` for unfamiliar libraries — skip this for libraries already used in the codebase
|
|
49
|
-
5. Use the **Research** output template from the inlined context above — include only sections that have real content
|
|
49
|
+
5. Use the **Research** output template from the inlined context above — include only sections that have real content. The template is already inlined above; do NOT attempt to read any template file from disk (there is no `templates/SLICE-RESEARCH.md` — the correct template is already present in this prompt).
|
|
50
50
|
6. Write `{{outputPath}}`
|
|
51
51
|
|
|
52
52
|
The slice directory already exists at `{{slicePath}}/`. Do NOT mkdir — just write the file.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
You are executing GSD auto-mode.
|
|
2
2
|
|
|
3
|
-
## UNIT: Validate Milestone {{milestoneId}} ("{{milestoneTitle}}")
|
|
3
|
+
## UNIT: Validate Milestone {{milestoneId}} ("{{milestoneTitle}}")
|
|
4
4
|
|
|
5
5
|
## Working Directory
|
|
6
6
|
|
|
@@ -8,84 +8,63 @@ Your working directory is `{{workingDirectory}}`. All file reads, writes, and sh
|
|
|
8
8
|
|
|
9
9
|
## Your Role in the Pipeline
|
|
10
10
|
|
|
11
|
-
All slices are done. Before the
|
|
11
|
+
All slices are done. Before the milestone can be completed, you must validate that the planned work was delivered as specified. Compare the roadmap's success criteria and slice definitions against the actual slice summaries and UAT results. This is a reconciliation gate — catch gaps, regressions, or missing deliverables before the milestone is sealed.
|
|
12
12
|
|
|
13
|
-
This is
|
|
13
|
+
This is remediation round {{remediationRound}}. If this is round 0, this is the first validation pass. If > 0, prior validation found issues and remediation slices were added and executed — verify those remediation slices resolved the issues.
|
|
14
14
|
|
|
15
15
|
All relevant context has been preloaded below — the roadmap, all slice summaries, UAT results, requirements, decisions, and project context are inlined. Start working immediately without re-reading these files.
|
|
16
16
|
|
|
17
17
|
{{inlinedContext}}
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
## Validation Steps
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
1. For each **success criterion** in `{{roadmapPath}}`, check whether slice summaries and UAT results provide evidence that it was met. Record pass/fail per criterion.
|
|
22
|
+
2. For each **slice** in the roadmap, verify its demo/deliverable claim against its summary. Flag any slice whose summary does not substantiate its claimed output.
|
|
23
|
+
3. Check **cross-slice integration points** — do boundary map entries (produces/consumes) align with what was actually built?
|
|
24
|
+
4. Check **requirement coverage** — are all active requirements addressed by at least one slice?
|
|
25
|
+
5. Determine a verdict:
|
|
26
|
+
- `pass` — all criteria met, all slices delivered, no gaps
|
|
27
|
+
- `needs-attention` — minor gaps that do not block completion (document them)
|
|
28
|
+
- `needs-remediation` — material gaps found; add remediation slices to the roadmap
|
|
22
29
|
|
|
23
|
-
|
|
30
|
+
## Output
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
Write `{{validationPath}}` with this structure:
|
|
26
33
|
|
|
27
|
-
|
|
34
|
+
```markdown
|
|
35
|
+
---
|
|
36
|
+
verdict: <pass|needs-attention|needs-remediation>
|
|
37
|
+
remediation_round: {{remediationRound}}
|
|
38
|
+
---
|
|
28
39
|
|
|
29
|
-
|
|
30
|
-
- `Criterion text` — **NOT MET** — gap: {{what's missing and why}}
|
|
40
|
+
# Milestone Validation: {{milestoneId}}
|
|
31
41
|
|
|
32
|
-
|
|
42
|
+
## Success Criteria Checklist
|
|
43
|
+
- [x] Criterion 1 — evidence: ...
|
|
44
|
+
- [ ] Criterion 2 — gap: ...
|
|
33
45
|
|
|
34
|
-
|
|
46
|
+
## Slice Delivery Audit
|
|
47
|
+
| Slice | Claimed | Delivered | Status |
|
|
48
|
+
|-------|---------|-----------|--------|
|
|
49
|
+
| S01 | ... | ... | pass |
|
|
35
50
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
- `Follow-ups` sections
|
|
39
|
-
- `Deviations` sections
|
|
51
|
+
## Cross-Slice Integration
|
|
52
|
+
(any boundary mismatches)
|
|
40
53
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- Any PARTIAL or FAIL verdicts
|
|
54
|
+
## Requirement Coverage
|
|
55
|
+
(any unaddressed requirements)
|
|
44
56
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- `.gsd/CAPTURES.md` for unresolved deferred captures
|
|
57
|
+
## Verdict Rationale
|
|
58
|
+
(why this verdict was chosen)
|
|
48
59
|
|
|
49
|
-
|
|
60
|
+
## Remediation Plan
|
|
61
|
+
(only if verdict is needs-remediation — list new slices to add to the roadmap)
|
|
62
|
+
```
|
|
50
63
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
- **auto-remediable** — can be fixed by adding a new slice (missing feature, unfixed bug, untested path, incomplete integration)
|
|
56
|
-
- **human-required** — needs Lex's input (design decision, external service dependency, manual verification, judgment call, ambiguous requirement)
|
|
57
|
-
- **acceptable** — known limitation that's OK to ship (documented trade-off, explicitly scoped for a future milestone, minor rough edge with no user impact)
|
|
58
|
-
|
|
59
|
-
Be conservative with **auto-remediable**. Only classify a gap as auto-remediable if you're confident a slice can resolve it without human judgment. When in doubt, classify as **human-required**.
|
|
60
|
-
|
|
61
|
-
### Step 4: Act on Gaps
|
|
62
|
-
|
|
63
|
-
**If this is remediation round 0 AND auto-remediable gaps exist:**
|
|
64
|
-
|
|
65
|
-
1. Define remediation slices to address auto-remediable gaps. Follow the exact roadmap slice format:
|
|
66
|
-
`- [ ] **S0X: Title** \`risk:medium\` \`depends:[]\``
|
|
67
|
-
Include a brief description of what each slice must accomplish.
|
|
68
|
-
2. Append these slices to `{{roadmapPath}}` after existing slices (do not modify completed slices).
|
|
69
|
-
3. Update the boundary map in the roadmap if the new slices introduce new integration points.
|
|
70
|
-
4. Set verdict to `needs-remediation`.
|
|
71
|
-
|
|
72
|
-
**If this is remediation round 1 or higher:**
|
|
73
|
-
|
|
74
|
-
Do NOT add more slices. At this point either:
|
|
75
|
-
- All remaining gaps are acceptable — set verdict to `pass`
|
|
76
|
-
- Remaining gaps need Lex's input — set verdict to `needs-attention`
|
|
77
|
-
|
|
78
|
-
Never add remediation slices after round 0. If round 0 remediation didn't close the gaps, escalate.
|
|
79
|
-
|
|
80
|
-
**If no auto-remediable gaps exist (any round):**
|
|
81
|
-
|
|
82
|
-
- If all criteria are MET and deferred items are acceptable or human-required only — set verdict to `pass` (with human-required items noted)
|
|
83
|
-
- If human-required items are blocking — set verdict to `needs-attention`
|
|
84
|
-
|
|
85
|
-
### Step 5: Write Validation Report
|
|
86
|
-
|
|
87
|
-
Write `{{validationPath}}` using the milestone-validation template. Fill all frontmatter fields and every section. The report must be a complete record of the validation — a future agent reading only this file should understand what was checked, what passed, and what remains.
|
|
64
|
+
If verdict is `needs-remediation`:
|
|
65
|
+
- Add new slices to `{{roadmapPath}}` with unchecked `[ ]` status
|
|
66
|
+
- These slices will be planned and executed before validation re-runs
|
|
88
67
|
|
|
89
68
|
**You MUST write `{{validationPath}}` before finishing.**
|
|
90
69
|
|
|
91
|
-
When done, say: "Milestone {{milestoneId}}
|
|
70
|
+
When done, say: "Milestone {{milestoneId}} validation complete — verdict: <verdict>."
|
|
@@ -2,11 +2,38 @@ export type ProviderErrorPauseUI = {
|
|
|
2
2
|
notify(message: string, level?: "info" | "warning" | "error" | "success"): void;
|
|
3
3
|
};
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* Pause auto-mode due to a provider error.
|
|
7
|
+
*
|
|
8
|
+
* For rate-limit errors with a known reset delay, schedules an automatic
|
|
9
|
+
* resume after the delay and shows a countdown notification. For all other
|
|
10
|
+
* errors, pauses indefinitely (user must manually resume).
|
|
11
|
+
*/
|
|
5
12
|
export async function pauseAutoForProviderError(
|
|
6
13
|
ui: ProviderErrorPauseUI,
|
|
7
14
|
errorDetail: string,
|
|
8
15
|
pause: () => Promise<void>,
|
|
16
|
+
options?: {
|
|
17
|
+
isRateLimit?: boolean;
|
|
18
|
+
retryAfterMs?: number;
|
|
19
|
+
resume?: () => void;
|
|
20
|
+
},
|
|
9
21
|
): Promise<void> {
|
|
10
|
-
|
|
11
|
-
|
|
22
|
+
if (options?.isRateLimit && options.retryAfterMs && options.retryAfterMs > 0 && options.resume) {
|
|
23
|
+
const delaySec = Math.ceil(options.retryAfterMs / 1000);
|
|
24
|
+
ui.notify(
|
|
25
|
+
`Rate limited${errorDetail}. Auto-resuming in ${delaySec}s...`,
|
|
26
|
+
"warning",
|
|
27
|
+
);
|
|
28
|
+
await pause();
|
|
29
|
+
|
|
30
|
+
// Schedule auto-resume after the rate limit window
|
|
31
|
+
setTimeout(() => {
|
|
32
|
+
ui.notify("Rate limit window elapsed. Resuming auto-mode.", "info");
|
|
33
|
+
options.resume!();
|
|
34
|
+
}, options.retryAfterMs);
|
|
35
|
+
} else {
|
|
36
|
+
ui.notify(`Auto-mode paused due to provider error${errorDetail}`, "warning");
|
|
37
|
+
await pause();
|
|
38
|
+
}
|
|
12
39
|
}
|