pi-gsd 1.9.2 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gsd/extensions/pi-gsd-hooks.ts +47 -0
- package/dist/pi-gsd-tools.js +82 -82
- package/package.json +1 -1
- package/.gsd/harnesses/pi/get-shit-done/bin/gsd-tools.cjs +0 -974
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/commands.cjs +0 -959
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/config.cjs +0 -442
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/core.cjs +0 -1646
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/frontmatter.cjs +0 -336
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/init.cjs +0 -1459
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/milestone.cjs +0 -252
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/model-profiles.cjs +0 -331
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/phase.cjs +0 -888
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/profile-output.cjs +0 -952
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/profile-pipeline.cjs +0 -539
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/roadmap.cjs +0 -329
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/security.cjs +0 -382
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/state.cjs +0 -1031
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/template.cjs +0 -222
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/uat.cjs +0 -282
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/verify.cjs +0 -888
- package/.gsd/harnesses/pi/get-shit-done/bin/lib/workstream.cjs +0 -491
- package/.gsd/harnesses/pi/get-shit-done/commands/gsd/workstreams.md +0 -63
|
@@ -81,6 +81,53 @@ const syncReferenceToCore = (cwd: string, ref: string[]): void => {
|
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
export default function (pi: ExtensionAPI) {
|
|
84
|
+
// ── before_agent_start: inject @file contents into the prompt ────────────
|
|
85
|
+
// Replaces @.pi/gsd/... references with actual file contents so the LLM
|
|
86
|
+
// gets the full context in the first message. No tool calls, no token
|
|
87
|
+
// waste, provider-agnostic.
|
|
88
|
+
pi.on("before_agent_start", async (event, ctx) => {
|
|
89
|
+
const prompt = event.prompt;
|
|
90
|
+
if (!prompt) return undefined;
|
|
91
|
+
|
|
92
|
+
// Match @.pi/gsd/... and @.planning/... file references
|
|
93
|
+
const fileRefPattern = /@(\.pi\/gsd\/[^\s]+|\.planning\/[^\s]+)/g;
|
|
94
|
+
const refs = [...prompt.matchAll(fileRefPattern)];
|
|
95
|
+
if (refs.length === 0) return undefined;
|
|
96
|
+
|
|
97
|
+
const injected: string[] = [];
|
|
98
|
+
const failed: string[] = [];
|
|
99
|
+
for (const match of refs) {
|
|
100
|
+
const relPath = match[1];
|
|
101
|
+
const absPath = join(ctx.cwd, relPath);
|
|
102
|
+
try {
|
|
103
|
+
if (existsSync(absPath)) {
|
|
104
|
+
const content = readFileSync(absPath, "utf8");
|
|
105
|
+
injected.push(`<!-- @${relPath} -->\n${content}\n<!-- /@${relPath} -->`);
|
|
106
|
+
} else {
|
|
107
|
+
failed.push(relPath);
|
|
108
|
+
}
|
|
109
|
+
} catch {
|
|
110
|
+
failed.push(relPath);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (failed.length > 0) {
|
|
115
|
+
ctx.ui.notify(
|
|
116
|
+
`❌ GSD context injection failed — missing files:\n${failed.map((f) => ` • ${f}`).join("\n")}\n\nCheck that .pi/gsd/ symlink exists and points to the harness.`,
|
|
117
|
+
"error",
|
|
118
|
+
);
|
|
119
|
+
return { abort: true };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return {
|
|
123
|
+
message: {
|
|
124
|
+
customType: "pi-gsd-context",
|
|
125
|
+
content: injected.join("\n\n"),
|
|
126
|
+
display: false,
|
|
127
|
+
},
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
|
|
84
131
|
// ── session_start: GSD update check ──────────────────────────────────────
|
|
85
132
|
pi.on("session_start", async (_event, ctx) => {
|
|
86
133
|
// Ensure harness files are reachable via .pi/gsd/ symlink
|