fix: update all .pi/ paths to .gsd/

This commit is contained in:
Lex Christopherson 2026-03-11 01:36:03 -06:00
parent 67edb120d4
commit 1c714e09e3
10 changed files with 38 additions and 38 deletions

View file

@ -2,7 +2,7 @@
# S04 verification — npm pack tarball install smoke test
# Checks: dist integrity, GSD_BUNDLED_EXTENSION_PATHS, prepublishOnly,
# npm pack dry-run, tarball install, binary exists, launch (no extension
# errors, "gsd" branding), ~/.pi/ untouched, non-TTY warning/no exit 1.
# errors, "gsd" branding), ~/.gsd/ untouched, non-TTY warning/no exit 1.
set -uo pipefail
@ -13,8 +13,8 @@ fail() { echo " FAIL: $1"; FAIL=1; }
SMOKE_PREFIX=/tmp/gsd-smoke-prefix
TARBALL=""
# Capture ~/.pi/agent/sessions/ count before any smoke runs (for Check 9)
PI_SESSIONS_BEFORE=$(ls ~/.pi/agent/sessions/ 2>/dev/null | wc -l | tr -d ' ')
# Capture ~/.gsd/agent/sessions/ count before any smoke runs (for Check 9)
PI_SESSIONS_BEFORE=$(ls ~/.gsd/agent/sessions/ 2>/dev/null | wc -l | tr -d ' ')
cleanup() {
rm -rf "$SMOKE_PREFIX"
@ -186,17 +186,17 @@ fi
rm -f "$smoke_out"
echo ""
echo "--- ~/.pi/ isolation ---"
echo "--- ~/.gsd/ isolation ---"
# ----------------------------------------------------------------
# Check 9 — ~/.pi/ session count unchanged before/after smoke run
# Check 9 — ~/.gsd/ session count unchanged before/after smoke run
# PI_SESSIONS_BEFORE captured at script start (before any binary invocation).
# ----------------------------------------------------------------
pi_after=$(ls ~/.pi/agent/sessions/ 2>/dev/null | wc -l | tr -d ' ')
pi_after=$(ls ~/.gsd/agent/sessions/ 2>/dev/null | wc -l | tr -d ' ')
if [ "$PI_SESSIONS_BEFORE" = "$pi_after" ]; then
pass "9 — ~/.pi/agent/sessions/ count unchanged (${pi_after} sessions before and after)"
pass "9 — ~/.gsd/agent/sessions/ count unchanged (${pi_after} sessions before and after)"
else
fail "9 — ~/.pi/agent/sessions/ count changed: was ${PI_SESSIONS_BEFORE}, now ${pi_after}"
fail "9 — ~/.gsd/agent/sessions/ count changed: was ${PI_SESSIONS_BEFORE}, now ${pi_after}"
fi
echo ""

View file

@ -43,7 +43,7 @@ if (!existsSync(appRoot)) {
)
}
// GSD_CODING_AGENT_DIR — tells pi's getAgentDir() to return ~/.gsd/agent/ instead of ~/.pi/agent/
// GSD_CODING_AGENT_DIR — tells pi's getAgentDir() to return ~/.gsd/agent/ instead of ~/.gsd/agent/
process.env.GSD_CODING_AGENT_DIR = agentDir
// NODE_PATH — make gsd's own node_modules available to extensions loaded via jiti.

View file

@ -132,7 +132,7 @@ auto_supervisor: {}
Project-specific guidance for skill selection and execution preferences.
See \`~/.pi/agent/extensions/gsd/docs/preferences-reference.md\` for full field documentation and examples.
See \`~/.gsd/agent/extensions/gsd/docs/preferences-reference.md\` for full field documentation and examples.
## Fields

View file

@ -107,7 +107,7 @@ export interface SkillResolutionReport {
/**
* Known skill directories, in priority order.
* User skills (~/.pi/agent/skills/) take precedence over project skills.
* User skills (~/.gsd/agent/skills/) take precedence over project skills.
*/
function getSkillSearchDirs(cwd: string): Array<{ dir: string; method: SkillResolution["method"] }> {
return [

View file

@ -12,4 +12,4 @@ auto_supervisor: {}
# GSD Skill Preferences
See `~/.pi/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.
See `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.

View file

@ -3,7 +3,7 @@ import { join, dirname } from "node:path";
import { tmpdir } from "node:os";
import { fileURLToPath } from "node:url";
// loadPrompt reads from ~/.pi/agent/extensions/gsd/prompts/ (main checkout).
// loadPrompt reads from ~/.gsd/agent/extensions/gsd/prompts/ (main checkout).
// In a worktree the file may not exist there yet, so we resolve prompts
// relative to this test file's location (the worktree copy).
const __dirname = dirname(fileURLToPath(import.meta.url));

View file

@ -2,7 +2,7 @@ import { readFileSync } from "node:fs";
import { join, dirname } from "node:path";
import { fileURLToPath } from "node:url";
// loadPrompt reads from ~/.pi/agent/extensions/gsd/prompts/ (main checkout).
// loadPrompt reads from ~/.gsd/agent/extensions/gsd/prompts/ (main checkout).
// In a worktree the file may not exist there yet, so we resolve prompts
// relative to this test file's location (the worktree copy).
const __dirname = dirname(fileURLToPath(import.meta.url));

View file

@ -221,41 +221,41 @@ function sendPrompt(description: string, result: RoundResult, pi: ExtensionAPI):
: "";
const docHints: string[] = [
"- `~/.pi/agent/docs/extending-pi/01-what-are-extensions.md` — capabilities overview",
"- `~/.pi/agent/docs/extending-pi/03-getting-started.md` — minimal extension, hot reload",
"- `~/.pi/agent/docs/extending-pi/08-extensioncontext-what-you-can-access.md` — ExtensionContext API",
"- `~/.pi/agent/docs/extending-pi/09-extensionapi-what-you-can-do.md` — ExtensionAPI: registration, messaging",
"- `~/.pi/agent/docs/extending-pi/22-key-rules-gotchas.md` — must-read rules before shipping",
"- `~/.gsd/agent/docs/extending-pi/01-what-are-extensions.md` — capabilities overview",
"- `~/.gsd/agent/docs/extending-pi/03-getting-started.md` — minimal extension, hot reload",
"- `~/.gsd/agent/docs/extending-pi/08-extensioncontext-what-you-can-access.md` — ExtensionContext API",
"- `~/.gsd/agent/docs/extending-pi/09-extensionapi-what-you-can-do.md` — ExtensionAPI: registration, messaging",
"- `~/.gsd/agent/docs/extending-pi/22-key-rules-gotchas.md` — must-read rules before shipping",
];
if (uiSelected.includes("custom component")) {
docHints.push("- `~/.pi/agent/docs/extending-pi/12-custom-ui-visual-components.md` — dialogs, widgets, overlays");
docHints.push("- `~/.pi/agent/docs/pi-ui-tui/06-ctx-ui-custom-full-custom-components.md` — ctx.ui.custom() API");
docHints.push("- `~/.pi/agent/docs/pi-ui-tui/07-built-in-components-the-building-blocks.md` — Text, Box, SelectList");
docHints.push("- `~/.pi/agent/docs/pi-ui-tui/09-keyboard-input-how-to-handle-keys.md` — Key, matchesKey");
docHints.push("- `~/.pi/agent/docs/pi-ui-tui/10-line-width-the-cardinal-rule.md` — truncation, width rules");
docHints.push("- `~/.pi/agent/docs/pi-ui-tui/19-building-a-complete-component-step-by-step.md` — step-by-step guide");
docHints.push("- `~/.pi/agent/docs/pi-ui-tui/21-common-mistakes-and-how-to-avoid-them.md` — pitfalls");
docHints.push("- `~/.gsd/agent/docs/extending-pi/12-custom-ui-visual-components.md` — dialogs, widgets, overlays");
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/06-ctx-ui-custom-full-custom-components.md` — ctx.ui.custom() API");
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/07-built-in-components-the-building-blocks.md` — Text, Box, SelectList");
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/09-keyboard-input-how-to-handle-keys.md` — Key, matchesKey");
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/10-line-width-the-cardinal-rule.md` — truncation, width rules");
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/19-building-a-complete-component-step-by-step.md` — step-by-step guide");
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/21-common-mistakes-and-how-to-avoid-them.md` — pitfalls");
} else if (uiSelected.includes("Dialogs")) {
docHints.push("- `~/.pi/agent/docs/pi-ui-tui/04-built-in-dialog-methods.md` — select, confirm, input, editor");
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/04-built-in-dialog-methods.md` — select, confirm, input, editor");
} else if (uiSelected.includes("Status")) {
docHints.push("- `~/.pi/agent/docs/pi-ui-tui/05-persistent-ui-elements.md` — status, widgets, footer, header");
docHints.push("- `~/.gsd/agent/docs/pi-ui-tui/05-persistent-ui-elements.md` — status, widgets, footer, header");
}
if (uiSelected.includes("tool") || result.answers["purpose"]) {
docHints.push("- `~/.pi/agent/docs/extending-pi/14-custom-rendering-controlling-what-the-user-sees.md` — renderCall / renderResult");
docHints.push("- `~/.gsd/agent/docs/extending-pi/14-custom-rendering-controlling-what-the-user-sees.md` — renderCall / renderResult");
}
if (eventsSelected && !eventsSelected.includes("standalone")) {
docHints.push("- `~/.pi/agent/docs/extending-pi/07-events-the-nervous-system.md` — all events reference");
docHints.push("- `~/.gsd/agent/docs/extending-pi/07-events-the-nervous-system.md` — all events reference");
}
if (eventsSelected.includes("context / prompt")) {
docHints.push("- `~/.pi/agent/docs/extending-pi/15-system-prompt-modification.md` — system prompt hooks");
docHints.push("- `~/.gsd/agent/docs/extending-pi/15-system-prompt-modification.md` — system prompt hooks");
}
if (persistenceSelected.includes("session")) {
docHints.push("- `~/.pi/agent/docs/extending-pi/13-state-management-persistence.md` — pi.appendEntry, session state");
docHints.push("- `~/.gsd/agent/docs/extending-pi/13-state-management-persistence.md` — pi.appendEntry, session state");
}
const prompt = `Create a new pi extension based on this description:
@ -272,11 +272,11 @@ ${docHints.join("\n")}
Write the complete implementation as a single self-contained extension file:
\`~/.pi/agent/extensions/<kebab-case-name>.ts\`
\`~/.gsd/agent/extensions/<kebab-case-name>.ts\`
Then register it in the main extensions index:
\`~/.pi/agent/extensions/index.ts\` — import and call the new extension's default export alongside existing ones
\`~/.gsd/agent/extensions/index.ts\` — import and call the new extension's default export alongside existing ones
## Rules you must follow exactly

View file

@ -211,8 +211,8 @@ function sendPrompt(description: string, result: RoundResult, pi: ExtensionAPI):
${contextSection}
Write the complete file contents for two files:
1. \`~/.pi/agent/extensions/slash-commands/<name>.ts\` — the command implementation
2. Update \`~/.pi/agent/extensions/slash-commands/index.ts\` — import and register the new command alongside existing ones
1. \`~/.gsd/agent/extensions/slash-commands/<name>.ts\` — the command implementation
2. Update \`~/.gsd/agent/extensions/slash-commands/index.ts\` — import and register the new command alongside existing ones
Rules you must follow exactly:
- Command registration: \`pi.registerCommand("name", { description, handler })\`

View file

@ -418,7 +418,7 @@ export default function (pi: ExtensionAPI) {
handler: async (_args, ctx) => {
const discovery = discoverAgents(ctx.cwd, "both");
if (discovery.agents.length === 0) {
ctx.ui.notify("No agents found. Add .md files to ~/.pi/agent/agents/ or .pi/agents/", "warning");
ctx.ui.notify("No agents found. Add .md files to ~/.gsd/agent/agents/ or .gsd/agents/", "warning");
return;
}
const lines = discovery.agents.map(
@ -435,7 +435,7 @@ export default function (pi: ExtensionAPI) {
"Delegate tasks to specialized subagents with isolated context windows.",
"Each subagent is a separate pi process with its own tools, model, and system prompt.",
"Modes: single ({ agent, task }), parallel ({ tasks: [{agent, task},...] }), chain ({ chain: [{agent, task},...] } with {previous} placeholder).",
"Agents are defined as .md files in ~/.pi/agent/agents/ (user) or .pi/agents/ (project).",
"Agents are defined as .md files in ~/.gsd/agent/agents/ (user) or .gsd/agents/ (project).",
"Use the /subagent command to list available agents and their descriptions.",
"Use chain mode to pipeline: scout finds context, planner designs, worker implements.",
].join(" "),