@opengsd/gsd-pi 1.1.1-dev.74e8dd1 → 1.1.1-dev.9bb7453
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/dist/cli.js +3 -2
- package/dist/help-text.js +10 -6
- package/dist/resources/.managed-resources-content-hash +1 -1
- package/dist/resources/extensions/browser-tools/engine/managed-gsd-browser.js +495 -0
- package/dist/resources/extensions/browser-tools/engine/selection.js +16 -0
- package/dist/resources/extensions/browser-tools/extension-manifest.json +2 -2
- package/dist/resources/extensions/browser-tools/index.js +57 -9
- package/dist/resources/extensions/browser-tools/package.json +5 -1
- package/dist/resources/extensions/gsd/auto/orchestrator.js +0 -1
- package/dist/resources/extensions/gsd/auto-dashboard.js +77 -13
- package/dist/resources/extensions/gsd/auto-dispatch.js +5 -0
- package/dist/resources/extensions/gsd/auto-post-unit.js +21 -3
- package/dist/resources/extensions/gsd/auto-prompts.js +59 -22
- package/dist/resources/extensions/gsd/auto-runtime-state.js +3 -0
- package/dist/resources/extensions/gsd/auto-tool-tracking.js +1 -1
- package/dist/resources/extensions/gsd/auto.js +9 -2
- package/dist/resources/extensions/gsd/bootstrap/db-tools.js +4 -4
- package/dist/resources/extensions/gsd/bootstrap/register-hooks.js +9 -5
- package/dist/resources/extensions/gsd/browser-evidence.js +29 -2
- package/dist/resources/extensions/gsd/commands/handlers/ops.js +2 -2
- package/dist/resources/extensions/gsd/commands-handlers.js +76 -11
- package/dist/resources/extensions/gsd/commands-mcp-status.js +2 -1
- package/dist/resources/extensions/gsd/dashboard-overlay.js +21 -7
- package/dist/resources/extensions/gsd/docs/preferences-reference.md +8 -0
- package/dist/resources/extensions/gsd/doctor-runtime-checks.js +2 -2
- package/dist/resources/extensions/gsd/escalation.js +4 -4
- package/dist/resources/extensions/gsd/forensics.js +74 -2
- package/dist/resources/extensions/gsd/gsd-db.js +5 -2
- package/dist/resources/extensions/gsd/guided-flow.js +29 -68
- package/dist/resources/extensions/gsd/mcp-project-config.js +9 -76
- package/dist/resources/extensions/gsd/memory-store.js +4 -1
- package/dist/resources/extensions/gsd/post-unit-hooks.js +9 -0
- package/dist/resources/extensions/gsd/preferences-validation.js +39 -0
- package/dist/resources/extensions/gsd/prompt-loader.js +7 -0
- package/dist/resources/extensions/gsd/prompts/forensics.md +61 -1
- package/dist/resources/extensions/gsd/prompts/gate-evaluate.md +3 -1
- package/dist/resources/extensions/gsd/prompts/parallel-research-slices.md +3 -1
- package/dist/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/dist/resources/extensions/gsd/prompts/reactive-execute.md +3 -1
- package/dist/resources/extensions/gsd/prompts/run-uat.md +40 -22
- package/dist/resources/extensions/gsd/prompts/validate-milestone.md +3 -3
- package/dist/resources/extensions/gsd/rule-registry.js +428 -52
- package/dist/resources/extensions/gsd/state.js +2 -2
- package/dist/resources/extensions/gsd/templates/plan.md +3 -1
- package/dist/resources/extensions/gsd/tools/complete-slice.js +15 -1
- package/dist/resources/extensions/gsd/tools/complete-task.js +11 -1
- package/dist/resources/extensions/gsd/tools/validate-milestone.js +46 -16
- package/dist/resources/extensions/gsd/tools/workflow-tool-executors.js +51 -14
- package/dist/resources/extensions/gsd/verdict-parser.js +59 -15
- package/dist/resources/extensions/gsd/verification-gate.js +72 -1
- package/dist/resources/extensions/shared/gsd-browser-cli.js +145 -0
- package/dist/rtk.d.ts +7 -1
- package/dist/rtk.js +27 -11
- package/dist/update-check.d.ts +15 -1
- package/dist/update-check.js +87 -12
- package/dist/update-cmd.d.ts +1 -0
- package/dist/update-cmd.js +53 -2
- package/dist/web/standalone/.next/BUILD_ID +1 -1
- package/dist/web/standalone/.next/app-path-routes-manifest.json +7 -7
- package/dist/web/standalone/.next/build-manifest.json +2 -2
- package/dist/web/standalone/.next/prerender-manifest.json +3 -3
- package/dist/web/standalone/.next/server/app/_global-error.html +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.html +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/api/update/route.js +1 -1
- package/dist/web/standalone/.next/server/app/index.html +1 -1
- package/dist/web/standalone/.next/server/app/index.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/dist/web/standalone/.next/server/app-paths-manifest.json +7 -7
- package/dist/web/standalone/.next/server/chunks/8357.js +1 -1
- package/dist/web/standalone/.next/server/middleware-build-manifest.js +1 -1
- package/dist/web/standalone/.next/server/pages/404.html +1 -1
- package/dist/web/standalone/.next/server/pages/500.html +1 -1
- package/dist/web/standalone/.next/server/server-reference-manifest.json +1 -1
- package/package.json +4 -2
- package/packages/cloud-mcp-gateway/package.json +2 -2
- package/packages/contracts/package.json +1 -1
- package/packages/daemon/package.json +4 -4
- package/packages/gsd-agent-core/dist/agent-session.d.ts +9 -0
- package/packages/gsd-agent-core/dist/agent-session.d.ts.map +1 -1
- package/packages/gsd-agent-core/dist/agent-session.js +32 -0
- package/packages/gsd-agent-core/dist/agent-session.js.map +1 -1
- package/packages/gsd-agent-core/dist/index.d.ts +1 -0
- package/packages/gsd-agent-core/dist/index.d.ts.map +1 -1
- package/packages/gsd-agent-core/dist/index.js +1 -0
- package/packages/gsd-agent-core/dist/index.js.map +1 -1
- package/packages/gsd-agent-core/dist/session/agent-session-compaction.d.ts +2 -0
- package/packages/gsd-agent-core/dist/session/agent-session-compaction.d.ts.map +1 -1
- package/packages/gsd-agent-core/dist/session/agent-session-compaction.js +8 -2
- package/packages/gsd-agent-core/dist/session/agent-session-compaction.js.map +1 -1
- package/packages/gsd-agent-core/dist/session/agent-session-host.d.ts +7 -0
- package/packages/gsd-agent-core/dist/session/agent-session-host.d.ts.map +1 -1
- package/packages/gsd-agent-core/dist/session/agent-session-host.js.map +1 -1
- package/packages/gsd-agent-core/dist/session/agent-session-prompt.d.ts.map +1 -1
- package/packages/gsd-agent-core/dist/session/agent-session-prompt.js +69 -1
- package/packages/gsd-agent-core/dist/session/agent-session-prompt.js.map +1 -1
- package/packages/gsd-agent-core/dist/turn-latency.d.ts +47 -0
- package/packages/gsd-agent-core/dist/turn-latency.d.ts.map +1 -0
- package/packages/gsd-agent-core/dist/turn-latency.js +123 -0
- package/packages/gsd-agent-core/dist/turn-latency.js.map +1 -0
- package/packages/gsd-agent-core/package.json +6 -6
- package/packages/gsd-agent-modes/dist/modes/interactive/components/__prototype__/gsd-widget-prototype.d.ts +21 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/__prototype__/gsd-widget-prototype.d.ts.map +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/__prototype__/gsd-widget-prototype.js +213 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/components/__prototype__/gsd-widget-prototype.js.map +1 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js +20 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/chat-controller.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.js +7 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/controllers/input-controller.js.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-command-handlers.d.ts.map +1 -1
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-command-handlers.js +6 -0
- package/packages/gsd-agent-modes/dist/modes/interactive/interactive-command-handlers.js.map +1 -1
- package/packages/gsd-agent-modes/package.json +7 -7
- package/packages/mcp-server/dist/remote-questions.d.ts.map +1 -1
- package/packages/mcp-server/dist/remote-questions.js +23 -9
- package/packages/mcp-server/dist/remote-questions.js.map +1 -1
- package/packages/mcp-server/dist/workflow-tools.js +2 -2
- package/packages/mcp-server/dist/workflow-tools.js.map +1 -1
- package/packages/mcp-server/package.json +3 -3
- package/packages/native/package.json +1 -1
- package/packages/pi-agent-core/dist/agent-loop.js +38 -0
- package/packages/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/packages/pi-agent-core/dist/agent.d.ts +5 -1
- package/packages/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/agent.js +2 -0
- package/packages/pi-agent-core/dist/agent.js.map +1 -1
- package/packages/pi-agent-core/dist/types.d.ts +3 -0
- package/packages/pi-agent-core/dist/types.d.ts.map +1 -1
- package/packages/pi-agent-core/dist/types.js.map +1 -1
- package/packages/pi-agent-core/package.json +1 -1
- package/packages/pi-ai/dist/api-registry.d.ts +2 -0
- package/packages/pi-ai/dist/api-registry.d.ts.map +1 -1
- package/packages/pi-ai/dist/api-registry.js +23 -0
- package/packages/pi-ai/dist/api-registry.js.map +1 -1
- package/packages/pi-ai/dist/models.generated.d.ts +68 -0
- package/packages/pi-ai/dist/models.generated.d.ts.map +1 -1
- package/packages/pi-ai/dist/models.generated.js +72 -4
- package/packages/pi-ai/dist/models.generated.js.map +1 -1
- package/packages/pi-ai/dist/stream.js +6 -6
- package/packages/pi-ai/dist/stream.js.map +1 -1
- package/packages/pi-ai/package.json +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.d.ts.map +1 -1
- package/packages/pi-coding-agent/dist/core/model-registry.js +2 -2
- package/packages/pi-coding-agent/dist/core/model-registry.js.map +1 -1
- package/packages/pi-coding-agent/package.json +7 -7
- package/packages/pi-tui/package.json +1 -1
- package/packages/rpc-client/package.json +2 -2
- package/pkg/package.json +1 -1
- package/src/resources/extensions/browser-tools/engine/managed-gsd-browser.ts +579 -0
- package/src/resources/extensions/browser-tools/engine/selection.ts +19 -0
- package/src/resources/extensions/browser-tools/extension-manifest.json +2 -2
- package/src/resources/extensions/browser-tools/index.ts +60 -9
- package/src/resources/extensions/browser-tools/package.json +5 -1
- package/src/resources/extensions/browser-tools/tests/browser-engine-selection.test.mjs +35 -0
- package/src/resources/extensions/browser-tools/tests/managed-gsd-browser-tools.test.mjs +33 -0
- package/src/resources/extensions/gsd/auto/orchestrator.ts +0 -1
- package/src/resources/extensions/gsd/auto-dashboard.ts +82 -14
- package/src/resources/extensions/gsd/auto-dispatch.ts +5 -0
- package/src/resources/extensions/gsd/auto-post-unit.ts +28 -2
- package/src/resources/extensions/gsd/auto-prompts.ts +93 -15
- package/src/resources/extensions/gsd/auto-runtime-state.ts +4 -0
- package/src/resources/extensions/gsd/auto-tool-tracking.ts +1 -1
- package/src/resources/extensions/gsd/auto.ts +12 -2
- package/src/resources/extensions/gsd/bootstrap/db-tools.ts +4 -4
- package/src/resources/extensions/gsd/bootstrap/register-hooks.ts +9 -5
- package/src/resources/extensions/gsd/browser-evidence.ts +26 -2
- package/src/resources/extensions/gsd/commands/handlers/ops.ts +2 -2
- package/src/resources/extensions/gsd/commands-handlers.ts +76 -11
- package/src/resources/extensions/gsd/commands-mcp-status.ts +2 -1
- package/src/resources/extensions/gsd/dashboard-overlay.ts +28 -7
- package/src/resources/extensions/gsd/docs/preferences-reference.md +8 -0
- package/src/resources/extensions/gsd/doctor-runtime-checks.ts +2 -2
- package/src/resources/extensions/gsd/escalation.ts +4 -4
- package/src/resources/extensions/gsd/forensics.ts +99 -5
- package/src/resources/extensions/gsd/gsd-db.ts +5 -2
- package/src/resources/extensions/gsd/guided-flow.ts +90 -82
- package/src/resources/extensions/gsd/mcp-project-config.ts +13 -78
- package/src/resources/extensions/gsd/memory-store.ts +4 -1
- package/src/resources/extensions/gsd/post-unit-hooks.ts +14 -1
- package/src/resources/extensions/gsd/preferences-validation.ts +36 -0
- package/src/resources/extensions/gsd/prompt-loader.ts +8 -0
- package/src/resources/extensions/gsd/prompts/forensics.md +61 -1
- package/src/resources/extensions/gsd/prompts/gate-evaluate.md +3 -1
- package/src/resources/extensions/gsd/prompts/parallel-research-slices.md +3 -1
- package/src/resources/extensions/gsd/prompts/plan-slice.md +1 -1
- package/src/resources/extensions/gsd/prompts/reactive-execute.md +3 -1
- package/src/resources/extensions/gsd/prompts/run-uat.md +40 -22
- package/src/resources/extensions/gsd/prompts/validate-milestone.md +3 -3
- package/src/resources/extensions/gsd/rule-registry.ts +558 -58
- package/src/resources/extensions/gsd/rule-types.ts +2 -0
- package/src/resources/extensions/gsd/state.ts +2 -2
- package/src/resources/extensions/gsd/templates/plan.md +3 -1
- package/src/resources/extensions/gsd/tests/auto-dashboard.test.ts +105 -4
- package/src/resources/extensions/gsd/tests/auto-orchestrator.test.ts +37 -0
- package/src/resources/extensions/gsd/tests/browser-evidence.test.ts +142 -0
- package/src/resources/extensions/gsd/tests/complete-milestone-excerpt.test.ts +30 -0
- package/src/resources/extensions/gsd/tests/complete-slice-verification-gate.test.ts +42 -0
- package/src/resources/extensions/gsd/tests/dashboard-overlay.test.ts +45 -0
- package/src/resources/extensions/gsd/tests/deep-planning-mode-dispatch.test.ts +53 -0
- package/src/resources/extensions/gsd/tests/discuss-milestone-structured-questions.test.ts +31 -0
- package/src/resources/extensions/gsd/tests/doctor-runtime-checks.test.ts +27 -0
- package/src/resources/extensions/gsd/tests/escalation.test.ts +16 -27
- package/src/resources/extensions/gsd/tests/forensics-issue-routing.test.ts +20 -0
- package/src/resources/extensions/gsd/tests/forensics-prompt-rendering.test.ts +3 -0
- package/src/resources/extensions/gsd/tests/forensics-tool-scope.test.ts +69 -0
- package/src/resources/extensions/gsd/tests/guided-discuss-milestone-prompt-rendering.test.ts +40 -1
- package/src/resources/extensions/gsd/tests/guided-dispatch-root.test.ts +86 -0
- package/src/resources/extensions/gsd/tests/guided-flow.test.ts +12 -9
- package/src/resources/extensions/gsd/tests/integration/auto-recovery.test.ts +4 -4
- package/src/resources/extensions/gsd/tests/integration/run-uat.test.ts +66 -10
- package/src/resources/extensions/gsd/tests/mcp-project-config.test.ts +32 -0
- package/src/resources/extensions/gsd/tests/mcp-status.test.ts +2 -0
- package/src/resources/extensions/gsd/tests/memory-maintenance.test.ts +39 -8
- package/src/resources/extensions/gsd/tests/new-milestone-discuss-routing.test.ts +3 -3
- package/src/resources/extensions/gsd/tests/plan-slice-prompt.test.ts +9 -0
- package/src/resources/extensions/gsd/tests/post-unit-hooks.test.ts +157 -0
- package/src/resources/extensions/gsd/tests/post-unit-retry-on-orchestrator-bridge.test.ts +179 -0
- package/src/resources/extensions/gsd/tests/preferences.test.ts +29 -0
- package/src/resources/extensions/gsd/tests/prompt-contracts.test.ts +43 -1
- package/src/resources/extensions/gsd/tests/prompt-loader-extension-dir.test.ts +14 -0
- package/src/resources/extensions/gsd/tests/queued-discuss-fast-path.test.ts +7 -8
- package/src/resources/extensions/gsd/tests/rule-registry.test.ts +75 -0
- package/src/resources/extensions/gsd/tests/session-start-footer.test.ts +100 -0
- package/src/resources/extensions/gsd/tests/state-reconciliation-drift.test.ts +139 -0
- package/src/resources/extensions/gsd/tests/tool-invocation-error-loop-break.test.ts +19 -0
- package/src/resources/extensions/gsd/tests/tool-param-optionality.test.ts +7 -1
- package/src/resources/extensions/gsd/tests/validate-milestone-prompt-verification-classes.test.ts +6 -3
- package/src/resources/extensions/gsd/tests/validate-milestone-write-order.test.ts +133 -0
- package/src/resources/extensions/gsd/tests/verification-gate.test.ts +51 -0
- package/src/resources/extensions/gsd/tests/workflow-tool-executors.test.ts +130 -0
- package/src/resources/extensions/gsd/tools/complete-slice.ts +14 -1
- package/src/resources/extensions/gsd/tools/complete-task.ts +20 -2
- package/src/resources/extensions/gsd/tools/validate-milestone.ts +46 -15
- package/src/resources/extensions/gsd/tools/workflow-tool-executors.ts +63 -15
- package/src/resources/extensions/gsd/types.ts +69 -5
- package/src/resources/extensions/gsd/verdict-parser.ts +54 -13
- package/src/resources/extensions/gsd/verification-gate.ts +87 -1
- package/src/resources/extensions/shared/gsd-browser-cli.ts +172 -0
- /package/dist/web/standalone/.next/static/{eRWf-RI9bzbrwEurm_3uI → jBtwT9v1u2lUA3UEOy_ZH}/_buildManifest.js +0 -0
- /package/dist/web/standalone/.next/static/{eRWf-RI9bzbrwEurm_3uI → jBtwT9v1u2lUA3UEOy_ZH}/_ssgManifest.js +0 -0
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { createHash } from "node:crypto";
|
|
2
1
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
3
|
-
import {
|
|
4
|
-
import { basename, resolve } from "node:path";
|
|
2
|
+
import { resolve } from "node:path";
|
|
5
3
|
import { fileURLToPath } from "node:url";
|
|
4
|
+
import { GSD_BROWSER_MCP_SERVER_NAME, resolveBundledGsdBrowserCliPath, resolveGsdBrowserMcpLaunchConfig, } from "../shared/gsd-browser-cli.js";
|
|
6
5
|
import { assertSafeDirectory } from "./validate-directory.js";
|
|
7
6
|
import { detectWorkflowMcpLaunchConfig } from "./workflow-mcp.js";
|
|
8
7
|
export const GSD_WORKFLOW_MCP_SERVER_NAME = "gsd-workflow";
|
|
9
|
-
export
|
|
8
|
+
export { GSD_BROWSER_MCP_SERVER_NAME, resolveBundledGsdBrowserCliPath };
|
|
10
9
|
export function resolveBundledGsdCliPath(env = process.env) {
|
|
11
10
|
const explicit = env.GSD_CLI_PATH?.trim() || env.GSD_BIN_PATH?.trim();
|
|
12
11
|
if (explicit)
|
|
@@ -22,30 +21,6 @@ export function resolveBundledGsdCliPath(env = process.env) {
|
|
|
22
21
|
}
|
|
23
22
|
return null;
|
|
24
23
|
}
|
|
25
|
-
export function resolveBundledGsdBrowserCliPath(env = process.env) {
|
|
26
|
-
const explicit = env.GSD_BROWSER_CLI_PATH?.trim() || env.GSD_BROWSER_BIN_PATH?.trim();
|
|
27
|
-
if (explicit)
|
|
28
|
-
return explicit;
|
|
29
|
-
try {
|
|
30
|
-
const requireFromHere = createRequire(import.meta.url);
|
|
31
|
-
const packageJsonPath = requireFromHere.resolve("@opengsd/gsd-browser/package.json");
|
|
32
|
-
const candidate = resolve(packageJsonPath, "..", "bin", "gsd-browser");
|
|
33
|
-
if (existsSync(candidate))
|
|
34
|
-
return candidate;
|
|
35
|
-
}
|
|
36
|
-
catch {
|
|
37
|
-
// Fall through to path candidates for source/dist layouts.
|
|
38
|
-
}
|
|
39
|
-
const candidates = [
|
|
40
|
-
resolve(fileURLToPath(new URL("../../../../node_modules/@opengsd/gsd-browser/bin/gsd-browser", import.meta.url))),
|
|
41
|
-
resolve(fileURLToPath(new URL("../../../../node_modules/.bin/gsd-browser", import.meta.url))),
|
|
42
|
-
];
|
|
43
|
-
for (const candidate of candidates) {
|
|
44
|
-
if (existsSync(candidate))
|
|
45
|
-
return candidate;
|
|
46
|
-
}
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
24
|
export function buildProjectWorkflowMcpServerConfig(projectRoot, env = process.env) {
|
|
50
25
|
return buildProjectWorkflowMcpServerSpec(projectRoot, env).server;
|
|
51
26
|
}
|
|
@@ -69,68 +44,26 @@ function buildProjectWorkflowMcpServerSpec(projectRoot, env = process.env) {
|
|
|
69
44
|
},
|
|
70
45
|
};
|
|
71
46
|
}
|
|
72
|
-
function parseJsonEnv(env, name) {
|
|
73
|
-
const raw = env[name];
|
|
74
|
-
if (!raw)
|
|
75
|
-
return undefined;
|
|
76
|
-
try {
|
|
77
|
-
return JSON.parse(raw);
|
|
78
|
-
}
|
|
79
|
-
catch {
|
|
80
|
-
throw new Error(`Invalid JSON in ${name}`);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
47
|
function isEnvDisabled(value) {
|
|
84
48
|
if (!value)
|
|
85
49
|
return false;
|
|
86
50
|
const normalized = value.trim().toLowerCase();
|
|
87
51
|
return normalized === "0" || normalized === "false" || normalized === "off";
|
|
88
52
|
}
|
|
89
|
-
function buildBrowserSessionName(projectRoot) {
|
|
90
|
-
const resolvedProjectRoot = resolve(projectRoot);
|
|
91
|
-
const base = basename(resolvedProjectRoot)
|
|
92
|
-
.replace(/[^a-zA-Z0-9._-]+/g, "-")
|
|
93
|
-
.replace(/^-+|-+$/g, "") || "project";
|
|
94
|
-
const hash = createHash("sha1").update(resolvedProjectRoot).digest("hex").slice(0, 8);
|
|
95
|
-
return `gsd-${base}-${hash}`;
|
|
96
|
-
}
|
|
97
53
|
export function buildProjectBrowserMcpServerConfig(projectRoot, env = process.env) {
|
|
98
54
|
return buildProjectBrowserMcpServerSpec(projectRoot, env)?.server ?? null;
|
|
99
55
|
}
|
|
100
56
|
function buildProjectBrowserMcpServerSpec(projectRoot, env = process.env) {
|
|
101
57
|
if (isEnvDisabled(env.GSD_BROWSER_MCP_ENABLED))
|
|
102
58
|
return null;
|
|
103
|
-
const
|
|
104
|
-
const serverName = env.GSD_BROWSER_MCP_NAME?.trim() || GSD_BROWSER_MCP_SERVER_NAME;
|
|
105
|
-
const explicitArgs = parseJsonEnv(env, "GSD_BROWSER_MCP_ARGS");
|
|
106
|
-
const explicitEnv = parseJsonEnv(env, "GSD_BROWSER_MCP_ENV");
|
|
107
|
-
const explicitCommand = env.GSD_BROWSER_MCP_COMMAND?.trim();
|
|
108
|
-
const explicitCliPath = env.GSD_BROWSER_CLI_PATH?.trim() || env.GSD_BROWSER_BIN_PATH?.trim();
|
|
109
|
-
const bundledCliPath = !explicitCommand && !explicitCliPath ? resolveBundledGsdBrowserCliPath(env) : null;
|
|
110
|
-
const command = explicitCommand
|
|
111
|
-
|| explicitCliPath
|
|
112
|
-
|| (bundledCliPath ? process.execPath : undefined)
|
|
113
|
-
|| "gsd-browser";
|
|
114
|
-
const args = Array.isArray(explicitArgs) && explicitArgs.length > 0
|
|
115
|
-
? explicitArgs.map(String)
|
|
116
|
-
: [
|
|
117
|
-
...(bundledCliPath ? [bundledCliPath] : []),
|
|
118
|
-
"mcp",
|
|
119
|
-
"--session",
|
|
120
|
-
buildBrowserSessionName(resolvedProjectRoot),
|
|
121
|
-
"--identity-scope",
|
|
122
|
-
"project",
|
|
123
|
-
"--identity-project",
|
|
124
|
-
resolvedProjectRoot,
|
|
125
|
-
];
|
|
126
|
-
const cwd = env.GSD_BROWSER_MCP_CWD?.trim() || resolvedProjectRoot;
|
|
59
|
+
const launch = resolveGsdBrowserMcpLaunchConfig(projectRoot, env);
|
|
127
60
|
return {
|
|
128
|
-
serverName,
|
|
61
|
+
serverName: launch.serverName,
|
|
129
62
|
server: {
|
|
130
|
-
command,
|
|
131
|
-
args,
|
|
132
|
-
cwd,
|
|
133
|
-
...(
|
|
63
|
+
command: launch.command,
|
|
64
|
+
args: launch.args,
|
|
65
|
+
cwd: launch.cwd,
|
|
66
|
+
...(launch.env ? { env: launch.env } : {}),
|
|
134
67
|
},
|
|
135
68
|
};
|
|
136
69
|
}
|
|
@@ -614,7 +614,10 @@ export function decayStaleMemories(thresholdUnits = 20) {
|
|
|
614
614
|
return []; // not enough processed units yet
|
|
615
615
|
const cutoff = row['processed_at'];
|
|
616
616
|
const affected = adapter.prepare(`SELECT id FROM memories
|
|
617
|
-
WHERE superseded_by IS NULL
|
|
617
|
+
WHERE superseded_by IS NULL
|
|
618
|
+
AND updated_at < :cutoff
|
|
619
|
+
AND confidence > 0.1
|
|
620
|
+
AND (structured_fields IS NULL OR structured_fields NOT LIKE '%"sourceDecisionId"%')`).all({ ':cutoff': cutoff }).map((r) => r['id']);
|
|
618
621
|
decayMemoriesBefore(cutoff, new Date().toISOString());
|
|
619
622
|
return affected;
|
|
620
623
|
}
|
|
@@ -19,6 +19,15 @@ export function isRetryPending() {
|
|
|
19
19
|
export function consumeRetryTrigger() {
|
|
20
20
|
return getOrCreateRegistry().consumeRetryTrigger();
|
|
21
21
|
}
|
|
22
|
+
export function consumeHookFailure() {
|
|
23
|
+
return getOrCreateRegistry().consumeHookFailure();
|
|
24
|
+
}
|
|
25
|
+
export function isGateBlockPending() {
|
|
26
|
+
return getOrCreateRegistry().isGateBlockPending();
|
|
27
|
+
}
|
|
28
|
+
export function consumeGateBlock() {
|
|
29
|
+
return getOrCreateRegistry().consumeGateBlock();
|
|
30
|
+
}
|
|
22
31
|
export function resetHookState() {
|
|
23
32
|
getOrCreateRegistry().resetState();
|
|
24
33
|
}
|
|
@@ -15,6 +15,14 @@ const VALID_UOK_TURN_ACTIONS = new Set([
|
|
|
15
15
|
"snapshot",
|
|
16
16
|
"status-only",
|
|
17
17
|
]);
|
|
18
|
+
const VALID_POST_UNIT_HOOK_CRITICALITIES = new Set(["advisory", "blocking"]);
|
|
19
|
+
const VALID_POST_UNIT_HOOK_ON_BLOCK_ACTIONS = new Set([
|
|
20
|
+
"retry-unit",
|
|
21
|
+
"retry-task",
|
|
22
|
+
"queue-task",
|
|
23
|
+
"queue-slice",
|
|
24
|
+
"pause",
|
|
25
|
+
]);
|
|
18
26
|
export function validatePreferences(preferences) {
|
|
19
27
|
const errors = [];
|
|
20
28
|
const warnings = [];
|
|
@@ -474,9 +482,40 @@ export function validatePreferences(preferences) {
|
|
|
474
482
|
if (typeof hook.artifact === "string" && hook.artifact.trim()) {
|
|
475
483
|
validHook.artifact = hook.artifact.trim();
|
|
476
484
|
}
|
|
485
|
+
if (hook.criticality !== undefined) {
|
|
486
|
+
const criticality = typeof hook.criticality === "string" ? hook.criticality.trim() : "";
|
|
487
|
+
if (VALID_POST_UNIT_HOOK_CRITICALITIES.has(criticality)) {
|
|
488
|
+
validHook.criticality = criticality;
|
|
489
|
+
}
|
|
490
|
+
else {
|
|
491
|
+
errors.push(`post_unit_hooks "${name}" invalid criticality: ${String(hook.criticality)}`);
|
|
492
|
+
}
|
|
493
|
+
}
|
|
477
494
|
if (typeof hook.retry_on === "string" && hook.retry_on.trim()) {
|
|
478
495
|
validHook.retry_on = hook.retry_on.trim();
|
|
479
496
|
}
|
|
497
|
+
if (hook.on_block !== undefined) {
|
|
498
|
+
if (!hook.on_block || typeof hook.on_block !== "object") {
|
|
499
|
+
errors.push(`post_unit_hooks "${name}" on_block must be an object`);
|
|
500
|
+
}
|
|
501
|
+
else {
|
|
502
|
+
const onBlock = hook.on_block;
|
|
503
|
+
const action = typeof onBlock.action === "string" ? onBlock.action.trim() : "";
|
|
504
|
+
if (!VALID_POST_UNIT_HOOK_ON_BLOCK_ACTIONS.has(action)) {
|
|
505
|
+
errors.push(`post_unit_hooks "${name}" invalid on_block action: ${String(onBlock.action)}`);
|
|
506
|
+
}
|
|
507
|
+
else {
|
|
508
|
+
validHook.on_block = { action: action };
|
|
509
|
+
if (typeof onBlock.artifact === "string" && onBlock.artifact.trim()) {
|
|
510
|
+
validHook.on_block.artifact = onBlock.artifact.trim();
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
if (validHook.criticality === "blocking" && !validHook.artifact) {
|
|
516
|
+
errors.push(`post_unit_hooks "${name}" criticality blocking requires artifact`);
|
|
517
|
+
continue;
|
|
518
|
+
}
|
|
480
519
|
if (typeof hook.agent === "string" && hook.agent.trim()) {
|
|
481
520
|
validHook.agent = hook.agent.trim();
|
|
482
521
|
}
|
|
@@ -26,9 +26,16 @@ function hasRequiredExtensionAssets(rootDir, exists = existsSync) {
|
|
|
26
26
|
return (exists(join(rootDir, "prompts")) &&
|
|
27
27
|
exists(join(rootDir, "templates", "task-summary.md")));
|
|
28
28
|
}
|
|
29
|
+
function isSourceExtensionDir(moduleDir) {
|
|
30
|
+
return moduleDir.replaceAll("\\", "/").endsWith("/src/resources/extensions/gsd");
|
|
31
|
+
}
|
|
29
32
|
export function resolveExtensionDirFromCandidates(moduleDir, agentGsdDir, exists = existsSync) {
|
|
30
33
|
const moduleUsable = hasRequiredExtensionAssets(moduleDir, exists);
|
|
31
34
|
const agentUsable = hasRequiredExtensionAssets(agentGsdDir, exists);
|
|
35
|
+
// Source checkouts must use their own prompt tree. Otherwise local tests and
|
|
36
|
+
// dev runs can silently render stale prompts from ~/.gsd/agent/extensions/gsd.
|
|
37
|
+
if (moduleUsable && isSourceExtensionDir(moduleDir))
|
|
38
|
+
return moduleDir;
|
|
32
39
|
// Prefer the user-local extension tree when both are valid. This avoids
|
|
33
40
|
// leaking npm/global-install paths into prompts on Windows.
|
|
34
41
|
if (agentUsable)
|
|
@@ -12,6 +12,8 @@ Debug GSD itself. Trace the symptom to root cause in current source and produce
|
|
|
12
12
|
|
|
13
13
|
GSD extension source: `{{gsdSourceDir}}`
|
|
14
14
|
|
|
15
|
+
{{toolingSection}}
|
|
16
|
+
|
|
15
17
|
### Source Map by Domain
|
|
16
18
|
|
|
17
19
|
| Domain | Files |
|
|
@@ -101,7 +103,7 @@ Then **offer GitHub issue creation**: "Would you like me to create a GitHub issu
|
|
|
101
103
|
|
|
102
104
|
**CRITICAL:** The `github_issues` tool targets only the current user's repository and has no `repo` parameter. Use `gh issue create --repo open-gsd/gsd-pi` via `bash`. Do NOT use the `github_issues` tool.
|
|
103
105
|
|
|
104
|
-
If yes, create using the `bash` tool:
|
|
106
|
+
If yes and `bash` is available, create using the `bash` tool:
|
|
105
107
|
|
|
106
108
|
```bash
|
|
107
109
|
ISSUE_BODY_FILE="${TMPDIR:-${TEMP:-${TMP:-.}}}/gsd-forensic-issue.md"
|
|
@@ -142,6 +144,64 @@ TYPE_ID=$(gh api graphql -f query='{ repository(owner:"open-gsd",name:"gsd-pi")
|
|
|
142
144
|
gh api graphql -f query='mutation { updateIssue(input:{id:"'"$ISSUE_ID"'",issueTypeId:"'"$TYPE_ID"'"}) { issue { number } } }'
|
|
143
145
|
```
|
|
144
146
|
|
|
147
|
+
If `bash` is unavailable, do not attempt `bash`, `write`, or `github_issues` tool calls. Instead, provide exactly one paste-once shell script for the user to run locally and say that the live duplicate check / issue creation must be run by the user:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
KEYWORDS="..."
|
|
151
|
+
echo "Searching closed issues for possible duplicates..."
|
|
152
|
+
gh issue list --repo open-gsd/gsd-pi --state closed --search "$KEYWORDS" --limit 20
|
|
153
|
+
|
|
154
|
+
echo "Searching open PRs for possible fixes..."
|
|
155
|
+
gh pr list --repo open-gsd/gsd-pi --state open --search "$KEYWORDS" --limit 10
|
|
156
|
+
|
|
157
|
+
echo "Searching merged PRs for possible fixes..."
|
|
158
|
+
gh pr list --repo open-gsd/gsd-pi --state merged --search "$KEYWORDS" --limit 10
|
|
159
|
+
|
|
160
|
+
read -r -p "Review the duplicate search above. Continue filing a new issue? [y/N] " SHOULD_FILE
|
|
161
|
+
case "$SHOULD_FILE" in
|
|
162
|
+
y|Y|yes|YES) ;;
|
|
163
|
+
*) echo "Issue filing aborted."; exit 0 ;;
|
|
164
|
+
esac
|
|
165
|
+
|
|
166
|
+
ISSUE_BODY_FILE="${TMPDIR:-${TEMP:-${TMP:-.}}}/gsd-forensic-issue.md"
|
|
167
|
+
cat > "$ISSUE_BODY_FILE" << 'GSD_ISSUE_BODY'
|
|
168
|
+
## Problem
|
|
169
|
+
[1-2 sentence summary]
|
|
170
|
+
|
|
171
|
+
## Root Cause
|
|
172
|
+
[Specific file:line in GSD source, with code snippet showing the bug]
|
|
173
|
+
|
|
174
|
+
## Expected Behavior
|
|
175
|
+
[What the code should do instead — concrete fix suggestion]
|
|
176
|
+
|
|
177
|
+
## Environment
|
|
178
|
+
- GSD version: [from report]
|
|
179
|
+
- Model: [from report]
|
|
180
|
+
- Unit: [type/id that failed]
|
|
181
|
+
|
|
182
|
+
## Reproduction Context
|
|
183
|
+
[Phase, milestone, slice, what was happening when it failed]
|
|
184
|
+
|
|
185
|
+
## Forensic Evidence
|
|
186
|
+
[Key anomalies, error traces, relevant tool call sequences from the report]
|
|
187
|
+
|
|
188
|
+
---
|
|
189
|
+
*Auto-generated by `/gsd forensics`*
|
|
190
|
+
GSD_ISSUE_BODY
|
|
191
|
+
|
|
192
|
+
ISSUE_URL=$(gh issue create --repo open-gsd/gsd-pi \
|
|
193
|
+
--title "..." \
|
|
194
|
+
--label "auto-generated" \
|
|
195
|
+
--body-file "$ISSUE_BODY_FILE")
|
|
196
|
+
rm -f "$ISSUE_BODY_FILE"
|
|
197
|
+
|
|
198
|
+
ISSUE_NUM=$(echo "$ISSUE_URL" | grep -oE '[0-9]+$')
|
|
199
|
+
ISSUE_ID=$(gh api graphql -f query='{ repository(owner:"open-gsd",name:"gsd-pi") { issue(number:'"$ISSUE_NUM"') { id } } }' --jq '.data.repository.issue.id')
|
|
200
|
+
TYPE_ID=$(gh api graphql -f query='{ repository(owner:"open-gsd",name:"gsd-pi") { issueTypes(first:20) { nodes { id name } } } }' --jq '.data.repository.issueTypes.nodes[] | select(.name=="Bug") | .id')
|
|
201
|
+
gh api graphql -f query='mutation { updateIssue(input:{id:"'"$ISSUE_ID"'",issueTypeId:"'"$TYPE_ID"'"}) { issue { number } } }'
|
|
202
|
+
echo "$ISSUE_URL"
|
|
203
|
+
```
|
|
204
|
+
|
|
145
205
|
### Redaction Rules (CRITICAL)
|
|
146
206
|
|
|
147
207
|
Before creating the issue, you MUST:
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
You are evaluating **quality gates in parallel** for this slice. Each gate is an independent question that must be answered before task execution begins. Use the `subagent` tool to dispatch all gate evaluations simultaneously.
|
|
10
10
|
|
|
11
|
+
**Tool call format:** Call `subagent` with `tasks: [...]` as a **native JSON array** — one object per gate. Do NOT JSON.stringify the array into a string; the tool validates that `tasks` is an array, and a serialized string will be rejected with "must be array".
|
|
12
|
+
|
|
11
13
|
## Slice Plan Context
|
|
12
14
|
|
|
13
15
|
{{slicePlanContent}}
|
|
@@ -20,7 +22,7 @@ You are evaluating **quality gates in parallel** for this slice. Each gate is an
|
|
|
20
22
|
|
|
21
23
|
## Execution Protocol
|
|
22
24
|
|
|
23
|
-
1. **Dispatch all gates** using `subagent` in parallel mode. Each subagent prompt is provided below.
|
|
25
|
+
1. **Dispatch all gates** using `subagent` in parallel mode. Call `subagent` with `tasks: [{ agent: "tester", task: "<prompt>" }, ...]` — one object per gate. Each subagent prompt is provided below.
|
|
24
26
|
Pass `tasks` as a **JSON array**, not a string. Example shape:
|
|
25
27
|
|
|
26
28
|
```json
|
|
@@ -12,9 +12,11 @@ You are dispatching parallel research agents for **{{sliceCount}} slices** in mi
|
|
|
12
12
|
|
|
13
13
|
Dispatch ALL slices simultaneously using the `subagent` tool in **parallel mode**. Each subagent will independently research its slice and write a RESEARCH file.
|
|
14
14
|
|
|
15
|
+
**Tool call format:** Call `subagent` with `tasks: [...]` as a **native JSON array** — one object per slice. Do NOT JSON.stringify the array into a string; the tool validates that `tasks` is an array, and a serialized string will be rejected with "must be array".
|
|
16
|
+
|
|
15
17
|
## Execution Protocol
|
|
16
18
|
|
|
17
|
-
1. Call `subagent` with `tasks: [...]` containing one entry per slice below
|
|
19
|
+
1. Call `subagent` with `tasks: [{ agent: "scout", task: "<prompt>" }, ...]` containing one entry per slice below
|
|
18
20
|
2. Wait for ALL subagents to complete
|
|
19
21
|
3. Verify each slice's RESEARCH file was written (check `.gsd/milestones/{{mid}}/slices/<slice-id>/`)
|
|
20
22
|
4. If a subagent failed to write its RESEARCH file, retry it **once** individually
|
|
@@ -43,7 +43,7 @@ If slice research is inlined, trust its architectural findings, but verify every
|
|
|
43
43
|
5. Define slice verification before tasks. Non-trivial slices need real tests or executable assertions; boundary contracts need contract-exercising checks. Tests must not read .gitignore/gitignored paths such as `.gsd/`, `.planning/`, or `.audits/`.
|
|
44
44
|
6. Include Threat Surface (Q3), Requirement Impact (Q4), proof level, observability, integration closure, Failure Modes (Q5), Load Profile (Q6), and Negative Tests (Q7) only where applicable.
|
|
45
45
|
7. Right-size tasks. Simple slices can be one task; split only when context, ownership, or verification boundaries justify it.
|
|
46
|
-
8. Task `verify` commands must be safe, simple commands. Do not use shell pipes, redirects, semicolons, backticks, command substitution, output trimming, or grep regex alternation with `|`. If multiple checks are needed, create a small test file and run it with `node --test` or a package test script, or use separate simple commands joined only with `&&`.
|
|
46
|
+
8. Task `verify` commands must be safe, simple commands. Do not use shell pipes, redirects, semicolons, backticks, command substitution, output trimming, or grep regex alternation with `|`. If multiple checks are needed, create a small test file and run it with `node --test` or a package test script, or use separate simple commands joined only with `&&`. For absence checks, verify a pattern does not exist with `! grep -q 'pattern' file` or `! rg -q 'pattern' file`; do not use `grep -c` or `rg -c` to assert zero matches because count commands exit 1 when they find zero matches, and the verification gate treats that as failure.
|
|
47
47
|
9. Each task needs the exact `gsd_plan_slice.tasks[]` shape: `taskId`, `title`, `description`, `estimate`, `files`, `verify`, `inputs`, `expectedOutput`, and optional `observabilityImpact`. `description` should contain the Why / Do / Done-when narrative. `files`, `inputs`, and `expectedOutput` must be JSON arrays of strings, even when there is only one path (for example, `"inputs": ["src/index.ts"]`, never `"inputs": "src/index.ts"`). Use paths relative to `{{workingDirectory}}`; do not put absolute paths to the original checkout or any directory outside `{{workingDirectory}}` in `files`, `inputs`, `expectedOutput`, or verification commands. **`expectedOutput` must only list files the task actually creates or overwrites on disk.** Do NOT include files the task merely reads, verifies, or tests — those belong only in `inputs`. If a task is a pure verification or test task that produces no new files, `expectedOutput` may be `[]` or limited to test-result artifacts (e.g. a log or assertion output). A file that does not yet exist on disk and is needed as an `input` must be produced by an earlier task's `expectedOutput` — if no prior task creates it, add a task before this one that does.
|
|
48
48
|
10. Persist with `gsd_plan_slice` using `milestoneId`, `sliceId`, `goal`, optional `successCriteria`/`proofLevel`/`integrationClosure`/`observabilityImpact`, and `tasks`. `gsd_plan_slice` handles task persistence transactionally and renders `{{outputPath}}` plus task plans; do not call `gsd_plan_task`. The DB-backed tool is the canonical write path. Do **not** rely on direct `PLAN.md` writes as the source of truth.
|
|
49
49
|
11. Self-audit before finishing: goal/demo closure, requirement coverage, deliverable coverage audit (cross-check every file listed in CONTEXT.md `## Scope` / `### In Scope` against task `files` or `expectedOutput`), locked decisions, concrete paths, dependency order, wiring, scope size, proof truthfulness, feature completeness, and quality gates. Quality gates: non-trivial slices/tasks include specific Q3-Q7 coverage where applicable.
|
|
@@ -10,6 +10,8 @@ You are executing **multiple tasks in parallel** for this slice. The task graph
|
|
|
10
10
|
|
|
11
11
|
**Critical rule:** Use the `subagent` tool in **parallel mode** to dispatch all ready tasks simultaneously. Each subagent gets a task-specific execution packet (task plan + dependency carry-forward + completion contract) and is responsible for its own implementation, verification, task summary, and completion tool calls. 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
|
+
**Tool call format:** Call `subagent` with `tasks: [...]` as a **native JSON array** — one object per ready task. Do NOT JSON.stringify the array into a string; the tool validates that `tasks` is an array, and a serialized string will be rejected with "must be array".
|
|
14
|
+
|
|
13
15
|
## Task Dependency Graph
|
|
14
16
|
|
|
15
17
|
{{graphContext}}
|
|
@@ -22,7 +24,7 @@ You are executing **multiple tasks in parallel** for this slice. The task graph
|
|
|
22
24
|
|
|
23
25
|
## Execution Protocol
|
|
24
26
|
|
|
25
|
-
1. **Dispatch all ready tasks** using `subagent` in parallel mode. Each subagent prompt is provided below.
|
|
27
|
+
1. **Dispatch all ready tasks** using `subagent` in parallel mode. Call `subagent` with `tasks: [{ agent: "worker", task: "<prompt>" }, ...]` — one object per ready task. Each subagent prompt is provided below.
|
|
26
28
|
2. **Wait for all subagents** to complete.
|
|
27
29
|
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
30
|
4. **Do not rewrite successful task summaries or duplicate completion tool calls.** Treat a subagent-written summary as authoritative for that task.
|
|
@@ -63,35 +63,53 @@ After running all checks, compute the **overall verdict**:
|
|
|
63
63
|
- `FAIL` — one or more automatable checks failed
|
|
64
64
|
- `PARTIAL` — one or more automatable checks were skipped or returned inconclusive results (not the same as `NEEDS-HUMAN` — use PARTIAL only when the agent itself could not determine pass/fail for a check it was supposed to automate)
|
|
65
65
|
|
|
66
|
-
Call `
|
|
66
|
+
Call `gsd_uat_result_save` once after all checks are complete. The tool computes the assessment path, persists to DB/disk, saves attempt history, and saves the aggregate UAT gate.
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
sliceId: {{sliceId}}
|
|
71
|
-
uatType: {{uatType}}
|
|
72
|
-
verdict: PASS | FAIL | PARTIAL
|
|
73
|
-
date: <ISO 8601 timestamp>
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
# UAT Result — {{sliceId}}
|
|
77
|
-
|
|
78
|
-
## Checks
|
|
68
|
+
Pass these top-level fields:
|
|
79
69
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
70
|
+
```ts
|
|
71
|
+
milestoneId: "{{milestoneId}}",
|
|
72
|
+
sliceId: "{{sliceId}}",
|
|
73
|
+
uatType: "{{uatType}}",
|
|
74
|
+
verdict: "PASS" | "FAIL" | "PARTIAL",
|
|
75
|
+
notes: "<one sentence overall verdict rationale>",
|
|
76
|
+
```
|
|
87
77
|
|
|
88
|
-
|
|
78
|
+
Use this exact `presentation` shape in the save call so the audit can verify the run-uat tool surface without retrying missing fields one by one:
|
|
79
|
+
|
|
80
|
+
```ts
|
|
81
|
+
presentation: {
|
|
82
|
+
surface: "mcp",
|
|
83
|
+
presentedTools: [
|
|
84
|
+
"gsd_uat_exec",
|
|
85
|
+
"gsd_uat_result_save",
|
|
86
|
+
"gsd_resume",
|
|
87
|
+
"gsd_milestone_status",
|
|
88
|
+
"gsd_journal_query",
|
|
89
|
+
],
|
|
90
|
+
blockedTools: [
|
|
91
|
+
{ name: "gsd_exec", reason: "forbidden during run-uat" },
|
|
92
|
+
{ name: "gsd_summary_save", reason: "forbidden during run-uat" },
|
|
93
|
+
{ name: "gsd_save_gate_result", reason: "forbidden during run-uat" },
|
|
94
|
+
],
|
|
95
|
+
}
|
|
96
|
+
```
|
|
89
97
|
|
|
90
|
-
|
|
98
|
+
Pass `checks` with this logical shape:
|
|
99
|
+
|
|
100
|
+
```ts
|
|
101
|
+
checks: [{
|
|
102
|
+
id: "<stable check id>",
|
|
103
|
+
description: "<check description from the UAT file>",
|
|
104
|
+
mode: "artifact" | "runtime" | "browser" | "human-follow-up",
|
|
105
|
+
result: "PASS" | "FAIL" | "NEEDS-HUMAN",
|
|
106
|
+
evidence: [{ kind: "gsd_uat_exec", ref: "<evidence id>" }],
|
|
107
|
+
notes: "<observed output, evidence, reason, or manual follow-up>",
|
|
108
|
+
}]
|
|
91
109
|
```
|
|
92
110
|
|
|
93
111
|
---
|
|
94
112
|
|
|
95
|
-
**You MUST call `
|
|
113
|
+
**You MUST call `gsd_uat_result_save` before finishing. Do not write the assessment file directly, and do not call `gsd_summary_save` as a substitute.**
|
|
96
114
|
|
|
97
115
|
When done, say: "UAT {{sliceId}} complete."
|
|
@@ -33,7 +33,7 @@ Prompt: "Review milestone {{milestoneId}} requirements coverage. Working directo
|
|
|
33
33
|
Prompt: "Review milestone {{milestoneId}} cross-slice integration. Working directory: {{workingDirectory}}. Read `{{roadmapPath}}` and find the boundary map (produces/consumes contracts). For each boundary, confirm producer SUMMARY produced the artifact and consumer SUMMARY consumed it. Output table: Boundary | Producer Summary | Consumer Summary | Status. End with one-line verdict: PASS if all boundaries honored, NEEDS-ATTENTION if any gaps."
|
|
34
34
|
|
|
35
35
|
**Reviewer C - Assessment & Acceptance Criteria**
|
|
36
|
-
Prompt: "Review milestone {{milestoneId}} assessment evidence and acceptance criteria. Working directory: {{workingDirectory}}. Read `.gsd/milestones/{{milestoneId}}/{{milestoneId}}-CONTEXT.md` for criteria. Check slice SUMMARY and ASSESSMENT files under `.gsd/milestones/{{milestoneId}}/slices/`; UAT files are specs, not evidence. Verify each criterion maps to passing evidence. Then review inlined
|
|
36
|
+
Prompt: "Review milestone {{milestoneId}} assessment evidence and acceptance criteria. Working directory: {{workingDirectory}}. Read `.gsd/milestones/{{milestoneId}}/{{milestoneId}}-CONTEXT.md` for criteria. Check slice SUMMARY and ASSESSMENT files under `.gsd/milestones/{{milestoneId}}/slices/`; UAT files are specs, not evidence. Verify each criterion maps to passing evidence. Then review the inlined `Verification Classes (from planning)` table. For every planned row in that table, output a `Verification Classes` table with columns `Class | Planned Check | Evidence | Verdict`. Preserve every planned non-empty class row; do not summarize, rename, combine, or omit planned classes. The first cell of each row must be exactly `Contract`, `Integration`, `Operational`, or `UAT` when that class is present in planning. If a planned class lacks evidence, still include its canonical row and mark the verdict NEEDS-ATTENTION or FAIL. If a planned browser/UAT class has no ASSESSMENT with browser/runtime actions and assertions, return NEEDS-ATTENTION. If no verification classes were planned, say that explicitly. Output sections `Acceptance Criteria` with checklist `[ ] Criterion | Evidence`, and `Verification Classes` with the table. End with one-line verdict: PASS if all criteria and classes are covered by evidence, NEEDS-ATTENTION if gaps exist."
|
|
37
37
|
|
|
38
38
|
### Step 2 - Synthesize Findings
|
|
39
39
|
|
|
@@ -71,8 +71,8 @@ reviewers: 3
|
|
|
71
71
|
<if verdict is not pass: specific actions required>
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
Call `gsd_validate_milestone` with the camelCase fields `milestoneId`, `verdict`, `remediationRound`, `successCriteriaChecklist`, `sliceDeliveryAudit`, `crossSliceIntegration`, `requirementCoverage`, `verdictRationale`, and `remediationPlan` when needed. If
|
|
75
|
-
|
|
74
|
+
Call `gsd_validate_milestone` with the camelCase fields `milestoneId`, `verdict`, `remediationRound`, `successCriteriaChecklist`, `sliceDeliveryAudit`, `crossSliceIntegration`, `requirementCoverage`, `verdictRationale`, and `remediationPlan` when needed. If planning included verification classes, pass a complete canonical table in `verificationClasses`.
|
|
75
|
+
Set `verificationClasses` to the `Verification Classes` subsection from Reviewer C. It must include one canonical row for every non-empty planned class from `Verification Classes (from planning)`: `Contract`, `Integration`, `Operational`, and/or `UAT`. If Reviewer C omitted a planned class, reconstruct the missing row from the planning table, set Evidence to the gap, and use NEEDS-ATTENTION or FAIL. Do not call `gsd_validate_milestone` with a partial `verificationClasses` table.
|
|
76
76
|
|
|
77
77
|
**DB access safety:** Do NOT query `.gsd/gsd.db` directly via `sqlite3` or `node -e require('better-sqlite3')` - the engine owns the WAL connection. Use `gsd_milestone_status` for milestone and slice state. Data is already inlined or available via `gsd_*` tools. Direct DB access risks WAL corruption and bypasses validation.
|
|
78
78
|
|