From 1c714e09e3fc819c41fe1b92cfbe615f14b3a3c4 Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Wed, 11 Mar 2026 01:36:03 -0600 Subject: [PATCH] fix: update all .pi/ paths to .gsd/ --- scripts/verify-s04.sh | 16 ++++---- src/loader.ts | 2 +- src/resources/extensions/gsd/gitignore.ts | 2 +- src/resources/extensions/gsd/preferences.ts | 2 +- .../extensions/gsd/templates/preferences.md | 2 +- .../gsd/tests/complete-milestone.test.ts | 2 +- .../gsd/tests/reassess-prompt.test.ts | 2 +- .../slash-commands/create-extension.ts | 40 +++++++++---------- .../slash-commands/create-slash-command.ts | 4 +- src/resources/extensions/subagent/index.ts | 4 +- 10 files changed, 38 insertions(+), 38 deletions(-) diff --git a/scripts/verify-s04.sh b/scripts/verify-s04.sh index ad4ad6977..9d4c847cb 100755 --- a/scripts/verify-s04.sh +++ b/scripts/verify-s04.sh @@ -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 "" diff --git a/src/loader.ts b/src/loader.ts index c7653ad9c..c20c66eae 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -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. diff --git a/src/resources/extensions/gsd/gitignore.ts b/src/resources/extensions/gsd/gitignore.ts index fee8d0cae..3a6fd59b5 100644 --- a/src/resources/extensions/gsd/gitignore.ts +++ b/src/resources/extensions/gsd/gitignore.ts @@ -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 diff --git a/src/resources/extensions/gsd/preferences.ts b/src/resources/extensions/gsd/preferences.ts index 751983baf..222fa3d03 100644 --- a/src/resources/extensions/gsd/preferences.ts +++ b/src/resources/extensions/gsd/preferences.ts @@ -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 [ diff --git a/src/resources/extensions/gsd/templates/preferences.md b/src/resources/extensions/gsd/templates/preferences.md index 1819e0138..c91794f2b 100644 --- a/src/resources/extensions/gsd/templates/preferences.md +++ b/src/resources/extensions/gsd/templates/preferences.md @@ -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. diff --git a/src/resources/extensions/gsd/tests/complete-milestone.test.ts b/src/resources/extensions/gsd/tests/complete-milestone.test.ts index 7444548ab..21c9bf9a0 100644 --- a/src/resources/extensions/gsd/tests/complete-milestone.test.ts +++ b/src/resources/extensions/gsd/tests/complete-milestone.test.ts @@ -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)); diff --git a/src/resources/extensions/gsd/tests/reassess-prompt.test.ts b/src/resources/extensions/gsd/tests/reassess-prompt.test.ts index 7681aa5f2..4352c011d 100644 --- a/src/resources/extensions/gsd/tests/reassess-prompt.test.ts +++ b/src/resources/extensions/gsd/tests/reassess-prompt.test.ts @@ -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)); diff --git a/src/resources/extensions/slash-commands/create-extension.ts b/src/resources/extensions/slash-commands/create-extension.ts index 6166bd753..002529e4c 100644 --- a/src/resources/extensions/slash-commands/create-extension.ts +++ b/src/resources/extensions/slash-commands/create-extension.ts @@ -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/.ts\` +\`~/.gsd/agent/extensions/.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 diff --git a/src/resources/extensions/slash-commands/create-slash-command.ts b/src/resources/extensions/slash-commands/create-slash-command.ts index 9610ac85f..5c6f77c1d 100644 --- a/src/resources/extensions/slash-commands/create-slash-command.ts +++ b/src/resources/extensions/slash-commands/create-slash-command.ts @@ -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/.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/.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 })\` diff --git a/src/resources/extensions/subagent/index.ts b/src/resources/extensions/subagent/index.ts index 0c4156511..36196f0b8 100644 --- a/src/resources/extensions/subagent/index.ts +++ b/src/resources/extensions/subagent/index.ts @@ -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(" "),