gsd-pi 2.38.0-dev.96dc7fb → 2.38.0-dev.98b44dc
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 +15 -11
- package/dist/app-paths.js +1 -1
- package/dist/extension-registry.js +2 -2
- package/dist/remote-questions-config.js +2 -2
- package/dist/resource-loader.js +34 -1
- package/dist/resources/extensions/browser-tools/index.js +3 -1
- package/dist/resources/extensions/browser-tools/tools/verify.js +97 -0
- package/dist/resources/extensions/env-utils.js +29 -0
- package/dist/resources/extensions/get-secrets-from-user.js +5 -24
- package/dist/resources/extensions/github-sync/cli.js +284 -0
- package/dist/resources/extensions/github-sync/index.js +73 -0
- package/dist/resources/extensions/github-sync/mapping.js +67 -0
- package/dist/resources/extensions/github-sync/sync.js +424 -0
- package/dist/resources/extensions/github-sync/templates.js +118 -0
- package/dist/resources/extensions/github-sync/types.js +7 -0
- package/dist/resources/extensions/gsd/auto/session.js +6 -23
- package/dist/resources/extensions/gsd/auto-dispatch.js +8 -9
- package/dist/resources/extensions/gsd/auto-loop.js +636 -594
- package/dist/resources/extensions/gsd/auto-post-unit.js +99 -70
- package/dist/resources/extensions/gsd/auto-prompts.js +202 -48
- package/dist/resources/extensions/gsd/auto-start.js +7 -1
- package/dist/resources/extensions/gsd/auto-worktree-sync.js +2 -1
- package/dist/resources/extensions/gsd/auto-worktree.js +3 -3
- package/dist/resources/extensions/gsd/auto.js +143 -96
- package/dist/resources/extensions/gsd/commands-extensions.js +3 -2
- package/dist/resources/extensions/gsd/commands-prefs-wizard.js +1 -1
- package/dist/resources/extensions/gsd/commands.js +4 -2
- package/dist/resources/extensions/gsd/context-budget.js +2 -10
- package/dist/resources/extensions/gsd/detection.js +1 -2
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +0 -2
- package/dist/resources/extensions/gsd/doctor-providers.js +30 -11
- package/dist/resources/extensions/gsd/doctor.js +20 -1
- package/dist/resources/extensions/gsd/exit-command.js +2 -1
- package/dist/resources/extensions/gsd/export.js +1 -1
- package/dist/resources/extensions/gsd/files.js +48 -9
- package/dist/resources/extensions/gsd/forensics.js +1 -1
- package/dist/resources/extensions/gsd/git-service.js +30 -12
- package/dist/resources/extensions/gsd/gitignore.js +16 -3
- package/dist/resources/extensions/gsd/guided-flow.js +149 -38
- package/dist/resources/extensions/gsd/health-widget-core.js +32 -70
- package/dist/resources/extensions/gsd/health-widget.js +3 -86
- package/dist/resources/extensions/gsd/index.js +24 -20
- package/dist/resources/extensions/gsd/migrate/parsers.js +1 -1
- package/dist/resources/extensions/gsd/migrate-external.js +18 -1
- package/dist/resources/extensions/gsd/native-git-bridge.js +37 -0
- package/dist/resources/extensions/gsd/paths.js +3 -0
- package/dist/resources/extensions/gsd/preferences-models.js +0 -12
- package/dist/resources/extensions/gsd/preferences-types.js +1 -1
- package/dist/resources/extensions/gsd/preferences-validation.js +59 -11
- package/dist/resources/extensions/gsd/preferences.js +22 -11
- package/dist/resources/extensions/gsd/prompt-loader.js +6 -2
- package/dist/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/complete-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/discuss.md +11 -14
- package/dist/resources/extensions/gsd/prompts/execute-task.md +5 -3
- package/dist/resources/extensions/gsd/prompts/guided-complete-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-discuss-milestone.md +11 -12
- package/dist/resources/extensions/gsd/prompts/guided-discuss-slice.md +8 -10
- package/dist/resources/extensions/gsd/prompts/guided-execute-task.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-plan-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-plan-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-research-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/guided-resume-task.md +1 -1
- package/dist/resources/extensions/gsd/prompts/plan-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/queue.md +4 -8
- package/dist/resources/extensions/gsd/prompts/reactive-execute.md +11 -8
- package/dist/resources/extensions/gsd/prompts/reassess-roadmap.md +1 -1
- package/dist/resources/extensions/gsd/prompts/research-milestone.md +1 -1
- package/dist/resources/extensions/gsd/prompts/research-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/run-uat.md +28 -11
- package/dist/resources/extensions/gsd/prompts/workflow-start.md +2 -2
- package/dist/resources/extensions/gsd/repo-identity.js +21 -4
- package/dist/resources/extensions/gsd/resource-version.js +2 -1
- package/dist/resources/extensions/gsd/roadmap-mutations.js +24 -0
- package/dist/resources/extensions/gsd/state.js +42 -23
- package/dist/resources/extensions/gsd/templates/runtime.md +21 -0
- package/dist/resources/extensions/gsd/templates/task-plan.md +3 -0
- package/dist/resources/extensions/gsd/visualizer-data.js +1 -1
- package/dist/resources/extensions/mcp-client/index.js +14 -1
- package/dist/resources/extensions/remote-questions/status.js +4 -1
- package/dist/resources/extensions/remote-questions/store.js +4 -1
- package/dist/resources/extensions/search-the-web/provider.js +2 -1
- package/dist/resources/extensions/shared/frontmatter.js +1 -1
- package/dist/resources/extensions/subagent/isolation.js +2 -1
- package/dist/resources/extensions/ttsr/rule-loader.js +2 -1
- package/package.json +1 -1
- package/packages/pi-ai/dist/utils/oauth/anthropic.js +2 -2
- package/packages/pi-ai/dist/utils/oauth/anthropic.js.map +1 -1
- package/packages/pi-ai/src/utils/oauth/anthropic.ts +2 -2
- package/packages/pi-coding-agent/dist/core/extensions/loader.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/extensions/loader.js +205 -7
- package/packages/pi-coding-agent/dist/core/extensions/loader.js.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.d.ts +1 -0
- package/packages/pi-coding-agent/dist/core/skills.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/skills.js +6 -1
- package/packages/pi-coding-agent/dist/core/skills.js.map +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts +1 -1
- package/packages/pi-coding-agent/dist/index.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/index.js +1 -1
- package/packages/pi-coding-agent/dist/index.js.map +1 -1
- package/packages/pi-coding-agent/src/core/extensions/loader.ts +223 -7
- package/packages/pi-coding-agent/src/core/skills.ts +9 -1
- package/packages/pi-coding-agent/src/index.ts +1 -0
- package/src/resources/extensions/browser-tools/index.ts +3 -0
- package/src/resources/extensions/browser-tools/tools/verify.ts +117 -0
- package/src/resources/extensions/env-utils.ts +31 -0
- package/src/resources/extensions/get-secrets-from-user.ts +5 -24
- package/src/resources/extensions/github-sync/cli.ts +364 -0
- package/src/resources/extensions/github-sync/index.ts +93 -0
- package/src/resources/extensions/github-sync/mapping.ts +81 -0
- package/src/resources/extensions/github-sync/sync.ts +556 -0
- package/src/resources/extensions/github-sync/templates.ts +183 -0
- package/src/resources/extensions/github-sync/tests/cli.test.ts +20 -0
- package/src/resources/extensions/github-sync/tests/commit-linking.test.ts +39 -0
- package/src/resources/extensions/github-sync/tests/mapping.test.ts +104 -0
- package/src/resources/extensions/github-sync/tests/templates.test.ts +110 -0
- package/src/resources/extensions/github-sync/types.ts +47 -0
- package/src/resources/extensions/gsd/auto/session.ts +7 -25
- package/src/resources/extensions/gsd/auto-dispatch.ts +7 -9
- package/src/resources/extensions/gsd/auto-loop.ts +526 -545
- package/src/resources/extensions/gsd/auto-post-unit.ts +80 -44
- package/src/resources/extensions/gsd/auto-prompts.ts +247 -50
- package/src/resources/extensions/gsd/auto-start.ts +11 -1
- package/src/resources/extensions/gsd/auto-worktree-sync.ts +3 -1
- package/src/resources/extensions/gsd/auto-worktree.ts +3 -3
- package/src/resources/extensions/gsd/auto.ts +139 -101
- package/src/resources/extensions/gsd/commands-extensions.ts +4 -2
- package/src/resources/extensions/gsd/commands-prefs-wizard.ts +1 -1
- package/src/resources/extensions/gsd/commands.ts +5 -3
- package/src/resources/extensions/gsd/context-budget.ts +2 -12
- package/src/resources/extensions/gsd/detection.ts +2 -2
- package/src/resources/extensions/gsd/docs/preferences-reference.md +0 -2
- package/src/resources/extensions/gsd/doctor-providers.ts +30 -9
- package/src/resources/extensions/gsd/doctor.ts +22 -1
- package/src/resources/extensions/gsd/exit-command.ts +2 -2
- package/src/resources/extensions/gsd/export.ts +1 -1
- package/src/resources/extensions/gsd/files.ts +51 -11
- package/src/resources/extensions/gsd/forensics.ts +1 -1
- package/src/resources/extensions/gsd/git-service.ts +44 -10
- package/src/resources/extensions/gsd/gitignore.ts +17 -3
- package/src/resources/extensions/gsd/guided-flow.ts +177 -44
- package/src/resources/extensions/gsd/health-widget-core.ts +28 -80
- package/src/resources/extensions/gsd/health-widget.ts +3 -89
- package/src/resources/extensions/gsd/index.ts +24 -17
- package/src/resources/extensions/gsd/migrate/parsers.ts +1 -1
- package/src/resources/extensions/gsd/migrate-external.ts +18 -1
- package/src/resources/extensions/gsd/native-git-bridge.ts +37 -0
- package/src/resources/extensions/gsd/paths.ts +4 -0
- package/src/resources/extensions/gsd/preferences-models.ts +0 -12
- package/src/resources/extensions/gsd/preferences-types.ts +4 -4
- package/src/resources/extensions/gsd/preferences-validation.ts +51 -11
- package/src/resources/extensions/gsd/preferences.ts +25 -11
- package/src/resources/extensions/gsd/prompt-loader.ts +7 -2
- package/src/resources/extensions/gsd/prompts/complete-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/complete-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/discuss.md +11 -14
- package/src/resources/extensions/gsd/prompts/execute-task.md +5 -3
- package/src/resources/extensions/gsd/prompts/guided-complete-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-discuss-milestone.md +11 -12
- package/src/resources/extensions/gsd/prompts/guided-discuss-slice.md +8 -10
- package/src/resources/extensions/gsd/prompts/guided-execute-task.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-plan-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-plan-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-research-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/guided-resume-task.md +1 -1
- package/src/resources/extensions/gsd/prompts/plan-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/queue.md +4 -8
- package/src/resources/extensions/gsd/prompts/reactive-execute.md +11 -8
- package/src/resources/extensions/gsd/prompts/reassess-roadmap.md +1 -1
- package/src/resources/extensions/gsd/prompts/research-milestone.md +1 -1
- package/src/resources/extensions/gsd/prompts/research-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/run-uat.md +28 -11
- package/src/resources/extensions/gsd/prompts/workflow-start.md +2 -2
- package/src/resources/extensions/gsd/repo-identity.ts +23 -4
- package/src/resources/extensions/gsd/resource-version.ts +3 -1
- package/src/resources/extensions/gsd/roadmap-mutations.ts +29 -0
- package/src/resources/extensions/gsd/state.ts +39 -21
- package/src/resources/extensions/gsd/templates/runtime.md +21 -0
- package/src/resources/extensions/gsd/templates/task-plan.md +3 -0
- package/src/resources/extensions/gsd/tests/agent-end-retry.test.ts +21 -18
- package/src/resources/extensions/gsd/tests/auto-loop.test.ts +122 -68
- package/src/resources/extensions/gsd/tests/auto-worktree-milestone-merge.test.ts +4 -3
- package/src/resources/extensions/gsd/tests/derive-state.test.ts +43 -0
- package/src/resources/extensions/gsd/tests/doctor-providers.test.ts +86 -3
- package/src/resources/extensions/gsd/tests/gitignore-tracked-gsd.test.ts +50 -0
- package/src/resources/extensions/gsd/tests/health-widget.test.ts +16 -54
- package/src/resources/extensions/gsd/tests/parsers.test.ts +131 -14
- package/src/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +209 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +2 -7
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +59 -0
- package/src/resources/extensions/gsd/tests/repo-identity-worktree.test.ts +21 -1
- package/src/resources/extensions/gsd/tests/run-uat.test.ts +16 -4
- package/src/resources/extensions/gsd/tests/skill-activation.test.ts +140 -0
- package/src/resources/extensions/gsd/types.ts +18 -1
- package/src/resources/extensions/gsd/verification-evidence.ts +16 -0
- package/src/resources/extensions/gsd/visualizer-data.ts +1 -1
- package/src/resources/extensions/mcp-client/index.ts +17 -1
- package/src/resources/extensions/remote-questions/status.ts +5 -1
- package/src/resources/extensions/remote-questions/store.ts +5 -1
- package/src/resources/extensions/search-the-web/provider.ts +2 -1
- package/src/resources/extensions/shared/frontmatter.ts +1 -1
- package/src/resources/extensions/subagent/isolation.ts +3 -1
- package/src/resources/extensions/ttsr/rule-loader.ts +3 -1
- package/dist/resources/extensions/gsd/prompt-compressor.js +0 -393
- package/dist/resources/extensions/gsd/semantic-chunker.js +0 -254
- package/dist/resources/extensions/gsd/summary-distiller.js +0 -212
- package/src/resources/extensions/gsd/prompt-compressor.ts +0 -508
- package/src/resources/extensions/gsd/semantic-chunker.ts +0 -336
- package/src/resources/extensions/gsd/summary-distiller.ts +0 -258
- package/src/resources/extensions/gsd/tests/context-compression.test.ts +0 -193
- package/src/resources/extensions/gsd/tests/prompt-compressor.test.ts +0 -529
- package/src/resources/extensions/gsd/tests/semantic-chunker.test.ts +0 -426
- package/src/resources/extensions/gsd/tests/summary-distiller.test.ts +0 -323
- package/src/resources/extensions/gsd/tests/token-optimization-benchmark.test.ts +0 -1272
- package/src/resources/extensions/gsd/tests/token-optimization-prefs.test.ts +0 -164
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
import { existsSync, readFileSync } from "node:fs";
|
|
14
14
|
import { homedir } from "node:os";
|
|
15
15
|
import { join } from "node:path";
|
|
16
|
+
|
|
16
17
|
import { gsdRoot } from "./paths.js";
|
|
17
18
|
import { parse as parseYaml } from "yaml";
|
|
18
19
|
import type { PostUnitHookConfig, PreDispatchHookConfig, TokenProfile } from "./types.js";
|
|
19
20
|
import type { DynamicRoutingConfig } from "./model-router.js";
|
|
20
|
-
import { normalizeStringArray } from "../shared/
|
|
21
|
+
import { normalizeStringArray } from "../shared/format-utils.js";
|
|
21
22
|
import { resolveProfileDefaults as _resolveProfileDefaults } from "./preferences-models.js";
|
|
22
23
|
|
|
23
24
|
import {
|
|
@@ -75,31 +76,42 @@ export {
|
|
|
75
76
|
resolveProfileDefaults,
|
|
76
77
|
resolveEffectiveProfile,
|
|
77
78
|
resolveInlineLevel,
|
|
78
|
-
resolveCompressionStrategy,
|
|
79
79
|
resolveContextSelection,
|
|
80
80
|
resolveSearchProviderFromPreferences,
|
|
81
81
|
} from "./preferences-models.js";
|
|
82
82
|
|
|
83
83
|
// ─── Path Constants & Getters ───────────────────────────────────────────────
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
function gsdHome(): string {
|
|
86
|
+
return process.env.GSD_HOME || join(homedir(), ".gsd");
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function globalPreferencesPath(): string {
|
|
90
|
+
return join(gsdHome(), "preferences.md");
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function legacyGlobalPreferencesPath(): string {
|
|
94
|
+
return join(homedir(), ".pi", "agent", "gsd-preferences.md");
|
|
95
|
+
}
|
|
96
|
+
|
|
87
97
|
function projectPreferencesPath(): string {
|
|
88
98
|
return join(gsdRoot(process.cwd()), "preferences.md");
|
|
89
99
|
}
|
|
90
100
|
// Bootstrap in gitignore.ts historically created PREFERENCES.md (uppercase) by mistake.
|
|
91
101
|
// Check uppercase as a fallback so those files aren't silently ignored.
|
|
92
|
-
|
|
102
|
+
function globalPreferencesPathUppercase(): string {
|
|
103
|
+
return join(gsdHome(), "PREFERENCES.md");
|
|
104
|
+
}
|
|
93
105
|
function projectPreferencesPathUppercase(): string {
|
|
94
106
|
return join(gsdRoot(process.cwd()), "PREFERENCES.md");
|
|
95
107
|
}
|
|
96
108
|
|
|
97
109
|
export function getGlobalGSDPreferencesPath(): string {
|
|
98
|
-
return
|
|
110
|
+
return globalPreferencesPath();
|
|
99
111
|
}
|
|
100
112
|
|
|
101
113
|
export function getLegacyGlobalGSDPreferencesPath(): string {
|
|
102
|
-
return
|
|
114
|
+
return legacyGlobalPreferencesPath();
|
|
103
115
|
}
|
|
104
116
|
|
|
105
117
|
export function getProjectGSDPreferencesPath(): string {
|
|
@@ -109,9 +121,9 @@ export function getProjectGSDPreferencesPath(): string {
|
|
|
109
121
|
// ─── Loading ────────────────────────────────────────────────────────────────
|
|
110
122
|
|
|
111
123
|
export function loadGlobalGSDPreferences(): LoadedGSDPreferences | null {
|
|
112
|
-
return loadPreferencesFile(
|
|
113
|
-
?? loadPreferencesFile(
|
|
114
|
-
?? loadPreferencesFile(
|
|
124
|
+
return loadPreferencesFile(globalPreferencesPath(), "global")
|
|
125
|
+
?? loadPreferencesFile(globalPreferencesPathUppercase(), "global")
|
|
126
|
+
?? loadPreferencesFile(legacyGlobalPreferencesPath(), "global");
|
|
115
127
|
}
|
|
116
128
|
|
|
117
129
|
export function loadProjectGSDPreferences(): LoadedGSDPreferences | null {
|
|
@@ -267,10 +279,12 @@ function mergePreferences(base: GSDPreferences, override: GSDPreferences): GSDPr
|
|
|
267
279
|
verification_auto_fix: override.verification_auto_fix ?? base.verification_auto_fix,
|
|
268
280
|
verification_max_retries: override.verification_max_retries ?? base.verification_max_retries,
|
|
269
281
|
search_provider: override.search_provider ?? base.search_provider,
|
|
270
|
-
compression_strategy: override.compression_strategy ?? base.compression_strategy,
|
|
271
282
|
context_selection: override.context_selection ?? base.context_selection,
|
|
272
283
|
auto_visualize: override.auto_visualize ?? base.auto_visualize,
|
|
273
284
|
auto_report: override.auto_report ?? base.auto_report,
|
|
285
|
+
github: (base.github || override.github)
|
|
286
|
+
? { ...(base.github ?? {}), ...(override.github ?? {}) } as import("../github-sync/types.js").GitHubSyncConfig
|
|
287
|
+
: undefined,
|
|
274
288
|
};
|
|
275
289
|
}
|
|
276
290
|
|
|
@@ -78,6 +78,11 @@ export function loadPrompt(name: string, vars: Record<string, string> = {}): str
|
|
|
78
78
|
templateCache.set(name, content);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
const effectiveVars = {
|
|
82
|
+
skillActivation: "If a `GSD Skill Preferences` block is present in system context, use it and the `<available_skills>` catalog in your system prompt to decide which skills to load and follow for this unit, without relaxing required verification or artifact rules.",
|
|
83
|
+
...vars,
|
|
84
|
+
};
|
|
85
|
+
|
|
81
86
|
// Check BEFORE substitution: find all {{varName}} placeholders the template
|
|
82
87
|
// declares and verify every one has a value in vars. Checking after substitution
|
|
83
88
|
// would also flag {{...}} patterns injected by inlined content (e.g. template
|
|
@@ -86,7 +91,7 @@ export function loadPrompt(name: string, vars: Record<string, string> = {}): str
|
|
|
86
91
|
if (declared) {
|
|
87
92
|
const missing = [...new Set(declared)]
|
|
88
93
|
.map(m => m.slice(2, -2))
|
|
89
|
-
.filter(key => !(key in
|
|
94
|
+
.filter(key => !(key in effectiveVars));
|
|
90
95
|
if (missing.length > 0) {
|
|
91
96
|
throw new GSDError(
|
|
92
97
|
GSD_PARSE_ERROR,
|
|
@@ -97,7 +102,7 @@ export function loadPrompt(name: string, vars: Record<string, string> = {}): str
|
|
|
97
102
|
}
|
|
98
103
|
}
|
|
99
104
|
|
|
100
|
-
for (const [key, value] of Object.entries(
|
|
105
|
+
for (const [key, value] of Object.entries(effectiveVars)) {
|
|
101
106
|
content = content.replaceAll(`{{${key}}}`, value);
|
|
102
107
|
}
|
|
103
108
|
|
|
@@ -16,7 +16,7 @@ All relevant context has been preloaded below — the roadmap, all slice summari
|
|
|
16
16
|
|
|
17
17
|
Then:
|
|
18
18
|
1. Use the **Milestone Summary** output template from the inlined context above
|
|
19
|
-
2.
|
|
19
|
+
2. {{skillActivation}}
|
|
20
20
|
3. Verify each **success criterion** from the milestone definition in `{{roadmapPath}}`. For each criterion, confirm it was met with specific evidence from slice summaries, test results, or observable behavior. List any criterion that was NOT met.
|
|
21
21
|
4. Verify the milestone's **definition of done** — all slices are `[x]`, all slice summaries exist, and any cross-slice integration points work correctly.
|
|
22
22
|
5. Validate **requirement status transitions**. For each requirement that changed status during this milestone, confirm the transition is supported by evidence. Requirements can move between Active, Validated, Deferred, Blocked, or Out of Scope — but only with proof.
|
|
@@ -20,7 +20,7 @@ All relevant context has been preloaded below — the slice plan, all task summa
|
|
|
20
20
|
|
|
21
21
|
Then:
|
|
22
22
|
1. Use the **Slice Summary** and **UAT** output templates from the inlined context above
|
|
23
|
-
2.
|
|
23
|
+
2. {{skillActivation}}
|
|
24
24
|
3. Run all slice-level verification checks defined in the slice plan. All must pass before marking the slice done. If any fail, fix them first.
|
|
25
25
|
4. If the slice plan includes observability/diagnostic surfaces, confirm they work. Skip this for simple slices that don't have observability sections.
|
|
26
26
|
5. If `.gsd/REQUIREMENTS.md` exists, update it based on what this slice actually proved. Move requirements between Active, Validated, Deferred, Blocked, or Out of Scope only when the evidence from execution supports that change.
|
|
@@ -11,7 +11,7 @@ After the user describes their idea, **do not ask questions yet**. First, prove
|
|
|
11
11
|
1. Summarize what you understood in your own words — concretely, not abstractly.
|
|
12
12
|
2. Give an honest size read: roughly how many milestones, roughly how many slices in the first one. Base this on the actual work involved, not a classification label. A config change might be 1 milestone with 1 slice. A social network might be 5 milestones with 8+ slices each. Use your judgment.
|
|
13
13
|
3. Include scope honesty — a bullet list of the major capabilities you're hearing: "Here's what I'm hearing: [bullet list of major capabilities]."
|
|
14
|
-
4.
|
|
14
|
+
4. Invite correction in one plain sentence: "Here's my read. Correct anything important I missed." — plain text, not `ask_user_questions`.
|
|
15
15
|
|
|
16
16
|
This prevents runaway questioning by forcing comprehension proof before anything else. Do not skip this step. Do not combine it with the first question round.
|
|
17
17
|
|
|
@@ -21,7 +21,7 @@ After reflection is confirmed, decide the approach based on the actual scope —
|
|
|
21
21
|
|
|
22
22
|
**If the work spans multiple milestones:** Before drilling into details, map the full landscape:
|
|
23
23
|
1. Propose a milestone sequence — names, one-line intents, rough dependencies
|
|
24
|
-
2. Present this
|
|
24
|
+
2. Present this as the working milestone sequence. Adjust it if the user objects, sharpens it, or adds constraints; otherwise keep moving.
|
|
25
25
|
3. Only then begin the deep Q&A — and scope the Q&A to the full vision, not just M001
|
|
26
26
|
|
|
27
27
|
**If the work fits in a single milestone:** Proceed directly to questioning.
|
|
@@ -48,7 +48,7 @@ You are a thinking partner, not an interviewer.
|
|
|
48
48
|
|
|
49
49
|
**Challenge vagueness, make abstract concrete.** When the user says something abstract ("it should be smart" / "it needs to handle edge cases" / "good UX"), push for specifics. What does "smart" mean in practice? Which edge cases? What does good UX look like for this specific interaction?
|
|
50
50
|
|
|
51
|
-
**
|
|
51
|
+
**Lead with experience, but ask implementation when it materially matters.** Default questions should target the experience and outcome. But when implementation choices materially change scope, proof, compliance, integration, deployment, or irreversible architecture, ask them directly instead of forcing a fake UX phrasing.
|
|
52
52
|
|
|
53
53
|
**Freeform rule:** When the user selects "Other" or clearly wants to explain something freely, stop using `ask_user_questions` and switch to plain text follow-ups. Let them talk. Resume structured questions when appropriate.
|
|
54
54
|
|
|
@@ -105,16 +105,13 @@ Example flow:
|
|
|
105
105
|
|
|
106
106
|
If they clarify, absorb the correction and re-verify.
|
|
107
107
|
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
Only after the depth checklist is fully satisfied and you genuinely understand the work, offer to proceed.
|
|
108
|
+
The depth verification is the required write-gate. Do **not** add another meta "ready to proceed?" checkpoint immediately after it unless there is still material ambiguity.
|
|
111
109
|
|
|
112
|
-
|
|
113
|
-
"Here's what I'm planning to build: [list of capabilities with rough complexity]. Does this match your vision, or did I miss something?"
|
|
110
|
+
## Wrap-up Gate
|
|
114
111
|
|
|
115
|
-
|
|
112
|
+
Once the depth checklist is fully satisfied, move directly into requirements and roadmap preview. Do not insert a separate "are you ready to continue?" gate unless the user explicitly wants to keep brainstorming or you still see material ambiguity.
|
|
116
113
|
|
|
117
|
-
If
|
|
114
|
+
If you need a final scope reflection, fold it into the depth summary or roadmap preview rather than asking for permission twice.
|
|
118
115
|
|
|
119
116
|
## Focused Research
|
|
120
117
|
|
|
@@ -165,9 +162,9 @@ Rules:
|
|
|
165
162
|
|
|
166
163
|
For multi-milestone projects, requirements should span the full vision. Requirements owned by later milestones get provisional ownership. The full requirement set captures the user's complete vision — milestones are the sequencing strategy, not the scope boundary.
|
|
167
164
|
|
|
168
|
-
If the project is new or has no `REQUIREMENTS.md`,
|
|
165
|
+
If the project is new or has no `REQUIREMENTS.md`, surface candidate requirements in chat before writing the roadmap. Ask for correction only on material omissions, wrong ownership, or wrong scope. If the user has already been specific and raises no substantive objection, treat the requirement set as confirmed and continue.
|
|
169
166
|
|
|
170
|
-
**Print the requirements in chat before
|
|
167
|
+
**Print the requirements in chat before writing the roadmap.** Do not say "here are the requirements" and then only write them to a file. The user must see them in the terminal. Print a markdown table with columns: ID, Title, Status, Owner, Source. Group by status (Active, Deferred, Out of Scope). After the table, ask: "Confirm, adjust, or add?"
|
|
171
168
|
|
|
172
169
|
## Scope Assessment
|
|
173
170
|
|
|
@@ -179,7 +176,7 @@ Before moving to output, confirm the size estimate from your reflection still ho
|
|
|
179
176
|
|
|
180
177
|
Before writing any files, **print the planned roadmap in chat** so the user can see and approve it. Print a markdown table with columns: Slice, Title, Risk, Depends, Demo. One row per slice. Below the table, print the milestone definition of done as a bullet list.
|
|
181
178
|
|
|
182
|
-
|
|
179
|
+
If the user raises a substantive objection, adjust the roadmap. Otherwise, present the roadmap and ask: "Ready to write, or want to adjust?" — one gate, not two.
|
|
183
180
|
|
|
184
181
|
### Naming Convention
|
|
185
182
|
|
|
@@ -236,7 +233,7 @@ If a milestone has no dependencies, omit the frontmatter. The dependency chain f
|
|
|
236
233
|
|
|
237
234
|
#### Phase 3: Sequential readiness gate for remaining milestones
|
|
238
235
|
|
|
239
|
-
For each remaining milestone **one at a time, in sequence**, use `ask_user_questions` to
|
|
236
|
+
For each remaining milestone **one at a time, in sequence**, decide the most likely readiness mode from the evidence you already have, then use `ask_user_questions` to let the user correct that recommendation. Present three options:
|
|
240
237
|
|
|
241
238
|
- **"Discuss now"** — The user wants to conduct a focused discussion for this milestone in the current session, while the context from the broader discussion is still fresh. Proceed with a focused discussion for this milestone (reflection → investigation → questioning → depth verification). When the discussion concludes, write a full `CONTEXT.md`. Then move to the gate for the next milestone.
|
|
242
239
|
- **"Write draft for later"** — This milestone has seed material from the current conversation but needs its own dedicated discussion in a future session. Write a `CONTEXT-DRAFT.md` capturing the seed material (what was discussed, key ideas, provisional scope, open questions). Mark it clearly as a draft, not a finalized context. **What happens downstream:** When auto-mode reaches this milestone, it pauses and notifies the user: "M00x has draft context — needs discussion. Run /gsd." The `/gsd` wizard shows a "Discuss from draft" option that seeds the new discussion with this draft, so nothing from the current conversation is lost. After the dedicated discussion produces a full CONTEXT.md, the draft file is automatically deleted.
|
|
@@ -6,10 +6,12 @@ You are executing GSD auto-mode.
|
|
|
6
6
|
|
|
7
7
|
Your working directory is `{{workingDirectory}}`. All file reads, writes, and shell commands MUST operate relative to this directory. Do NOT `cd` to any other directory.
|
|
8
8
|
|
|
9
|
-
A researcher explored the codebase and a planner decomposed the work — you are the executor. The task plan below is your authoritative contract.
|
|
9
|
+
A researcher explored the codebase and a planner decomposed the work — you are the executor. The task plan below is your authoritative contract for the slice goal and verification bar, but it is not a substitute for local reality. Verify the referenced files and surrounding code before changing them. Do not do broad re-research or spontaneous re-planning. Small factual corrections, file-path fixes, and local implementation adaptations are part of execution. Escalate to `blocker_discovered: true` only when the slice contract or downstream task graph no longer holds.
|
|
10
10
|
|
|
11
11
|
{{overridesSection}}
|
|
12
12
|
|
|
13
|
+
{{runtimeContext}}
|
|
14
|
+
|
|
13
15
|
{{resumeSection}}
|
|
14
16
|
|
|
15
17
|
{{carryForwardSection}}
|
|
@@ -26,8 +28,8 @@ A researcher explored the codebase and a planner decomposed the work — you are
|
|
|
26
28
|
|
|
27
29
|
Then:
|
|
28
30
|
0. Narrate step transitions, key implementation decisions, and verification outcomes as you work. Keep it terse — one line between tool-call clusters, not between every call — but write complete sentences in user-facing prose, not shorthand notes or scratchpad fragments.
|
|
29
|
-
1.
|
|
30
|
-
2. Execute the steps in the inlined task plan
|
|
31
|
+
1. {{skillActivation}} Follow any activated skills before writing code. If no skills match this task, skip this step.
|
|
32
|
+
2. Execute the steps in the inlined task plan, adapting minor local mismatches when the surrounding code differs from the planner's snapshot
|
|
31
33
|
3. Build the real thing. If the task plan says "create login endpoint", build an endpoint that actually authenticates against a real store, not one that returns a hardcoded success response. If the task plan says "create dashboard page", build a page that renders real data from the API, not a component with hardcoded props. Stubs and mocks are for tests, not for the shipped feature.
|
|
32
34
|
4. Write or update tests as part of execution — tests are verification, not an afterthought. If the slice plan defines test files in its Verification section and this is the first task, create them (they should initially fail).
|
|
33
35
|
5. When implementing non-trivial runtime behavior (async flows, API boundaries, background processes, error paths), add or preserve agent-usable observability. Skip this for simple changes where it doesn't apply.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
Complete slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Your working directory is `{{workingDirectory}}` — all file operations must use this path. All tasks are done. Your slice summary is the primary record of what was built — downstream agents (reassess-roadmap, future slice researchers) read it to understand what this slice delivered and what to watch out for. Use the **Slice Summary** and **UAT** output templates below.
|
|
1
|
+
Complete slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Your working directory is `{{workingDirectory}}` — all file operations must use this path. All tasks are done. Your slice summary is the primary record of what was built — downstream agents (reassess-roadmap, future slice researchers) read it to understand what this slice delivered and what to watch out for. Use the **Slice Summary** and **UAT** output templates below. {{skillActivation}} Write `{{sliceId}}-SUMMARY.md` (compress task summaries), write `{{sliceId}}-UAT.md`, and fill the `UAT Type` plus `Not Proven By This UAT` sections explicitly so the artifact states what class of acceptance it covers and what still remains unproven. Review task summaries for `key_decisions` and ensure any significant ones are in `.gsd/DECISIONS.md`. Mark the slice checkbox done in the roadmap, update milestone summary, Do not commit or merge manually — the system handles this after the unit completes.
|
|
2
2
|
|
|
3
3
|
{{inlinedTemplates}}
|
|
@@ -33,19 +33,16 @@ Ask **1–3 questions per round**. Keep each question focused on one of:
|
|
|
33
33
|
|
|
34
34
|
After the user answers, investigate further if any answer opens a new unknown, then ask the next round.
|
|
35
35
|
|
|
36
|
-
###
|
|
36
|
+
### Round cadence
|
|
37
37
|
|
|
38
|
-
After each round of answers,
|
|
38
|
+
After each round of answers, decide whether you already have enough depth to write a strong context file.
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
**If `{{structuredQuestionsAvailable}}` is `true
|
|
43
|
-
- "
|
|
44
|
-
- "
|
|
45
|
-
|
|
46
|
-
**If `{{structuredQuestionsAvailable}}` is `false`:** ask in plain text.
|
|
47
|
-
|
|
48
|
-
If the user wants to keep going, keep asking. Stop when they say wrap up.
|
|
40
|
+
- If not, investigate any newly-opened unknowns and continue to the next round immediately. Do **not** ask a meta "ready to wrap up?" question after every round.
|
|
41
|
+
- Use a single wrap-up prompt only when you genuinely believe the depth checklist is satisfied or the user signals they want to stop.
|
|
42
|
+
- **If `{{structuredQuestionsAvailable}}` is `true` and you need that wrap-up prompt:** use `ask_user_questions` with options:
|
|
43
|
+
- "Write the context file" *(recommended when depth is satisfied)*
|
|
44
|
+
- "One more pass"
|
|
45
|
+
- **If `{{structuredQuestionsAvailable}}` is `false`:** ask in plain text only once you believe you are ready to write.
|
|
49
46
|
|
|
50
47
|
---
|
|
51
48
|
|
|
@@ -55,7 +52,7 @@ If the user wants to keep going, keep asking. Stop when they say wrap up.
|
|
|
55
52
|
|
|
56
53
|
**Challenge vagueness, make abstract concrete.** When the user says something abstract ("it should be smart" / "good UX"), push for specifics.
|
|
57
54
|
|
|
58
|
-
**
|
|
55
|
+
**Lead with experience, but ask implementation when it materially matters.** Default questions should target the experience and outcome. But when implementation choices materially change scope, proof, compliance, integration, deployment, or irreversible architecture, ask them directly instead of forcing a fake UX phrasing.
|
|
59
56
|
|
|
60
57
|
**Position-first framing.** Have opinions. "I'd lean toward X because Y — does that match your thinking?" is better than "what do you think about X vs Y?"
|
|
61
58
|
|
|
@@ -95,6 +92,8 @@ Before moving to the wrap-up gate, verify you have covered:
|
|
|
95
92
|
|
|
96
93
|
If they clarify, absorb the correction and re-verify.
|
|
97
94
|
|
|
95
|
+
The depth verification is the only required confirmation gate. Do not add a second "ready to proceed?" gate after it.
|
|
96
|
+
|
|
98
97
|
---
|
|
99
98
|
|
|
100
99
|
## Output
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
You are interviewing the user to surface behavioural, UX, and usage grey areas for slice **{{sliceId}}: {{sliceTitle}}** of milestone **{{milestoneId}}**.
|
|
2
2
|
|
|
3
|
-
Your goal is **not** to
|
|
3
|
+
Your goal is **not** to center the discussion on tech stack trivia, naming conventions, or speculative architecture. Your goal is to produce a context file that captures the human decisions: what this slice should feel like, how it should behave, what edge cases matter, where scope begins and ends, and what the user cares about that won't be obvious from the roadmap entry alone. If a technical choice materially changes scope, proof, or integration behavior, ask it directly and capture it.
|
|
4
4
|
|
|
5
5
|
{{inlinedContext}}
|
|
6
6
|
|
|
@@ -27,17 +27,15 @@ Ask **1–3 questions per round** using `ask_user_questions`. Keep each question
|
|
|
27
27
|
|
|
28
28
|
After the user answers, investigate further if any answer opens a new unknown, then ask the next round.
|
|
29
29
|
|
|
30
|
-
###
|
|
30
|
+
### Round cadence
|
|
31
31
|
|
|
32
|
-
After each round of answers,
|
|
32
|
+
After each round of answers, decide whether you already have enough signal to write the slice context cleanly.
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
- "
|
|
38
|
-
- "
|
|
39
|
-
|
|
40
|
-
If the user wants to keep going, keep asking. Stop when they say wrap up.
|
|
34
|
+
- If not, investigate any new unknowns and continue to the next round immediately. Do **not** ask a meta "ready to wrap up?" question after every round.
|
|
35
|
+
- Ask a single wrap-up question only when you genuinely believe the slice is well understood or the user signals they want to stop.
|
|
36
|
+
- When you do ask it, use `ask_user_questions` with:
|
|
37
|
+
- "Write the context file" *(recommended when the slice is well understood)*
|
|
38
|
+
- "One more pass"
|
|
41
39
|
|
|
42
40
|
---
|
|
43
41
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
Execute the next task: {{taskId}} ("{{taskTitle}}") in slice {{sliceId}} of milestone {{milestoneId}}. Read the task plan (`{{taskId}}-PLAN.md`), load relevant summaries from prior tasks, and execute each step. Verify must-haves when done. If the task touches UI, browser flows, DOM behavior, or user-visible web state, exercise the real flow in the browser, prefer `browser_batch` for obvious sequences, prefer `browser_assert` for explicit pass/fail verification, use `browser_diff` when an action's effect is ambiguous, and use browser diagnostics when validating async or failure-prone UI. If you made an architectural, pattern, or library decision, append it to `.gsd/DECISIONS.md`. Use the **Task Summary** output template below. Write `{{taskId}}-SUMMARY.md`, mark it done, commit, and advance.
|
|
1
|
+
Execute the next task: {{taskId}} ("{{taskTitle}}") in slice {{sliceId}} of milestone {{milestoneId}}. Read the task plan (`{{taskId}}-PLAN.md`), load relevant summaries from prior tasks, and execute each step. Verify must-haves when done. If the task touches UI, browser flows, DOM behavior, or user-visible web state, exercise the real flow in the browser, prefer `browser_batch` for obvious sequences, prefer `browser_assert` for explicit pass/fail verification, use `browser_diff` when an action's effect is ambiguous, and use browser diagnostics when validating async or failure-prone UI. If you made an architectural, pattern, or library decision, append it to `.gsd/DECISIONS.md`. Use the **Task Summary** output template below. Write `{{taskId}}-SUMMARY.md`, mark it done, commit, and advance. {{skillActivation}} If running long and not all steps are finished, stop implementing and prioritize writing a clean partial summary over attempting one more step — a recoverable handoff is more valuable than a half-finished step with no documentation. If verification fails, debug methodically: form a hypothesis and test that specific theory before changing anything, change one variable at a time, read entire functions not just the suspect line, distinguish observable facts from assumptions, and if 3+ fixes fail without progress stop and reassess your mental model — list what you know for certain, what you've ruled out, and form fresh hypotheses. Don't fix symptoms — understand why something fails before changing code.
|
|
2
2
|
|
|
3
3
|
{{inlinedTemplates}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Plan milestone {{milestoneId}} ("{{milestoneTitle}}"). Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists and treat Active requirements as the capability contract. If `REQUIREMENTS.md` is missing, continue in legacy compatibility mode but explicitly note missing requirement coverage. Use the **Roadmap** output template below. Create `{{milestoneId}}-ROADMAP.md` in the milestone directory with slices, risk levels, dependencies, demo sentences, verification classes, milestone definition of done, requirement coverage, and a boundary map. Write success criteria as observable truths, not implementation tasks. 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. If planning produces structural decisions, append them to `.gsd/DECISIONS.md`.
|
|
1
|
+
Plan milestone {{milestoneId}} ("{{milestoneTitle}}"). Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists and treat Active requirements as the capability contract. If `REQUIREMENTS.md` is missing, continue in legacy compatibility mode but explicitly note missing requirement coverage. Use the **Roadmap** output template below. Create `{{milestoneId}}-ROADMAP.md` in the milestone directory with slices, risk levels, dependencies, demo sentences, verification classes, milestone definition of done, requirement coverage, and a boundary map. Write success criteria as observable truths, not implementation tasks. 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. If planning produces structural decisions, append them to `.gsd/DECISIONS.md`. {{skillActivation}}
|
|
2
2
|
|
|
3
3
|
## Requirement Rules
|
|
4
4
|
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
Plan slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements the roadmap says this slice owns or supports, and ensure the plan delivers them. Read the roadmap boundary map, any existing context/research files, and dependency summaries. Use the **Slice Plan** and **Task Plan** output templates below. Decompose into tasks with must-haves. Fill the `Proof Level` and `Integration Closure` sections truthfully so the plan says what class of proof this slice really delivers and what end-to-end wiring still remains. Write `{{sliceId}}-PLAN.md` and individual `T##-PLAN.md` files in the `tasks/` subdirectory. If planning produces structural decisions, append them to `.gsd/DECISIONS.md`.
|
|
1
|
+
Plan slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements the roadmap says this slice owns or supports, and ensure the plan delivers them. Read the roadmap boundary map, any existing context/research files, and dependency summaries. Use the **Slice Plan** and **Task Plan** output templates below. Decompose into tasks with must-haves. Fill the `Proof Level` and `Integration Closure` sections truthfully so the plan says what class of proof this slice really delivers and what end-to-end wiring still remains. Write `{{sliceId}}-PLAN.md` and individual `T##-PLAN.md` files in the `tasks/` subdirectory. If planning produces structural decisions, append them to `.gsd/DECISIONS.md`. {{skillActivation}} Before committing, self-audit the plan: every must-have maps to at least one task, every task has complete sections (steps, must-haves, verification, observability impact, inputs, and expected output), task ordering is consistent with no circular references, every pair of artifacts that must connect has an explicit wiring step, task scope targets 2–5 steps and 3–8 files (6–8 steps or 8–10 files — consider splitting; 10+ steps or 12+ files — must split), the plan honors locked decisions from context/research/decisions artifacts, the proof-level wording does not overclaim live integration if only fixture/contract proof is planned, every Active requirement this slice owns has at least one task with verification that proves it is met, and every task produces real user-facing progress — if the slice has a UI surface at least one task builds the real UI, if it has an API at least one task connects it to a real data source, and showing the completed result to a non-technical stakeholder would demonstrate real product progress rather than developer artifacts.
|
|
2
2
|
|
|
3
3
|
{{inlinedTemplates}}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
Research slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions, don't contradict them. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements this slice owns or supports and target research toward risks, unknowns, and constraints that could affect delivery of those requirements.
|
|
1
|
+
Research slice {{sliceId}} ("{{sliceTitle}}") of milestone {{milestoneId}}. Read `.gsd/DECISIONS.md` if it exists — respect existing decisions, don't contradict them. Read `.gsd/REQUIREMENTS.md` if it exists — identify which Active requirements this slice owns or supports and target research toward risks, unknowns, and constraints that could affect delivery of those requirements. {{skillActivation}} Explore the relevant code — use `rg`/`find` for targeted reads, or `scout` if the area is broad or unfamiliar. Check libraries with `resolve_library`/`get_library_docs` — skip this for libraries already used in the codebase. Use the **Research** output template below. Write `{{sliceId}}-RESEARCH.md` in the slice directory.
|
|
2
2
|
|
|
3
3
|
**You are the scout.** A planner agent reads your output in a fresh context to decompose this slice into tasks. Write for the planner — surface key files, where the work divides naturally, what to build first, and how to verify. If the research doc is vague, the planner re-explores code you already read. If it's precise, the planner decomposes immediately.
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Resume interrupted work. Find the continue file (`{{sliceId}}-CONTINUE.md` or `continue.md`) in slice {{sliceId}} of milestone {{milestoneId}},
|
|
1
|
+
Resume interrupted work. Find the continue file (`{{sliceId}}-CONTINUE.md` or `continue.md`) in slice {{sliceId}} of milestone {{milestoneId}}, read it, and use it as the recovery contract for where to pick up. Do **not** delete the continue file immediately. Keep it until the task is successfully completed or you have written a newer summary/continue artifact that clearly supersedes it. If the resumed attempt fails again, update or replace the continue file so no recovery context is lost. {{skillActivation}}
|
|
@@ -44,7 +44,7 @@ Narrate your decomposition reasoning — why you're grouping work this way, what
|
|
|
44
44
|
|
|
45
45
|
Then:
|
|
46
46
|
1. Use the **Roadmap** output template from the inlined context above
|
|
47
|
-
2.
|
|
47
|
+
2. {{skillActivation}}
|
|
48
48
|
3. Create the roadmap: decompose into demoable vertical slices — as many as the work genuinely needs, no more. A simple feature might be 1 slice. Don't decompose for decomposition's sake.
|
|
49
49
|
4. Order by risk (high-risk first)
|
|
50
50
|
5. Write `{{outputPath}}` with checkboxes, risk, depends, demo sentences, proof strategy, verification classes, milestone definition of done, **requirement coverage**, and a boundary map. Write success criteria as observable truths, not implementation tasks. 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
|
|
@@ -47,7 +47,7 @@ Then:
|
|
|
47
47
|
1. Read the templates:
|
|
48
48
|
- `~/.gsd/agent/extensions/gsd/templates/plan.md`
|
|
49
49
|
- `~/.gsd/agent/extensions/gsd/templates/task-plan.md`
|
|
50
|
-
2.
|
|
50
|
+
2. {{skillActivation}} Record the installed skills you expect executors to use in each task plan's `skills_used` frontmatter.
|
|
51
51
|
3. Define slice-level verification — the objective stopping condition for this slice:
|
|
52
52
|
- For non-trivial slices: plan actual test files with real assertions. Name the files.
|
|
53
53
|
- For simple slices: executable commands or script assertions are fine.
|
|
@@ -36,15 +36,11 @@ Don't go deep — just enough that your next question reflects what's actually t
|
|
|
36
36
|
- How the new work relates to existing milestones — overlap, dependencies, prerequisites
|
|
37
37
|
- If `.gsd/REQUIREMENTS.md` exists: which unmet Active or Deferred requirements this queued work advances
|
|
38
38
|
|
|
39
|
-
**Then use ask_user_questions** to dig into gray areas —
|
|
39
|
+
**Then use ask_user_questions** to dig into gray areas — scope boundaries, proof expectations, integration choices, tech preferences when they materially matter, and what's in vs out. 1-3 questions per round.
|
|
40
40
|
|
|
41
41
|
If a `GSD Skill Preferences` block is present in system context, use it to decide which skills to load and follow during discuss/planning work, but do not let it override the required discuss flow or artifact requirements.
|
|
42
42
|
|
|
43
|
-
**Self-regulate:**
|
|
44
|
-
"I think I have a good picture. Ready to queue this, or are there more things to discuss?"
|
|
45
|
-
with options: "Ready to queue (Recommended)", "I have more to discuss"
|
|
46
|
-
|
|
47
|
-
If the user wants to keep going, keep asking. If they're ready, proceed.
|
|
43
|
+
**Self-regulate:** Do **not** ask a meta "ready to queue?" question after every round. Keep going until you have enough depth to write the context well, then use a single wrap-up prompt if needed. If the user clearly keeps adding detail instead of objecting, treat that as permission to continue.
|
|
48
44
|
|
|
49
45
|
## Existing Milestone Awareness
|
|
50
46
|
|
|
@@ -88,7 +84,7 @@ For EACH milestone you are about to write context for, investigate the codebase
|
|
|
88
84
|
1. **Read the actual code** — for every file or module you reference in "Existing Codebase / Prior Art", read enough to confirm your assumptions about what exists, what it does, and what it doesn't do. Do not guess from memory or training data.
|
|
89
85
|
2. **Check for stale assumptions** — the codebase may have changed since the user's spec was written. Verify: do the APIs you reference still exist? Have modules been refactored? Has upstream merged features that change the landscape?
|
|
90
86
|
3. **Identify phantom capabilities** — for every capability you list as "existing," confirm it actually works as described. Look for: functions that exist but are never called, fields that are set but never read, features that are piped but never connected.
|
|
91
|
-
4. **Note what you found** — include verified findings in the context file's "Existing Codebase / Prior Art" section with "verified against
|
|
87
|
+
4. **Note what you found** — include verified findings in the context file's "Existing Codebase / Prior Art" section with annotations like "verified against current codebase state" or an actual concrete version/commit only if you truly have one.
|
|
92
88
|
|
|
93
89
|
### Step 2: Per-Milestone Depth Verification
|
|
94
90
|
|
|
@@ -103,7 +99,7 @@ This triggers the per-milestone write-gate. The question should present:
|
|
|
103
99
|
- Key technical assumptions you verified (or couldn't verify)
|
|
104
100
|
- Any risks or unknowns the investigation surfaced
|
|
105
101
|
|
|
106
|
-
The user confirms or corrects before you write. One depth verification per milestone — not one for all milestones combined.
|
|
102
|
+
The user confirms or corrects before you write. One depth verification per milestone — not one for all milestones combined. This is the required write-gate; do not add extra "ready to proceed?" prompts around it once you have enough signal.
|
|
107
103
|
|
|
108
104
|
**If you skip this step, the system will block the CONTEXT.md write and return an error telling you to complete verification first.**
|
|
109
105
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
You are executing **multiple tasks in parallel** for this slice. The task graph below shows which tasks are ready for simultaneous execution based on their input/output dependencies.
|
|
10
10
|
|
|
11
|
-
**Critical rule:** Use the `subagent` tool in **parallel mode** to dispatch all ready tasks simultaneously. Each subagent gets a
|
|
11
|
+
**Critical rule:** Use the `subagent` tool in **parallel mode** to dispatch all ready tasks simultaneously. Each subagent gets a full `execute-task` prompt and is responsible for its own implementation, verification, task summary, and checkbox updates. The parent batch agent orchestrates, verifies, and records failures only when a dispatched task failed before it could leave its own summary behind.
|
|
12
12
|
|
|
13
13
|
## Task Dependency Graph
|
|
14
14
|
|
|
@@ -24,15 +24,18 @@ You are executing **multiple tasks in parallel** for this slice. The task graph
|
|
|
24
24
|
|
|
25
25
|
1. **Dispatch all ready tasks** using `subagent` in parallel mode. Each subagent prompt is provided below.
|
|
26
26
|
2. **Wait for all subagents** to complete.
|
|
27
|
-
3. **Verify each task's outputs** — check that expected files were created/modified
|
|
28
|
-
4. **
|
|
29
|
-
5. **
|
|
30
|
-
6. **
|
|
27
|
+
3. **Verify each dispatched task's outputs** — check that expected files were created/modified, that verification commands pass where applicable, and that each task wrote its own `T##-SUMMARY.md`.
|
|
28
|
+
4. **Do not rewrite successful task summaries or duplicate checkbox edits.** Treat a subagent-written summary as authoritative for that task.
|
|
29
|
+
5. **If a failed task produced no summary, write a recovery summary for that task** with `blocker_discovered: true`, clear failure details, and leave the task unchecked so replan/retry has an authoritative record.
|
|
30
|
+
6. **Preserve successful sibling tasks exactly as they landed.** Do not roll back good work because another parallel task failed.
|
|
31
|
+
7. **Do NOT create a batch commit.** The surrounding unit lifecycle owns commits; this parent batch agent should not invent a second commit layer.
|
|
32
|
+
8. **Report the batch outcome** — which tasks succeeded, which failed, and any output collisions or dependency surprises.
|
|
31
33
|
|
|
32
34
|
If any subagent fails:
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
35
|
+
- Keep successful task summaries and checkbox updates as-is
|
|
36
|
+
- Write a failure summary only when the failed task did not leave one behind
|
|
37
|
+
- Do not silently discard or overwrite another task's outputs
|
|
38
|
+
- The orchestrator will handle re-dispatch or replanning on the next iteration
|
|
36
39
|
|
|
37
40
|
## Subagent Prompts
|
|
38
41
|
|
|
@@ -22,7 +22,7 @@ The following user thoughts were captured during execution and deferred to futur
|
|
|
22
22
|
|
|
23
23
|
{{deferredCaptures}}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
{{skillActivation}}
|
|
26
26
|
|
|
27
27
|
Then assess whether the remaining roadmap still makes sense given what was just built.
|
|
28
28
|
|
|
@@ -21,7 +21,7 @@ Write for the roadmap planner. It needs to understand: what exists in the codeba
|
|
|
21
21
|
A milestone adding a small feature to an established codebase needs targeted research — check the relevant code, confirm the approach, note constraints. A milestone introducing new technology, building a new system, or spanning multiple unfamiliar subsystems needs deep research — explore broadly, look up docs, investigate alternatives. Match your effort to the actual uncertainty, not the template's section count. Include only sections that have real content.
|
|
22
22
|
|
|
23
23
|
Then research the codebase and relevant technologies. Narrate key findings and surprises as you go — what exists, what's missing, what constrains the approach.
|
|
24
|
-
1.
|
|
24
|
+
1. {{skillActivation}}
|
|
25
25
|
2. **Skill Discovery ({{skillDiscoveryMode}}):**{{skillDiscoveryInstructions}}
|
|
26
26
|
3. Explore relevant code. For small/familiar codebases, use `rg`, `find`, and targeted reads. For large or unfamiliar codebases, use `scout` to build a broad map efficiently before diving in.
|
|
27
27
|
4. Use `resolve_library` / `get_library_docs` for unfamiliar libraries — skip this for libraries already used in the codebase
|
|
@@ -42,7 +42,7 @@ An honest "this is straightforward, here's the pattern to follow" is more valuab
|
|
|
42
42
|
|
|
43
43
|
Research what this slice needs. Narrate key findings and surprises as you go — what exists, what's missing, what constrains the approach.
|
|
44
44
|
0. If `REQUIREMENTS.md` was preloaded above, identify which Active requirements this slice owns or supports. Research should target these requirements — surfacing risks, unknowns, and implementation constraints that could affect whether the slice actually delivers them.
|
|
45
|
-
1.
|
|
45
|
+
1. {{skillActivation}} Reference specific rules from loaded skills in your findings where they inform the implementation approach.
|
|
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
|