From 35dc87ef535d0eda66d532a5d00546659fade3d7 Mon Sep 17 00:00:00 2001 From: ace-pm Date: Wed, 15 Apr 2026 14:54:20 +0200 Subject: [PATCH] chore: sync workspace state after rebrand MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rebrand commits already in history (gsd → forge) - Sync pre-existing doc, docker, and CI config updates - All rebrand artifacts verified in place: * Native crates: forge-engine, forge-ast, forge-grep * Log prefixes: [forge] across 22+ files * Binary: ~/bin/sf-run * Workspace scopes: @sf-run/*, @singularity-forge/* * Nix flake: Rust toolchain ready System ready for: nix develop && bun run build:native Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/ISSUE_TEMPLATE/bug_report.yml | 14 +- .github/ISSUE_TEMPLATE/feature_request.yml | 2 +- .github/PULL_REQUEST_TEMPLATE.md | 2 +- .github/workflows/ai-triage.yml | 8 +- .github/workflows/pipeline.yml | 10 +- .gitignore | 10 +- .prompt-injection-scanignore | 2 +- CHANGELOG.md | 108 +- CONTRIBUTING.md | 12 +- Dockerfile | 10 +- Makefile | 36 + README.md | 102 +- VISION.md | 10 +- bin/gsd-from-source | 16 +- docker/.env.example | 2 +- docker/Dockerfile.sandbox | 16 +- docker/README.md | 18 +- docker/bootstrap.sh | 2 +- docker/docker-compose.full.yaml | 8 +- docker/docker-compose.yaml | 2 +- docker/entrypoint.sh | 32 +- docs/README.md | 12 +- ...DR-001-branchless-worktree-architecture.md | 16 +- docs/dev/ADR-003-pipeline-simplification.md | 2 +- .../ADR-004-capability-aware-model-routing.md | 14 +- ...-005-multi-model-provider-tool-strategy.md | 2 +- docs/dev/ADR-007-model-catalog-split.md | 2 +- docs/dev/ADR-008-IMPLEMENTATION-PLAN.md | 30 +- ...-gsd-tools-over-mcp-for-provider-parity.md | 56 +- docs/dev/ADR-009-IMPLEMENTATION-PLAN.md | 2 +- .../ADR-009-orchestration-kernel-refactor.md | 6 +- .../dev/ADR-010-pi-clean-seam-architecture.md | 46 +- docs/dev/FILE-SYSTEM-MAP.md | 114 +- docs/dev/FRONTIER-TECHNIQUES.md | 54 +- .../PRD-branchless-worktree-architecture.md | 20 +- docs/dev/PRD-pi-clean-seam-refactor.md | 30 +- docs/dev/architecture.md | 14 +- docs/dev/ci-cd-pipeline.md | 20 +- .../pi-context-optimization-opportunities.md | 8 +- .../rfc-gitops-branching-strategy.md | 4 +- .../proposals/workflows/create-release.yml | 2 +- .../plans/2026-03-17-cicd-pipeline.md | 94 +- .../specs/2026-03-17-cicd-pipeline-design.md | 44 +- .../18-quick-reference-commands-shortcuts.md | 2 +- .../19-building-branded-apps-on-top-of-pi.md | 12 +- docs/user-docs/auto-mode.md | 18 +- docs/user-docs/captures-triage.md | 4 +- docs/user-docs/claude-code-auth-compliance.md | 26 +- docs/user-docs/commands.md | 26 +- docs/user-docs/configuration.md | 56 +- docs/user-docs/cost-management.md | 4 +- docs/user-docs/custom-models.md | 8 +- docs/user-docs/getting-started.md | 50 +- docs/user-docs/git-strategy.md | 20 +- docs/user-docs/migration.md | 2 +- docs/user-docs/node-lts-macos.md | 8 +- docs/user-docs/parallel-orchestration.md | 12 +- docs/user-docs/providers.md | 52 +- docs/user-docs/remote-questions.md | 10 +- docs/user-docs/skills.md | 16 +- docs/user-docs/token-optimization.md | 12 +- docs/user-docs/troubleshooting.md | 62 +- docs/user-docs/web-interface.md | 12 +- docs/user-docs/working-in-teams.md | 14 +- docs/zh-CN/README.md | 6 +- docs/zh-CN/user-docs/auto-mode.md | 18 +- docs/zh-CN/user-docs/captures-triage.md | 4 +- .../user-docs/claude-code-auth-compliance.md | 24 +- docs/zh-CN/user-docs/commands.md | 20 +- docs/zh-CN/user-docs/configuration.md | 56 +- docs/zh-CN/user-docs/cost-management.md | 4 +- docs/zh-CN/user-docs/custom-models.md | 8 +- docs/zh-CN/user-docs/getting-started.md | 52 +- docs/zh-CN/user-docs/git-strategy.md | 20 +- docs/zh-CN/user-docs/migration.md | 2 +- docs/zh-CN/user-docs/node-lts-macos.md | 8 +- .../zh-CN/user-docs/parallel-orchestration.md | 12 +- docs/zh-CN/user-docs/providers.md | 52 +- docs/zh-CN/user-docs/remote-questions.md | 10 +- docs/zh-CN/user-docs/skills.md | 16 +- docs/zh-CN/user-docs/token-optimization.md | 12 +- docs/zh-CN/user-docs/troubleshooting.md | 62 +- docs/zh-CN/user-docs/web-interface.md | 12 +- docs/zh-CN/user-docs/working-in-teams.md | 14 +- flake.nix | 4 +- gitbook/README.md | 14 +- gitbook/SUMMARY.md | 4 +- gitbook/configuration/custom-models.md | 6 +- gitbook/configuration/git-settings.md | 20 +- gitbook/configuration/mcp-servers.md | 8 +- gitbook/configuration/notifications.md | 6 +- gitbook/configuration/preferences.md | 2 +- gitbook/configuration/providers.md | 14 +- gitbook/core-concepts/auto-mode.md | 14 +- gitbook/core-concepts/project-structure.md | 12 +- gitbook/core-concepts/step-mode.md | 14 +- gitbook/features/captures.md | 4 +- gitbook/features/cost-management.md | 6 +- gitbook/features/dynamic-model-routing.md | 2 +- gitbook/features/github-sync.md | 2 +- gitbook/features/headless.md | 4 +- gitbook/features/parallel.md | 6 +- gitbook/features/remote-questions.md | 10 +- gitbook/features/skills.md | 8 +- gitbook/features/teams.md | 8 +- gitbook/features/token-optimization.md | 6 +- gitbook/features/web-interface.md | 2 +- gitbook/getting-started/choosing-a-model.md | 10 +- gitbook/getting-started/first-project.md | 14 +- gitbook/getting-started/installation.md | 16 +- gitbook/reference/cli-flags.md | 2 +- gitbook/reference/commands.md | 4 +- gitbook/reference/environment-variables.md | 18 +- gitbook/reference/keyboard-shortcuts.md | 2 +- gitbook/reference/migration.md | 2 +- gitbook/reference/troubleshooting.md | 6 +- gsd-orchestrator/SKILL.md | 20 +- .../references/answer-injection.md | 6 +- gsd-orchestrator/references/commands.md | 4 +- gsd-orchestrator/references/json-result.md | 4 +- gsd-orchestrator/workflows/build-from-spec.md | 6 +- .../workflows/monitor-and-poll.md | 8 +- gsd-orchestrator/workflows/step-by-step.md | 2 +- mintlify-docs/docs.json | 4 +- mintlify-docs/getting-started.mdx | 24 +- mintlify-docs/guides/auto-mode.mdx | 12 +- mintlify-docs/guides/captures-triage.mdx | 4 +- mintlify-docs/guides/change-management.mdx | 16 +- mintlify-docs/guides/commands.mdx | 12 +- mintlify-docs/guides/configuration.mdx | 16 +- mintlify-docs/guides/cost-management.mdx | 4 +- mintlify-docs/guides/git-strategy.mdx | 14 +- mintlify-docs/guides/migration.mdx | 4 +- .../guides/parallel-orchestration.mdx | 6 +- mintlify-docs/guides/remote-questions.mdx | 8 +- mintlify-docs/guides/skills.mdx | 6 +- mintlify-docs/guides/token-optimization.mdx | 8 +- mintlify-docs/guides/troubleshooting.mdx | 14 +- mintlify-docs/guides/web-interface.mdx | 2 +- mintlify-docs/guides/working-in-teams.mdx | 8 +- mintlify-docs/images/favicon.svg | 2 +- mintlify-docs/images/logo.svg | 2 +- mintlify-docs/introduction.mdx | 14 +- native/Cargo.toml | 2 +- native/README.md | 10 +- native/crates/ast/Cargo.toml | 2 +- native/crates/ast/src/lib.rs | 2 +- native/crates/engine/Cargo.toml | 2 +- native/crates/engine/src/git.rs | 2 +- native/crates/engine/src/gsd_parser.rs | 8 +- native/crates/engine/src/lib.rs | 2 +- native/crates/grep/Cargo.toml | 2 +- native/crates/grep/src/lib.rs | 2 +- native/npm/darwin-arm64/package.json | 2 +- native/npm/darwin-x64/package.json | 2 +- native/npm/linux-arm64-gnu/package.json | 2 +- native/npm/linux-x64-gnu/package.json | 2 +- native/npm/win32-x64-msvc/package.json | 2 +- native/scripts/build.js | 2 +- package-lock.json | 4 +- package.json | 6 +- packages/daemon/src/channel-manager.ts | 10 +- packages/daemon/src/commands.ts | 6 +- packages/daemon/src/config.ts | 4 +- packages/daemon/src/daemon.test.ts | 16 +- packages/daemon/src/discord-bot.test.ts | 4 +- packages/daemon/src/discord-bot.ts | 2 +- packages/daemon/src/event-bridge.ts | 6 +- packages/daemon/src/launchd.ts | 2 +- packages/daemon/src/orchestrator.ts | 8 +- packages/daemon/src/session-manager.test.ts | 2 +- packages/daemon/src/session-manager.ts | 12 +- packages/daemon/src/types.ts | 6 +- packages/mcp-server/README.md | 32 +- packages/mcp-server/src/env-writer.test.ts | 22 +- .../mcp-server/src/import-candidates.test.ts | 2 +- packages/mcp-server/src/index.ts | 2 +- packages/mcp-server/src/mcp-server.test.ts | 16 +- packages/mcp-server/src/readers/captures.ts | 2 +- .../mcp-server/src/readers/doctor-lite.ts | 2 +- packages/mcp-server/src/readers/graph.test.ts | 4 +- packages/mcp-server/src/readers/graph.ts | 4 +- packages/mcp-server/src/readers/index.ts | 2 +- packages/mcp-server/src/readers/knowledge.ts | 2 +- packages/mcp-server/src/readers/metrics.ts | 2 +- packages/mcp-server/src/readers/paths.ts | 2 +- .../mcp-server/src/readers/readers.test.ts | 6 +- packages/mcp-server/src/readers/roadmap.ts | 2 +- packages/mcp-server/src/readers/state.ts | 2 +- packages/mcp-server/src/server.ts | 20 +- packages/mcp-server/src/session-manager.ts | 12 +- .../mcp-server/src/tool-credentials.test.ts | 4 +- packages/mcp-server/src/tool-credentials.ts | 2 +- packages/mcp-server/src/types.ts | 2 +- .../mcp-server/src/workflow-tools.test.ts | 24 +- packages/mcp-server/src/workflow-tools.ts | 66 +- .../native/src/__tests__/clipboard.test.mjs | 4 +- .../src/__tests__/module-compat.test.mjs | 2 +- packages/native/src/forge-parser/index.ts | 2 +- packages/native/src/forge-parser/types.ts | 2 +- .../providers/provider-capabilities.test.ts | 2 +- .../src/providers/provider-capabilities.ts | 2 +- .../transform-messages-report.test.ts | 2 +- .../pi-ai/src/providers/transform-messages.ts | 2 +- .../core/agent-session-tool-refresh.test.ts | 2 +- .../extensions/extension-manifest.test.ts | 2 +- .../src/core/extensions/extension-manifest.ts | 2 +- .../core/extensions/extension-sort.test.ts | 2 +- .../src/core/extensions/extension-sort.ts | 2 +- .../src/core/extensions/loader.ts | 4 +- .../src/core/fallback-resolver.test.ts | 2 +- .../src/core/fallback-resolver.ts | 2 +- .../pi-coding-agent/src/core/lsp/index.ts | 2 +- .../pi-coding-agent/src/core/lsp/lspmux.ts | 2 +- .../src/core/resolve-config-value.ts | 2 +- .../core/resource-loader-cache-reset.test.ts | 2 +- .../core/tools/spawn-shell-windows.test.ts | 2 +- .../core/tools/tool-compatibility-registry.ts | 2 +- .../__tests__/provider-display-name.test.ts | 2 +- .../modes/interactive/components/footer.ts | 2 +- .../interactive/components/login-dialog.ts | 2 +- .../interactive/components/tool-execution.ts | 2 +- .../src/modes/interactive/interactive-mode.ts | 2 +- .../src/modes/interactive/theme/theme.ts | 2 +- .../pi-coding-agent/src/modes/rpc/rpc-mode.ts | 2 +- packages/rpc-client/README.md | 2 +- packages/rpc-client/src/index.ts | 2 +- scripts/dist-test-resolve.mjs | 6 +- scripts/install-pi-global.js | 8 +- scripts/parallel-monitor.mjs | 22 +- scripts/postinstall.js | 14 +- scripts/pr-risk-check.mjs | 4 +- scripts/preview-dashboard.ts | 4 +- scripts/recover-gsd-1364.ps1 | 4 +- scripts/recover-gsd-1364.sh | 48 +- scripts/recover-gsd-1668.ps1 | 16 +- scripts/recover-gsd-1668.sh | 20 +- scripts/require-tests.sh | 2 +- scripts/rtk-benchmark.mjs | 2 +- scripts/sync-pkg-version.cjs | 2 +- scripts/test-replace.txt | 3 + scripts/test-write.txt | 1 + scripts/uninstall-pi-global.js | 4 +- scripts/validate-pack.js | 2 +- scripts/verify-s03.sh | 2 +- scripts/verify-s04.sh | 14 +- src/app-paths.ts | 2 +- src/cli.ts | 29 +- src/headless-query.ts | 2 +- src/headless-ui.ts | 6 +- src/headless.ts | 8 +- src/help-text.ts | 12 +- src/loader.ts | 40 +- src/mcp-server.ts | 8 +- src/models-resolver.ts | 16 +- src/onboarding.ts | 28 +- src/pi-migration.ts | 8 +- src/resource-loader.ts | 42 +- .../{GSD-WORKFLOW.md => SF-WORKFLOW.md} | 12 +- src/resources/agents/worker.md | 2 +- src/resources/extensions/bg-shell/overlay.ts | 2 +- .../BROWSER-TOOLS-V2-PROPOSAL.md | 26 +- .../extensions/browser-tools/settle.ts | 2 +- .../extensions/browser-tools/tools/device.ts | 2 +- .../extensions/claude-code-cli/index.ts | 2 +- .../claude-code-cli/partial-builder.ts | 8 +- .../claude-code-cli/stream-adapter.ts | 24 +- .../tests/stream-adapter.test.ts | 186 +- src/resources/extensions/github-sync/index.ts | 4 +- .../extensions/github-sync/mapping.ts | 2 +- src/resources/extensions/github-sync/sync.ts | 6 +- .../extensions/github-sync/templates.ts | 4 +- .../github-sync/tests/commit-linking.test.ts | 14 +- src/resources/extensions/github-sync/types.ts | 2 +- src/resources/extensions/gsd/activity-log.ts | 6 +- .../extensions/gsd/auto-artifact-paths.ts | 2 +- .../extensions/gsd/auto-dashboard.ts | 2 +- src/resources/extensions/gsd/auto-dispatch.ts | 4 +- .../extensions/gsd/auto-post-unit.ts | 2 +- src/resources/extensions/gsd/auto-prompts.ts | 6 +- src/resources/extensions/gsd/auto-start.ts | 16 +- src/resources/extensions/gsd/auto-worktree.ts | 38 +- src/resources/extensions/gsd/auto.ts | 40 +- src/resources/extensions/gsd/auto/loop.ts | 4 +- src/resources/extensions/gsd/auto/phases.ts | 28 +- src/resources/extensions/gsd/auto/session.ts | 2 +- .../extensions/gsd/bootstrap/crash-log.ts | 4 +- .../extensions/gsd/bootstrap/db-tools.ts | 56 +- .../extensions/gsd/bootstrap/journal-tools.ts | 2 +- .../gsd/bootstrap/notify-interceptor.ts | 2 +- .../extensions/gsd/bootstrap/query-tools.ts | 4 +- .../gsd/bootstrap/register-extension.ts | 4 +- .../gsd/bootstrap/register-hooks.ts | 6 +- .../gsd/bootstrap/register-shortcuts.ts | 22 +- .../gsd/bootstrap/system-context.ts | 24 +- .../extensions/gsd/bootstrap/write-gate.ts | 6 +- .../extensions/gsd/branch-patterns.ts | 2 +- src/resources/extensions/gsd/cache.ts | 6 +- src/resources/extensions/gsd/captures.ts | 2 +- src/resources/extensions/gsd/changelog.ts | 8 +- src/resources/extensions/gsd/claude-import.ts | 6 +- .../extensions/gsd/codebase-generator.ts | 2 +- .../extensions/gsd/commands-add-tests.ts | 2 +- .../extensions/gsd/commands-backlog.ts | 2 +- .../extensions/gsd/commands-bootstrap.ts | 6 +- src/resources/extensions/gsd/commands-cmux.ts | 4 +- .../extensions/gsd/commands-codebase.ts | 4 +- .../extensions/gsd/commands-config.ts | 4 +- src/resources/extensions/gsd/commands-do.ts | 2 +- .../extensions/gsd/commands-extensions.ts | 8 +- .../gsd/commands-extract-learnings.ts | 2 +- .../extensions/gsd/commands-handlers.ts | 20 +- .../extensions/gsd/commands-inspect.ts | 10 +- src/resources/extensions/gsd/commands-logs.ts | 6 +- .../extensions/gsd/commands-maintenance.ts | 14 +- .../extensions/gsd/commands-mcp-status.ts | 8 +- .../extensions/gsd/commands-pr-branch.ts | 2 +- .../extensions/gsd/commands-prefs-wizard.ts | 20 +- .../extensions/gsd/commands-session-report.ts | 2 +- src/resources/extensions/gsd/commands-ship.ts | 6 +- .../gsd/commands-workflow-templates.ts | 8 +- .../extensions/gsd/commands/catalog.ts | 14 +- .../extensions/gsd/commands/context.ts | 8 +- .../extensions/gsd/commands/handlers/core.ts | 14 +- .../handlers/notifications-handler.ts | 2 +- .../extensions/gsd/commands/index.ts | 4 +- .../extensions/gsd/complexity-classifier.ts | 2 +- .../extensions/gsd/config-overlay.ts | 8 +- src/resources/extensions/gsd/constants.ts | 8 +- .../extensions/gsd/context-masker.ts | 2 +- src/resources/extensions/gsd/context-store.ts | 2 +- .../extensions/gsd/crash-recovery.ts | 2 +- .../extensions/gsd/custom-verification.ts | 2 +- .../extensions/gsd/dashboard-overlay.ts | 4 +- src/resources/extensions/gsd/db-writer.ts | 10 +- src/resources/extensions/gsd/debug-logger.ts | 8 +- src/resources/extensions/gsd/detection.ts | 16 +- .../extensions/gsd/dev-execution-policy.ts | 2 +- .../extensions/gsd/dev-workflow-engine.ts | 8 +- src/resources/extensions/gsd/diff-context.ts | 4 +- .../extensions/gsd/dispatch-guard.ts | 6 +- .../gsd/docs/claude-marketplace-import.md | 36 +- .../gsd/docs/preferences-reference.md | 36 +- .../extensions/gsd/doctor-environment.ts | 6 +- src/resources/extensions/gsd/doctor-format.ts | 2 +- .../extensions/gsd/doctor-git-checks.ts | 2 +- .../extensions/gsd/doctor-global-checks.ts | 2 +- .../extensions/gsd/doctor-proactive.ts | 2 +- .../extensions/gsd/doctor-providers.ts | 4 +- .../extensions/gsd/doctor-runtime-checks.ts | 10 +- src/resources/extensions/gsd/doctor-types.ts | 2 +- src/resources/extensions/gsd/doctor.ts | 10 +- .../extensions/gsd/engine-resolver.ts | 4 +- src/resources/extensions/gsd/engine-types.ts | 6 +- src/resources/extensions/gsd/env-utils.ts | 2 +- src/resources/extensions/gsd/errors.ts | 18 +- src/resources/extensions/gsd/exit-command.ts | 4 +- src/resources/extensions/gsd/export-html.ts | 10 +- src/resources/extensions/gsd/export.ts | 8 +- .../extensions/gsd/extension-manifest.json | 4 +- src/resources/extensions/gsd/file-lock.ts | 2 +- src/resources/extensions/gsd/files.ts | 6 +- src/resources/extensions/gsd/forensics.ts | 22 +- src/resources/extensions/gsd/gate-registry.ts | 10 +- src/resources/extensions/gsd/git-service.ts | 40 +- src/resources/extensions/gsd/gitignore.ts | 16 +- src/resources/extensions/gsd/gsd-db.ts | 102 +- .../extensions/gsd/guided-flow-queue.ts | 8 +- src/resources/extensions/gsd/guided-flow.ts | 46 +- .../extensions/gsd/health-widget-core.ts | 6 +- src/resources/extensions/gsd/health-widget.ts | 2 +- src/resources/extensions/gsd/history.ts | 2 +- src/resources/extensions/gsd/init-wizard.ts | 44 +- src/resources/extensions/gsd/journal.ts | 2 +- .../extensions/gsd/json-persistence.ts | 2 +- src/resources/extensions/gsd/key-manager.ts | 2 +- .../extensions/gsd/markdown-renderer.ts | 2 +- .../extensions/gsd/mcp-project-config.ts | 16 +- src/resources/extensions/gsd/md-importer.ts | 2 +- .../extensions/gsd/memory-extractor.ts | 2 +- src/resources/extensions/gsd/memory-store.ts | 2 +- src/resources/extensions/gsd/metrics.ts | 2 +- .../extensions/gsd/migrate-external.ts | 2 +- .../extensions/gsd/migrate/command.ts | 6 +- src/resources/extensions/gsd/migrate/index.ts | 2 +- .../extensions/gsd/migrate/preview.ts | 2 +- src/resources/extensions/gsd/migrate/types.ts | 4 +- .../extensions/gsd/migrate/writer.ts | 8 +- .../extensions/gsd/milestone-actions.ts | 2 +- src/resources/extensions/gsd/milestone-ids.ts | 2 +- .../extensions/gsd/model-cost-table.ts | 6 +- src/resources/extensions/gsd/model-router.ts | 2 +- .../extensions/gsd/native-git-bridge.ts | 10 +- .../extensions/gsd/native-parser-bridge.ts | 4 +- .../extensions/gsd/notification-overlay.ts | 2 +- .../extensions/gsd/notification-store.ts | 2 +- .../extensions/gsd/notification-widget.ts | 2 +- src/resources/extensions/gsd/notifications.ts | 12 +- .../extensions/gsd/parallel-eligibility.ts | 2 +- .../extensions/gsd/parallel-merge.ts | 2 +- .../gsd/parallel-monitor-overlay.ts | 4 +- .../extensions/gsd/parallel-orchestrator.ts | 30 +- .../extensions/gsd/parsers-legacy.ts | 2 +- src/resources/extensions/gsd/paths.ts | 14 +- src/resources/extensions/gsd/phase-anchor.ts | 2 +- .../extensions/gsd/plugin-importer.ts | 6 +- .../extensions/gsd/post-unit-hooks.ts | 2 +- .../extensions/gsd/preferences-models.ts | 4 +- .../extensions/gsd/preferences-skills.ts | 2 +- .../extensions/gsd/preferences-types.ts | 4 +- .../extensions/gsd/preferences-validation.ts | 4 +- src/resources/extensions/gsd/preferences.ts | 14 +- src/resources/extensions/gsd/preparation.ts | 6 +- .../extensions/gsd/progress-score.ts | 2 +- .../extensions/gsd/prompt-cache-optimizer.ts | 2 +- src/resources/extensions/gsd/prompt-loader.ts | 12 +- .../extensions/gsd/prompt-ordering.ts | 2 +- .../extensions/gsd/prompt-validation.ts | 2 +- .../extensions/gsd/prompts/add-tests.md | 2 +- .../gsd/prompts/complete-milestone.md | 2 +- .../extensions/gsd/prompts/complete-slice.md | 2 +- .../gsd/prompts/discuss-headless.md | 2 +- .../extensions/gsd/prompts/doctor-heal.md | 4 +- .../extensions/gsd/prompts/execute-task.md | 2 +- .../extensions/gsd/prompts/forensics.md | 20 +- .../gsd/prompts/guided-discuss-milestone.md | 2 +- .../extensions/gsd/prompts/plan-milestone.md | 2 +- .../extensions/gsd/prompts/plan-slice.md | 2 +- src/resources/extensions/gsd/prompts/queue.md | 2 +- .../extensions/gsd/prompts/quick-task.md | 4 +- .../gsd/prompts/reassess-roadmap.md | 2 +- .../extensions/gsd/prompts/replan-slice.md | 2 +- .../gsd/prompts/research-milestone.md | 2 +- .../extensions/gsd/prompts/research-slice.md | 2 +- .../extensions/gsd/prompts/rethink.md | 2 +- .../gsd/prompts/review-migration.md | 4 +- .../extensions/gsd/prompts/rewrite-docs.md | 2 +- .../extensions/gsd/prompts/run-uat.md | 2 +- .../extensions/gsd/prompts/system.md | 12 +- .../extensions/gsd/prompts/triage-captures.md | 2 +- .../extensions/gsd/prompts/worktree-merge.md | 6 +- src/resources/extensions/gsd/queue-order.ts | 2 +- .../extensions/gsd/queue-reorder-ui.ts | 2 +- src/resources/extensions/gsd/quick.ts | 4 +- src/resources/extensions/gsd/repo-identity.ts | 46 +- src/resources/extensions/gsd/reports.ts | 8 +- src/resources/extensions/gsd/rethink.ts | 4 +- .../extensions/gsd/routing-history.ts | 2 +- src/resources/extensions/gsd/rule-registry.ts | 2 +- src/resources/extensions/gsd/rule-types.ts | 2 +- src/resources/extensions/gsd/service-tier.ts | 2 +- .../extensions/gsd/session-forensics.ts | 10 +- src/resources/extensions/gsd/session-lock.ts | 10 +- .../extensions/gsd/session-status-io.ts | 2 +- src/resources/extensions/gsd/shortcut-defs.ts | 12 +- src/resources/extensions/gsd/skill-catalog.ts | 8 +- .../extensions/gsd/skill-discovery.ts | 2 +- src/resources/extensions/gsd/skill-health.ts | 4 +- .../extensions/gsd/skill-telemetry.ts | 2 +- .../gsd/skills/gsd-headless/SKILL.md | 16 +- .../gsd-headless/references/commands.md | 4 +- .../gsd-headless/references/multi-session.md | 16 +- .../extensions/gsd/slice-parallel-conflict.ts | 2 +- .../gsd/slice-parallel-eligibility.ts | 2 +- .../gsd/slice-parallel-orchestrator.ts | 28 +- src/resources/extensions/gsd/state.ts | 30 +- src/resources/extensions/gsd/status-guards.ts | 2 +- .../gsd/structured-data-formatter.ts | 4 +- src/resources/extensions/gsd/sync-lock.ts | 2 +- .../extensions/gsd/templates/PREFERENCES.md | 2 +- .../extensions/gsd/templates/state.md | 2 +- .../tests/artifact-corruption-2630.test.ts | 2 +- .../tests/auto-mode-interactive-guard.test.ts | 2 +- .../gsd/tests/auto-model-selection.test.ts | 24 +- .../tests/auto-post-unit-step-message.test.ts | 2 +- .../gsd/tests/auto-project-root-env.test.ts | 8 +- .../tests/auto-wrapup-inflight-guard.test.ts | 2 +- .../tests/cache-staleness-regression.test.ts | 2 +- .../gsd/tests/capability-router.test.ts | 2 +- .../extensions/gsd/tests/captures.test.ts | 2 +- .../gsd/tests/claude-import-tui.test.ts | 4 +- .../extensions/gsd/tests/cmux.test.ts | 4 +- .../tests/commands-inspect-open-db.test.ts | 4 +- .../gsd/tests/complete-milestone.test.ts | 6 +- .../complete-slice-string-coercion.test.ts | 2 +- .../gsd/tests/complete-task.test.ts | 18 +- .../tests/completion-hierarchy-guards.test.ts | 2 +- .../gsd/tests/core-overlay-fallback.test.ts | 2 +- .../gsd/tests/crash-handler-secondary.test.ts | 14 +- .../gsd/tests/custom-verification.test.ts | 8 +- .../gsd/tests/dashboard-custom-engine.test.ts | 2 +- .../gsd/tests/derive-state-helpers.test.ts | 28 +- .../extensions/gsd/tests/detection.test.ts | 2 +- .../gsd/tests/dev-engine-wrapper.test.ts | 16 +- .../gsd/tests/discord-invite-links.test.ts | 2 +- .../gsd/tests/discuss-tool-scope-leak.test.ts | 2 +- .../gsd/tests/discuss-tool-scoping.test.ts | 6 +- .../gsd/tests/dispatch-guard.test.ts | 8 +- .../tests/engine-interfaces-contract.test.ts | 8 +- .../enhanced-verification-integration.test.ts | 102 +- .../gsd/tests/ensure-db-open.test.ts | 2 +- .../tests/event-replay-idempotency.test.ts | 2 +- .../extensions/gsd/tests/exit-command.test.ts | 2 +- .../extension-bootstrap-isolation.test.ts | 2 +- .../gsd/tests/format-shortcut.test.ts | 2 +- .../extensions/gsd/tests/gsd-inspect.test.ts | 2 +- .../tests/guided-flow-state-rebuild.test.ts | 2 +- .../gsd/tests/health-widget.test.ts | 4 +- .../extensions/gsd/tests/init-wizard.test.ts | 2 +- .../integration/auto-secrets-gate.test.ts | 44 +- .../integration/auto-stash-merge.test.ts | 2 +- .../auto-worktree-milestone-merge.test.ts | 20 +- .../doctor-environment-worktree.test.ts | 16 +- .../tests/integration/doctor-runtime.test.ts | 8 +- ...ature-branch-lifecycle-integration.test.ts | 4 +- .../gsd/tests/integration/git-service.test.ts | 20 +- .../gsd/tests/integration/headless-command.ts | 40 +- .../inherited-repo-home-dir.test.ts | 34 +- .../integration/merge-cwd-restore.test.ts | 4 +- .../tests/integration/migrate-command.test.ts | 2 +- .../tests/integration/parallel-merge.test.ts | 4 +- .../quick-branch-lifecycle.test.ts | 2 +- .../state-machine-edge-cases.test.ts | 4 +- .../state-machine-live-validation.test.ts | 4 +- .../state-machine-runtime-failures.test.ts | 2 +- .../tests/interactive-routing-bypass.test.ts | 2 +- .../extensions/gsd/tests/key-manager.test.ts | 2 +- .../extensions/gsd/tests/knowledge.test.ts | 12 +- .../gsd/tests/manifest-status.test.ts | 24 +- .../gsd/tests/marketplace-test-fixtures.ts | 4 +- .../gsd/tests/mcp-project-config.test.ts | 14 +- .../tests/migrate-external-worktree.test.ts | 4 +- .../milestone-status-authoritative.test.ts | 2 +- .../gsd/tests/milestone-status-tool.test.ts | 2 +- .../gsd/tests/model-isolation.test.ts | 2 +- .../gsd/tests/must-have-parser.test.ts | 2 +- .../native-git-bridge-exec-fallback.test.ts | 2 +- .../gsd/tests/none-mode-gates.test.ts | 2 +- .../gsd/tests/notification-overlay.test.ts | 2 +- .../gsd/tests/notification-store.test.ts | 2 +- .../gsd/tests/notifications.test.ts | 18 +- .../extensions/gsd/tests/overrides.test.ts | 10 +- .../gsd/tests/parallel-commit-scope.test.ts | 24 +- .../parallel-worker-lock-contention.test.ts | 46 +- .../extensions/gsd/tests/parsers.test.ts | 4 +- .../gsd/tests/plan-slice-prompt.test.ts | 2 +- .../gsd/tests/post-exec-retry-bypass.test.ts | 2 +- .../gsd/tests/post-mutation-hook.test.ts | 2 +- .../gsd/tests/post-unit-hooks.test.ts | 2 +- .../tests/pre-execution-fail-closed.test.ts | 2 +- .../tests/pre-execution-pause-wiring.test.ts | 4 +- .../extensions/gsd/tests/preferences.test.ts | 12 +- .../tests/project-relocation-recovery.test.ts | 14 +- .../gsd/tests/projection-regression.test.ts | 2 +- .../gsd/tests/prompt-ordering.test.ts | 8 +- .../gsd/tests/prompt-tool-names.test.ts | 4 +- .../gsd/tests/queue-execution-guard.test.ts | 2 +- .../tests/reconciliation-edge-cases.test.ts | 2 +- .../gsd/tests/register-shortcuts.test.ts | 2 +- .../gsd/tests/remote-questions.test.ts | 2 +- .../extensions/gsd/tests/reopen-slice.test.ts | 2 +- .../extensions/gsd/tests/reopen-task.test.ts | 2 +- .../gsd/tests/repo-identity-worktree.test.ts | 24 +- .../tests/resource-loader-import-path.test.ts | 8 +- .../gsd/tests/retry-state-reset.test.ts | 2 +- .../gsd/tests/rule-registry.test.ts | 2 +- .../gsd/tests/secure-env-collect.test.ts | 70 +- .../tests/silent-catch-diagnostics.test.ts | 6 +- .../gsd/tests/skill-catalog.test.ts | 2 +- .../tests/slice-parallel-orchestrator.test.ts | 24 +- .../gsd/tests/stash-pop-gsd-conflict.test.ts | 4 +- .../tests/stash-queued-context-files.test.ts | 2 +- .../gsd/tests/state-derivation-parity.test.ts | 2 +- .../state-machine-full-walkthrough.test.ts | 2 +- .../gsd/tests/status-guards.test.ts | 2 +- .../gsd/tests/steer-worktree-path.test.ts | 2 +- .../tests/stuck-detection-coverage.test.ts | 2 +- .../tests/symlink-numbered-variants.test.ts | 4 +- .../extensions/gsd/tests/sync-lock.test.ts | 2 +- .../extensions/gsd/tests/test-helpers.ts | 2 +- .../extensions/gsd/tests/test-utils.ts | 4 +- .../gsd/tests/tool-compatibility.test.ts | 2 +- .../tool-invocation-error-loop-break.test.ts | 4 +- .../extensions/gsd/tests/tool-naming.test.ts | 2 +- .../gsd/tests/triage-resolution.test.ts | 2 +- .../extensions/gsd/tests/undo.test.ts | 2 +- .../gsd/tests/unit-ownership.test.ts | 2 +- ...uctured-continue-context-injection.test.ts | 2 +- .../extensions/gsd/tests/uok-flags.test.ts | 8 +- .../gsd/tests/uok-gitops-turn-action.test.ts | 2 +- .../gsd/tests/validate-directory.test.ts | 8 +- .../validate-milestone-stuck-guard.test.ts | 2 +- .../extensions/gsd/tests/validation.test.ts | 2 +- .../gsd/tests/visualizer-data.test.ts | 2 +- .../gsd/tests/visualizer-overlay.test.ts | 2 +- .../gsd/tests/visualizer-views.test.ts | 2 +- .../tests/wave1-critical-regressions.test.ts | 2 +- .../tests/wave2-events-regressions.test.ts | 2 +- .../tests/wave3-session-regressions.test.ts | 2 +- .../wave4-write-safety-regressions.test.ts | 2 +- .../wave5-consistency-regressions.test.ts | 2 +- .../gsd/tests/workflow-events.test.ts | 2 +- .../gsd/tests/workflow-logger-audit.test.ts | 2 +- .../gsd/tests/workflow-logger-wiring.test.ts | 2 +- .../gsd/tests/workflow-logger.test.ts | 2 +- .../gsd/tests/workflow-manifest.test.ts | 2 +- .../extensions/gsd/tests/workflow-mcp.test.ts | 106 +- .../gsd/tests/workflow-projections.test.ts | 2 +- .../gsd/tests/workflow-templates.test.ts | 2 +- .../gsd/tests/worktree-health.test.ts | 2 +- .../gsd/tests/worktree-integration.test.ts | 2 +- .../gsd/tests/worktree-manager.test.ts | 2 +- .../extensions/gsd/tests/worktree.test.ts | 22 +- .../gsd/tests/write-intercept.test.ts | 2 +- .../extensions/gsd/tools/reopen-milestone.ts | 2 +- .../extensions/gsd/tools/reopen-slice.ts | 2 +- .../extensions/gsd/tools/reopen-task.ts | 2 +- .../gsd/tools/workflow-tool-executors.ts | 22 +- .../extensions/gsd/triage-resolution.ts | 4 +- src/resources/extensions/gsd/triage-ui.ts | 2 +- src/resources/extensions/gsd/types.ts | 6 +- src/resources/extensions/gsd/undo.ts | 6 +- src/resources/extensions/gsd/unit-id.ts | 2 +- .../extensions/gsd/unit-ownership.ts | 2 +- .../extensions/gsd/uok/audit-toggle.ts | 4 +- src/resources/extensions/gsd/uok/flags.ts | 2 +- .../extensions/gsd/validate-directory.ts | 18 +- src/resources/extensions/gsd/validation.ts | 2 +- .../extensions/gsd/verification-gate.ts | 2 +- .../extensions/gsd/visualizer-views.ts | 2 +- .../extensions/gsd/watch/header-renderer.ts | 16 +- .../extensions/gsd/workflow-logger.ts | 2 +- src/resources/extensions/gsd/workflow-mcp.ts | 36 +- .../extensions/gsd/workflow-migration.ts | 2 +- .../extensions/gsd/workflow-projections.ts | 4 +- .../extensions/gsd/workflow-templates.ts | 6 +- .../gsd/workflow-templates/full-project.md | 10 +- .../gsd/workflow-templates/registry.json | 2 +- .../extensions/gsd/workspace-index.ts | 2 +- .../extensions/gsd/worktree-command.ts | 20 +- .../extensions/gsd/worktree-health.ts | 6 +- .../extensions/gsd/worktree-manager.ts | 24 +- src/resources/extensions/gsd/worktree.ts | 18 +- .../extensions/gsd/write-intercept.ts | 2 +- src/resources/extensions/ollama/index.ts | 2 +- .../extensions/ollama/ollama-discovery.ts | 2 +- .../remote-questions/discord-adapter.ts | 2 +- .../extensions/remote-questions/format.ts | 4 +- .../remote-questions/remote-command.ts | 6 +- .../remote-questions/slack-adapter.ts | 2 +- .../extensions/remote-questions/status.ts | 2 +- .../extensions/remote-questions/store.ts | 2 +- .../extensions/search-the-web/provider.ts | 2 +- .../extensions/search-the-web/url-utils.ts | 2 +- src/resources/extensions/sf/activity-log.ts | 184 + src/resources/extensions/sf/atomic-write.ts | 185 + .../extensions/sf/auto-artifact-paths.ts | 135 + src/resources/extensions/sf/auto-budget.ts | 32 + src/resources/extensions/sf/auto-dashboard.ts | 975 +++++ .../extensions/sf/auto-direct-dispatch.ts | 276 ++ src/resources/extensions/sf/auto-dispatch.ts | 908 +++++ src/resources/extensions/sf/auto-loop.ts | 16 + .../extensions/sf/auto-model-selection.ts | 561 +++ src/resources/extensions/sf/auto-post-unit.ts | 1296 +++++++ src/resources/extensions/sf/auto-prompts.ts | 2253 +++++++++++ src/resources/extensions/sf/auto-recovery.ts | 631 +++ src/resources/extensions/sf/auto-start.ts | 962 +++++ .../extensions/sf/auto-supervisor.ts | 79 + .../extensions/sf/auto-timeout-recovery.ts | 279 ++ src/resources/extensions/sf/auto-timers.ts | 327 ++ .../extensions/sf/auto-tool-tracking.ts | 137 + .../extensions/sf/auto-unit-closeout.ts | 76 + src/resources/extensions/sf/auto-utils.ts | 25 + .../extensions/sf/auto-verification.ts | 650 ++++ src/resources/extensions/sf/auto-worktree.ts | 2067 ++++++++++ src/resources/extensions/sf/auto.ts | 1789 +++++++++ .../extensions/sf/auto/detect-stuck.ts | 95 + .../extensions/sf/auto/finalize-timeout.ts | 49 + .../extensions/sf/auto/infra-errors.ts | 86 + src/resources/extensions/sf/auto/loop-deps.ts | 284 ++ src/resources/extensions/sf/auto/loop.ts | 624 +++ src/resources/extensions/sf/auto/phases.ts | 2006 ++++++++++ src/resources/extensions/sf/auto/resolve.ts | 106 + src/resources/extensions/sf/auto/run-unit.ts | 158 + src/resources/extensions/sf/auto/session.ts | 286 ++ src/resources/extensions/sf/auto/types.ts | 122 + .../sf/bootstrap/agent-end-recovery.ts | 266 ++ .../extensions/sf/bootstrap/crash-log.ts | 32 + .../extensions/sf/bootstrap/db-tools.ts | 1066 ++++++ .../extensions/sf/bootstrap/dynamic-tools.ts | 193 + .../extensions/sf/bootstrap/journal-tools.ts | 63 + .../sf/bootstrap/notify-interceptor.ts | 34 + .../sf/bootstrap/provider-error-resume.ts | 59 + .../extensions/sf/bootstrap/query-tools.ts | 34 + .../sf/bootstrap/register-extension.ts | 96 + .../extensions/sf/bootstrap/register-hooks.ts | 481 +++ .../sf/bootstrap/register-shortcuts.ts | 98 + .../bootstrap/sanitize-complete-milestone.ts | 57 + .../extensions/sf/bootstrap/system-context.ts | 535 +++ .../sf/bootstrap/tool-call-loop-guard.ts | 103 + .../extensions/sf/bootstrap/write-gate.ts | 466 +++ .../extensions/sf/branch-patterns.ts | 16 + src/resources/extensions/sf/cache.ts | 29 + src/resources/extensions/sf/captures.ts | 571 +++ src/resources/extensions/sf/changelog.ts | 213 ++ src/resources/extensions/sf/claude-import.ts | 705 ++++ .../extensions/sf/codebase-generator.ts | 625 +++ .../extensions/sf/collision-diagnostics.ts | 332 ++ .../extensions/sf/commands-add-tests.ts | 137 + .../extensions/sf/commands-backlog.ts | 182 + .../extensions/sf/commands-bootstrap.ts | 263 ++ src/resources/extensions/sf/commands-cmux.ts | 174 + .../extensions/sf/commands-codebase.ts | 197 + .../extensions/sf/commands-config.ts | 108 + src/resources/extensions/sf/commands-do.ts | 109 + .../extensions/sf/commands-extensions.ts | 330 ++ .../sf/commands-extract-learnings.ts | 304 ++ .../extensions/sf/commands-handlers.ts | 454 +++ .../extensions/sf/commands-inspect.ts | 99 + src/resources/extensions/sf/commands-logs.ts | 536 +++ .../extensions/sf/commands-maintenance.ts | 544 +++ .../extensions/sf/commands-mcp-status.ts | 293 ++ .../extensions/sf/commands-pr-branch.ts | 234 ++ .../extensions/sf/commands-prefs-wizard.ts | 864 +++++ src/resources/extensions/sf/commands-rate.ts | 55 + .../extensions/sf/commands-session-report.ts | 101 + src/resources/extensions/sf/commands-ship.ts | 219 ++ .../sf/commands-workflow-templates.ts | 543 +++ src/resources/extensions/sf/commands.ts | 17 + .../extensions/sf/commands/catalog.ts | 403 ++ .../extensions/sf/commands/context.ts | 125 + .../extensions/sf/commands/dispatcher.ts | 43 + .../extensions/sf/commands/handlers/auto.ts | 158 + .../extensions/sf/commands/handlers/core.ts | 482 +++ .../handlers/notifications-handler.ts | 150 + .../extensions/sf/commands/handlers/ops.ts | 245 ++ .../sf/commands/handlers/parallel.ts | 135 + .../sf/commands/handlers/workflow.ts | 340 ++ src/resources/extensions/sf/commands/index.ts | 20 + .../extensions/sf/complexity-classifier.ts | 329 ++ src/resources/extensions/sf/config-overlay.ts | 331 ++ src/resources/extensions/sf/constants.ts | 65 + src/resources/extensions/sf/context-budget.ts | 256 ++ .../extensions/sf/context-injector.ts | 100 + src/resources/extensions/sf/context-masker.ts | 74 + src/resources/extensions/sf/context-store.ts | 361 ++ src/resources/extensions/sf/crash-recovery.ts | 179 + .../extensions/sf/custom-execution-policy.ts | 74 + .../extensions/sf/custom-verification.ts | 183 + .../extensions/sf/custom-workflow-engine.ts | 220 ++ .../extensions/sf/dashboard-overlay.ts | 666 ++++ src/resources/extensions/sf/db-writer.ts | 729 ++++ src/resources/extensions/sf/debug-logger.ts | 178 + src/resources/extensions/sf/definition-io.ts | 18 + .../extensions/sf/definition-loader.ts | 462 +++ src/resources/extensions/sf/detection.ts | 1154 ++++++ .../extensions/sf/dev-execution-policy.ts | 51 + .../extensions/sf/dev-workflow-engine.ts | 110 + src/resources/extensions/sf/diff-context.ts | 214 ++ src/resources/extensions/sf/dispatch-guard.ts | 143 + .../sf/docs/claude-marketplace-import.md | 214 ++ .../sf/docs/preferences-reference.md | 694 ++++ src/resources/extensions/sf/doctor-checks.ts | 5 + .../extensions/sf/doctor-engine-checks.ts | 196 + .../extensions/sf/doctor-environment.ts | 642 ++++ src/resources/extensions/sf/doctor-format.ts | 99 + .../extensions/sf/doctor-git-checks.ts | 489 +++ .../extensions/sf/doctor-global-checks.ts | 84 + .../extensions/sf/doctor-proactive.ts | 465 +++ .../extensions/sf/doctor-providers.ts | 439 +++ .../extensions/sf/doctor-runtime-checks.ts | 630 +++ src/resources/extensions/sf/doctor-types.ts | 126 + src/resources/extensions/sf/doctor.ts | 813 ++++ .../extensions/sf/engine-resolver.ts | 57 + src/resources/extensions/sf/engine-types.ts | 71 + src/resources/extensions/sf/env-utils.ts | 31 + .../extensions/sf/error-classifier.ts | 144 + src/resources/extensions/sf/error-utils.ts | 6 + src/resources/extensions/sf/errors.ts | 29 + .../extensions/sf/execution-policy.ts | 43 + src/resources/extensions/sf/exit-command.ts | 30 + src/resources/extensions/sf/export-html.ts | 1408 +++++++ src/resources/extensions/sf/export.ts | 310 ++ .../extensions/sf/extension-manifest.json | 33 + src/resources/extensions/sf/file-lock.ts | 59 + src/resources/extensions/sf/files.ts | 1009 +++++ src/resources/extensions/sf/forensics.ts | 1210 ++++++ src/resources/extensions/sf/gate-registry.ts | 251 ++ src/resources/extensions/sf/git-constants.ts | 12 + src/resources/extensions/sf/git-self-heal.ts | 127 + src/resources/extensions/sf/git-service.ts | 919 +++++ src/resources/extensions/sf/gitignore.ts | 322 ++ src/resources/extensions/sf/graph-context.ts | 212 ++ src/resources/extensions/sf/graph.ts | 312 ++ .../extensions/sf/guided-flow-queue.ts | 439 +++ src/resources/extensions/sf/guided-flow.ts | 1940 ++++++++++ .../extensions/sf/health-widget-core.ts | 111 + src/resources/extensions/sf/health-widget.ts | 143 + src/resources/extensions/sf/history.ts | 144 + src/resources/extensions/sf/index.ts | 37 + src/resources/extensions/sf/init-wizard.ts | 638 ++++ .../extensions/sf/interrupted-session.ts | 225 ++ src/resources/extensions/sf/journal.ts | 169 + .../extensions/sf/json-persistence.ts | 78 + src/resources/extensions/sf/jsonl-utils.ts | 21 + src/resources/extensions/sf/key-manager.ts | 989 +++++ .../sf/learning/bayesian-blender.mjs | 216 ++ .../sf/learning/bayesian-blender.test.mjs | 268 ++ .../sf/learning/data/model-benchmarks.json | 793 ++++ .../learning/data/primary-provider-chain.json | 5 + .../sf/learning/data/unit-weights.json | 125 + .../sf/learning/fallback-chain-writer.mjs | 469 +++ .../learning/fallback-chain-writer.test.mjs | 402 ++ .../extensions/sf/learning/hook-handler.mjs | 278 ++ .../sf/learning/hook-handler.test.mjs | 346 ++ .../extensions/sf/learning/index.mjs | 320 ++ .../sf/learning/integration.test.mjs | 367 ++ .../sf/learning/loadCapabilityOverrides.mjs | 436 +++ .../learning/loadCapabilityOverrides.test.mjs | 217 ++ .../sf/learning/outcome-aggregator.mjs | 305 ++ .../sf/learning/outcome-recorder.mjs | 299 ++ .../sf/learning/outcome-recorder.test.mjs | 494 +++ .../extensions/sf/learning/outcome-schema.sql | 30 + .../extensions/sf/learning/runtime.ts | 98 + .../extensions/sf/markdown-renderer.ts | 1126 ++++++ .../extensions/sf/marketplace-discovery.ts | 508 +++ .../extensions/sf/mcp-project-config.ts | 129 + src/resources/extensions/sf/md-importer.ts | 748 ++++ .../extensions/sf/memory-extractor.ts | 360 ++ src/resources/extensions/sf/memory-store.ts | 421 ++ src/resources/extensions/sf/metrics.ts | 695 ++++ .../extensions/sf/migrate-external.ts | 210 + .../extensions/sf/migrate/command.ts | 219 ++ src/resources/extensions/sf/migrate/index.ts | 42 + src/resources/extensions/sf/migrate/parser.ts | 323 ++ .../extensions/sf/migrate/parsers.ts | 539 +++ .../extensions/sf/migrate/preview.ts | 48 + .../extensions/sf/migrate/transformer.ts | 346 ++ src/resources/extensions/sf/migrate/types.ts | 370 ++ .../extensions/sf/migrate/validator.ts | 55 + src/resources/extensions/sf/migrate/writer.ts | 579 +++ .../extensions/sf/milestone-actions.ts | 169 + .../extensions/sf/milestone-id-utils.ts | 32 + src/resources/extensions/sf/milestone-ids.ts | 136 + .../sf/milestone-validation-gates.ts | 53 + .../extensions/sf/model-cost-table.ts | 84 + src/resources/extensions/sf/model-router.ts | 611 +++ .../extensions/sf/namespaced-registry.ts | 467 +++ .../extensions/sf/namespaced-resolver.ts | 307 ++ .../extensions/sf/native-git-bridge.ts | 1222 ++++++ .../extensions/sf/native-parser-bridge.ts | 267 ++ .../extensions/sf/notification-overlay.ts | 328 ++ .../extensions/sf/notification-store.ts | 342 ++ .../extensions/sf/notification-widget.ts | 60 + src/resources/extensions/sf/notifications.ts | 135 + .../extensions/sf/observability-validator.ts | 456 +++ src/resources/extensions/sf/package.json | 11 + .../extensions/sf/parallel-eligibility.ts | 242 ++ src/resources/extensions/sf/parallel-merge.ts | 242 ++ .../extensions/sf/parallel-monitor-overlay.ts | 506 +++ .../extensions/sf/parallel-orchestrator.ts | 1064 ++++++ src/resources/extensions/sf/parsers-legacy.ts | 292 ++ src/resources/extensions/sf/paths.ts | 571 +++ src/resources/extensions/sf/phase-anchor.ts | 71 + .../extensions/sf/plugin-importer.ts | 411 ++ .../extensions/sf/post-execution-checks.ts | 539 +++ .../extensions/sf/post-unit-hooks.ts | 86 + .../extensions/sf/pre-execution-checks.ts | 638 ++++ .../extensions/sf/preferences-models.ts | 471 +++ .../extensions/sf/preferences-skills.ts | 146 + .../extensions/sf/preferences-types.ts | 457 +++ .../extensions/sf/preferences-validation.ts | 1131 ++++++ src/resources/extensions/sf/preferences.ts | 661 ++++ src/resources/extensions/sf/preparation.ts | 1419 +++++++ src/resources/extensions/sf/progress-score.ts | 161 + .../extensions/sf/prompt-cache-optimizer.ts | 213 ++ src/resources/extensions/sf/prompt-loader.ts | 183 + .../extensions/sf/prompt-ordering.ts | 200 + .../extensions/sf/prompt-validation.ts | 157 + .../extensions/sf/prompts/add-tests.md | 35 + .../sf/prompts/complete-milestone.md | 68 + .../extensions/sf/prompts/complete-slice.md | 44 + .../extensions/sf/prompts/discuss-headless.md | 253 ++ .../extensions/sf/prompts/discuss.md | 423 +++ .../extensions/sf/prompts/doctor-heal.md | 30 + .../extensions/sf/prompts/execute-task.md | 85 + .../extensions/sf/prompts/forensics.md | 198 + .../extensions/sf/prompts/gate-evaluate.md | 32 + .../sf/prompts/guided-complete-slice.md | 3 + .../sf/prompts/guided-discuss-milestone.md | 117 + .../sf/prompts/guided-discuss-slice.md | 67 + .../sf/prompts/guided-execute-task.md | 3 + .../sf/prompts/guided-plan-milestone.md | 30 + .../sf/prompts/guided-plan-slice.md | 3 + .../sf/prompts/guided-research-slice.md | 15 + .../sf/prompts/guided-resume-task.md | 1 + .../extensions/sf/prompts/heal-skill.md | 45 + .../sf/prompts/parallel-research-slices.md | 23 + .../extensions/sf/prompts/plan-milestone.md | 108 + .../extensions/sf/prompts/plan-slice.md | 89 + src/resources/extensions/sf/prompts/queue.md | 135 + .../extensions/sf/prompts/quick-task.md | 44 + .../extensions/sf/prompts/reactive-execute.md | 44 + .../extensions/sf/prompts/reassess-roadmap.md | 68 + .../extensions/sf/prompts/replan-slice.md | 39 + .../sf/prompts/research-milestone.md | 47 + .../extensions/sf/prompts/research-slice.md | 57 + .../extensions/sf/prompts/rethink.md | 95 + .../extensions/sf/prompts/review-migration.md | 66 + .../extensions/sf/prompts/rewrite-docs.md | 31 + .../extensions/sf/prompts/run-uat.md | 89 + src/resources/extensions/sf/prompts/system.md | 221 ++ .../extensions/sf/prompts/triage-captures.md | 68 + .../sf/prompts/validate-milestone.md | 87 + .../extensions/sf/prompts/workflow-start.md | 28 + .../extensions/sf/prompts/worktree-merge.md | 125 + .../extensions/sf/provider-error-pause.ts | 49 + src/resources/extensions/sf/queue-order.ts | 230 ++ .../extensions/sf/queue-reorder-ui.ts | 277 ++ src/resources/extensions/sf/quick.ts | 262 ++ src/resources/extensions/sf/reactive-graph.ts | 337 ++ src/resources/extensions/sf/repo-identity.ts | 657 ++++ src/resources/extensions/sf/reports.ts | 504 +++ src/resources/extensions/sf/rethink.ts | 163 + .../extensions/sf/roadmap-mutations.ts | 134 + src/resources/extensions/sf/roadmap-slices.ts | 294 ++ .../extensions/sf/routing-history.ts | 286 ++ src/resources/extensions/sf/rule-registry.ts | 599 +++ src/resources/extensions/sf/rule-types.ts | 68 + src/resources/extensions/sf/run-manager.ts | 180 + src/resources/extensions/sf/safe-fs.ts | 48 + .../extensions/sf/safety/content-validator.ts | 98 + .../extensions/sf/safety/destructive-guard.ts | 49 + .../sf/safety/evidence-collector.ts | 151 + .../sf/safety/evidence-cross-ref.ts | 120 + .../sf/safety/file-change-validator.ts | 111 + .../extensions/sf/safety/git-checkpoint.ts | 106 + .../extensions/sf/safety/safety-harness.ts | 105 + src/resources/extensions/sf/service-tier.ts | 196 + .../extensions/sf/session-forensics.ts | 546 +++ src/resources/extensions/sf/session-lock.ts | 668 ++++ .../extensions/sf/session-model-override.ts | 36 + .../extensions/sf/session-status-io.ts | 179 + src/resources/extensions/sf/sf-db.ts | 3378 +++++++++++++++++ src/resources/extensions/sf/shortcut-defs.ts | 56 + src/resources/extensions/sf/skill-catalog.ts | 1088 ++++++ .../extensions/sf/skill-discovery.ts | 157 + src/resources/extensions/sf/skill-health.ts | 422 ++ .../extensions/sf/skill-telemetry.ts | 140 + .../extensions/sf/skills/sf-headless/SKILL.md | 242 ++ .../references/answer-injection.md | 83 + .../skills/sf-headless/references/commands.md | 64 + .../sf-headless/references/multi-session.md | 176 + .../extensions/sf/slice-parallel-conflict.ts | 86 + .../sf/slice-parallel-eligibility.ts | 73 + .../sf/slice-parallel-orchestrator.ts | 496 +++ src/resources/extensions/sf/state.ts | 1747 +++++++++ src/resources/extensions/sf/status-guards.ts | 27 + .../sf/structured-data-formatter.ts | 146 + src/resources/extensions/sf/sync-lock.ts | 94 + .../extensions/sf/templates/PREFERENCES.md | 98 + .../extensions/sf/templates/context.md | 108 + .../extensions/sf/templates/decisions.md | 8 + .../extensions/sf/templates/knowledge.md | 19 + .../sf/templates/milestone-summary.md | 81 + .../sf/templates/milestone-validation.md | 74 + src/resources/extensions/sf/templates/plan.md | 148 + .../extensions/sf/templates/project.md | 31 + .../extensions/sf/templates/reassessment.md | 29 + .../extensions/sf/templates/requirements.md | 81 + .../extensions/sf/templates/research.md | 79 + .../extensions/sf/templates/roadmap.md | 131 + .../extensions/sf/templates/runtime.md | 21 + .../sf/templates/secrets-manifest.md | 22 + .../extensions/sf/templates/slice-context.md | 58 + .../extensions/sf/templates/slice-summary.md | 108 + .../extensions/sf/templates/state.md | 17 + .../extensions/sf/templates/task-plan.md | 87 + .../extensions/sf/templates/task-summary.md | 66 + src/resources/extensions/sf/templates/uat.md | 54 + .../tests/active-milestone-id-guard.test.ts | 91 + .../extensions/sf/tests/activity-log.test.ts | 175 + .../sf/tests/agent-end-retry.test.ts | 143 + .../sf/tests/artifact-corruption-2630.test.ts | 288 ++ .../sf/tests/ask-user-questions-dedup.test.ts | 120 + .../extensions/sf/tests/atomic-write.test.ts | 144 + .../sf/tests/auto-budget-alerts.test.ts | 50 + .../sf/tests/auto-dashboard.test.ts | 262 ++ .../sf/tests/auto-lock-creation.test.ts | 213 ++ .../extensions/sf/tests/auto-loop.test.ts | 2380 ++++++++++++ .../sf/tests/auto-milestone-target.test.ts | 61 + .../tests/auto-mode-interactive-guard.test.ts | 71 + .../sf/tests/auto-model-selection.test.ts | 274 ++ .../auto-paused-session-validation.test.ts | 129 + .../sf/tests/auto-paused-ui-cleanup.test.ts | 27 + .../tests/auto-post-unit-step-message.test.ts | 53 + .../extensions/sf/tests/auto-pr-bugs.test.ts | 88 + .../sf/tests/auto-project-root-env.test.ts | 33 + .../extensions/sf/tests/auto-recovery.test.ts | 714 ++++ .../tests/auto-remediate-slice-status.test.ts | 56 + .../tests/auto-session-encapsulation.test.ts | 255 ++ .../tests/auto-stale-lock-self-kill.test.ts | 87 + .../auto-start-cold-db-bootstrap.test.ts | 37 + .../sf/tests/auto-start-model-capture.test.ts | 113 + .../tests/auto-start-needs-discussion.test.ts | 218 ++ .../tests/auto-start-time-persistence.test.ts | 50 + .../tests/auto-start-worktree-db-path.test.ts | 28 + .../sf/tests/auto-supervisor.test.mjs | 53 + .../tests/auto-worktree-auto-resolve.test.ts | 80 + .../tests/auto-wrapup-inflight-guard.test.ts | 107 + .../autocomplete-regressions-1675.test.ts | 83 + .../sf/tests/block-db-writes.test.ts | 63 + .../bootstrap-derive-state-db-open.test.ts | 39 + .../sf/tests/browser-teardown.test.ts | 133 + .../sf/tests/budget-prediction.test.ts | 220 ++ .../sf/tests/bundled-workflow-defs.test.ts | 180 + .../tests/cache-staleness-regression.test.ts | 294 ++ .../sf/tests/capability-router.test.ts | 371 ++ .../extensions/sf/tests/captures.test.ts | 524 +++ ...laude-import-marketplace-discovery.test.ts | 191 + .../sf/tests/claude-import-tui.test.ts | 350 ++ .../sf/tests/claude-skill-dirs.test.ts | 51 + .../sf/tests/clear-stale-autostart.test.ts | 41 + .../sf/tests/cli-provider-rate-limit.test.ts | 47 + .../extensions/sf/tests/cmux.test.ts | 339 ++ .../sf/tests/codebase-generator.test.ts | 669 ++++ .../sf/tests/cold-resume-db-reopen.test.ts | 65 + .../sf/tests/collect-from-manifest.test.ts | 506 +++ .../sf/tests/collision-diagnostics.test.ts | 705 ++++ .../sf/tests/commands-backlog.test.ts | 158 + .../sf/tests/commands-config.test.ts | 24 + .../extensions/sf/tests/commands-do.test.ts | 127 + .../tests/commands-extract-learnings.test.ts | 340 ++ .../sf/tests/commands-inspect-open-db.test.ts | 46 + .../extensions/sf/tests/commands-logs.test.ts | 241 ++ .../sf/tests/commands-pr-branch.test.ts | 68 + .../sf/tests/commands-session-report.test.ts | 82 + .../extensions/sf/tests/commands-ship.test.ts | 71 + .../sf/tests/commands-workflow-custom.test.ts | 309 ++ .../complete-milestone-false-merge.test.ts | 142 + .../sf/tests/complete-milestone.test.ts | 451 +++ .../tests/complete-slice-gate-closure.test.ts | 167 + ...e-slice-prompt-task-summary-layout.test.ts | 18 + .../complete-slice-string-coercion.test.ts | 247 ++ .../complete-slice-verification-gate.test.ts | 72 + .../sf/tests/complete-slice.test.ts | 432 +++ .../complete-task-normalize-lists.test.ts | 54 + .../complete-task-rollback-evidence.test.ts | 106 + .../extensions/sf/tests/complete-task.test.ts | 493 +++ .../sf/tests/completed-at-reconcile.test.ts | 42 + .../completed-units-metrics-sync.test.ts | 111 + .../tests/completion-hierarchy-guards.test.ts | 192 + .../sf/tests/complexity-classifier.test.ts | 206 + .../sf/tests/context-budget.test.ts | 352 ++ .../sf/tests/context-injector.test.ts | 313 ++ .../sf/tests/context-masker.test.ts | 122 + .../extensions/sf/tests/context-store.test.ts | 630 +++ .../copy-planning-artifacts-samepath.test.ts | 21 + .../sf/tests/core-overlay-fallback.test.ts | 177 + .../sf/tests/cost-projection.test.ts | 120 + .../sf/tests/crash-handler-secondary.test.ts | 235 ++ .../sf/tests/crash-recovery.test.ts | 500 +++ .../custom-engine-loop-integration.test.ts | 541 +++ .../sf/tests/custom-verification.test.ts | 415 ++ .../sf/tests/custom-workflow-engine.test.ts | 370 ++ .../sf/tests/dashboard-budget.test.ts | 329 ++ .../sf/tests/dashboard-custom-engine.test.ts | 87 + .../dashboard-model-label-ordering.test.ts | 107 + .../sf/tests/db-access-guardrails.test.ts | 109 + .../sf/tests/db-path-worktree-symlink.test.ts | 135 + .../extensions/sf/tests/db-writer.test.ts | 831 ++++ .../extensions/sf/tests/debug-logger.test.ts | 185 + .../sf/tests/decision-scope-cascade.test.ts | 370 ++ .../sf/tests/defer-milestone-stamp.test.ts | 30 + .../sf/tests/deferred-slice-dispatch.test.ts | 203 + .../extensions/sf/tests/definition-io.test.ts | 57 + .../sf/tests/definition-loader.test.ts | 762 ++++ .../sf/tests/derive-state-crossval.test.ts | 513 +++ .../derive-state-db-disk-reconcile.test.ts | 121 + .../sf/tests/derive-state-db.test.ts | 1129 ++++++ .../sf/tests/derive-state-deps.test.ts | 641 ++++ .../sf/tests/derive-state-draft.test.ts | 310 ++ .../sf/tests/derive-state-helpers.test.ts | 496 +++ .../extensions/sf/tests/derive-state.test.ts | 982 +++++ .../extensions/sf/tests/detection.test.ts | 1227 ++++++ .../sf/tests/dev-engine-wrapper.test.ts | 314 ++ .../extensions/sf/tests/diff-context.test.ts | 136 + .../sf/tests/discord-invite-links.test.ts | 47 + .../tests/discuss-empty-db-fallback.test.ts | 127 + .../discuss-incremental-persistence.test.ts | 45 + .../sf/tests/discuss-prompt.test.ts | 15 + .../tests/discuss-queued-milestones.test.ts | 281 ++ ...discuss-slice-structured-questions.test.ts | 46 + .../sf/tests/discuss-tool-scope-leak.test.ts | 76 + .../sf/tests/discuss-tool-scoping.test.ts | 130 + .../dispatch-guard-closed-status.test.ts | 33 + .../sf/tests/dispatch-guard.test.ts | 318 ++ .../tests/dispatch-missing-task-plans.test.ts | 126 + .../tests/dispatch-uat-last-completed.test.ts | 172 + .../tests/dispatcher-stuck-planning.test.ts | 37 + .../extensions/sf/tests/dist-redirect.mjs | 112 + .../sf/tests/doctor-fix-flag.test.ts | 92 + .../doctor-heal-fixable-warnings.test.ts | 14 + .../sf/tests/doctor-providers.test.ts | 639 ++++ .../tests/doctor-scope-db-unavailable.test.ts | 43 + .../sf/tests/double-merge-guard.test.ts | 97 + .../sf/tests/draft-promotion.test.ts | 169 + .../sf/tests/dynamic-routing-default.test.ts | 20 + .../sf/tests/empty-content-abort-loop.test.ts | 74 + .../tests/engine-interfaces-contract.test.ts | 271 ++ .../enhanced-verification-integration.test.ts | 526 +++ .../sf/tests/ensure-db-open.test.ts | 230 ++ .../sf/tests/error-success-mask.test.ts | 37 + .../sf/tests/est-annotation-timeout.test.ts | 120 + .../sf/tests/event-replay-idempotency.test.ts | 140 + ...ask-prompt-existing-artifact-guard.test.ts | 33 + .../extensions/sf/tests/exit-command.test.ts | 101 + .../sf/tests/export-html-all.test.ts | 105 + .../sf/tests/export-html-enhancements.test.ts | 379 ++ .../extension-bootstrap-isolation.test.ts | 154 + .../extension-selector-separator.test.ts | 144 + .../tests/false-degraded-mode-warning.test.ts | 104 + .../sf/tests/file-change-validator.test.ts | 50 + .../extensions/sf/tests/file-lock.test.ts | 103 + .../sf/tests/files-loadfile-eisdir.test.ts | 18 + .../sf/tests/finalize-timeout-guard.test.ts | 244 ++ .../find-missing-summaries-closed.test.ts | 48 + .../extensions/sf/tests/flag-file-db.test.ts | 278 ++ .../sf/tests/flat-rate-routing-guard.test.ts | 186 + .../tests/forensics-context-persist.test.ts | 159 + .../sf/tests/forensics-db-completion.test.ts | 96 + .../sf/tests/forensics-dedup.test.ts | 79 + .../sf/tests/forensics-error-filter.test.ts | 121 + .../sf/tests/forensics-issue-routing.test.ts | 43 + .../sf/tests/forensics-journal.test.ts | 162 + .../sf/tests/forensics-stuck-loops.test.ts | 165 + .../sf/tests/format-shortcut.test.ts | 100 + .../sf/tests/freeform-decisions.test.ts | 232 ++ .../sf/tests/frontmatter-parse-noise.test.ts | 42 + .../extensions/sf/tests/gate-dispatch.test.ts | 216 ++ .../extensions/sf/tests/gate-registry.test.ts | 140 + .../extensions/sf/tests/gate-storage.test.ts | 156 + .../sf/tests/git-checkpoint.test.ts | 94 + .../sf/tests/gitignore-bg-shell.test.ts | 38 + .../extensions/sf/tests/graph-context.test.ts | 337 ++ .../sf/tests/graph-operations.test.ts | 593 +++ .../tests/guided-flow-dynamic-routing.test.ts | 135 + .../guided-flow-session-isolation.test.ts | 131 + .../tests/guided-flow-state-rebuild.test.ts | 103 + .../sf/tests/headless-answers.test.ts | 340 ++ .../sf/tests/headless-query.test.ts | 184 + .../extensions/sf/tests/health-widget.test.ts | 224 ++ .../sf/tests/hook-key-parsing.test.ts | 107 + .../sf/tests/hook-model-resolution.test.ts | 98 + .../idle-watchdog-stall-override.test.ts | 125 + .../sf/tests/import-done-milestones.test.ts | 42 + .../sf/tests/in-flight-tool-tracking.test.ts | 32 + .../extensions/sf/tests/infra-error.test.ts | 129 + .../sf/tests/infra-errors-cooldown.test.ts | 180 + .../extensions/sf/tests/init-wizard.test.ts | 195 + .../sf/tests/insert-slice-no-wipe.test.ts | 88 + .../sf/tests/integration-edge.test.ts | 223 ++ .../all-milestones-complete-merge.test.ts | 248 ++ .../integration/atomic-task-closeout.test.ts | 72 + .../tests/integration/auto-preflight.test.ts | 38 + .../tests/integration/auto-recovery.test.ts | 867 +++++ .../integration/auto-secrets-gate.test.ts | 194 + .../integration/auto-stash-merge.test.ts | 121 + .../auto-worktree-milestone-merge.test.ts | 857 +++++ .../tests/integration/auto-worktree.test.ts | 348 ++ .../tests/integration/continue-here.test.ts | 281 ++ .../doctor-completion-deferral.test.ts | 88 + .../integration/doctor-delimiter-fix.test.ts | 83 + .../integration/doctor-enhancements.test.ts | 243 ++ .../doctor-environment-worktree.test.ts | 164 + .../integration/doctor-environment.test.ts | 403 ++ .../doctor-false-positives.test.ts | 243 ++ .../tests/integration/doctor-fixlevel.test.ts | 263 ++ .../sf/tests/integration/doctor-git.test.ts | 725 ++++ .../integration/doctor-proactive.test.ts | 325 ++ .../doctor-roadmap-summary-atomicity.test.ts | 123 + .../tests/integration/doctor-runtime.test.ts | 377 ++ .../sf/tests/integration/doctor.test.ts | 612 +++ .../e2e-workflow-pipeline-integration.test.ts | 476 +++ ...ature-branch-lifecycle-integration.test.ts | 415 ++ .../sf/tests/integration/git-locale.test.ts | 119 + .../tests/integration/git-self-heal.test.ts | 131 + .../sf/tests/integration/git-service.test.ts | 1548 ++++++++ .../gitignore-staging-2570.test.ts | 150 + .../integration/gitignore-tracked-sf.test.ts | 256 ++ .../sf/tests/integration/headless-command.ts | 534 +++ .../tests/integration/idle-recovery.test.ts | 393 ++ .../inherited-repo-home-dir.test.ts | 191 + .../integration/integration-lifecycle.test.ts | 266 ++ .../integration-mixed-milestones.test.ts | 539 +++ .../integration/integration-proof.test.ts | 634 ++++ .../integration/merge-cwd-restore.test.ts | 169 + .../tests/integration/migrate-command.test.ts | 360 ++ .../milestone-transition-worktree.test.ts | 166 + .../tests/integration/parallel-merge.test.ts | 577 +++ ...rallel-workers-multi-milestone-e2e.test.ts | 337 ++ .../sf/tests/integration/paths.test.ts | 98 + .../integration/plugin-importer-live.test.ts | 481 +++ .../queue-completed-milestone-perf.test.ts | 155 + .../integration/queue-reorder-e2e.test.ts | 335 ++ .../quick-branch-lifecycle.test.ts | 253 ++ .../sf/tests/integration/run-uat.test.ts | 609 +++ .../state-machine-edge-cases.test.ts | 1192 ++++++ .../state-machine-live-validation.test.ts | 957 +++++ .../state-machine-runtime-failures.test.ts | 841 ++++ .../tests/integration/token-savings.test.ts | 364 ++ .../sf/tests/integration/worktree-e2e.test.ts | 237 ++ .../tests/interactive-routing-bypass.test.ts | 207 + .../interactive-tool-idle-exemption.test.ts | 119 + .../sf/tests/interrupted-session-auto.test.ts | 146 + .../sf/tests/interrupted-session-ui.test.ts | 136 + .../tests/isolation-none-branch-guard.test.ts | 62 + .../tests/iterate-engine-integration.test.ts | 429 +++ .../sf/tests/journal-integration.test.ts | 669 ++++ .../sf/tests/journal-query-tool.test.ts | 147 + .../extensions/sf/tests/journal.test.ts | 341 ++ .../sf/tests/json-persistence-atomic.test.ts | 183 + .../extensions/sf/tests/key-manager.test.ts | 492 +++ .../extensions/sf/tests/knowledge.test.ts | 250 ++ .../sf/tests/lazy-pi-tui-import.test.ts | 15 + .../sf/tests/manifest-status.test.ts | 274 ++ .../sf/tests/markdown-renderer.test.ts | 1161 ++++++ .../sf/tests/marketplace-test-fixtures.ts | 91 + .../sf/tests/mcp-project-config.test.ts | 89 + .../extensions/sf/tests/mcp-status.test.ts | 118 + .../extensions/sf/tests/md-importer.test.ts | 415 ++ .../extensions/sf/tests/measurement.test.ts | 531 +++ .../sf/tests/memory-extractor.test.ts | 254 ++ .../sf/tests/memory-leak-guards.test.ts | 91 + .../tests/memory-pressure-stuck-state.test.ts | 54 + .../extensions/sf/tests/memory-store.test.ts | 331 ++ .../tests/merge-conflict-stops-loop.test.ts | 66 + .../extensions/sf/tests/metrics.test.ts | 499 +++ .../tests/migrate-external-worktree.test.ts | 105 + .../sf/tests/migrate-hierarchy.test.ts | 429 +++ .../sf/tests/migrate-parser.test.ts | 748 ++++ .../sf/tests/migrate-transformer.test.ts | 619 +++ .../tests/migrate-validator-parsers.test.ts | 390 ++ .../tests/migrate-writer-integration.test.ts | 294 ++ .../sf/tests/migrate-writer.test.ts | 361 ++ .../sf/tests/milestone-id-reservation.test.ts | 73 + .../sf/tests/milestone-report-path.test.ts | 51 + .../milestone-status-authoritative.test.ts | 116 + .../sf/tests/milestone-status-tool.test.ts | 201 + ...milestone-transition-state-rebuild.test.ts | 130 + .../sf/tests/model-cost-table.test.ts | 103 + .../sf/tests/model-isolation.test.ts | 305 ++ .../extensions/sf/tests/model-router.test.ts | 758 ++++ .../sf/tests/model-unittype-mapping.test.ts | 220 ++ .../sf/tests/must-have-parser.test.ts | 278 ++ .../sf/tests/namespaced-registry.test.ts | 1027 +++++ .../sf/tests/namespaced-resolver.test.ts | 671 ++++ .../native-git-bridge-exec-fallback.test.ts | 140 + .../sf/tests/native-has-changes-cache.test.ts | 61 + .../needs-remediation-revalidation.test.ts | 48 + .../sf/tests/next-milestone-id.test.ts | 23 + .../sf/tests/none-mode-gates.test.ts | 152 + .../sf/tests/note-captures-executed.test.ts | 46 + .../sf/tests/notification-overlay.test.ts | 73 + .../sf/tests/notification-store.test.ts | 317 ++ .../sf/tests/notification-widget.test.ts | 26 + .../sf/tests/notifications-handler.test.ts | 90 + .../extensions/sf/tests/notifications.test.ts | 134 + .../sf/tests/orphaned-worktree-audit.test.ts | 189 + .../extensions/sf/tests/overrides.test.ts | 124 + .../tests/parallel-budget-atomicity.test.ts | 330 ++ .../sf/tests/parallel-commit-scope.test.ts | 159 + .../sf/tests/parallel-crash-recovery.test.ts | 284 ++ .../tests/parallel-eligibility-ghost.test.ts | 150 + .../sf/tests/parallel-monitor-overlay.test.ts | 82 + .../sf/tests/parallel-orchestration.test.ts | 736 ++++ ...rallel-orchestrator-zombie-cleanup.test.ts | 277 ++ .../tests/parallel-research-dispatch.test.ts | 146 + .../parallel-worker-lock-contention.test.ts | 226 ++ .../tests/parallel-worker-monitoring.test.ts | 199 + .../extensions/sf/tests/park-db-sync.test.ts | 103 + .../sf/tests/park-edge-cases.test.ts | 253 ++ .../sf/tests/park-milestone.test.ts | 418 ++ .../extensions/sf/tests/parsers.test.ts | 1892 +++++++++ .../sf/tests/phantom-ghost-detection.test.ts | 55 + .../phantom-milestone-default-queued.test.ts | 39 + .../extensions/sf/tests/phase-anchor.test.ts | 83 + .../phases-merge-error-stops-auto.test.ts | 103 + ...an-milestone-artifact-verification.test.ts | 62 + .../plan-milestone-queue-context.test.ts | 48 + .../sf/tests/plan-milestone-title.test.ts | 71 + .../sf/tests/plan-milestone.test.ts | 295 ++ .../sf/tests/plan-quality-validator.test.ts | 474 +++ .../sf/tests/plan-slice-prompt.test.ts | 298 ++ .../extensions/sf/tests/plan-slice.test.ts | 179 + .../extensions/sf/tests/plan-task.test.ts | 145 + .../sf/tests/planning-crossval.test.ts | 305 ++ .../sf/tests/plugin-importer.test.ts | 1383 +++++++ .../sf/tests/post-exec-retry-bypass.test.ts | 390 ++ .../sf/tests/post-execution-checks.test.ts | 813 ++++ .../sf/tests/post-mutation-hook.test.ts | 171 + .../sf/tests/post-unit-hooks.test.ts | 300 ++ .../sf/tests/post-unit-state-rebuild.test.ts | 35 + .../sf/tests/pre-exec-backtick-strip.test.ts | 115 + .../sf/tests/pre-execution-checks.test.ts | 1312 +++++++ .../tests/pre-execution-fail-closed.test.ts | 266 ++ .../tests/pre-execution-pause-wiring.test.ts | 496 +++ .../sf/tests/preferences-formatting.test.ts | 87 + .../tests/preferences-worktree-sync.test.ts | 133 + .../extensions/sf/tests/preferences.test.ts | 672 ++++ .../preflight-context-draft-filter.test.ts | 115 + .../tests/project-relocation-recovery.test.ts | 297 ++ .../sf/tests/project-root-cwd-crash.test.ts | 53 + .../projection-no-plan-overwrite.test.ts | 83 + .../sf/tests/projection-regression.test.ts | 269 ++ .../tests/prompt-budget-enforcement.test.ts | 464 +++ .../sf/tests/prompt-cache-optimizer.test.ts | 314 ++ .../sf/tests/prompt-contracts.test.ts | 315 ++ .../extensions/sf/tests/prompt-db.test.ts | 387 ++ .../tests/prompt-loader-replacement.test.ts | 178 + .../prompt-loader-working-directory.test.ts | 19 + .../sf/tests/prompt-ordering.test.ts | 296 ++ .../sf/tests/prompt-step-ordering.test.ts | 85 + .../tests/prompt-system-gate-coverage.test.ts | 208 + .../sf/tests/prompt-tool-names.test.ts | 69 + .../sf/tests/provider-errors.test.ts | 556 +++ .../extensions/sf/tests/quality-gates.test.ts | 347 ++ .../sf/tests/query-tools-db-open.test.ts | 47 + .../sf/tests/queue-draft-detection.test.ts | 100 + .../sf/tests/queue-execution-guard.test.ts | 166 + .../extensions/sf/tests/queue-order.test.ts | 192 + .../sf/tests/queued-discuss-fast-path.test.ts | 107 + .../sf/tests/quick-auto-guard.test.ts | 100 + .../sf/tests/quick-turn-end-cleanup.test.ts | 90 + .../tests/rate-limit-model-fallback.test.ts | 90 + .../sf/tests/reactive-executor.test.ts | 511 +++ .../sf/tests/reactive-graph.test.ts | 363 ++ .../sf/tests/reassess-detection.test.ts | 154 + .../sf/tests/reassess-handler.test.ts | 442 +++ .../sf/tests/reassess-prompt.test.ts | 135 + .../tests/reconciliation-edge-cases.test.ts | 162 + .../sf/tests/recovery-attempts-reset.test.ts | 176 + .../sf/tests/regex-hardening.test.ts | 281 ++ .../sf/tests/register-extension-guard.test.ts | 59 + .../register-hooks-depth-verification.test.ts | 97 + .../sf/tests/register-shortcuts.test.ts | 131 + .../remediation-completion-guard.test.ts | 110 + .../sf/tests/remote-questions.test.ts | 874 +++++ .../extensions/sf/tests/remote-status.test.ts | 99 + .../extensions/sf/tests/reopen-slice.test.ts | 155 + .../extensions/sf/tests/reopen-task.test.ts | 165 + .../sf/tests/replan-handler.test.ts | 410 ++ .../extensions/sf/tests/replan-slice.test.ts | 606 +++ .../sf/tests/repo-identity-worktree.test.ts | 231 ++ .../extensions/sf/tests/requirements.test.ts | 101 + .../extensions/sf/tests/resolve-ts-hooks.mjs | 23 + .../extensions/sf/tests/resolve-ts.mjs | 5 + .../tests/resource-loader-import-path.test.ts | 38 + .../tests/restore-tools-after-discuss.test.ts | 63 + .../tests/retry-diagnostic-reasoning.test.ts | 161 + .../sf/tests/retry-state-reset.test.ts | 305 ++ .../sf/tests/rewrite-count-persist.test.ts | 82 + .../sf/tests/roadmap-parse-regression.test.ts | 399 ++ .../sf/tests/roadmap-slices.test.ts | 464 +++ .../sf/tests/rogue-file-detection.test.ts | 295 ++ .../sf/tests/routing-history.test.ts | 229 ++ .../extensions/sf/tests/rule-registry.test.ts | 411 ++ .../extensions/sf/tests/run-manager.test.ts | 229 ++ .../sf/tests/run-uat-replay-cap.test.ts | 51 + .../sf/tests/schema-v9-sequence.test.ts | 176 + .../sf/tests/secure-env-collect.test.ts | 364 ++ .../extensions/sf/tests/service-tier.test.ts | 127 + .../sf/tests/session-lock-multipath.test.ts | 166 + .../sf/tests/session-lock-regression.test.ts | 315 ++ .../tests/session-lock-transient-read.test.ts | 224 ++ .../sf/tests/session-model-override.test.ts | 35 + .../extensions/sf/tests/sf-db.test.ts | 523 +++ .../extensions/sf/tests/sf-inspect.test.ts | 114 + .../sf/tests/sf-no-project-error.test.ts | 73 + .../extensions/sf/tests/sf-recover.test.ts | 440 +++ .../extensions/sf/tests/sf-tools.test.ts | 441 +++ .../tests/sfroot-worktree-detection.test.ts | 164 + .../extensions/sf/tests/shared-wal.test.ts | 239 ++ .../sf/tests/show-config-command.test.ts | 56 + .../extensions/sf/tests/sidecar-queue.test.ts | 181 + .../sf/tests/signal-handlers.test.ts | 103 + .../sf/tests/silent-catch-diagnostics.test.ts | 284 ++ .../sf/tests/single-writer-invariant.test.ts | 180 + .../sf/tests/skill-activation.test.ts | 233 ++ .../extensions/sf/tests/skill-catalog.test.ts | 193 + .../sf/tests/skill-lifecycle.test.ts | 126 + .../sf/tests/skip-slice-state-rebuild.test.ts | 31 + .../skipped-validation-completion.test.ts | 39 + .../sf/tests/slice-context-injection.test.ts | 50 + .../sf/tests/slice-disk-reconcile.test.ts | 233 ++ .../sf/tests/slice-parallel-conflict.test.ts | 92 + .../tests/slice-parallel-eligibility.test.ts | 95 + .../tests/slice-parallel-orchestrator.test.ts | 83 + .../sf/tests/slice-sequence-insert.test.ts | 51 + .../sf/tests/smart-entry-complete.test.ts | 53 + .../sf/tests/smart-entry-draft.test.ts | 123 + .../sf/tests/sqlite-unavailable-gate.test.ts | 65 + .../sf/tests/stale-lockfile-recovery.test.ts | 36 + .../stale-milestone-id-reservation.test.ts | 79 + .../sf/tests/stale-queued-milestone.test.ts | 147 + .../sf/tests/stale-slice-rows.test.ts | 41 + .../sf/tests/stale-worktree-cwd.test.ts | 152 + .../sf/tests/stalled-tool-recovery.test.ts | 100 + .../sf/tests/start-auto-detached.test.ts | 90 + .../sf/tests/stash-pop-sf-conflict.test.ts | 146 + .../tests/stash-queued-context-files.test.ts | 326 ++ .../sf/tests/state-corruption-2945.test.ts | 405 ++ .../sf/tests/state-derivation-parity.test.ts | 257 ++ .../state-machine-full-walkthrough.test.ts | 1625 ++++++++ .../sf/tests/status-db-open.test.ts | 47 + .../extensions/sf/tests/status-guards.test.ts | 34 + .../sf/tests/steer-worktree-path.test.ts | 108 + .../sf/tests/stop-auto-merge-back.test.ts | 67 + .../sf/tests/stop-auto-race-null-unit.test.ts | 106 + .../sf/tests/stop-auto-remote.test.ts | 158 + .../sf/tests/stop-backtrack.test.ts | 216 ++ .../tests/structured-data-formatter.test.ts | 366 ++ .../sf/tests/stuck-detection-coverage.test.ts | 217 ++ .../sf/tests/subagent-agent-discovery.test.ts | 91 + .../sf/tests/subagent-model-dispatch.test.ts | 267 ++ .../sf/tests/summary-render-parity.test.ts | 221 ++ .../sf/tests/survivor-branch-complete.test.ts | 108 + .../tests/symlink-extension-discovery.test.ts | 125 + .../tests/symlink-numbered-variants.test.ts | 145 + .../extensions/sf/tests/sync-lock.test.ts | 122 + .../tests/sync-worktree-skip-current.test.ts | 65 + .../sf/tests/terminated-transient.test.ts | 128 + .../extensions/sf/tests/test-helpers.ts | 61 + .../extensions/sf/tests/test-utils.ts | 165 + .../sf/tests/token-cost-display.test.ts | 118 + .../extensions/sf/tests/token-counter.test.ts | 129 + .../extensions/sf/tests/token-profile.test.ts | 271 ++ .../sf/tests/tool-call-loop-guard.test.ts | 179 + .../sf/tests/tool-compatibility.test.ts | 199 + .../tool-invocation-error-loop-break.test.ts | 138 + .../extensions/sf/tests/tool-naming.test.ts | 125 + .../sf/tests/tool-param-optionality.test.ts | 349 ++ .../sf/tests/triage-dispatch.test.ts | 345 ++ .../sf/tests/triage-resolution.test.ts | 564 +++ .../uat-stuck-loop-orphaned-worktree.test.ts | 289 ++ .../extensions/sf/tests/unborn-branch.test.ts | 85 + .../extensions/sf/tests/undo.test.ts | 462 +++ .../sf/tests/unique-milestone-ids.test.ts | 203 + .../sf/tests/unit-ownership.test.ts | 258 ++ .../extensions/sf/tests/unit-runtime.test.ts | 257 ++ ...uctured-continue-context-injection.test.ts | 163 + .../sf/tests/uok-audit-unified.test.ts | 101 + .../extensions/sf/tests/uok-contracts.test.ts | 85 + .../sf/tests/uok-execution-graph.test.ts | 69 + .../extensions/sf/tests/uok-flags.test.ts | 39 + .../sf/tests/uok-gate-runner.test.ts | 70 + .../sf/tests/uok-gitops-turn-action.test.ts | 85 + .../sf/tests/uok-gitops-wiring.test.ts | 35 + .../sf/tests/uok-model-policy.test.ts | 89 + .../sf/tests/uok-plan-v2-wiring.test.ts | 167 + .../sf/tests/uok-preferences.test.ts | 66 + .../sf/tests/update-command.test.ts | 86 + .../sf/tests/vacuous-truth-slices.test.ts | 115 + .../sf/tests/vacuum-recovery.test.ts | 154 + .../sf/tests/validate-directory.test.ts | 269 ++ ...estone-prompt-verification-classes.test.ts | 18 + .../validate-milestone-stuck-guard.test.ts | 179 + .../validate-milestone-write-order.test.ts | 154 + .../sf/tests/validate-milestone.test.ts | 504 +++ .../sf/tests/validation-gate-patterns.test.ts | 166 + .../extensions/sf/tests/validation.test.ts | 72 + .../sf/tests/verdict-parser.test.ts | 156 + .../sf/tests/verification-evidence.test.ts | 601 +++ .../sf/tests/verification-gate.test.ts | 999 +++++ .../verification-operational-gate.test.ts | 108 + .../tests/verify-artifact-tightened.test.ts | 89 + .../sf/tests/visualizer-critical-path.test.ts | 143 + .../sf/tests/visualizer-data.test.ts | 444 +++ .../sf/tests/visualizer-overlay.test.ts | 294 ++ .../sf/tests/visualizer-views.test.ts | 716 ++++ .../tests/wave1-critical-regressions.test.ts | 49 + .../sf/tests/wave2-events-regressions.test.ts | 48 + .../tests/wave3-session-regressions.test.ts | 47 + .../wave4-write-safety-regressions.test.ts | 70 + .../wave5-consistency-regressions.test.ts | 165 + .../tests/windows-path-normalization.test.ts | 97 + .../sf/tests/worker-model-override.test.ts | 48 + .../sf/tests/worker-registry.test.ts | 146 + .../sf/tests/workflow-events.test.ts | 205 + .../sf/tests/workflow-logger-audit.test.ts | 123 + .../sf/tests/workflow-logger-wiring.test.ts | 223 ++ .../sf/tests/workflow-logger.test.ts | 395 ++ .../sf/tests/workflow-manifest.test.ts | 278 ++ .../sf/tests/workflow-mcp-auto-prep.test.ts | 76 + .../extensions/sf/tests/workflow-mcp.test.ts | 695 ++++ .../sf/tests/workflow-projections.test.ts | 173 + .../sf/tests/workflow-reconcile.test.ts | 91 + .../sf/tests/workflow-templates.test.ts | 171 + .../sf/tests/workflow-tool-executors.test.ts | 647 ++++ .../sf/tests/workspace-index.test.ts | 38 + .../sf/tests/worktree-bugfix.test.ts | 117 + .../sf/tests/worktree-db-integration.test.ts | 202 + .../worktree-db-respawn-truncation.test.ts | 219 ++ .../sf/tests/worktree-db-same-file.test.ts | 175 + .../extensions/sf/tests/worktree-db.test.ts | 445 +++ .../tests/worktree-expected-warnings.test.ts | 38 + .../sf/tests/worktree-health-dispatch.test.ts | 175 + .../sf/tests/worktree-health-monorepo.test.ts | 73 + .../sf/tests/worktree-health.test.ts | 181 + .../sf/tests/worktree-integration.test.ts | 216 ++ .../sf/tests/worktree-journal-events.test.ts | 220 ++ .../sf/tests/worktree-main-branch.test.ts | 20 + .../sf/tests/worktree-manager.test.ts | 238 ++ .../tests/worktree-nested-git-safety.test.ts | 101 + .../tests/worktree-post-create-hook.test.ts | 165 + .../tests/worktree-preferences-sync.test.ts | 155 + .../sf/tests/worktree-resolver.test.ts | 996 +++++ .../tests/worktree-submodule-safety.test.ts | 65 + .../sf/tests/worktree-symlink-removal.test.ts | 133 + .../sf/tests/worktree-sync-milestones.test.ts | 616 +++ .../worktree-sync-overwrite-loop.test.ts | 204 + .../sf/tests/worktree-sync-tasks.test.ts | 210 + .../sf/tests/worktree-teardown-safety.test.ts | 148 + .../extensions/sf/tests/worktree.test.ts | 296 ++ .../extensions/sf/tests/write-gate.test.ts | 490 +++ .../sf/tests/write-intercept.test.ts | 76 + .../tests/zero-slice-roadmap-guided.test.ts | 19 + .../sf/tests/zombie-sf-state.test.ts | 95 + src/resources/extensions/sf/token-counter.ts | 65 + .../extensions/sf/tools/complete-milestone.ts | 250 ++ .../extensions/sf/tools/complete-slice.ts | 459 +++ .../extensions/sf/tools/complete-task.ts | 339 ++ .../extensions/sf/tools/plan-milestone.ts | 328 ++ .../extensions/sf/tools/plan-slice.ts | 252 ++ .../extensions/sf/tools/plan-task.ts | 151 + .../extensions/sf/tools/reassess-roadmap.ts | 289 ++ .../extensions/sf/tools/reopen-milestone.ts | 152 + .../extensions/sf/tools/reopen-slice.ts | 152 + .../extensions/sf/tools/reopen-task.ts | 146 + .../extensions/sf/tools/replan-slice.ts | 242 ++ .../extensions/sf/tools/validate-milestone.ts | 200 + .../sf/tools/workflow-tool-executors.ts | 659 ++++ .../extensions/sf/triage-resolution.ts | 578 +++ src/resources/extensions/sf/triage-ui.ts | 196 + src/resources/extensions/sf/types.ts | 646 ++++ src/resources/extensions/sf/undo.ts | 465 +++ src/resources/extensions/sf/unit-id.ts | 14 + src/resources/extensions/sf/unit-ownership.ts | 275 ++ src/resources/extensions/sf/unit-runtime.ts | 189 + .../extensions/sf/uok/audit-toggle.ts | 11 + src/resources/extensions/sf/uok/audit.ts | 51 + src/resources/extensions/sf/uok/contracts.ts | 135 + .../extensions/sf/uok/execution-graph.ts | 241 ++ src/resources/extensions/sf/uok/flags.ts | 45 + .../extensions/sf/uok/gate-runner.ts | 146 + src/resources/extensions/sf/uok/gitops.ts | 75 + src/resources/extensions/sf/uok/kernel.ts | 105 + .../extensions/sf/uok/loop-adapter.ts | 162 + .../extensions/sf/uok/model-policy.ts | 112 + src/resources/extensions/sf/uok/plan-v2.ts | 156 + .../extensions/sf/validate-directory.ts | 186 + src/resources/extensions/sf/validation.ts | 23 + src/resources/extensions/sf/verdict-parser.ts | 110 + .../extensions/sf/verification-evidence.ts | 270 ++ .../extensions/sf/verification-gate.ts | 634 ++++ .../extensions/sf/visualizer-data.ts | 953 +++++ .../extensions/sf/visualizer-overlay.ts | 570 +++ .../extensions/sf/visualizer-views.ts | 1229 ++++++ .../extensions/sf/watch/header-renderer.ts | 275 ++ .../extensions/sf/workflow-engine.ts | 38 + .../extensions/sf/workflow-events.ts | 166 + .../extensions/sf/workflow-logger.ts | 351 ++ .../extensions/sf/workflow-manifest.ts | 256 ++ .../extensions/sf/workflow-mcp-auto-prep.ts | 76 + src/resources/extensions/sf/workflow-mcp.ts | 389 ++ .../extensions/sf/workflow-migration.ts | 339 ++ .../extensions/sf/workflow-projections.ts | 490 +++ .../extensions/sf/workflow-reconcile.ts | 681 ++++ .../extensions/sf/workflow-templates.ts | 261 ++ .../sf/workflow-templates/bugfix.md | 87 + .../sf/workflow-templates/dep-upgrade.md | 74 + .../sf/workflow-templates/full-project.md | 41 + .../sf/workflow-templates/hotfix.md | 45 + .../sf/workflow-templates/refactor.md | 83 + .../sf/workflow-templates/registry.json | 85 + .../sf/workflow-templates/security-audit.md | 73 + .../sf/workflow-templates/small-feature.md | 81 + .../extensions/sf/workflow-templates/spike.md | 69 + .../extensions/sf/workspace-index.ts | 272 ++ .../sf/worktree-command-bootstrap.ts | 46 + .../extensions/sf/worktree-command.ts | 846 +++++ .../extensions/sf/worktree-health.ts | 178 + .../extensions/sf/worktree-manager.ts | 712 ++++ .../extensions/sf/worktree-resolver.ts | 644 ++++ src/resources/extensions/sf/worktree.ts | 346 ++ .../extensions/sf/write-intercept.ts | 99 + .../extensions/shared/next-action-ui.ts | 4 +- src/resources/extensions/shared/rtk.ts | 14 +- ...e-state.test.ts => sf-phase-state.test.ts} | 34 +- src/resources/extensions/shared/ui.ts | 2 +- src/resources/extensions/subagent/index.ts | 12 +- .../extensions/subagent/isolation.ts | 2 +- .../extensions/subagent/worker-registry.ts | 2 +- src/resources/extensions/ttsr/rule-loader.ts | 2 +- .../extensions/voice/speech-recognizer.py | 4 +- src/resources/skills/create-skill/SKILL.md | 4 +- .../references/gsd-skill-ecosystem.md | 12 +- .../workflows/create-new-skill.md | 2 +- src/resources/skills/create-workflow/SKILL.md | 2 +- src/rtk.ts | 30 +- src/security-overrides.ts | 4 +- src/startup-timings.ts | 4 +- src/tests/app-smoke.test.ts | 26 +- src/tests/auto-resume-resource-loader.test.ts | 20 +- src/tests/bridge-package-root.test.ts | 4 +- src/tests/create-gsd-extension-paths.test.ts | 2 +- src/tests/docker-template.test.ts | 4 +- src/tests/gsd-web-launcher-contract.test.ts | 2 +- src/tests/initial-gsd-header-filter.test.ts | 10 +- src/tests/integration/e2e-smoke.test.ts | 2 +- src/tests/integration/pack-install.test.ts | 6 +- src/tests/integration/web-auth-token.test.ts | 4 +- ...auto-dashboard-lock-reconciliation.test.ts | 20 +- src/tests/integration/web-boot-node24.test.ts | 8 +- .../integration/web-bridge-contract.test.ts | 38 +- .../web-bridge-package-root.test.ts | 12 +- .../web-bridge-terminal-contract.test.ts | 18 +- .../web-command-parity-contract.test.ts | 22 +- .../web-live-interaction-contract.test.ts | 6 +- .../web-live-state-contract.test.ts | 6 +- .../integration/web-mode-assembled.test.ts | 28 +- src/tests/integration/web-mode-cli.test.ts | 14 +- .../web-mode-network-flags.test.ts | 10 +- .../integration/web-mode-onboarding.test.ts | 8 +- .../web-multi-project-contract.test.ts | 48 +- .../web-onboarding-contract.test.ts | 6 +- .../web-recovery-diagnostics-contract.test.ts | 18 +- .../web-session-parity-contract.test.ts | 16 +- .../web-state-surfaces-contract.test.ts | 42 +- .../web-subprocess-module-resolution.test.ts | 12 +- src/tests/node-modules-symlink.test.ts | 18 +- src/tests/parse-cli-args.test.ts | 2 +- src/tests/pi-migration-exports.test.ts | 2 +- src/tests/postinstall.test.ts | 2 +- src/tests/pty-chat-parser.test.ts | 6 +- src/tests/resource-loader.test.ts | 4 +- src/tests/rtk-execution-seams.test.ts | 66 +- src/tests/rtk-session-stats.test.ts | 60 +- src/tests/rtk.test.ts | 30 +- src/tests/security-overrides.test.ts | 20 +- src/tests/startup-model-validation.test.ts | 2 +- src/tests/update-check.test.ts | 2 +- src/tests/update-cmd-diagnostics.test.ts | 4 +- src/tests/web-subprocess-runner.test.ts | 8 +- src/tests/welcome-screen.test.ts | 4 +- src/update-check.ts | 8 +- src/update-cmd.ts | 4 +- src/web-mode.ts | 18 +- src/web/auto-dashboard-service.ts | 8 +- src/web/bridge-service.ts | 55 +- src/web/captures-service.ts | 12 +- src/web/cleanup-service.ts | 24 +- src/web/cli-entry.ts | 61 +- src/web/doctor-service.ts | 14 +- src/web/export-service.ts | 10 +- src/web/forensics-service.ts | 6 +- src/web/history-service.ts | 6 +- src/web/hooks-service.ts | 2 +- src/web/notifications-service.ts | 12 +- src/web/onboarding-service.ts | 4 +- src/web/recovery-diagnostics-service.ts | 36 +- src/web/safe-import-meta-resolve.ts | 2 +- src/web/settings-service.ts | 26 +- src/web/skill-health-service.ts | 6 +- src/web/subprocess-runner.ts | 2 +- src/web/ts-subprocess-flags.ts | 10 +- src/web/undo-service.ts | 8 +- src/web/update-service.ts | 8 +- src/web/visualizer-service.ts | 6 +- src/welcome-screen.ts | 10 +- src/worktree-cli.ts | 30 +- studio/src/main/index.ts | 2 +- studio/src/renderer/index.html | 2 +- studio/src/renderer/src/App.tsx | 2 +- tests/fixtures/provider.ts | 4 +- tests/fixtures/record.ts | 6 +- tests/live-regression/run.ts | 10 +- tests/live/run.ts | 4 +- tests/repro-worktree-bug/repro.mjs | 8 +- tests/repro-worktree-bug/verify-fix.mjs | 22 +- .../repro-worktree-bug/verify-integration.mjs | 80 +- tests/smoke/test-help.ts | 6 +- tests/smoke/test-init.ts | 8 +- tests/smoke/test-version.ts | 6 +- vscode-extension/CHANGELOG.md | 18 +- vscode-extension/README.md | 124 +- vscode-extension/package.json | 270 +- vscode-extension/src/activity-feed.ts | 2 +- vscode-extension/src/bash-terminal.ts | 4 +- vscode-extension/src/change-tracker.ts | 2 +- vscode-extension/src/chat-participant.ts | 8 +- vscode-extension/src/code-lens.ts | 8 +- vscode-extension/src/conversation-history.ts | 8 +- vscode-extension/src/diagnostics.ts | 6 +- vscode-extension/src/extension.ts | 38 +- vscode-extension/src/file-decorations.ts | 4 +- vscode-extension/src/git-integration.ts | 4 +- vscode-extension/src/gsd-client.ts | 26 +- vscode-extension/src/line-decorations.ts | 6 +- vscode-extension/src/scm-provider.ts | 20 +- vscode-extension/src/session-tree.ts | 2 +- vscode-extension/src/sf-client.ts | 713 ++++ vscode-extension/src/slash-completion.ts | 2 +- web/app/api/boot/route.ts | 2 +- web/app/api/dev-mode/route.ts | 4 +- web/app/layout.tsx | 6 +- web/components/sf/app-shell.tsx | 10 +- web/components/sf/chat-mode.tsx | 16 +- web/components/sf/command-surface.tsx | 4 +- web/components/sf/dashboard.tsx | 2 +- web/components/sf/dual-terminal.tsx | 4 +- web/components/sf/files-view.tsx | 2 +- web/components/sf/guided-dialog.tsx | 2 +- web/components/sf/onboarding-gate.tsx | 4 +- .../sf/onboarding/step-dev-root.tsx | 2 +- web/components/sf/onboarding/step-mode.tsx | 2 +- web/components/sf/onboarding/step-remote.tsx | 2 +- web/components/sf/onboarding/step-welcome.tsx | 4 +- web/components/sf/project-welcome.tsx | 12 +- web/components/sf/projects-view.tsx | 12 +- .../sf/remaining-command-panels.tsx | 2 +- web/components/sf/scope-badge.tsx | 2 +- web/components/sf/shell-terminal.tsx | 2 +- web/components/sf/sidebar.tsx | 2 +- web/components/sf/tempCodeRunnerFile.tsx | 2 +- web/components/sf/update-banner.tsx | 2 +- web/components/sf/visualizer-view.tsx | 2 +- web/lib/__tests__/shutdown-gate.test.ts | 18 +- web/lib/auth-guard.ts | 4 +- web/lib/auth.ts | 4 +- web/lib/browser-slash-command-dispatch.ts | 16 +- web/lib/command-surface-contract.ts | 6 +- web/lib/initial-sf-header-filter.ts | 4 +- web/lib/pty-chat-parser.ts | 32 +- web/lib/pty-manager.ts | 14 +- web/lib/remaining-command-types.ts | 2 +- web/lib/sf-workspace-store.tsx | 2 +- web/lib/shutdown-gate.ts | 6 +- web/lib/workspace-status.ts | 2 +- web/lib/workspace-types.ts | 2 +- web/middleware.ts | 12 +- 1751 files changed, 256076 insertions(+), 4203 deletions(-) create mode 100644 Makefile create mode 100644 scripts/test-replace.txt create mode 100644 scripts/test-write.txt rename src/resources/{GSD-WORKFLOW.md => SF-WORKFLOW.md} (98%) create mode 100644 src/resources/extensions/sf/activity-log.ts create mode 100644 src/resources/extensions/sf/atomic-write.ts create mode 100644 src/resources/extensions/sf/auto-artifact-paths.ts create mode 100644 src/resources/extensions/sf/auto-budget.ts create mode 100644 src/resources/extensions/sf/auto-dashboard.ts create mode 100644 src/resources/extensions/sf/auto-direct-dispatch.ts create mode 100644 src/resources/extensions/sf/auto-dispatch.ts create mode 100644 src/resources/extensions/sf/auto-loop.ts create mode 100644 src/resources/extensions/sf/auto-model-selection.ts create mode 100644 src/resources/extensions/sf/auto-post-unit.ts create mode 100644 src/resources/extensions/sf/auto-prompts.ts create mode 100644 src/resources/extensions/sf/auto-recovery.ts create mode 100644 src/resources/extensions/sf/auto-start.ts create mode 100644 src/resources/extensions/sf/auto-supervisor.ts create mode 100644 src/resources/extensions/sf/auto-timeout-recovery.ts create mode 100644 src/resources/extensions/sf/auto-timers.ts create mode 100644 src/resources/extensions/sf/auto-tool-tracking.ts create mode 100644 src/resources/extensions/sf/auto-unit-closeout.ts create mode 100644 src/resources/extensions/sf/auto-utils.ts create mode 100644 src/resources/extensions/sf/auto-verification.ts create mode 100644 src/resources/extensions/sf/auto-worktree.ts create mode 100644 src/resources/extensions/sf/auto.ts create mode 100644 src/resources/extensions/sf/auto/detect-stuck.ts create mode 100644 src/resources/extensions/sf/auto/finalize-timeout.ts create mode 100644 src/resources/extensions/sf/auto/infra-errors.ts create mode 100644 src/resources/extensions/sf/auto/loop-deps.ts create mode 100644 src/resources/extensions/sf/auto/loop.ts create mode 100644 src/resources/extensions/sf/auto/phases.ts create mode 100644 src/resources/extensions/sf/auto/resolve.ts create mode 100644 src/resources/extensions/sf/auto/run-unit.ts create mode 100644 src/resources/extensions/sf/auto/session.ts create mode 100644 src/resources/extensions/sf/auto/types.ts create mode 100644 src/resources/extensions/sf/bootstrap/agent-end-recovery.ts create mode 100644 src/resources/extensions/sf/bootstrap/crash-log.ts create mode 100644 src/resources/extensions/sf/bootstrap/db-tools.ts create mode 100644 src/resources/extensions/sf/bootstrap/dynamic-tools.ts create mode 100644 src/resources/extensions/sf/bootstrap/journal-tools.ts create mode 100644 src/resources/extensions/sf/bootstrap/notify-interceptor.ts create mode 100644 src/resources/extensions/sf/bootstrap/provider-error-resume.ts create mode 100644 src/resources/extensions/sf/bootstrap/query-tools.ts create mode 100644 src/resources/extensions/sf/bootstrap/register-extension.ts create mode 100644 src/resources/extensions/sf/bootstrap/register-hooks.ts create mode 100644 src/resources/extensions/sf/bootstrap/register-shortcuts.ts create mode 100644 src/resources/extensions/sf/bootstrap/sanitize-complete-milestone.ts create mode 100644 src/resources/extensions/sf/bootstrap/system-context.ts create mode 100644 src/resources/extensions/sf/bootstrap/tool-call-loop-guard.ts create mode 100644 src/resources/extensions/sf/bootstrap/write-gate.ts create mode 100644 src/resources/extensions/sf/branch-patterns.ts create mode 100644 src/resources/extensions/sf/cache.ts create mode 100644 src/resources/extensions/sf/captures.ts create mode 100644 src/resources/extensions/sf/changelog.ts create mode 100644 src/resources/extensions/sf/claude-import.ts create mode 100644 src/resources/extensions/sf/codebase-generator.ts create mode 100644 src/resources/extensions/sf/collision-diagnostics.ts create mode 100644 src/resources/extensions/sf/commands-add-tests.ts create mode 100644 src/resources/extensions/sf/commands-backlog.ts create mode 100644 src/resources/extensions/sf/commands-bootstrap.ts create mode 100644 src/resources/extensions/sf/commands-cmux.ts create mode 100644 src/resources/extensions/sf/commands-codebase.ts create mode 100644 src/resources/extensions/sf/commands-config.ts create mode 100644 src/resources/extensions/sf/commands-do.ts create mode 100644 src/resources/extensions/sf/commands-extensions.ts create mode 100644 src/resources/extensions/sf/commands-extract-learnings.ts create mode 100644 src/resources/extensions/sf/commands-handlers.ts create mode 100644 src/resources/extensions/sf/commands-inspect.ts create mode 100644 src/resources/extensions/sf/commands-logs.ts create mode 100644 src/resources/extensions/sf/commands-maintenance.ts create mode 100644 src/resources/extensions/sf/commands-mcp-status.ts create mode 100644 src/resources/extensions/sf/commands-pr-branch.ts create mode 100644 src/resources/extensions/sf/commands-prefs-wizard.ts create mode 100644 src/resources/extensions/sf/commands-rate.ts create mode 100644 src/resources/extensions/sf/commands-session-report.ts create mode 100644 src/resources/extensions/sf/commands-ship.ts create mode 100644 src/resources/extensions/sf/commands-workflow-templates.ts create mode 100644 src/resources/extensions/sf/commands.ts create mode 100644 src/resources/extensions/sf/commands/catalog.ts create mode 100644 src/resources/extensions/sf/commands/context.ts create mode 100644 src/resources/extensions/sf/commands/dispatcher.ts create mode 100644 src/resources/extensions/sf/commands/handlers/auto.ts create mode 100644 src/resources/extensions/sf/commands/handlers/core.ts create mode 100644 src/resources/extensions/sf/commands/handlers/notifications-handler.ts create mode 100644 src/resources/extensions/sf/commands/handlers/ops.ts create mode 100644 src/resources/extensions/sf/commands/handlers/parallel.ts create mode 100644 src/resources/extensions/sf/commands/handlers/workflow.ts create mode 100644 src/resources/extensions/sf/commands/index.ts create mode 100644 src/resources/extensions/sf/complexity-classifier.ts create mode 100644 src/resources/extensions/sf/config-overlay.ts create mode 100644 src/resources/extensions/sf/constants.ts create mode 100644 src/resources/extensions/sf/context-budget.ts create mode 100644 src/resources/extensions/sf/context-injector.ts create mode 100644 src/resources/extensions/sf/context-masker.ts create mode 100644 src/resources/extensions/sf/context-store.ts create mode 100644 src/resources/extensions/sf/crash-recovery.ts create mode 100644 src/resources/extensions/sf/custom-execution-policy.ts create mode 100644 src/resources/extensions/sf/custom-verification.ts create mode 100644 src/resources/extensions/sf/custom-workflow-engine.ts create mode 100644 src/resources/extensions/sf/dashboard-overlay.ts create mode 100644 src/resources/extensions/sf/db-writer.ts create mode 100644 src/resources/extensions/sf/debug-logger.ts create mode 100644 src/resources/extensions/sf/definition-io.ts create mode 100644 src/resources/extensions/sf/definition-loader.ts create mode 100644 src/resources/extensions/sf/detection.ts create mode 100644 src/resources/extensions/sf/dev-execution-policy.ts create mode 100644 src/resources/extensions/sf/dev-workflow-engine.ts create mode 100644 src/resources/extensions/sf/diff-context.ts create mode 100644 src/resources/extensions/sf/dispatch-guard.ts create mode 100644 src/resources/extensions/sf/docs/claude-marketplace-import.md create mode 100644 src/resources/extensions/sf/docs/preferences-reference.md create mode 100644 src/resources/extensions/sf/doctor-checks.ts create mode 100644 src/resources/extensions/sf/doctor-engine-checks.ts create mode 100644 src/resources/extensions/sf/doctor-environment.ts create mode 100644 src/resources/extensions/sf/doctor-format.ts create mode 100644 src/resources/extensions/sf/doctor-git-checks.ts create mode 100644 src/resources/extensions/sf/doctor-global-checks.ts create mode 100644 src/resources/extensions/sf/doctor-proactive.ts create mode 100644 src/resources/extensions/sf/doctor-providers.ts create mode 100644 src/resources/extensions/sf/doctor-runtime-checks.ts create mode 100644 src/resources/extensions/sf/doctor-types.ts create mode 100644 src/resources/extensions/sf/doctor.ts create mode 100644 src/resources/extensions/sf/engine-resolver.ts create mode 100644 src/resources/extensions/sf/engine-types.ts create mode 100644 src/resources/extensions/sf/env-utils.ts create mode 100644 src/resources/extensions/sf/error-classifier.ts create mode 100644 src/resources/extensions/sf/error-utils.ts create mode 100644 src/resources/extensions/sf/errors.ts create mode 100644 src/resources/extensions/sf/execution-policy.ts create mode 100644 src/resources/extensions/sf/exit-command.ts create mode 100644 src/resources/extensions/sf/export-html.ts create mode 100644 src/resources/extensions/sf/export.ts create mode 100644 src/resources/extensions/sf/extension-manifest.json create mode 100644 src/resources/extensions/sf/file-lock.ts create mode 100644 src/resources/extensions/sf/files.ts create mode 100644 src/resources/extensions/sf/forensics.ts create mode 100644 src/resources/extensions/sf/gate-registry.ts create mode 100644 src/resources/extensions/sf/git-constants.ts create mode 100644 src/resources/extensions/sf/git-self-heal.ts create mode 100644 src/resources/extensions/sf/git-service.ts create mode 100644 src/resources/extensions/sf/gitignore.ts create mode 100644 src/resources/extensions/sf/graph-context.ts create mode 100644 src/resources/extensions/sf/graph.ts create mode 100644 src/resources/extensions/sf/guided-flow-queue.ts create mode 100644 src/resources/extensions/sf/guided-flow.ts create mode 100644 src/resources/extensions/sf/health-widget-core.ts create mode 100644 src/resources/extensions/sf/health-widget.ts create mode 100644 src/resources/extensions/sf/history.ts create mode 100644 src/resources/extensions/sf/index.ts create mode 100644 src/resources/extensions/sf/init-wizard.ts create mode 100644 src/resources/extensions/sf/interrupted-session.ts create mode 100644 src/resources/extensions/sf/journal.ts create mode 100644 src/resources/extensions/sf/json-persistence.ts create mode 100644 src/resources/extensions/sf/jsonl-utils.ts create mode 100644 src/resources/extensions/sf/key-manager.ts create mode 100644 src/resources/extensions/sf/learning/bayesian-blender.mjs create mode 100644 src/resources/extensions/sf/learning/bayesian-blender.test.mjs create mode 100644 src/resources/extensions/sf/learning/data/model-benchmarks.json create mode 100644 src/resources/extensions/sf/learning/data/primary-provider-chain.json create mode 100644 src/resources/extensions/sf/learning/data/unit-weights.json create mode 100644 src/resources/extensions/sf/learning/fallback-chain-writer.mjs create mode 100644 src/resources/extensions/sf/learning/fallback-chain-writer.test.mjs create mode 100644 src/resources/extensions/sf/learning/hook-handler.mjs create mode 100644 src/resources/extensions/sf/learning/hook-handler.test.mjs create mode 100644 src/resources/extensions/sf/learning/index.mjs create mode 100644 src/resources/extensions/sf/learning/integration.test.mjs create mode 100644 src/resources/extensions/sf/learning/loadCapabilityOverrides.mjs create mode 100644 src/resources/extensions/sf/learning/loadCapabilityOverrides.test.mjs create mode 100644 src/resources/extensions/sf/learning/outcome-aggregator.mjs create mode 100644 src/resources/extensions/sf/learning/outcome-recorder.mjs create mode 100644 src/resources/extensions/sf/learning/outcome-recorder.test.mjs create mode 100644 src/resources/extensions/sf/learning/outcome-schema.sql create mode 100644 src/resources/extensions/sf/learning/runtime.ts create mode 100644 src/resources/extensions/sf/markdown-renderer.ts create mode 100644 src/resources/extensions/sf/marketplace-discovery.ts create mode 100644 src/resources/extensions/sf/mcp-project-config.ts create mode 100644 src/resources/extensions/sf/md-importer.ts create mode 100644 src/resources/extensions/sf/memory-extractor.ts create mode 100644 src/resources/extensions/sf/memory-store.ts create mode 100644 src/resources/extensions/sf/metrics.ts create mode 100644 src/resources/extensions/sf/migrate-external.ts create mode 100644 src/resources/extensions/sf/migrate/command.ts create mode 100644 src/resources/extensions/sf/migrate/index.ts create mode 100644 src/resources/extensions/sf/migrate/parser.ts create mode 100644 src/resources/extensions/sf/migrate/parsers.ts create mode 100644 src/resources/extensions/sf/migrate/preview.ts create mode 100644 src/resources/extensions/sf/migrate/transformer.ts create mode 100644 src/resources/extensions/sf/migrate/types.ts create mode 100644 src/resources/extensions/sf/migrate/validator.ts create mode 100644 src/resources/extensions/sf/migrate/writer.ts create mode 100644 src/resources/extensions/sf/milestone-actions.ts create mode 100644 src/resources/extensions/sf/milestone-id-utils.ts create mode 100644 src/resources/extensions/sf/milestone-ids.ts create mode 100644 src/resources/extensions/sf/milestone-validation-gates.ts create mode 100644 src/resources/extensions/sf/model-cost-table.ts create mode 100644 src/resources/extensions/sf/model-router.ts create mode 100644 src/resources/extensions/sf/namespaced-registry.ts create mode 100644 src/resources/extensions/sf/namespaced-resolver.ts create mode 100644 src/resources/extensions/sf/native-git-bridge.ts create mode 100644 src/resources/extensions/sf/native-parser-bridge.ts create mode 100644 src/resources/extensions/sf/notification-overlay.ts create mode 100644 src/resources/extensions/sf/notification-store.ts create mode 100644 src/resources/extensions/sf/notification-widget.ts create mode 100644 src/resources/extensions/sf/notifications.ts create mode 100644 src/resources/extensions/sf/observability-validator.ts create mode 100644 src/resources/extensions/sf/package.json create mode 100644 src/resources/extensions/sf/parallel-eligibility.ts create mode 100644 src/resources/extensions/sf/parallel-merge.ts create mode 100644 src/resources/extensions/sf/parallel-monitor-overlay.ts create mode 100644 src/resources/extensions/sf/parallel-orchestrator.ts create mode 100644 src/resources/extensions/sf/parsers-legacy.ts create mode 100644 src/resources/extensions/sf/paths.ts create mode 100644 src/resources/extensions/sf/phase-anchor.ts create mode 100644 src/resources/extensions/sf/plugin-importer.ts create mode 100644 src/resources/extensions/sf/post-execution-checks.ts create mode 100644 src/resources/extensions/sf/post-unit-hooks.ts create mode 100644 src/resources/extensions/sf/pre-execution-checks.ts create mode 100644 src/resources/extensions/sf/preferences-models.ts create mode 100644 src/resources/extensions/sf/preferences-skills.ts create mode 100644 src/resources/extensions/sf/preferences-types.ts create mode 100644 src/resources/extensions/sf/preferences-validation.ts create mode 100644 src/resources/extensions/sf/preferences.ts create mode 100644 src/resources/extensions/sf/preparation.ts create mode 100644 src/resources/extensions/sf/progress-score.ts create mode 100644 src/resources/extensions/sf/prompt-cache-optimizer.ts create mode 100644 src/resources/extensions/sf/prompt-loader.ts create mode 100644 src/resources/extensions/sf/prompt-ordering.ts create mode 100644 src/resources/extensions/sf/prompt-validation.ts create mode 100644 src/resources/extensions/sf/prompts/add-tests.md create mode 100644 src/resources/extensions/sf/prompts/complete-milestone.md create mode 100644 src/resources/extensions/sf/prompts/complete-slice.md create mode 100644 src/resources/extensions/sf/prompts/discuss-headless.md create mode 100644 src/resources/extensions/sf/prompts/discuss.md create mode 100644 src/resources/extensions/sf/prompts/doctor-heal.md create mode 100644 src/resources/extensions/sf/prompts/execute-task.md create mode 100644 src/resources/extensions/sf/prompts/forensics.md create mode 100644 src/resources/extensions/sf/prompts/gate-evaluate.md create mode 100644 src/resources/extensions/sf/prompts/guided-complete-slice.md create mode 100644 src/resources/extensions/sf/prompts/guided-discuss-milestone.md create mode 100644 src/resources/extensions/sf/prompts/guided-discuss-slice.md create mode 100644 src/resources/extensions/sf/prompts/guided-execute-task.md create mode 100644 src/resources/extensions/sf/prompts/guided-plan-milestone.md create mode 100644 src/resources/extensions/sf/prompts/guided-plan-slice.md create mode 100644 src/resources/extensions/sf/prompts/guided-research-slice.md create mode 100644 src/resources/extensions/sf/prompts/guided-resume-task.md create mode 100644 src/resources/extensions/sf/prompts/heal-skill.md create mode 100644 src/resources/extensions/sf/prompts/parallel-research-slices.md create mode 100644 src/resources/extensions/sf/prompts/plan-milestone.md create mode 100644 src/resources/extensions/sf/prompts/plan-slice.md create mode 100644 src/resources/extensions/sf/prompts/queue.md create mode 100644 src/resources/extensions/sf/prompts/quick-task.md create mode 100644 src/resources/extensions/sf/prompts/reactive-execute.md create mode 100644 src/resources/extensions/sf/prompts/reassess-roadmap.md create mode 100644 src/resources/extensions/sf/prompts/replan-slice.md create mode 100644 src/resources/extensions/sf/prompts/research-milestone.md create mode 100644 src/resources/extensions/sf/prompts/research-slice.md create mode 100644 src/resources/extensions/sf/prompts/rethink.md create mode 100644 src/resources/extensions/sf/prompts/review-migration.md create mode 100644 src/resources/extensions/sf/prompts/rewrite-docs.md create mode 100644 src/resources/extensions/sf/prompts/run-uat.md create mode 100644 src/resources/extensions/sf/prompts/system.md create mode 100644 src/resources/extensions/sf/prompts/triage-captures.md create mode 100644 src/resources/extensions/sf/prompts/validate-milestone.md create mode 100644 src/resources/extensions/sf/prompts/workflow-start.md create mode 100644 src/resources/extensions/sf/prompts/worktree-merge.md create mode 100644 src/resources/extensions/sf/provider-error-pause.ts create mode 100644 src/resources/extensions/sf/queue-order.ts create mode 100644 src/resources/extensions/sf/queue-reorder-ui.ts create mode 100644 src/resources/extensions/sf/quick.ts create mode 100644 src/resources/extensions/sf/reactive-graph.ts create mode 100644 src/resources/extensions/sf/repo-identity.ts create mode 100644 src/resources/extensions/sf/reports.ts create mode 100644 src/resources/extensions/sf/rethink.ts create mode 100644 src/resources/extensions/sf/roadmap-mutations.ts create mode 100644 src/resources/extensions/sf/roadmap-slices.ts create mode 100644 src/resources/extensions/sf/routing-history.ts create mode 100644 src/resources/extensions/sf/rule-registry.ts create mode 100644 src/resources/extensions/sf/rule-types.ts create mode 100644 src/resources/extensions/sf/run-manager.ts create mode 100644 src/resources/extensions/sf/safe-fs.ts create mode 100644 src/resources/extensions/sf/safety/content-validator.ts create mode 100644 src/resources/extensions/sf/safety/destructive-guard.ts create mode 100644 src/resources/extensions/sf/safety/evidence-collector.ts create mode 100644 src/resources/extensions/sf/safety/evidence-cross-ref.ts create mode 100644 src/resources/extensions/sf/safety/file-change-validator.ts create mode 100644 src/resources/extensions/sf/safety/git-checkpoint.ts create mode 100644 src/resources/extensions/sf/safety/safety-harness.ts create mode 100644 src/resources/extensions/sf/service-tier.ts create mode 100644 src/resources/extensions/sf/session-forensics.ts create mode 100644 src/resources/extensions/sf/session-lock.ts create mode 100644 src/resources/extensions/sf/session-model-override.ts create mode 100644 src/resources/extensions/sf/session-status-io.ts create mode 100644 src/resources/extensions/sf/sf-db.ts create mode 100644 src/resources/extensions/sf/shortcut-defs.ts create mode 100644 src/resources/extensions/sf/skill-catalog.ts create mode 100644 src/resources/extensions/sf/skill-discovery.ts create mode 100644 src/resources/extensions/sf/skill-health.ts create mode 100644 src/resources/extensions/sf/skill-telemetry.ts create mode 100644 src/resources/extensions/sf/skills/sf-headless/SKILL.md create mode 100644 src/resources/extensions/sf/skills/sf-headless/references/answer-injection.md create mode 100644 src/resources/extensions/sf/skills/sf-headless/references/commands.md create mode 100644 src/resources/extensions/sf/skills/sf-headless/references/multi-session.md create mode 100644 src/resources/extensions/sf/slice-parallel-conflict.ts create mode 100644 src/resources/extensions/sf/slice-parallel-eligibility.ts create mode 100644 src/resources/extensions/sf/slice-parallel-orchestrator.ts create mode 100644 src/resources/extensions/sf/state.ts create mode 100644 src/resources/extensions/sf/status-guards.ts create mode 100644 src/resources/extensions/sf/structured-data-formatter.ts create mode 100644 src/resources/extensions/sf/sync-lock.ts create mode 100644 src/resources/extensions/sf/templates/PREFERENCES.md create mode 100644 src/resources/extensions/sf/templates/context.md create mode 100644 src/resources/extensions/sf/templates/decisions.md create mode 100644 src/resources/extensions/sf/templates/knowledge.md create mode 100644 src/resources/extensions/sf/templates/milestone-summary.md create mode 100644 src/resources/extensions/sf/templates/milestone-validation.md create mode 100644 src/resources/extensions/sf/templates/plan.md create mode 100644 src/resources/extensions/sf/templates/project.md create mode 100644 src/resources/extensions/sf/templates/reassessment.md create mode 100644 src/resources/extensions/sf/templates/requirements.md create mode 100644 src/resources/extensions/sf/templates/research.md create mode 100644 src/resources/extensions/sf/templates/roadmap.md create mode 100644 src/resources/extensions/sf/templates/runtime.md create mode 100644 src/resources/extensions/sf/templates/secrets-manifest.md create mode 100644 src/resources/extensions/sf/templates/slice-context.md create mode 100644 src/resources/extensions/sf/templates/slice-summary.md create mode 100644 src/resources/extensions/sf/templates/state.md create mode 100644 src/resources/extensions/sf/templates/task-plan.md create mode 100644 src/resources/extensions/sf/templates/task-summary.md create mode 100644 src/resources/extensions/sf/templates/uat.md create mode 100644 src/resources/extensions/sf/tests/active-milestone-id-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/activity-log.test.ts create mode 100644 src/resources/extensions/sf/tests/agent-end-retry.test.ts create mode 100644 src/resources/extensions/sf/tests/artifact-corruption-2630.test.ts create mode 100644 src/resources/extensions/sf/tests/ask-user-questions-dedup.test.ts create mode 100644 src/resources/extensions/sf/tests/atomic-write.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-budget-alerts.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-dashboard.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-lock-creation.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-loop.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-milestone-target.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-mode-interactive-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-model-selection.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-paused-session-validation.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-paused-ui-cleanup.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-post-unit-step-message.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-pr-bugs.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-project-root-env.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-recovery.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-remediate-slice-status.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-session-encapsulation.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-stale-lock-self-kill.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-start-cold-db-bootstrap.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-start-model-capture.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-start-needs-discussion.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-start-time-persistence.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-start-worktree-db-path.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-supervisor.test.mjs create mode 100644 src/resources/extensions/sf/tests/auto-worktree-auto-resolve.test.ts create mode 100644 src/resources/extensions/sf/tests/auto-wrapup-inflight-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/autocomplete-regressions-1675.test.ts create mode 100644 src/resources/extensions/sf/tests/block-db-writes.test.ts create mode 100644 src/resources/extensions/sf/tests/bootstrap-derive-state-db-open.test.ts create mode 100644 src/resources/extensions/sf/tests/browser-teardown.test.ts create mode 100644 src/resources/extensions/sf/tests/budget-prediction.test.ts create mode 100644 src/resources/extensions/sf/tests/bundled-workflow-defs.test.ts create mode 100644 src/resources/extensions/sf/tests/cache-staleness-regression.test.ts create mode 100644 src/resources/extensions/sf/tests/capability-router.test.ts create mode 100644 src/resources/extensions/sf/tests/captures.test.ts create mode 100644 src/resources/extensions/sf/tests/claude-import-marketplace-discovery.test.ts create mode 100644 src/resources/extensions/sf/tests/claude-import-tui.test.ts create mode 100644 src/resources/extensions/sf/tests/claude-skill-dirs.test.ts create mode 100644 src/resources/extensions/sf/tests/clear-stale-autostart.test.ts create mode 100644 src/resources/extensions/sf/tests/cli-provider-rate-limit.test.ts create mode 100644 src/resources/extensions/sf/tests/cmux.test.ts create mode 100644 src/resources/extensions/sf/tests/codebase-generator.test.ts create mode 100644 src/resources/extensions/sf/tests/cold-resume-db-reopen.test.ts create mode 100644 src/resources/extensions/sf/tests/collect-from-manifest.test.ts create mode 100644 src/resources/extensions/sf/tests/collision-diagnostics.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-backlog.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-config.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-do.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-extract-learnings.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-inspect-open-db.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-logs.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-pr-branch.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-session-report.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-ship.test.ts create mode 100644 src/resources/extensions/sf/tests/commands-workflow-custom.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-milestone-false-merge.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-milestone.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-slice-gate-closure.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-slice-prompt-task-summary-layout.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-slice-string-coercion.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-slice-verification-gate.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-slice.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-task-normalize-lists.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-task-rollback-evidence.test.ts create mode 100644 src/resources/extensions/sf/tests/complete-task.test.ts create mode 100644 src/resources/extensions/sf/tests/completed-at-reconcile.test.ts create mode 100644 src/resources/extensions/sf/tests/completed-units-metrics-sync.test.ts create mode 100644 src/resources/extensions/sf/tests/completion-hierarchy-guards.test.ts create mode 100644 src/resources/extensions/sf/tests/complexity-classifier.test.ts create mode 100644 src/resources/extensions/sf/tests/context-budget.test.ts create mode 100644 src/resources/extensions/sf/tests/context-injector.test.ts create mode 100644 src/resources/extensions/sf/tests/context-masker.test.ts create mode 100644 src/resources/extensions/sf/tests/context-store.test.ts create mode 100644 src/resources/extensions/sf/tests/copy-planning-artifacts-samepath.test.ts create mode 100644 src/resources/extensions/sf/tests/core-overlay-fallback.test.ts create mode 100644 src/resources/extensions/sf/tests/cost-projection.test.ts create mode 100644 src/resources/extensions/sf/tests/crash-handler-secondary.test.ts create mode 100644 src/resources/extensions/sf/tests/crash-recovery.test.ts create mode 100644 src/resources/extensions/sf/tests/custom-engine-loop-integration.test.ts create mode 100644 src/resources/extensions/sf/tests/custom-verification.test.ts create mode 100644 src/resources/extensions/sf/tests/custom-workflow-engine.test.ts create mode 100644 src/resources/extensions/sf/tests/dashboard-budget.test.ts create mode 100644 src/resources/extensions/sf/tests/dashboard-custom-engine.test.ts create mode 100644 src/resources/extensions/sf/tests/dashboard-model-label-ordering.test.ts create mode 100644 src/resources/extensions/sf/tests/db-access-guardrails.test.ts create mode 100644 src/resources/extensions/sf/tests/db-path-worktree-symlink.test.ts create mode 100644 src/resources/extensions/sf/tests/db-writer.test.ts create mode 100644 src/resources/extensions/sf/tests/debug-logger.test.ts create mode 100644 src/resources/extensions/sf/tests/decision-scope-cascade.test.ts create mode 100644 src/resources/extensions/sf/tests/defer-milestone-stamp.test.ts create mode 100644 src/resources/extensions/sf/tests/deferred-slice-dispatch.test.ts create mode 100644 src/resources/extensions/sf/tests/definition-io.test.ts create mode 100644 src/resources/extensions/sf/tests/definition-loader.test.ts create mode 100644 src/resources/extensions/sf/tests/derive-state-crossval.test.ts create mode 100644 src/resources/extensions/sf/tests/derive-state-db-disk-reconcile.test.ts create mode 100644 src/resources/extensions/sf/tests/derive-state-db.test.ts create mode 100644 src/resources/extensions/sf/tests/derive-state-deps.test.ts create mode 100644 src/resources/extensions/sf/tests/derive-state-draft.test.ts create mode 100644 src/resources/extensions/sf/tests/derive-state-helpers.test.ts create mode 100644 src/resources/extensions/sf/tests/derive-state.test.ts create mode 100644 src/resources/extensions/sf/tests/detection.test.ts create mode 100644 src/resources/extensions/sf/tests/dev-engine-wrapper.test.ts create mode 100644 src/resources/extensions/sf/tests/diff-context.test.ts create mode 100644 src/resources/extensions/sf/tests/discord-invite-links.test.ts create mode 100644 src/resources/extensions/sf/tests/discuss-empty-db-fallback.test.ts create mode 100644 src/resources/extensions/sf/tests/discuss-incremental-persistence.test.ts create mode 100644 src/resources/extensions/sf/tests/discuss-prompt.test.ts create mode 100644 src/resources/extensions/sf/tests/discuss-queued-milestones.test.ts create mode 100644 src/resources/extensions/sf/tests/discuss-slice-structured-questions.test.ts create mode 100644 src/resources/extensions/sf/tests/discuss-tool-scope-leak.test.ts create mode 100644 src/resources/extensions/sf/tests/discuss-tool-scoping.test.ts create mode 100644 src/resources/extensions/sf/tests/dispatch-guard-closed-status.test.ts create mode 100644 src/resources/extensions/sf/tests/dispatch-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/dispatch-missing-task-plans.test.ts create mode 100644 src/resources/extensions/sf/tests/dispatch-uat-last-completed.test.ts create mode 100644 src/resources/extensions/sf/tests/dispatcher-stuck-planning.test.ts create mode 100644 src/resources/extensions/sf/tests/dist-redirect.mjs create mode 100644 src/resources/extensions/sf/tests/doctor-fix-flag.test.ts create mode 100644 src/resources/extensions/sf/tests/doctor-heal-fixable-warnings.test.ts create mode 100644 src/resources/extensions/sf/tests/doctor-providers.test.ts create mode 100644 src/resources/extensions/sf/tests/doctor-scope-db-unavailable.test.ts create mode 100644 src/resources/extensions/sf/tests/double-merge-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/draft-promotion.test.ts create mode 100644 src/resources/extensions/sf/tests/dynamic-routing-default.test.ts create mode 100644 src/resources/extensions/sf/tests/empty-content-abort-loop.test.ts create mode 100644 src/resources/extensions/sf/tests/engine-interfaces-contract.test.ts create mode 100644 src/resources/extensions/sf/tests/enhanced-verification-integration.test.ts create mode 100644 src/resources/extensions/sf/tests/ensure-db-open.test.ts create mode 100644 src/resources/extensions/sf/tests/error-success-mask.test.ts create mode 100644 src/resources/extensions/sf/tests/est-annotation-timeout.test.ts create mode 100644 src/resources/extensions/sf/tests/event-replay-idempotency.test.ts create mode 100644 src/resources/extensions/sf/tests/execute-task-prompt-existing-artifact-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/exit-command.test.ts create mode 100644 src/resources/extensions/sf/tests/export-html-all.test.ts create mode 100644 src/resources/extensions/sf/tests/export-html-enhancements.test.ts create mode 100644 src/resources/extensions/sf/tests/extension-bootstrap-isolation.test.ts create mode 100644 src/resources/extensions/sf/tests/extension-selector-separator.test.ts create mode 100644 src/resources/extensions/sf/tests/false-degraded-mode-warning.test.ts create mode 100644 src/resources/extensions/sf/tests/file-change-validator.test.ts create mode 100644 src/resources/extensions/sf/tests/file-lock.test.ts create mode 100644 src/resources/extensions/sf/tests/files-loadfile-eisdir.test.ts create mode 100644 src/resources/extensions/sf/tests/finalize-timeout-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/find-missing-summaries-closed.test.ts create mode 100644 src/resources/extensions/sf/tests/flag-file-db.test.ts create mode 100644 src/resources/extensions/sf/tests/flat-rate-routing-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/forensics-context-persist.test.ts create mode 100644 src/resources/extensions/sf/tests/forensics-db-completion.test.ts create mode 100644 src/resources/extensions/sf/tests/forensics-dedup.test.ts create mode 100644 src/resources/extensions/sf/tests/forensics-error-filter.test.ts create mode 100644 src/resources/extensions/sf/tests/forensics-issue-routing.test.ts create mode 100644 src/resources/extensions/sf/tests/forensics-journal.test.ts create mode 100644 src/resources/extensions/sf/tests/forensics-stuck-loops.test.ts create mode 100644 src/resources/extensions/sf/tests/format-shortcut.test.ts create mode 100644 src/resources/extensions/sf/tests/freeform-decisions.test.ts create mode 100644 src/resources/extensions/sf/tests/frontmatter-parse-noise.test.ts create mode 100644 src/resources/extensions/sf/tests/gate-dispatch.test.ts create mode 100644 src/resources/extensions/sf/tests/gate-registry.test.ts create mode 100644 src/resources/extensions/sf/tests/gate-storage.test.ts create mode 100644 src/resources/extensions/sf/tests/git-checkpoint.test.ts create mode 100644 src/resources/extensions/sf/tests/gitignore-bg-shell.test.ts create mode 100644 src/resources/extensions/sf/tests/graph-context.test.ts create mode 100644 src/resources/extensions/sf/tests/graph-operations.test.ts create mode 100644 src/resources/extensions/sf/tests/guided-flow-dynamic-routing.test.ts create mode 100644 src/resources/extensions/sf/tests/guided-flow-session-isolation.test.ts create mode 100644 src/resources/extensions/sf/tests/guided-flow-state-rebuild.test.ts create mode 100644 src/resources/extensions/sf/tests/headless-answers.test.ts create mode 100644 src/resources/extensions/sf/tests/headless-query.test.ts create mode 100644 src/resources/extensions/sf/tests/health-widget.test.ts create mode 100644 src/resources/extensions/sf/tests/hook-key-parsing.test.ts create mode 100644 src/resources/extensions/sf/tests/hook-model-resolution.test.ts create mode 100644 src/resources/extensions/sf/tests/idle-watchdog-stall-override.test.ts create mode 100644 src/resources/extensions/sf/tests/import-done-milestones.test.ts create mode 100644 src/resources/extensions/sf/tests/in-flight-tool-tracking.test.ts create mode 100644 src/resources/extensions/sf/tests/infra-error.test.ts create mode 100644 src/resources/extensions/sf/tests/infra-errors-cooldown.test.ts create mode 100644 src/resources/extensions/sf/tests/init-wizard.test.ts create mode 100644 src/resources/extensions/sf/tests/insert-slice-no-wipe.test.ts create mode 100644 src/resources/extensions/sf/tests/integration-edge.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/all-milestones-complete-merge.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/atomic-task-closeout.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/auto-preflight.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/auto-recovery.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/auto-secrets-gate.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/auto-stash-merge.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/auto-worktree-milestone-merge.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/auto-worktree.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/continue-here.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-completion-deferral.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-delimiter-fix.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-enhancements.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-environment-worktree.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-environment.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-false-positives.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-fixlevel.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-git.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-proactive.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-roadmap-summary-atomicity.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor-runtime.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/doctor.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/e2e-workflow-pipeline-integration.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/feature-branch-lifecycle-integration.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/git-locale.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/git-self-heal.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/git-service.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/gitignore-staging-2570.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/gitignore-tracked-sf.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/headless-command.ts create mode 100644 src/resources/extensions/sf/tests/integration/idle-recovery.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/inherited-repo-home-dir.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/integration-lifecycle.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/integration-mixed-milestones.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/integration-proof.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/merge-cwd-restore.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/migrate-command.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/milestone-transition-worktree.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/parallel-merge.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/parallel-workers-multi-milestone-e2e.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/paths.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/plugin-importer-live.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/queue-completed-milestone-perf.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/queue-reorder-e2e.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/quick-branch-lifecycle.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/run-uat.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/state-machine-edge-cases.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/state-machine-live-validation.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/state-machine-runtime-failures.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/token-savings.test.ts create mode 100644 src/resources/extensions/sf/tests/integration/worktree-e2e.test.ts create mode 100644 src/resources/extensions/sf/tests/interactive-routing-bypass.test.ts create mode 100644 src/resources/extensions/sf/tests/interactive-tool-idle-exemption.test.ts create mode 100644 src/resources/extensions/sf/tests/interrupted-session-auto.test.ts create mode 100644 src/resources/extensions/sf/tests/interrupted-session-ui.test.ts create mode 100644 src/resources/extensions/sf/tests/isolation-none-branch-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/iterate-engine-integration.test.ts create mode 100644 src/resources/extensions/sf/tests/journal-integration.test.ts create mode 100644 src/resources/extensions/sf/tests/journal-query-tool.test.ts create mode 100644 src/resources/extensions/sf/tests/journal.test.ts create mode 100644 src/resources/extensions/sf/tests/json-persistence-atomic.test.ts create mode 100644 src/resources/extensions/sf/tests/key-manager.test.ts create mode 100644 src/resources/extensions/sf/tests/knowledge.test.ts create mode 100644 src/resources/extensions/sf/tests/lazy-pi-tui-import.test.ts create mode 100644 src/resources/extensions/sf/tests/manifest-status.test.ts create mode 100644 src/resources/extensions/sf/tests/markdown-renderer.test.ts create mode 100644 src/resources/extensions/sf/tests/marketplace-test-fixtures.ts create mode 100644 src/resources/extensions/sf/tests/mcp-project-config.test.ts create mode 100644 src/resources/extensions/sf/tests/mcp-status.test.ts create mode 100644 src/resources/extensions/sf/tests/md-importer.test.ts create mode 100644 src/resources/extensions/sf/tests/measurement.test.ts create mode 100644 src/resources/extensions/sf/tests/memory-extractor.test.ts create mode 100644 src/resources/extensions/sf/tests/memory-leak-guards.test.ts create mode 100644 src/resources/extensions/sf/tests/memory-pressure-stuck-state.test.ts create mode 100644 src/resources/extensions/sf/tests/memory-store.test.ts create mode 100644 src/resources/extensions/sf/tests/merge-conflict-stops-loop.test.ts create mode 100644 src/resources/extensions/sf/tests/metrics.test.ts create mode 100644 src/resources/extensions/sf/tests/migrate-external-worktree.test.ts create mode 100644 src/resources/extensions/sf/tests/migrate-hierarchy.test.ts create mode 100644 src/resources/extensions/sf/tests/migrate-parser.test.ts create mode 100644 src/resources/extensions/sf/tests/migrate-transformer.test.ts create mode 100644 src/resources/extensions/sf/tests/migrate-validator-parsers.test.ts create mode 100644 src/resources/extensions/sf/tests/migrate-writer-integration.test.ts create mode 100644 src/resources/extensions/sf/tests/migrate-writer.test.ts create mode 100644 src/resources/extensions/sf/tests/milestone-id-reservation.test.ts create mode 100644 src/resources/extensions/sf/tests/milestone-report-path.test.ts create mode 100644 src/resources/extensions/sf/tests/milestone-status-authoritative.test.ts create mode 100644 src/resources/extensions/sf/tests/milestone-status-tool.test.ts create mode 100644 src/resources/extensions/sf/tests/milestone-transition-state-rebuild.test.ts create mode 100644 src/resources/extensions/sf/tests/model-cost-table.test.ts create mode 100644 src/resources/extensions/sf/tests/model-isolation.test.ts create mode 100644 src/resources/extensions/sf/tests/model-router.test.ts create mode 100644 src/resources/extensions/sf/tests/model-unittype-mapping.test.ts create mode 100644 src/resources/extensions/sf/tests/must-have-parser.test.ts create mode 100644 src/resources/extensions/sf/tests/namespaced-registry.test.ts create mode 100644 src/resources/extensions/sf/tests/namespaced-resolver.test.ts create mode 100644 src/resources/extensions/sf/tests/native-git-bridge-exec-fallback.test.ts create mode 100644 src/resources/extensions/sf/tests/native-has-changes-cache.test.ts create mode 100644 src/resources/extensions/sf/tests/needs-remediation-revalidation.test.ts create mode 100644 src/resources/extensions/sf/tests/next-milestone-id.test.ts create mode 100644 src/resources/extensions/sf/tests/none-mode-gates.test.ts create mode 100644 src/resources/extensions/sf/tests/note-captures-executed.test.ts create mode 100644 src/resources/extensions/sf/tests/notification-overlay.test.ts create mode 100644 src/resources/extensions/sf/tests/notification-store.test.ts create mode 100644 src/resources/extensions/sf/tests/notification-widget.test.ts create mode 100644 src/resources/extensions/sf/tests/notifications-handler.test.ts create mode 100644 src/resources/extensions/sf/tests/notifications.test.ts create mode 100644 src/resources/extensions/sf/tests/orphaned-worktree-audit.test.ts create mode 100644 src/resources/extensions/sf/tests/overrides.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-budget-atomicity.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-commit-scope.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-crash-recovery.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-eligibility-ghost.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-monitor-overlay.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-orchestration.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-orchestrator-zombie-cleanup.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-research-dispatch.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-worker-lock-contention.test.ts create mode 100644 src/resources/extensions/sf/tests/parallel-worker-monitoring.test.ts create mode 100644 src/resources/extensions/sf/tests/park-db-sync.test.ts create mode 100644 src/resources/extensions/sf/tests/park-edge-cases.test.ts create mode 100644 src/resources/extensions/sf/tests/park-milestone.test.ts create mode 100644 src/resources/extensions/sf/tests/parsers.test.ts create mode 100644 src/resources/extensions/sf/tests/phantom-ghost-detection.test.ts create mode 100644 src/resources/extensions/sf/tests/phantom-milestone-default-queued.test.ts create mode 100644 src/resources/extensions/sf/tests/phase-anchor.test.ts create mode 100644 src/resources/extensions/sf/tests/phases-merge-error-stops-auto.test.ts create mode 100644 src/resources/extensions/sf/tests/plan-milestone-artifact-verification.test.ts create mode 100644 src/resources/extensions/sf/tests/plan-milestone-queue-context.test.ts create mode 100644 src/resources/extensions/sf/tests/plan-milestone-title.test.ts create mode 100644 src/resources/extensions/sf/tests/plan-milestone.test.ts create mode 100644 src/resources/extensions/sf/tests/plan-quality-validator.test.ts create mode 100644 src/resources/extensions/sf/tests/plan-slice-prompt.test.ts create mode 100644 src/resources/extensions/sf/tests/plan-slice.test.ts create mode 100644 src/resources/extensions/sf/tests/plan-task.test.ts create mode 100644 src/resources/extensions/sf/tests/planning-crossval.test.ts create mode 100644 src/resources/extensions/sf/tests/plugin-importer.test.ts create mode 100644 src/resources/extensions/sf/tests/post-exec-retry-bypass.test.ts create mode 100644 src/resources/extensions/sf/tests/post-execution-checks.test.ts create mode 100644 src/resources/extensions/sf/tests/post-mutation-hook.test.ts create mode 100644 src/resources/extensions/sf/tests/post-unit-hooks.test.ts create mode 100644 src/resources/extensions/sf/tests/post-unit-state-rebuild.test.ts create mode 100644 src/resources/extensions/sf/tests/pre-exec-backtick-strip.test.ts create mode 100644 src/resources/extensions/sf/tests/pre-execution-checks.test.ts create mode 100644 src/resources/extensions/sf/tests/pre-execution-fail-closed.test.ts create mode 100644 src/resources/extensions/sf/tests/pre-execution-pause-wiring.test.ts create mode 100644 src/resources/extensions/sf/tests/preferences-formatting.test.ts create mode 100644 src/resources/extensions/sf/tests/preferences-worktree-sync.test.ts create mode 100644 src/resources/extensions/sf/tests/preferences.test.ts create mode 100644 src/resources/extensions/sf/tests/preflight-context-draft-filter.test.ts create mode 100644 src/resources/extensions/sf/tests/project-relocation-recovery.test.ts create mode 100644 src/resources/extensions/sf/tests/project-root-cwd-crash.test.ts create mode 100644 src/resources/extensions/sf/tests/projection-no-plan-overwrite.test.ts create mode 100644 src/resources/extensions/sf/tests/projection-regression.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-budget-enforcement.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-cache-optimizer.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-contracts.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-db.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-loader-replacement.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-loader-working-directory.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-ordering.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-step-ordering.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-system-gate-coverage.test.ts create mode 100644 src/resources/extensions/sf/tests/prompt-tool-names.test.ts create mode 100644 src/resources/extensions/sf/tests/provider-errors.test.ts create mode 100644 src/resources/extensions/sf/tests/quality-gates.test.ts create mode 100644 src/resources/extensions/sf/tests/query-tools-db-open.test.ts create mode 100644 src/resources/extensions/sf/tests/queue-draft-detection.test.ts create mode 100644 src/resources/extensions/sf/tests/queue-execution-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/queue-order.test.ts create mode 100644 src/resources/extensions/sf/tests/queued-discuss-fast-path.test.ts create mode 100644 src/resources/extensions/sf/tests/quick-auto-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/quick-turn-end-cleanup.test.ts create mode 100644 src/resources/extensions/sf/tests/rate-limit-model-fallback.test.ts create mode 100644 src/resources/extensions/sf/tests/reactive-executor.test.ts create mode 100644 src/resources/extensions/sf/tests/reactive-graph.test.ts create mode 100644 src/resources/extensions/sf/tests/reassess-detection.test.ts create mode 100644 src/resources/extensions/sf/tests/reassess-handler.test.ts create mode 100644 src/resources/extensions/sf/tests/reassess-prompt.test.ts create mode 100644 src/resources/extensions/sf/tests/reconciliation-edge-cases.test.ts create mode 100644 src/resources/extensions/sf/tests/recovery-attempts-reset.test.ts create mode 100644 src/resources/extensions/sf/tests/regex-hardening.test.ts create mode 100644 src/resources/extensions/sf/tests/register-extension-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/register-hooks-depth-verification.test.ts create mode 100644 src/resources/extensions/sf/tests/register-shortcuts.test.ts create mode 100644 src/resources/extensions/sf/tests/remediation-completion-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/remote-questions.test.ts create mode 100644 src/resources/extensions/sf/tests/remote-status.test.ts create mode 100644 src/resources/extensions/sf/tests/reopen-slice.test.ts create mode 100644 src/resources/extensions/sf/tests/reopen-task.test.ts create mode 100644 src/resources/extensions/sf/tests/replan-handler.test.ts create mode 100644 src/resources/extensions/sf/tests/replan-slice.test.ts create mode 100644 src/resources/extensions/sf/tests/repo-identity-worktree.test.ts create mode 100644 src/resources/extensions/sf/tests/requirements.test.ts create mode 100644 src/resources/extensions/sf/tests/resolve-ts-hooks.mjs create mode 100644 src/resources/extensions/sf/tests/resolve-ts.mjs create mode 100644 src/resources/extensions/sf/tests/resource-loader-import-path.test.ts create mode 100644 src/resources/extensions/sf/tests/restore-tools-after-discuss.test.ts create mode 100644 src/resources/extensions/sf/tests/retry-diagnostic-reasoning.test.ts create mode 100644 src/resources/extensions/sf/tests/retry-state-reset.test.ts create mode 100644 src/resources/extensions/sf/tests/rewrite-count-persist.test.ts create mode 100644 src/resources/extensions/sf/tests/roadmap-parse-regression.test.ts create mode 100644 src/resources/extensions/sf/tests/roadmap-slices.test.ts create mode 100644 src/resources/extensions/sf/tests/rogue-file-detection.test.ts create mode 100644 src/resources/extensions/sf/tests/routing-history.test.ts create mode 100644 src/resources/extensions/sf/tests/rule-registry.test.ts create mode 100644 src/resources/extensions/sf/tests/run-manager.test.ts create mode 100644 src/resources/extensions/sf/tests/run-uat-replay-cap.test.ts create mode 100644 src/resources/extensions/sf/tests/schema-v9-sequence.test.ts create mode 100644 src/resources/extensions/sf/tests/secure-env-collect.test.ts create mode 100644 src/resources/extensions/sf/tests/service-tier.test.ts create mode 100644 src/resources/extensions/sf/tests/session-lock-multipath.test.ts create mode 100644 src/resources/extensions/sf/tests/session-lock-regression.test.ts create mode 100644 src/resources/extensions/sf/tests/session-lock-transient-read.test.ts create mode 100644 src/resources/extensions/sf/tests/session-model-override.test.ts create mode 100644 src/resources/extensions/sf/tests/sf-db.test.ts create mode 100644 src/resources/extensions/sf/tests/sf-inspect.test.ts create mode 100644 src/resources/extensions/sf/tests/sf-no-project-error.test.ts create mode 100644 src/resources/extensions/sf/tests/sf-recover.test.ts create mode 100644 src/resources/extensions/sf/tests/sf-tools.test.ts create mode 100644 src/resources/extensions/sf/tests/sfroot-worktree-detection.test.ts create mode 100644 src/resources/extensions/sf/tests/shared-wal.test.ts create mode 100644 src/resources/extensions/sf/tests/show-config-command.test.ts create mode 100644 src/resources/extensions/sf/tests/sidecar-queue.test.ts create mode 100644 src/resources/extensions/sf/tests/signal-handlers.test.ts create mode 100644 src/resources/extensions/sf/tests/silent-catch-diagnostics.test.ts create mode 100644 src/resources/extensions/sf/tests/single-writer-invariant.test.ts create mode 100644 src/resources/extensions/sf/tests/skill-activation.test.ts create mode 100644 src/resources/extensions/sf/tests/skill-catalog.test.ts create mode 100644 src/resources/extensions/sf/tests/skill-lifecycle.test.ts create mode 100644 src/resources/extensions/sf/tests/skip-slice-state-rebuild.test.ts create mode 100644 src/resources/extensions/sf/tests/skipped-validation-completion.test.ts create mode 100644 src/resources/extensions/sf/tests/slice-context-injection.test.ts create mode 100644 src/resources/extensions/sf/tests/slice-disk-reconcile.test.ts create mode 100644 src/resources/extensions/sf/tests/slice-parallel-conflict.test.ts create mode 100644 src/resources/extensions/sf/tests/slice-parallel-eligibility.test.ts create mode 100644 src/resources/extensions/sf/tests/slice-parallel-orchestrator.test.ts create mode 100644 src/resources/extensions/sf/tests/slice-sequence-insert.test.ts create mode 100644 src/resources/extensions/sf/tests/smart-entry-complete.test.ts create mode 100644 src/resources/extensions/sf/tests/smart-entry-draft.test.ts create mode 100644 src/resources/extensions/sf/tests/sqlite-unavailable-gate.test.ts create mode 100644 src/resources/extensions/sf/tests/stale-lockfile-recovery.test.ts create mode 100644 src/resources/extensions/sf/tests/stale-milestone-id-reservation.test.ts create mode 100644 src/resources/extensions/sf/tests/stale-queued-milestone.test.ts create mode 100644 src/resources/extensions/sf/tests/stale-slice-rows.test.ts create mode 100644 src/resources/extensions/sf/tests/stale-worktree-cwd.test.ts create mode 100644 src/resources/extensions/sf/tests/stalled-tool-recovery.test.ts create mode 100644 src/resources/extensions/sf/tests/start-auto-detached.test.ts create mode 100644 src/resources/extensions/sf/tests/stash-pop-sf-conflict.test.ts create mode 100644 src/resources/extensions/sf/tests/stash-queued-context-files.test.ts create mode 100644 src/resources/extensions/sf/tests/state-corruption-2945.test.ts create mode 100644 src/resources/extensions/sf/tests/state-derivation-parity.test.ts create mode 100644 src/resources/extensions/sf/tests/state-machine-full-walkthrough.test.ts create mode 100644 src/resources/extensions/sf/tests/status-db-open.test.ts create mode 100644 src/resources/extensions/sf/tests/status-guards.test.ts create mode 100644 src/resources/extensions/sf/tests/steer-worktree-path.test.ts create mode 100644 src/resources/extensions/sf/tests/stop-auto-merge-back.test.ts create mode 100644 src/resources/extensions/sf/tests/stop-auto-race-null-unit.test.ts create mode 100644 src/resources/extensions/sf/tests/stop-auto-remote.test.ts create mode 100644 src/resources/extensions/sf/tests/stop-backtrack.test.ts create mode 100644 src/resources/extensions/sf/tests/structured-data-formatter.test.ts create mode 100644 src/resources/extensions/sf/tests/stuck-detection-coverage.test.ts create mode 100644 src/resources/extensions/sf/tests/subagent-agent-discovery.test.ts create mode 100644 src/resources/extensions/sf/tests/subagent-model-dispatch.test.ts create mode 100644 src/resources/extensions/sf/tests/summary-render-parity.test.ts create mode 100644 src/resources/extensions/sf/tests/survivor-branch-complete.test.ts create mode 100644 src/resources/extensions/sf/tests/symlink-extension-discovery.test.ts create mode 100644 src/resources/extensions/sf/tests/symlink-numbered-variants.test.ts create mode 100644 src/resources/extensions/sf/tests/sync-lock.test.ts create mode 100644 src/resources/extensions/sf/tests/sync-worktree-skip-current.test.ts create mode 100644 src/resources/extensions/sf/tests/terminated-transient.test.ts create mode 100644 src/resources/extensions/sf/tests/test-helpers.ts create mode 100644 src/resources/extensions/sf/tests/test-utils.ts create mode 100644 src/resources/extensions/sf/tests/token-cost-display.test.ts create mode 100644 src/resources/extensions/sf/tests/token-counter.test.ts create mode 100644 src/resources/extensions/sf/tests/token-profile.test.ts create mode 100644 src/resources/extensions/sf/tests/tool-call-loop-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/tool-compatibility.test.ts create mode 100644 src/resources/extensions/sf/tests/tool-invocation-error-loop-break.test.ts create mode 100644 src/resources/extensions/sf/tests/tool-naming.test.ts create mode 100644 src/resources/extensions/sf/tests/tool-param-optionality.test.ts create mode 100644 src/resources/extensions/sf/tests/triage-dispatch.test.ts create mode 100644 src/resources/extensions/sf/tests/triage-resolution.test.ts create mode 100644 src/resources/extensions/sf/tests/uat-stuck-loop-orphaned-worktree.test.ts create mode 100644 src/resources/extensions/sf/tests/unborn-branch.test.ts create mode 100644 src/resources/extensions/sf/tests/undo.test.ts create mode 100644 src/resources/extensions/sf/tests/unique-milestone-ids.test.ts create mode 100644 src/resources/extensions/sf/tests/unit-ownership.test.ts create mode 100644 src/resources/extensions/sf/tests/unit-runtime.test.ts create mode 100644 src/resources/extensions/sf/tests/unstructured-continue-context-injection.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-audit-unified.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-contracts.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-execution-graph.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-flags.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-gate-runner.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-gitops-turn-action.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-gitops-wiring.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-model-policy.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-plan-v2-wiring.test.ts create mode 100644 src/resources/extensions/sf/tests/uok-preferences.test.ts create mode 100644 src/resources/extensions/sf/tests/update-command.test.ts create mode 100644 src/resources/extensions/sf/tests/vacuous-truth-slices.test.ts create mode 100644 src/resources/extensions/sf/tests/vacuum-recovery.test.ts create mode 100644 src/resources/extensions/sf/tests/validate-directory.test.ts create mode 100644 src/resources/extensions/sf/tests/validate-milestone-prompt-verification-classes.test.ts create mode 100644 src/resources/extensions/sf/tests/validate-milestone-stuck-guard.test.ts create mode 100644 src/resources/extensions/sf/tests/validate-milestone-write-order.test.ts create mode 100644 src/resources/extensions/sf/tests/validate-milestone.test.ts create mode 100644 src/resources/extensions/sf/tests/validation-gate-patterns.test.ts create mode 100644 src/resources/extensions/sf/tests/validation.test.ts create mode 100644 src/resources/extensions/sf/tests/verdict-parser.test.ts create mode 100644 src/resources/extensions/sf/tests/verification-evidence.test.ts create mode 100644 src/resources/extensions/sf/tests/verification-gate.test.ts create mode 100644 src/resources/extensions/sf/tests/verification-operational-gate.test.ts create mode 100644 src/resources/extensions/sf/tests/verify-artifact-tightened.test.ts create mode 100644 src/resources/extensions/sf/tests/visualizer-critical-path.test.ts create mode 100644 src/resources/extensions/sf/tests/visualizer-data.test.ts create mode 100644 src/resources/extensions/sf/tests/visualizer-overlay.test.ts create mode 100644 src/resources/extensions/sf/tests/visualizer-views.test.ts create mode 100644 src/resources/extensions/sf/tests/wave1-critical-regressions.test.ts create mode 100644 src/resources/extensions/sf/tests/wave2-events-regressions.test.ts create mode 100644 src/resources/extensions/sf/tests/wave3-session-regressions.test.ts create mode 100644 src/resources/extensions/sf/tests/wave4-write-safety-regressions.test.ts create mode 100644 src/resources/extensions/sf/tests/wave5-consistency-regressions.test.ts create mode 100644 src/resources/extensions/sf/tests/windows-path-normalization.test.ts create mode 100644 src/resources/extensions/sf/tests/worker-model-override.test.ts create mode 100644 src/resources/extensions/sf/tests/worker-registry.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-events.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-logger-audit.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-logger-wiring.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-logger.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-manifest.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-mcp-auto-prep.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-mcp.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-projections.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-reconcile.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-templates.test.ts create mode 100644 src/resources/extensions/sf/tests/workflow-tool-executors.test.ts create mode 100644 src/resources/extensions/sf/tests/workspace-index.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-bugfix.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-db-integration.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-db-respawn-truncation.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-db-same-file.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-db.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-expected-warnings.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-health-dispatch.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-health-monorepo.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-health.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-integration.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-journal-events.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-main-branch.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-manager.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-nested-git-safety.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-post-create-hook.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-preferences-sync.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-resolver.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-submodule-safety.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-symlink-removal.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-sync-milestones.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-sync-overwrite-loop.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-sync-tasks.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree-teardown-safety.test.ts create mode 100644 src/resources/extensions/sf/tests/worktree.test.ts create mode 100644 src/resources/extensions/sf/tests/write-gate.test.ts create mode 100644 src/resources/extensions/sf/tests/write-intercept.test.ts create mode 100644 src/resources/extensions/sf/tests/zero-slice-roadmap-guided.test.ts create mode 100644 src/resources/extensions/sf/tests/zombie-sf-state.test.ts create mode 100644 src/resources/extensions/sf/token-counter.ts create mode 100644 src/resources/extensions/sf/tools/complete-milestone.ts create mode 100644 src/resources/extensions/sf/tools/complete-slice.ts create mode 100644 src/resources/extensions/sf/tools/complete-task.ts create mode 100644 src/resources/extensions/sf/tools/plan-milestone.ts create mode 100644 src/resources/extensions/sf/tools/plan-slice.ts create mode 100644 src/resources/extensions/sf/tools/plan-task.ts create mode 100644 src/resources/extensions/sf/tools/reassess-roadmap.ts create mode 100644 src/resources/extensions/sf/tools/reopen-milestone.ts create mode 100644 src/resources/extensions/sf/tools/reopen-slice.ts create mode 100644 src/resources/extensions/sf/tools/reopen-task.ts create mode 100644 src/resources/extensions/sf/tools/replan-slice.ts create mode 100644 src/resources/extensions/sf/tools/validate-milestone.ts create mode 100644 src/resources/extensions/sf/tools/workflow-tool-executors.ts create mode 100644 src/resources/extensions/sf/triage-resolution.ts create mode 100644 src/resources/extensions/sf/triage-ui.ts create mode 100644 src/resources/extensions/sf/types.ts create mode 100644 src/resources/extensions/sf/undo.ts create mode 100644 src/resources/extensions/sf/unit-id.ts create mode 100644 src/resources/extensions/sf/unit-ownership.ts create mode 100644 src/resources/extensions/sf/unit-runtime.ts create mode 100644 src/resources/extensions/sf/uok/audit-toggle.ts create mode 100644 src/resources/extensions/sf/uok/audit.ts create mode 100644 src/resources/extensions/sf/uok/contracts.ts create mode 100644 src/resources/extensions/sf/uok/execution-graph.ts create mode 100644 src/resources/extensions/sf/uok/flags.ts create mode 100644 src/resources/extensions/sf/uok/gate-runner.ts create mode 100644 src/resources/extensions/sf/uok/gitops.ts create mode 100644 src/resources/extensions/sf/uok/kernel.ts create mode 100644 src/resources/extensions/sf/uok/loop-adapter.ts create mode 100644 src/resources/extensions/sf/uok/model-policy.ts create mode 100644 src/resources/extensions/sf/uok/plan-v2.ts create mode 100644 src/resources/extensions/sf/validate-directory.ts create mode 100644 src/resources/extensions/sf/validation.ts create mode 100644 src/resources/extensions/sf/verdict-parser.ts create mode 100644 src/resources/extensions/sf/verification-evidence.ts create mode 100644 src/resources/extensions/sf/verification-gate.ts create mode 100644 src/resources/extensions/sf/visualizer-data.ts create mode 100644 src/resources/extensions/sf/visualizer-overlay.ts create mode 100644 src/resources/extensions/sf/visualizer-views.ts create mode 100644 src/resources/extensions/sf/watch/header-renderer.ts create mode 100644 src/resources/extensions/sf/workflow-engine.ts create mode 100644 src/resources/extensions/sf/workflow-events.ts create mode 100644 src/resources/extensions/sf/workflow-logger.ts create mode 100644 src/resources/extensions/sf/workflow-manifest.ts create mode 100644 src/resources/extensions/sf/workflow-mcp-auto-prep.ts create mode 100644 src/resources/extensions/sf/workflow-mcp.ts create mode 100644 src/resources/extensions/sf/workflow-migration.ts create mode 100644 src/resources/extensions/sf/workflow-projections.ts create mode 100644 src/resources/extensions/sf/workflow-reconcile.ts create mode 100644 src/resources/extensions/sf/workflow-templates.ts create mode 100644 src/resources/extensions/sf/workflow-templates/bugfix.md create mode 100644 src/resources/extensions/sf/workflow-templates/dep-upgrade.md create mode 100644 src/resources/extensions/sf/workflow-templates/full-project.md create mode 100644 src/resources/extensions/sf/workflow-templates/hotfix.md create mode 100644 src/resources/extensions/sf/workflow-templates/refactor.md create mode 100644 src/resources/extensions/sf/workflow-templates/registry.json create mode 100644 src/resources/extensions/sf/workflow-templates/security-audit.md create mode 100644 src/resources/extensions/sf/workflow-templates/small-feature.md create mode 100644 src/resources/extensions/sf/workflow-templates/spike.md create mode 100644 src/resources/extensions/sf/workspace-index.ts create mode 100644 src/resources/extensions/sf/worktree-command-bootstrap.ts create mode 100644 src/resources/extensions/sf/worktree-command.ts create mode 100644 src/resources/extensions/sf/worktree-health.ts create mode 100644 src/resources/extensions/sf/worktree-manager.ts create mode 100644 src/resources/extensions/sf/worktree-resolver.ts create mode 100644 src/resources/extensions/sf/worktree.ts create mode 100644 src/resources/extensions/sf/write-intercept.ts rename src/resources/extensions/shared/tests/{gsd-phase-state.test.ts => sf-phase-state.test.ts} (66%) create mode 100644 vscode-extension/src/sf-client.ts diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 55b84e8eb..29380c827 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -1,5 +1,5 @@ name: Bug report -description: Report crashes, regressions, incorrect behavior, or broken workflows in GSD. +description: Report crashes, regressions, incorrect behavior, or broken workflows in SF. title: "[Bug]: " labels: - bug @@ -28,7 +28,7 @@ body: attributes: label: Summary description: One sentence describing what is broken. - placeholder: Running `/gsd inspect` reports "No GSD database available" even though `.gsd/gsd.db` exists. + placeholder: Running `/gsd inspect` reports "No SF database available" even though `.gsd/gsd.db` exists. validations: required: true @@ -50,7 +50,7 @@ body: attributes: label: Expected behavior description: What should happen if the bug does not exist? - placeholder: GSD should open the existing database and continue. + placeholder: SF should open the existing database and continue. validations: required: true @@ -59,14 +59,14 @@ body: attributes: label: Actual behavior description: What happened instead, including user-visible errors. - placeholder: GSD exits the unit and shows an error message. + placeholder: SF exits the unit and shows an error message. validations: required: true - type: input id: gsd_version attributes: - label: GSD version + label: SF version description: Run `gsd --version` and paste the exact version. placeholder: "e.g. 2.33.1" validations: @@ -92,7 +92,7 @@ body: id: install_method attributes: label: Install method - description: How are you running GSD? + description: How are you running SF? options: - npm global install - npm link / local checkout @@ -106,7 +106,7 @@ body: id: affected_area attributes: label: Affected area - description: Which part of GSD seems involved? + description: Which part of SF seems involved? options: - Auto-mode / dispatch loop - Planning / roadmap / milestones diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index bf67e8016..b0ad66770 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -1,5 +1,5 @@ name: Feature request -description: Propose a new capability or improvement for GSD. +description: Propose a new capability or improvement for SF. title: "[Feature]: " labels: - enhancement diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6dad2932a..22e8ce150 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -44,7 +44,7 @@ Closes # - [ ] `pi-ai` — AI/LLM layer - [ ] `pi-agent-core` — Agent orchestration - [ ] `pi-coding-agent` — Coding agent -- [ ] `gsd extension` — GSD workflow +- [ ] `gsd extension` — SF workflow - [ ] `native` — Native bindings - [ ] `ci/build` — Workflows, scripts, config diff --git a/.github/workflows/ai-triage.yml b/.github/workflows/ai-triage.yml index 04bc87ae8..38e1496d9 100644 --- a/.github/workflows/ai-triage.yml +++ b/.github/workflows/ai-triage.yml @@ -39,7 +39,7 @@ jobs: const type = isIssue ? 'issue' : 'pull_request'; const existingLabels = (item.labels || []).map(l => l.name); - const prompt = `You are a GitHub issue/PR triage bot for the GSD-2 project. Your job is to: + const prompt = `You are a GitHub issue/PR triage bot for the SF project. Your job is to: 1. Classify the ${type} with appropriate labels 2. Detect if it violates project guidelines @@ -88,7 +88,7 @@ jobs: - "complexity-without-value": Adds abstraction/indirection without user-visible improvement - "heavy-orchestration": Duplicates what agent infrastructure already provides - "missing-info": Issue is too vague to act on (no repro steps, no context) - - "off-topic": Not related to GSD-2 at all + - "off-topic": Not related to SF at all - "security-in-public": Appears to report a security vulnerability publicly If aligned is false, provide a brief, polite explanation (2-3 sentences) of why this was flagged. @@ -175,7 +175,7 @@ jobs: }; const securityNote = result.violation_type === 'security-in-public' - ? `\n\n**If this is a security vulnerability, please delete this ${type} and use [GitHub\'s private vulnerability reporting](https://github.com/gsd-build/GSD-2/security/advisories/new) instead.** See [CONTRIBUTING.md](https://github.com/gsd-build/GSD-2/blob/main/CONTRIBUTING.md#security) for details.` + ? `\n\n**If this is a security vulnerability, please delete this ${type} and use [GitHub\'s private vulnerability reporting](https://github.com/gsd-build/SF/security/advisories/new) instead.** See [CONTRIBUTING.md](https://github.com/gsd-build/SF/blob/main/CONTRIBUTING.md#security) for details.` : ''; const comment = `👋 Thanks for opening this ${type}! @@ -186,7 +186,7 @@ jobs: ${result.explanation} - Please review our [VISION.md](https://github.com/gsd-build/GSD-2/blob/main/VISION.md) and [CONTRIBUTING.md](https://github.com/gsd-build/GSD-2/blob/main/CONTRIBUTING.md) for project guidelines.${securityNote} + Please review our [VISION.md](https://github.com/gsd-build/SF/blob/main/VISION.md) and [CONTRIBUTING.md](https://github.com/gsd-build/SF/blob/main/CONTRIBUTING.md) for project guidelines.${securityNote} A maintainer will review this shortly. If you believe this was flagged in error, no action is needed — we'll take a look. diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 5f34ec2fc..753e67826 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -84,7 +84,7 @@ jobs: - name: Smoke test (local) run: | chmod +x dist/loader.js - export GSD_SMOKE_BINARY="$(pwd)/dist/loader.js" + export SF_SMOKE_BINARY="$(pwd)/dist/loader.js" npm run test:smoke test-verify: @@ -112,7 +112,7 @@ jobs: - name: Run smoke tests (against installed binary) run: | - export GSD_SMOKE_BINARY=$(which gsd) + export SF_SMOKE_BINARY=$(which gsd) npm run test:smoke env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -125,7 +125,7 @@ jobs: - name: Run live regression tests (against installed binary) run: | - export GSD_SMOKE_BINARY=$(which gsd) + export SF_SMOKE_BINARY=$(which gsd) npm run test:live-regression - name: Promote to @next @@ -187,7 +187,7 @@ jobs: env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - GSD_LIVE_TESTS: "1" + SF_LIVE_TESTS: "1" - name: Generate changelog and determine version id: release @@ -268,7 +268,7 @@ jobs: NOTES=$(cat /tmp/release-notes.md) curl -s -X POST "$DISCORD_WEBHOOK" \ -H "Content-Type: application/json" \ - -d "$(jq -n --arg c "**GSD v${RELEASE_VERSION} Released**\n\n${NOTES}\n\n\`npm i gsd-pi@${RELEASE_VERSION}\`" '{content:$c}')" + -d "$(jq -n --arg c "**SF v${RELEASE_VERSION} Released**\n\n${NOTES}\n\n\`npm i gsd-pi@${RELEASE_VERSION}\`" '{content:$c}')" - name: Log in to GHCR uses: docker/login-action@v4 diff --git a/.gitignore b/.gitignore index 5862cc861..0c2e04671 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,7 @@ src/**/*.d.ts.map # ── Repowise index (local machine-generated cache) ── .repowise/ -# ── GSD project state (development-only, lives in worktree branches) ── +# ── SF project state (development-only, lives in worktree branches) ── package-lock.json .claude/ RELEASE-GUIDE.md @@ -55,7 +55,7 @@ packages/*/node_modules/ # ── Scratch/WIP files ── preflight-script.ts -# ── GSD baseline (auto-generated) ── +# ── SF baseline (auto-generated) ── dist/ !/pkg/dist/modes/ !/pkg/dist/core/export-html/ @@ -70,15 +70,15 @@ TODOS.md docs/coherence-audit/ .plans/ -# ── GSD project state (per-worktree, never committed) ── +# ── SF project state (per-worktree, never committed) ── .gsd/ # ── Stale lock files (npm is canonical) ── pnpm-lock.yaml bun.lock -# ── GSD baseline (auto-generated) ── +# ── SF baseline (auto-generated) ── .gsd -# ── GSD baseline (auto-generated) ── +# ── SF baseline (auto-generated) ── .gsd-id diff --git a/.prompt-injection-scanignore b/.prompt-injection-scanignore index b6cc73a03..c594d4a49 100644 --- a/.prompt-injection-scanignore +++ b/.prompt-injection-scanignore @@ -1,2 +1,2 @@ -# False positives in GSD prompt templates — these are legitimate LLM instructions, not injection +# False positives in SF prompt templates — these are legitimate LLM instructions, not injection src/resources/extensions/gsd/prompts/doctor-heal.md:You are now responsible diff --git a/CHANGELOG.md b/CHANGELOG.md index d6682fa9c..49f32c8c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -All notable changes to GSD are documented in this file. +All notable changes to SF are documented in this file. Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). @@ -63,7 +63,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **gsd**: reconcile stale slice rows and rebuild STATE.md before DB close (#3658) - **gsd**: block direct writes to gsd.db via hooks to prevent corruption (#3674) - **gsd**: break 3 circular dependencies in extension modules (#3730) -- **claude-code**: default GSD subagents to bypassPermissions and pre-authorize safe built-ins (#4099 follow-up) +- **claude-code**: default SF subagents to bypassPermissions and pre-authorize safe built-ins (#4099 follow-up) - **gsd**: add memory pressure watchdog and persist stuck detection state (#3708) - **state**: prevent false degraded-mode warning when DB not yet initialized (#3922) - **async-jobs**: suppress stale follow-up for jobs consumed by await_job (#3787) (#3788) @@ -76,9 +76,9 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **ollama**: add cloud auth support and resolve real context window via /api/show (#4017) - **security**: activate auth middleware and harden shutdown/update routes (#4023) - **gsd**: normalize workingDirectory prompt paths (#4057) -- **claude-code**: pre-authorize workflow MCP tools so interactive acceptEdits mode stops blocking GSD commands +- **claude-code**: pre-authorize workflow MCP tools so interactive acceptEdits mode stops blocking SF commands - **cli**: resolve duplicate validateConfiguredModel and missing getPiDefaultModelAndProvider import -- update GSD runtime ignore patterns for team mode (#2824) +- update SF runtime ignore patterns for team mode (#2824) - **gsd**: prevent double frontmatter in task SUMMARY.md from projection re-render (#2818) - flush extension provider registrations before model resolution (#1923) - **gsd**: reset db-open attempted flag on close (#4024) @@ -98,7 +98,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [2.72.0] - 2026-04-13 ### Added -- **agents**: add GSD phase guard to prevent subagent/phase conflicts +- **agents**: add SF phase guard to prevent subagent/phase conflicts - **agents**: add 8 specialist subagents and slim pro agents - **tui**: improve gsd overlays, shortcuts, and notification flows @@ -196,7 +196,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **ci**: unblock windows portability follow-up - **windows**: harden portability across runtime and tooling - **auto**: use pathToFileURL for cross-platform import and reconcile regression test -- **auto**: resolve resource-loader.js from GSD_PKG_ROOT on resume (#3949) +- **auto**: resolve resource-loader.js from SF_PKG_ROOT on resume (#3949) - **mcp-server**: importLocalModule resolves src/ paths from dist/ context - **gsd**: surface scoped doctor health warnings - **gsd**: skip skipped slices in milestone prompts @@ -242,9 +242,9 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - expose milestone workflow tools over MCP - expose slice completion over workflow MCP - expose task completion alias over workflow MCP -- expose GSD planning tools over MCP +- expose SF planning tools over MCP - gate workflow MCP units by provider transport capabilities -- expose core GSD workflow tools over MCP +- expose core SF workflow tools over MCP - add contextual tips system for TUI and web terminal ### Fixed @@ -318,7 +318,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **remote-questions**: cancel local TUI when remote answer wins the race - **auto**: increase session timeout to 120s and treat timeout as recoverable pause (#3767) - **ui**: apply anthropic-api display name to all model/provider UI surfaces -- **ui**: display 'anthropic-api' in GSD preferences wizard provider list +- **ui**: display 'anthropic-api' in SF preferences wizard provider list - **remote-questions**: race local TUI against remote channel instead of remote-only routing - **ui**: display 'anthropic-api' in model selector to distinguish from claude-code - **gates**: add mechanical enforcement for discussion question gates @@ -590,7 +590,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - **gsd**: enhance /gsd codebase with preferences, --collapse-threshold, and auto-init - **01-05**: fire before_model_select hook, add verbose scoring output, load capability overrides -- **01-04**: register before_model_select placeholder handler in GSD hooks +- **01-04**: register before_model_select placeholder handler in SF hooks - **01-04**: add BeforeModelSelectEvent to extension API and wire emission - **01-03**: wire taskMetadata from selectAndApplyModel to resolveModelForComplexity - **01-03**: insert STEP 2 capability scoring into resolveModelForComplexity @@ -620,7 +620,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - stop/backtrack capture classifications for milestone regression (#3488) -- GSD context optimization with model routing and context masking +- SF context optimization with model routing and context masking ## [2.60.0] - 2026-04-04 @@ -979,7 +979,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - use Record for hasNonEmptyFields to accept typed DB rows - **tests**: replace undefined assertTrue/assertEq with assert.ok/assert.equal - **tests**: replace undefined assertTrue/assertEq with assert.ok/deepStrictEqual -- **gsd**: handle session_switch event so /resume restores GSD state (#2587) +- **gsd**: handle session_switch event so /resume restores SF state (#2587) - use GitHub Issue Types via GraphQL instead of classification labels - **headless**: disable overall timeout for auto-mode, fix lock-guard auto-select (#2586) - **auto**: align UAT artifact suffix with gsd_slice_complete output (#2592) @@ -1032,7 +1032,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - verdict gate accepts PARTIAL for mixed/human-experience/live-runtime UATs ### Changed -- move GSD metadata from commit subject scopes to git trailers +- move SF metadata from commit subject scopes to git trailers ## [2.48.0] - 2026-03-25 @@ -1163,7 +1163,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - **core**: support for 'non-api-key' provider extensions like Claude Code CLI (#2382) -- **docker**: add official Docker sandbox template for isolated GSD auto mode (#2360) +- **docker**: add official Docker sandbox template for isolated SF auto mode (#2360) - **gsd**: show per-prompt token cost in footer behind show_token_cost preference (#2357) - **web**: add "Change project root" button to web UI (#2355) - **gsd**: Tool-driven write-side state transitions — replace markdown mutation with atomic SQLite tool calls (#2141) @@ -1410,7 +1410,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - **pi**: add Skill tool resolution (#1661) - health check phase 2 — real-time doctor issue visibility across widget, visualizer, and HTML reports (#1644) -- upgrade forensics prompt to full-access GSD debugger (#1660) +- upgrade forensics prompt to full-access SF debugger (#1660) ### Fixed - prune stale env-utils.js from extensions root, preventing startup load error (#1655) @@ -1432,10 +1432,10 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **gsd**: add browser-executable and runtime-executable UAT types (#1620) - apply model preferences in guided flow for milestone planning (#1614) - **gsd**: GitHub sync extension — auto-sync to Issues, PRs, Milestones (#1603) -- add GSD_PROJECT_ID env var to override project hash (#1600) -- add GSD_HOME env var to override global ~/.gsd directory (#1566) +- add SF_PROJECT_ID env var to override project hash (#1600) +- add SF_HOME env var to override global ~/.gsd directory (#1566) - **gsd**: add 13 enhancements to /gsd doctor (#1583) -- feat(ui): minimal GSD welcome screen on startup (#1584) +- feat(ui): minimal SF welcome screen on startup (#1584) ### Fixed - recover + prevent #1364 .gsd/ data-loss (v2.30.0–v2.38.0) (#1635) @@ -1450,7 +1450,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - resolve ${VAR} env references in MCP client .mcp.json configs (#1609) - return "dispatched" after doctor heal to prevent session race (#1580) (#1610) - update Anthropic OAuth endpoints to platform.claude.com (#1608) -- lazy-open GSD database on first tool call in manual sessions (#1606) +- lazy-open SF database on first tool call in manual sessions (#1606) - **gsd**: detect anthropic-vertex in provider doctor (#1598) - **gsd**: tighten prompt automation contracts (#1556) - **gsd**: harden auto-mode agent loop — session teardown, unit correlation, sidecar perf (#1592) @@ -1520,10 +1520,10 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - create milestones/ directory in worktree when missing (#1374) - inject network_idle warning into hook prompts (#1345) (#1401) - verify symlink after migration + fix test failures (#1377) (#1404) -- validate CWD instead of project root when running from a GSD worktree (#1317) (#1504) +- validate CWD instead of project root when running from a SF worktree (#1317) (#1504) - **gsd**: detect initialized health widget projects (#1432) - smarter .gsd root discovery — git-root anchor + walk-up replaces symlink hack (#1386) -- correct GSD-WORKFLOW.md fallback path and sync to agentDir (#1375) +- correct SF-WORKFLOW.md fallback path and sync to agentDir (#1375) - always include reasoning.encrypted_content for OpenAI reasoning models - **gsd**: avoid EISDIR crash in file loader - **gsd**: open existing database on inspect @@ -1576,7 +1576,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - auto-discard bootstrap crash locks and clean auto.lock on exit (#1397) - harden quick-task branch lifecycle — disk recovery + integration branch guard (#1342) - skip verification retry on spawn infra errors (ETIMEDOUT, ENOENT) (#1340) -- keep external GSD state stable in worktrees (#1334) +- keep external SF state stable in worktrees (#1334) - stop excluding all .gsd/ from commits — only exclude runtime files (#1326) (#1328) - handle ECOMPROMISED in uncaughtException guard and align retry onCompromised (#1322) (#1332) @@ -1712,7 +1712,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - auto-create PR on milestone completion (#687) (#1084) - wire semantic chunking, add preferences, metrics, and docs - add token optimization suite for prompt caching, compression, and smart context selection -- **autocomplete**: add /thinking completions, GSD subcommand descriptions, and test coverage (#1019) +- **autocomplete**: add /thinking completions, SF subcommand descriptions, and test coverage (#1019) - add respectGitignoreInPicker setting for @ file picker (#979) (#1016) - **prefs**: add search_provider to preferences.md (#1001) - add `--events` flag for JSONL stream filtering (#1000) @@ -1742,7 +1742,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **ci**: skip init smoke test in non-TTY CI environments (#1172) - **ci**: skip publish when version already exists on npm (#1166) - **ci**: use local binary for pipeline smoke test (#1163) -- prevent concurrent GSD sessions from overlapping on same project (#1154) +- prevent concurrent SF sessions from overlapping on same project (#1154) - exclude completion-transition errors from health escalation at task level (#1157) - **ci**: skip git-diff guard in prepublishOnly during CI (#1160) - /gsd quick respects git isolation: none preference (#1156) @@ -1781,7 +1781,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - add barrel files for remote-questions, ttsr, and shared extensions (#1048) - consolidate frontmatter parsing into shared module (#1040) - always ensure tasks/ directory exists for slice units (#900) (#1050) -- centralize GSD timeout and cache constants (#1038) +- centralize SF timeout and cache constants (#1038) - improve RemotePromptRecord.ref type safety (#1041) - document silent catch handlers in browser-tools (#1037) - use literal union types in RuntimeErrorJSON for type safety (#1034) @@ -2024,7 +2024,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **Background shell performance** — optimized hot path with parallel git queries and lazy workspace validation ### Fixed -- Forensics uses `GSD_VERSION` env var instead of fragile package.json path traversal; now worktree-aware to prevent stale root misdiagnosis +- Forensics uses `SF_VERSION` env var instead of fragile package.json path traversal; now worktree-aware to prevent stale root misdiagnosis - Background commands rewritten to prevent pipe-open hang; stalled-tool detection added with prompt guidance - Auto mode breaks infinite skip loop on repeatedly-skipped completed units - Roadmap parser expands range syntax in depends (e.g. `S01-S04` → `S01,S02,S03,S04`) @@ -2042,8 +2042,8 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - **`/gsd forensics`** — post-mortem investigation of auto-mode failures with structured root-cause analysis -- **Claude marketplace import** — import Claude marketplace plugins as namespaced GSD components -- **MCP server mode** — run GSD as an MCP server with `--mode mcp` +- **Claude marketplace import** — import Claude marketplace plugins as namespaced SF components +- **MCP server mode** — run SF as an MCP server with `--mode mcp` - **`/review` skill** — code review with diff-aware context - **`/test` skill** — test generation and execution - **`/lint` skill** — linting integration @@ -2051,7 +2051,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **File watcher** — chokidar-based file watching for live updates - **`git.isolation: "none"`** — disable worktree isolation for projects that don't need it - **E2E smoke tests** — end-to-end test suite for extension integration -- **Subcommand help** — inline help text for all GSD subcommands +- **Subcommand help** — inline help text for all SF subcommands ### Fixed - `verificationBudget` passed correctly to execute-task prompt template @@ -2093,10 +2093,10 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [2.20.0] - 2026-03-16 ### Added -- **Telegram remote questions** — receive and respond to GSD questions via Telegram bot alongside existing Slack and Discord channels (#645) -- **`/gsd quick`** — execute a quick task with GSD guarantees (atomic commits, state tracking) without the full planning overhead (#437) +- **Telegram remote questions** — receive and respond to SF questions via Telegram bot alongside existing Slack and Discord channels (#645) +- **`/gsd quick`** — execute a quick task with SF guarantees (atomic commits, state tracking) without the full planning overhead (#437) - **`/gsd mode`** — workflow mode system with solo and team presets that configure defaults for milestone IDs, git commit behavior, and documentation settings (#651) -- **`/gsd help`** — categorized command reference with descriptions for all GSD subcommands (#630) +- **`/gsd help`** — categorized command reference with descriptions for all SF subcommands (#630) - **`/gsd doctor`** — 7 runtime health checks with auto-fix for common state corruption issues (#646) - **Agent instructions injection** — `agent-instructions.md` loaded into every agent session for persistent per-project behavioral guidance (#437) - **Skill lifecycle management** — telemetry tracking, health dashboard, and heal-skill command for managing custom skills (#599) @@ -2105,11 +2105,11 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **LSP activated by default** — Language Server Protocol now auto-activates with call hierarchy, formatting, signature help, and synchronized edits (#639) - **Extension smoke tests** — CI catches import failures, circular deps, and module resolution issues across all bundled extensions - **`gsd --debug` mode** — structured JSONL diagnostic logging for troubleshooting dispatch and state issues (#468) -- **Worktree post-create hook** — run custom setup scripts when GSD creates a new worktree (#597) +- **Worktree post-create hook** — run custom setup scripts when SF creates a new worktree (#597) ### Fixed - **CPU spinning from regex backtracking** — replaced `[\s\S]*?` regex in preferences parser with indexOf-based scanning (#468) -- **Model config bleed between concurrent GSD instances** — isolated model configuration per session (#650) +- **Model config bleed between concurrent SF instances** — isolated model configuration per session (#650) - **Onboarding wizard repeats** — skip onboarding for extension-based providers that don't require auth.json credentials (#589) - **Session tool rebuild on cwd change** — tools now rebuild correctly when working directory changes mid-session (#633) - **Auto mode state derivation after discussion fallthrough** — re-derives state to prevent stale dispatches (#609) @@ -2144,7 +2144,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - **Dynamic model discovery** — runtime model enumeration from provider APIs (Ollama, OpenAI, Google, OpenRouter) with per-provider TTL caching and discovery adapters. New `ProviderManagerComponent` TUI for managing providers with auth status and model counts (#581) - **Expanded preferences wizard** — all configurable fields now exposed in the setup wizard, model ID validation, and `updatePreferencesModels()` for safe read-modify-write of model config (#580) - **Comprehensive documentation** — 12 new docs covering getting started, auto-mode, commands, configuration, token optimization, cost management, git strategy, team workflows, skills, migration, troubleshooting, and architecture (#605) -- **`resolveProjectRoot()`** — all GSD commands resolve the effective project root from worktree paths instead of using raw `process.cwd()`, preventing path confusion across worktree boundaries (#602) +- **`resolveProjectRoot()`** — all SF commands resolve the effective project root from worktree paths instead of using raw `process.cwd()`, preventing path confusion across worktree boundaries (#602) - **1,813 lines of new tests** — 13 new test files covering discovery cache, model discovery, model registry, models-json-writer, auto-worktree, derive-state-deps, in-flight tool tracking, knowledge, memory leak guards, preferences wizard fields, queue order, queue reorder E2E, and stale worktree cwd ### Fixed @@ -2166,13 +2166,13 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - **Token optimization profiles** — `budget`, `balanced`, and `quality` presets that coordinate model selection, phase skipping, and context compression to reduce token usage by 40-60% on budget mode - **Complexity-based task routing** — automatically classifies tasks as simple/standard/heavy and routes to appropriate models, with persistent learning from routing history -- **`git.commit_docs` preference** — set to `false` to keep `.gsd/` planning artifacts local-only, useful for teams where only some members use GSD +- **`git.commit_docs` preference** — set to `false` to keep `.gsd/` planning artifacts local-only, useful for teams where only some members use SF ### Changed - Updated Ollama cloud provider model catalog ### Fixed -- Native binary hangs in GSD auto-mode paths (#453) +- Native binary hangs in SF auto-mode paths (#453) - Auto-mode can be stopped from a different terminal (#586) - Parse cache collision causing false loop detection on `complete-slice` (#583) - Exhaustive switch handling and cleanup in Google provider (#587) @@ -2237,7 +2237,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Auto-mode stops cleanly when dispatch gap watchdog fails (#537) - Synchronous I/O removed from hot paths (#540) - Silent catch blocks now capture error references for crash diagnostics (#546) -- `ctx.log` error in GSD provider recovery path fixed +- `ctx.log` error in SF provider recovery path fixed - TUI resource leaks patched in loader, cancellable-loader, input, and editor components (#482) - Hardcoded ANSI escapes replaced with chalk for consistent terminal handling (#482) @@ -2268,9 +2268,9 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - **Discussion manifest** — mechanical process verification for multi-milestone context discussions -- **Session-internal `/gsd config`** — configure GSD settings within a running session +- **Session-internal `/gsd config`** — configure SF settings within a running session - **Model selection UI** — select list instead of free-text input for model preferences -- **Startup performance** — faster GSD launch via optimized initialization +- **Startup performance** — faster SF launch via optimized initialization ### Changed - **Branchless worktree architecture** — eliminated slice branches entirely. All work commits sequentially on `milestone/` within auto-mode worktrees. No branch creation, switching, or merging within a worktree. ~2600 lines of merge/conflict/branch-switching code removed. @@ -2331,7 +2331,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Auto-mode dispatch loop when `cachedReaddir` returns stale data after unit writes files - Parse and path caches cleared alongside state cache after unit completion - `bg_shell` hangs indefinitely when `ready_port` server fails to start — now transitions to error state with stderr context -- Em dash and slash characters in milestone/slice titles corrupting GSD state management +- Em dash and slash characters in milestone/slice titles corrupting SF state management - Guided-flow self-heals stale runtime records from crashed auto-mode sessions on wizard start - CI smoke test ANSI code stripping @@ -2370,7 +2370,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Read resources from dist/ to prevent branch-drift in npm-link setups (#314) - Always use native Anthropic web search when available (#374) - CI smoke test — wait for registry propagation, show errors (#383) -- Bypass pre-commit hooks on GSD infrastructure commits to prevent lint-staged empty commit errors (#385) +- Bypass pre-commit hooks on SF infrastructure commits to prevent lint-staged empty commit errors (#385) ## [2.10.12] - 2026-03-14 @@ -2378,7 +2378,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Multi-milestone readiness flow with per-milestone discussion gate (#377) ### Fixed -- Fix `npx gsd-pi@latest` failing with `ERR_MODULE_NOT_FOUND: Cannot find package '@gsd/pi-coding-agent'`. The loader now creates workspace package symlinks at runtime before importing, so it works even when `npx` skips postinstall scripts (#380) +- Fix `npx sf-run@latest` failing with `ERR_MODULE_NOT_FOUND: Cannot find package '@gsd/pi-coding-agent'`. The loader now creates workspace package symlinks at runtime before importing, so it works even when `npx` skips postinstall scripts (#380) ## [2.10.11] - 2026-03-14 @@ -2395,7 +2395,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Opus 4.6 1M as default model, model selector UX improvements, Discord onboarding (#290) ### Fixed -- Fix broken `npm install` / `npx gsd-pi@latest` caused by unpublished `@gsd/*` workspace packages leaking into npm dependencies. Workspace cross-references removed from published package metadata; packages resolve via bundled `node_modules/` at runtime (#369) +- Fix broken `npm install` / `npx sf-run@latest` caused by unpublished `@gsd/*` workspace packages leaking into npm dependencies. Workspace cross-references removed from published package metadata; packages resolve via bundled `node_modules/` at runtime (#369) - Add pre-publish tarball install validation (`validate-pack`) to CI and publish pipeline, preventing broken packages from reaching npm - Handle empty index after runtime file stripping in squash-merge (#364) - Add retry logic for transient network/auth failures instead of crashing (#365) @@ -2478,7 +2478,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Simplified onboarding into two-step auth flow — plain language instead of OAuth jargon (#274) ### Fixed -- `optionalDependencies` in published `gsd-pi@2.10.4` were still pinned to `2.10.2`, causing users to install the broken engine binaries that 2.10.4 was meant to fix (#276) +- `optionalDependencies` in published `sf-run@2.10.4` were still pinned to `2.10.2`, causing users to install the broken engine binaries that 2.10.4 was meant to fix (#276) - Auto-resolve `.gsd/` planning artifact conflicts during slice merge (#264) - Use version ranges for native engine optional dependencies (#286) - Guard publish against uncommitted version sync changes @@ -2502,7 +2502,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - Native Rust TTSR regex engine — pre-compiles all stream rule conditions into a single `RegexSet` for one-pass DFA matching instead of O(rules × conditions) JS regex iteration - Native Rust diff engine — fuzzy text matching (`fuzzyFindText`, `normalizeForFuzzyMatch`) and unified diff generation (`generateDiff`) via the `similar` crate, replacing the `diff` npm package -- Native Rust GSD file parser — frontmatter parsing, section extraction, batch `.gsd/` directory parsing, and structured roadmap parsing with transparent JS fallback +- Native Rust SF file parser — frontmatter parsing, section extraction, batch `.gsd/` directory parsing, and structured roadmap parsing with transparent JS fallback ## [2.10.1] - 2026-03-13 @@ -2623,11 +2623,11 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [2.7.1] - 2026-03-13 ### Added -- Model fallback support for auto-mode phases — if the configured model fails, GSD tries alternate models before stopping +- Model fallback support for auto-mode phases — if the configured model fails, SF tries alternate models before stopping - `/kill` command for immediate process termination ### Fixed -- `npm install -g gsd-pi` now works — workspace packages bundled in npm tarball via `bundleDependencies` +- `npm install -g sf-run` now works — workspace packages bundled in npm tarball via `bundleDependencies` - External PI ecosystem packages (pi-rtk, pi-context, etc.) can now resolve `@mariozechner/*` imports through jiti aliases - Missing `export-html` vendor files (marked.min.js, highlight.min.js) restored - Skipped API keys now persist so the setup wizard doesn't repeat on every launch @@ -2641,7 +2641,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Changed - Vendor Pi SDK source (tui, ai, agent-core, coding-agent) into workspace monorepo under `packages/`, replacing the compiled npm dependency and patch-package workflow. Pi internals are now directly modifiable as TypeScript source. - Existing patches (setModel persist option, Windows VT input caching) applied as source edits. -- Build pipeline runs workspace packages in dependency order before GSD compilation. +- Build pipeline runs workspace packages in dependency order before SF compilation. - Removed `patch-package` from devDependencies and postinstall. ## [2.6.0] - 2026-03-12 @@ -2690,7 +2690,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## [2.4.0] - 2026-03-12 ### Added -- Automatic migration of provider credentials from existing Pi installations — skip re-authentication when switching to GSD +- Automatic migration of provider credentials from existing Pi installations — skip re-authentication when switching to SF - Pi extensions from `~/.pi/agent/extensions/` discoverable in interactive mode - GitService core implementation for programmatic git operations @@ -2735,7 +2735,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Migration no longer requires ROADMAP.md — milestones inferred from phases/ directory when missing (#93, #90) - Worktree branch safety — proper namespacing and slice branch base selection (#92) - Windows: use `execFile` to avoid single-quote shell issues (#103) -- Broken `read @GSD-WORKFLOW.md` references replaced with `/gsd` command (#88) +- Broken `read @SF-WORKFLOW.md` references replaced with `/gsd` command (#88) - Google Search extension updated to use `gemini-2.5-flash` (#83) - Duplicate `getCurrentBranch` import in auto.ts (#87) - `formatCost` crash on non-number cost values (#74) @@ -2797,7 +2797,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Added - `/gsd next` step mode — walk through units one at a time with a wizard between each - `/gsd` bare command defaults to step mode -- `/exit` command to kill the GSD process immediately +- `/exit` command to kill the SF process immediately - `/clear` as alias for `/new` (new session) - MCPorter extension for lazy on-demand MCP server integration - `/voice` extension for real-time speech-to-text @@ -2829,7 +2829,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Windows backspace in masked input + custom browser path support (#36, #34) ### Changed -- Renamed "Get Stuff Done" to "Get Shit Done" +- Renamed "Get Stuff Done" to "Singularity Forge" ## [0.3.0] - 2026-03-11 @@ -2874,7 +2874,7 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ### Fixed - All `.pi/` paths updated to `.gsd/` - Default model matching by `id.includes('sonnet')` for dated API IDs -- Circular gsd-pi self-dependency removed +- Circular sf-run self-dependency removed - Pi SDK version check suppressed - Selected options stay lit when notes field is focused diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 335cf7842..83a48d118 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,8 @@ -# Contributing to GSD-2 +# Contributing to SF -We're glad you're here. GSD-2 is an open project and contributions are welcome across the entire codebase. We hold a high bar for what gets merged — not to be gatekeepers, but because every change ships to real users and stability matters. +We're glad you're here. SF is an open project and contributions are welcome across the entire codebase. We hold a high bar for what gets merged — not to be gatekeepers, but because every change ships to real users and stability matters. -Read [VISION.md](VISION.md) before contributing. It defines what GSD-2 is, what it isn't, and what we won't accept. +Read [VISION.md](VISION.md) before contributing. It defines what SF is, what it isn't, and what we won't accept. ## Before you start @@ -48,9 +48,9 @@ git fetch origin git rebase origin/main ``` -## Working with GSD (team workflow) +## Working with SF (team workflow) -GSD uses worktree-based isolation for multi-developer work. If you're contributing with GSD running, enable team mode in your project preferences: +SF uses worktree-based isolation for multi-developer work. If you're contributing with SF running, enable team mode in your project preferences: ```yaml # .gsd/PREFERENCES.md @@ -147,7 +147,7 @@ The codebase is organized into these areas. All are open to contributions: | Agent core | `packages/pi-agent-core` | Agent orchestration — RFC required for changes | | Coding agent | `packages/pi-coding-agent` | The main coding agent | | MCP server | `packages/mcp-server` | Project state tools and MCP protocol | -| GSD extension | `src/resources/extensions/gsd/` | GSD workflow — RFC required for auto-mode | +| SF extension | `src/resources/extensions/gsd/` | SF workflow — RFC required for auto-mode | | Other extensions | `src/resources/extensions/` | Browser, search, voice, MCP client, etc. | | Native engine | `native/` | Rust N-API modules (grep, git, AST, etc.) | | VS Code extension | `vscode-extension/` | Chat participant, sidebar, RPC integration | diff --git a/Dockerfile b/Dockerfile index b69e4bc6c..8db7565b8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,18 @@ # ────────────────────────────────────────────── # Runtime -# Image: ghcr.io/gsd-build/gsd-pi +# Image: ghcr.io/gsd-build/sf-run # Used by: end users via docker run # ────────────────────────────────────────────── FROM node:24-slim AS runtime -# Git is required for GSD's git operations +# Git is required for SF's git operations RUN apt-get update && apt-get install -y --no-install-recommends \ git \ && rm -rf /var/lib/apt/lists/* -# Install GSD globally — version is controlled by the build arg -ARG GSD_VERSION=latest -RUN npm install -g gsd-pi@${GSD_VERSION} +# Install SF globally — version is controlled by the build arg +ARG SF_VERSION=latest +RUN npm install -g sf-run@${SF_VERSION} # Default working directory for user projects WORKDIR /workspace diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..0ef9489a0 --- /dev/null +++ b/Makefile @@ -0,0 +1,36 @@ +SHELL := /usr/bin/env bash + +.DEFAULT_GOAL := help + +.PHONY: help install build build-core test typecheck native clean + +help: + @printf "Available targets:\n" + @printf " install Install workspace dependencies\n" + @printf " build Build the project\n" + @printf " build-core Build the core runtime packages\n" + @printf " test Run the test suite\n" + @printf " typecheck Run TypeScript type checking\n" + @printf " native Build native components\n" + @printf " clean Remove generated build outputs\n" + +install: + npm install + +build: + npm run build + +build-core: + npm run build:core + +test: + npm test + +typecheck: + npm run typecheck:extensions + +native: + npm run build:native + +clean: + rm -rf dist dist-test diff --git a/README.md b/README.md index 8aefadb7e..cafeeb987 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,25 @@
-# GSD 2 +# SF -**The evolution of [Get Shit Done](https://github.com/gsd-build/get-shit-done) — now a real coding agent.** +**The evolution of [Singularity Forge](https://github.com/gsd-build/get-shit-done) — now a real coding agent.** -[![npm version](https://img.shields.io/npm/v/gsd-pi?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/gsd-pi) -[![npm downloads](https://img.shields.io/npm/dm/gsd-pi?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/gsd-pi) -[![GitHub stars](https://img.shields.io/github/stars/gsd-build/GSD-2?style=for-the-badge&logo=github&color=181717)](https://github.com/gsd-build/GSD-2) +[![npm version](https://img.shields.io/npm/v/sf-run?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/sf-run) +[![npm downloads](https://img.shields.io/npm/dm/sf-run?style=for-the-badge&logo=npm&logoColor=white&color=CB3837)](https://www.npmjs.com/package/sf-run) +[![GitHub stars](https://img.shields.io/github/stars/gsd-build/SF?style=for-the-badge&logo=github&color=181717)](https://github.com/gsd-build/SF) [![Discord](https://img.shields.io/badge/Discord-Join%20us-5865F2?style=for-the-badge&logo=discord&logoColor=white)](https://discord.com/invite/nKXTsAcmbT) [![License](https://img.shields.io/badge/license-MIT-blue?style=for-the-badge)](LICENSE) -[![$GSD Token](https://img.shields.io/badge/$GSD-Dexscreener-1C1C1C?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgZmlsbD0iIzAwRkYwMCIvPjwvc3ZnPg==&logoColor=00FF00)](https://dexscreener.com/solana/dwudwjvan7bzkw9zwlbyv6kspdlvhwzrqy6ebk8xzxkv) +[![$SF Token](https://img.shields.io/badge/$SF-Dexscreener-1C1C1C?style=for-the-badge&logo=data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48Y2lyY2xlIGN4PSIxMiIgY3k9IjEyIiByPSIxMCIgZmlsbD0iIzAwRkYwMCIvPjwvc3ZnPg==&logoColor=00FF00)](https://dexscreener.com/solana/dwudwjvan7bzkw9zwlbyv6kspdlvhwzrqy6ebk8xzxkv) -The original GSD went viral as a prompt framework for Claude Code. It worked, but it was fighting the tool — injecting prompts through slash commands, hoping the LLM would follow instructions, with no actual control over context windows, sessions, or execution. +The original SF went viral as a prompt framework for Claude Code. It worked, but it was fighting the tool — injecting prompts through slash commands, hoping the LLM would follow instructions, with no actual control over context windows, sessions, or execution. -This version is different. GSD is now a standalone CLI built on the [Pi SDK](https://github.com/badlogic/pi-mono), which gives it direct TypeScript access to the agent harness itself. That means GSD can actually _do_ what v1 could only _ask_ the LLM to do: clear context between tasks, inject exactly the right files at dispatch time, manage git branches, track cost and tokens, detect stuck loops, recover from crashes, and auto-advance through an entire milestone without human intervention. +This version is different. SF is now a standalone CLI built on the [Pi SDK](https://github.com/badlogic/pi-mono), which gives it direct TypeScript access to the agent harness itself. That means SF can actually _do_ what v1 could only _ask_ the LLM to do: clear context between tasks, inject exactly the right files at dispatch time, manage git branches, track cost and tokens, detect stuck loops, recover from crashes, and auto-advance through an entire milestone without human intervention. One command. Walk away. Come back to a built project with clean git history. -
npm install -g gsd-pi@latest
+
npm install -g sf-run@latest
-> GSD now provisions a managed [RTK](https://github.com/rtk-ai/rtk) binary on supported macOS, Linux, and Windows installs to compress shell-command output in `bash`, `async_bash`, `bg_shell`, and verification flows. GSD forces `RTK_TELEMETRY_DISABLED=1` for all managed invocations. Set `GSD_RTK_DISABLED=1` to disable the integration. +> SF now provisions a managed [RTK](https://github.com/rtk-ai/rtk) binary on supported macOS, Linux, and Windows installs to compress shell-command output in `bash`, `async_bash`, `bg_shell`, and verification flows. SF forces `RTK_TELEMETRY_DISABLED=1` for all managed invocations. Set `SF_RTK_DISABLED=1` to disable the integration. > **📋 NOTICE: New to Node on Mac?** If you installed Node.js via Homebrew, you may be running a development release instead of LTS. **[Read this guide](./docs/user-docs/node-lts-macos.md)** to pin Node 24 LTS and avoid compatibility issues. @@ -56,7 +56,7 @@ One command. Walk away. Come back to a built project with clean git history. ### TUI Improvements - **Overlay subscription fix** — resolved overlay subscription lifecycle and `Ctrl+Shift+P` shortcut conflict. -- **Improved overlays and shortcuts** — GSD overlays, keyboard shortcuts, and notification flows redesigned for consistency. +- **Improved overlays and shortcuts** — SF overlays, keyboard shortcuts, and notification flows redesigned for consistency. - **Pinned output restored** — pinned output bar displays above the editor during tool execution again. - **Turn completion cleanup** — pinned latest output is cleared on turn completion, preventing stale output from persisting. - **Secure input masking** — extension input values are masked in interactive mode when collecting secrets. @@ -139,7 +139,7 @@ Full documentation is in the [`docs/`](./docs/) directory: - **[Dynamic Model Routing](./docs/user-docs/dynamic-model-routing.md)** — complexity-based model selection and budget pressure - **[Web Interface](./docs/user-docs/web-interface.md)** — browser-based project management and real-time progress - **[Migration from v1](./docs/user-docs/migration.md)** — `.planning` → `.gsd` migration -- **[Docker Sandbox](./docker/README.md)** — run GSD auto mode in an isolated Docker container +- **[Docker Sandbox](./docker/README.md)** — run SF auto mode in an isolated Docker container ### Developer Docs @@ -152,14 +152,14 @@ Full documentation is in the [`docs/`](./docs/) directory: ## What Changed From v1 -The original GSD was a collection of markdown prompts installed into `~/.claude/commands/`. It relied entirely on the LLM reading those prompts and doing the right thing. That worked surprisingly well — but it had hard limits: +The original SF was a collection of markdown prompts installed into `~/.claude/commands/`. It relied entirely on the LLM reading those prompts and doing the right thing. That worked surprisingly well — but it had hard limits: - **No context control.** The LLM accumulated garbage over a long session. Quality degraded. - **No real automation.** "Auto mode" was the LLM calling itself in a loop, burning context on orchestration overhead. - **No crash recovery.** If the session died mid-task, you started over. - **No observability.** No cost tracking, no progress dashboard, no stuck detection. -GSD v2 solves all of these because it's not a prompt framework anymore — it's a TypeScript application that _controls_ the agent session. +SF v2 solves all of these because it's not a prompt framework anymore — it's a TypeScript application that _controls_ the agent session. | | v1 (Prompt Framework) | v2 (Agent Application) | | -------------------- | ---------------------------- | ------------------------------------------------------- | @@ -182,7 +182,7 @@ GSD v2 solves all of these because it's not a prompt framework anymore — it's > **Note:** Migration works best with a `ROADMAP.md` file for milestone structure. Without one, milestones are inferred from the `phases/` directory. -If you have projects with `.planning` directories from the original Get Shit Done, you can migrate them to GSD-2's `.gsd` format: +If you have projects with `.planning` directories from the original Singularity Forge, you can migrate them to SF's `.gsd` format: ```bash # From within the project directory @@ -207,7 +207,7 @@ Supports format variations including milestone-sectioned roadmaps with `
- **Claude Max** — Anthropic's ToS may not explicitly permit OAuth use outside Claude's own applications. > - **GitHub Copilot** — Usage outside GitHub's own tools may be restricted by your subscription terms. > -> GSD supports API key authentication for all providers as the safe alternative. **We strongly recommend using API keys over OAuth for Google Gemini.** +> SF supports API key authentication for all providers as the safe alternative. **We strongly recommend using API keys over OAuth for Google Gemini.** ### OpenRouter -[OpenRouter](https://openrouter.ai) gives you access to hundreds of models through a single API key. Use it to run GSD with Llama, DeepSeek, Qwen, or anything else OpenRouter supports. +[OpenRouter](https://openrouter.ai) gives you access to hundreds of models through a single API key. Use it to run SF with Llama, DeepSeek, Qwen, or anything else OpenRouter supports. ### Per-Phase Model Selection @@ -763,7 +763,7 @@ models: completion: claude-sonnet-4-6 ``` -Use expensive models where quality matters (planning, complex execution) and cheaper/faster models where speed matters (research, simple completions). Each phase accepts a simple model string or an object with `model` and `fallbacks` — if the primary model fails (provider outage, rate limit, credit exhaustion), GSD automatically tries the next fallback. GSD tracks cost per-model so you can see exactly where your budget goes. +Use expensive models where quality matters (planning, complex execution) and cheaper/faster models where speed matters (research, simple completions). Each phase accepts a simple model string or an object with `model` and `fallbacks` — if the primary model fails (provider outage, rate limit, credit exhaustion), SF automatically tries the next fallback. SF tracks cost per-model so you can see exactly where your budget goes. --- @@ -771,7 +771,7 @@ Use expensive models where quality matters (planning, complex execution) and che | Project | Description | | ------- | ----------- | -| [GSD2 Config Utility](https://github.com/jeremymcs/gsd2-config) | Standalone configuration tool for managing GSD preferences, providers, and API keys | +| [GSD2 Config Utility](https://github.com/jeremymcs/gsd2-config) | Standalone configuration tool for managing SF preferences, providers, and API keys | --- @@ -791,8 +791,8 @@ Use expensive models where quality matters (planning, complex execution) and che
-**The original GSD showed what was possible. This version delivers it.** +**The original SF showed what was possible. This version delivers it.** -**`npm install -g gsd-pi && gsd`** +**`npm install -g sf-run && gsd`**
diff --git a/VISION.md b/VISION.md index da201bb17..db2b4da6c 100644 --- a/VISION.md +++ b/VISION.md @@ -1,10 +1,10 @@ # Vision -GSD-2 is the orchestration layer between you and AI coding agents. It handles planning, execution, verification, and shipping so you can focus on what to build, not how to wrangle the tools. +SF is the orchestration layer between you and AI coding agents. It handles planning, execution, verification, and shipping so you can focus on what to build, not how to wrangle the tools. ## Who it's for -Anyone who codes with AI agents — solo developers shipping faster, open-source maintainers handling scale, vibe coders who think in outcomes. GSD adapts to skill level and workflow. +Anyone who codes with AI agents — solo developers shipping faster, open-source maintainers handling scale, vibe coders who think in outcomes. SF adapts to skill level and workflow. ## Principles @@ -16,7 +16,7 @@ Anyone who codes with AI agents — solo developers shipping faster, open-source **Ship fast, fix fast.** Get it out, iterate quickly, don't let perfect be the enemy of good. Every release should work, but we'd rather ship and patch than delay and accumulate. -**Provider-agnostic.** GSD works with any LLM provider. No architectural decisions should privilege one provider over another. +**Provider-agnostic.** SF works with any LLM provider. No architectural decisions should privilege one provider over another. ## What we won't accept @@ -32,6 +32,6 @@ These save everyone time. Don't open PRs for: - **Heavy orchestration layers.** Don't duplicate what the agent infrastructure already provides. Build on top of it, don't wrap it. -## Relationship to GSD-1 +## Relationship to SF-1 -GSD-2 is the future. GSD-1 continues to serve its community but GSD-2 is where active development, new features, and architectural investment happen. The goal is to eventually migrate GSD-1 users to GSD-2. +SF is the future. SF-1 continues to serve its community but SF is where active development, new features, and architectural investment happen. The goal is to eventually migrate SF-1 users to SF. diff --git a/bin/gsd-from-source b/bin/gsd-from-source index 6c9b4bd68..795912b30 100755 --- a/bin/gsd-from-source +++ b/bin/gsd-from-source @@ -1,15 +1,15 @@ #!/usr/bin/env bash # -# gsd-from-source — run GSD directly from this source checkout via bun. +# gsd-from-source — run SF directly from this source checkout via bun. # # Purpose: every local commit in this repo (e.g. the #4251 fix) is live -# immediately without reinstalling the bun-packaged gsd-pi. Subagents can -# spawn gsd by pointing GSD_BIN_PATH at this script instead of dist/loader.js. +# immediately without reinstalling the bun-packaged sf-run. Subagents can +# spawn gsd by pointing SF_BIN_PATH at this script instead of dist/loader.js. # # Contract: # - Executable shim spawn() / exec() can launch directly. -# - Exports GSD_BIN_PATH before handing off to loader.ts so loader.ts's -# `GSD_BIN_PATH ||= process.argv[1]` branch preserves the shim path +# - Exports SF_BIN_PATH before handing off to loader.ts so loader.ts's +# `SF_BIN_PATH ||= process.argv[1]` branch preserves the shim path # instead of clobbering it with the .ts loader path (which is not # directly executable by child_process.spawn). # @@ -17,8 +17,8 @@ set -euo pipefail SCRIPT_DIR=$(cd -- "$(dirname -- "$(readlink -f "${BASH_SOURCE[0]}")")" &>/dev/null && pwd) -GSD_SOURCE_ROOT=$(cd -- "$SCRIPT_DIR/.." &>/dev/null && pwd) +SF_SOURCE_ROOT=$(cd -- "$SCRIPT_DIR/.." &>/dev/null && pwd) -export GSD_BIN_PATH="$SCRIPT_DIR/gsd-from-source" +export SF_BIN_PATH="$SCRIPT_DIR/gsd-from-source" -exec bun run "$GSD_SOURCE_ROOT/src/loader.ts" "$@" +exec bun run "$SF_SOURCE_ROOT/src/loader.ts" "$@" diff --git a/docker/.env.example b/docker/.env.example index ca9c3db84..2ecab3158 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -1,5 +1,5 @@ # ────────────────────────────────────────────── -# GSD Docker Sandbox — Environment Variables +# SF Docker Sandbox — Environment Variables # Copy this file to .env and fill in your keys. # ────────────────────────────────────────────── diff --git a/docker/Dockerfile.sandbox b/docker/Dockerfile.sandbox index 596bdf803..f76faf2c0 100644 --- a/docker/Dockerfile.sandbox +++ b/docker/Dockerfile.sandbox @@ -1,12 +1,12 @@ # ────────────────────────────────────────────── -# GSD Docker Sandbox Template +# SF Docker Sandbox Template # Base: docker/sandbox-templates:shell -# Purpose: Isolated environment for GSD auto mode +# Purpose: Isolated environment for SF auto mode # Usage: docker sandbox create --template ./docker # ────────────────────────────────────────────── FROM node:24-bookworm-slim -# System dependencies required by GSD +# System dependencies required by SF RUN apt-get update && apt-get install -y --no-install-recommends \ git \ curl \ @@ -15,15 +15,15 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ gosu \ && rm -rf /var/lib/apt/lists/* -# Install GSD globally — version controlled via build arg -ARG GSD_VERSION=latest -RUN npm install -g gsd-pi@${GSD_VERSION} +# Install SF globally — version controlled via build arg +ARG SF_VERSION=latest +RUN npm install -g sf-run@${SF_VERSION} # Create non-root user for sandbox isolation RUN groupadd --gid 1000 gsd \ && useradd --uid 1000 --gid gsd --shell /bin/bash --create-home gsd -# Persistent GSD state directory +# Persistent SF state directory RUN mkdir -p /home/gsd/.gsd && chown -R gsd:gsd /home/gsd/.gsd # Workspace directory — synced from host via Docker sandbox @@ -35,7 +35,7 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh COPY bootstrap.sh /usr/local/bin/bootstrap.sh RUN chmod +x /usr/local/bin/entrypoint.sh /usr/local/bin/bootstrap.sh -# Expose default GSD web UI port +# Expose default SF web UI port EXPOSE 3000 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] diff --git a/docker/README.md b/docker/README.md index 4d9e8ae06..04d459fd0 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,6 +1,6 @@ -# GSD Docker Sandbox +# SF Docker Sandbox -Run GSD auto mode inside an isolated Docker sandbox so it cannot touch your host filesystem, SSH keys, or other projects. +Run SF auto mode inside an isolated Docker sandbox so it cannot touch your host filesystem, SSH keys, or other projects. ## Prerequisites @@ -36,7 +36,7 @@ docker sandbox create --template ./docker --name gsd-sandbox # Shell into the sandbox docker sandbox exec -it gsd-sandbox bash -# Inside the sandbox, run GSD +# Inside the sandbox, run SF gsd auto "implement the feature described in issue #42" ``` @@ -55,7 +55,7 @@ docker compose -f docker/docker-compose.yaml up -d # 3. Shell into the container docker exec -it gsd-sandbox bash -# 4. Run GSD inside the container +# 4. Run SF inside the container gsd auto "implement the feature described in issue #42" ``` @@ -84,7 +84,7 @@ No hardcoded `user:` directive in compose — the entrypoint starts as root, rem ## Two-Terminal Workflow -GSD's recommended workflow uses two terminals — one for auto mode, one for interactive discussion: +SF's recommended workflow uses two terminals — one for auto mode, one for interactive discussion: ```bash # Terminal 1: auto mode @@ -110,7 +110,7 @@ Copy `docker/.env.example` to `docker/.env` and fill in your keys. The `.env` fi ## Network Allowlisting -If you restrict outbound network access in your sandbox, GSD needs these endpoints: +If you restrict outbound network access in your sandbox, SF needs these endpoints: | Purpose | Endpoints | |---------|-----------| @@ -121,10 +121,10 @@ If you restrict outbound network access in your sandbox, GSD needs these endpoin ## Customizing the Image -Build with a specific GSD version: +Build with a specific SF version: ```bash -docker compose -f docker/docker-compose.yaml build --build-arg GSD_VERSION=2.51.0 +docker compose -f docker/docker-compose.yaml build --build-arg SF_VERSION=2.51.0 ``` ## Cleanup @@ -141,4 +141,4 @@ docker compose -f docker/docker-compose.yaml down -v - **macOS/Windows only**: Docker Sandboxes require Docker Desktop 4.58+. Linux sandbox support is experimental. - **Environment parity**: The sandbox runs Ubuntu (Debian). macOS-only dependencies may not work inside the sandbox. -- **Named agent registration**: Docker Desktop's built-in named agents (claude, codex, etc.) are registered by Docker itself. Third-party tools cannot register new named agents. GSD uses the generic shell sandbox type with a custom template instead. +- **Named agent registration**: Docker Desktop's built-in named agents (claude, codex, etc.) are registered by Docker itself. Third-party tools cannot register new named agents. SF uses the generic shell sandbox type with a custom template instead. diff --git a/docker/bootstrap.sh b/docker/bootstrap.sh index 463952877..21f8d63e9 100755 --- a/docker/bootstrap.sh +++ b/docker/bootstrap.sh @@ -2,7 +2,7 @@ set -e # ────────────────────────────────────────────── -# GSD First-Boot Bootstrap +# SF First-Boot Bootstrap # # Runs once on initial container creation. # Called by entrypoint.sh as the gsd user. diff --git a/docker/docker-compose.full.yaml b/docker/docker-compose.full.yaml index 6ff8cad83..3bc5d2c54 100644 --- a/docker/docker-compose.full.yaml +++ b/docker/docker-compose.full.yaml @@ -4,16 +4,16 @@ services: context: . # Build context is the docker/ directory dockerfile: Dockerfile.sandbox # Runtime sandbox image with entrypoint args: - GSD_VERSION: latest # Pin a specific version: GSD_VERSION=2.51.0 + SF_VERSION: latest # Pin a specific version: SF_VERSION=2.51.0 container_name: gsd-sandbox ports: - - "3000:3000" # GSD web UI + - "3000:3000" # SF web UI volumes: - ../:/workspace # Project root mounted into the container - - gsd-state:/home/gsd/.gsd # Persistent GSD state across restarts + - gsd-state:/home/gsd/.gsd # Persistent SF state across restarts # - ~/.ssh:/home/gsd/.ssh:ro # SSH keys for git operations (read-only) # - ~/.gitconfig:/home/gsd/.gitconfig:ro # Host git config @@ -34,7 +34,7 @@ services: stdin_open: true # Keep stdin open for interactive use tty: true # Allocate a pseudo-TTY - # Health check — verify GSD is installed and responsive + # Health check — verify SF is installed and responsive healthcheck: test: ["CMD", "gsd", "--version"] interval: 30s diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 21641e2f1..5a14b14d7 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -4,7 +4,7 @@ services: context: . dockerfile: Dockerfile.sandbox args: - GSD_VERSION: latest + SF_VERSION: latest container_name: gsd-sandbox ports: - "3000:3000" diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 465a28fe0..673685980 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -2,7 +2,7 @@ set -e # ────────────────────────────────────────────── -# GSD Container Entrypoint +# SF Container Entrypoint # # Responsibilities: # 1. UID/GID remapping — match host user via PUID/PGID @@ -12,9 +12,9 @@ set -e # 4. Signal forwarding — exec into the final process # ────────────────────────────────────────────── -GSD_USER="gsd" -GSD_HOME="/home/${GSD_USER}" -GSD_DIR="${GSD_HOME}/.gsd" +SF_USER="gsd" +SF_HOME="/home/${SF_USER}" +SF_DIR="${SF_HOME}/.gsd" # ── 1. UID/GID Remapping ──────────────────────────────── # Accept PUID/PGID from the environment so the container @@ -24,24 +24,24 @@ GSD_DIR="${GSD_HOME}/.gsd" PUID="${PUID:-1000}" PGID="${PGID:-1000}" -CURRENT_UID=$(id -u "${GSD_USER}") -CURRENT_GID=$(id -g "${GSD_USER}") +CURRENT_UID=$(id -u "${SF_USER}") +CURRENT_GID=$(id -g "${SF_USER}") REMAPPED=0 if [ "${PGID}" != "${CURRENT_GID}" ]; then - groupmod -o -g "${PGID}" "${GSD_USER}" + groupmod -o -g "${PGID}" "${SF_USER}" REMAPPED=1 fi if [ "${PUID}" != "${CURRENT_UID}" ]; then - usermod -o -u "${PUID}" "${GSD_USER}" + usermod -o -u "${PUID}" "${SF_USER}" REMAPPED=1 fi # Fix ownership only when UID/GID actually changed if [ "${REMAPPED}" -eq 1 ]; then - chown -R "${PUID}:${PGID}" "${GSD_HOME}" + chown -R "${PUID}:${PGID}" "${SF_HOME}" chown "${PUID}:${PGID}" /workspace fi @@ -50,24 +50,24 @@ fi # path doesn't exist. We need these to be files, so touch # them before Docker gets a chance to mangle things. -mkdir -p "${GSD_DIR}" +mkdir -p "${SF_DIR}" -if [ ! -f "${GSD_DIR}/settings.json" ]; then - echo '{}' > "${GSD_DIR}/settings.json" +if [ ! -f "${SF_DIR}/settings.json" ]; then + echo '{}' > "${SF_DIR}/settings.json" fi -chown "${PUID}:${PGID}" "${GSD_DIR}" "${GSD_DIR}/settings.json" +chown "${PUID}:${PGID}" "${SF_DIR}" "${SF_DIR}/settings.json" # ── 3. Sentinel-based Bootstrap ───────────────────────── # Run first-boot setup exactly once. Subsequent container # starts (or restarts) skip this entirely. -SENTINEL="${GSD_DIR}/.bootstrapped" +SENTINEL="${SF_DIR}/.bootstrapped" if [ ! -f "${SENTINEL}" ]; then if [ -x /usr/local/bin/bootstrap.sh ]; then # Run bootstrap as the gsd user so files get correct ownership - gosu "${GSD_USER}" /usr/local/bin/bootstrap.sh + gosu "${SF_USER}" /usr/local/bin/bootstrap.sh fi touch "${SENTINEL}" chown "${PUID}:${PGID}" "${SENTINEL}" @@ -78,4 +78,4 @@ fi # as the gsd user. exec + gosu = proper PID 1 = proper # signal forwarding (SIGTERM, SIGINT, etc.). -exec gosu "${GSD_USER}" "$@" +exec gosu "${SF_USER}" "$@" diff --git a/docs/README.md b/docs/README.md index ec409e448..8a35257ea 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,10 +1,10 @@ -# GSD Documentation +# SF Documentation -Welcome to the GSD documentation. This covers everything from getting started to advanced configuration, auto-mode internals, and extending GSD with the Pi SDK. +Welcome to the SF documentation. This covers everything from getting started to advanced configuration, auto-mode internals, and extending SF with the Pi SDK. ## User Documentation -Guides for installing, configuring, and using GSD day-to-day. Located in [`user-docs/`](./user-docs/). +Guides for installing, configuring, and using SF day-to-day. Located in [`user-docs/`](./user-docs/). Simplified Chinese translation: [`zh-CN/`](./zh-CN/). @@ -26,7 +26,7 @@ Simplified Chinese translation: [`zh-CN/`](./zh-CN/). | [Parallel Orchestration](./user-docs/parallel-orchestration.md) | Run multiple milestones simultaneously with worker isolation and coordination | | [Working in Teams](./user-docs/working-in-teams.md) | Unique milestone IDs, `.gitignore` setup, and shared planning artifacts | | [Skills](./user-docs/skills.md) | Bundled skills, skill discovery, and custom skill authoring | -| [Migration from v1](./user-docs/migration.md) | Migrating `.planning` directories from the original GSD | +| [Migration from v1](./user-docs/migration.md) | Migrating `.planning` directories from the original SF | | [Troubleshooting](./user-docs/troubleshooting.md) | Common issues, `/gsd doctor` (real-time visibility v2.40), `/gsd forensics` (full debugger v2.40), and recovery procedures | | [Web Interface](./user-docs/web-interface.md) | Browser-based project management with `gsd --web` (v2.41) | | [VS Code Extension](../vscode-extension/README.md) | Chat participant, sidebar dashboard, and RPC integration for VS Code | @@ -43,7 +43,7 @@ Design documents, ADRs, and internal references. Located in [`dev/`](./dev/). | [ADR-003: Pipeline Simplification](./dev/ADR-003-pipeline-simplification.md) | Research merged into planning, mechanical completion (v2.30) | | [ADR-004: Capability-Aware Model Routing](./dev/ADR-004-capability-aware-model-routing.md) | Extend routing from tier/cost selection to task-capability matching | | [ADR-007: Model Catalog Split](./dev/ADR-007-model-catalog-split.md) | Separate model metadata from routing logic for extensibility | -| [ADR-008: GSD Tools over MCP](./dev/ADR-008-gsd-tools-over-mcp-for-provider-parity.md) | Native tools over MCP for provider parity | +| [ADR-008: SF Tools over MCP](./dev/ADR-008-gsd-tools-over-mcp-for-provider-parity.md) | Native tools over MCP for provider parity | | [ADR-008: Implementation Plan](./dev/ADR-008-IMPLEMENTATION-PLAN.md) | Implementation plan for ADR-008 | | [Context Optimization Opportunities](./dev/pi-context-optimization-opportunities.md) | Analysis of context window usage and optimization strategies | | [File System Map](./dev/FILE-SYSTEM-MAP.md) | Complete file system reference | @@ -54,7 +54,7 @@ Design documents, ADRs, and internal references. Located in [`dev/`](./dev/). ## Pi SDK Documentation -Guides for the underlying Pi SDK that GSD is built on. Located in [`dev/`](./dev/). +Guides for the underlying Pi SDK that SF is built on. Located in [`dev/`](./dev/). | Guide | Description | |-------|-------------| diff --git a/docs/dev/ADR-001-branchless-worktree-architecture.md b/docs/dev/ADR-001-branchless-worktree-architecture.md index 478dade24..f952dd1bf 100644 --- a/docs/dev/ADR-001-branchless-worktree-architecture.md +++ b/docs/dev/ADR-001-branchless-worktree-architecture.md @@ -7,7 +7,7 @@ ## Context -GSD uses git for isolation during autonomous coding sessions. The current architecture (shipped in M003, v2.13.0) creates a **worktree per milestone** with **slice branches inside each worktree**. Each slice (`S01`, `S02`, ...) gets its own branch (`gsd/M001/S01`) within the worktree, which merges back to the milestone branch (`milestone/M001`) via `--no-ff` when the slice completes. The milestone branch squash-merges to `main` when the milestone completes. +SF uses git for isolation during autonomous coding sessions. The current architecture (shipped in M003, v2.13.0) creates a **worktree per milestone** with **slice branches inside each worktree**. Each slice (`S01`, `S02`, ...) gets its own branch (`gsd/M001/S01`) within the worktree, which merges back to the milestone branch (`milestone/M001`) via `--no-ff` when the slice completes. The milestone branch squash-merges to `main` when the milestone completes. This architecture replaced a previous "branch-per-slice" model that had severe `.gsd/` merge conflicts. M003 solved the merge conflicts but retained slice branches inside worktrees, inheriting complexity that has produced persistent, user-facing failures. @@ -21,9 +21,9 @@ Documented in the auto-stop architecture doc as "The Branch-Switching Problem." **2. `.gsd/` state clobbering across branches** -`.gsd/` is gitignored (line 52 of `.gitignore`: `.gsd/`). Planning artifacts (roadmaps, plans, summaries, decisions, requirements) live in `.gsd/milestones/` but are invisible to git. When multiple branches or worktrees operate from the same repo, they share a single `.gsd/` directory on disk. Branch A's M001 roadmap overwrites Branch B's M001 roadmap. GSD reads corrupted state, shows wrong milestone as complete, or enters infinite dispatch loops. +`.gsd/` is gitignored (line 52 of `.gitignore`: `.gsd/`). Planning artifacts (roadmaps, plans, summaries, decisions, requirements) live in `.gsd/milestones/` but are invisible to git. When multiple branches or worktrees operate from the same repo, they share a single `.gsd/` directory on disk. Branch A's M001 roadmap overwrites Branch B's M001 roadmap. SF reads corrupted state, shows wrong milestone as complete, or enters infinite dispatch loops. -The codebase has a contradictory workaround: `smartStage()` (git-service.ts:304-352) force-adds `GSD_DURABLE_PATHS` (milestones/, DECISIONS.md, PROJECT.md, REQUIREMENTS.md, QUEUE.md) despite the `.gitignore`. This means `.gsd/milestones/` IS partially tracked on some branches but the gitignore claims otherwise. The code fights the configuration. +The codebase has a contradictory workaround: `smartStage()` (git-service.ts:304-352) force-adds `SF_DURABLE_PATHS` (milestones/, DECISIONS.md, PROJECT.md, REQUIREMENTS.md, QUEUE.md) despite the `.gitignore`. This means `.gsd/milestones/` IS partially tracked on some branches but the gitignore claims otherwise. The code fights the configuration. **3. Merge/conflict code complexity** @@ -123,7 +123,7 @@ main ───────────────────────── Replace the current blanket `.gsd/` ignore with explicit runtime-only ignores: ```gitignore -# ── GSD: Runtime / Ephemeral ───────────────────────────────── +# ── SF: Runtime / Ephemeral ───────────────────────────────── .gsd/auto.lock .gsd/completed-units.json .gsd/STATE.md @@ -167,7 +167,7 @@ No conflict categorization. No runtime file stripping. No `.gsd/` special handli ### What `smartStage()` Becomes -The force-add of `GSD_DURABLE_PATHS` is no longer needed — planning artifacts are not gitignored, so `git add -A` picks them up naturally. The function reduces to: +The force-add of `SF_DURABLE_PATHS` is no longer needed — planning artifacts are not gitignored, so `git add -A` picks them up naturally. The function reduces to: 1. `git add -A` 2. `git reset HEAD -- ` (unstage runtime files) @@ -225,7 +225,7 @@ After `research-slice` or `plan-slice`, immediately merge the slice branch back ### B. Keep `.gsd/` gitignored, bootstrap from git history for manual worktrees -When GSD detects an empty `.gsd/` in a worktree, reconstruct state from the branch's git history using `git show :.gsd/...`. +When SF detects an empty `.gsd/` in a worktree, reconstruct state from the branch's git history using `git show :.gsd/...`. **Rejected:** Recovery logic, not architecture. Doesn't fix the fundamental problem of branch-agnostic state. Fails when git history has been rewritten. @@ -243,7 +243,7 @@ This architecture was stress-tested by three independent models: **GPT-5.4 (Codex)** read the full codebase and confirmed the model is sound. Identified that `smartStage()` already force-adds durable paths (validating the tracked-artifact approach) and that `resolveMainWorktreeRoot` in PR #487 is architecturally wrong (adopted — PR to be closed). -**Codebase analysis** confirmed `.gsd/milestones/` is already partially tracked on `main` despite the `.gitignore`, that `GSD_DURABLE_PATHS` exists as a code-level acknowledgment that planning artifacts should be tracked, and that the README already documents the correct runtime-only gitignore pattern. +**Codebase analysis** confirmed `.gsd/milestones/` is already partially tracked on `main` despite the `.gitignore`, that `SF_DURABLE_PATHS` exists as a code-level acknowledgment that planning artifacts should be tracked, and that the README already documents the correct runtime-only gitignore pattern. ### Codex (GPT-5.4) Dissent — "No Slice Branches Is a Redesign" @@ -268,7 +268,7 @@ Response: Accepted in spirit. Commits with conventional tags (`feat(M001/S01):`, ## Action Items 1. Close PR #487 (`resolveMainWorktreeRoot`) — contradicts this architecture -2. Implement as a GSD milestone with phases: +2. Implement as a SF milestone with phases: - Update `.gitignore` and force-add existing planning artifacts - Remove slice branch creation/switching/merging code - Simplify `mergeMilestoneToMain()` and `smartStage()` diff --git a/docs/dev/ADR-003-pipeline-simplification.md b/docs/dev/ADR-003-pipeline-simplification.md index ddc31f609..61abf0c0b 100644 --- a/docs/dev/ADR-003-pipeline-simplification.md +++ b/docs/dev/ADR-003-pipeline-simplification.md @@ -8,7 +8,7 @@ ## Context -GSD auto-mode orchestrates a multi-session pipeline where each "unit" of work runs in a fresh LLM session. The pipeline for a single milestone with N slices and M tasks per slice runs through: +SF auto-mode orchestrates a multi-session pipeline where each "unit" of work runs in a fresh LLM session. The pipeline for a single milestone with N slices and M tasks per slice runs through: ``` research-milestone → plan-milestone → diff --git a/docs/dev/ADR-004-capability-aware-model-routing.md b/docs/dev/ADR-004-capability-aware-model-routing.md index 610295752..f381229ee 100644 --- a/docs/dev/ADR-004-capability-aware-model-routing.md +++ b/docs/dev/ADR-004-capability-aware-model-routing.md @@ -8,7 +8,7 @@ ## Context -GSD already supports dynamic model routing in auto-mode, but the current router is fundamentally **complexity-tier and cost based**, not **task-capability based**. +SF already supports dynamic model routing in auto-mode, but the current router is fundamentally **complexity-tier and cost based**, not **task-capability based**. Today the selection pipeline is: @@ -36,7 +36,7 @@ Users increasingly configure heterogeneous provider pools through `models.json`, - Gemini-class models often perform best on long-context synthesis and research-heavy tasks - Fast small models are often best for cheap validation, triage, and lightweight hooks -The current router cannot express those differences. If Claude and Codex are both available at the same tier, GSD either: +The current router cannot express those differences. If Claude and Codex are both available at the same tier, SF either: - treats them as equivalent and picks the cheaper one, or - requires the user to hardcode specific phase models manually @@ -53,7 +53,7 @@ Different users have different subscriptions and provider access. A fixed mappin ### 3. Capability knowledge is trapped in user intuition -Experienced users know which models are better at coding, debugging, research, long-context work, or instruction following. GSD has no representation for that knowledge, so it cannot route intelligently on the user's behalf. +Experienced users know which models are better at coding, debugging, research, long-context work, or instruction following. SF has no representation for that knowledge, so it cannot route intelligently on the user's behalf. The system already has several building blocks that make a richer router feasible: @@ -234,7 +234,7 @@ Partial overrides are deep-merged with built-in defaults. This uses the same `mo Built-in capability profiles are maintained alongside the existing `MODEL_CAPABILITY_TIER` and `MODEL_COST_PER_1K_INPUT` tables in `model-router.ts`. When the `@gsd/pi-ai` model catalog is updated with new models, the capability profile table must be updated in the same PR. A linting rule should flag any model present in `MODEL_CAPABILITY_TIER` but missing from `MODEL_CAPABILITY_PROFILES`. -Profiles are versioned implicitly by GSD release. The existing `models.json` `modelOverrides` mechanism allows users to correct stale defaults immediately without waiting for a GSD update. +Profiles are versioned implicitly by SF release. The existing `models.json` `modelOverrides` mechanism allows users to correct stale defaults immediately without waiting for a SF update. ### Extension-First Rollout @@ -326,7 +326,7 @@ Models without capability profiles get uniform scores, producing the same cheape #### 1. More metadata to maintain -Built-in model profiles will drift as model families evolve. Mitigation: profiles live in a single data table, versioned with GSD releases, with a lint rule for completeness. +Built-in model profiles will drift as model families evolve. Mitigation: profiles live in a single data table, versioned with SF releases, with a lint rule for completeness. #### 2. Scoring can create false precision @@ -382,7 +382,7 @@ Capability scoring adds the "what kind of work" signal on top. The two systems a ### 1. Hardcoded vendor stereotypes become stale -If the default profiles are not reviewed regularly, GSD will encode outdated assumptions about which models are "best" at which tasks. +If the default profiles are not reviewed regularly, SF will encode outdated assumptions about which models are "best" at which tasks. **Mitigation:** Keep defaults in a single data table (not scattered conditionals). Lint for completeness against the model catalog. User overrides via `modelOverrides` provide immediate escape hatch. Document profiles as heuristic rankings, not benchmarks. @@ -425,7 +425,7 @@ Rejected because it optimizes cost within a tier but still treats meaningfully d ### B. Hardcode task → model mappings -Rejected because it breaks as soon as the user does not have the expected model. This is appropriate for a closed product with a fixed fleet, not for GSD's user-configured provider model. +Rejected because it breaks as soon as the user does not have the expected model. This is appropriate for a closed product with a fixed fleet, not for SF's user-configured provider model. ### C. Route only by user-specified per-phase models diff --git a/docs/dev/ADR-005-multi-model-provider-tool-strategy.md b/docs/dev/ADR-005-multi-model-provider-tool-strategy.md index 77e4f2128..61550c2eb 100644 --- a/docs/dev/ADR-005-multi-model-provider-tool-strategy.md +++ b/docs/dev/ADR-005-multi-model-provider-tool-strategy.md @@ -7,7 +7,7 @@ ## Context -PR #2755 lands capability-aware model routing (ADR-004), extending the router from a one-dimensional complexity-tier system to a two-dimensional system that scores models across 7 capability dimensions. GSD can now intelligently pick the best model for a task from a heterogeneous pool. +PR #2755 lands capability-aware model routing (ADR-004), extending the router from a one-dimensional complexity-tier system to a two-dimensional system that scores models across 7 capability dimensions. SF can now intelligently pick the best model for a task from a heterogeneous pool. But model selection is only one piece of the multi-model puzzle. The system faces structural gaps as users configure diverse provider pools: diff --git a/docs/dev/ADR-007-model-catalog-split.md b/docs/dev/ADR-007-model-catalog-split.md index 0545a5e12..e83fbbd3d 100644 --- a/docs/dev/ADR-007-model-catalog-split.md +++ b/docs/dev/ADR-007-model-catalog-split.md @@ -114,7 +114,7 @@ packages/pi-ai/src/models/ ```typescript // models/index.ts -// GSD-2 — Model registry (split by provider for maintainability) +// SF — Model registry (split by provider for maintainability) import { ANTHROPIC_MODELS } from "./generated/anthropic.js"; import { OPENAI_MODELS } from "./generated/openai.js"; diff --git a/docs/dev/ADR-008-IMPLEMENTATION-PLAN.md b/docs/dev/ADR-008-IMPLEMENTATION-PLAN.md index 23a1f8c5b..e815dd55a 100644 --- a/docs/dev/ADR-008-IMPLEMENTATION-PLAN.md +++ b/docs/dev/ADR-008-IMPLEMENTATION-PLAN.md @@ -6,17 +6,17 @@ ## Objective -Implement the ADR-008 decision by exposing the core GSD workflow tool contract over MCP, then wiring MCP-backed access into provider paths that cannot use the native in-process GSD tool registry directly. +Implement the ADR-008 decision by exposing the core SF workflow tool contract over MCP, then wiring MCP-backed access into provider paths that cannot use the native in-process SF tool registry directly. The first usable outcome is: -- a Claude Code-backed execution session can complete a task using canonical GSD tools +- a Claude Code-backed execution session can complete a task using canonical SF tools - no manual summary-writing fallback is needed - native provider behavior remains unchanged ## Non-Goals -- Replacing native in-process GSD tools with MCP +- Replacing native in-process SF tools with MCP - Exporting every historical alias in the first rollout - Reworking the entire session-oriented MCP server before proving the workflow-tool surface - Supporting every provider path before Claude Code is working end-to-end @@ -25,7 +25,7 @@ The first usable outcome is: - Native and MCP tool paths must share business logic - MCP must not bypass write-gate or discussion-gate protections -- Canonical GSD state transitions must remain DB-backed +- Canonical SF state transitions must remain DB-backed - Provider capability mismatches must fail early, not degrade silently ## Workstreams @@ -54,7 +54,7 @@ Exit criteria: ### 2. Workflow-Tool MCP Surface -Goal: add an MCP server surface for real GSD workflow tools, distinct from the current session/read API. +Goal: add an MCP server surface for real SF workflow tools, distinct from the current session/read API. Preferred first-cut tool set: @@ -113,7 +113,7 @@ Exit criteria: ### 4. Claude Code Provider Integration -Goal: attach the GSD workflow-tool MCP surface to Claude Code sessions. +Goal: attach the SF workflow-tool MCP surface to Claude Code sessions. Targets: @@ -122,13 +122,13 @@ Targets: Expected work: -- build a GSD-managed `mcpServers` config for the Claude SDK session -- attach the workflow MCP server only when the session requires GSD tools +- build a SF-managed `mcpServers` config for the Claude SDK session +- attach the workflow MCP server only when the session requires SF tools - keep current Claude Code streaming behavior intact Exit criteria: -- Claude Code session can discover the GSD workflow MCP tools +- Claude Code session can discover the SF workflow MCP tools - task execution path can call `gsd_task_complete` successfully ### 5. Capability Detection and Failure Path @@ -137,14 +137,14 @@ Goal: refuse to start tool-dependent workflows when required capabilities are un Targets: -- GSD dispatch / auto-mode preflight +- SF dispatch / auto-mode preflight - provider selection and routing checks - user-facing compatibility errors Required behavior: -- if native GSD tools are available, proceed -- else if GSD workflow MCP tools are available, proceed +- if native SF tools are available, proceed +- else if SF workflow MCP tools are available, proceed - else fail fast with a precise message Exit criteria: @@ -164,7 +164,7 @@ Targets: Rules: -- prompts should keep requiring canonical GSD completion/planning tools +- prompts should keep requiring canonical SF completion/planning tools - prompts should not imply “native in-process tool only” - docs should explain native vs MCP-backed fulfillment paths @@ -278,7 +278,7 @@ High-probability files for the first implementation: ### End-to-End -- plan or execute a small fixture task and complete it through canonical GSD tools +- plan or execute a small fixture task and complete it through canonical SF tools - confirm DB row, rendered summary, and plan state stay in sync ## Risks @@ -319,7 +319,7 @@ Mitigation: ADR-008 is considered implemented when: -1. Claude Code-backed execution can use canonical GSD workflow tools over MCP. +1. Claude Code-backed execution can use canonical SF workflow tools over MCP. 2. Native provider behavior remains intact. 3. Shared handlers back both native and MCP invocation. 4. Gating and state integrity protections apply equally to MCP mutations. diff --git a/docs/dev/ADR-008-gsd-tools-over-mcp-for-provider-parity.md b/docs/dev/ADR-008-gsd-tools-over-mcp-for-provider-parity.md index 6e17e5873..0c8cf58a1 100644 --- a/docs/dev/ADR-008-gsd-tools-over-mcp-for-provider-parity.md +++ b/docs/dev/ADR-008-gsd-tools-over-mcp-for-provider-parity.md @@ -1,4 +1,4 @@ -# ADR-008: Expose GSD Workflow Tools Over MCP for Provider Parity +# ADR-008: Expose SF Workflow Tools Over MCP for Provider Parity **Status:** Proposed **Date:** 2026-04-09 @@ -7,7 +7,7 @@ ## Context -GSD currently has two different tool surfaces: +SF currently has two different tool surfaces: 1. **In-process extension tools** registered directly into the runtime via `pi.registerTool(...)`. 2. **An external MCP server** that exposes session orchestration and read-only project inspection. @@ -16,7 +16,7 @@ This split is now creating a real provider compatibility problem. ### What exists today -The core GSD workflow tools are internal extension tools. Examples include: +The core SF workflow tools are internal extension tools. Examples include: - `gsd_summary_save` - `gsd_plan_milestone` @@ -29,7 +29,7 @@ The core GSD workflow tools are internal extension tools. Examples include: - `gsd_replan_slice` - `gsd_reassess_roadmap` -These are registered in `src/resources/extensions/gsd/bootstrap/db-tools.ts` and related bootstrap files. GSD prompts assume these tools are available during discuss, plan, and execute flows. +These are registered in `src/resources/extensions/gsd/bootstrap/db-tools.ts` and related bootstrap files. SF prompts assume these tools are available during discuss, plan, and execute flows. Separately, `packages/mcp-server/src/server.ts` exposes a different tool surface: @@ -40,12 +40,12 @@ That MCP server is useful, but it is **not** a transport for the internal workfl ### The current failure mode -The Claude Code CLI provider uses the Anthropic Agent SDK through `src/resources/extensions/claude-code-cli/stream-adapter.ts`. That adapter starts a Claude SDK session, but it does not forward the internal GSD tool registry into the SDK session, nor does it attach a GSD MCP server for those tools. +The Claude Code CLI provider uses the Anthropic Agent SDK through `src/resources/extensions/claude-code-cli/stream-adapter.ts`. That adapter starts a Claude SDK session, but it does not forward the internal SF tool registry into the SDK session, nor does it attach a SF MCP server for those tools. As a result: - prompts tell the model to call tools like `gsd_complete_task` -- the tools exist in GSD +- the tools exist in SF - but Claude Code sessions do not actually receive those tools This produces a contract mismatch: the model is required to use tools that are unavailable in that provider path. @@ -54,20 +54,20 @@ This produces a contract mismatch: the model is required to use tools that are u This is not a one-off Claude Code bug. It reveals a deeper architectural issue: -- GSD’s core workflow contract is transport-specific +- SF’s core workflow contract is transport-specific - prompt authors assume “internal extension tool availability” - provider integrations do not all share the same execution surface -If GSD wants provider parity, its workflow tools need a transport-neutral exposure model. +If SF wants provider parity, its workflow tools need a transport-neutral exposure model. ## Decision -**Expose the GSD workflow tool contract over MCP as a first-class transport, and make MCP the compatibility layer for providers that cannot directly access the in-process GSD tool registry.** +**Expose the SF workflow tool contract over MCP as a first-class transport, and make MCP the compatibility layer for providers that cannot directly access the in-process SF tool registry.** This means: -1. GSD will keep its existing in-process tool registration for native runtime use. -2. GSD will add an MCP execution surface for the same workflow tools. +1. SF will keep its existing in-process tool registration for native runtime use. +2. SF will add an MCP execution surface for the same workflow tools. 3. Both surfaces must call the same underlying business logic. 4. Provider integrations such as Claude Code will use the MCP surface when they cannot access native in-process tools directly. @@ -77,7 +77,7 @@ The decision is explicitly **not** to replace the native tool system with MCP ev ### 1. One handler layer, multiple transports -GSD tool behavior must not be implemented twice. +SF tool behavior must not be implemented twice. The transport-neutral business logic for workflow tools should be shared by: @@ -88,7 +88,7 @@ The MCP server should wrap the same handlers used by `db-tools.ts`, `query-tools ### 2. Add a workflow-tool MCP surface -GSD will expose the workflow tools required for discuss, planning, execution, and completion over MCP. +SF will expose the workflow tools required for discuss, planning, execution, and completion over MCP. Initial minimum set: @@ -110,7 +110,7 @@ Aliases should be treated conservatively. MCP should prefer canonical names unle ### 3. Preserve safety semantics -The current GSD safety model includes write gates, discussion gates, queue-mode restrictions, and state integrity guarantees. +The current SF safety model includes write gates, discussion gates, queue-mode restrictions, and state integrity guarantees. Those guarantees must continue to apply when tools are invoked over MCP. In particular: @@ -120,14 +120,14 @@ Those guarantees must continue to apply when tools are invoked over MCP. In part ### 4. Make provider capability checks explicit -Before dispatching a workflow that requires GSD workflow tools, GSD should check whether the selected provider/session can access the required tool surface. +Before dispatching a workflow that requires SF workflow tools, SF should check whether the selected provider/session can access the required tool surface. If a provider cannot access either: -- native in-process GSD tools, or -- the GSD MCP workflow tool surface +- native in-process SF tools, or +- the SF MCP workflow tool surface -then GSD must fail early with a clear compatibility error rather than allowing execution to continue in a degraded, state-breaking mode. +then SF must fail early with a clear compatibility error rather than allowing execution to continue in a degraded, state-breaking mode. ### 5. Keep the existing session/read MCP server @@ -151,15 +151,15 @@ This would fix the immediate failure for multi-provider users, but it does not s This is a valid short-term guardrail and may still be used before MCP support is complete. -**Rejected as the long-term architecture** because it permanently excludes a supported provider from first-class GSD execution. +**Rejected as the long-term architecture** because it permanently excludes a supported provider from first-class SF execution. -### Alternative C: Inject the internal GSD tool registry directly into the Claude Agent SDK without MCP +### Alternative C: Inject the internal SF tool registry directly into the Claude Agent SDK without MCP -This would tightly couple GSD’s internal extension runtime to a provider-specific integration path. It would not generalize well to other providers or external tool clients. +This would tightly couple SF’s internal extension runtime to a provider-specific integration path. It would not generalize well to other providers or external tool clients. **Rejected** because it creates a provider-specific bridge instead of a transport-neutral contract. -### Alternative D: Replace native GSD tools entirely with MCP +### Alternative D: Replace native SF tools entirely with MCP This would simplify the conceptual model, but it would force all runtimes through an external protocol boundary even when the native in-process path is faster and already works well. @@ -169,7 +169,7 @@ This would simplify the conceptual model, but it would force all runtimes throug ### Positive -1. **Provider parity improves.** Providers that can consume MCP tools can participate in full GSD workflow execution. +1. **Provider parity improves.** Providers that can consume MCP tools can participate in full SF workflow execution. 2. **The workflow contract becomes transport-neutral.** Prompts can rely on capabilities rather than a specific runtime implementation detail. 3. **One compatibility story for external clients.** Claude Code, Cursor, and other MCP-capable clients can use the same workflow tool surface. 4. **Better long-term architecture.** Internal tools and external transports converge on shared handlers instead of diverging implementations. @@ -213,25 +213,25 @@ Move or centralize write gates and related policy checks so MCP mutations cannot ### Phase 4: Attach MCP workflow tools to Claude Code sessions -Update the Claude Code provider integration to pass a GSD-managed `mcpServers` configuration into the Claude Agent SDK session when required. +Update the Claude Code provider integration to pass a SF-managed `mcpServers` configuration into the Claude Agent SDK session when required. ### Phase 5: Add provider capability gating -Before tool-dependent flows begin, verify that the active provider can access the required GSD workflow tools via either native registration or MCP. +Before tool-dependent flows begin, verify that the active provider can access the required SF workflow tools via either native registration or MCP. ### Phase 6: Update prompts and docs -Prompt contracts should remain strict about using canonical GSD completion/planning tools, but documentation and runtime messaging must no longer assume that only native in-process tool registration satisfies that contract. +Prompt contracts should remain strict about using canonical SF completion/planning tools, but documentation and runtime messaging must no longer assume that only native in-process tool registration satisfies that contract. ## Validation Success is defined by all of the following: -1. A Claude Code-backed execution session can complete a task using canonical GSD workflow tools without manual summary writing. +1. A Claude Code-backed execution session can complete a task using canonical SF workflow tools without manual summary writing. 2. Native provider behavior remains unchanged. 3. MCP-invoked workflow tools produce the same DB updates, rendered artifacts, and state transitions as native tool calls. 4. Write-gate and discussion-gate protections still hold under MCP invocation. -5. When required capabilities are unavailable, GSD fails early with a precise compatibility error. +5. When required capabilities are unavailable, SF fails early with a precise compatibility error. ## Scope Notes diff --git a/docs/dev/ADR-009-IMPLEMENTATION-PLAN.md b/docs/dev/ADR-009-IMPLEMENTATION-PLAN.md index beec2891d..3236842fd 100644 --- a/docs/dev/ADR-009-IMPLEMENTATION-PLAN.md +++ b/docs/dev/ADR-009-IMPLEMENTATION-PLAN.md @@ -7,7 +7,7 @@ ## Objective -Implement ADR-009 by migrating GSD orchestration internals to a Unified Orchestration Kernel (UOK) with six control planes: +Implement ADR-009 by migrating SF orchestration internals to a Unified Orchestration Kernel (UOK) with six control planes: 1. Plan 2. Execution diff --git a/docs/dev/ADR-009-orchestration-kernel-refactor.md b/docs/dev/ADR-009-orchestration-kernel-refactor.md index 8612762c5..fe49142b9 100644 --- a/docs/dev/ADR-009-orchestration-kernel-refactor.md +++ b/docs/dev/ADR-009-orchestration-kernel-refactor.md @@ -2,12 +2,12 @@ **Status:** Proposed **Date:** 2026-04-14 -**Deciders:** Jeremy McSpadden, GSD Core Team +**Deciders:** Jeremy McSpadden, SF Core Team **Related:** ADR-001 (worktree architecture), ADR-003 (pipeline simplification), ADR-004 (capability-aware routing), ADR-005 (multi-provider strategy), ADR-008 (tools over MCP) ## Context -GSD already ships many advanced features: +SF already ships many advanced features: - dynamic model routing and multi-provider support - hooks (`pre_dispatch_hooks`, `post_unit_hooks`) @@ -34,7 +34,7 @@ The target requirements for the next architecture are: ## Decision -Refactor GSD into a **Unified Orchestration Kernel (UOK)** with explicit control planes, typed contracts, and an incremental strangler migration. This is a staged architectural replacement of orchestration internals, not a rewrite of user-facing CLI/web/MCP surfaces. +Refactor SF into a **Unified Orchestration Kernel (UOK)** with explicit control planes, typed contracts, and an incremental strangler migration. This is a staged architectural replacement of orchestration internals, not a rewrite of user-facing CLI/web/MCP surfaces. ### Core Architectural Model diff --git a/docs/dev/ADR-010-pi-clean-seam-architecture.md b/docs/dev/ADR-010-pi-clean-seam-architecture.md index 10cc141d8..24c217124 100644 --- a/docs/dev/ADR-010-pi-clean-seam-architecture.md +++ b/docs/dev/ADR-010-pi-clean-seam-architecture.md @@ -9,7 +9,7 @@ ## Context -GSD vendors four packages from [pi-mono](https://github.com/badlogic/pi-mono) (an open-source coding agent framework) by copying their source directly into `/packages/`: +SF vendors four packages from [pi-mono](https://github.com/badlogic/pi-mono) (an open-source coding agent framework) by copying their source directly into `/packages/`: | Package | Role | Current version | |---|---|---| @@ -18,15 +18,15 @@ GSD vendors four packages from [pi-mono](https://github.com/badlogic/pi-mono) (a | `@gsd/pi-tui` | Terminal UI framework | 0.57.1 | | `@gsd/pi-coding-agent` | Coding agent, tools, extension system | 2.74.0 | -Vendoring was chosen over npm dependencies to allow GSD to modify the upstream packages freely. However, over time, GSD has written substantial original logic directly inside `pi-coding-agent` — approximately 79 files including: +Vendoring was chosen over npm dependencies to allow SF to modify the upstream packages freely. However, over time, SF has written substantial original logic directly inside `pi-coding-agent` — approximately 79 files including: -- `agent-session.ts` (98KB) — the primary GSD session orchestrator +- `agent-session.ts` (98KB) — the primary SF session orchestrator - `compaction/` — context window management - `modes/interactive/`, `modes/rpc/`, `modes/print/` — all three run modes - `cli/` — CLI argument parsing and utilities - `sdk.ts` — the `createAgentSession()` factory -This GSD-authored code is mixed in with upstream pi code inside the same package. The pi packages are currently 10 versions behind upstream (0.57.1 vs 0.67.2), with a breaking API change from v0.65.0 (`session_switch`/`session_fork` removal) unresolved. The primary obstacle to applying updates is that there is no reliable way to distinguish GSD files from pi files without reading them individually. +This SF-authored code is mixed in with upstream pi code inside the same package. The pi packages are currently 10 versions behind upstream (0.57.1 vs 0.67.2), with a breaking API change from v0.65.0 (`session_switch`/`session_fork` removal) unresolved. The primary obstacle to applying updates is that there is no reliable way to distinguish SF files from pi files without reading them individually. ### Why not move to npm dependencies now? @@ -34,7 +34,7 @@ Pi-mono does publish to npm as `@mariozechner/pi-*`. Moving to npm dependencies 1. `@gsd/native` bindings are imported directly inside the vendored pi-tui and pi-coding-agent source — the upstream npm packages do not have these imports 2. ~50 direct source modification commits to the vendored packages since March 2026 would need to be evaluated individually -3. The upstream extension API (~25 events) is a subset of GSD's extension system (~50+ events) — the delta would need to be re-architected before the move +3. The upstream extension API (~25 events) is a subset of SF's extension system (~50+ events) — the delta would need to be re-architected before the move Moving to npm is a valid Phase 2. This ADR covers Phase 1: establishing a clean seam without changing the vendoring approach. @@ -42,24 +42,24 @@ Moving to npm is a valid Phase 2. This ADR covers Phase 1: establishing a clean ## Decision -Introduce two new workspace packages that own all GSD-authored code currently living inside `pi-coding-agent`. The vendored pi packages become close-to-upstream source copies. GSD code depends on pi; pi code does not depend on GSD. +Introduce two new workspace packages that own all SF-authored code currently living inside `pi-coding-agent`. The vendored pi packages become close-to-upstream source copies. SF code depends on pi; pi code does not depend on SF. ### New package structure ``` packages/ - pi-agent-core/ # vendored upstream — no GSD modifications - pi-ai/ # vendored upstream — no GSD modifications - pi-tui/ # vendored upstream — no GSD modifications + pi-agent-core/ # vendored upstream — no SF modifications + pi-ai/ # vendored upstream — no SF modifications + pi-tui/ # vendored upstream — no SF modifications pi-coding-agent/ # vendored upstream + extension system (pi-typed, stays here) - gsd-agent-core/ # NEW — GSD session orchestration layer - gsd-agent-modes/ # NEW — GSD run modes and CLI layer + gsd-agent-core/ # NEW — SF session orchestration layer + gsd-agent-modes/ # NEW — SF run modes and CLI layer ``` ### Dependency graph ``` -gsd-pi (binary) +sf-run (binary) └── @gsd/agent-modes ├── @gsd/agent-core │ ├── @gsd/pi-coding-agent @@ -79,7 +79,7 @@ Arrows point in one direction only. No cycles. The vendored pi packages have no ### `@gsd/agent-core` (`packages/gsd-agent-core/`) -**Purpose:** GSD's session orchestration layer. Owns the `AgentSession` class, compaction, bash execution, system prompt construction, and the `createAgentSession()` factory that wires everything together. +**Purpose:** SF's session orchestration layer. Owns the `AgentSession` class, compaction, bash execution, system prompt construction, and the `createAgentSession()` factory that wires everything together. **Public API surface (exported from `index.ts`):** @@ -108,8 +108,8 @@ export { BlobStore } from './blob-store.js' | `compaction/compaction.ts` | Context window orchestration | | `compaction/branch-summarization.ts` | Summarization on fork | | `compaction/utils.ts` | Shared compaction utilities | -| `system-prompt.ts` | GSD system prompt construction | -| `bash-executor.ts` | Bash runtime with GSD integration | +| `system-prompt.ts` | SF system prompt construction | +| `bash-executor.ts` | Bash runtime with SF integration | | `fallback-resolver.ts` | Model fallback strategy | | `lifecycle-hooks.ts` | Phase hook system | | `image-overflow-recovery.ts` | Context overflow recovery | @@ -119,13 +119,13 @@ export { BlobStore } from './blob-store.js' | `blob-store.ts` | External binary data management | | `export-html/` | Session HTML export | -**Key dependency note:** `agent-session.ts` imports pi types directly (`Agent`, `AgentEvent`, `AgentMessage`, `AgentState`, `AgentTool`, `ThinkingLevel` from `@gsd/pi-agent-core`; `Model`, `Message` from `@gsd/pi-ai`). This is intentional — GSD's session layer is pi-typed, not abstracting over pi. This makes the seam a clear seam, not an abstraction. +**Key dependency note:** `agent-session.ts` imports pi types directly (`Agent`, `AgentEvent`, `AgentMessage`, `AgentState`, `AgentTool`, `ThinkingLevel` from `@gsd/pi-agent-core`; `Model`, `Message` from `@gsd/pi-ai`). This is intentional — SF's session layer is pi-typed, not abstracting over pi. This makes the seam a clear seam, not an abstraction. --- ### `@gsd/agent-modes` (`packages/gsd-agent-modes/`) -**Purpose:** GSD's run-mode and CLI layer. Assembles the agent session (from `@gsd/agent-core`) with a specific interface: interactive TUI, headless RPC server, or print output. Contains the `main()` entry point logic invoked by the `gsd` binary. +**Purpose:** SF's run-mode and CLI layer. Assembles the agent session (from `@gsd/agent-core`) with a specific interface: interactive TUI, headless RPC server, or print output. Contains the `main()` entry point logic invoked by the `gsd` binary. **Public API surface (exported from `index.ts`):** @@ -163,7 +163,7 @@ After the migration, `pi-coding-agent` contains: - **Upstream agent infrastructure** — auth storage, model registry, upstream session manager - **Extension system** (`src/core/extensions/`) — loader, runner, types, wrapper -The extension system remains here because it is legitimately pi-typed. Extensions subscribe to pi events (`session_start`, `tool_execution_start`, `model_select`, etc.) and receive pi types in their handlers. Moving the extension system out of `pi-coding-agent` would require re-expressing those types in GSD terms, which is the abstraction-layer work explicitly out of scope for this phase. +The extension system remains here because it is legitimately pi-typed. Extensions subscribe to pi events (`session_start`, `tool_execution_start`, `model_select`, etc.) and receive pi types in their handlers. Moving the extension system out of `pi-coding-agent` would require re-expressing those types in SF terms, which is the abstraction-layer work explicitly out of scope for this phase. **Required update to extension loader:** @@ -212,7 +212,7 @@ Steps 2-5 are scoped to known files. No archaeology required. |---|---|---| | Internal-path import of `AgentSessionEvent` | `src/web/bridge-service.ts` | Import from `@gsd/agent-core` public export | | `clearQueue()` not in typed public API | `AgentSession` | Add to public interface in `@gsd/agent-core/index.ts` | -| `buildSessionContext()` on `SessionManager` | Used by GSD code, not publicly exported | Evaluate: re-export from `@gsd/agent-core` or remove dependency | +| `buildSessionContext()` on `SessionManager` | Used by SF code, not publicly exported | Evaluate: re-export from `@gsd/agent-core` or remove dependency | | Deprecated `session_switch`, `session_fork`, `session_directory` usage | 2+ files in `pi-coding-agent` | Migrate to `session_start` with `reason` field (required for v0.65.0 compat) — can be done as part of or after clean seam work | --- @@ -221,7 +221,7 @@ Steps 2-5 are scoped to known files. No archaeology required. ### Positive -- Pi updates are scoped: type errors from a pi update surface only in the two new GSD packages, not scattered across mixed source +- Pi updates are scoped: type errors from a pi update surface only in the two new SF packages, not scattered across mixed source - The module system enforces the boundary: a pi file importing `@gsd/agent-core` is a compiler error, not a convention violation - Phase 2 (moving pi packages to npm) becomes a package.json change rather than a file archaeology project - Headless/RPC consumers can depend on `@gsd/agent-core` without pulling in the TUI layer @@ -234,9 +234,9 @@ Steps 2-5 are scoped to known files. No archaeology required. ### Neutral -- End-user install experience (`npm install -g gsd-pi@latest`) is unchanged +- End-user install experience (`npm install -g sf-run@latest`) is unchanged - Extension authors see no change — the extension API surface remains in `@gsd/pi-coding-agent` -- GSD packages continue to use pi types directly — no new abstraction layer +- SF packages continue to use pi types directly — no new abstraction layer --- @@ -248,7 +248,7 @@ Move everything into one package instead of two. Simpler dependency graph but cr ### Directory convention within `pi-coding-agent` (no new packages) -Add a `src/gsd/` subdirectory inside `pi-coding-agent` to clearly mark GSD files without creating new packages. Fastest to implement but the seam is a convention, not enforced by the module system. A future accidental cross-import would not be caught by the compiler. Rejected because the enforcement value of proper packages is worth the modest extra setup. +Add a `src/gsd/` subdirectory inside `pi-coding-agent` to clearly mark SF files without creating new packages. Fastest to implement but the seam is a convention, not enforced by the module system. A future accidental cross-import would not be caught by the compiler. Rejected because the enforcement value of proper packages is worth the modest extra setup. ### Move to npm dependencies now (Phase 2 first) diff --git a/docs/dev/FILE-SYSTEM-MAP.md b/docs/dev/FILE-SYSTEM-MAP.md index cfaa65fae..f55efd838 100644 --- a/docs/dev/FILE-SYSTEM-MAP.md +++ b/docs/dev/FILE-SYSTEM-MAP.md @@ -13,13 +13,13 @@ | **AST** | Abstract Syntax Tree search/rewrite via tree-sitter + ast-grep | | **Async Jobs** | Background bash job management | | **Auth / OAuth** | Authentication, OAuth flows, token storage | -| **Auto Engine** | GSD autonomous execution loop, dispatch, supervision | +| **Auto Engine** | SF autonomous execution loop, dispatch, supervision | | **Bg Shell** | Background process / interactive shell management | | **Browser Tools** | Playwright-based browser automation extension | | **Build System** | Scripts for build, packaging, version management, CI | | **CLI** | Command-line entry points and argument parsing | | **CMux** | Tmux/multiplexer session integration | -| **Commands** | GSD slash/sub-command routing and handlers | +| **Commands** | SF slash/sub-command routing and handlers | | **Compaction** | Context token reduction and summarization | | **Config** | Paths, defaults, models, preferences, constants | | **Context7** | Library documentation fetching extension | @@ -28,7 +28,7 @@ | **Extension Registry** | Extension discovery, manifests, enable/disable | | **Extensions** | Extension loader, runner, project trust, hooks | | **File Search** | grep, glob, fd — file and content discovery | -| **GSD Workflow** | Core GSD planning/execution workflow engine | +| **SF Workflow** | Core SF planning/execution workflow engine | | **Google Search** | Web search via Google API | | **Headless Mode** | Non-interactive / scripted command execution | | **Image Processing** | Image decode, resize, encode, clipboard images | @@ -71,7 +71,7 @@ | File | System Label(s) | Description | |------|-----------------|-------------| -| src/app-paths.ts | Config | App directory paths (GSD_HOME, sessions, web PID, prefs) | +| src/app-paths.ts | Config | App directory paths (SF_HOME, sessions, web PID, prefs) | | src/app-paths.js | Config | Compiled JS version | | src/bundled-extension-paths.ts | Extension Registry | Serializes/parses bundled extension directory paths | | src/bundled-resource-path.ts | Loader/Bootstrap, Extension Registry | Resolves bundled raw resource files from package root | @@ -89,16 +89,16 @@ | src/loader.ts | Loader/Bootstrap | Fast-path startup, extension discovery/validation, env setup | | src/logo.ts | CLI | ASCII logo rendering for welcome screen and loader | | src/mcp-server.ts | MCP Server/Client | Native MCP server over stdin/stdout for external AI clients | -| src/models-resolver.ts | Config, Auth/OAuth | Resolves models.json with fallback from Pi to GSD | +| src/models-resolver.ts | Config, Auth/OAuth | Resolves models.json with fallback from Pi to SF | | src/onboarding.ts | Onboarding | First-run wizard — LLM auth, OAuth, API keys, tool setup | -| src/pi-migration.ts | Config, Auth/OAuth | Migrates provider credentials from Pi auth.json to GSD | +| src/pi-migration.ts | Config, Auth/OAuth | Migrates provider credentials from Pi auth.json to SF | | src/project-sessions.ts | State Machine, CLI | Session-per-project directory paths from project CWD | | src/remote-questions-config.ts | Config, Onboarding | Saves remote questions (Discord, Slack, Telegram) config | | src/resource-loader.ts | Loader/Bootstrap, Extension Registry | Initializes, syncs, validates bundled resources | | src/startup-timings.ts | CLI, Build System | Optional startup timing instrumentation | | src/tool-bootstrap.ts | Loader/Bootstrap | Manages fd/rg availability, falls back to built-in | | src/update-check.ts | CLI | Checks npm registry for new versions (cached) | -| src/update-cmd.ts | CLI | Executes npm install to update gsd-pi package | +| src/update-cmd.ts | CLI | Executes npm install to update sf-run package | | src/web-mode.ts | Web Mode | Launches/manages web server process (PID tracking, browser) | | src/welcome-screen.ts | CLI | Welcome panel — logo, version, model info | | src/wizard.ts | Onboarding, Config | Loads env keys from auth.json → hydrates process.env | @@ -112,8 +112,8 @@ | src/web/auto-dashboard-service.ts | Web Mode, Auto Engine | Loads auto-mode dashboard state (active, paused, costs) | | src/web/bridge-service.ts | Web Mode, State Machine | Central hub spawning RPC sessions, managing session state | | src/web/captures-service.ts | Web Mode | Loads knowledge capture entries via child process bridge | -| src/web/cleanup-service.ts | Web Mode | Collects GSD branches and snapshot refs for cleanup | -| src/web/cli-entry.ts | Web Mode, CLI | Builds/resolves GSD CLI entry points for RPC/interactive | +| src/web/cleanup-service.ts | Web Mode | Collects SF branches and snapshot refs for cleanup | +| src/web/cli-entry.ts | Web Mode, CLI | Builds/resolves SF CLI entry points for RPC/interactive | | src/web/doctor-service.ts | Web Mode, Doctor/Diagnostics | Runs diagnostics, returns fixer operations | | src/web/export-service.ts | Web Mode | Generates exported project reports (markdown/JSON) | | src/web/forensics-service.ts | Web Mode, Doctor/Diagnostics | Loads forensic report data (traces, metrics, issues) | @@ -460,11 +460,11 @@ ## src/resources/extensions/ — Extension Subsystems -### GSD Extension (Core Workflow Engine) +### SF Extension (Core Workflow Engine) | File | System Label(s) | Description | |------|-----------------|-------------| -| gsd/index.ts | GSD Workflow | Main GSD extension bootstrap and registration | +| gsd/index.ts | SF Workflow | Main SF extension bootstrap and registration | | gsd/auto.ts | Auto Engine | Automatic workflow execution and loop management | | gsd/auto-dashboard.ts | Auto Engine, Web Mode | Real-time dashboard for auto-run progress | | gsd/auto-worktree.ts | Auto Engine, Worktree | Automatic worktree creation and branch management | @@ -500,8 +500,8 @@ | gsd/worktree-manager.ts | Worktree | Higher-level worktree orchestration | | gsd/worktree-resolver.ts | Worktree | Worktree path and reference resolution | | gsd/unit-runtime.ts | Auto Engine | Unit-level execution runtime | -| gsd/activity-log.ts | GSD Workflow | Activity tracking and logging | -| gsd/debug-logger.ts | GSD Workflow | Debug output and verbose logging | +| gsd/activity-log.ts | SF Workflow | Activity tracking and logging | +| gsd/debug-logger.ts | SF Workflow | Debug output and verbose logging | | gsd/commands.ts | Commands | Main command dispatcher | | gsd/commands-handlers.ts | Commands | Command-specific handlers | | gsd/commands-bootstrap.ts | Commands | Bootstrap and initialization commands | @@ -509,47 +509,47 @@ | gsd/commands-extensions.ts | Commands, Extensions | Extension discovery and management | | gsd/commands-inspect.ts | Commands, Doctor/Diagnostics | Database and state inspection tools | | gsd/commands-logs.ts | Commands | Log viewing and filtering | -| gsd/commands-workflow-templates.ts | Commands, GSD Workflow | Workflow template management | +| gsd/commands-workflow-templates.ts | Commands, SF Workflow | Workflow template management | | gsd/commands-cmux.ts | Commands, CMux | Tmux/cmux integration commands | | gsd/exit-command.ts | Commands | Exit and cleanup commands | | gsd/undo.ts | Commands | Undo and rollback functionality | | gsd/kill.ts | Commands | Process termination and cleanup | | gsd/worktree-command.ts | Commands, Worktree | Worktree subcommands | -| gsd/namespaced-resolver.ts | GSD Workflow | Namespace and scoped resource resolution | -| gsd/error-utils.ts | GSD Workflow | Error handling and formatting | -| gsd/errors.ts | GSD Workflow | Error type definitions | -| gsd/diff-context.ts | GSD Workflow | Diff-based context extraction | -| gsd/memory-extractor.ts | GSD Workflow | Memory and context extraction from state | -| gsd/structured-data-formatter.ts | GSD Workflow | Structured output formatting | -| gsd/export-html.ts | GSD Workflow | HTML export of milestone reports | -| gsd/reports.ts | GSD Workflow | Report generation and summaries | -| gsd/notifications.ts | GSD Workflow | User notification and messaging | -| gsd/triage-ui.ts | GSD Workflow | Triage interface for issue categorization | -| gsd/guided-flow.ts | GSD Workflow | User-guided workflow orchestration | -| gsd/env-utils.ts | GSD Workflow | Environment variable utilities | -| gsd/git-constants.ts | GSD Workflow | Git-related constants and paths | -| gsd/milestone-id-utils.ts | GSD Workflow | Milestone ID generation and parsing | -| gsd/resource-version.ts | GSD Workflow | Resource versioning helpers | -| gsd/atomic-write.ts | GSD Workflow | Atomic file write operations | -| gsd/captures.ts | GSD Workflow | Artifact capture and storage | -| gsd/changelog.ts | GSD Workflow | Changelog generation | -| gsd/claude-import.ts | GSD Workflow | Claude API/resource importing | +| gsd/namespaced-resolver.ts | SF Workflow | Namespace and scoped resource resolution | +| gsd/error-utils.ts | SF Workflow | Error handling and formatting | +| gsd/errors.ts | SF Workflow | Error type definitions | +| gsd/diff-context.ts | SF Workflow | Diff-based context extraction | +| gsd/memory-extractor.ts | SF Workflow | Memory and context extraction from state | +| gsd/structured-data-formatter.ts | SF Workflow | Structured output formatting | +| gsd/export-html.ts | SF Workflow | HTML export of milestone reports | +| gsd/reports.ts | SF Workflow | Report generation and summaries | +| gsd/notifications.ts | SF Workflow | User notification and messaging | +| gsd/triage-ui.ts | SF Workflow | Triage interface for issue categorization | +| gsd/guided-flow.ts | SF Workflow | User-guided workflow orchestration | +| gsd/env-utils.ts | SF Workflow | Environment variable utilities | +| gsd/git-constants.ts | SF Workflow | Git-related constants and paths | +| gsd/milestone-id-utils.ts | SF Workflow | Milestone ID generation and parsing | +| gsd/resource-version.ts | SF Workflow | Resource versioning helpers | +| gsd/atomic-write.ts | SF Workflow | Atomic file write operations | +| gsd/captures.ts | SF Workflow | Artifact capture and storage | +| gsd/changelog.ts | SF Workflow | Changelog generation | +| gsd/claude-import.ts | SF Workflow | Claude API/resource importing | | gsd/collision-diagnostics.ts | Doctor/Diagnostics | Collision detection and diagnostics | -| gsd/prompt-loader.ts | GSD Workflow | Prompt template loading | -| gsd/file-watcher.ts | GSD Workflow | File system change monitoring | -| gsd/parallel-eligibility.ts | GSD Workflow | Parallel execution eligibility checks | -| gsd/plugin-importer.ts | GSD Workflow, Extensions | Custom plugin/extension importing | -| gsd/verification-gate.ts | GSD Workflow | Pre-execution verification checks | +| gsd/prompt-loader.ts | SF Workflow | Prompt template loading | +| gsd/file-watcher.ts | SF Workflow | File system change monitoring | +| gsd/parallel-eligibility.ts | SF Workflow | Parallel execution eligibility checks | +| gsd/plugin-importer.ts | SF Workflow, Extensions | Custom plugin/extension importing | +| gsd/verification-gate.ts | SF Workflow | Pre-execution verification checks | | gsd/preference-models.ts | Config, Model System | Model preference configuration | | gsd/preferences-skills.ts | Config, Skills | Skill preference configuration | -| gsd/post-unit-hooks.ts | GSD Workflow | Post-unit execution hooks | +| gsd/post-unit-hooks.ts | SF Workflow | Post-unit execution hooks | | gsd/skill-telemetry.ts | Skills | Skill usage and performance telemetry | -| gsd/bootstrap/* | GSD Workflow, Loader/Bootstrap | Extension initialization and hook registration | +| gsd/bootstrap/* | SF Workflow, Loader/Bootstrap | Extension initialization and hook registration | | gsd/auto/* | Auto Engine | Auto-execution engine components | | gsd/commands/* | Commands | Command routing and handling | -| gsd/templates/* | GSD Workflow | Output templates and formatters | -| gsd/prompts/* | GSD Workflow | System prompts and instructions | -| gsd/workflow-templates/* | GSD Workflow | Workflow starter templates and registry | +| gsd/templates/* | SF Workflow | Output templates and formatters | +| gsd/prompts/* | SF Workflow | System prompts and instructions | +| gsd/workflow-templates/* | SF Workflow | Workflow starter templates and registry | | gsd/skills/* | Skills | Integrated skill configurations | | gsd/migrate/* | Migration | Data migration and upgrade tools | @@ -637,8 +637,8 @@ | shared/interview-ui.ts | TUI Components | Interview-style questionnaire UI | | shared/confirm-ui.ts | TUI Components | Confirmation dialog UI | | shared/terminal.ts | TUI Components | Terminal operations and formatting | -| shared/format-utils.ts | GSD Workflow | String formatting utilities | -| shared/sanitize.ts | GSD Workflow | Input sanitization | +| shared/format-utils.ts | SF Workflow | String formatting utilities | +| shared/sanitize.ts | SF Workflow | Input sanitization | | shared/frontmatter.ts | Config | YAML frontmatter parsing | ### src/resources/agents/ @@ -658,7 +658,7 @@ | react-best-practices/ | Skills | React development patterns (62 files) | | userinterface-wiki/ | Skills | UI/UX guidelines and component reference (155 files) | | create-skill/ | Skills | Skill creation scaffolding and templates (25 files) | -| create-gsd-extension/ | Skills, Extensions | GSD extension scaffolding (22 files) | +| create-gsd-extension/ | Skills, Extensions | SF extension scaffolding (22 files) | | code-optimizer/ | Skills | Performance optimization techniques (16 files) | | agent-browser/ | Skills, Browser Tools | Browser automation guidance (11 files) | | github-workflows/ | Skills | GitHub Actions workflow patterns (10 files) | @@ -697,7 +697,7 @@ | web/components/gsd/projects-view.tsx | Web UI | Project browser and selector | | web/components/gsd/files-view.tsx | Web UI | File browser and explorer | | web/components/gsd/activity-view.tsx | Web UI | Activity log and history view | -| web/components/gsd/roadmap.tsx | Web UI, GSD Workflow | Milestone roadmap visualization | +| web/components/gsd/roadmap.tsx | Web UI, SF Workflow | Milestone roadmap visualization | | web/components/gsd/visualizer-view.tsx | Web UI, Doctor/Diagnostics | Workflow visualization | | web/components/gsd/project-welcome.tsx | Web UI | Welcome screen for new projects | | web/components/gsd/knowledge-captures-panel.tsx | Web UI | Knowledge and capture management | @@ -767,8 +767,8 @@ | web/app/api/undo/route.ts | API Routes, Commands | Undo operation | | web/app/api/cleanup/route.ts | API Routes, Commands | Cleanup operation | | web/app/api/export-data/route.ts | API Routes, Commands | Data export | -| web/app/api/knowledge/route.ts | API Routes, GSD Workflow | Knowledge base | -| web/app/api/hooks/route.ts | API Routes, GSD Workflow | Git hooks management | +| web/app/api/knowledge/route.ts | API Routes, SF Workflow | Knowledge base | +| web/app/api/hooks/route.ts | API Routes, SF Workflow | Git hooks management | | web/app/api/inspect/route.ts | API Routes, Doctor/Diagnostics | Inspection and analysis | | web/app/api/doctor/route.ts | API Routes, Doctor/Diagnostics | Doctor diagnostic tool | | web/app/api/forensics/route.ts | API Routes, Doctor/Diagnostics | Forensics analysis | @@ -777,7 +777,7 @@ | web/app/api/preferences/route.ts | API Routes, Config | User preferences | | web/app/api/settings-data/route.ts | API Routes, Config | Settings data | | web/app/api/dev-mode/route.ts | API Routes, Config | Development mode toggle | -| web/app/api/captures/route.ts | API Routes, GSD Workflow | Knowledge captures | +| web/app/api/captures/route.ts | API Routes, SF Workflow | Knowledge captures | | web/app/api/browse-directories/route.ts | API Routes | Directory browsing | | web/app/api/files/route.ts | API Routes, Tool System | File system access | | web/app/api/git/route.ts | API Routes, Tool System | Git operations | @@ -796,13 +796,13 @@ | web/lib/project-store-manager.tsx | State Machine | Multi-project store manager with SSE lifecycle | | web/lib/shutdown-gate.ts | State Machine | Graceful shutdown coordination | | web/lib/browser-slash-command-dispatch.ts | Commands | Slash command dispatch | -| web/lib/workflow-actions.ts | GSD Workflow | Primary workflow action derivation logic | -| web/lib/workflow-action-execution.ts | GSD Workflow | Workflow action execution handler | +| web/lib/workflow-actions.ts | SF Workflow | Primary workflow action derivation logic | +| web/lib/workflow-action-execution.ts | SF Workflow | Workflow action execution handler | | web/lib/command-surface-contract.ts | Commands | Command surface request/response contract types | | web/lib/pty-manager.ts | Web UI | Server-side PTY spawning and session management | | web/lib/pty-chat-parser.ts | Web UI | PTY output parsing for chat display | | web/lib/remaining-command-types.ts | Web UI | Browser-safe types for command surfaces | -| web/lib/knowledge-captures-types.ts | GSD Workflow | Knowledge entry and captures types | +| web/lib/knowledge-captures-types.ts | SF Workflow | Knowledge entry and captures types | | web/lib/diagnostics-types.ts | Doctor/Diagnostics | Diagnostics panel types | | web/lib/settings-types.ts | Config | Settings and preferences types | | web/lib/visualizer-types.ts | Doctor/Diagnostics | Workflow visualizer types | @@ -827,7 +827,7 @@ | File | System Label(s) | Description | |------|-----------------|-------------| | vscode-extension/src/extension.ts | VS Code Extension | Extension activation, client management, command registration | -| vscode-extension/src/gsd-client.ts | VS Code Extension, MCP Server/Client | RPC client for GSD agent communication | +| vscode-extension/src/gsd-client.ts | VS Code Extension, MCP Server/Client | RPC client for SF agent communication | | vscode-extension/src/chat-participant.ts | VS Code Extension | Chat participant for @gsd command | | vscode-extension/src/sidebar.ts | VS Code Extension | Sidebar webview provider with status display | @@ -865,7 +865,7 @@ | native/crates/engine/src/ps.rs | Native/Rust Tools | Cross-platform process tree management | | native/crates/engine/src/clipboard.rs | Native/Rust Tools | Clipboard read/write for text and images | | native/crates/engine/src/json_parse.rs | Text Processing, Native/Rust Tools | Streaming JSON parser with partial recovery | -| native/crates/engine/src/gsd_parser.rs | GSD Workflow, Native/Rust Tools | .gsd/ directory file parser (markdown, frontmatter) | +| native/crates/engine/src/gsd_parser.rs | SF Workflow, Native/Rust Tools | .gsd/ directory file parser (markdown, frontmatter) | | native/crates/engine/src/ttsr.rs | TTSR, Native/Rust Tools | TTSR regex engine with compiled RegexSet | | native/crates/engine/src/stream_process.rs | Text Processing, Native/Rust Tools | Bash stream processor (UTF-8, ANSI strip, binary) | | native/crates/engine/src/xxhash.rs | Native/Rust Tools | xxHash32 for hashline edit tool | @@ -942,7 +942,7 @@ | scripts/validate-pack.js | Build System | Package validation (Node.js) | | scripts/install-pi-global.js | Build System | Global installation helper | | scripts/uninstall-pi-global.js | Build System | Global uninstallation helper | -| scripts/install-hooks.sh | Build System, GSD Workflow | Git hook installer | +| scripts/install-hooks.sh | Build System, SF Workflow | Git hook installer | | scripts/secret-scan.sh | Build System, Auth/OAuth | Secret scanning for credentials | | scripts/docs-prompt-injection-scan.sh | Build System | Prompt injection detection in docs | | scripts/check-skill-references.mjs | Build System, Skills | Skill reference validator | @@ -982,7 +982,7 @@ Quick lookup: which files are part of each system? | **Extension Registry** | src/extension-discovery.ts, src/extension-registry.ts, src/bundled-extension-paths.ts | | **Extensions** | pi-coding-agent/src/core/extensions/*, src/resource-loader.ts | | **File Search** | native/crates/engine/src/grep.rs, glob.rs, fd.rs, fs_cache.rs, packages/native/src/grep/*, fd/*, core/tools/grep.ts, find.ts | -| **GSD Workflow** | src/resources/extensions/gsd/* (non-auto), gsd/reports.ts, gsd/notifications.ts, gsd/prompts/*, gsd/workflow-templates/* | +| **SF Workflow** | src/resources/extensions/gsd/* (non-auto), gsd/reports.ts, gsd/notifications.ts, gsd/prompts/*, gsd/workflow-templates/* | | **Google Search** | src/resources/extensions/google-search/index.ts | | **Headless Mode** | src/headless*.ts | | **Image Processing** | native/crates/engine/src/image.rs, packages/native/src/image/*, utils/image-*.ts, web/lib/image-utils.ts | diff --git a/docs/dev/FRONTIER-TECHNIQUES.md b/docs/dev/FRONTIER-TECHNIQUES.md index 6aa5ad59a..4af1ec1eb 100644 --- a/docs/dev/FRONTIER-TECHNIQUES.md +++ b/docs/dev/FRONTIER-TECHNIQUES.md @@ -1,6 +1,6 @@ -# Frontier Techniques for GSD-2 +# Frontier Techniques for SF -Research into cutting-edge AI agent techniques that map directly to GSD-2's architecture, ranked by impact and feasibility. +Research into cutting-edge AI agent techniques that map directly to SF's architecture, ranked by impact and feasibility. **Date:** 2026-03-25 **Status:** Research / Pre-RFC @@ -23,15 +23,15 @@ Research into cutting-edge AI agent techniques that map directly to GSD-2's arch ## Executive Summary -GSD-2 is a multi-layered, event-driven agent platform with strong extensibility primitives: a skill system, file-based memory, session branching, compaction, and 16+ extension lifecycle hooks. These existing primitives create natural integration points for six frontier techniques that could fundamentally change how GSD operates. +SF is a multi-layered, event-driven agent platform with strong extensibility primitives: a skill system, file-based memory, session branching, compaction, and 16+ extension lifecycle hooks. These existing primitives create natural integration points for six frontier techniques that could fundamentally change how SF operates. The techniques fall into three categories: | Category | Techniques | Theme | |----------|-----------|-------| -| **Self-Improvement** | Skill Library Evolution, Cross-Session Learning Graph | GSD gets better the more you use it | -| **Performance** | DAG Tool Execution, Speculative Tool Execution | GSD gets faster per turn | -| **Intelligence** | Semantic Context Compression, MCTS Planning | GSD reasons better with the same context budget | +| **Self-Improvement** | Skill Library Evolution, Cross-Session Learning Graph | SF gets better the more you use it | +| **Performance** | DAG Tool Execution, Speculative Tool Execution | SF gets faster per turn | +| **Intelligence** | Semantic Context Compression, MCTS Planning | SF reasons better with the same context budget | --- @@ -42,7 +42,7 @@ The techniques fall into three categories: ### What It Is -Inspired by [SkillRL](https://arxiv.org/abs/2602.08234) (ICLR 2026), this technique transforms GSD's skill system from static instruction files into a self-improving knowledge base. Instead of skills being written once and updated manually, they evolve based on execution outcomes. +Inspired by [SkillRL](https://arxiv.org/abs/2602.08234) (ICLR 2026), this technique transforms SF's skill system from static instruction files into a self-improving knowledge base. Instead of skills being written once and updated manually, they evolve based on execution outcomes. SkillRL demonstrates that agents with learned skill libraries outperform baselines by 15.3%+ across task benchmarks, with 10-20% token compression compared to raw trajectory storage. @@ -70,9 +70,9 @@ SkillRL demonstrates that agents with learned skill libraries outperform baselin | **General Skills** | Universal strategic guidance applicable across tasks | "When editing TypeScript files, always check for type errors via LSP before committing" | | **Task-Specific Skills** | Category-level heuristics for specific skill domains | "The `fix-issue` skill should check CI status before opening a PR, not after" | -### Why It Fits GSD-2 +### Why It Fits SF -GSD already has every primitive needed: +SF already has every primitive needed: - **Skill files** (`~/.claude/skills/`, `.claude/skills/`) — the storage layer exists - **Extension hooks** (`turn_end`, `agent_end`) — outcome capture points exist @@ -83,7 +83,7 @@ The gap is automation: connecting execution outcomes back to skill files without ### Integration Points -| GSD Component | Role in Integration | +| SF Component | Role in Integration | |---------------|-------------------| | `agent-session.ts` → `turn_end` event | Captures execution outcome (success/failure signals) | | Extension hook: `agent_end` | Triggers trajectory distillation | @@ -147,7 +147,7 @@ The [LLM Compiler pattern](https://arxiv.org/pdf/2312.04511) (ICML 2024) treats ### How It Works -**Current GSD behavior (sequential):** +**Current SF behavior (sequential):** ``` Read(auth.ts) ─── 150ms ───▶ result │ @@ -181,15 +181,15 @@ Total: ~150ms (max of parallel set) | Bash(cmd) | Bash(cmd) | Maybe | Depends on side effects | | Write(file) | Read(file) | Yes | Read after write needs write to complete | -### Why It Fits GSD-2 +### Why It Fits SF -The model already emits multiple `tool_use` blocks in a single response. GSD processes them, but the execution path in `agent-loop.ts` handles them in sequence. The parallelism opportunity is sitting right there. +The model already emits multiple `tool_use` blocks in a single response. SF processes them, but the execution path in `agent-loop.ts` handles them in sequence. The parallelism opportunity is sitting right there. **Measured impact estimate:** A typical coding turn involves 3-5 tool calls. With 60% parallelizable (reads, greps, globs), per-turn latency drops by 40-60%. Over a 50-turn session, that's minutes saved. ### Integration Points -| GSD Component | Role in Integration | +| SF Component | Role in Integration | |---------------|-------------------| | `agent-loop.ts` tool execution path | Replace sequential execution with DAG scheduler | | Tool definitions | Annotate tools with side-effect metadata (pure/impure) | @@ -277,18 +277,18 @@ Based on [Speculative Tool Calls research](https://arxiv.org/pdf/2512.15834), th | **Learned patterns** | Use the skill library evolution data to predict tool sequences | 60-80% | | **Model pre-query** | Ask a fast/cheap model to predict tool calls | 70-85% | -### Why It Fits GSD-2 +### Why It Fits SF -The #1 latency bottleneck in GSD is the round-trip: user prompt → model thinks → model requests tool → tool executes → result sent back → model thinks again. Speculative execution attacks the highest-latency step. +The #1 latency bottleneck in SF is the round-trip: user prompt → model thinks → model requests tool → tool executes → result sent back → model thinks again. Speculative execution attacks the highest-latency step. -GSD's architecture makes this easy to add: +SF's architecture makes this easy to add: - `AgentSession.prompt()` already processes user input before sending to the model - Tool results are already cached in the message array - The extension system can intercept input and spawn pre-fetches ### Integration Points -| GSD Component | Role in Integration | +| SF Component | Role in Integration | |---------------|-------------------| | `AgentSession.prompt()` | Trigger speculation after user input, before model call | | Tool result cache (new) | Store speculated results keyed by tool+args | @@ -348,9 +348,9 @@ User input arrives ### What It Is -GSD's compaction system uses a char/4 heuristic for token estimation and all-or-nothing LLM summarization for context reduction. Research from [Zylos](https://zylos.ai/research/2026-02-28-ai-agent-context-compression-strategies) and [context engineering literature](https://rlancemartin.github.io/2025/06/23/context_engineering/) shows that embedding-based compression achieves 80-90% token reduction while preserving the ability to selectively recall specific historical context. +SF's compaction system uses a char/4 heuristic for token estimation and all-or-nothing LLM summarization for context reduction. Research from [Zylos](https://zylos.ai/research/2026-02-28-ai-agent-context-compression-strategies) and [context engineering literature](https://rlancemartin.github.io/2025/06/23/context_engineering/) shows that embedding-based compression achieves 80-90% token reduction while preserving the ability to selectively recall specific historical context. -### Current GSD Compaction (Weaknesses Highlighted) +### Current SF Compaction (Weaknesses Highlighted) ``` Messages: [M1, M2, M3, M4, M5, M6, M7, M8, M9, M10] @@ -441,7 +441,7 @@ The hybrid approach — use actual token counts from provider responses for rece ### Integration Points -| GSD Component | Role in Integration | +| SF Component | Role in Integration | |---------------|-------------------| | `compaction.ts` | Replace cut-point algorithm with tiered approach | | `compaction-orchestrator.ts` | Add warm-tier retrieval before model call | @@ -464,7 +464,7 @@ The hybrid approach — use actual token counts from provider responses for rece ### What It Is -GSD's memory system (MEMORY.md + individual files) stores flat, file-based memories. A learning graph extends this into a structured knowledge base that captures relationships between codebases, files, errors, solutions, and patterns across all sessions. +SF's memory system (MEMORY.md + individual files) stores flat, file-based memories. A learning graph extends this into a structured knowledge base that captures relationships between codebases, files, errors, solutions, and patterns across all sessions. This is informed by research on [agent memory architectures](https://github.com/Shichun-Liu/Agent-Memory-Paper-List) and the emerging discipline of [context engineering](https://thenewstack.io/memory-for-ai-agents-a-new-paradigm-of-context-engineering/). @@ -524,7 +524,7 @@ This is informed by research on [agent memory architectures](https://github.com/ ### Integration Points -| GSD Component | Role in Integration | +| SF Component | Role in Integration | |---------------|-------------------| | `session-manager.ts` | Write graph nodes on session save | | `agent-session.ts` prompt building | Query graph for relevant context before model call | @@ -555,7 +555,7 @@ This is informed by research on [agent memory architectures](https://github.com/ ### What It Is -Inspired by [ToolTree](https://www.agentic-patterns.com/patterns/skill-library-evolution/) and Monte Carlo Tree Search, this technique replaces GSD's linear action selection with a tree-based planner that explores multiple solution paths simultaneously. +Inspired by [ToolTree](https://www.agentic-patterns.com/patterns/skill-library-evolution/) and Monte Carlo Tree Search, this technique replaces SF's linear action selection with a tree-based planner that explores multiple solution paths simultaneously. Instead of the model deciding one action at a time and hoping it works, the system: @@ -604,9 +604,9 @@ Read auth.ts Result: Branch B succeeds after 2 actions, not 5+ ``` -### Why It Fits GSD-2 +### Why It Fits SF -GSD already has session branching primitives: +SF already has session branching primitives: - `fork()` creates a branch from any message - Branch summaries compress history at fork points - Tree navigation (`/tree`) lets users explore branches @@ -652,7 +652,7 @@ The gap: these primitives are user-triggered. MCTS would make the agent trigger ### Integration Points -| GSD Component | Role in Integration | +| SF Component | Role in Integration | |---------------|-------------------| | `agent-loop.ts` | New planning phase between user prompt and action execution | | Session branching (`fork()`) | Used to create exploration branches | diff --git a/docs/dev/PRD-branchless-worktree-architecture.md b/docs/dev/PRD-branchless-worktree-architecture.md index 4c511353c..99a752a04 100644 --- a/docs/dev/PRD-branchless-worktree-architecture.md +++ b/docs/dev/PRD-branchless-worktree-architecture.md @@ -9,7 +9,7 @@ ## Problem Statement -GSD's auto-mode is unreliable. Users experience: +SF's auto-mode is unreliable. Users experience: 1. **Infinite loop detection failures** — the agent writes planning artifacts on slice branches that become invisible after branch switching, causing `verifyExpectedArtifact()` to fail repeatedly. Auto-mode burns budget retrying the same unit 3-6 times before hard-stopping. This is the #1 user complaint. @@ -28,7 +28,7 @@ Auto-mode uses git worktrees for isolation and sequential commits for history. N | Criterion | Measurement | |-----------|-------------| | Zero loop detection failures from branch visibility | No `verifyExpectedArtifact()` failures caused by branch mismatch in 50 consecutive auto-mode runs | -| Zero `.gsd/` state corruption | Manual worktrees created via `git worktree add` have correct `.gsd/` state without any GSD-specific initialization | +| Zero `.gsd/` state corruption | Manual worktrees created via `git worktree add` have correct `.gsd/` state without any SF-specific initialization | | Code deletion | Net removal of ≥500 lines of merge/conflict/branch-switching code | | Test simplification | Removal or simplification of ≥6 merge-specific test files | | Backwards compatibility | Existing projects with `gsd/M001/S01` slice branches continue to work (read-only; new work uses new model) | @@ -77,7 +77,7 @@ Agent writes file → on slice branch → handleAgentEnd → auto-commit on slic ### `.gsd/` Tracking (Current — Contradictory) - `.gitignore` line 52: `.gsd/` — ignores everything -- `smartStage()` lines 338-349: force-adds `GSD_DURABLE_PATHS` — tracks milestones/, DECISIONS.md, PROJECT.md, REQUIREMENTS.md, QUEUE.md +- `smartStage()` lines 338-349: force-adds `SF_DURABLE_PATHS` — tracks milestones/, DECISIONS.md, PROJECT.md, REQUIREMENTS.md, QUEUE.md - Result: `.gsd/milestones/` is partially tracked on some branches, fully ignored on others. The code fights the config. ## Proposed Architecture @@ -146,7 +146,7 @@ Agent writes file → on milestone branch → handleAgentEnd → auto-commit on | Artifact invisibility after branch switch | No branch switching. Artifacts commit on the one branch. | | `.gsd/` state clobbering | Artifacts tracked in git. Each branch carries its own `.gsd/`. `git worktree add` and `git checkout` give correct state. | | Merge conflict complexity | No merges within a worktree. Only merge is milestone→main (squash). | -| Manual worktree initialization | Tracked artifacts are checked out with the branch. No GSD-specific bootstrap needed. | +| Manual worktree initialization | Tracked artifacts are checked out with the branch. No SF-specific bootstrap needed. | | Dual isolation mode maintenance | Single mode: worktree. Branch-mode (`git.isolation: "branch"`) deprecated. | ## Implementation Plan @@ -171,7 +171,7 @@ Agent writes file → on milestone branch → handleAgentEnd → auto-commit on 4. Update README suggested `.gitignore` section -5. Remove `smartStage()` force-add of `GSD_DURABLE_PATHS` — no longer needed since `.gitignore` doesn't block them +5. Remove `smartStage()` force-add of `SF_DURABLE_PATHS` — no longer needed since `.gitignore` doesn't block them **Verification:** `git status` shows planning artifacts tracked, runtime files untracked. `git worktree add` on a new worktree has correct `.gsd/milestones/` state. @@ -221,7 +221,7 @@ The function becomes: No conflict categorization. No runtime file stripping (runtime files are gitignored, not in the merge). No `.gsd/` special handling. -If squash-merge conflicts (parallel milestone edge case): stop auto-mode with clear error, user resolves manually or GSD dispatches a one-time resolution session. +If squash-merge conflicts (parallel milestone edge case): stop auto-mode with clear error, user resolves manually or SF dispatches a one-time resolution session. **Verification:** Complete a full milestone in auto-mode. `main` receives one squash commit with all code and planning artifacts. @@ -257,7 +257,7 @@ If squash-merge conflicts (parallel milestone edge case): stop auto-mode with cl 1. State derivation (`deriveState()`) continues to read `gsd/M001/S01` branch naming for legacy detection 2. On first run after upgrade: - Detect existing slice branches - - Notify user: "GSD no longer creates slice branches. Existing branches are preserved but new work commits directly to the milestone branch." + - Notify user: "SF no longer creates slice branches. Existing branches are preserved but new work commits directly to the milestone branch." - No forced migration — legacy branches are read-only context 3. Doctor check: `legacy_slice_branches` — informational, not auto-fix 4. Update `shouldUseWorktreeIsolation()` preference handling: @@ -265,7 +265,7 @@ If squash-merge conflicts (parallel milestone edge case): stop auto-mode with cl - `git.isolation: "branch"` → warning, treated as worktree - Remove preference UI for isolation mode -**Verification:** Open a project with existing `gsd/M001/S01` branches. GSD reads state correctly, new work commits on milestone branch without slice branches. +**Verification:** Open a project with existing `gsd/M001/S01` branches. SF reads state correctly, new work commits on milestone branch without slice branches. ## Stress Test Results @@ -315,7 +315,7 @@ git rebase main # Then squash-merge ``` -This is standard git workflow. GSD can automate the rebase step as a pre-merge check. +This is standard git workflow. SF can automate the rebase step as a pre-merge check. ### Edge Case: Agent Crash Mid-Commit @@ -380,4 +380,4 @@ Resolution: Worktree is on `milestone/M001` branch, independent of `main`. Manua 2. **Should `worktrees/` move outside `.gsd/`?** Having worktrees inside `.gsd/` creates a nesting-doll pattern (worktree contains `.gsd/` which is inside `.gsd/worktrees/`). Relocating to `.gsd-worktrees/` or `~/.gsd/worktrees//` is cleaner but changes the filesystem layout. Recommendation: defer, address separately if it causes issues. -3. **Pre-flight rebase automation?** Before milestone→main squash-merge, should GSD automatically `git rebase main`? Gemini recommends yes. Risk: rebase can fail with conflicts, adding a code path. Recommendation: implement as a doctor check ("milestone branch is behind main by N commits") with manual resolution, automate later if needed. +3. **Pre-flight rebase automation?** Before milestone→main squash-merge, should SF automatically `git rebase main`? Gemini recommends yes. Risk: rebase can fail with conflicts, adding a code path. Recommendation: implement as a doctor check ("milestone branch is behind main by N commits") with manual resolution, automate later if needed. diff --git a/docs/dev/PRD-pi-clean-seam-refactor.md b/docs/dev/PRD-pi-clean-seam-refactor.md index fbbaf2c52..957f7c2c9 100644 --- a/docs/dev/PRD-pi-clean-seam-refactor.md +++ b/docs/dev/PRD-pi-clean-seam-refactor.md @@ -9,34 +9,34 @@ ## Problem Statement -GSD is built on top of pi-mono, an open-source agent framework maintained by Mario Zechner at [github.com/badlogic/pi-mono](https://github.com/badlogic/pi-mono). GSD takes pi-mono as vendored source copies — four packages (`pi-agent-core`, `pi-ai`, `pi-tui`, `pi-coding-agent`) are copied directly into `/packages/` and modified in-place. +SF is built on top of pi-mono, an open-source agent framework maintained by Mario Zechner at [github.com/badlogic/pi-mono](https://github.com/badlogic/pi-mono). SF takes pi-mono as vendored source copies — four packages (`pi-agent-core`, `pi-ai`, `pi-tui`, `pi-coding-agent`) are copied directly into `/packages/` and modified in-place. -This worked as a starting point but has created a structural problem: **GSD-authored code lives inside the pi packages**. The 98KB `agent-session.ts`, the compaction system, three run modes (interactive, RPC, print), the CLI utilities, and the `createAgentSession()` factory are all authored by GSD but stored inside `pi-coding-agent`. Approximately 79 GSD-authored TypeScript files are mixed in with pi's upstream source. +This worked as a starting point but has created a structural problem: **SF-authored code lives inside the pi packages**. The 98KB `agent-session.ts`, the compaction system, three run modes (interactive, RPC, print), the CLI utilities, and the `createAgentSession()` factory are all authored by SF but stored inside `pi-coding-agent`. Approximately 79 SF-authored TypeScript files are mixed in with pi's upstream source. -The consequence is that every pi-mono update requires manually diffing GSD's modifications against the incoming upstream changes file-by-file. There is no reliable way to tell which files are GSD's and which are pi's without reading them. Updates that should take hours become multi-day archaeology projects. Pi-mono is currently 10 versions behind upstream (0.57.1 vs 0.67.2 as of April 2026), with a blocking API change (`session_switch`/`session_fork` removal in v0.65.0) unresolved. +The consequence is that every pi-mono update requires manually diffing SF's modifications against the incoming upstream changes file-by-file. There is no reliable way to tell which files are SF's and which are pi's without reading them. Updates that should take hours become multi-day archaeology projects. Pi-mono is currently 10 versions behind upstream (0.57.1 vs 0.67.2 as of April 2026), with a blocking API change (`session_switch`/`session_fork` removal in v0.65.0) unresolved. -Beyond update pain, there is a project risk: if pi-mono stops being maintained or changes direction, GSD's business logic is entangled with a dependency it no longer controls. +Beyond update pain, there is a project risk: if pi-mono stops being maintained or changes direction, SF's business logic is entangled with a dependency it no longer controls. ## Vision -GSD's code is clearly separated from pi's code at the module system level. The vendored pi packages contain only upstream code (plus the extension system, which is intentionally pi-typed). GSD's agent logic lives in GSD-owned packages that **depend on** pi but do not live inside it. When a new pi release comes out, a maintainer updates the vendored pi packages, runs the TypeScript compiler, and fixes the errors that surface in the GSD packages — without ever needing to diff individual files to find what's ours vs. theirs. +SF's code is clearly separated from pi's code at the module system level. The vendored pi packages contain only upstream code (plus the extension system, which is intentionally pi-typed). SF's agent logic lives in SF-owned packages that **depend on** pi but do not live inside it. When a new pi release comes out, a maintainer updates the vendored pi packages, runs the TypeScript compiler, and fixes the errors that surface in the SF packages — without ever needing to diff individual files to find what's ours vs. theirs. ## Success Criteria | Criterion | Measurement | |-----------|-------------| -| Zero GSD business logic in vendored pi packages | `pi-coding-agent/src/` contains no files that import from `@gsd/` packages (except the extension system's bundled module map) | -| Module boundary is compiler-enforced | TypeScript `paths` config or package `exports` prevents pi packages from importing GSD packages | +| Zero SF business logic in vendored pi packages | `pi-coding-agent/src/` contains no files that import from `@gsd/` packages (except the extension system's bundled module map) | +| Module boundary is compiler-enforced | TypeScript `paths` config or package `exports` prevents pi packages from importing SF packages | | Applying a pi-mono update is scoped | Updating pi packages produces type errors only in `@gsd/agent-core` and `@gsd/agent-modes` — no changes required in pi package source files | -| Install experience is unchanged | `npm install -g gsd-pi@latest` produces an identical binary from the user's perspective | -| Existing extensions continue to work | All built-in GSD extensions load and execute without modification | +| Install experience is unchanged | `npm install -g sf-run@latest` produces an identical binary from the user's perspective | +| Existing extensions continue to work | All built-in SF extensions load and execute without modification | | Build time does not regress significantly | Full build completes within 120% of current baseline | ## Non-Goals - **Not** moving pi packages from vendored source to npm dependencies (that is a potential Phase 2) -- **Not** creating an abstraction layer that hides pi types from GSD code — GSD packages may freely use pi's `AgentMessage`, `Model`, `TUI`, etc. -- **Not** upstreaming GSD's modifications to pi-mono (desirable long-term but out of scope) +- **Not** creating an abstraction layer that hides pi types from SF code — SF packages may freely use pi's `AgentMessage`, `Model`, `TUI`, etc. +- **Not** upstreaming SF's modifications to pi-mono (desirable long-term but out of scope) - **Not** changing the published npm package name, install command, or any user-facing CLI behavior - **Not** removing or replacing the extension system — it stays in `pi-coding-agent` and remains typed against pi's types @@ -50,7 +50,7 @@ GSD's code is clearly separated from pi's code at the module system level. The v ### R1 — New package: `@gsd/agent-core` -A new workspace package at `packages/gsd-agent-core/` that owns all GSD session orchestration logic. It depends on `@gsd/pi-coding-agent`, `@gsd/pi-agent-core`, and `@gsd/pi-ai`. Nothing in the vendored pi packages depends on it. +A new workspace package at `packages/gsd-agent-core/` that owns all SF session orchestration logic. It depends on `@gsd/pi-coding-agent`, `@gsd/pi-agent-core`, and `@gsd/pi-ai`. Nothing in the vendored pi packages depends on it. Must contain: - `agent-session.ts` and all `AgentSession` types @@ -68,7 +68,7 @@ Must contain: ### R2 — New package: `@gsd/agent-modes` -A new workspace package at `packages/gsd-agent-modes/` that owns all run-mode and CLI code. It depends on `@gsd/agent-core`, `@gsd/pi-coding-agent`, and `@gsd/pi-tui`. It is the layer the top-level `gsd-pi` binary entry point assembles. +A new workspace package at `packages/gsd-agent-modes/` that owns all run-mode and CLI code. It depends on `@gsd/agent-core`, `@gsd/pi-coding-agent`, and `@gsd/pi-tui`. It is the layer the top-level `sf-run` binary entry point assembles. Must contain: - `modes/interactive/` (full TUI interactive mode and all components) @@ -81,7 +81,7 @@ Must contain: After the migration, the vendored `pi-coding-agent` source must not contain files that: - Import from `@gsd/agent-core` or `@gsd/agent-modes` -- Contain GSD business logic (compaction, session management, run modes, CLI) +- Contain SF business logic (compaction, session management, run modes, CLI) The extension system (`src/core/extensions/`) remains in `pi-coding-agent` because it is legitimately pi-typed: extension authors write against pi's `AgentMessage`, `Model`, and `TUI` types. The virtual module map in `extensions/loader.ts` must be updated to include `@gsd/agent-core` and `@gsd/agent-modes` so extensions can import from them. @@ -98,7 +98,7 @@ The workspace build script must be updated to build packages in dependency order 2. `@gsd/pi-coding-agent` 3. `@gsd/agent-core` 4. `@gsd/agent-modes` -5. `gsd-pi` (top-level binary) +5. `sf-run` (top-level binary) ### R6 — No change to the extension loader's public interface diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md index 381029731..65dcba6a8 100644 --- a/docs/dev/architecture.md +++ b/docs/dev/architecture.md @@ -1,23 +1,23 @@ # Architecture Overview -GSD is a TypeScript application built on the [Pi SDK](https://github.com/badlogic/pi-mono). It embeds the Pi coding agent and extends it with the GSD workflow engine, auto mode state machine, and project management primitives. +SF is a TypeScript application built on the [Pi SDK](https://github.com/badlogic/pi-mono). It embeds the Pi coding agent and extends it with the SF workflow engine, auto mode state machine, and project management primitives. ## System Structure ``` gsd (CLI binary) - └─ loader.ts Sets PI_PACKAGE_DIR, GSD env vars, dynamic-imports cli.ts + └─ loader.ts Sets PI_PACKAGE_DIR, SF env vars, dynamic-imports cli.ts └─ cli.ts Wires SDK managers, loads extensions, starts InteractiveMode ├─ onboarding.ts First-run setup wizard (LLM provider + tool keys) ├─ wizard.ts Env hydration from stored auth.json credentials ├─ app-paths.ts ~/.gsd/agent/, ~/.gsd/sessions/, auth.json ├─ resource-loader.ts Syncs bundled extensions + agents to ~/.gsd/agent/ └─ src/resources/ - ├─ extensions/gsd/ Core GSD extension + ├─ extensions/gsd/ Core SF extension ├─ extensions/... 23 supporting extensions ├─ agents/ scout, researcher, worker ├─ AGENTS.md Agent routing instructions - └─ GSD-WORKFLOW.md Manual bootstrap protocol + └─ SF-WORKFLOW.md Manual bootstrap protocol gsd headless Headless mode — CI/cron orchestration via RPC child process gsd --mode mcp MCP server mode — exposes tools over stdin/stdout @@ -37,7 +37,7 @@ vscode-extension/ VS Code extension — chat participant (@gsd), sidebar ### `pkg/` Shim Directory -`PI_PACKAGE_DIR` points to `pkg/` (not project root) to avoid Pi's theme resolution colliding with GSD's `src/` directory. Contains only `piConfig` and theme assets. +`PI_PACKAGE_DIR` points to `pkg/` (not project root) to avoid Pi's theme resolution colliding with SF's `src/` directory. Contains only `piConfig` and theme assets. ### Always-Overwrite Sync @@ -55,7 +55,7 @@ Every dispatch creates a new agent session. The LLM starts with a clean context | Extension | What It Provides | |-----------|-----------------| -| **GSD** | Core workflow engine — auto mode, state machine, commands, dashboard | +| **SF** | Core workflow engine — auto mode, state machine, commands, dashboard | | **Browser Tools** | Playwright-based browser automation — navigation, forms, screenshots, PDF export, device emulation, visual regression, structured data extraction, route mocking, accessibility tree inspection, and semantic actions | | **Search the Web** | Brave Search, Tavily, or Jina page extraction | | **Google Search** | Gemini-powered web search with AI-synthesized answers | @@ -104,7 +104,7 @@ Performance-critical operations use a Rust N-API engine: - **fd** — fuzzy file path discovery - **clipboard** — native clipboard access - **git** — libgit2-backed git read operations (v2.16+) -- **parser** — GSD file parsing and frontmatter extraction +- **parser** — SF file parsing and frontmatter extraction ## Dispatch Pipeline diff --git a/docs/dev/ci-cd-pipeline.md b/docs/dev/ci-cd-pipeline.md index d84af7955..8528a4a1f 100644 --- a/docs/dev/ci-cd-pipeline.md +++ b/docs/dev/ci-cd-pipeline.md @@ -2,14 +2,14 @@ ## Overview -GSD 2 uses a three-stage promotion pipeline that automatically moves merged PRs through **Dev → Test → Prod** environments using npm dist-tags. +SF uses a three-stage promotion pipeline that automatically moves merged PRs through **Dev → Test → Prod** environments using npm dist-tags. ``` PR merged to main │ ▼ ┌─────────┐ ci.yml passes (build, test, typecheck) - │ DEV │ → publishes gsd-pi@-dev. with @dev tag + │ DEV │ → publishes sf-run@-dev. with @dev tag └────┬────┘ ▼ (automatic if green) ┌─────────┐ CLI smoke tests + LLM fixture replay @@ -29,13 +29,13 @@ Every merged PR is immediately installable: ```bash # Latest dev build (bleeding edge, every merged PR) -npx gsd-pi@dev +npx sf-run@dev # Test candidate (passed smoke + fixture tests) -npx gsd-pi@next +npx sf-run@next # Stable production release -npx gsd-pi@latest # or just: npx gsd-pi +npx sf-run@latest # or just: npx sf-run ``` ### Using Docker @@ -51,10 +51,10 @@ docker run --rm -v $(pwd):/workspace ghcr.io/singularity-forge/sf-run:latest --v ### Checking if a Fix Landed 1. Find the PR's merge commit SHA (first 7 chars) -2. Check if it's in `@dev`: `npm view gsd-pi@dev version` +2. Check if it's in `@dev`: `npm view sf-run@dev version` - If the version ends in `-dev.`, your PR is in dev -3. Check if it promoted to `@next`: `npm view gsd-pi@next version` -4. Check if it's in production: `npm view gsd-pi@latest version` +3. Check if it promoted to `@next`: `npm view sf-run@next version` +4. Check if it's in production: `npm view sf-run@latest version` ## For Maintainers @@ -126,7 +126,7 @@ If a broken version reaches production: ```bash # Roll back npm -npm dist-tag add gsd-pi@ latest +npm dist-tag add sf-run@ latest # Roll back Docker docker pull ghcr.io/singularity-forge/sf-run: @@ -172,7 +172,7 @@ npm run test:fixtures ```bash # Set your API key, then record -GSD_FIXTURE_MODE=record GSD_FIXTURE_DIR=./tests/fixtures/recordings \ +SF_FIXTURE_MODE=record SF_FIXTURE_DIR=./tests/fixtures/recordings \ node --experimental-strip-types tests/fixtures/record.ts ``` diff --git a/docs/dev/pi-context-optimization-opportunities.md b/docs/dev/pi-context-optimization-opportunities.md index 9e34cc44c..738c7c581 100644 --- a/docs/dev/pi-context-optimization-opportunities.md +++ b/docs/dev/pi-context-optimization-opportunities.md @@ -2,7 +2,7 @@ > **Status**: Research only — not planned for implementation. > Scope: `packages/pi-coding-agent` and `packages/pi-agent-core` infrastructure. -> These changes would benefit every consumer of the pi engine, not just GSD. +> These changes would benefit every consumer of the pi engine, not just SF. --- @@ -21,7 +21,7 @@ **Cache hierarchy**: Tools → system → messages. Changing a tool definition invalidates system and message caches. Tool definitions should be sorted deterministically (alphabetically) to prevent spurious cache misses. -**Expected savings**: 80–90% reduction in input token cost for multi-turn sessions (the dominant cost pattern in GSD auto-mode). +**Expected savings**: 80–90% reduction in input token cost for multi-turn sessions (the dominant cost pattern in SF auto-mode). --- @@ -165,7 +165,7 @@ Speakeasy measured 91–97% token reduction with 100% task success rate. Trade-o ## 10. Cost Attribution and Per-Phase Reporting -**Current state**: `SessionManager.getUsageTotals()` accumulates cost across the entire session. No per-phase or per-agent breakdown is stored. Cost visibility is limited to the footer total and `GSD_SHOW_TOKEN_COST=1` per-turn display. +**Current state**: `SessionManager.getUsageTotals()` accumulates cost across the entire session. No per-phase or per-agent breakdown is stored. Cost visibility is limited to the footer total and `SF_SHOW_TOKEN_COST=1` per-turn display. **Opportunity**: Emit structured cost events that extensions can subscribe to: ```typescript @@ -178,7 +178,7 @@ interface CostCheckpointEvent { } ``` -GSD extension could consume these events to surface per-milestone cost in `/gsd stats` and flag milestones that are disproportionately expensive — enabling budget-aware planning. +SF extension could consume these events to surface per-milestone cost in `/gsd stats` and flag milestones that are disproportionately expensive — enabling budget-aware planning. --- diff --git a/docs/dev/proposals/rfc-gitops-branching-strategy.md b/docs/dev/proposals/rfc-gitops-branching-strategy.md index 99e2a394c..5138cf551 100644 --- a/docs/dev/proposals/rfc-gitops-branching-strategy.md +++ b/docs/dev/proposals/rfc-gitops-branching-strategy.md @@ -64,13 +64,13 @@ Pre-release versions on `next`: Developer opens PR targeting next CI runs on PR (build, test, typecheck, windows) PR is reviewed and merged to next - Pipeline publishes gsd-pi@2.34.0-next.N with @next tag + Pipeline publishes sf-run@2.34.0-next.N with @next tag 2. Stabilization Maintainer runs: gh workflow dispatch create-release -- version=2.34 Workflow creates release/2.34 from next Only fix: commits allowed on release/2.34 (enforced by branch protection) - Pipeline publishes gsd-pi@2.34.0-rc.N with @rc tag + Pipeline publishes sf-run@2.34.0-rc.N with @rc tag Back-merges fixes to next automatically 3. Production Release diff --git a/docs/dev/proposals/workflows/create-release.yml b/docs/dev/proposals/workflows/create-release.yml index 47ff74f9c..a84636b8c 100644 --- a/docs/dev/proposals/workflows/create-release.yml +++ b/docs/dev/proposals/workflows/create-release.yml @@ -58,7 +58,7 @@ jobs: ### Checklist - [ ] All targeted fixes merged to \`release/${{ inputs.version }}\` - - [ ] RC published and smoke-tested (\`npm i gsd-pi@rc\`) + - [ ] RC published and smoke-tested (\`npm i sf-run@rc\`) - [ ] CHANGELOG reviewed - [ ] Production deployment approved diff --git a/docs/dev/superpowers/plans/2026-03-17-cicd-pipeline.md b/docs/dev/superpowers/plans/2026-03-17-cicd-pipeline.md index 1bba1e6b4..679694f14 100644 --- a/docs/dev/superpowers/plans/2026-03-17-cicd-pipeline.md +++ b/docs/dev/superpowers/plans/2026-03-17-cicd-pipeline.md @@ -28,7 +28,7 @@ | `tests/smoke/test-init.ts` | Verify `gsd init` creates expected files in a temp dir | | `tests/fixtures/provider.ts` | `FixtureProvider` — wraps `ApiProvider`, records/replays turns | | `tests/fixtures/run.ts` | Fixture test runner — loads recordings, replays via `FixtureProvider` | -| `tests/fixtures/record.ts` | Recording helper — runs a session with `GSD_FIXTURE_MODE=record` | +| `tests/fixtures/record.ts` | Recording helper — runs a session with `SF_FIXTURE_MODE=record` | | `tests/fixtures/recordings/agent-creates-file.json` | Sample fixture: single-turn file creation | | `tests/fixtures/recordings/agent-reads-and-edits.json` | Fixture: multi-turn read + edit flow | | `tests/fixtures/recordings/agent-handles-error.json` | Fixture: error response handling | @@ -129,14 +129,14 @@ RUN node --version && rustc --version && cargo --version # ────────────────────────────────────────────── FROM node:22-slim AS runtime -# Git is required for GSD's git operations +# Git is required for SF's git operations RUN apt-get update && apt-get install -y --no-install-recommends \ git \ && rm -rf /var/lib/apt/lists/* -# Install GSD globally — version is controlled by the build arg -ARG GSD_VERSION=latest -RUN npm install -g gsd-pi@${GSD_VERSION} +# Install SF globally — version is controlled by the build arg +ARG SF_VERSION=latest +RUN npm install -g sf-run@${SF_VERSION} # Default working directory for user projects WORKDIR /workspace @@ -152,12 +152,12 @@ Expected: Completes successfully (may take 5-10 min first time) - [ ] **Step 3: Verify runtime stage builds** -Run: `docker build --target runtime -t gsd-pi-test .` +Run: `docker build --target runtime -t sf-run-test .` Expected: Completes successfully - [ ] **Step 4: Verify runtime image works** -Run: `docker run --rm gsd-pi-test --version` +Run: `docker run --rm sf-run-test --version` Expected: Outputs a version string - [ ] **Step 5: Commit** @@ -226,15 +226,15 @@ if (failed > 0) process.exit(1); ```typescript // tests/smoke/test-version.ts // Verifies that `gsd --version` outputs valid semver-like string. -// When GSD_SMOKE_BINARY is set (CI), uses that binary directly. -// Otherwise falls back to npx gsd-pi. +// When SF_SMOKE_BINARY is set (CI), uses that binary directly. +// Otherwise falls back to npx sf-run. import { execFileSync } from "child_process"; -const bin = process.env.GSD_SMOKE_BINARY; +const bin = process.env.SF_SMOKE_BINARY; const output = bin ? execFileSync(bin, ["--version"], { encoding: "utf8", timeout: 30_000 }).trim() - : execFileSync("npx", ["gsd-pi", "--version"], { encoding: "utf8", timeout: 30_000 }).trim(); + : execFileSync("npx", ["sf-run", "--version"], { encoding: "utf8", timeout: 30_000 }).trim(); if (!/^\d+\.\d+\.\d+/.test(output)) { console.error(`Unexpected version output: "${output}"`); @@ -252,10 +252,10 @@ console.log(`version: ${output}`); import { execFileSync } from "child_process"; -const bin = process.env.GSD_SMOKE_BINARY; +const bin = process.env.SF_SMOKE_BINARY; const output = bin ? execFileSync(bin, ["--help"], { encoding: "utf8", timeout: 30_000 }) - : execFileSync("npx", ["gsd-pi", "--help"], { encoding: "utf8", timeout: 30_000 }); + : execFileSync("npx", ["sf-run", "--help"], { encoding: "utf8", timeout: 30_000 }); const requiredKeywords = ["gsd", "usage"]; for (const keyword of requiredKeywords) { @@ -282,13 +282,13 @@ import { tmpdir } from "os"; const tmp = mkdtempSync(join(tmpdir(), "gsd-smoke-init-")); try { - const bin = process.env.GSD_SMOKE_BINARY; - const args = bin ? [bin, "init"] : ["npx", "gsd-pi", "init"]; + const bin = process.env.SF_SMOKE_BINARY; + const args = bin ? [bin, "init"] : ["npx", "sf-run", "init"]; execFileSync(args[0], args.slice(1), { encoding: "utf8", cwd: tmp, timeout: 30_000, - env: { ...process.env, GSD_NON_INTERACTIVE: "1" }, + env: { ...process.env, SF_NON_INTERACTIVE: "1" }, }); // Check that .gsd directory was created @@ -353,8 +353,8 @@ The provider is registered via `registerApiProvider()` from `packages/pi-ai/src/ // Replay mode: loads saved JSON, serves responses by turn index. // // Controlled via environment variables: -// GSD_FIXTURE_MODE=record|replay -// GSD_FIXTURE_DIR=./tests/fixtures/recordings +// SF_FIXTURE_MODE=record|replay +// SF_FIXTURE_DIR=./tests/fixtures/recordings import { readFileSync, writeFileSync, mkdirSync } from "fs"; import { join } from "path"; @@ -383,13 +383,13 @@ export interface FixtureFile { export type FixtureMode = "record" | "replay" | "off"; export function getFixtureMode(): FixtureMode { - const mode = process.env.GSD_FIXTURE_MODE; + const mode = process.env.SF_FIXTURE_MODE; if (mode === "record" || mode === "replay") return mode; return "off"; } export function getFixtureDir(): string { - return process.env.GSD_FIXTURE_DIR || join(process.cwd(), "tests/fixtures/recordings"); + return process.env.SF_FIXTURE_DIR || join(process.cwd(), "tests/fixtures/recordings"); } export function loadFixture(filepath: string): FixtureFile { @@ -809,13 +809,13 @@ git commit -m "feat(ci): add additional fixture recordings for multi-turn and er ```typescript // tests/live/run.ts -// Runs real LLM integration tests. Only executes when GSD_LIVE_TESTS=1. +// Runs real LLM integration tests. Only executes when SF_LIVE_TESTS=1. // These tests cost real money — used in the Prod gate only. // -// Usage: GSD_LIVE_TESTS=1 node --experimental-strip-types tests/live/run.ts +// Usage: SF_LIVE_TESTS=1 node --experimental-strip-types tests/live/run.ts -if (process.env.GSD_LIVE_TESTS !== "1") { - console.log("Skipping live tests (set GSD_LIVE_TESTS=1 to enable)"); +if (process.env.SF_LIVE_TESTS !== "1") { + console.log("Skipping live tests (set SF_LIVE_TESTS=1 to enable)"); process.exit(0); } @@ -944,8 +944,8 @@ console.log(`OpenAI roundtrip OK: "${text.substring(0, 50)}"`); Add to `package.json` `scripts`: ```json -"test:fixtures:record": "GSD_FIXTURE_MODE=record node --experimental-strip-types tests/fixtures/record.ts", -"test:live": "GSD_LIVE_TESTS=1 node --experimental-strip-types tests/live/run.ts", +"test:fixtures:record": "SF_FIXTURE_MODE=record node --experimental-strip-types tests/fixtures/record.ts", +"test:live": "SF_LIVE_TESTS=1 node --experimental-strip-types tests/live/run.ts", "pipeline:version-stamp": "node scripts/version-stamp.mjs", "docker:build-runtime": "docker build --target runtime -t ghcr.io/singularity-forge/sf-run .", "docker:build-builder": "docker build --target builder -t ghcr.io/singularity-forge/sf-ci-builder ." @@ -954,7 +954,7 @@ Add to `package.json` `scripts`: - [ ] **Step 5: Verify live tests skip without env var** Run: `npm run test:live` -Expected: `Skipping live tests (set GSD_LIVE_TESTS=1 to enable)` and exit 0 +Expected: `Skipping live tests (set SF_LIVE_TESTS=1 to enable)` and exit 0 - [ ] **Step 6: Commit** @@ -1037,7 +1037,7 @@ jobs: run: | mkdir /tmp/smoke-test && cd /tmp/smoke-test npm init -y - npm install gsd-pi@dev + npm install sf-run@dev npx gsd --version # ─── TEST STAGE ──────────────────────────────────────────── @@ -1059,7 +1059,7 @@ jobs: registry-url: "https://registry.npmjs.org" - name: Install published dev package globally - run: npm install -g gsd-pi@dev + run: npm install -g sf-run@dev - name: Install dev dependencies for test runners run: npm ci @@ -1067,13 +1067,13 @@ jobs: - name: Run CLI smoke tests run: npm run test:smoke env: - GSD_SMOKE_BINARY: gsd # Use globally installed binary, not npx + SF_SMOKE_BINARY: gsd # Use globally installed binary, not npx - name: Run fixture replay tests run: npm run test:fixtures - name: Promote to @next - run: npm dist-tag add gsd-pi@${{ needs.dev-publish.outputs.dev-version }} next + run: npm dist-tag add sf-run@${{ needs.dev-publish.outputs.dev-version }} next env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -1081,7 +1081,7 @@ jobs: run: | echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin docker build --target runtime \ - --build-arg GSD_VERSION=${{ needs.dev-publish.outputs.dev-version }} \ + --build-arg SF_VERSION=${{ needs.dev-publish.outputs.dev-version }} \ -t ghcr.io/singularity-forge/sf-run:next \ -t ghcr.io/singularity-forge/sf-run:${{ needs.dev-publish.outputs.dev-version }} \ . @@ -1111,13 +1111,13 @@ jobs: run: | npm ci npm run build - GSD_LIVE_TESTS=1 npm run test:live + SF_LIVE_TESTS=1 npm run test:live env: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} - name: Promote to @latest - run: npm dist-tag add gsd-pi@${{ needs.dev-publish.outputs.dev-version }} latest + run: npm dist-tag add sf-run@${{ needs.dev-publish.outputs.dev-version }} latest env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} @@ -1140,7 +1140,7 @@ jobs: run: | mkdir /tmp/prod-smoke && cd /tmp/prod-smoke npm init -y - npm install gsd-pi@latest + npm install sf-run@latest npx gsd --version # ─── CI BUILDER IMAGE (conditional) ──────────────────────── @@ -1222,7 +1222,7 @@ jobs: - name: Remove old dev versions run: | - VERSIONS=$(npm view gsd-pi versions --json 2>/dev/null || echo "[]") + VERSIONS=$(npm view sf-run versions --json 2>/dev/null || echo "[]") DEV_VERSIONS=$(echo "$VERSIONS" | node -e " const stdin = require('fs').readFileSync('/dev/stdin', 'utf8'); @@ -1242,7 +1242,7 @@ jobs: THIRTY_DAYS_MS=2592000000 for VERSION in $DEV_VERSIONS; do - PUBLISH_TIME=$(npm view "gsd-pi@$VERSION" time --json 2>/dev/null || echo "") + PUBLISH_TIME=$(npm view "sf-run@$VERSION" time --json 2>/dev/null || echo "") if [ -n "$PUBLISH_TIME" ]; then AGE_MS=$(node -e " @@ -1251,10 +1251,10 @@ jobs: " 2>/dev/null || echo "0") if [ "$AGE_MS" -gt "$THIRTY_DAYS_MS" ]; then - echo "Unpublishing gsd-pi@$VERSION" - npm unpublish "gsd-pi@$VERSION" || echo "Failed to unpublish $VERSION" + echo "Unpublishing sf-run@$VERSION" + npm unpublish "sf-run@$VERSION" || echo "Failed to unpublish $VERSION" else - echo "Keeping gsd-pi@$VERSION (within 30 days)" + echo "Keeping sf-run@$VERSION (within 30 days)" fi fi done @@ -1290,8 +1290,8 @@ git commit -m "feat(ci): add weekly dev version cleanup workflow" // Helper for recording new LLM fixtures. // // Usage: -// GSD_FIXTURE_MODE=record \ -// GSD_FIXTURE_DIR=./tests/fixtures/recordings \ +// SF_FIXTURE_MODE=record \ +// SF_FIXTURE_DIR=./tests/fixtures/recordings \ // node --experimental-strip-types tests/fixtures/record.ts // // This is a developer tool, not used in CI. @@ -1303,10 +1303,10 @@ const mode = getFixtureMode(); const dir = getFixtureDir(); if (mode !== "record") { - console.error("Recording requires GSD_FIXTURE_MODE=record"); + console.error("Recording requires SF_FIXTURE_MODE=record"); console.error(""); console.error("Usage:"); - console.error(" GSD_FIXTURE_MODE=record GSD_FIXTURE_DIR=./tests/fixtures/recordings \\"); + console.error(" SF_FIXTURE_MODE=record SF_FIXTURE_DIR=./tests/fixtures/recordings \\"); console.error(" node --experimental-strip-types tests/fixtures/record.ts"); process.exit(1); } @@ -1315,8 +1315,8 @@ console.log("Fixture recording mode enabled"); console.log(`Recordings will be saved to: ${dir}`); console.log(""); console.log("To record a fixture:"); -console.log("1. Set GSD_FIXTURE_MODE=record in your environment"); -console.log("2. Run your GSD session normally"); +console.log("1. Set SF_FIXTURE_MODE=record in your environment"); +console.log("2. Run your SF session normally"); console.log("3. The FixtureProvider will intercept and save all LLM calls"); console.log("4. Review the generated JSON in the recordings directory"); console.log("5. Commit the fixture to version control"); @@ -1350,7 +1350,7 @@ npm run test:live Expected: - Smoke tests: 3 passed - Fixture tests: 1 passed -- Live tests: Skipped (no `GSD_LIVE_TESTS=1`) +- Live tests: Skipped (no `SF_LIVE_TESTS=1`) - [ ] **Step 2: Validate all workflow YAML files** diff --git a/docs/dev/superpowers/specs/2026-03-17-cicd-pipeline-design.md b/docs/dev/superpowers/specs/2026-03-17-cicd-pipeline-design.md index 5e144ba18..a1bb4630f 100644 --- a/docs/dev/superpowers/specs/2026-03-17-cicd-pipeline-design.md +++ b/docs/dev/superpowers/specs/2026-03-17-cicd-pipeline-design.md @@ -1,16 +1,16 @@ -# CI/CD Pipeline Design — GSD 2 +# CI/CD Pipeline Design — SF ## Overview -A three-stage promotion pipeline for GSD 2 that moves merged PRs through Dev → Test → Prod using npm dist-tags as environment markers, GitHub Environments for approval gates, and Docker images for both CI acceleration and end-user distribution. +A three-stage promotion pipeline for SF that moves merged PRs through Dev → Test → Prod using npm dist-tags as environment markers, GitHub Environments for approval gates, and Docker images for both CI acceleration and end-user distribution. ## Goals -1. Every merged PR is immediately installable via `npx gsd-pi@dev` +1. Every merged PR is immediately installable via `npx sf-run@dev` 2. Verified builds auto-promote to `@next` for early adopters 3. Production releases require manual approval and optional live-LLM validation 4. CI builds are fast and reproducible via pre-built Docker builder image -5. End users can run GSD via Docker as an alternative to npm +5. End users can run SF via Docker as an alternative to npm 6. LLM-dependent behavior is testable without API calls via recorded fixtures ## Non-Goals @@ -18,7 +18,7 @@ A three-stage promotion pipeline for GSD 2 that moves merged PRs through Dev → - Replacing the existing PR gate workflow (`ci.yml`) - Replacing the native binary cross-compilation workflow (`build-native.yml`) - Cross-platform native binary builds (macOS/Windows remain on `build-native.yml`) -- Hosting GSD as a web service +- Hosting SF as a web service - Automated prompt regression testing (future work) ## Pipeline Architecture @@ -33,8 +33,8 @@ A three-stage promotion pipeline for GSD 2 that moves merged PRs through Dev → │ STAGE: DEV Environment: dev │ │ │ │ 1. Version stamp: -dev. │ -│ 2. npm publish gsd-pi@-dev. --tag dev │ -│ 3. Smoke test: npx gsd-pi@dev --version │ +│ 2. npm publish sf-run@-dev. --tag dev │ +│ 3. Smoke test: npx sf-run@dev --version │ │ │ │ Note: Build/test/typecheck already ran in ci.yml │ │ Docker: Build CI builder image (only if Dockerfile changed) │ @@ -43,13 +43,13 @@ A three-stage promotion pipeline for GSD 2 that moves merged PRs through Dev → ┌──────────────────────────────────────────────────────────────┐ │ STAGE: TEST Environment: test │ │ │ -│ 1. Install gsd-pi@dev from registry │ +│ 1. Install sf-run@dev from registry │ │ 2. CLI smoke tests (--version, init, help, config) │ │ 3. Dry-run fixture suite (recorded LLM conversations) │ │ - Agent session replay with fixture provider │ │ - Tool use round-trips verified │ │ - Extension loading validated │ -│ 4. npm dist-tag add gsd-pi@ next │ +│ 4. npm dist-tag add sf-run@ next │ │ │ │ Docker: Build + push runtime image to GHCR as :next │ └──────────────────────────┬──────────────────────────────────┘ @@ -61,7 +61,7 @@ A three-stage promotion pipeline for GSD 2 that moves merged PRs through Dev → │ - Gated behind workflow input flag │ │ - Uses ANTHROPIC_API_KEY / OPENAI_API_KEY secrets │ │ - Budget-capped: small models, short conversations │ -│ 2. npm dist-tag add gsd-pi@ latest │ +│ 2. npm dist-tag add sf-run@ latest │ │ 3. GitHub Release created with changelog │ │ 4. Docker: tag runtime image as :latest + :v │ │ 5. Post-publish smoke test against @latest │ @@ -80,7 +80,7 @@ The `-dev.` prerelease identifier is distinct from the existing `-next.` convent ### Native Binary Strategy for Dev Publishes -Dev versions (`@dev` tag) use the native binaries from the most recent stable `build-native.yml` release. The `optionalDependencies` in `package.json` use `>=` ranges, so a `-dev.` version of `gsd-pi` resolves the latest stable `@gsd-build/engine-*` packages from the registry. +Dev versions (`@dev` tag) use the native binaries from the most recent stable `build-native.yml` release. The `optionalDependencies` in `package.json` use `>=` ranges, so a `-dev.` version of `sf-run` resolves the latest stable `@gsd-build/engine-*` packages from the registry. If a PR modifies Rust native crate code (`native/` directory), the dev publish will bundle stale native binaries. This is acceptable because: - Native crate changes are infrequent and always accompanied by a `v*` tag release @@ -105,9 +105,9 @@ Policy: | Failure | Impact | Recovery | |---------|--------|----------| -| Dev publish succeeds, smoke test fails | Broken version on `@dev` tag | Next successful merge overwrites `@dev`. Manual fix: `npm dist-tag add gsd-pi@ dev` | -| Test stage fails after promoting to `@next` | Broken version on `@next` tag | Manual: `npm dist-tag add gsd-pi@ next`. `@latest` is never affected. | -| Prod promotion publishes `@latest` then found broken | Broken production release | Manual: `npm dist-tag add gsd-pi@ latest` and `docker tag ghcr.io/singularity-forge/sf-run: latest && docker push`. Post-mortem required. | +| Dev publish succeeds, smoke test fails | Broken version on `@dev` tag | Next successful merge overwrites `@dev`. Manual fix: `npm dist-tag add sf-run@ dev` | +| Test stage fails after promoting to `@next` | Broken version on `@next` tag | Manual: `npm dist-tag add sf-run@ next`. `@latest` is never affected. | +| Prod promotion publishes `@latest` then found broken | Broken production release | Manual: `npm dist-tag add sf-run@ latest` and `docker tag ghcr.io/singularity-forge/sf-run: latest && docker push`. Post-mortem required. | | Docker push succeeds, npm dist-tag fails | Images and npm out of sync | Re-run the failed job (GitHub Actions retry). Images are tagged by version so stale tags are harmless. | | GHCR push fails | No Docker image for this version | Non-blocking — npm publish is the primary distribution. Docker image can be rebuilt manually. | @@ -150,7 +150,7 @@ Builder images are tagged with both `:latest` and a date stamp (e.g., `:2026-03- - **Name:** `ghcr.io/singularity-forge/sf-run` - **Base:** `node:22-slim` -- **Contains:** Node 22, git, `gsd-pi` installed globally +- **Contains:** Node 22, git, `sf-run` installed globally - **Size:** ~250 MB - **Tags:** `:latest`, `:next`, `:v2.27.0` - **Published:** On every Prod promotion @@ -212,15 +212,15 @@ class FixtureProvider implements Provider { Key integration details: - **Streaming:** Fixture replay simulates streaming by yielding saved response chunks with minimal delay. This exercises the same consumer code paths as real streaming. -- **Registration:** When `GSD_FIXTURE_MODE` is set, the fixture provider wraps the configured real provider. No changes to provider selection logic needed. +- **Registration:** When `SF_FIXTURE_MODE` is set, the fixture provider wraps the configured real provider. No changes to provider selection logic needed. - **Provider-agnostic:** Fixtures are captured at the `Provider` interface level (above HTTP transport), so they work regardless of which underlying provider was used during recording. ### Modes | Mode | Trigger | Behavior | |------|---------|----------| -| **Record** | `GSD_FIXTURE_MODE=record GSD_FIXTURE_DIR=./fixtures` | Wraps real provider, saves request/response pairs | -| **Replay** | `GSD_FIXTURE_MODE=replay GSD_FIXTURE_DIR=./fixtures` | Returns saved responses, zero API calls | +| **Record** | `SF_FIXTURE_MODE=record SF_FIXTURE_DIR=./fixtures` | Wraps real provider, saves request/response pairs | +| **Replay** | `SF_FIXTURE_MODE=replay SF_FIXTURE_DIR=./fixtures` | Returns saved responses, zero API calls | | **Off** | Default (no env vars) | Normal operation, no interception | ### Fixture Format @@ -281,7 +281,7 @@ Committed to repo under `tests/fixtures/recordings/`. Each fixture is 5-50KB of ### Dev Version Cleanup -Old `-dev.` versions accumulate on npm with every merged PR. A scheduled workflow (`cleanup-dev-versions.yml`) runs weekly and unpublishes dev versions older than 30 days via `npm unpublish gsd-pi@`. This prevents registry bloat while keeping recent dev versions available. +Old `-dev.` versions accumulate on npm with every merged PR. A scheduled workflow (`cleanup-dev-versions.yml`) runs weekly and unpublishes dev versions older than 30 days via `npm unpublish sf-run@`. This prevents registry bloat while keeping recent dev versions available. ## New Files & Scripts @@ -326,8 +326,8 @@ All test files use `.ts` with `--experimental-strip-types` for consistency with { "test:smoke": "node --experimental-strip-types tests/smoke/run.ts", "test:fixtures": "node --experimental-strip-types tests/fixtures/run.ts", - "test:fixtures:record": "GSD_FIXTURE_MODE=record node --experimental-strip-types tests/fixtures/record.ts", - "test:live": "GSD_LIVE_TESTS=1 node --experimental-strip-types tests/live/run.ts", + "test:fixtures:record": "SF_FIXTURE_MODE=record node --experimental-strip-types tests/fixtures/record.ts", + "test:live": "SF_LIVE_TESTS=1 node --experimental-strip-types tests/live/run.ts", "pipeline:version-stamp": "node scripts/version-stamp.mjs", "docker:build-runtime": "docker build --target runtime -t ghcr.io/singularity-forge/sf-run .", "docker:build-builder": "docker build --target builder -t ghcr.io/singularity-forge/sf-ci-builder ." @@ -348,7 +348,7 @@ All test files use `.ts` with `--experimental-strip-types` for consistency with ## Success Criteria -1. A merged PR is installable via `npx gsd-pi@dev` within 15 minutes (assumes warm CI builder image cache) +1. A merged PR is installable via `npx sf-run@dev` within 15 minutes (assumes warm CI builder image cache) 2. Fixture replay tests complete in under 60 seconds with zero API calls 3. The full Dev → Test promotion completes without human intervention 4. Prod promotion is blocked until a maintainer explicitly approves diff --git a/docs/dev/what-is-pi/18-quick-reference-commands-shortcuts.md b/docs/dev/what-is-pi/18-quick-reference-commands-shortcuts.md index 8b195117a..6e0840a62 100644 --- a/docs/dev/what-is-pi/18-quick-reference-commands-shortcuts.md +++ b/docs/dev/what-is-pi/18-quick-reference-commands-shortcuts.md @@ -40,7 +40,7 @@ | Alt+Enter (during streaming) | Queue follow-up message | | Alt+Up | Retrieve queued messages | -> **iTerm2 users:** Ctrl+Alt shortcuts (e.g., Ctrl+Alt+G for the GSD dashboard) require Left Option Key set to "Esc+" in Profiles → Keys → General. The default "Normal" setting swallows the Alt modifier. +> **iTerm2 users:** Ctrl+Alt shortcuts (e.g., Ctrl+Alt+G for the SF dashboard) require Left Option Key set to "Esc+" in Profiles → Keys → General. The default "Normal" setting swallows the Alt modifier. ### CLI diff --git a/docs/dev/what-is-pi/19-building-branded-apps-on-top-of-pi.md b/docs/dev/what-is-pi/19-building-branded-apps-on-top-of-pi.md index ba467b03b..ded6af0ba 100644 --- a/docs/dev/what-is-pi/19-building-branded-apps-on-top-of-pi.md +++ b/docs/dev/what-is-pi/19-building-branded-apps-on-top-of-pi.md @@ -103,8 +103,8 @@ When you use `createAgentSession()`, you can control: That means your app can store state under: - `~/.gsd/agent` -- `~/Library/Application Support/GSD` -- `%APPDATA%/GSD` +- `~/Library/Application Support/SF` +- `%APPDATA%/SF` - an app-local portable directory - a project-local directory @@ -284,7 +284,7 @@ Example: Or on macOS: ```text -~/Library/Application Support/GSD/ +~/Library/Application Support/SF/ agent/ sessions/ ``` @@ -377,7 +377,7 @@ const loader = new DefaultResourceLoader({ (pi) => { pi.registerCommand("hello", { description: "My branded command", - handler: async (_args, ctx) => ctx.ui.notify("Hello from GSD", "info"), + handler: async (_args, ctx) => ctx.ui.notify("Hello from SF", "info"), }); }, ], @@ -393,7 +393,7 @@ const loader = new DefaultResourceLoader({ promptsOverride: () => ({ prompts: [], diagnostics: [] }), skillsOverride: () => ({ skills: [], diagnostics: [] }), agentsFilesOverride: () => ({ agentsFiles: [] }), - systemPromptOverride: () => "You are GSD, a specialized software delivery agent.", + systemPromptOverride: () => "You are SF, a specialized software delivery agent.", }); ``` @@ -756,7 +756,7 @@ const resourceLoader = new DefaultResourceLoader({ agentDir, settingsManager, systemPromptOverride: () => - "You are GSD, a branded software delivery agent. Prefer project-specific workflows and terminology.", + "You are SF, a branded software delivery agent. Prefer project-specific workflows and terminology.", additionalExtensionPaths: [ path.resolve("resources/extensions/index.ts"), ], diff --git a/docs/user-docs/auto-mode.md b/docs/user-docs/auto-mode.md index 5d2c47e3a..055d888ba 100644 --- a/docs/user-docs/auto-mode.md +++ b/docs/user-docs/auto-mode.md @@ -1,6 +1,6 @@ # Auto Mode -Auto mode is GSD's autonomous execution engine. Run `/gsd auto`, walk away, come back to built software with clean git history. +Auto mode is SF's autonomous execution engine. Run `/gsd auto`, walk away, come back to built software with clean git history. ## How It Works @@ -45,7 +45,7 @@ The amount of context inlined is controlled by your [token profile](./token-opti ### Git Isolation -GSD isolates milestone work using one of three modes (configured via `git.isolation` in preferences): +SF isolates milestone work using one of three modes (configured via `git.isolation` in preferences): - **`worktree`** (default): Each milestone runs in its own git worktree at `.gsd/worktrees//` on a `milestone/` branch. All slice work commits sequentially — no branch switching, no merge conflicts mid-milestone. When the milestone completes, it's squash-merged to main as one clean commit. - **`branch`**: Work happens in the project root on a `milestone/` branch. Useful for submodule-heavy repos where worktrees don't work well. @@ -65,7 +65,7 @@ A lock file tracks the current unit. If the session dies, the next `/gsd auto` r ### Provider Error Recovery -GSD classifies provider errors and auto-resumes when safe: +SF classifies provider errors and auto-resumes when safe: | Error type | Examples | Action | |-----------|----------|--------| @@ -77,11 +77,11 @@ No manual intervention needed for transient errors — the session pauses briefl ### Incremental Memory (v2.26) -GSD maintains a `KNOWLEDGE.md` file — an append-only register of project-specific rules, patterns, and lessons learned. The agent reads it at the start of every unit and appends to it when discovering recurring issues, non-obvious patterns, or rules that future sessions should follow. This gives auto-mode cross-session memory that survives context window boundaries. +SF maintains a `KNOWLEDGE.md` file — an append-only register of project-specific rules, patterns, and lessons learned. The agent reads it at the start of every unit and appends to it when discovering recurring issues, non-obvious patterns, or rules that future sessions should follow. This gives auto-mode cross-session memory that survives context window boundaries. ### Context Pressure Monitor (v2.26) -When context usage reaches 70%, GSD sends a wrap-up signal to the agent, nudging it to finish durable output (commit, write summaries) before the context window fills. This prevents sessions from hitting the hard context limit mid-task with no artifacts written. +When context usage reaches 70%, SF sends a wrap-up signal to the agent, nudging it to finish durable output (commit, write summaries) before the context window fills. This prevents sessions from hitting the hard context limit mid-task with no artifacts written. ### Meaningful Commit Messages (v2.26) @@ -89,13 +89,13 @@ Commits are generated from task summaries — not generic "complete task" messag ### Stuck Detection (v2.39) -GSD uses a sliding-window analysis to detect stuck loops. Instead of a simple "same unit dispatched twice" counter, the detector examines recent dispatch history for repeated patterns — catching cycles like A→B→A→B as well as single-unit repeats. On detection, GSD retries once with a deep diagnostic prompt. If it fails again, auto mode stops with the exact file it expected, so you can intervene. +SF uses a sliding-window analysis to detect stuck loops. Instead of a simple "same unit dispatched twice" counter, the detector examines recent dispatch history for repeated patterns — catching cycles like A→B→A→B as well as single-unit repeats. On detection, SF retries once with a deep diagnostic prompt. If it fails again, auto mode stops with the exact file it expected, so you can intervene. The sliding-window approach reduces false positives on legitimate retries (e.g., verification failures that self-correct) while catching genuine stuck loops faster. ### Post-Mortem Investigation (v2.40) -`/gsd forensics` is a full-access GSD debugger for post-mortem analysis of auto-mode failures. It provides: +`/gsd forensics` is a full-access SF debugger for post-mortem analysis of auto-mode failures. It provides: - **Anomaly detection** — structured identification of stuck loops, cost spikes, timeouts, missing artifacts, and crashes with severity levels - **Unit traces** — last 10 unit executions with error details and execution times @@ -164,7 +164,7 @@ Auto-mode pauses before each slice, presenting the slice context for discussion. ### HTML Reports (v2.26) -After a milestone completes, GSD auto-generates a self-contained HTML report in `.gsd/reports/`. Reports include project summary, progress tree, slice dependency graph (SVG DAG), cost/token metrics with bar charts, execution timeline, changelog, and knowledge base. No external dependencies — all CSS and JS are inlined. +After a milestone completes, SF auto-generates a self-contained HTML report in `.gsd/reports/`. Reports include project summary, progress tree, slice dependency graph (SVG DAG), cost/token metrics with bar charts, execution timeline, changelog, and knowledge base. No external dependencies — all CSS and JS are inlined. ```yaml auto_report: true # enabled by default @@ -290,7 +290,7 @@ When enabled, auto-mode automatically selects cheaper models for simple units (s ## Reactive Task Execution (v2.38) -When `reactive_execution: true` is set in preferences, GSD derives a dependency graph from IO annotations in task plans. Tasks that don't conflict (no shared file reads/writes) are dispatched in parallel via subagents, while dependent tasks wait for their predecessors to complete. +When `reactive_execution: true` is set in preferences, SF derives a dependency graph from IO annotations in task plans. Tasks that don't conflict (no shared file reads/writes) are dispatched in parallel via subagents, while dependent tasks wait for their predecessors to complete. ```yaml reactive_execution: true # disabled by default diff --git a/docs/user-docs/captures-triage.md b/docs/user-docs/captures-triage.md index 1c5f7e3f7..a5913b9e0 100644 --- a/docs/user-docs/captures-triage.md +++ b/docs/user-docs/captures-triage.md @@ -2,7 +2,7 @@ *Introduced in v2.19.0* -Captures let you fire-and-forget thoughts during auto-mode execution. Instead of pausing auto-mode to steer, you can capture ideas, bugs, or scope changes and let GSD triage them at natural seams between tasks. +Captures let you fire-and-forget thoughts during auto-mode execution. Instead of pausing auto-mode to steer, you can capture ideas, bugs, or scope changes and let SF triage them at natural seams between tasks. ## Quick Start @@ -24,7 +24,7 @@ capture → triage → confirm → resolve → resume ``` 1. **Capture** — `/gsd capture "thought"` appends to `.gsd/CAPTURES.md` with a timestamp and unique ID -2. **Triage** — at natural seams between tasks (in `handleAgentEnd`), GSD detects pending captures and classifies them +2. **Triage** — at natural seams between tasks (in `handleAgentEnd`), SF detects pending captures and classifies them 3. **Confirm** — the user is shown the proposed resolution and confirms or adjusts 4. **Resolve** — the resolution is applied (task injection, replan trigger, deferral, etc.) 5. **Resume** — auto-mode continues diff --git a/docs/user-docs/claude-code-auth-compliance.md b/docs/user-docs/claude-code-auth-compliance.md index 0c6b77466..1707878cb 100644 --- a/docs/user-docs/claude-code-auth-compliance.md +++ b/docs/user-docs/claude-code-auth-compliance.md @@ -13,9 +13,9 @@ Anthropic's current public guidance draws a hard line: For GSD2, the safe path is: 1. Treat local Claude Code as an external authenticated runtime. -2. Never ask GSD users to sign into Claude subscriptions through GSD-managed Anthropic OAuth. -3. Never exchange Claude.ai subscription OAuth into a bearer token and call Anthropic APIs as if GSD were Claude Code. -4. If GSD needs direct Anthropic API access, require a Claude Console API key, Bedrock, Vertex, or another explicitly supported provider path. +2. Never ask SF users to sign into Claude subscriptions through SF-managed Anthropic OAuth. +3. Never exchange Claude.ai subscription OAuth into a bearer token and call Anthropic APIs as if SF were Claude Code. +4. If SF needs direct Anthropic API access, require a Claude Console API key, Bedrock, Vertex, or another explicitly supported provider path. ## What Anthropic Explicitly Allows @@ -67,9 +67,9 @@ Anthropic's consumer terms add two more constraints: Implication for GSD2: -- A GSD-managed Anthropic OAuth flow for subscription accounts is high risk. -- Reusing user Claude subscription credentials inside GSD's own API client is high risk. -- Any flow that makes Anthropic believe requests come from Claude Code when they actually come from GSD infrastructure is out of bounds. +- A SF-managed Anthropic OAuth flow for subscription accounts is high risk. +- Reusing user Claude subscription credentials inside SF's own API client is high risk. +- Any flow that makes Anthropic believe requests come from Claude Code when they actually come from SF infrastructure is out of bounds. ## Current GSD2 Findings @@ -84,7 +84,7 @@ Implication for GSD2: - `src/cli.ts` Migrates users from `anthropic` to `claude-code` when the local CLI is available. -These are directionally correct because GSD is using the user's own local Claude Code installation as the authenticated Anthropic surface. +These are directionally correct because SF is using the user's own local Claude Code installation as the authenticated Anthropic surface. ### Medium/high-risk pieces — RESOLVED @@ -106,7 +106,7 @@ Adopt this as the repo rule: - other Anthropic-documented native flows - GSD2 must not implement its own Anthropic subscription OAuth flow for end users. - GSD2 must not persist Anthropic subscription OAuth tokens for later API use. -- GSD2 must not send Anthropic API traffic using subscription OAuth tokens obtained by GSD. +- GSD2 must not send Anthropic API traffic using subscription OAuth tokens obtained by SF. - GSD2 may support Anthropic direct access only via: - `ANTHROPIC_API_KEY` - Claude Console API keys stored in auth storage @@ -122,8 +122,8 @@ Adopt this as the repo rule: 2. Change web onboarding so Anthropic is API-key only. 3. Keep `claude-code` as the recommended path when `claude auth status` succeeds. 4. Add explicit UI copy: - - "Claude subscription users: sign into the local Claude Code app/CLI, not GSD." -5. Block migrations or code paths that convert Anthropic OAuth credentials into API auth for GSD-managed requests. + - "Claude subscription users: sign into the local Claude Code app/CLI, not SF." +5. Block migrations or code paths that convert Anthropic OAuth credentials into API auth for SF-managed requests. This is the fastest path to align the repo with Anthropic's published guidance. @@ -159,10 +159,10 @@ This is the best long-term UX because it separates: If a proposed GSD2 feature needs Anthropic access, ask one question: -"Is GSD calling Anthropic as GSD, or is GSD delegating to the user's already-authenticated local Claude Code runtime?" +"Is SF calling Anthropic as SF, or is SF delegating to the user's already-authenticated local Claude Code runtime?" -- If GSD is calling Anthropic as GSD: require API key or supported cloud auth. -- If GSD is delegating to local Claude Code: acceptable, as long as GSD does not intercept, mint, or replay subscription credentials itself. +- If SF is calling Anthropic as SF: require API key or supported cloud auth. +- If SF is delegating to local Claude Code: acceptable, as long as SF does not intercept, mint, or replay subscription credentials itself. ## Sources Reviewed diff --git a/docs/user-docs/commands.md b/docs/user-docs/commands.md index 1ed935f8b..85b14c8e0 100644 --- a/docs/user-docs/commands.md +++ b/docs/user-docs/commands.md @@ -7,7 +7,7 @@ | `/gsd` | Step mode — execute one unit at a time, pause between each | | `/gsd next` | Explicit step mode (same as `/gsd`) | | `/gsd auto` | Autonomous mode — research, plan, execute, commit, repeat | -| `/gsd quick` | Execute a quick task with GSD guarantees (atomic commits, state tracking) without full planning overhead | +| `/gsd quick` | Execute a quick task with SF guarantees (atomic commits, state tracking) without full planning overhead | | `/gsd stop` | Stop auto mode gracefully | | `/gsd pause` | Pause auto-mode (preserves state, `/gsd auto` to resume) | | `/gsd steer` | Hard-steer plan documents during execution | @@ -19,19 +19,19 @@ | `/gsd triage` | Manually trigger triage of pending captures | | `/gsd dispatch` | Dispatch a specific phase directly (research, plan, execute, complete, reassess, uat, replan) | | `/gsd history` | View execution history (supports `--cost`, `--phase`, `--model` filters) | -| `/gsd forensics` | Full-access GSD debugger — structured anomaly detection, unit traces, and LLM-guided root-cause analysis for auto-mode failures | -| `/gsd cleanup` | Clean up GSD state files and stale worktrees | +| `/gsd forensics` | Full-access SF debugger — structured anomaly detection, unit traces, and LLM-guided root-cause analysis for auto-mode failures | +| `/gsd cleanup` | Clean up SF state files and stale worktrees | | `/gsd visualize` | Open workflow visualizer (progress, deps, metrics, timeline) | | `/gsd export --html` | Generate self-contained HTML report for current or completed milestone | | `/gsd export --html --all` | Generate retrospective reports for all milestones at once | -| `/gsd update` | Update GSD to the latest version in-session | +| `/gsd update` | Update SF to the latest version in-session | | `/gsd knowledge` | Add persistent project knowledge (rule, pattern, or lesson) | | `/gsd fast` | Toggle service tier for supported models (prioritized API routing) | | `/gsd rate` | Rate last unit's model tier (over/ok/under) — improves adaptive routing | | `/gsd changelog` | Show categorized release notes | | `/gsd logs` | Browse activity logs, debug logs, and metrics | | `/gsd remote` | Control remote auto-mode | -| `/gsd help` | Categorized command reference with descriptions for all GSD subcommands | +| `/gsd help` | Categorized command reference with descriptions for all SF subcommands | ## Configuration & Diagnostics @@ -140,7 +140,7 @@ Enable with `github.enabled: true` in preferences. Requires `gh` CLI installed a |---------|-------------| | `/clear` | Start a new session (alias for `/new`) | | `/exit` | Graceful shutdown — saves session state before exiting | -| `/kill` | Kill GSD process immediately | +| `/kill` | Kill SF process immediately | | `/model` | Switch the active model | | `/login` | Log in to an LLM provider | | `/thinking` | Toggle thinking level during sessions | @@ -181,7 +181,7 @@ Enable with `github.enabled: true` in preferences. Requires `gh` CLI installed a | `gsd sessions` | Interactive session picker — list all saved sessions for the current directory and choose one to resume | | `gsd --debug` | Enable structured JSONL diagnostic logging for troubleshooting dispatch and state issues | | `gsd config` | Set up global API keys for search and docs tools (saved to `~/.gsd/agent/auth.json`, applies to all projects). See [Global API Keys](./configuration.md#global-api-keys-gsd-config). | -| `gsd update` | Update GSD to the latest version | +| `gsd update` | Update SF to the latest version | | `gsd headless new-milestone` | Create a new milestone from a context file (headless — no TUI required) | ## Headless Mode @@ -230,7 +230,7 @@ Any `/gsd` subcommand works as a positional argument — `gsd headless status`, ### `gsd headless query` -Returns a single JSON object with the full project snapshot — no LLM session, no RPC child, instant response (~50ms). This is the recommended way for orchestrators and scripts to inspect GSD state. +Returns a single JSON object with the full project snapshot — no LLM session, no RPC child, instant response (~50ms). This is the recommended way for orchestrators and scripts to inspect SF state. ```bash gsd headless query | jq '.state.phase' @@ -270,24 +270,24 @@ gsd headless query | jq '.cost.total' ## MCP Server Mode -`gsd --mode mcp` runs GSD as a [Model Context Protocol](https://modelcontextprotocol.io) server over stdin/stdout. This exposes all GSD tools (read, write, edit, bash, etc.) to external AI clients — Claude Desktop, VS Code Copilot, and any MCP-compatible host. +`gsd --mode mcp` runs SF as a [Model Context Protocol](https://modelcontextprotocol.io) server over stdin/stdout. This exposes all SF tools (read, write, edit, bash, etc.) to external AI clients — Claude Desktop, VS Code Copilot, and any MCP-compatible host. ```bash -# Start GSD as an MCP server +# Start SF as an MCP server gsd --mode mcp ``` -The server registers all tools from the agent session and maps MCP `tools/list` and `tools/call` requests to GSD tool definitions. It runs until the transport closes. +The server registers all tools from the agent session and maps MCP `tools/list` and `tools/call` requests to SF tool definitions. It runs until the transport closes. ## In-Session Update -`/gsd update` checks npm for a newer version of GSD and installs it without leaving the session. +`/gsd update` checks npm for a newer version of SF and installs it without leaving the session. ```bash /gsd update # Current version: v2.36.0 # Checking npm registry... -# Updated to v2.37.0. Restart GSD to use the new version. +# Updated to v2.37.0. Restart SF to use the new version. ``` If already up to date, it reports so and takes no action. diff --git a/docs/user-docs/configuration.md b/docs/user-docs/configuration.md index b3e873e72..151f1e4d1 100644 --- a/docs/user-docs/configuration.md +++ b/docs/user-docs/configuration.md @@ -1,6 +1,6 @@ # Configuration -GSD preferences live in `~/.gsd/PREFERENCES.md` (global) or `.gsd/PREFERENCES.md` (project-local). Manage interactively with `/gsd prefs`. +SF preferences live in `~/.gsd/PREFERENCES.md` (global) or `.gsd/PREFERENCES.md` (project-local). Manage interactively with `/gsd prefs`. ## `/gsd prefs` Commands @@ -12,7 +12,7 @@ GSD preferences live in `~/.gsd/PREFERENCES.md` (global) or `.gsd/PREFERENCES.md | `/gsd prefs status` | Show current preference files, merged values, and skill resolution status | | `/gsd prefs wizard` | Alias for `/gsd prefs global` | | `/gsd prefs setup` | Alias for `/gsd prefs wizard` — creates preferences file if missing | -| `/gsd prefs import-claude` | Import Claude marketplace plugins and skills as namespaced GSD components | +| `/gsd prefs import-claude` | Import Claude marketplace plugins and skills as namespaced SF components | | `/gsd prefs import-claude global` | Import to global scope | | `/gsd prefs import-claude project` | Import to project scope | @@ -78,11 +78,11 @@ This opens an interactive wizard showing which keys are configured and which are ## MCP Servers -GSD can connect to external MCP servers configured in project files. This is useful for local tools, internal APIs, self-hosted services, or integrations that aren't built in as native GSD extensions. +SF can connect to external MCP servers configured in project files. This is useful for local tools, internal APIs, self-hosted services, or integrations that aren't built in as native SF extensions. ### Config file locations -GSD reads MCP client configuration from these project-local paths: +SF reads MCP client configuration from these project-local paths: - `.mcp.json` - `.gsd/mcp.json` @@ -130,7 +130,7 @@ If both files exist, server names are merged and the first definition found wins ### Verifying a server -After adding config, verify it from a GSD session: +After adding config, verify it from a SF session: ```text mcp_servers @@ -140,7 +140,7 @@ mcp_call(server="my-server", tool="", args={...}) Recommended verification order: -1. `mcp_servers` — confirms GSD can see the config file and parse the server entry +1. `mcp_servers` — confirms SF can see the config file and parse the server entry 2. `mcp_discover` — confirms the server process starts and responds to `tools/list` 3. `mcp_call` — confirms at least one real tool invocation works @@ -148,7 +148,7 @@ Recommended verification order: - Use absolute paths for local executables and scripts when possible. - For `stdio` servers, prefer setting required environment variables directly in the MCP config instead of relying on an interactive shell profile. -- GSD and `gsd-mcp-server` both hydrate supported model and tool keys saved in `~/.gsd/agent/auth.json`, so MCP configs can safely reference them through `${ENV_VAR}` placeholders without committing raw credentials. +- SF and `gsd-mcp-server` both hydrate supported model and tool keys saved in `~/.gsd/agent/auth.json`, so MCP configs can safely reference them through `${ENV_VAR}` placeholders without committing raw credentials. - If a server is team-shared and safe to commit, `.mcp.json` is usually the better home. - If a server depends on machine-local paths, personal services, or local-only secrets, prefer `.gsd/mcp.json`. @@ -156,12 +156,12 @@ Recommended verification order: | Variable | Default | Description | |----------|---------|-------------| -| `GSD_HOME` | `~/.gsd` | Global GSD directory. All paths derive from this unless individually overridden. Affects preferences, skills, sessions, and per-project state. (v2.39) | -| `GSD_PROJECT_ID` | (auto-hash) | Override the automatic project identity hash. Per-project state goes to `$GSD_HOME/projects//` instead of the computed hash. Useful for CI/CD or sharing state across clones of the same repo. (v2.39) | -| `GSD_STATE_DIR` | `$GSD_HOME` | Per-project state root. Controls where `projects//` directories are created. Takes precedence over `GSD_HOME` for project state. | -| `GSD_CODING_AGENT_DIR` | `$GSD_HOME/agent` | Agent directory containing managed resources, extensions, and auth. Takes precedence over `GSD_HOME` for agent paths. | -| `GSD_ALLOWED_COMMAND_PREFIXES` | (built-in list) | Comma-separated command prefixes allowed for `!command` value resolution. Overrides `allowedCommandPrefixes` in settings.json. See [Custom Models — Command Allowlist](custom-models.md#command-allowlist). | -| `GSD_FETCH_ALLOWED_URLS` | (none) | Comma-separated hostnames exempted from `fetch_page` URL blocking. Overrides `fetchAllowedUrls` in settings.json. See [URL Blocking](#url-blocking-fetch_page). | +| `SF_HOME` | `~/.gsd` | Global SF directory. All paths derive from this unless individually overridden. Affects preferences, skills, sessions, and per-project state. (v2.39) | +| `SF_PROJECT_ID` | (auto-hash) | Override the automatic project identity hash. Per-project state goes to `$SF_HOME/projects//` instead of the computed hash. Useful for CI/CD or sharing state across clones of the same repo. (v2.39) | +| `SF_STATE_DIR` | `$SF_HOME` | Per-project state root. Controls where `projects//` directories are created. Takes precedence over `SF_HOME` for project state. | +| `SF_CODING_AGENT_DIR` | `$SF_HOME/agent` | Agent directory containing managed resources, extensions, and auth. Takes precedence over `SF_HOME` for agent paths. | +| `SF_ALLOWED_COMMAND_PREFIXES` | (built-in list) | Comma-separated command prefixes allowed for `!command` value resolution. Overrides `allowedCommandPrefixes` in settings.json. See [Custom Models — Command Allowlist](custom-models.md#command-allowlist). | +| `SF_FETCH_ALLOWED_URLS` | (none) | Comma-separated hostnames exempted from `fetch_page` URL blocking. Overrides `fetchAllowedUrls` in settings.json. See [URL Blocking](#url-blocking-fetch_page). | ## All Settings @@ -193,8 +193,8 @@ models: Define custom models and providers in `~/.gsd/agent/models.json`. This lets you add models not included in the default registry — useful for self-hosted endpoints (Ollama, vLLM, LM Studio), fine-tuned models, proxies, or new provider releases. -GSD resolves models.json with fallback logic: -1. `~/.gsd/agent/models.json` — primary (GSD) +SF resolves models.json with fallback logic: +1. `~/.gsd/agent/models.json` — primary (SF) 2. `~/.pi/agent/models.json` — fallback (Pi) 3. If neither exists, creates `~/.gsd/agent/models.json` @@ -232,11 +232,11 @@ models: provider: bedrock # optional: target a specific provider ``` -When a model fails to switch (provider unavailable, rate limited, credits exhausted), GSD automatically tries the next model in the `fallbacks` list. +When a model fails to switch (provider unavailable, rate limited, credits exhausted), SF automatically tries the next model in the `fallbacks` list. ### Community Provider Extensions -For providers not built into GSD, community extensions can add full provider support with proper model definitions, thinking format configuration, and interactive API key setup. +For providers not built into SF, community extensions can add full provider support with proper model definitions, thinking format configuration, and interactive API key setup. | Extension | Provider | Models | Install | |-----------|----------|--------|---------| @@ -275,7 +275,7 @@ These are usually set automatically by `token_profile`, but can be overridden ex ### `skill_discovery` -Controls how GSD finds and applies skills during auto mode. +Controls how SF finds and applies skills during auto mode. | Value | Behavior | |-------|----------| @@ -376,10 +376,10 @@ If you need the agent to fetch from internal URLs (self-hosted docs, internal AP } ``` -Alternatively, set the `GSD_FETCH_ALLOWED_URLS` environment variable (comma-separated). The env var takes precedence over settings.json: +Alternatively, set the `SF_FETCH_ALLOWED_URLS` environment variable (comma-separated). The env var takes precedence over settings.json: ```bash -export GSD_FETCH_ALLOWED_URLS="internal-docs.company.com,192.168.1.50" +export SF_FETCH_ALLOWED_URLS="internal-docs.company.com,192.168.1.50" ``` Allowed hostnames bypass the blocklist checks. The protocol restriction (HTTP/HTTPS only) still applies — `file://` and `ftp://` cannot be allowlisted. @@ -421,7 +421,7 @@ git: merge_strategy: squash # how worktree branches merge: "squash" or "merge" isolation: worktree # git isolation: "worktree", "branch", or "none" commit_docs: true # commit .gsd/ artifacts to git (set false to keep local) - manage_gitignore: true # set false to prevent GSD from modifying .gitignore + manage_gitignore: true # set false to prevent SF from modifying .gitignore worktree_post_create: .gsd/hooks/post-worktree-create # script to run after worktree creation auto_pr: false # create a PR on milestone completion (requires push_branches) pr_target_branch: develop # target branch for auto-created PRs (default: main branch) @@ -439,7 +439,7 @@ git: | `merge_strategy` | string | `"squash"` | How worktree branches merge: `"squash"` (combine all commits) or `"merge"` (preserve individual commits) | | `isolation` | string | `"worktree"` | Auto-mode isolation: `"worktree"` (separate directory), `"branch"` (work in project root — useful for submodule-heavy repos), or `"none"` (no isolation — commits on current branch, no worktree or milestone branch) | | `commit_docs` | boolean | `true` | Commit `.gsd/` planning artifacts to git. Set `false` to keep local-only | -| `manage_gitignore` | boolean | `true` | When `false`, GSD will not modify `.gitignore` at all — no baseline patterns, no self-healing. Use if you manage your own `.gitignore` | +| `manage_gitignore` | boolean | `true` | When `false`, SF will not modify `.gitignore` at all — no baseline patterns, no self-healing. Use if you manage your own `.gitignore` | | `worktree_post_create` | string | (none) | Script to run after worktree creation. Receives `SOURCE_DIR` and `WORKTREE_DIR` env vars | | `auto_pr` | boolean | `false` | Automatically create a pull request when a milestone completes. Requires `auto_push: true` and `gh` CLI installed and authenticated | | `pr_target_branch` | string | (main branch) | Target branch for auto-created PRs (e.g. `develop`, `qa`). Defaults to `main_branch` if not set | @@ -467,7 +467,7 @@ cp "$SOURCE_DIR/.env.local" "$WORKTREE_DIR/.env.local" 2>/dev/null || true ln -sf "$SOURCE_DIR/assets" "$WORKTREE_DIR/assets" ``` -The path can be absolute or relative to the project root. The script runs with a 30-second timeout. Failure is non-fatal — GSD logs a warning and continues. +The path can be absolute or relative to the project root. The script runs with a 30-second timeout. Failure is non-fatal — SF logs a warning and continues. #### `git.auto_pr` @@ -485,16 +485,16 @@ git: - [`gh` CLI](https://cli.github.com/) installed and authenticated (`gh auth login`) **How it works:** -1. Milestone completes → GSD squash-merges the worktree to the main branch +1. Milestone completes → SF squash-merges the worktree to the main branch 2. Pushes the main branch to remote (if `auto_push: true`) 3. Pushes the milestone branch to remote 4. Creates a PR from the milestone branch to `pr_target_branch` via `gh pr create` -If `pr_target_branch` is not set, the PR targets the `main_branch` (or auto-detected main branch). PR creation failure is non-fatal — GSD logs and continues. +If `pr_target_branch` is not set, the PR targets the `main_branch` (or auto-detected main branch). PR creation failure is non-fatal — SF logs and continues. ### `github` (v2.39) -GitHub sync configuration. When enabled, GSD auto-syncs milestones, slices, and tasks to GitHub Issues, PRs, and Milestones. +GitHub sync configuration. When enabled, SF auto-syncs milestones, slices, and tasks to GitHub Issues, PRs, and Milestones. ```yaml github: @@ -522,7 +522,7 @@ github: ### `notifications` -Control what notifications GSD sends during auto mode: +Control what notifications SF sends during auto mode: ```yaml notifications: @@ -534,7 +534,7 @@ notifications: on_attention: true # notify when manual attention needed ``` -**macOS delivery:** GSD uses [`terminal-notifier`](https://github.com/julienXX/terminal-notifier) when available, falling back to `osascript`. We recommend installing `terminal-notifier` for reliable notification delivery: +**macOS delivery:** SF uses [`terminal-notifier`](https://github.com/julienXX/terminal-notifier) when available, falling back to `osascript`. We recommend installing `terminal-notifier` for reliable notification delivery: ```bash brew install terminal-notifier diff --git a/docs/user-docs/cost-management.md b/docs/user-docs/cost-management.md index 06214590d..d835a12a5 100644 --- a/docs/user-docs/cost-management.md +++ b/docs/user-docs/cost-management.md @@ -1,6 +1,6 @@ # Cost Management -GSD tracks token usage and cost for every unit of work dispatched during auto mode. This data powers the dashboard, budget enforcement, and cost projections. +SF tracks token usage and cost for every unit of work dispatched during auto mode. This data powers the dashboard, budget enforcement, and cost projections. ## Cost Tracking @@ -51,7 +51,7 @@ budget_enforcement: pause # default when ceiling is set ## Cost Projections -Once at least two slices have completed, GSD projects the remaining cost: +Once at least two slices have completed, SF projects the remaining cost: ``` Projected remaining: $12.40 ($6.20/slice avg × 2 remaining) diff --git a/docs/user-docs/custom-models.md b/docs/user-docs/custom-models.md index 76e949676..81012bb3d 100644 --- a/docs/user-docs/custom-models.md +++ b/docs/user-docs/custom-models.md @@ -35,7 +35,7 @@ For local models (Ollama, LM Studio, vLLM), only `id` is required per model: The `apiKey` is required but Ollama ignores it, so any value works. -Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so GSD sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too. +Some OpenAI-compatible servers do not understand the `developer` role used for reasoning-capable models. For those providers, set `compat.supportsDeveloperRole` to `false` so SF sends the system prompt as a `system` message instead. If the server also does not support `reasoning_effort`, set `compat.supportsReasoningEffort` to `false` too. You can set `compat` at the provider level to apply to all models, or at the model level to override a specific model. This commonly applies to Ollama, vLLM, SGLang, and similar OpenAI-compatible servers. @@ -153,10 +153,10 @@ If you use a credential tool not on the default list, override it in global sett This replaces the default list entirely — include any defaults you still want. -Alternatively, set the `GSD_ALLOWED_COMMAND_PREFIXES` environment variable (comma-separated). The env var takes precedence over settings.json: +Alternatively, set the `SF_ALLOWED_COMMAND_PREFIXES` environment variable (comma-separated). The env var takes precedence over settings.json: ```bash -export GSD_ALLOWED_COMMAND_PREFIXES="pass,op,sops,doppler" +export SF_ALLOWED_COMMAND_PREFIXES="pass,op,sops,doppler" ``` > **Note:** This setting is global-only. Project-level settings.json (`/.gsd/settings.json`) cannot override the command allowlist — this prevents a cloned repo from escalating command execution privileges. @@ -294,7 +294,7 @@ For providers with partial OpenAI compatibility, use the `compat` field. | `supportsStore` | Provider supports `store` field | | `supportsDeveloperRole` | Use `developer` vs `system` role | | `supportsReasoningEffort` | Support for `reasoning_effort` parameter | -| `reasoningEffortMap` | Map GSD thinking levels to provider-specific `reasoning_effort` values | +| `reasoningEffortMap` | Map SF thinking levels to provider-specific `reasoning_effort` values | | `supportsUsageInStreaming` | Supports `stream_options: { include_usage: true }` (default: `true`) | | `maxTokensField` | Use `max_completion_tokens` or `max_tokens` | | `requiresToolResultName` | Include `name` on tool result messages | diff --git a/docs/user-docs/getting-started.md b/docs/user-docs/getting-started.md index 786c07e7a..d5edc2300 100644 --- a/docs/user-docs/getting-started.md +++ b/docs/user-docs/getting-started.md @@ -1,6 +1,6 @@ -# Getting Started with GSD +# Getting Started with SF -GSD is an AI coding agent that handles planning, execution, verification, and shipping so you can focus on what to build. This guide walks you through installation on macOS, Windows, and Linux, then gets you running your first session. +SF is an AI coding agent that handles planning, execution, verification, and shipping so you can focus on what to build. This guide walks you through installation on macOS, Windows, and Linux, then gets you running your first session. --- @@ -41,10 +41,10 @@ node --version # should print v22.x or higher git --version # should print 2.20+ ``` -**Step 4 — Install GSD:** +**Step 4 — Install SF:** ```bash -npm install -g gsd-pi +npm install -g sf-run ``` **Step 5 — Set up your LLM provider:** @@ -66,7 +66,7 @@ source ~/.zshrc See [Provider Setup Guide](./providers.md) for all 20+ supported providers. -**Step 6 — Launch GSD:** +**Step 6 — Launch SF:** ```bash cd ~/my-project # navigate to any project @@ -113,10 +113,10 @@ node --version # should print v22.x or higher git --version # should print 2.20+ ``` -**Step 4 — Install GSD:** +**Step 4 — Install SF:** ```powershell -npm install -g gsd-pi +npm install -g sf-run ``` **Step 5 — Set up your LLM provider:** @@ -137,7 +137,7 @@ To persist the key permanently, add it via System Settings > Environment Variabl See [Provider Setup Guide](./providers.md) for all 20+ supported providers. -**Step 6 — Launch GSD:** +**Step 6 — Launch SF:** ```powershell cd C:\Users\you\my-project # navigate to any project @@ -217,10 +217,10 @@ node --version # should print v22.x or higher git --version # should print 2.20+ ``` -**Step 3 — Install GSD:** +**Step 3 — Install SF:** ```bash -npm install -g gsd-pi +npm install -g sf-run ``` **Step 4 — Set up your LLM provider:** @@ -242,7 +242,7 @@ source ~/.bashrc See [Provider Setup Guide](./providers.md) for all 20+ supported providers. -**Step 5 — Launch GSD:** +**Step 5 — Launch SF:** ```bash cd ~/my-project # navigate to any project @@ -263,7 +263,7 @@ Inside the session, type `/model` to confirm your LLM is connected. > npm config set prefix '~/.npm-global' > echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc > source ~/.bashrc -> npm install -g gsd-pi +> npm install -g sf-run > ``` --- @@ -272,11 +272,11 @@ Inside the session, type `/model` to confirm your LLM is connected. > **Downloads:** [Docker Desktop](https://www.docker.com/products/docker-desktop/) -Run GSD in an isolated sandbox without installing Node.js on your host. +Run SF in an isolated sandbox without installing Node.js on your host. **Step 1 — Install Docker Desktop** (4.58+ required). -**Step 2 — Clone the GSD repo:** +**Step 2 — Clone the SF repo:** ```bash git clone https://github.com/singularity-forge/sf-run.git @@ -290,7 +290,7 @@ docker sandbox create --template . --name gsd-sandbox docker sandbox exec -it gsd-sandbox bash ``` -**Step 4 — Set your API key and run GSD:** +**Step 4 — Set your API key and run SF:** ```bash export ANTHROPIC_API_KEY="sk-ant-..." @@ -305,7 +305,7 @@ See [Docker Sandbox docs](../../docker/README.md) for full configuration, resour ### Choose a Model -GSD auto-selects a default model after provider setup. Switch anytime inside a session: +SF auto-selects a default model after provider setup. Switch anytime inside a session: ``` /model @@ -319,7 +319,7 @@ Or configure per-phase models in preferences — see [Configuration](./configura ### Step Mode — `/gsd` -Type `/gsd` inside a session. GSD executes one unit of work at a time, pausing between each with a wizard showing what completed and what's next. +Type `/gsd` inside a session. SF executes one unit of work at a time, pausing between each with a wizard showing what completed and what's next. - **No `.gsd/` directory** — starts a discussion flow to capture your project vision - **Milestone exists, no roadmap** — discuss or research the milestone @@ -330,7 +330,7 @@ Step mode keeps you in the loop, reviewing output between each step. ### Auto Mode — `/gsd auto` -Type `/gsd auto` and walk away. GSD autonomously researches, plans, executes, verifies, commits, and advances through every slice until the milestone is complete. +Type `/gsd auto` and walk away. SF autonomously researches, plans, executes, verifies, commits, and advances through every slice until the milestone is complete. ``` /gsd auto @@ -364,7 +364,7 @@ Both terminals read and write the same `.gsd/` files. Decisions in terminal 2 ar --- -## How GSD Organizes Work +## How SF Organizes Work ``` Milestone → a shippable version (4-10 slices) @@ -396,19 +396,19 @@ All state lives on disk in `.gsd/`: ## VS Code Extension -GSD is also available as a VS Code extension. Install from the marketplace (publisher: FluxLabs) or search for "GSD" in VS Code extensions: +SF is also available as a VS Code extension. Install from the marketplace (publisher: FluxLabs) or search for "SF" in VS Code extensions: - **`@gsd` chat participant** — talk to the agent in VS Code Chat - **Sidebar dashboard** — connection status, model info, token usage - **Full command palette** — start/stop agent, switch models, export sessions -The CLI (`gsd-pi`) must be installed first — the extension connects to it via RPC. +The CLI (`sf-run`) must be installed first — the extension connects to it via RPC. --- ## Web Interface -GSD has a browser-based interface for visual project management: +SF has a browser-based interface for visual project management: ```bash gsd --web @@ -434,12 +434,12 @@ gsd sessions --- -## Updating GSD +## Updating SF -GSD checks for updates every 24 hours and prompts at startup. You can also update manually: +SF checks for updates every 24 hours and prompts at startup. You can also update manually: ```bash -npm update -g gsd-pi +npm update -g sf-run ``` Or from within a session: diff --git a/docs/user-docs/git-strategy.md b/docs/user-docs/git-strategy.md index c8274b7d0..a1d0c075c 100644 --- a/docs/user-docs/git-strategy.md +++ b/docs/user-docs/git-strategy.md @@ -1,10 +1,10 @@ # Git Strategy -GSD uses git for milestone isolation and sequential commits within each milestone. You choose an **isolation mode** that controls where work happens. The strategy is fully automated — you don't need to manage branches manually. +SF uses git for milestone isolation and sequential commits within each milestone. You choose an **isolation mode** that controls where work happens. The strategy is fully automated — you don't need to manage branches manually. ## Isolation Modes -GSD supports three isolation modes, configured via the `git.isolation` preference: +SF supports three isolation modes, configured via the `git.isolation` preference: | Mode | Working Directory | Branch | Best For | |------|-------------------|--------|----------| @@ -26,7 +26,7 @@ Use this when worktrees cause problems — submodule-heavy repos, repos with har ### `none` Mode -Work happens directly on your current branch. No worktree, no milestone branch. GSD still commits sequentially with conventional commit messages, but there's no branch isolation. +Work happens directly on your current branch. No worktree, no milestone branch. SF still commits sequentially with conventional commit messages, but there's no branch isolation. Use this for hot-reload workflows where file isolation breaks dev tooling (e.g., file watchers that only see the project root), or for small projects where branch overhead isn't worth it. @@ -75,16 +75,16 @@ Each worktree operates on its own branch with its own commit history. Merges hap ### Commit Format -Commits use conventional commit format with GSD metadata in trailers: +Commits use conventional commit format with SF metadata in trailers: ``` feat: core type definitions -GSD-Task: M001/S01/T01 +SF-Task: M001/S01/T01 feat: markdown parser for plan files -GSD-Task: M001/S01/T02 +SF-Task: M001/S01/T02 ``` ## Worktree Management @@ -156,7 +156,7 @@ git: ### Automatic Pull Requests -For teams using Gitflow or branch-based workflows, GSD can automatically create a pull request when a milestone completes: +For teams using Gitflow or branch-based workflows, SF can automatically create a pull request when a milestone completes: ```yaml git: @@ -170,11 +170,11 @@ This pushes the milestone branch and creates a PR targeting `develop` (or whiche ### `commit_docs: false` -When set to `false`, GSD adds `.gsd/` to `.gitignore` and keeps all planning artifacts local-only. Useful for teams where only some members use GSD, or when company policy requires a clean repository. +When set to `false`, SF adds `.gsd/` to `.gitignore` and keeps all planning artifacts local-only. Useful for teams where only some members use SF, or when company policy requires a clean repository. ## Self-Healing -GSD includes automatic recovery for common git issues: +SF includes automatic recovery for common git issues: - **Detached HEAD** — automatically reattaches to the correct branch - **Stale lock files** — removes `index.lock` files from crashed processes @@ -184,4 +184,4 @@ Run `/gsd doctor` to check git health manually. ## Native Git Operations -Since v2.16, GSD uses libgit2 via native bindings for read-heavy operations in the dispatch hot path. This eliminates ~70 process spawns per dispatch cycle, improving auto-mode throughput. +Since v2.16, SF uses libgit2 via native bindings for read-heavy operations in the dispatch hot path. This eliminates ~70 process spawns per dispatch cycle, improving auto-mode throughput. diff --git a/docs/user-docs/migration.md b/docs/user-docs/migration.md index 8676d1af2..4652074f6 100644 --- a/docs/user-docs/migration.md +++ b/docs/user-docs/migration.md @@ -1,6 +1,6 @@ # Migration from v1 -If you have projects with `.planning` directories from the original Get Shit Done (v1), you can migrate them to GSD-2's `.gsd` format. +If you have projects with `.planning` directories from the original Singularity Forge (v1), you can migrate them to SF's `.gsd` format. ## Running the Migration diff --git a/docs/user-docs/node-lts-macos.md b/docs/user-docs/node-lts-macos.md index 67582aec1..766d78f7c 100644 --- a/docs/user-docs/node-lts-macos.md +++ b/docs/user-docs/node-lts-macos.md @@ -2,7 +2,7 @@ If you installed Node.js via Homebrew (`brew install node`), you're tracking the **latest current release** — which can include odd-numbered development versions (e.g. 23.x, 25.x). These aren't LTS and may have breaking changes or instability. -GSD requires Node.js **v22 or later** and works best on an **LTS (even-numbered) release**. This guide shows how to pin Node 24 LTS using Homebrew. +SF requires Node.js **v22 or later** and works best on an **LTS (even-numbered) release**. This guide shows how to pin Node 24 LTS using Homebrew. ## Check your current version @@ -37,7 +37,7 @@ node --version ## Why pin to LTS? - **Stability** — LTS releases receive bug fixes and security patches for 30 months -- **Compatibility** — npm packages (including GSD) test against LTS versions +- **Compatibility** — npm packages (including SF) test against LTS versions - **No surprises** — `brew upgrade` won't jump you to an unstable development release ## Prevent accidental upgrades @@ -64,12 +64,12 @@ If you need multiple Node versions (e.g. 22 and 24), consider using a version ma These let you set per-project Node versions via `.node-version` or `.nvmrc` files. -## Verify GSD works +## Verify SF works After pinning: ```bash node --version # v24.x.x -npm install -g gsd-pi +npm install -g sf-run gsd --version ``` diff --git a/docs/user-docs/parallel-orchestration.md b/docs/user-docs/parallel-orchestration.md index 40463fa95..a8ab66765 100644 --- a/docs/user-docs/parallel-orchestration.md +++ b/docs/user-docs/parallel-orchestration.md @@ -22,7 +22,7 @@ parallel: /gsd parallel start ``` -GSD scans your milestones, checks dependencies and file overlap, shows an eligibility report, and spawns workers for eligible milestones. +SF scans your milestones, checks dependencies and file overlap, shows an eligibility report, and spawns workers for eligible milestones. 3. Monitor progress: @@ -42,7 +42,7 @@ GSD scans your milestones, checks dependencies and file overlap, shows an eligib ``` ┌─────────────────────────────────────────────────────────┐ -│ Coordinator (your GSD session) │ +│ Coordinator (your SF session) │ │ │ │ Responsibilities: │ │ - Eligibility analysis (deps + file overlap) │ @@ -73,7 +73,7 @@ Each worker is a separate `gsd` process with complete isolation: |----------|-----------------| | **Filesystem** | Git worktree — each worker has its own checkout | | **Git branch** | `milestone/` — one branch per milestone | -| **State derivation** | `GSD_MILESTONE_LOCK` env var — `deriveState()` only sees the assigned milestone | +| **State derivation** | `SF_MILESTONE_LOCK` env var — `deriveState()` only sees the assigned milestone | | **Context window** | Separate process — each worker has its own agent sessions | | **Metrics** | Each worktree has its own `.gsd/metrics.json` | | **Crash recovery** | Each worktree has its own `.gsd/auto.lock` | @@ -88,7 +88,7 @@ Workers and the coordinator communicate through file-based IPC: ## Eligibility Analysis -Before starting parallel execution, GSD checks which milestones can safely run concurrently. +Before starting parallel execution, SF checks which milestones can safely run concurrently. ### Rules @@ -250,8 +250,8 @@ The coordinator runs stale detection during `refreshWorkerStatuses()` and automa | **Feature flag** | `parallel.enabled: false` by default — existing users unaffected | | **Eligibility analysis** | Dependency and file overlap checks before starting | | **Worker isolation** | Separate processes, worktrees, branches, context windows | -| **`GSD_MILESTONE_LOCK`** | Each worker only sees its milestone in state derivation | -| **`GSD_PARALLEL_WORKER`** | Workers cannot spawn nested parallel sessions | +| **`SF_MILESTONE_LOCK`** | Each worker only sees its milestone in state derivation | +| **`SF_PARALLEL_WORKER`** | Workers cannot spawn nested parallel sessions | | **Budget ceiling** | Aggregate cost enforcement across all workers | | **Signal-based shutdown** | Graceful stop via file signals + SIGTERM | | **Doctor integration** | Detects and cleans up orphaned sessions | diff --git a/docs/user-docs/providers.md b/docs/user-docs/providers.md index cfa3df939..819773b12 100644 --- a/docs/user-docs/providers.md +++ b/docs/user-docs/providers.md @@ -1,6 +1,6 @@ # Provider Setup Guide -Step-by-step setup instructions for every LLM provider GSD supports. If you ran the onboarding wizard (`gsd config`) and picked a provider, you may already be configured — check with `/model` inside a session. +Step-by-step setup instructions for every LLM provider SF supports. If you ran the onboarding wizard (`gsd config`) and picked a provider, you may already be configured — check with `/model` inside a session. ## Table of Contents @@ -49,7 +49,7 @@ Step-by-step setup instructions for every LLM provider GSD supports. If you ran ## Built-in Providers -Built-in providers have models pre-registered in GSD. You only need to supply credentials. +Built-in providers have models pre-registered in SF. You only need to supply credentials. ### Anthropic (Claude) @@ -67,28 +67,28 @@ Or run `gsd config` and paste your key when prompted. **Option B — Claude Code CLI:** -If you have a Claude Pro or Max subscription, you can authenticate through Anthropic's official Claude Code CLI. Install it, sign in with `claude`, then GSD will detect and route through it automatically: +If you have a Claude Pro or Max subscription, you can authenticate through Anthropic's official Claude Code CLI. Install it, sign in with `claude`, then SF will detect and route through it automatically: ```bash # Install Claude Code CLI (see https://docs.anthropic.com/en/docs/claude-code) claude -# Sign in when prompted, then start GSD +# Sign in when prompted, then start SF gsd ``` -GSD detects your local Claude Code installation and uses it as the authenticated Anthropic surface. This is the TOS-compliant path for subscription users — GSD never handles your subscription credentials directly. +SF detects your local Claude Code installation and uses it as the authenticated Anthropic surface. This is the TOS-compliant path for subscription users — SF never handles your subscription credentials directly. -> **Note:** GSD does not support browser-based OAuth sign-in for Anthropic. Use an API key or the Claude Code CLI instead. +> **Note:** SF does not support browser-based OAuth sign-in for Anthropic. Use an API key or the Claude Code CLI instead. -**Option C — Use your Claude Pro/Max plan with GSD inside Claude Code:** +**Option C — Use your Claude Pro/Max plan with SF inside Claude Code:** -If you already have a Claude Pro or Max subscription and want to use GSD's planning, execution, and milestone orchestration directly from Claude Code — without switching to a separate terminal — you can connect GSD as an MCP server. This gives Claude Code access to GSD's full workflow toolset via the [Model Context Protocol](https://modelcontextprotocol.io), so you get GSD's structured project management powered by your existing Claude plan. +If you already have a Claude Pro or Max subscription and want to use SF's planning, execution, and milestone orchestration directly from Claude Code — without switching to a separate terminal — you can connect SF as an MCP server. This gives Claude Code access to SF's full workflow toolset via the [Model Context Protocol](https://modelcontextprotocol.io), so you get SF's structured project management powered by your existing Claude plan. **Automatic setup (recommended):** -When GSD detects a Claude Code model during startup, it automatically writes a `.mcp.json` file in your project root with the GSD workflow MCP server configured. No manual steps needed — just start GSD once with Claude Code as the provider and the config is created for you. +When SF detects a Claude Code model during startup, it automatically writes a `.mcp.json` file in your project root with the SF workflow MCP server configured. No manual steps needed — just start SF once with Claude Code as the provider and the config is created for you. -You can also trigger this manually from inside a GSD session: +You can also trigger this manually from inside a SF session: ```bash /gsd mcp init @@ -98,7 +98,7 @@ This writes (or updates) the `gsd-workflow` entry in your project's `.mcp.json`. **Manual setup:** -If you prefer to configure it yourself, add GSD to your project's `.mcp.json`: +If you prefer to configure it yourself, add SF to your project's `.mcp.json`: ```json { @@ -107,7 +107,7 @@ If you prefer to configure it yourself, add GSD to your project's `.mcp.json`: "command": "npx", "args": ["gsd-mcp-server"], "env": { - "GSD_CLI_PATH": "/path/to/gsd" + "SF_CLI_PATH": "/path/to/gsd" } } } @@ -126,15 +126,15 @@ Or if `gsd-mcp-server` is installed globally: } ``` -You can also add this to `~/.claude/settings.json` under `mcpServers` to make GSD available across all projects. +You can also add this to `~/.claude/settings.json` under `mcpServers` to make SF available across all projects. **What's exposed:** -The MCP server provides GSD's full workflow tool surface — milestone planning, task completion, slice management, roadmap reassessment, journal queries, and more. Session management tools (`gsd_execute`, `gsd_status`, `gsd_result`, `gsd_cancel`) let Claude Code start and monitor GSD auto-mode sessions. See [Commands → MCP Server Mode](./commands.md#mcp-server-mode) for the full tool list. +The MCP server provides SF's full workflow tool surface — milestone planning, task completion, slice management, roadmap reassessment, journal queries, and more. Session management tools (`gsd_execute`, `gsd_status`, `gsd_result`, `gsd_cancel`) let Claude Code start and monitor SF auto-mode sessions. See [Commands → MCP Server Mode](./commands.md#mcp-server-mode) for the full tool list. **Verify the connection:** -From inside a GSD session, check that the MCP server is reachable: +From inside a SF session, check that the MCP server is reachable: ```bash /gsd mcp status @@ -176,7 +176,7 @@ Or run `gsd config`, choose "Paste an API key", then "OpenRouter". **Step 3 — Switch to an OpenRouter model:** -Inside a GSD session, type `/model` and select an OpenRouter model. Models are prefixed with `openrouter/` (e.g., `openrouter/anthropic/claude-sonnet-4`). +Inside a SF session, type `/model` and select an OpenRouter model. Models are prefixed with `openrouter/` (e.g., `openrouter/anthropic/claude-sonnet-4`). **Optional — Add custom OpenRouter models via `models.json`:** @@ -205,7 +205,7 @@ If you want models not in the built-in list, add them to `~/.gsd/agent/models.js } ``` -Note: the `apiKey` field here is the *name* of the environment variable, not the literal key. GSD resolves it automatically. You can also use a literal value or a shell command (see [Value Resolution](./custom-models.md#value-resolution)). +Note: the `apiKey` field here is the *name* of the environment variable, not the literal key. SF resolves it automatically. You can also use a literal value or a shell command (see [Value Resolution](./custom-models.md#value-resolution)). **Optional — Route through specific providers:** @@ -304,7 +304,7 @@ export AZURE_OPENAI_API_KEY="..." ## Local Providers -Local providers run on your machine. They require a `models.json` configuration file because GSD needs to know the endpoint URL and which models are available. +Local providers run on your machine. They require a `models.json` configuration file because SF needs to know the endpoint URL and which models are available. **Config file location:** `~/.gsd/agent/models.json` @@ -355,7 +355,7 @@ The `apiKey` is required by the config schema but Ollama ignores it — any valu **Step 4 — Select the model:** -Inside GSD, type `/model` and pick your Ollama model. +Inside SF, type `/model` and pick your Ollama model. **Ollama tips:** - Ollama does not support the `developer` role or `reasoning_effort` — always set `compat.supportsDeveloperRole: false` and `compat.supportsReasoningEffort: false`. @@ -460,7 +460,7 @@ The model `id` must match the `--model` flag you passed to `vllm serve`. ## Custom OpenAI-Compatible Endpoints -Any server that implements the OpenAI Chat Completions API can work with GSD. This covers proxies (LiteLLM, Portkey, Helicone), self-hosted inference, and new providers. +Any server that implements the OpenAI Chat Completions API can work with SF. This covers proxies (LiteLLM, Portkey, Helicone), self-hosted inference, and new providers. **Quickest path — use the onboarding wizard:** @@ -538,15 +538,15 @@ For the full reference on `compat` fields, `modelOverrides`, value resolution, a ### "Authentication failed" with a valid key -**Cause:** The key is set in your shell but not visible to GSD. +**Cause:** The key is set in your shell but not visible to SF. **Fix:** Make sure the environment variable is exported in the same terminal where you run `gsd`. Or use `gsd config` to save the key to `~/.gsd/agent/auth.json` so it persists across sessions. ### OpenRouter models not appearing in `/model` -**Cause:** No `OPENROUTER_API_KEY` set, so GSD hides OpenRouter models. +**Cause:** No `OPENROUTER_API_KEY` set, so SF hides OpenRouter models. -**Fix:** Set the key and restart GSD: +**Fix:** Set the key and restart SF: ```bash export OPENROUTER_API_KEY="sk-or-..." @@ -577,7 +577,7 @@ ollama pull llama3.1:8b **Cause:** Most local inference servers don't support the OpenAI `developer` message role. -**Fix:** Add `compat.supportsDeveloperRole: false` to the provider config. This makes GSD send `system` messages instead: +**Fix:** Add `compat.supportsDeveloperRole: false` to the provider config. This makes SF send `system` messages instead: ```json { @@ -614,7 +614,7 @@ ollama pull llama3.1:8b ### Cost shows $0.00 for custom models -**Expected behavior.** GSD defaults cost to zero for custom models. Override with the `cost` field if you want accurate cost tracking: +**Expected behavior.** SF defaults cost to zero for custom models. Override with the `cost` field if you want accurate cost tracking: ```json "cost": { "input": 0.15, "output": 0.60, "cacheRead": 0.015, "cacheWrite": 0.19 } @@ -628,7 +628,7 @@ Values are per million tokens. After configuring a provider: -1. **Launch GSD:** +1. **Launch SF:** ```bash gsd ``` diff --git a/docs/user-docs/remote-questions.md b/docs/user-docs/remote-questions.md index 8078a9c56..4ca2c29d4 100644 --- a/docs/user-docs/remote-questions.md +++ b/docs/user-docs/remote-questions.md @@ -1,6 +1,6 @@ # Remote Questions -Remote questions allow GSD to ask for user input via Slack, Discord, or Telegram when running in headless auto-mode. When GSD encounters a decision point that needs human input, it posts the question to your configured channel and polls for a response. +Remote questions allow SF to ask for user input via Slack, Discord, or Telegram when running in headless auto-mode. When SF encounters a decision point that needs human input, it posts the question to your configured channel and polls for a response. ## Setup @@ -77,13 +77,13 @@ remote_questions: ## How It Works -1. GSD encounters a decision point during auto-mode +1. SF encounters a decision point during auto-mode 2. The question is posted to your configured channel as a rich embed (Discord) or Block Kit message (Slack) -3. GSD polls for a response at the configured interval +3. SF polls for a response at the configured interval 4. You respond by: - **Reacting** with a number emoji (1️⃣, 2️⃣, etc.) for single-question prompts - **Replying** to the message with a number (`1`), comma-separated numbers (`1,3`), or free text -5. GSD picks up the response and continues execution +5. SF picks up the response and continues execution 6. A ✅ reaction is added to the prompt message to confirm receipt ### Response Formats @@ -99,7 +99,7 @@ remote_questions: ### Timeouts -If no response is received within `timeout_minutes`, the prompt times out and GSD continues with a timeout result. The LLM handles timeouts according to the task context — typically by making a conservative default choice or pausing auto-mode. +If no response is received within `timeout_minutes`, the prompt times out and SF continues with a timeout result. The LLM handles timeouts according to the task context — typically by making a conservative default choice or pausing auto-mode. ## Commands diff --git a/docs/user-docs/skills.md b/docs/user-docs/skills.md index 6a9e1d567..7d2c4e8b5 100644 --- a/docs/user-docs/skills.md +++ b/docs/user-docs/skills.md @@ -1,12 +1,12 @@ # Skills -Skills are specialized instruction sets that GSD loads when the task matches. They provide domain-specific guidance for the LLM — coding patterns, framework idioms, testing strategies, and tool usage. +Skills are specialized instruction sets that SF loads when the task matches. They provide domain-specific guidance for the LLM — coding patterns, framework idioms, testing strategies, and tool usage. -Skills follow the open [Agent Skills standard](https://agentskills.io/) and are **not GSD-specific** — they work with Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Windsurf, and 40+ other agents. +Skills follow the open [Agent Skills standard](https://agentskills.io/) and are **not SF-specific** — they work with Claude Code, OpenAI Codex, Cursor, GitHub Copilot, Windsurf, and 40+ other agents. ## Skill Directories -GSD reads skills from two locations, in priority order: +SF reads skills from two locations, in priority order: | Location | Scope | Description | |-----------------------------------|---------|----------------------------------------------------------| @@ -15,7 +15,7 @@ GSD reads skills from two locations, in priority order: Global skills take precedence over project skills when names collide. -> **Migration from `~/.gsd/agent/skills/`:** On first launch after upgrading, GSD automatically copies skills from the legacy `~/.gsd/agent/skills/` directory to `~/.agents/skills/`. The old directory is preserved for backward compatibility. +> **Migration from `~/.gsd/agent/skills/`:** On first launch after upgrading, SF automatically copies skills from the legacy `~/.gsd/agent/skills/` directory to `~/.agents/skills/`. The old directory is preserved for backward compatibility. ## Installing Skills @@ -40,7 +40,7 @@ npx skills update ### Onboarding Catalog -During `gsd init`, GSD detects the project's tech stack and recommends relevant skill packs. For brownfield projects, detection is automatic; for greenfield projects, the user picks a tech stack. +During `gsd init`, SF detects the project's tech stack and recommends relevant skill packs. For brownfield projects, detection is automatic; for greenfield projects, the user picks a tech stack. The curated catalog is maintained in `src/resources/extensions/gsd/skill-catalog.ts`. Each entry maps a tech stack to a skills.sh repo and specific skill names. @@ -84,7 +84,7 @@ The skill catalog lives in [`src/resources/extensions/gsd/skill-catalog.ts`](../ ## Skill Discovery -The `skill_discovery` preference controls how GSD finds skills during auto mode: +The `skill_discovery` preference controls how SF finds skills during auto mode: | Mode | Behavior | |------|----------| @@ -147,7 +147,7 @@ Project-local skills can be committed to version control so team members share t ## Skill Lifecycle Management -GSD tracks skill performance across auto-mode sessions and surfaces health data to help you maintain skill quality. +SF tracks skill performance across auto-mode sessions and surfaces health data to help you maintain skill quality. ### Skill Telemetry @@ -183,6 +183,6 @@ Stale skills are excluded from automatic matching but remain invokable explicitl ### Heal-Skill (Post-Unit Analysis) -When configured as a post-unit hook, GSD can analyze whether the agent deviated from a skill's instructions during execution. If significant drift is detected (outdated API patterns, incorrect guidance), it writes proposed fixes to `.gsd/skill-review-queue.md` for human review. +When configured as a post-unit hook, SF can analyze whether the agent deviated from a skill's instructions during execution. If significant drift is detected (outdated API patterns, incorrect guidance), it writes proposed fixes to `.gsd/skill-review-queue.md` for human review. Key design principle: skills are **never auto-modified**. Research shows curated skills outperform auto-generated ones significantly, so the human review step is critical. diff --git a/docs/user-docs/token-optimization.md b/docs/user-docs/token-optimization.md index 4a3a423af..d4fcc36e9 100644 --- a/docs/user-docs/token-optimization.md +++ b/docs/user-docs/token-optimization.md @@ -2,7 +2,7 @@ *Introduced in v2.17.0* -GSD 2.17 introduces a coordinated token optimization system that can reduce token usage by 40-60% without sacrificing output quality for most workloads. The system has three pillars: **token profiles**, **context compression**, and **complexity-based task routing**. +SF.17 introduces a coordinated token optimization system that can reduce token usage by 40-60% without sacrificing output quality for most workloads. The system has three pillars: **token profiles**, **context compression**, and **complexity-based task routing**. ## Token Profiles @@ -83,7 +83,7 @@ Dispatch prompt builders accept an `inlineLevel` parameter. At each level, speci - `buildExecuteTaskPrompt` — drops the decisions template, truncates prior summaries to the most recent one - `buildPlanMilestonePrompt` — drops `PROJECT.md`, `REQUIREMENTS.md`, decisions, and supplementary templates like `secrets-manifest` - `buildCompleteSlicePrompt` — drops requirements and UAT template inlining -- `buildCompleteMilestonePrompt` — drops root GSD file inlining +- `buildCompleteMilestonePrompt` — drops root SF file inlining - `buildReassessRoadmapPrompt` — drops project, requirements, and decisions files These are cumulative — `standard` drops a subset, `minimal` drops more. The `full` level preserves all context (the pre-2.17 behavior). @@ -105,7 +105,7 @@ Explicit `phases` settings always override the profile defaults. ## Complexity-Based Task Routing -GSD classifies each task by complexity and routes it to an appropriate model tier when dynamic routing is enabled. Simple documentation fixes use cheaper models while complex architectural work gets the reasoning power it needs. +SF classifies each task by complexity and routes it to an appropriate model tier when dynamic routing is enabled. Simple documentation fixes use cheaper models while complex architectural work gets the reasoning power it needs. > **Prerequisite:** Dynamic routing requires explicit `models` in your preferences. Without a `models` section, routing is skipped and the session's launch model is used for all phases. Token profiles set `models` automatically. @@ -165,7 +165,7 @@ This graduated approach preserves model quality for the most complex work while ## Adaptive Learning (Routing History) -GSD tracks the success and failure of each tier assignment over time and adjusts future classifications accordingly. This is opt-in — it happens automatically and persists in `.gsd/routing-history.json`. +SF tracks the success and failure of each tier assignment over time and adjusts future classifications accordingly. This is opt-in — it happens automatically and persists in `.gsd/routing-history.json`. ### How It Works @@ -319,7 +319,7 @@ Anchors are written automatically after successful completion of `research-miles *Introduced in v2.29.0* -GSD can apply deterministic prompt compression before falling back to section-boundary truncation. This preserves more information when context exceeds the budget. +SF can apply deterministic prompt compression before falling back to section-boundary truncation. This preserves more information when context exceeds the budget. ### Compression Strategy @@ -363,7 +363,7 @@ At `budget` and `balanced` inline levels, decisions and requirements are formatt ### Summary Distillation -When a slice has 3+ dependency summaries and the total exceeds the summary budget, GSD extracts essential structured data (provides, requires, key_files, key_decisions) and drops verbose prose sections before falling back to section-boundary truncation. +When a slice has 3+ dependency summaries and the total exceeds the summary budget, SF extracts essential structured data (provides, requires, key_files, key_decisions) and drops verbose prose sections before falling back to section-boundary truncation. ### Cache Hit Rate Tracking diff --git a/docs/user-docs/troubleshooting.md b/docs/user-docs/troubleshooting.md index 875bba7fc..264268946 100644 --- a/docs/user-docs/troubleshooting.md +++ b/docs/user-docs/troubleshooting.md @@ -43,7 +43,7 @@ It checks: ### `command not found: gsd` after install -**Symptoms:** `npm install -g gsd-pi` succeeds but `gsd` isn't found. +**Symptoms:** `npm install -g sf-run` succeeds but `gsd` isn't found. **Cause:** npm's global bin directory isn't in your shell's `$PATH`. @@ -59,14 +59,14 @@ echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.zshrc source ~/.zshrc ``` -**Workaround:** Run `npx gsd-pi` or `$(npm prefix -g)/bin/gsd` directly. +**Workaround:** Run `npx sf-run` or `$(npm prefix -g)/bin/gsd` directly. **Common causes:** - **Homebrew Node** — `/opt/homebrew/bin` should be in PATH but sometimes isn't if Homebrew init is missing from your shell profile - **Version manager (nvm, fnm, mise)** — global bin is version-specific; ensure your version manager initializes in your shell config - **oh-my-zsh** — the `gitfast` plugin aliases `gsd` to `git svn dcommit`. Check with `alias gsd` and unalias if needed -### `npm install -g gsd-pi` fails +### `npm install -g sf-run` fails **Common causes:** - Missing workspace packages — fixed in v2.10.4+ @@ -77,7 +77,7 @@ source ~/.zshrc **Symptoms:** Auto mode pauses with a provider error (rate limit, server error, auth failure). -**How GSD handles it (v2.26):** +**How SF handles it (v2.26):** | Error type | Auto-resume? | Delay | |-----------|-------------|-------| @@ -85,7 +85,7 @@ source ~/.zshrc | Server error (500, 502, 503, "overloaded") | ✅ Yes | 30s | | Auth/billing ("unauthorized", "invalid key") | ❌ No | Manual resume | -For transient errors, GSD pauses briefly and resumes automatically. For permanent errors, configure fallback models: +For transient errors, SF pauses briefly and resumes automatically. For permanent errors, configure fallback models: ```yaml models: @@ -109,7 +109,7 @@ For common provider setup issues (role errors, streaming errors, model ID mismat **Symptoms:** Auto mode won't start, says another session is running. -**Fix:** GSD automatically detects stale locks — if the owning PID is dead, the lock is cleaned up and re-acquired on the next `/gsd auto`. This includes stranded `.gsd.lock/` directories left by `proper-lockfile` after crashes. If automatic recovery fails, delete `.gsd/auto.lock` and the `.gsd.lock/` directory manually: +**Fix:** SF automatically detects stale locks — if the owning PID is dead, the lock is cleaned up and re-acquired on the next `/gsd auto`. This includes stranded `.gsd.lock/` directories left by `proper-lockfile` after crashes. If automatic recovery fails, delete `.gsd/auto.lock` and the `.gsd.lock/` directory manually: ```bash rm -f .gsd/auto.lock @@ -120,7 +120,7 @@ rm -rf "$(dirname .gsd)/.gsd.lock" **Symptoms:** Worktree merge fails on `.gsd/` files. -**Fix:** GSD auto-resolves conflicts on `.gsd/` runtime files. For content conflicts in code files, the LLM is given an opportunity to resolve them via a fix-merge session. If that fails, manual resolution is needed. +**Fix:** SF auto-resolves conflicts on `.gsd/` runtime files. For content conflicts in code files, the LLM is given an opportunity to resolve them via a fix-merge session. If that fails, manual resolution is needed. ### Pre-dispatch says the milestone integration branch no longer exists @@ -129,24 +129,24 @@ rm -rf "$(dirname .gsd)/.gsd.lock" **What it means:** The milestone's `.gsd/milestones//-META.json` still points at the branch that was active when the milestone started, but that branch has since been renamed or deleted. **Current behavior:** -- If GSD can deterministically recover to a safe branch, it no longer hard-stops auto mode. +- If SF can deterministically recover to a safe branch, it no longer hard-stops auto mode. - Safe fallbacks are: - explicit `git.main_branch` when configured and present - the repo's detected default integration branch (for example `main` or `master`) - In that case `/gsd doctor` reports a warning and `/gsd doctor fix` rewrites the stale metadata to the effective branch. -- GSD still blocks when no safe fallback branch can be determined. +- SF still blocks when no safe fallback branch can be determined. **Fix:** - Run `/gsd doctor fix` to rewrite the stale milestone metadata automatically when the fallback is obvious. -- If GSD still blocks, recreate the missing branch or update your git preferences so `git.main_branch` points at a real branch. +- If SF still blocks, recreate the missing branch or update your git preferences so `git.main_branch` points at a real branch. ### Transient `EBUSY` / `EPERM` / `EACCES` while writing `.gsd/` files **Symptoms:** On Windows, auto mode or doctor occasionally fails while updating `.gsd/` files with errors like `EBUSY`, `EPERM`, or `EACCES`. -**Cause:** Antivirus, indexers, editors, or filesystem watchers can briefly lock the destination or temp file just as GSD performs the atomic rename. +**Cause:** Antivirus, indexers, editors, or filesystem watchers can briefly lock the destination or temp file just as SF performs the atomic rename. -**Current behavior:** GSD now retries those transient rename failures with a short bounded backoff before surfacing an error. The retry is intentionally limited so genuine filesystem problems still fail loudly instead of hanging forever. +**Current behavior:** SF now retries those transient rename failures with a short bounded backoff before surfacing an error. The retry is intentionally limited so genuine filesystem problems still fail loudly instead of hanging forever. **Fix:** - Re-run the operation; most transient lock races clear quickly. @@ -163,11 +163,11 @@ rm -rf "$(dirname .gsd)/.gsd.lock" ### Orphan web server process -**Symptoms:** `gsd --web` fails because port 3000 is already in use, even though no GSD session is running. +**Symptoms:** `gsd --web` fails because port 3000 is already in use, even though no SF session is running. **Cause:** A previous web server process was not cleaned up on exit. -**Fix:** Fixed in v2.42.0+. GSD now cleans up stale web server processes automatically. If you're on an older version, kill the orphan process manually: `lsof -ti:3000 | xargs kill`. +**Fix:** Fixed in v2.42.0+. SF now cleans up stale web server processes automatically. If you're on an older version, kill the orphan process manually: `lsof -ti:3000 | xargs kill`. ### Non-JS project blocked by worktree health check @@ -181,7 +181,7 @@ rm -rf "$(dirname .gsd)/.gsd.lock" **Symptoms:** Git commands fail or produce unexpected results when the system locale is non-English (e.g., German). -**Cause:** GSD parsed git output assuming English locale strings. +**Cause:** SF parsed git output assuming English locale strings. **Fix:** Fixed in v2.42.0+. All git commands now force `LC_ALL=C` to ensure consistent English output regardless of system locale. @@ -194,7 +194,7 @@ rm -rf "$(dirname .gsd)/.gsd.lock" **Common causes:** - No `.mcp.json` or `.gsd/mcp.json` file exists in the current project - The config file is malformed JSON -- The server is configured in a different project directory than the one where you launched GSD +- The server is configured in a different project directory than the one where you launched SF **Fix:** - Add the server to `.mcp.json` or `.gsd/mcp.json` @@ -211,7 +211,7 @@ rm -rf "$(dirname .gsd)/.gsd.lock" - The server is waiting on an unavailable dependency or backend service **Fix:** -- Run the configured command directly outside GSD and confirm the server actually starts +- Run the configured command directly outside SF and confirm the server actually starts - Check that any backend URLs or required services are reachable - For local custom servers, verify the implementation is using an MCP SDK or a correct stdio protocol implementation @@ -242,14 +242,14 @@ rm -rf "$(dirname .gsd)/.gsd.lock" **Fix:** - Re-run `mcp_discover(server="name")` and confirm the exact required argument names - Call the tool with `mcp_call(server="name", tool="tool_name", args={...})` -- If you're developing GSD itself, rebuild after schema changes with `npm run build` +- If you're developing SF itself, rebuild after schema changes with `npm run build` -### Local stdio server works manually but not in GSD +### Local stdio server works manually but not in SF -**Symptoms:** Running the server command manually seems fine, but GSD can't connect. +**Symptoms:** Running the server command manually seems fine, but SF can't connect. **Common causes:** -- The server depends on shell state that GSD doesn't inherit +- The server depends on shell state that SF doesn't inherit - Relative paths only work from a different working directory - Required environment variables exist in your shell but not in the MCP config @@ -307,16 +307,16 @@ Doctor rebuilds `STATE.md` from plan and roadmap files on disk and fixes detecte ## Getting Help -- **GitHub Issues:** [github.com/gsd-build/GSD-2/issues](https://github.com/gsd-build/GSD-2/issues) +- **GitHub Issues:** [github.com/gsd-build/SF/issues](https://github.com/gsd-build/SF/issues) - **Dashboard:** `Ctrl+Alt+G` or `/gsd status` for real-time diagnostics - **Forensics:** `/gsd forensics` for structured post-mortem analysis of auto-mode failures - **Session logs:** `.gsd/activity/` contains JSONL session dumps for crash forensics ## iTerm2-Specific Issues -### Ctrl+Alt shortcuts trigger the wrong action (e.g., Ctrl+Alt+G opens external editor instead of GSD dashboard) +### Ctrl+Alt shortcuts trigger the wrong action (e.g., Ctrl+Alt+G opens external editor instead of SF dashboard) -**Symptoms:** Pressing Ctrl+Alt+G opens the external editor prompt (Ctrl+G) instead of the GSD dashboard. Other Ctrl+Alt shortcuts behave as their Ctrl-only counterparts. +**Symptoms:** Pressing Ctrl+Alt+G opens the external editor prompt (Ctrl+G) instead of the SF dashboard. Other Ctrl+Alt shortcuts behave as their Ctrl-only counterparts. **Cause:** iTerm2's default Left Option Key setting is "Normal", which swallows the Alt modifier for Ctrl+Alt key combinations. The terminal receives only the Ctrl key, so Ctrl+Alt+G arrives as Ctrl+G. @@ -342,7 +342,7 @@ Doctor rebuilds `STATE.md` from plan and roadmap files on disk and fixes detecte ## Database Issues -### "GSD database is not available" +### "SF database is not available" **Symptoms:** `gsd_decision_save` (or its alias `gsd_save_decision`), `gsd_requirement_update` (or `gsd_update_requirement`), or `gsd_summary_save` (or `gsd_save_summary`) fail with this error. @@ -364,7 +364,7 @@ Doctor rebuilds `STATE.md` from plan and roadmap files on disk and fixes detecte ### "LSP isn't available in this workspace" -GSD auto-detects language servers based on project files (e.g. `package.json` → TypeScript, `Cargo.toml` → Rust, `go.mod` → Go). If no servers are detected, the agent skips LSP features. +SF auto-detects language servers based on project files (e.g. `package.json` → TypeScript, `Cargo.toml` → Rust, `go.mod` → Go). If no servers are detected, the agent skips LSP features. **Check status:** ``` @@ -382,7 +382,7 @@ This shows which servers are active and, if none are found, diagnoses why — in | Rust | `rustup component add rust-analyzer` | | Go | `go install golang.org/x/tools/gopls@latest` | -After installing, run `lsp reload` to restart detection without restarting GSD. +After installing, run `lsp reload` to restart detection without restarting SF. ## Notifications @@ -390,7 +390,7 @@ After installing, run `lsp reload` to restart detection without restarting GSD. **Symptoms:** `notifications.enabled: true` in preferences, but no desktop notifications appear during auto-mode (no milestone complete alerts, no budget warnings, no error notifications). No error messages logged. -**Cause:** GSD uses `osascript display notification` as a fallback on macOS. This command is attributed to your terminal app (Ghostty, iTerm2, Alacritty, Kitty, Warp, etc.). If that app doesn't have notification permissions in System Settings → Notifications, macOS silently drops the notification — `osascript` exits 0 with no error. +**Cause:** SF uses `osascript display notification` as a fallback on macOS. This command is attributed to your terminal app (Ghostty, iTerm2, Alacritty, Kitty, Warp, etc.). If that app doesn't have notification permissions in System Settings → Notifications, macOS silently drops the notification — `osascript` exits 0 with no error. Most terminal apps don't appear in the Notifications settings panel until they've successfully delivered at least one notification, creating a chicken-and-egg problem. @@ -400,16 +400,16 @@ Most terminal apps don't appear in the Notifications settings panel until they'v brew install terminal-notifier ``` -GSD automatically prefers `terminal-notifier` when available. On first use, macOS will prompt you to allow notifications — this is the expected behavior. +SF automatically prefers `terminal-notifier` when available. On first use, macOS will prompt you to allow notifications — this is the expected behavior. **Fix (alternative):** Go to **System Settings → Notifications** and enable notifications for your terminal app. If your terminal doesn't appear in the list, try sending a test notification from Terminal.app first to register "Script Editor": ```bash -osascript -e 'display notification "test" with title "GSD"' +osascript -e 'display notification "test" with title "SF"' ``` **Verify:** After applying either fix, test with: ```bash -terminal-notifier -title "GSD" -message "working!" -sound Glass +terminal-notifier -title "SF" -message "working!" -sound Glass ``` diff --git a/docs/user-docs/web-interface.md b/docs/user-docs/web-interface.md index 2b55bfccf..23d90ca7b 100644 --- a/docs/user-docs/web-interface.md +++ b/docs/user-docs/web-interface.md @@ -2,7 +2,7 @@ > Added in v2.41.0 -GSD includes a browser-based web interface for project management, real-time progress monitoring, and multi-project support. +SF includes a browser-based web interface for project management, real-time progress monitoring, and multi-project support. ## Quick Start @@ -10,7 +10,7 @@ GSD includes a browser-based web interface for project management, real-time pro gsd --web ``` -This starts a local web server and opens the GSD dashboard in your default browser. +This starts a local web server and opens the SF dashboard in your default browser. ### CLI Flags (v2.42.0) @@ -35,12 +35,12 @@ gsd --web --host 0.0.0.0 --port 8080 --allowed-origins "https://example.com" ## Architecture -The web interface is built with Next.js and communicates with the GSD backend via a bridge service. Each project gets its own bridge instance, providing isolation for concurrent sessions. +The web interface is built with Next.js and communicates with the SF backend via a bridge service. Each project gets its own bridge instance, providing isolation for concurrent sessions. Key components: - `ProjectBridgeService` — per-project command routing and SSE subscription - `getProjectBridgeServiceForCwd()` — registry returning distinct instances per project path -- `resolveProjectCwd()` — reads `?project=` from request URL or falls back to `GSD_WEB_PROJECT_CWD` +- `resolveProjectCwd()` — reads `?project=` from request URL or falls back to `SF_WEB_PROJECT_CWD` ## Configuration @@ -50,11 +50,11 @@ The web server binds to `localhost:3000` by default. Use `--host`, `--port`, and | Variable | Description | |----------|-------------| -| `GSD_WEB_PROJECT_CWD` | Default project path when `?project=` is not specified | +| `SF_WEB_PROJECT_CWD` | Default project path when `?project=` is not specified | ## Node v24 Compatibility -Node v24 introduced breaking changes to type stripping that caused `ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING` on web boot. This is fixed in v2.42.0+ (#1864). If you encounter this error, upgrade GSD. +Node v24 introduced breaking changes to type stripping that caused `ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING` on web boot. This is fixed in v2.42.0+ (#1864). If you encounter this error, upgrade SF. ## Auth Token Persistence diff --git a/docs/user-docs/working-in-teams.md b/docs/user-docs/working-in-teams.md index fd5476813..cefc9348a 100644 --- a/docs/user-docs/working-in-teams.md +++ b/docs/user-docs/working-in-teams.md @@ -1,12 +1,12 @@ # Working in Teams -GSD supports multi-user workflows where several developers work on the same repository concurrently. +SF supports multi-user workflows where several developers work on the same repository concurrently. ## Setup ### 1. Set Team Mode -The simplest way to configure GSD for team use is to set `mode: team` in your project preferences. This enables unique milestone IDs, push branches, and pre-merge checks in one setting: +The simplest way to configure SF for team use is to set `mode: team` in your project preferences. This enables unique milestone IDs, push branches, and pre-merge checks in one setting: ```yaml # .gsd/PREFERENCES.md (project-level, committed to git) @@ -25,7 +25,7 @@ Alternatively, you can configure each setting individually without using a mode Share planning artifacts (milestones, roadmaps, decisions) while keeping runtime files local: ```bash -# ── GSD: Runtime / Ephemeral (per-developer, per-session) ────── +# ── SF: Runtime / Ephemeral (per-developer, per-session) ────── .gsd/auto.lock .gsd/completed-units.json .gsd/STATE.md @@ -51,19 +51,19 @@ Share planning artifacts (milestones, roadmaps, decisions) while keeping runtime ```bash git add .gsd/PREFERENCES.md -git commit -m "chore: enable GSD team workflow" +git commit -m "chore: enable SF team workflow" ``` ## `commit_docs: false` -For teams where only some members use GSD, or when company policy requires a clean repo: +For teams where only some members use SF, or when company policy requires a clean repo: ```yaml git: commit_docs: false ``` -This adds `.gsd/` to `.gitignore` entirely and keeps all artifacts local. The developer gets the benefits of structured planning without affecting teammates who don't use GSD. +This adds `.gsd/` to `.gitignore` entirely and keeps all artifacts local. The developer gets the benefits of structured planning without affecting teammates who don't use SF. ## Migrating an Existing Project @@ -98,4 +98,4 @@ depends_on: [M001-eh88as] --- ``` -GSD enforces that dependent milestones complete before starting downstream work. +SF enforces that dependent milestones complete before starting downstream work. diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 5a9fc25d0..6d567ba95 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -1,12 +1,12 @@ -# GSD 文档 +# SF 文档 -欢迎使用 GSD 文档。这里涵盖了从快速开始到高级配置、自动模式内部机制,以及如何基于 Pi SDK 扩展 GSD 的内容。 +欢迎使用 SF 文档。这里涵盖了从快速开始到高级配置、自动模式内部机制,以及如何基于 Pi SDK 扩展 SF 的内容。 > 本目录是主文档的简体中文翻译。目前优先覆盖 `docs/user-docs/` 这套用户手册;如中英文内容有差异,请以英文原文为准。 ## 用户文档 -用于安装、配置和日常使用 GSD 的指南。文件位于 [`user-docs/`](./user-docs/)。 +用于安装、配置和日常使用 SF 的指南。文件位于 [`user-docs/`](./user-docs/)。 | 指南 | 说明 | |------|------| diff --git a/docs/zh-CN/user-docs/auto-mode.md b/docs/zh-CN/user-docs/auto-mode.md index 914355b5e..30d489986 100644 --- a/docs/zh-CN/user-docs/auto-mode.md +++ b/docs/zh-CN/user-docs/auto-mode.md @@ -1,6 +1,6 @@ # 自动模式 -自动模式是 GSD 的自主执行引擎。运行 `/gsd auto`,然后离开;回来时你会看到已经构建好的软件,以及干净的 git 历史。 +自动模式是 SF 的自主执行引擎。运行 `/gsd auto`,然后离开;回来时你会看到已经构建好的软件,以及干净的 git 历史。 ## 工作原理 @@ -45,7 +45,7 @@ Plan (with integrated research) → Execute (per task) → Complete → Reassess ### Git 隔离 -GSD 支持三种 milestone 隔离模式(通过偏好设置中的 `git.isolation` 配置): +SF 支持三种 milestone 隔离模式(通过偏好设置中的 `git.isolation` 配置): - **`worktree`**(默认):每个 milestone 都运行在 `.gsd/worktrees//` 下自己的 git worktree 中,分支名为 `milestone/`。所有 slice 工作都顺序提交,不需要切分支,也不会在 milestone 内部产生合并冲突。milestone 完成后,再整体 squash merge 回主分支,形成一个干净提交。 - **`branch`**:工作发生在项目根目录下的 `milestone/` 分支上。适合子模块较多、worktree 表现不佳的仓库。 @@ -65,7 +65,7 @@ GSD 支持三种 milestone 隔离模式(通过偏好设置中的 `git.isolatio ### Provider 错误恢复 -GSD 会对 provider 错误分类,并在安全时自动恢复: +SF 会对 provider 错误分类,并在安全时自动恢复: | 错误类型 | 示例 | 动作 | |----------|------|------| @@ -77,11 +77,11 @@ GSD 会对 provider 错误分类,并在安全时自动恢复: ### 增量记忆(v2.26) -GSD 会维护一个 `KNOWLEDGE.md` 文件,作为项目特有规则、模式和经验的追加式记录。agent 在每个工作单元开始时都会读取它;当发现反复出现的问题、非显而易见的模式或未来会话需要遵循的规则时,也会把内容追加进去。这样一来,自动模式就有了跨会话、跨上下文窗口的持久记忆。 +SF 会维护一个 `KNOWLEDGE.md` 文件,作为项目特有规则、模式和经验的追加式记录。agent 在每个工作单元开始时都会读取它;当发现反复出现的问题、非显而易见的模式或未来会话需要遵循的规则时,也会把内容追加进去。这样一来,自动模式就有了跨会话、跨上下文窗口的持久记忆。 ### 上下文压力监视器(v2.26) -当上下文使用达到 70% 时,GSD 会向 agent 发送收尾信号,提醒它优先完成可持久化的输出(例如提交、写 summary),避免在 task 中途因为上下文打满而什么都没来得及落盘。 +当上下文使用达到 70% 时,SF 会向 agent 发送收尾信号,提醒它优先完成可持久化的输出(例如提交、写 summary),避免在 task 中途因为上下文打满而什么都没来得及落盘。 ### 有意义的提交信息(v2.26) @@ -89,13 +89,13 @@ GSD 会维护一个 `KNOWLEDGE.md` 文件,作为项目特有规则、模式和 ### 卡死检测(v2.39) -GSD 使用滑动窗口分析来检测卡死循环。它不只是简单地统计“同一单元是否重复派发两次”,而是会分析近期派发历史中的重复模式,因此既能发现单点重复,也能发现 A→B→A→B 这样的循环。一旦检测到,GSD 会先带着更深的诊断 prompt 重试一次;如果仍然失败,自动模式就会停止,并指出它原本期待的具体文件,便于你介入。 +SF 使用滑动窗口分析来检测卡死循环。它不只是简单地统计“同一单元是否重复派发两次”,而是会分析近期派发历史中的重复模式,因此既能发现单点重复,也能发现 A→B→A→B 这样的循环。一旦检测到,SF 会先带着更深的诊断 prompt 重试一次;如果仍然失败,自动模式就会停止,并指出它原本期待的具体文件,便于你介入。 这种滑动窗口方法能降低合法重试场景(例如可自动修复的 verification 失败)的误报,同时更快抓到真正的卡死循环。 ### 事后取证(v2.40) -`/gsd forensics` 是一个面向自动模式失败分析的全访问 GSD 调试器,提供: +`/gsd forensics` 是一个面向自动模式失败分析的全访问 SF 调试器,提供: - **异常检测**:对卡死循环、成本尖峰、超时、产物缺失和崩溃做结构化识别,并标注严重级别 - **单元追踪**:最近 10 次单元执行,包含错误细节和执行时长 @@ -164,7 +164,7 @@ require_slice_discussion: true ### HTML 报告(v2.26) -每当 milestone 完成后,GSD 都会在 `.gsd/reports/` 中自动生成一个自包含的 HTML 报告。报告包括项目摘要、进度树、slice 依赖图(SVG DAG)、成本 / Token 柱状图、执行时间线、变更日志和知识库。没有外部依赖,所有 CSS 和 JS 都会内联。 +每当 milestone 完成后,SF 都会在 `.gsd/reports/` 中自动生成一个自包含的 HTML 报告。报告包括项目摘要、进度树、slice 依赖图(SVG DAG)、成本 / Token 柱状图、执行时间线、变更日志和知识库。没有外部依赖,所有 CSS 和 JS 都会内联。 ```yaml auto_report: true # 默认开启 @@ -290,7 +290,7 @@ Token profile 可以通过跳过某些阶段来降低成本: ## 响应式 Task 执行(v2.38) -当在偏好中设置 `reactive_execution: true` 时,GSD 会从 task plan 中的 IO 注解推导依赖图。互不冲突的 tasks(没有共享文件读写)会通过 subagents 并行派发,而存在依赖的 tasks 则等待前驱完成。 +当在偏好中设置 `reactive_execution: true` 时,SF 会从 task plan 中的 IO 注解推导依赖图。互不冲突的 tasks(没有共享文件读写)会通过 subagents 并行派发,而存在依赖的 tasks 则等待前驱完成。 ```yaml reactive_execution: true # 默认关闭 diff --git a/docs/zh-CN/user-docs/captures-triage.md b/docs/zh-CN/user-docs/captures-triage.md index 76a51c66c..241839f54 100644 --- a/docs/zh-CN/user-docs/captures-triage.md +++ b/docs/zh-CN/user-docs/captures-triage.md @@ -2,7 +2,7 @@ *引入于 v2.19.0* -Captures 允许你在自动模式执行过程中随手记录想法,而不必打断当前流程。你可以把新想法、bug 或范围变更记录下来,让 GSD 在 tasks 之间的自然间隙中进行分流处理。 +Captures 允许你在自动模式执行过程中随手记录想法,而不必打断当前流程。你可以把新想法、bug 或范围变更记录下来,让 SF 在 tasks 之间的自然间隙中进行分流处理。 ## 快速开始 @@ -24,7 +24,7 @@ capture → triage → confirm → resolve → resume ``` 1. **Capture**:`/gsd capture "thought"` 会带着时间戳和唯一 ID 追加到 `.gsd/CAPTURES.md` -2. **Triage**:在 tasks 之间的自然衔接点(`handleAgentEnd` 中),GSD 会检测待处理 capture 并进行分类 +2. **Triage**:在 tasks 之间的自然衔接点(`handleAgentEnd` 中),SF 会检测待处理 capture 并进行分类 3. **Confirm**:向用户展示建议的处理方式,由用户确认或调整 4. **Resolve**:应用该处理方案(插入 task、触发重规划、延期等) 5. **Resume**:自动模式继续运行 diff --git a/docs/zh-CN/user-docs/claude-code-auth-compliance.md b/docs/zh-CN/user-docs/claude-code-auth-compliance.md index 38d84934b..a5b2a0c0e 100644 --- a/docs/zh-CN/user-docs/claude-code-auth-compliance.md +++ b/docs/zh-CN/user-docs/claude-code-auth-compliance.md @@ -13,9 +13,9 @@ Anthropic 当前公开的指导原则边界非常清晰: 对于 GSD2,安全路径应当是: 1. 把本地 Claude Code 视为一个外部、已认证的运行时。 -2. 永远不要让 GSD 用户通过 GSD 托管的 Anthropic OAuth 去登录 Claude 订阅。 +2. 永远不要让 SF 用户通过 SF 托管的 Anthropic OAuth 去登录 Claude 订阅。 3. 永远不要把 Claude.ai 的订阅 OAuth 凭据交换成 bearer token,然后冒充 Claude Code 直接调用 Anthropic API。 -4. 如果 GSD 需要直接访问 Anthropic API,则必须要求使用 Claude Console API key、Bedrock、Vertex 或其他被明确支持的 provider 路径。 +4. 如果 SF 需要直接访问 Anthropic API,则必须要求使用 Claude Console API key、Bedrock、Vertex 或其他被明确支持的 provider 路径。 ## Anthropic 明确允许的内容 @@ -67,9 +67,9 @@ Anthropic 的消费条款还额外加入两项限制: 对 GSD2 的含义: -- 由 GSD 托管的 Anthropic 订阅 OAuth 流程属于高风险 -- 在 GSD 自己的 API client 中复用用户 Claude 订阅凭据属于高风险 -- 任何会让 Anthropic 误以为请求来自 Claude Code、但实际上来自 GSD 基础设施的流程,都越界了 +- 由 SF 托管的 Anthropic 订阅 OAuth 流程属于高风险 +- 在 SF 自己的 API client 中复用用户 Claude 订阅凭据属于高风险 +- 任何会让 Anthropic 误以为请求来自 Claude Code、但实际上来自 SF 基础设施的流程,都越界了 ## 当前 GSD2 发现 @@ -84,7 +84,7 @@ Anthropic 的消费条款还额外加入两项限制: - `src/cli.ts` 当检测到本地 CLI 可用时,会把用户从 `anthropic` 迁移到 `claude-code` -这些方向是正确的,因为此时 GSD 使用的是用户自己本地安装的 Claude Code,作为已认证的 Anthropic surface。 +这些方向是正确的,因为此时 SF 使用的是用户自己本地安装的 Claude Code,作为已认证的 Anthropic surface。 ### 中高风险部分 —— 已解决 @@ -106,7 +106,7 @@ Anthropic 的消费条款还额外加入两项限制: - 其他 Anthropic 文档明确支持的原生流程 - GSD2 不得为终端用户实现自己的 Anthropic 订阅 OAuth 流程 - GSD2 不得持久化 Anthropic 订阅 OAuth token,供后续 API 调用使用 -- GSD2 不得使用由 GSD 获取的订阅 OAuth tokens 来发送 Anthropic API 流量 +- GSD2 不得使用由 SF 获取的订阅 OAuth tokens 来发送 Anthropic API 流量 - GSD2 可以支持 Anthropic 直接访问,但仅限以下方式: - `ANTHROPIC_API_KEY` - 保存在 auth storage 中的 Claude Console API keys @@ -122,8 +122,8 @@ Anthropic 的消费条款还额外加入两项限制: 2. 把 Web onboarding 中的 Anthropic 改为只支持 API key 3. 当 `claude auth status` 成功时,继续保留 `claude-code` 作为推荐路径 4. 增加明确的 UI 文案: - - “Claude 订阅用户:请登录本地 Claude Code app / CLI,而不是 GSD。” -5. 阻止任何把 Anthropic OAuth 凭据转换成 GSD 托管请求 API 认证的迁移或代码路径 + - “Claude 订阅用户:请登录本地 Claude Code app / CLI,而不是 SF。” +5. 阻止任何把 Anthropic OAuth 凭据转换成 SF 托管请求 API 认证的迁移或代码路径 这是让仓库与 Anthropic 当前公开指导对齐的最快路径。 @@ -159,10 +159,10 @@ Anthropic 的消费条款还额外加入两项限制: 如果某个拟议中的 GSD2 特性需要访问 Anthropic,先问一个问题: -“GSD 是以 GSD 的身份调用 Anthropic,还是 GSD 只是把工作委派给用户本地已认证的 Claude Code 运行时?” +“SF 是以 SF 的身份调用 Anthropic,还是 SF 只是把工作委派给用户本地已认证的 Claude Code 运行时?” -- 如果 GSD 是以 GSD 的身份调用 Anthropic:必须要求 API key 或受支持的云认证 -- 如果 GSD 只是委派给本地 Claude Code:可以接受,前提是 GSD 自身不会拦截、生成或重放订阅凭据 +- 如果 SF 是以 SF 的身份调用 Anthropic:必须要求 API key 或受支持的云认证 +- 如果 SF 只是委派给本地 Claude Code:可以接受,前提是 SF 自身不会拦截、生成或重放订阅凭据 ## 审查过的来源 diff --git a/docs/zh-CN/user-docs/commands.md b/docs/zh-CN/user-docs/commands.md index 93ba35098..d607a1005 100644 --- a/docs/zh-CN/user-docs/commands.md +++ b/docs/zh-CN/user-docs/commands.md @@ -7,7 +7,7 @@ | `/gsd` | Step mode:一次执行一个工作单元,并在每步之间暂停 | | `/gsd next` | 显式 Step mode(与 `/gsd` 相同) | | `/gsd auto` | 自动模式:research、plan、execute、commit,然后重复 | -| `/gsd quick` | 在不经过完整 planning 开销的情况下,执行一个带 GSD 保证的 quick task(原子提交、状态跟踪) | +| `/gsd quick` | 在不经过完整 planning 开销的情况下,执行一个带 SF 保证的 quick task(原子提交、状态跟踪) | | `/gsd stop` | 优雅地停止自动模式 | | `/gsd pause` | 暂停自动模式(保留状态,可用 `/gsd auto` 恢复) | | `/gsd steer` | 在执行过程中强制修改 plan 文档 | @@ -19,8 +19,8 @@ | `/gsd triage` | 手动触发待处理 captures 的 triage | | `/gsd dispatch` | 直接派发一个指定阶段(research、plan、execute、complete、reassess、uat、replan) | | `/gsd history` | 查看执行历史(支持 `--cost`、`--phase`、`--model` 过滤) | -| `/gsd forensics` | 全访问 GSD 调试器:用于分析自动模式失败,支持结构化异常检测、单元追踪和 LLM 引导的根因分析 | -| `/gsd cleanup` | 清理 GSD 状态文件和过期 worktrees | +| `/gsd forensics` | 全访问 SF 调试器:用于分析自动模式失败,支持结构化异常检测、单元追踪和 LLM 引导的根因分析 | +| `/gsd cleanup` | 清理 SF 状态文件和过期 worktrees | | `/gsd visualize` | 打开工作流可视化器(进度、依赖、指标、时间线) | | `/gsd export --html` | 为当前或已完成的 milestone 生成自包含 HTML 报告 | | `/gsd export --html --all` | 一次性为所有 milestones 生成回顾报告 | @@ -31,7 +31,7 @@ | `/gsd changelog` | 查看分类后的发行说明 | | `/gsd logs` | 浏览活动日志、调试日志和指标 | | `/gsd remote` | 控制远程自动模式 | -| `/gsd help` | 查看所有 GSD 子命令的分类参考及说明 | +| `/gsd help` | 查看所有 SF 子命令的分类参考及说明 | ## 配置与诊断 @@ -140,7 +140,7 @@ |------|------| | `/clear` | 启动一个新会话(`/new` 的别名) | | `/exit` | 优雅退出,会在退出前保存会话状态 | -| `/kill` | 立即终止 GSD 进程 | +| `/kill` | 立即终止 SF 进程 | | `/model` | 切换当前 active model | | `/login` | 登录一个 LLM provider | | `/thinking` | 在会话中切换 thinking level | @@ -230,7 +230,7 @@ echo "Build a CLI tool" | gsd headless new-milestone --context - ### `gsd headless query` -它会返回单个 JSON 对象,包含完整项目快照,无需 LLM 会话,也无需 RPC 子进程,响应几乎即时(约 50ms)。这是 orchestration 工具和脚本检查 GSD 状态的推荐方式。 +它会返回单个 JSON 对象,包含完整项目快照,无需 LLM 会话,也无需 RPC 子进程,响应几乎即时(约 50ms)。这是 orchestration 工具和脚本检查 SF 状态的推荐方式。 ```bash gsd headless query | jq '.state.phase' @@ -271,14 +271,14 @@ gsd headless query | jq '.cost.total' ## MCP Server 模式 -`gsd --mode mcp` 会通过 stdin/stdout 将 GSD 作为一个 [Model Context Protocol](https://modelcontextprotocol.io) server 运行。这会把所有 GSD 工具(read、write、edit、bash 等)暴露给外部 AI 客户端,例如 Claude Desktop、VS Code Copilot,以及任何兼容 MCP 的宿主。 +`gsd --mode mcp` 会通过 stdin/stdout 将 SF 作为一个 [Model Context Protocol](https://modelcontextprotocol.io) server 运行。这会把所有 SF 工具(read、write、edit、bash 等)暴露给外部 AI 客户端,例如 Claude Desktop、VS Code Copilot,以及任何兼容 MCP 的宿主。 ```bash -# 以 MCP server 模式启动 GSD +# 以 MCP server 模式启动 SF gsd --mode mcp ``` -服务会注册 agent 会话中的全部工具,并把 MCP 的 `tools/list` 与 `tools/call` 请求映射到 GSD 的工具定义上。连接会一直保持,直到底层 transport 关闭。 +服务会注册 agent 会话中的全部工具,并把 MCP 的 `tools/list` 与 `tools/call` 请求映射到 SF 的工具定义上。连接会一直保持,直到底层 transport 关闭。 ## 会话内更新 @@ -288,7 +288,7 @@ gsd --mode mcp /gsd update # Current version: v2.36.0 # Checking npm registry... -# Updated to v2.37.0. Restart GSD to use the new version. +# Updated to v2.37.0. Restart SF to use the new version. ``` 如果已经是最新版本,它会给出提示且不做任何操作。 diff --git a/docs/zh-CN/user-docs/configuration.md b/docs/zh-CN/user-docs/configuration.md index 7548e6fa2..8423847cb 100644 --- a/docs/zh-CN/user-docs/configuration.md +++ b/docs/zh-CN/user-docs/configuration.md @@ -1,6 +1,6 @@ # 配置 -GSD 偏好设置保存在 `~/.gsd/PREFERENCES.md`(全局)或 `.gsd/PREFERENCES.md`(项目级)中。可以通过 `/gsd prefs` 进行交互式管理。 +SF 偏好设置保存在 `~/.gsd/PREFERENCES.md`(全局)或 `.gsd/PREFERENCES.md`(项目级)中。可以通过 `/gsd prefs` 进行交互式管理。 ## `/gsd prefs` 命令 @@ -12,7 +12,7 @@ GSD 偏好设置保存在 `~/.gsd/PREFERENCES.md`(全局)或 `.gsd/PREFERENC | `/gsd prefs status` | 显示当前偏好文件、合并后的值以及 skill 解析状态 | | `/gsd prefs wizard` | `/gsd prefs global` 的别名 | | `/gsd prefs setup` | `/gsd prefs wizard` 的别名;若偏好文件不存在会自动创建 | -| `/gsd prefs import-claude` | 将 Claude marketplace plugins 和 skills 以命名空间化的 GSD 组件形式导入 | +| `/gsd prefs import-claude` | 将 Claude marketplace plugins 和 skills 以命名空间化的 SF 组件形式导入 | | `/gsd prefs import-claude global` | 导入到全局作用域 | | `/gsd prefs import-claude project` | 导入到项目作用域 | @@ -80,11 +80,11 @@ token_profile: balanced ## MCP Servers -GSD 可以连接配置在项目文件中的外部 MCP servers。这适合接入本地工具、内部 API、自托管服务,或者那些未作为 GSD 原生扩展内置的集成。 +SF 可以连接配置在项目文件中的外部 MCP servers。这适合接入本地工具、内部 API、自托管服务,或者那些未作为 SF 原生扩展内置的集成。 ### 配置文件位置 -GSD 会从以下项目本地路径读取 MCP client 配置: +SF 会从以下项目本地路径读取 MCP client 配置: - `.mcp.json` - `.gsd/mcp.json` @@ -132,7 +132,7 @@ GSD 会从以下项目本地路径读取 MCP client 配置: ### 验证一个 server -添加配置后,可以在 GSD 会话中这样验证: +添加配置后,可以在 SF 会话中这样验证: ```text mcp_servers @@ -142,7 +142,7 @@ mcp_call(server="my-server", tool="", args={...}) 推荐验证顺序: -1. `mcp_servers`:确认 GSD 能看到配置文件并正确解析 server 条目 +1. `mcp_servers`:确认 SF 能看到配置文件并正确解析 server 条目 2. `mcp_discover`:确认 server 进程能启动,并能响应 `tools/list` 3. `mcp_call`:确认至少有一个真实 tool 可以成功调用 @@ -150,7 +150,7 @@ mcp_call(server="my-server", tool="", args={...}) - 尽量为本地可执行文件和脚本使用绝对路径 - 对于 `stdio` servers,优先在 MCP 配置里显式设置需要的环境变量,而不是依赖交互式 shell profile -- GSD 和 `gsd-mcp-server` 都会自动加载保存在 `~/.gsd/agent/auth.json` 中的 model / tool keys,因此 MCP 配置可以安全地通过 `${ENV_VAR}` 占位符引用这些值,而不必提交原始凭据 +- SF 和 `gsd-mcp-server` 都会自动加载保存在 `~/.gsd/agent/auth.json` 中的 model / tool keys,因此 MCP 配置可以安全地通过 `${ENV_VAR}` 占位符引用这些值,而不必提交原始凭据 - 如果某个 server 是团队共享且适合提交到仓库,通常更适合放在 `.mcp.json` - 如果某个 server 依赖本机路径、个人服务或本地 secrets,更适合放在 `.gsd/mcp.json` @@ -158,12 +158,12 @@ mcp_call(server="my-server", tool="", args={...}) | 变量 | 默认值 | 说明 | |------|--------|------| -| `GSD_HOME` | `~/.gsd` | 全局 GSD 目录。除非单独覆盖,否则其它路径都从这里派生。影响偏好、skills、sessions 以及项目状态。(v2.39) | -| `GSD_PROJECT_ID` | (自动哈希) | 覆盖自动生成的项目身份哈希。这样项目状态会写入 `$GSD_HOME/projects//`,而不是计算出的哈希目录。适用于 CI/CD 或多个克隆共享状态。(v2.39) | -| `GSD_STATE_DIR` | `$GSD_HOME` | 项目状态根目录。控制 `projects//` 的创建位置。对项目状态的优先级高于 `GSD_HOME`。 | -| `GSD_CODING_AGENT_DIR` | `$GSD_HOME/agent` | agent 目录,包含托管资源、扩展和 auth。对 agent 相关路径的优先级高于 `GSD_HOME`。 | -| `GSD_ALLOWED_COMMAND_PREFIXES` | (内置列表) | 允许用于 `!command` 值解析的命令前缀,逗号分隔。会覆盖 settings.json 中的 `allowedCommandPrefixes`。见 [自定义模型:命令允许列表](custom-models.md#command-allowlist)。 | -| `GSD_FETCH_ALLOWED_URLS` | (无) | 对 `fetch_page` URL block 免检的 hostnames,逗号分隔。会覆盖 settings.json 中的 `fetchAllowedUrls`。见 [URL Blocking](#url-blocking-fetch_page)。 | +| `SF_HOME` | `~/.gsd` | 全局 SF 目录。除非单独覆盖,否则其它路径都从这里派生。影响偏好、skills、sessions 以及项目状态。(v2.39) | +| `SF_PROJECT_ID` | (自动哈希) | 覆盖自动生成的项目身份哈希。这样项目状态会写入 `$SF_HOME/projects//`,而不是计算出的哈希目录。适用于 CI/CD 或多个克隆共享状态。(v2.39) | +| `SF_STATE_DIR` | `$SF_HOME` | 项目状态根目录。控制 `projects//` 的创建位置。对项目状态的优先级高于 `SF_HOME`。 | +| `SF_CODING_AGENT_DIR` | `$SF_HOME/agent` | agent 目录,包含托管资源、扩展和 auth。对 agent 相关路径的优先级高于 `SF_HOME`。 | +| `SF_ALLOWED_COMMAND_PREFIXES` | (内置列表) | 允许用于 `!command` 值解析的命令前缀,逗号分隔。会覆盖 settings.json 中的 `allowedCommandPrefixes`。见 [自定义模型:命令允许列表](custom-models.md#command-allowlist)。 | +| `SF_FETCH_ALLOWED_URLS` | (无) | 对 `fetch_page` URL block 免检的 hostnames,逗号分隔。会覆盖 settings.json 中的 `fetchAllowedUrls`。见 [URL Blocking](#url-blocking-fetch_page)。 | ## 全部设置 @@ -195,9 +195,9 @@ models: 你可以在 `~/.gsd/agent/models.json` 里定义自定义 models 和 providers。这允许你添加默认注册表里没有的 models,适合自托管 endpoints(Ollama、vLLM、LM Studio)、微调模型、代理,或者刚发布的新 provider。 -GSD 读取 `models.json` 的顺序如下: +SF 读取 `models.json` 的顺序如下: -1. `~/.gsd/agent/models.json`:主位置(GSD) +1. `~/.gsd/agent/models.json`:主位置(SF) 2. `~/.pi/agent/models.json`:回退位置(Pi) 3. 如果两者都不存在,则创建 `~/.gsd/agent/models.json` @@ -235,11 +235,11 @@ models: provider: bedrock # 可选:固定到某个 provider ``` -当某个 model 切换失败(provider 不可用、被限流、额度耗尽)时,GSD 会自动尝试 `fallbacks` 列表中的下一个 model。 +当某个 model 切换失败(provider 不可用、被限流、额度耗尽)时,SF 会自动尝试 `fallbacks` 列表中的下一个 model。 ### Community Provider Extensions -对于 GSD 未内置的 providers,社区扩展可以添加完整 provider 支持,包括正确的 model 定义、thinking format 配置以及交互式 API key 设置。 +对于 SF 未内置的 providers,社区扩展可以添加完整 provider 支持,包括正确的 model 定义、thinking format 配置以及交互式 API key 设置。 | 扩展 | Provider | Models | 安装命令 | |------|----------|--------|----------| @@ -278,7 +278,7 @@ phases: ### `skill_discovery` -控制 GSD 在自动模式中如何发现并应用 skills。 +控制 SF 在自动模式中如何发现并应用 skills。 | 值 | 行为 | |----|------| @@ -380,10 +380,10 @@ verification_max_retries: 2 # 最大重试次数(默认:2) } ``` -或者设置 `GSD_FETCH_ALLOWED_URLS` 环境变量(逗号分隔)。环境变量优先级高于 settings.json: +或者设置 `SF_FETCH_ALLOWED_URLS` 环境变量(逗号分隔)。环境变量优先级高于 settings.json: ```bash -export GSD_FETCH_ALLOWED_URLS="internal-docs.company.com,192.168.1.50" +export SF_FETCH_ALLOWED_URLS="internal-docs.company.com,192.168.1.50" ``` 被允许的 hostname 会绕过 blocklist 检查。但协议限制依然有效,也就是说 `file://` 和 `ftp://` 仍然不能加入 allowlist。 @@ -425,7 +425,7 @@ git: merge_strategy: squash # worktree 分支合并方式:"squash" 或 "merge" isolation: worktree # git isolation:"worktree"、"branch" 或 "none" commit_docs: true # 是否把 .gsd/ 产物提交到 git(设为 false 时仅保留本地) - manage_gitignore: true # 设为 false 时,GSD 不再修改 .gitignore + manage_gitignore: true # 设为 false 时,SF 不再修改 .gitignore worktree_post_create: .gsd/hooks/post-worktree-create # worktree 创建后执行的脚本 auto_pr: false # milestone 完成时自动创建 PR(要求 push_branches) pr_target_branch: develop # 自动创建 PR 的目标分支(默认:main branch) @@ -443,7 +443,7 @@ git: | `merge_strategy` | string | `"squash"` | worktree 分支合并方式:`"squash"`(合并为单个提交)或 `"merge"`(保留单独提交) | | `isolation` | string | `"worktree"` | 自动模式隔离方式:`"worktree"`(独立目录)、`"branch"`(直接在项目根目录工作,适合子模块多的仓库)、`"none"`(无隔离,直接提交到当前分支) | | `commit_docs` | boolean | `true` | 是否把 `.gsd/` planning 产物提交到 git。设为 `false` 则仅保留本地 | -| `manage_gitignore` | boolean | `true` | 设为 `false` 后,GSD 将完全不修改 `.gitignore`,不会添加基础规则,也不会做自愈 | +| `manage_gitignore` | boolean | `true` | 设为 `false` 后,SF 将完全不修改 `.gitignore`,不会添加基础规则,也不会做自愈 | | `worktree_post_create` | string | (无) | worktree 创建后执行的脚本。环境变量中会传入 `SOURCE_DIR` 和 `WORKTREE_DIR` | | `auto_pr` | boolean | `false` | milestone 完成时自动创建 pull request。要求 `auto_push: true` 且已安装认证 `gh` CLI | | `pr_target_branch` | string | (main branch) | 自动创建 PR 的目标分支,例如 `develop`、`qa`。未设置时默认回退到 `main_branch` | @@ -472,7 +472,7 @@ cp "$SOURCE_DIR/.env.local" "$WORKTREE_DIR/.env.local" 2>/dev/null || true ln -sf "$SOURCE_DIR/assets" "$WORKTREE_DIR/assets" ``` -路径既可以是绝对路径,也可以相对项目根目录。脚本有 30 秒超时限制。失败不会中断流程,GSD 会记录告警后继续。 +路径既可以是绝对路径,也可以相对项目根目录。脚本有 30 秒超时限制。失败不会中断流程,SF 会记录告警后继续。 #### `git.auto_pr` @@ -493,16 +493,16 @@ git: **工作方式:** -1. milestone 完成后,GSD 先把 worktree squash merge 回主分支 +1. milestone 完成后,SF 先把 worktree squash merge 回主分支 2. 如果 `auto_push: true`,把主分支推送到远程 3. 把 milestone 分支推送到远程 4. 通过 `gh pr create` 从 milestone 分支向 `pr_target_branch` 创建 PR -如果没有设置 `pr_target_branch`,PR 会默认指向 `main_branch`(或者自动检测出的主分支)。PR 创建失败不会中断流程,GSD 会记录日志后继续。 +如果没有设置 `pr_target_branch`,PR 会默认指向 `main_branch`(或者自动检测出的主分支)。PR 创建失败不会中断流程,SF 会记录日志后继续。 ### `github`(v2.39) -GitHub 同步配置。启用后,GSD 会自动把 milestones、slices 和 tasks 同步到 GitHub Issues、PRs 和 Milestones。 +GitHub 同步配置。启用后,SF 会自动把 milestones、slices 和 tasks 同步到 GitHub Issues、PRs 和 Milestones。 ```yaml github: @@ -532,7 +532,7 @@ github: ### `notifications` -控制 GSD 在自动模式中发出哪些通知: +控制 SF 在自动模式中发出哪些通知: ```yaml notifications: @@ -544,7 +544,7 @@ notifications: on_attention: true # 需要人工介入时通知 ``` -**macOS 通知方式:** GSD 会优先使用 [`terminal-notifier`](https://github.com/julienXX/terminal-notifier),不可用时回退到 `osascript`。建议安装 `terminal-notifier`,获得更稳定的通知体验: +**macOS 通知方式:** SF 会优先使用 [`terminal-notifier`](https://github.com/julienXX/terminal-notifier),不可用时回退到 `osascript`。建议安装 `terminal-notifier`,获得更稳定的通知体验: ```bash brew install terminal-notifier diff --git a/docs/zh-CN/user-docs/cost-management.md b/docs/zh-CN/user-docs/cost-management.md index 2b047c6ea..6e4769d2e 100644 --- a/docs/zh-CN/user-docs/cost-management.md +++ b/docs/zh-CN/user-docs/cost-management.md @@ -1,6 +1,6 @@ # 成本管理 -GSD 会跟踪自动模式中每个派发工作单元的 Token 使用量和成本。这些数据会驱动仪表板、预算约束以及成本预测。 +SF 会跟踪自动模式中每个派发工作单元的 Token 使用量和成本。这些数据会驱动仪表板、预算约束以及成本预测。 ## 成本跟踪 @@ -52,7 +52,7 @@ budget_enforcement: pause # 设置 ceiling 后的默认值 ## 成本预测 -当至少完成两个 slices 后,GSD 会预测剩余成本: +当至少完成两个 slices 后,SF 会预测剩余成本: ``` Projected remaining: $12.40 ($6.20/slice avg × 2 remaining) diff --git a/docs/zh-CN/user-docs/custom-models.md b/docs/zh-CN/user-docs/custom-models.md index 24346fd05..fc24f40d4 100644 --- a/docs/zh-CN/user-docs/custom-models.md +++ b/docs/zh-CN/user-docs/custom-models.md @@ -36,7 +36,7 @@ `apiKey` 在 schema 中是必填,但 Ollama 会忽略它,因此任意值都可以。 -有些 OpenAI-compatible server 不支持推理模型使用的 `developer` role。对于这类 provider,需要把 `compat.supportsDeveloperRole` 设为 `false`,这样 GSD 会改用 `system` message 发送 system prompt。如果该 server 同时也不支持 `reasoning_effort`,还应把 `compat.supportsReasoningEffort` 也设为 `false`。 +有些 OpenAI-compatible server 不支持推理模型使用的 `developer` role。对于这类 provider,需要把 `compat.supportsDeveloperRole` 设为 `false`,这样 SF 会改用 `system` message 发送 system prompt。如果该 server 同时也不支持 `reasoning_effort`,还应把 `compat.supportsReasoningEffort` 也设为 `false`。 你可以在 provider 级别设置 `compat`,让它应用到该 provider 下的所有 models;也可以在 model 级别单独覆盖某个 model。这个设置常见于 Ollama、vLLM、SGLang 以及类似的 OpenAI-compatible server。 @@ -159,10 +159,10 @@ Shell 命令(`!command`)只能执行一组已知的凭据工具。只有以 这会完全替换默认列表,因此如果你还想保留默认命令,需要一起写进去。 -你也可以设置 `GSD_ALLOWED_COMMAND_PREFIXES` 环境变量(逗号分隔)。环境变量优先级高于 settings.json: +你也可以设置 `SF_ALLOWED_COMMAND_PREFIXES` 环境变量(逗号分隔)。环境变量优先级高于 settings.json: ```bash -export GSD_ALLOWED_COMMAND_PREFIXES="pass,op,sops,doppler" +export SF_ALLOWED_COMMAND_PREFIXES="pass,op,sops,doppler" ``` > **注意:** 这是一个仅全局生效的设置。项目级 settings.json(`/.gsd/settings.json`)不能覆盖命令 allowlist,以防克隆下来的仓库提升命令执行权限。 @@ -307,7 +307,7 @@ export GSD_ALLOWED_COMMAND_PREFIXES="pass,op,sops,doppler" | `supportsStore` | Provider 是否支持 `store` 字段 | | `supportsDeveloperRole` | 是否使用 `developer` 而非 `system` role | | `supportsReasoningEffort` | 是否支持 `reasoning_effort` 参数 | -| `reasoningEffortMap` | 把 GSD 的 thinking levels 映射到 provider 专属 `reasoning_effort` 值 | +| `reasoningEffortMap` | 把 SF 的 thinking levels 映射到 provider 专属 `reasoning_effort` 值 | | `supportsUsageInStreaming` | 是否支持 `stream_options: { include_usage: true }`(默认 `true`) | | `maxTokensField` | 使用 `max_completion_tokens` 还是 `max_tokens` | | `requiresToolResultName` | tool result message 中是否必须包含 `name` | diff --git a/docs/zh-CN/user-docs/getting-started.md b/docs/zh-CN/user-docs/getting-started.md index 0d1bd3d5e..dfb2e95d5 100644 --- a/docs/zh-CN/user-docs/getting-started.md +++ b/docs/zh-CN/user-docs/getting-started.md @@ -1,6 +1,6 @@ -# GSD 快速开始 +# SF 快速开始 -GSD 是一个 AI 编程代理,负责规划、执行、验证和交付,让你可以把注意力放在“要构建什么”上。本指南会带你完成 macOS、Windows 和 Linux 的安装,并启动你的第一个会话。 +SF 是一个 AI 编程代理,负责规划、执行、验证和交付,让你可以把注意力放在“要构建什么”上。本指南会带你完成 macOS、Windows 和 Linux 的安装,并启动你的第一个会话。 --- @@ -41,10 +41,10 @@ node --version # 应输出 v22.x 或更高 git --version # 应输出 2.20+ ``` -**第 4 步:安装 GSD:** +**第 4 步:安装 SF:** ```bash -npm install -g gsd-pi +npm install -g sf-run ``` **第 5 步:设置你的 LLM provider:** @@ -66,7 +66,7 @@ source ~/.zshrc 所有 20+ provider 的完整配置方式请见 [提供商设置指南](./providers.md)。 -**第 6 步:启动 GSD:** +**第 6 步:启动 SF:** ```bash cd ~/my-project # 进入任意项目目录 @@ -113,10 +113,10 @@ node --version # 应输出 v22.x 或更高 git --version # 应输出 2.20+ ``` -**第 4 步:安装 GSD:** +**第 4 步:安装 SF:** ```powershell -npm install -g gsd-pi +npm install -g sf-run ``` **第 5 步:设置你的 LLM provider:** @@ -137,7 +137,7 @@ gsd config 所有 20+ provider 的完整配置方式请见 [提供商设置指南](./providers.md)。 -**第 6 步:启动 GSD:** +**第 6 步:启动 SF:** ```powershell cd C:\Users\you\my-project # 进入任意项目目录 @@ -217,10 +217,10 @@ node --version # 应输出 v22.x 或更高 git --version # 应输出 2.20+ ``` -**第 3 步:安装 GSD:** +**第 3 步:安装 SF:** ```bash -npm install -g gsd-pi +npm install -g sf-run ``` **第 4 步:设置你的 LLM provider:** @@ -242,7 +242,7 @@ source ~/.bashrc 所有 20+ provider 的完整配置方式请见 [提供商设置指南](./providers.md)。 -**第 5 步:启动 GSD:** +**第 5 步:启动 SF:** ```bash cd ~/my-project # 进入任意项目目录 @@ -263,7 +263,7 @@ gsd --version # 输出已安装版本 > npm config set prefix '~/.npm-global' > echo 'export PATH="$HOME/.npm-global/bin:$PATH"' >> ~/.bashrc > source ~/.bashrc -> npm install -g gsd-pi +> npm install -g sf-run > ``` --- @@ -272,11 +272,11 @@ gsd --version # 输出已安装版本 > **下载链接:** [Docker Desktop](https://www.docker.com/products/docker-desktop/) -如果你不想在宿主机安装 Node.js,可以在隔离沙箱中运行 GSD。 +如果你不想在宿主机安装 Node.js,可以在隔离沙箱中运行 SF。 **第 1 步:安装 Docker Desktop**(要求 4.58+)。 -**第 2 步:克隆 GSD 仓库:** +**第 2 步:克隆 SF 仓库:** ```bash git clone https://github.com/singularity-forge/sf-run.git @@ -290,7 +290,7 @@ docker sandbox create --template . --name gsd-sandbox docker sandbox exec -it gsd-sandbox bash ``` -**第 4 步:设置 API key 并运行 GSD:** +**第 4 步:设置 API key 并运行 SF:** ```bash export ANTHROPIC_API_KEY="sk-ant-..." @@ -305,7 +305,7 @@ gsd auto "implement the feature described in issue #42" ### 选择模型 -完成 provider 设置后,GSD 会自动选择一个默认模型。你可以在会话中随时切换: +完成 provider 设置后,SF 会自动选择一个默认模型。你可以在会话中随时切换: ``` /model @@ -319,7 +319,7 @@ gsd auto "implement the feature described in issue #42" ### 步骤模式 — `/gsd` -在会话内输入 `/gsd`。GSD 会一次执行一个工作单元,并在每一步之间暂停,通过向导展示刚完成了什么、下一步是什么。 +在会话内输入 `/gsd`。SF 会一次执行一个工作单元,并在每一步之间暂停,通过向导展示刚完成了什么、下一步是什么。 - **没有 `.gsd/` 目录**:启动讨论流程,先收集你的项目愿景 - **已有 milestone,但没有 roadmap**:讨论或研究该 milestone @@ -330,7 +330,7 @@ gsd auto "implement the feature described in issue #42" ### 自动模式 — `/gsd auto` -输入 `/gsd auto` 后就可以离开。GSD 会自主完成 research、planning、execution、verification、commit,并持续推进每个 slice,直到 milestone 完成。 +输入 `/gsd auto` 后就可以离开。SF 会自主完成 research、planning、execution、verification、commit,并持续推进每个 slice,直到 milestone 完成。 ``` /gsd auto @@ -364,7 +364,7 @@ gsd --- -## GSD 如何组织工作 +## SF 如何组织工作 ``` Milestone → 一个可交付版本(4-10 个 slice) @@ -396,19 +396,19 @@ Milestone → 一个可交付版本(4-10 个 slice) ## VS Code 扩展 -GSD 也提供 VS Code 扩展。你可以从扩展市场安装(publisher: FluxLabs),或者在 VS Code 扩展面板中直接搜索 “GSD”: +SF 也提供 VS Code 扩展。你可以从扩展市场安装(publisher: FluxLabs),或者在 VS Code 扩展面板中直接搜索 “SF”: - **`@gsd` 聊天参与者**:在 VS Code Chat 中直接与 agent 对话 - **侧边栏仪表板**:显示连接状态、模型信息、Token 使用量 - **完整命令面板**:启动 / 停止 agent、切换模型、导出会话 -CLI(`gsd-pi`)需要先安装好,扩展会通过 RPC 与其连接。 +CLI(`sf-run`)需要先安装好,扩展会通过 RPC 与其连接。 --- ## Web 界面 -GSD 也提供一个基于浏览器的可视化项目管理界面: +SF 也提供一个基于浏览器的可视化项目管理界面: ```bash gsd --web @@ -434,12 +434,12 @@ gsd sessions --- -## 更新 GSD +## 更新 SF -GSD 每 24 小时检查一次更新,并在启动时提示。你也可以手动更新: +SF 每 24 小时检查一次更新,并在启动时提示。你也可以手动更新: ```bash -npm update -g gsd-pi +npm update -g sf-run ``` 或者在会话中执行: @@ -456,7 +456,7 @@ npm update -g gsd-pi |------|----------| | `command not found: gsd` | 把 npm 全局 bin 目录加入 PATH(见上面的系统说明) | | `gsd` 实际执行了 `git svn dcommit` | oh-my-zsh 冲突,执行 `unalias gsd` 或改用 `gsd-cli` | -| `npm install -g gsd-pi` 权限错误 | 修复 npm prefix(见 Linux 说明)或改用 nvm | +| `npm install -g sf-run` 权限错误 | 修复 npm prefix(见 Linux 说明)或改用 nvm | | 无法连接到 LLM | 用 `gsd config` 检查 API key,并确认网络可用 | | `gsd` 启动时卡住 | 检查 Node.js 版本:`node --version`(需要 22+) | diff --git a/docs/zh-CN/user-docs/git-strategy.md b/docs/zh-CN/user-docs/git-strategy.md index 5f713610a..6520e6f56 100644 --- a/docs/zh-CN/user-docs/git-strategy.md +++ b/docs/zh-CN/user-docs/git-strategy.md @@ -1,10 +1,10 @@ # Git 策略 -GSD 使用 git 来实现 milestone 隔离,以及每个 milestone 内部的顺序提交。你可以通过 **isolation mode** 控制工作发生在哪里。整个策略是自动化的,你不需要手工管理分支。 +SF 使用 git 来实现 milestone 隔离,以及每个 milestone 内部的顺序提交。你可以通过 **isolation mode** 控制工作发生在哪里。整个策略是自动化的,你不需要手工管理分支。 ## 隔离模式 -GSD 支持三种隔离模式,通过 `git.isolation` 偏好设置: +SF 支持三种隔离模式,通过 `git.isolation` 偏好设置: | 模式 | 工作目录 | 分支 | 适用场景 | |------|----------|------|----------| @@ -26,7 +26,7 @@ GSD 支持三种隔离模式,通过 `git.isolation` 偏好设置: ### `none` 模式 -工作直接发生在当前分支。没有 worktree,也没有 milestone 分支。GSD 依然会按顺序提交,并使用 conventional commit message,但不会提供分支级隔离。 +工作直接发生在当前分支。没有 worktree,也没有 milestone 分支。SF 依然会按顺序提交,并使用 conventional commit message,但不会提供分支级隔离。 适用于热重载工作流中“文件隔离会破坏开发工具”的情况(例如只能监视项目根目录的文件监听器),或者很小的项目里不值得承担分支开销的情况。 @@ -75,16 +75,16 @@ main ───────────────────────── ### 提交格式 -提交使用 conventional commit 格式,并在 trailer 中带上 GSD 元数据: +提交使用 conventional commit 格式,并在 trailer 中带上 SF 元数据: ``` feat: core type definitions -GSD-Task: M001/S01/T01 +SF-Task: M001/S01/T01 feat: markdown parser for plan files -GSD-Task: M001/S01/T02 +SF-Task: M001/S01/T02 ``` ## Worktree 管理 @@ -156,7 +156,7 @@ git: ### 自动创建 Pull Request -对于使用 Gitflow 或分支工作流的团队,GSD 可以在 milestone 完成时自动创建 pull request: +对于使用 Gitflow 或分支工作流的团队,SF 可以在 milestone 完成时自动创建 pull request: ```yaml git: @@ -169,11 +169,11 @@ git: ### `commit_docs: false` -当设置为 `false` 时,GSD 会把 `.gsd/` 添加到 `.gitignore`,所有规划产物只保留在本地。适合只有部分成员使用 GSD 的团队,或者公司要求仓库保持干净的场景。 +当设置为 `false` 时,SF 会把 `.gsd/` 添加到 `.gitignore`,所有规划产物只保留在本地。适合只有部分成员使用 SF 的团队,或者公司要求仓库保持干净的场景。 ## 自愈能力 -GSD 内置了对常见 git 问题的自动恢复: +SF 内置了对常见 git 问题的自动恢复: - **Detached HEAD**:自动重新附着到正确分支 - **过期锁文件**:移除崩溃进程残留的 `index.lock` @@ -183,4 +183,4 @@ GSD 内置了对常见 git 问题的自动恢复: ## 原生 Git 操作 -从 v2.16 起,GSD 在派发热路径中的读密集 git 操作改用 libgit2 原生绑定。这消除了每次派发周期中约 70 次进程拉起,从而提升了自动模式吞吐量。 +从 v2.16 起,SF 在派发热路径中的读密集 git 操作改用 libgit2 原生绑定。这消除了每次派发周期中约 70 次进程拉起,从而提升了自动模式吞吐量。 diff --git a/docs/zh-CN/user-docs/migration.md b/docs/zh-CN/user-docs/migration.md index 56dd61d7f..0524450e3 100644 --- a/docs/zh-CN/user-docs/migration.md +++ b/docs/zh-CN/user-docs/migration.md @@ -1,6 +1,6 @@ # 从 v1 迁移 -如果你有仍在使用原始 Get Shit Done(v1)`.planning` 目录结构的项目,可以把它们迁移到 GSD-2 的 `.gsd` 格式。 +如果你有仍在使用原始 Singularity Forge(v1)`.planning` 目录结构的项目,可以把它们迁移到 SF 的 `.gsd` 格式。 ## 运行迁移 diff --git a/docs/zh-CN/user-docs/node-lts-macos.md b/docs/zh-CN/user-docs/node-lts-macos.md index f23b19ff0..42895afe2 100644 --- a/docs/zh-CN/user-docs/node-lts-macos.md +++ b/docs/zh-CN/user-docs/node-lts-macos.md @@ -2,7 +2,7 @@ 如果你是通过 Homebrew 安装 Node.js(`brew install node`),那你跟踪的是**当前最新正式版本**,其中可能包含奇数版本的开发分支(例如 23.x、25.x)。这些版本并不是 LTS,可能带来破坏性变更或稳定性问题。 -GSD 要求 Node.js **v22 或更高版本**,并且在 **LTS(偶数版本)** 上运行效果最好。本指南展示如何用 Homebrew 固定到 Node 24 LTS。 +SF 要求 Node.js **v22 或更高版本**,并且在 **LTS(偶数版本)** 上运行效果最好。本指南展示如何用 Homebrew 固定到 Node 24 LTS。 ## 检查当前版本 @@ -37,7 +37,7 @@ node --version ## 为什么要固定到 LTS? - **稳定性**:LTS 版本会在 30 个月内持续收到 bug 修复和安全更新 -- **兼容性**:包括 GSD 在内的 npm 包通常都会优先测试 LTS 版本 +- **兼容性**:包括 SF 在内的 npm 包通常都会优先测试 LTS 版本 - **可预期**:`brew upgrade` 不会把你突然升级到不稳定的开发版 ## 防止误升级 @@ -64,12 +64,12 @@ brew unpin node@24 这些工具允许你通过 `.node-version` 或 `.nvmrc` 为不同项目设置独立的 Node 版本。 -## 验证 GSD 是否正常工作 +## 验证 SF 是否正常工作 固定版本后,执行: ```bash node --version # v24.x.x -npm install -g gsd-pi +npm install -g sf-run gsd --version ``` diff --git a/docs/zh-CN/user-docs/parallel-orchestration.md b/docs/zh-CN/user-docs/parallel-orchestration.md index 0b75c0275..90311badf 100644 --- a/docs/zh-CN/user-docs/parallel-orchestration.md +++ b/docs/zh-CN/user-docs/parallel-orchestration.md @@ -22,7 +22,7 @@ parallel: /gsd parallel start ``` -GSD 会扫描所有 milestones,检查依赖与文件重叠,给出一份可并行性报告,并为符合条件的 milestones 启动 workers。 +SF 会扫描所有 milestones,检查依赖与文件重叠,给出一份可并行性报告,并为符合条件的 milestones 启动 workers。 3. 监控进度: @@ -42,7 +42,7 @@ GSD 会扫描所有 milestones,检查依赖与文件重叠,给出一份可 ``` ┌─────────────────────────────────────────────────────────┐ -│ Coordinator(你的 GSD 会话) │ +│ Coordinator(你的 SF 会话) │ │ │ │ 职责: │ │ - 可并行性分析(依赖 + 文件重叠) │ @@ -73,7 +73,7 @@ GSD 会扫描所有 milestones,检查依赖与文件重叠,给出一份可 |------|----------| | **文件系统** | Git worktree:每个 worker 都有自己的 checkout | | **Git 分支** | `milestone/`:每个 milestone 一条分支 | -| **状态推导** | 通过 `GSD_MILESTONE_LOCK` 环境变量,让 `deriveState()` 只看到被分配的 milestone | +| **状态推导** | 通过 `SF_MILESTONE_LOCK` 环境变量,让 `deriveState()` 只看到被分配的 milestone | | **上下文窗口** | 独立进程:每个 worker 都有自己的 agent sessions | | **指标** | 每个 worktree 都有自己的 `.gsd/metrics.json` | | **崩溃恢复** | 每个 worktree 都有自己的 `.gsd/auto.lock` | @@ -88,7 +88,7 @@ Workers 和 coordinator 通过基于文件的 IPC 通信: ## 可并行性分析 -在真正启动并行执行之前,GSD 会先检查哪些 milestones 可以安全并发运行。 +在真正启动并行执行之前,SF 会先检查哪些 milestones 可以安全并发运行。 ### 规则 @@ -251,8 +251,8 @@ Coordinator 会在 `refreshWorkerStatuses()` 中执行 stale detection,并自 | **Feature flag** | 默认 `parallel.enabled: false`,不影响现有用户 | | **可并行性分析** | 启动前检查依赖和文件重叠 | | **Worker 隔离** | 独立进程、worktrees、分支、上下文窗口 | -| **`GSD_MILESTONE_LOCK`** | 每个 worker 在状态推导时只能看到自己的 milestone | -| **`GSD_PARALLEL_WORKER`** | Worker 不能再嵌套启动新的并行会话 | +| **`SF_MILESTONE_LOCK`** | 每个 worker 在状态推导时只能看到自己的 milestone | +| **`SF_PARALLEL_WORKER`** | Worker 不能再嵌套启动新的并行会话 | | **预算上限** | 跨所有 workers 执行聚合成本限制 | | **信号式关闭** | 通过文件信号 + SIGTERM 优雅停止 | | **Doctor 集成** | 检测并清理孤儿会话 | diff --git a/docs/zh-CN/user-docs/providers.md b/docs/zh-CN/user-docs/providers.md index e19a5e910..22c38ae6c 100644 --- a/docs/zh-CN/user-docs/providers.md +++ b/docs/zh-CN/user-docs/providers.md @@ -1,6 +1,6 @@ # Provider 设置指南 -这是一份覆盖 GSD 所有受支持 LLM providers 的分步配置指南。如果你已经运行过 onboarding 向导(`gsd config`)并选择了 provider,很可能已经配置完成,可以在会话中用 `/model` 检查。 +这是一份覆盖 SF 所有受支持 LLM providers 的分步配置指南。如果你已经运行过 onboarding 向导(`gsd config`)并选择了 provider,很可能已经配置完成,可以在会话中用 `/model` 检查。 ## 目录 @@ -51,7 +51,7 @@ ## 内置 Providers -内置 providers 的 models 已经预注册在 GSD 里。你只需要提供认证信息。 +内置 providers 的 models 已经预注册在 SF 里。你只需要提供认证信息。 ### Anthropic(Claude) @@ -70,28 +70,28 @@ export ANTHROPIC_API_KEY="sk-ant-..." **选项 B:Claude Code CLI** -如果你有 Claude Pro 或 Max 订阅,可以通过 Anthropic 官方的 Claude Code CLI 完成认证。安装后执行 `claude` 登录,随后 GSD 会自动检测并经由该通道路由: +如果你有 Claude Pro 或 Max 订阅,可以通过 Anthropic 官方的 Claude Code CLI 完成认证。安装后执行 `claude` 登录,随后 SF 会自动检测并经由该通道路由: ```bash # 安装 Claude Code CLI(见 https://docs.anthropic.com/en/docs/claude-code) claude -# 按提示登录,然后启动 GSD +# 按提示登录,然后启动 SF gsd ``` -GSD 会检测你本地的 Claude Code 安装,并把它作为已认证的 Anthropic surface 使用。这是 Anthropic 订阅用户符合 TOS 的方式,GSD 不会直接处理你的订阅凭据。 +SF 会检测你本地的 Claude Code 安装,并把它作为已认证的 Anthropic surface 使用。这是 Anthropic 订阅用户符合 TOS 的方式,SF 不会直接处理你的订阅凭据。 -> **注意:** GSD 不支持 Anthropic 的浏览器 OAuth 登录。请改用 API key 或 Claude Code CLI。 +> **注意:** SF 不支持 Anthropic 的浏览器 OAuth 登录。请改用 API key 或 Claude Code CLI。 -**选项 C:在 Claude Code 里直接用 Claude Pro / Max 订阅跑 GSD** +**选项 C:在 Claude Code 里直接用 Claude Pro / Max 订阅跑 SF** -如果你已经有 Claude Pro / Max 订阅,并希望直接在 Claude Code 里使用 GSD 的 planning、execution 和 milestone orchestration,而不是切到单独终端,那么可以把 GSD 接成一个 MCP server。这样 Claude Code 就能通过 [Model Context Protocol](https://modelcontextprotocol.io) 使用 GSD 的完整 workflow 工具集,在你现有 Claude plan 的驱动下获得 GSD 的结构化项目管理能力。 +如果你已经有 Claude Pro / Max 订阅,并希望直接在 Claude Code 里使用 SF 的 planning、execution 和 milestone orchestration,而不是切到单独终端,那么可以把 SF 接成一个 MCP server。这样 Claude Code 就能通过 [Model Context Protocol](https://modelcontextprotocol.io) 使用 SF 的完整 workflow 工具集,在你现有 Claude plan 的驱动下获得 SF 的结构化项目管理能力。 **自动配置(推荐)** -当 GSD 在启动时检测到 Claude Code model,它会自动在项目根目录写入一个带有 GSD workflow MCP server 配置的 `.mcp.json` 文件。无需手动步骤,只要以 Claude Code 作为 provider 启动一次 GSD,配置就会自动生成。 +当 SF 在启动时检测到 Claude Code model,它会自动在项目根目录写入一个带有 SF workflow MCP server 配置的 `.mcp.json` 文件。无需手动步骤,只要以 Claude Code 作为 provider 启动一次 SF,配置就会自动生成。 -你也可以在 GSD 会话中手动触发: +你也可以在 SF 会话中手动触发: ```bash /gsd mcp init @@ -101,7 +101,7 @@ GSD 会检测你本地的 Claude Code 安装,并把它作为已认证的 Anthr **手动配置** -如果你更希望自己配置,可以把 GSD 加到项目的 `.mcp.json` 中: +如果你更希望自己配置,可以把 SF 加到项目的 `.mcp.json` 中: ```json { @@ -110,7 +110,7 @@ GSD 会检测你本地的 Claude Code 安装,并把它作为已认证的 Anthr "command": "npx", "args": ["gsd-mcp-server"], "env": { - "GSD_CLI_PATH": "/path/to/gsd" + "SF_CLI_PATH": "/path/to/gsd" } } } @@ -129,15 +129,15 @@ GSD 会检测你本地的 Claude Code 安装,并把它作为已认证的 Anthr } ``` -你也可以把这段配置写到 `~/.claude/settings.json` 的 `mcpServers` 中,让 GSD 在所有项目中都可用。 +你也可以把这段配置写到 `~/.claude/settings.json` 的 `mcpServers` 中,让 SF 在所有项目中都可用。 **暴露了什么** -MCP server 会暴露 GSD 的完整 workflow 工具面:milestone planning、task completion、slice 管理、roadmap reassessment、journal 查询等。会话管理工具(`gsd_execute`、`gsd_status`、`gsd_result`、`gsd_cancel`)允许 Claude Code 启动并监控 GSD 自动模式会话。完整工具列表见 [命令 → MCP Server 模式](./commands.md#mcp-server-mode)。 +MCP server 会暴露 SF 的完整 workflow 工具面:milestone planning、task completion、slice 管理、roadmap reassessment、journal 查询等。会话管理工具(`gsd_execute`、`gsd_status`、`gsd_result`、`gsd_cancel`)允许 Claude Code 启动并监控 SF 自动模式会话。完整工具列表见 [命令 → MCP Server 模式](./commands.md#mcp-server-mode)。 **验证连接** -在 GSD 会话里检查 MCP server 是否可达: +在 SF 会话里检查 MCP server 是否可达: ```bash /gsd mcp status @@ -182,7 +182,7 @@ export OPENROUTER_API_KEY="sk-or-..." **第 3 步:切换到 OpenRouter model** -在 GSD 会话中输入 `/model` 并选择一个 OpenRouter model。OpenRouter models 都以 `openrouter/` 为前缀(例如 `openrouter/anthropic/claude-sonnet-4`)。 +在 SF 会话中输入 `/model` 并选择一个 OpenRouter model。OpenRouter models 都以 `openrouter/` 为前缀(例如 `openrouter/anthropic/claude-sonnet-4`)。 **可选:通过 `models.json` 添加自定义 OpenRouter models** @@ -211,7 +211,7 @@ export OPENROUTER_API_KEY="sk-or-..." } ``` -注意:这里的 `apiKey` 字段写的是**环境变量名**,不是字面 key。GSD 会自动解析它。你也可以改用字面值或 shell 命令(见 [值解析](./custom-models.md#value-resolution))。 +注意:这里的 `apiKey` 字段写的是**环境变量名**,不是字面 key。SF 会自动解析它。你也可以改用字面值或 shell 命令(见 [值解析](./custom-models.md#value-resolution))。 **可选:路由到指定上游 provider** @@ -318,7 +318,7 @@ export AZURE_OPENAI_API_KEY="..." ## 本地 Providers -本地 providers 运行在你的机器上。因为 GSD 需要知道 endpoint URL 和可用 models,所以它们都要求配置 `models.json`。 +本地 providers 运行在你的机器上。因为 SF 需要知道 endpoint URL 和可用 models,所以它们都要求配置 `models.json`。 **配置文件位置:** `~/.gsd/agent/models.json` @@ -370,7 +370,7 @@ ollama pull qwen2.5-coder:7b **第 4 步:选择 model** -在 GSD 里输入 `/model`,然后选择你的 Ollama model。 +在 SF 里输入 `/model`,然后选择你的 Ollama model。 **Ollama 提示:** @@ -481,7 +481,7 @@ model `id` 必须与 `vllm serve` 启动时传入的 `--model` 参数完全一 ## 自定义 OpenAI-Compatible Endpoints -任何实现了 OpenAI Chat Completions API 的 server 都可以和 GSD 配合使用。这包括代理(LiteLLM、Portkey、Helicone)、自托管推理服务,以及新出现的 providers。 +任何实现了 OpenAI Chat Completions API 的 server 都可以和 SF 配合使用。这包括代理(LiteLLM、Portkey、Helicone)、自托管推理服务,以及新出现的 providers。 **最快路径:使用 onboarding 向导** @@ -560,15 +560,15 @@ gsd config ### 使用有效 key 仍提示 “Authentication failed” -**原因:** key 虽然设在 shell 中,但 GSD 看不到。 +**原因:** key 虽然设在 shell 中,但 SF 看不到。 **解决:** 确认你是在同一个终端里 `export` 了该环境变量并运行 `gsd`。或者直接用 `gsd config` 把 key 保存进 `~/.gsd/agent/auth.json`,这样就能跨会话持久化。 ### OpenRouter models 没出现在 `/model` -**原因:** 没有设置 `OPENROUTER_API_KEY`,因此 GSD 会隐藏 OpenRouter models。 +**原因:** 没有设置 `OPENROUTER_API_KEY`,因此 SF 会隐藏 OpenRouter models。 -**解决:** 设置 key 并重启 GSD: +**解决:** 设置 key 并重启 SF: ```bash export OPENROUTER_API_KEY="sk-or-..." @@ -599,7 +599,7 @@ ollama pull llama3.1:8b **原因:** 大多数本地推理 server 不支持 OpenAI 的 `developer` message role。 -**解决:** 在 provider 配置里添加 `compat.supportsDeveloperRole: false`。这样 GSD 会改用 `system` message: +**解决:** 在 provider 配置里添加 `compat.supportsDeveloperRole: false`。这样 SF 会改用 `system` message: ```json { @@ -636,7 +636,7 @@ ollama pull llama3.1:8b ### 自定义 models 的成本显示为 `$0.00` -这是**预期行为**。GSD 对自定义 models 的默认成本就是 0。如果你想获得准确的成本跟踪,需要自己填写 `cost` 字段: +这是**预期行为**。SF 对自定义 models 的默认成本就是 0。如果你想获得准确的成本跟踪,需要自己填写 `cost` 字段: ```json "cost": { "input": 0.15, "output": 0.60, "cacheRead": 0.015, "cacheWrite": 0.19 } @@ -651,7 +651,7 @@ ollama pull llama3.1:8b 完成 provider 配置后: -1. **启动 GSD:** +1. **启动 SF:** ```bash gsd ``` diff --git a/docs/zh-CN/user-docs/remote-questions.md b/docs/zh-CN/user-docs/remote-questions.md index bdf534bf6..ac2f93728 100644 --- a/docs/zh-CN/user-docs/remote-questions.md +++ b/docs/zh-CN/user-docs/remote-questions.md @@ -1,6 +1,6 @@ # 远程提问 -在无头自动模式下运行时,远程提问允许 GSD 通过 Slack、Discord 或 Telegram 请求用户输入。当 GSD 遇到需要人工判断的决策点时,它会把问题发到你配置好的频道,并轮询等待响应。 +在无头自动模式下运行时,远程提问允许 SF 通过 Slack、Discord 或 Telegram 请求用户输入。当 SF 遇到需要人工判断的决策点时,它会把问题发到你配置好的频道,并轮询等待响应。 ## 设置 @@ -83,13 +83,13 @@ remote_questions: ## 工作原理 -1. GSD 在自动模式过程中遇到一个决策点 +1. SF 在自动模式过程中遇到一个决策点 2. 问题会以富文本 embed(Discord)或 Block Kit 消息(Slack)的形式发送到你配置的频道 -3. GSD 按设定的间隔轮询响应 +3. SF 按设定的间隔轮询响应 4. 你可以通过以下方式回复: - **添加数字表情回应**(1️⃣、2️⃣ 等),适用于单问题提示 - **回复消息内容**,可以是数字(`1`)、逗号分隔数字(`1,3`)或自由文本 -5. GSD 读取到响应后继续执行 +5. SF 读取到响应后继续执行 6. 提示消息上会追加一个 ✅ 反应,表示已收到 ### 响应格式 @@ -107,7 +107,7 @@ remote_questions: ### 超时 -如果在 `timeout_minutes` 内没有收到响应,提示会超时,GSD 将带着超时结果继续执行。LLM 会根据当前上下文处理超时,通常是做一个保守默认选择,或者暂停自动模式。 +如果在 `timeout_minutes` 内没有收到响应,提示会超时,SF 将带着超时结果继续执行。LLM 会根据当前上下文处理超时,通常是做一个保守默认选择,或者暂停自动模式。 ## 命令 diff --git a/docs/zh-CN/user-docs/skills.md b/docs/zh-CN/user-docs/skills.md index 63ce71778..a32733123 100644 --- a/docs/zh-CN/user-docs/skills.md +++ b/docs/zh-CN/user-docs/skills.md @@ -1,12 +1,12 @@ # 技能 -技能(Skills)是当当前 task 匹配时由 GSD 加载的专用指令集。它们为 LLM 提供领域化指导,例如编码模式、框架惯用法、测试策略和工具使用方式。 +技能(Skills)是当当前 task 匹配时由 SF 加载的专用指令集。它们为 LLM 提供领域化指导,例如编码模式、框架惯用法、测试策略和工具使用方式。 -Skills 遵循开放的 [Agent Skills 标准](https://agentskills.io/),并且**不是 GSD 专属格式**。它们同样适用于 Claude Code、OpenAI Codex、Cursor、GitHub Copilot、Windsurf 以及其他 40+ agent。 +Skills 遵循开放的 [Agent Skills 标准](https://agentskills.io/),并且**不是 SF 专属格式**。它们同样适用于 Claude Code、OpenAI Codex、Cursor、GitHub Copilot、Windsurf 以及其他 40+ agent。 ## 技能目录 -GSD 会按优先级顺序从两个位置读取技能: +SF 会按优先级顺序从两个位置读取技能: | 位置 | 范围 | 说明 | |------|------|------| @@ -15,7 +15,7 @@ GSD 会按优先级顺序从两个位置读取技能: 如果出现同名技能,全局技能优先于项目技能。 -> **从 `~/.gsd/agent/skills/` 迁移:** 升级后首次启动时,GSD 会自动把旧版 `~/.gsd/agent/skills/` 中的技能复制到 `~/.agents/skills/`。旧目录会保留,以兼容旧流程。 +> **从 `~/.gsd/agent/skills/` 迁移:** 升级后首次启动时,SF 会自动把旧版 `~/.gsd/agent/skills/` 中的技能复制到 `~/.agents/skills/`。旧目录会保留,以兼容旧流程。 ## 安装技能 @@ -40,7 +40,7 @@ npx skills update ### 入门技能目录 -在执行 `gsd init` 时,GSD 会检测项目技术栈并推荐合适的技能包。对于 brownfield 项目,检测是自动的;对于 greenfield 项目,则由用户选择技术栈。 +在执行 `gsd init` 时,SF 会检测项目技术栈并推荐合适的技能包。对于 brownfield 项目,检测是自动的;对于 greenfield 项目,则由用户选择技术栈。 这个精选目录维护在 `src/resources/extensions/gsd/skill-catalog.ts`。每一条目都会把一个技术栈映射到一个 skills.sh 仓库,以及其中的具体技能名称。 @@ -89,7 +89,7 @@ npx skills update ## 技能发现 -`skill_discovery` 偏好控制 GSD 在自动模式中如何发现技能: +`skill_discovery` 偏好控制 SF 在自动模式中如何发现技能: | 模式 | 行为 | |------|------| @@ -153,7 +153,7 @@ skill_rules: ## 技能生命周期管理 -GSD 会跨自动模式会话跟踪技能表现,并提供健康度数据,帮助你持续维护技能质量。 +SF 会跨自动模式会话跟踪技能表现,并提供健康度数据,帮助你持续维护技能质量。 ### 技能遥测 @@ -190,6 +190,6 @@ skill_staleness_days: 60 # 默认 60;设为 0 表示关闭 ### Heal-Skill(单元后分析) -如果把它配置为 post-unit hook,GSD 可以分析 agent 在执行中是否偏离了某个技能的指令。如果检测到明显漂移(例如 API 模式过时、指导错误),它会把建议修复写到 `.gsd/skill-review-queue.md`,供人工审核。 +如果把它配置为 post-unit hook,SF 可以分析 agent 在执行中是否偏离了某个技能的指令。如果检测到明显漂移(例如 API 模式过时、指导错误),它会把建议修复写到 `.gsd/skill-review-queue.md`,供人工审核。 一个关键设计原则是:技能**永远不会被自动修改**。研究表明,人工策展的技能明显优于自动生成技能,因此保留人工审核是必要的。 diff --git a/docs/zh-CN/user-docs/token-optimization.md b/docs/zh-CN/user-docs/token-optimization.md index a68836fcb..551319061 100644 --- a/docs/zh-CN/user-docs/token-optimization.md +++ b/docs/zh-CN/user-docs/token-optimization.md @@ -2,7 +2,7 @@ *引入于 v2.17.0* -GSD 2.17 引入了一套协同工作的 token 优化系统,在大多数工作负载下可以在不牺牲输出质量的前提下,将 token 使用降低 40-60%。这套系统由三部分构成:**token profiles**、**context compression** 和 **基于复杂度的 task 路由**。 +SF.17 引入了一套协同工作的 token 优化系统,在大多数工作负载下可以在不牺牲输出质量的前提下,将 token 使用降低 40-60%。这套系统由三部分构成:**token profiles**、**context compression** 和 **基于复杂度的 task 路由**。 ## Token Profiles @@ -84,7 +84,7 @@ Dispatch prompt builder 接受一个 `inlineLevel` 参数。在不同级别下 - `buildExecuteTaskPrompt`:丢弃 decisions template,并把历史 summaries 截断到只保留最近一个 - `buildPlanMilestonePrompt`:丢弃 `PROJECT.md`、`REQUIREMENTS.md`、decisions 以及 `secrets-manifest` 等补充 templates - `buildCompleteSlicePrompt`:丢弃 requirements 和 UAT template 的内联 -- `buildCompleteMilestonePrompt`:丢弃根级 GSD 文件内联 +- `buildCompleteMilestonePrompt`:丢弃根级 SF 文件内联 - `buildReassessRoadmapPrompt`:丢弃 project、requirements 和 decisions 文件 这些裁剪是累积式的:`standard` 会丢掉一部分,`minimal` 会丢掉更多;`full` 则保留全部上下文(也就是 v2.17 之前的行为)。 @@ -107,7 +107,7 @@ phases: ## 基于复杂度的 Task 路由 -当启用 dynamic routing 时,GSD 会根据复杂度对每个 task 做分类,并将其路由到合适的 model tier。简单的文档修复会使用更便宜的模型,而复杂的架构工作会获得所需的推理能力。 +当启用 dynamic routing 时,SF 会根据复杂度对每个 task 做分类,并将其路由到合适的 model tier。简单的文档修复会使用更便宜的模型,而复杂的架构工作会获得所需的推理能力。 > **前提条件:** Dynamic routing 需要在偏好设置里显式配置 `models`。如果没有 `models` 段,routing 会被跳过,所有 phases 都会使用会话启动时的 model。Token profiles 会自动设置 `models`。 @@ -168,7 +168,7 @@ Tasks 会通过分析 task plan 来分类: ## 自适应学习(Routing History) -GSD 会随着时间推移记录每个 tier 分配的成功 / 失败情况,并据此调整未来的分类。它默认自动生效,并持久化在 `.gsd/routing-history.json` 中。 +SF 会随着时间推移记录每个 tier 分配的成功 / 失败情况,并据此调整未来的分类。它默认自动生效,并持久化在 `.gsd/routing-history.json` 中。 ### 工作方式 @@ -322,7 +322,7 @@ Anchors 会在 `research-milestone`、`research-slice`、`plan-milestone` 和 `p *引入于 v2.29.0* -GSD 可以在退回到 section-boundary truncation 之前,先做确定性的 prompt compression。这样在上下文超预算时,可以保留更多信息。 +SF 可以在退回到 section-boundary truncation 之前,先做确定性的 prompt compression。这样在上下文超预算时,可以保留更多信息。 ### 压缩策略 @@ -366,7 +366,7 @@ context_selection: smart ### Summary Distillation -如果某个 slice 有 3 个以上依赖 summary,且总量超过 summary 预算,GSD 会先提取结构化核心数据(`provides`、`requires`、`key_files`、`key_decisions`),丢弃冗长 prose 段落,然后才会退回到 section-boundary truncation。 +如果某个 slice 有 3 个以上依赖 summary,且总量超过 summary 预算,SF 会先提取结构化核心数据(`provides`、`requires`、`key_files`、`key_decisions`),丢弃冗长 prose 段落,然后才会退回到 section-boundary truncation。 ### Cache Hit Rate Tracking diff --git a/docs/zh-CN/user-docs/troubleshooting.md b/docs/zh-CN/user-docs/troubleshooting.md index e5526f6ff..a06324b9e 100644 --- a/docs/zh-CN/user-docs/troubleshooting.md +++ b/docs/zh-CN/user-docs/troubleshooting.md @@ -45,7 +45,7 @@ ### 安装后出现 `command not found: gsd` -**症状:** `npm install -g gsd-pi` 成功,但系统找不到 `gsd`。 +**症状:** `npm install -g sf-run` 成功,但系统找不到 `gsd`。 **原因:** npm 的全局 bin 目录没有加入 shell 的 `$PATH`。 @@ -61,7 +61,7 @@ echo 'export PATH="$(npm prefix -g)/bin:$PATH"' >> ~/.zshrc source ~/.zshrc ``` -**临时方案:** 直接执行 `npx gsd-pi`,或使用 `$(npm prefix -g)/bin/gsd`。 +**临时方案:** 直接执行 `npx sf-run`,或使用 `$(npm prefix -g)/bin/gsd`。 **常见原因:** @@ -69,7 +69,7 @@ source ~/.zshrc - **版本管理器(nvm、fnm、mise)**:全局 bin 路径是按版本区分的,需确保版本管理器正确初始化 - **oh-my-zsh**:`gitfast` 插件会把 `gsd` alias 到 `git svn dcommit`。可通过 `alias gsd` 检查,并在需要时取消 alias -### `npm install -g gsd-pi` 失败 +### `npm install -g sf-run` 失败 **常见原因:** @@ -81,7 +81,7 @@ source ~/.zshrc **症状:** 自动模式因为 provider 错误暂停(限流、服务端错误、认证失败)。 -**GSD 的处理方式(v2.26):** +**SF 的处理方式(v2.26):** | 错误类型 | 自动恢复? | 延迟 | |----------|------------|------| @@ -89,7 +89,7 @@ source ~/.zshrc | Server error(500、502、503、`overloaded`) | ✅ 是 | 30 秒 | | Auth / billing(`unauthorized`、`invalid key`) | ❌ 否 | 需要手动恢复 | -对于瞬时错误,GSD 会短暂停顿后自动继续。对于永久性错误,建议配置 fallback models: +对于瞬时错误,SF 会短暂停顿后自动继续。对于永久性错误,建议配置 fallback models: ```yaml models: @@ -113,7 +113,7 @@ models: **症状:** 自动模式无法启动,提示另一个会话正在运行。 -**解决:** GSD 会自动检测过期锁:如果持有锁的 PID 已死亡,则在下次 `/gsd auto` 时清理并重新获取锁。它也会处理 `proper-lockfile` 崩溃后遗留的 `.gsd.lock/` 目录。如果自动恢复失败,可手动删除 `.gsd/auto.lock` 和 `.gsd.lock/`: +**解决:** SF 会自动检测过期锁:如果持有锁的 PID 已死亡,则在下次 `/gsd auto` 时清理并重新获取锁。它也会处理 `proper-lockfile` 崩溃后遗留的 `.gsd.lock/` 目录。如果自动恢复失败,可手动删除 `.gsd/auto.lock` 和 `.gsd.lock/`: ```bash rm -f .gsd/auto.lock @@ -124,7 +124,7 @@ rm -rf "$(dirname .gsd)/.gsd.lock" **症状:** Worktree merge 在 `.gsd/` 文件上失败。 -**解决:** GSD 会自动解决 `.gsd/` 运行时文件上的冲突。对于代码文件的内容冲突,LLM 会先获得一次 fix-merge 会话进行自动修复;若失败,则需要手动解决。 +**解决:** SF 会自动解决 `.gsd/` 运行时文件上的冲突。对于代码文件的内容冲突,LLM 会先获得一次 fix-merge 会话进行自动修复;若失败,则需要手动解决。 ### Pre-dispatch 提示 milestone integration branch 已不存在 @@ -134,25 +134,25 @@ rm -rf "$(dirname .gsd)/.gsd.lock" **当前行为:** -- 如果 GSD 能确定性地恢复到一个安全 branch,就不会再直接 hard-stop 自动模式 +- 如果 SF 能确定性地恢复到一个安全 branch,就不会再直接 hard-stop 自动模式 - 安全回退的顺序是: - 显式配置且存在的 `git.main_branch` - 仓库自动检测到的默认 integration branch(例如 `main` 或 `master`) - 在这种情况下,`/gsd doctor` 会给出 warning,而 `/gsd doctor fix` 会把过期的 metadata 改写为当前有效 branch -- 如果无法确定安全回退 branch,GSD 仍会阻止继续运行 +- 如果无法确定安全回退 branch,SF 仍会阻止继续运行 **解决:** - 先执行 `/gsd doctor fix`,在安全回退很明显时自动改写过期 metadata -- 如果 GSD 仍然阻塞,则请重新创建缺失 branch,或更新 git 偏好设置,让 `git.main_branch` 指向一个真实存在的 branch +- 如果 SF 仍然阻塞,则请重新创建缺失 branch,或更新 git 偏好设置,让 `git.main_branch` 指向一个真实存在的 branch ### 写 `.gsd/` 文件时出现瞬时 `EBUSY` / `EPERM` / `EACCES` **症状:** 在 Windows 上,自动模式或 doctor 在更新 `.gsd/` 文件时偶发 `EBUSY`、`EPERM` 或 `EACCES`。 -**原因:** 杀毒软件、索引器、编辑器或文件监视器可能会在 GSD 执行原子 rename 的瞬间,短暂锁住目标文件或临时文件。 +**原因:** 杀毒软件、索引器、编辑器或文件监视器可能会在 SF 执行原子 rename 的瞬间,短暂锁住目标文件或临时文件。 -**当前行为:** GSD 现在会对这类瞬时 rename 失败做短时、有上界的退避重试;这样既能覆盖短暂锁竞争,也不会因为真正的文件系统问题而无限挂起。 +**当前行为:** SF 现在会对这类瞬时 rename 失败做短时、有上界的退避重试;这样既能覆盖短暂锁竞争,也不会因为真正的文件系统问题而无限挂起。 **解决:** @@ -170,11 +170,11 @@ rm -rf "$(dirname .gsd)/.gsd.lock" ### 孤儿 Web server 进程 -**症状:** `gsd --web` 因端口 3000 已被占用而失败,但实际上并没有运行中的 GSD 会话。 +**症状:** `gsd --web` 因端口 3000 已被占用而失败,但实际上并没有运行中的 SF 会话。 **原因:** 上一次 Web server 退出时未能清理进程。 -**解决:** 已在 v2.42.0+ 修复。现在 GSD 会自动清理过期的 Web server 进程。如果你还在旧版本,可手动终止孤儿进程:`lsof -ti:3000 | xargs kill`。 +**解决:** 已在 v2.42.0+ 修复。现在 SF 会自动清理过期的 Web server 进程。如果你还在旧版本,可手动终止孤儿进程:`lsof -ti:3000 | xargs kill`。 ### 非 JS 项目被 worktree health check 阻挡 @@ -188,7 +188,7 @@ rm -rf "$(dirname .gsd)/.gsd.lock" **症状:** 当系统 locale 不是英语(例如德语)时,Git 命令失败或输出异常。 -**原因:** GSD 之前假设 git 输出永远是英文。 +**原因:** SF 之前假设 git 输出永远是英文。 **解决:** 已在 v2.42.0+ 修复。现在所有 git 命令都会强制 `LC_ALL=C`,从而无论系统 locale 如何,都保证 git 输出一致为英文。 @@ -202,7 +202,7 @@ rm -rf "$(dirname .gsd)/.gsd.lock" - 当前项目里不存在 `.mcp.json` 或 `.gsd/mcp.json` - 配置文件不是合法 JSON -- 你是在另一个项目目录中配置的 server,但当前启动 GSD 的目录不同 +- 你是在另一个项目目录中配置的 server,但当前启动 SF 的目录不同 **解决:** @@ -222,7 +222,7 @@ rm -rf "$(dirname .gsd)/.gsd.lock" **解决:** -- 在 GSD 外部直接运行该命令,确认 server 能真正启动 +- 在 SF 外部直接运行该命令,确认 server 能真正启动 - 检查后端 URL 或依赖服务是否可达 - 如果是本地自定义 server,确认它使用的是 MCP SDK 或正确的 stdio 协议实现 @@ -257,15 +257,15 @@ rm -rf "$(dirname .gsd)/.gsd.lock" - 重新执行 `mcp_discover(server="name")`,确认实际要求的参数名 - 按 `mcp_call(server="name", tool="tool_name", args={...})` 的形式调用 -- 如果你正在开发 GSD 本身,在 schema 变更后重新执行 `npm run build` +- 如果你正在开发 SF 本身,在 schema 变更后重新执行 `npm run build` -### 本地 stdio server 手动可用,但在 GSD 中不可用 +### 本地 stdio server 手动可用,但在 SF 中不可用 -**症状:** 手动执行 server 命令没有问题,但 GSD 连接不上。 +**症状:** 手动执行 server 命令没有问题,但 SF 连接不上。 **常见原因:** -- Server 依赖某些 GSD 不会继承的 shell 状态 +- Server 依赖某些 SF 不会继承的 shell 状态 - 相对路径只有在另一个 working directory 中才成立 - 需要的环境变量存在于你的 shell 中,但没有写进 MCP 配置 @@ -324,16 +324,16 @@ Doctor 会从磁盘上的 plan 和 roadmap 文件重建 `STATE.md`,并修复 ## 获取帮助 -- **GitHub Issues:** [github.com/gsd-build/GSD-2/issues](https://github.com/gsd-build/GSD-2/issues) +- **GitHub Issues:** [github.com/gsd-build/SF/issues](https://github.com/gsd-build/SF/issues) - **Dashboard:** `Ctrl+Alt+G` 或 `/gsd status`,查看实时诊断信息 - **Forensics:** `/gsd forensics`,用于对自动模式失败做结构化事后分析 - **Session logs:** `.gsd/activity/` 中包含用于崩溃取证的 JSONL 会话转储 ## iTerm2 专属问题 -### Ctrl+Alt 快捷键触发了错误动作(例如 Ctrl+Alt+G 打开了外部编辑器,而不是 GSD dashboard) +### Ctrl+Alt 快捷键触发了错误动作(例如 Ctrl+Alt+G 打开了外部编辑器,而不是 SF dashboard) -**症状:** 按下 Ctrl+Alt+G 后,会触发外部编辑器提示(Ctrl+G),而不是 GSD dashboard。其它 Ctrl+Alt 快捷键也表现得像它们对应的 Ctrl-only 快捷键。 +**症状:** 按下 Ctrl+Alt+G 后,会触发外部编辑器提示(Ctrl+G),而不是 SF dashboard。其它 Ctrl+Alt 快捷键也表现得像它们对应的 Ctrl-only 快捷键。 **原因:** iTerm2 默认的 Left Option Key 设置是 “Normal”,这会吞掉 Ctrl+Alt 组合中的 Alt 修饰键。终端实际只收到了 Ctrl,所以 Ctrl+Alt+G 最终变成 Ctrl+G。 @@ -359,7 +359,7 @@ Doctor 会从磁盘上的 plan 和 roadmap 文件重建 `STATE.md`,并修复 ## 数据库问题 -### “GSD database is not available” +### “SF database is not available” **症状:** `gsd_decision_save`(及其别名 `gsd_save_decision`)、`gsd_requirement_update`(及其别名 `gsd_update_requirement`)或 `gsd_summary_save`(及其别名 `gsd_save_summary`)报这个错误。 @@ -381,7 +381,7 @@ Doctor 会从磁盘上的 plan 和 roadmap 文件重建 `STATE.md`,并修复 ### “LSP isn't available in this workspace” -GSD 会根据项目文件自动检测 language servers(例如 `package.json` → TypeScript、`Cargo.toml` → Rust、`go.mod` → Go)。如果没有检测到 server,agent 会跳过 LSP 功能。 +SF 会根据项目文件自动检测 language servers(例如 `package.json` → TypeScript、`Cargo.toml` → Rust、`go.mod` → Go)。如果没有检测到 server,agent 会跳过 LSP 功能。 **查看状态:** @@ -400,7 +400,7 @@ lsp status | Rust | `rustup component add rust-analyzer` | | Go | `go install golang.org/x/tools/gopls@latest` | -安装完成后,执行 `lsp reload` 即可重新检测,无需重启 GSD。 +安装完成后,执行 `lsp reload` 即可重新检测,无需重启 SF。 ## Notifications @@ -409,7 +409,7 @@ lsp status **症状:** 偏好中已设置 `notifications.enabled: true`,但自动模式期间没有任何桌面通知(没有 milestone 完成提示、预算预警或错误通知),同时日志里也没有报错。 -**原因:** GSD 在 macOS 上会把 `osascript display notification` 作为回退方案。这个命令的通知归属你的终端应用(Ghostty、iTerm2、Alacritty、Kitty、Warp 等)。如果该终端应用在 System Settings → Notifications 中没有权限,macOS 会静默丢弃通知,而 `osascript` 仍然返回 0,不会报错。 +**原因:** SF 在 macOS 上会把 `osascript display notification` 作为回退方案。这个命令的通知归属你的终端应用(Ghostty、iTerm2、Alacritty、Kitty、Warp 等)。如果该终端应用在 System Settings → Notifications 中没有权限,macOS 会静默丢弃通知,而 `osascript` 仍然返回 0,不会报错。 很多终端应用只有在成功送出过至少一条通知后,才会出现在通知设置面板里,这就形成了“先能通知,系统才给你配置通知”的鸡生蛋蛋生鸡问题。 @@ -419,16 +419,16 @@ lsp status brew install terminal-notifier ``` -GSD 在检测到 `terminal-notifier` 可用时会自动优先使用它。首次使用时,macOS 会弹出通知权限请求,这是预期行为。 +SF 在检测到 `terminal-notifier` 可用时会自动优先使用它。首次使用时,macOS 会弹出通知权限请求,这是预期行为。 **替代修复方式:** 进入 **System Settings → Notifications**,为你的终端应用启用通知。如果终端应用不在列表中,可以先在 Terminal.app 中手动发送一条测试通知,注册出 “Script Editor”: ```bash -osascript -e 'display notification "test" with title "GSD"' +osascript -e 'display notification "test" with title "SF"' ``` **验证:** 完成任一修复后,用下面命令测试: ```bash -terminal-notifier -title "GSD" -message "working!" -sound Glass +terminal-notifier -title "SF" -message "working!" -sound Glass ``` diff --git a/docs/zh-CN/user-docs/web-interface.md b/docs/zh-CN/user-docs/web-interface.md index a7ddd4aeb..ac42249da 100644 --- a/docs/zh-CN/user-docs/web-interface.md +++ b/docs/zh-CN/user-docs/web-interface.md @@ -2,7 +2,7 @@ > 新增于 v2.41.0 -GSD 提供了基于浏览器的 Web 界面,用于项目管理、实时进度监控以及多项目支持。 +SF 提供了基于浏览器的 Web 界面,用于项目管理、实时进度监控以及多项目支持。 ## 快速开始 @@ -10,7 +10,7 @@ GSD 提供了基于浏览器的 Web 界面,用于项目管理、实时进度 gsd --web ``` -这会启动一个本地 Web 服务器,并在默认浏览器中打开 GSD 仪表板。 +这会启动一个本地 Web 服务器,并在默认浏览器中打开 SF 仪表板。 ### CLI 参数(v2.42.0) @@ -35,13 +35,13 @@ gsd --web --host 0.0.0.0 --port 8080 --allowed-origins "https://example.com" ## 架构 -Web 界面基于 Next.js 构建,并通过桥接服务与 GSD 后端通信。每个项目都会拥有自己的 bridge 实例,以便在并发会话中保持隔离。 +Web 界面基于 Next.js 构建,并通过桥接服务与 SF 后端通信。每个项目都会拥有自己的 bridge 实例,以便在并发会话中保持隔离。 关键组件: - `ProjectBridgeService`:按项目分配的命令路由和 SSE 订阅服务 - `getProjectBridgeServiceForCwd()`:根据项目路径返回独立实例的注册表 -- `resolveProjectCwd()`:从请求 URL 中读取 `?project=`,若不存在则回退到 `GSD_WEB_PROJECT_CWD` +- `resolveProjectCwd()`:从请求 URL 中读取 `?project=`,若不存在则回退到 `SF_WEB_PROJECT_CWD` ## 配置 @@ -51,11 +51,11 @@ Web 界面基于 Next.js 构建,并通过桥接服务与 GSD 后端通信。 | 变量 | 说明 | |------|------| -| `GSD_WEB_PROJECT_CWD` | 当未指定 `?project=` 时使用的默认项目路径 | +| `SF_WEB_PROJECT_CWD` | 当未指定 `?project=` 时使用的默认项目路径 | ## Node v24 兼容性 -Node v24 对类型剥离(type stripping)做了破坏性改动,曾导致 Web 启动时报 `ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`。该问题已在 v2.42.0+ 中修复(#1864)。如果你仍然遇到这个错误,请升级 GSD。 +Node v24 对类型剥离(type stripping)做了破坏性改动,曾导致 Web 启动时报 `ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPING`。该问题已在 v2.42.0+ 中修复(#1864)。如果你仍然遇到这个错误,请升级 SF。 ## 认证令牌持久化 diff --git a/docs/zh-CN/user-docs/working-in-teams.md b/docs/zh-CN/user-docs/working-in-teams.md index f5486ff80..a374af7bf 100644 --- a/docs/zh-CN/user-docs/working-in-teams.md +++ b/docs/zh-CN/user-docs/working-in-teams.md @@ -1,12 +1,12 @@ # 团队协作 -GSD 支持多人并行工作流,让多个开发者可以同时在同一个仓库中工作。 +SF 支持多人并行工作流,让多个开发者可以同时在同一个仓库中工作。 ## 设置 ### 1. 启用 Team Mode -为团队使用配置 GSD 的最简单方法,是在项目偏好中设置 `mode: team`。这会一次性开启唯一 milestone ID、推送分支和预合并检查: +为团队使用配置 SF 的最简单方法,是在项目偏好中设置 `mode: team`。这会一次性开启唯一 milestone ID、推送分支和预合并检查: ```yaml # .gsd/PREFERENCES.md(项目级,提交到 git) @@ -25,7 +25,7 @@ mode: team 共享规划产物(milestones、roadmaps、decisions),同时把运行时文件保留在本地: ```bash -# ── GSD:运行时 / 临时文件(按开发者、按会话隔离)────── +# ── SF:运行时 / 临时文件(按开发者、按会话隔离)────── .gsd/auto.lock .gsd/completed-units.json .gsd/STATE.md @@ -53,19 +53,19 @@ mode: team ```bash git add .gsd/PREFERENCES.md -git commit -m "chore: enable GSD team workflow" +git commit -m "chore: enable SF team workflow" ``` ## `commit_docs: false` -如果团队里只有部分成员使用 GSD,或者公司策略要求仓库保持干净: +如果团队里只有部分成员使用 SF,或者公司策略要求仓库保持干净: ```yaml git: commit_docs: false ``` -这会把整个 `.gsd/` 加入 `.gitignore`,让所有产物都保留在本地。这样使用 GSD 的开发者仍然能获得结构化规划的好处,而不会影响不使用 GSD 的同事。 +这会把整个 `.gsd/` 加入 `.gitignore`,让所有产物都保留在本地。这样使用 SF 的开发者仍然能获得结构化规划的好处,而不会影响不使用 SF 的同事。 ## 迁移现有项目 @@ -100,4 +100,4 @@ depends_on: [M001-eh88as] --- ``` -GSD 会强制要求上游依赖 milestone 先完成,之后才会启动下游工作。 +SF 会强制要求上游依赖 milestone 先完成,之后才会启动下游工作。 diff --git a/flake.nix b/flake.nix index 7dbc5171a..e23420b47 100644 --- a/flake.nix +++ b/flake.nix @@ -28,8 +28,8 @@ ]; shellHook = '' - export GSD_SOURCE_DIR="${toString ./.}" - export PATH="$GSD_SOURCE_DIR/bin:$PATH" + export SF_SOURCE_DIR="${toString ./.}" + export PATH="$SF_SOURCE_DIR/bin:$PATH" export RUST_BACKTRACE=1 echo "singularity-forge development shell" diff --git a/gitbook/README.md b/gitbook/README.md index cb84bae87..4ac813b65 100644 --- a/gitbook/README.md +++ b/gitbook/README.md @@ -1,15 +1,15 @@ -# What is GSD? +# What is SF? -GSD is an AI-powered development agent that turns project ideas into working software. Describe what you want to build, and GSD researches, plans, codes, tests, and commits — with clean git history and full cost tracking. +SF is an AI-powered development agent that turns project ideas into working software. Describe what you want to build, and SF researches, plans, codes, tests, and commits — with clean git history and full cost tracking. ## How It Works -GSD breaks your project into manageable pieces and works through them systematically: +SF breaks your project into manageable pieces and works through them systematically: ``` You describe your project ↓ -GSD creates a milestone with slices (features) +SF creates a milestone with slices (features) ↓ Each slice is decomposed into tasks ↓ @@ -18,7 +18,7 @@ Tasks are executed one at a time in fresh AI sessions Code is committed, verified, and the next task begins ``` -You can stay hands-on with **step mode** (reviewing each step) or let GSD run autonomously with **auto mode** while you grab coffee. +You can stay hands-on with **step mode** (reviewing each step) or let SF run autonomously with **auto mode** while you grab coffee. ## Key Features @@ -29,7 +29,7 @@ You can stay hands-on with **step mode** (reviewing each step) or let GSD run au - **Crash recovery** — Sessions resume automatically after interruptions - **Skills system** — Domain-specific instruction sets for frameworks, languages, and tools - **Parallel milestones** — Run multiple milestones simultaneously in isolated worktrees -- **Remote questions** — Get Discord, Slack, or Telegram notifications when GSD needs input +- **Remote questions** — Get Discord, Slack, or Telegram notifications when SF needs input - **Web interface** — Browser-based dashboard with real-time progress - **VS Code extension** — Chat participant, sidebar dashboard, and full command palette - **Headless mode** — Run in CI pipelines, cron jobs, and scripted automation @@ -38,7 +38,7 @@ You can stay hands-on with **step mode** (reviewing each step) or let GSD run au ```bash # Install -npm install -g gsd-pi +npm install -g sf-run # Launch gsd diff --git a/gitbook/SUMMARY.md b/gitbook/SUMMARY.md index 962364bbe..2224edd79 100644 --- a/gitbook/SUMMARY.md +++ b/gitbook/SUMMARY.md @@ -1,6 +1,6 @@ # Table of contents -* [What is GSD?](README.md) +* [What is SF?](README.md) ## Getting Started @@ -10,7 +10,7 @@ ## Core Concepts -* [How GSD Organizes Work](core-concepts/project-structure.md) +* [How SF Organizes Work](core-concepts/project-structure.md) * [Step Mode](core-concepts/step-mode.md) * [Auto Mode](core-concepts/auto-mode.md) diff --git a/gitbook/configuration/custom-models.md b/gitbook/configuration/custom-models.md index 8f02512ff..a7ebd6b3a 100644 --- a/gitbook/configuration/custom-models.md +++ b/gitbook/configuration/custom-models.md @@ -4,7 +4,7 @@ Define custom models and providers in `~/.gsd/agent/models.json`. This lets you ## File Location -GSD looks for models.json at: +SF looks for models.json at: 1. `~/.gsd/agent/models.json` (primary) 2. `~/.pi/agent/models.json` (fallback) @@ -39,7 +39,7 @@ The file reloads each time you open `/model` — no restart needed. The `apiKey` field can be: -- **An environment variable name**: `"OPENROUTER_API_KEY"` — GSD resolves it automatically +- **An environment variable name**: `"OPENROUTER_API_KEY"` — SF resolves it automatically - **A literal value**: `"sk-abc123..."` — used directly - **A dummy value**: `"not-needed"` — for local servers that don't require auth @@ -124,7 +124,7 @@ Without this, cost shows $0.00 — which is the expected default for custom mode ## Community Extensions -For providers not built into GSD, community extensions add full provider support: +For providers not built into SF, community extensions add full provider support: | Extension | Provider | Install | |-----------|----------|---------| diff --git a/gitbook/configuration/git-settings.md b/gitbook/configuration/git-settings.md index cf4c0d524..9dc927f32 100644 --- a/gitbook/configuration/git-settings.md +++ b/gitbook/configuration/git-settings.md @@ -1,10 +1,10 @@ # Git & Worktrees -GSD uses git for milestone isolation and sequential commits. The strategy is fully automated — you don't need to manage branches manually. +SF uses git for milestone isolation and sequential commits. The strategy is fully automated — you don't need to manage branches manually. ## Isolation Modes -GSD supports three isolation modes, configured via `git.isolation` in preferences: +SF supports three isolation modes, configured via `git.isolation` in preferences: | Mode | Working Directory | Branch | Best For | |------|-------------------|--------|----------| @@ -24,7 +24,7 @@ Work happens in the project root on a `milestone/` branch. No worktree dire ### None Mode -Work happens directly on your current branch. No worktree, no milestone branch. GSD still commits with conventional commit messages. Use this when file isolation breaks dev tooling (file watchers, hot-reload, etc.). +Work happens directly on your current branch. No worktree, no milestone branch. SF still commits with conventional commit messages. Use this when file isolation breaks dev tooling (file watchers, hot-reload, etc.). ## Branching Model @@ -70,7 +70,7 @@ git: merge_strategy: squash # "squash" or "merge" isolation: worktree # "worktree", "branch", or "none" commit_docs: true # commit .gsd/ artifacts to git - manage_gitignore: true # let GSD manage .gitignore + manage_gitignore: true # let SF manage .gitignore auto_pr: false # create PR on milestone completion pr_target_branch: develop # PR target branch ``` @@ -86,7 +86,7 @@ git: pr_target_branch: develop ``` -When a milestone completes, GSD pushes the branch and creates a PR targeting your specified branch. Requires `gh` CLI installed and authenticated. +When a milestone completes, SF pushes the branch and creates a PR targeting your specified branch. Requires `gh` CLI installed and authenticated. ## Post-Worktree Hook @@ -107,23 +107,23 @@ ln -sf "$SOURCE_DIR/assets" "$WORKTREE_DIR/assets" ## Keeping `.gsd/` Local -For teams where only some members use GSD: +For teams where only some members use SF: ```yaml git: commit_docs: false ``` -This adds `.gsd/` to `.gitignore` entirely. You get structured planning without affecting teammates who don't use GSD. +This adds `.gsd/` to `.gitignore` entirely. You get structured planning without affecting teammates who don't use SF. ## Commit Format -Commits use conventional commit format with GSD metadata: +Commits use conventional commit format with SF metadata: ``` feat: core type definitions -GSD-Task: M001/S01/T01 +SF-Task: M001/S01/T01 ``` ## Manual Worktree Management @@ -139,7 +139,7 @@ Use `/worktree` (or `/wt`) for manual worktree operations: ## Self-Healing -GSD automatically recovers from common git issues: +SF automatically recovers from common git issues: - **Detached HEAD** — reattaches to the correct branch - **Stale lock files** — removes `index.lock` from crashed processes diff --git a/gitbook/configuration/mcp-servers.md b/gitbook/configuration/mcp-servers.md index 6079fa3a7..893910708 100644 --- a/gitbook/configuration/mcp-servers.md +++ b/gitbook/configuration/mcp-servers.md @@ -1,10 +1,10 @@ # MCP Servers -GSD can connect to external MCP (Model Context Protocol) servers for local tools, internal APIs, self-hosted services, or integrations not built in as native extensions. +SF can connect to external MCP (Model Context Protocol) servers for local tools, internal APIs, self-hosted services, or integrations not built in as native extensions. ## Configuration Files -GSD reads MCP config from these project-local paths: +SF reads MCP config from these project-local paths: - `.mcp.json` — repo-shared config (safe to commit) - `.gsd/mcp.json` — local-only config (not shared) @@ -51,9 +51,9 @@ If both exist, server names are merged and the first definition found wins. ## Verifying a Server -After adding config, verify from a GSD session: +After adding config, verify from a SF session: -1. `mcp_servers` — confirms GSD sees the config +1. `mcp_servers` — confirms SF sees the config 2. `mcp_discover(server="my-server")` — confirms the server starts and responds 3. `mcp_call(server="my-server", tool="", args={...})` — confirms a real tool call works diff --git a/gitbook/configuration/notifications.md b/gitbook/configuration/notifications.md index 54acd0d67..9b473b1a2 100644 --- a/gitbook/configuration/notifications.md +++ b/gitbook/configuration/notifications.md @@ -1,6 +1,6 @@ # Notifications -GSD sends desktop notifications during auto mode to keep you informed without watching the terminal. +SF sends desktop notifications during auto mode to keep you informed without watching the terminal. ## Configuration @@ -16,7 +16,7 @@ notifications: ## macOS Setup -GSD uses `terminal-notifier` when available, falling back to `osascript`. +SF uses `terminal-notifier` when available, falling back to `osascript`. **Recommended:** Install `terminal-notifier` for reliable delivery: @@ -32,7 +32,7 @@ brew install terminal-notifier 2. Install `terminal-notifier` (recommended) 3. Test with: ```bash - terminal-notifier -title "GSD" -message "working!" -sound Glass + terminal-notifier -title "SF" -message "working!" -sound Glass ``` If your terminal app doesn't appear in Notification settings, it may need to send at least one notification first to register. See [Troubleshooting](../reference/troubleshooting.md) for more details. diff --git a/gitbook/configuration/preferences.md b/gitbook/configuration/preferences.md index 3a997150a..17398d25a 100644 --- a/gitbook/configuration/preferences.md +++ b/gitbook/configuration/preferences.md @@ -1,6 +1,6 @@ # Preferences -GSD preferences live in YAML frontmatter markdown files. You can configure them globally or per-project. +SF preferences live in YAML frontmatter markdown files. You can configure them globally or per-project. ## Managing Preferences diff --git a/gitbook/configuration/providers.md b/gitbook/configuration/providers.md index 4cb709142..106119424 100644 --- a/gitbook/configuration/providers.md +++ b/gitbook/configuration/providers.md @@ -1,6 +1,6 @@ # Provider Setup -Step-by-step setup instructions for every LLM provider GSD supports. If you ran the onboarding wizard (`gsd config`) and picked a provider, you may already be configured — check with `/model` inside a session. +Step-by-step setup instructions for every LLM provider SF supports. If you ran the onboarding wizard (`gsd config`) and picked a provider, you may already be configured — check with `/model` inside a session. ## Quick Reference @@ -65,7 +65,7 @@ OpenRouter aggregates 200+ models from multiple providers behind a single API ke ```bash export OPENROUTER_API_KEY="sk-or-..." ``` -3. In GSD, type `/model` to select an OpenRouter model (prefixed with `openrouter/`) +3. In SF, type `/model` to select an OpenRouter model (prefixed with `openrouter/`) To add models not in the built-in list, add them to `~/.gsd/agent/models.json`. See [Custom Models](custom-models.md). @@ -132,7 +132,7 @@ export AZURE_OPENAI_API_KEY="..." ## Local Providers -Local providers run on your machine. They require a `models.json` configuration file at `~/.gsd/agent/models.json` because GSD needs to know the endpoint URL and available models. +Local providers run on your machine. They require a `models.json` configuration file at `~/.gsd/agent/models.json` because SF needs to know the endpoint URL and available models. The file reloads each time you open `/model` — no restart needed. @@ -169,7 +169,7 @@ The file reloads each time you open `/model` — no restart needed. } ``` -4. In GSD, type `/model` and select your Ollama model. +4. In SF, type `/model` and select your Ollama model. ### LM Studio @@ -240,7 +240,7 @@ The file reloads each time you open `/model` — no restart needed. ## Custom OpenAI-Compatible Endpoints -Any server that implements the OpenAI Chat Completions API can work with GSD — proxies (LiteLLM, Portkey, Helicone), self-hosted inference, new providers. +Any server that implements the OpenAI Chat Completions API can work with SF — proxies (LiteLLM, Portkey, Helicone), self-hosted inference, new providers. **Quickest path:** @@ -254,7 +254,7 @@ This writes `~/.gsd/agent/models.json` for you. See [Custom Models](custom-model ## Verifying Your Setup -1. Launch GSD: `gsd` +1. Launch SF: `gsd` 2. Check available models: `/model` 3. Select your model from the picker 4. Send a test message to confirm it responds @@ -268,7 +268,7 @@ If the model doesn't appear, check: | Problem | Cause | Fix | |---------|-------|-----| -| "Authentication failed" with valid key | Key not visible to GSD | Export in the same terminal, or save via `gsd config` | +| "Authentication failed" with valid key | Key not visible to SF | Export in the same terminal, or save via `gsd config` | | OpenRouter models not in `/model` | No API key set | Set `OPENROUTER_API_KEY` and restart | | Ollama returns empty responses | Server not running or model not pulled | Run `ollama serve` and `ollama pull ` | | LM Studio model ID mismatch | ID doesn't match server | Check LM Studio's server tab for the exact identifier | diff --git a/gitbook/core-concepts/auto-mode.md b/gitbook/core-concepts/auto-mode.md index b611f85ff..e890af67c 100644 --- a/gitbook/core-concepts/auto-mode.md +++ b/gitbook/core-concepts/auto-mode.md @@ -1,6 +1,6 @@ # Auto Mode -Auto mode is GSD's autonomous execution engine. Run `/gsd auto`, walk away, come back to built software with clean git history. +Auto mode is SF's autonomous execution engine. Run `/gsd auto`, walk away, come back to built software with clean git history. ## Starting Auto Mode @@ -8,7 +8,7 @@ Auto mode is GSD's autonomous execution engine. Run `/gsd auto`, walk away, come /gsd auto ``` -GSD reads `.gsd/STATE.md`, determines the next unit of work, creates a fresh AI session with all relevant context, and lets the AI execute. When it finishes, GSD reads disk state again and dispatches the next unit. This continues until the milestone is complete. +SF reads `.gsd/STATE.md`, determines the next unit of work, creates a fresh AI session with all relevant context, and lets the AI execute. When it finishes, SF reads disk state again and dispatches the next unit. This continues until the milestone is complete. ## The Execution Loop @@ -70,7 +70,7 @@ Every task gets a clean AI context window. No accumulated garbage, no quality de ## Git Isolation -GSD isolates milestone work using one of three modes: +SF isolates milestone work using one of three modes: | Mode | How It Works | Best For | |------|-------------|----------| @@ -88,7 +88,7 @@ In headless mode (`gsd headless auto`), crashes trigger automatic restart with e ## Provider Error Recovery -GSD handles provider errors automatically: +SF handles provider errors automatically: | Error Type | Examples | What Happens | |-----------|----------|-------------| @@ -143,7 +143,7 @@ Auto mode pauses before each slice, showing the plan for your approval before bu ## Stuck Detection -GSD uses sliding-window analysis to detect stuck loops — not just "same unit dispatched twice" but also cycles like A→B→A→B. On detection, GSD retries once with a diagnostic prompt. If it fails again, auto mode stops with details so you can intervene. +SF uses sliding-window analysis to detect stuck loops — not just "same unit dispatched twice" but also cycles like A→B→A→B. On detection, SF retries once with a diagnostic prompt. If it fails again, auto mode stops with details so you can intervene. ## Cost Tracking @@ -163,7 +163,7 @@ Every unit's token usage and cost is captured, broken down by phase, slice, and ## HTML Reports -After a milestone completes, GSD generates a self-contained HTML report in `.gsd/reports/` with project summary, progress tree, dependency graph, cost metrics, timeline, and changelog. Generate manually with: +After a milestone completes, SF generates a self-contained HTML report in `.gsd/reports/` with project summary, progress tree, dependency graph, cost metrics, timeline, and changelog. Generate manually with: ``` /gsd export --html @@ -172,7 +172,7 @@ After a milestone completes, GSD generates a self-contained HTML report in `.gsd ## Diagnostic Tools -If auto mode has issues, GSD provides two diagnostic tools: +If auto mode has issues, SF provides two diagnostic tools: - **`/gsd doctor`** — validates `.gsd/` integrity, checks referential consistency, fixes structural issues - **`/gsd forensics`** — full post-mortem debugger with anomaly detection, unit traces, metrics analysis, and AI-guided investigation diff --git a/gitbook/core-concepts/project-structure.md b/gitbook/core-concepts/project-structure.md index 6aa6e9078..30a8023c2 100644 --- a/gitbook/core-concepts/project-structure.md +++ b/gitbook/core-concepts/project-structure.md @@ -1,6 +1,6 @@ -# How GSD Organizes Work +# How SF Organizes Work -GSD uses a three-level hierarchy to break projects into manageable pieces that an AI can execute reliably. +SF uses a three-level hierarchy to break projects into manageable pieces that an AI can execute reliably. ## The Hierarchy @@ -71,7 +71,7 @@ All project state lives on disk in a `.gsd/` directory at your project root: | `PROJECT.md` | High-level project description, updated as the project evolves | | `REQUIREMENTS.md` | Formal requirement contract — tracks what's active, validated, and deferred | | `DECISIONS.md` | Append-only log of architectural decisions with rationale | -| `KNOWLEDGE.md` | Rules, patterns, and lessons learned across sessions — GSD reads this at the start of every task | +| `KNOWLEDGE.md` | Rules, patterns, and lessons learned across sessions — SF reads this at the start of every task | | `RUNTIME.md` | Runtime context like API URLs, ports, and environment variables | | `STATE.md` | Current status at a glance — auto-generated, don't edit manually | @@ -83,9 +83,9 @@ Each slice flows through phases: Plan → Execute (per task) → Complete → Reassess Roadmap → Next Slice ``` -1. **Plan** — GSD scouts the codebase, researches relevant docs, and decomposes the slice into tasks with clear requirements +1. **Plan** — SF scouts the codebase, researches relevant docs, and decomposes the slice into tasks with clear requirements 2. **Execute** — Each task runs in a fresh AI session with focused context -3. **Complete** — GSD writes summaries, generates a UAT script, and commits +3. **Complete** — SF writes summaries, generates a UAT script, and commits 4. **Reassess** — The roadmap is checked against reality — slices may be reordered, added, or removed 5. **Next Slice** — The loop continues until all slices are done @@ -93,7 +93,7 @@ After all slices complete, a **milestone validation** gate checks that success c ## Adding Knowledge -GSD maintains a knowledge base that persists across sessions. Add rules, patterns, or lessons: +SF maintains a knowledge base that persists across sessions. Add rules, patterns, or lessons: ``` /gsd knowledge rule "Always use parameterized queries for database access" diff --git a/gitbook/core-concepts/step-mode.md b/gitbook/core-concepts/step-mode.md index 750c56728..266ed2909 100644 --- a/gitbook/core-concepts/step-mode.md +++ b/gitbook/core-concepts/step-mode.md @@ -1,6 +1,6 @@ # Step Mode -Step mode is GSD's interactive, one-step-at-a-time workflow. You stay in the loop, reviewing output between each step. +Step mode is SF's interactive, one-step-at-a-time workflow. You stay in the loop, reviewing output between each step. ## Starting Step Mode @@ -8,7 +8,7 @@ Step mode is GSD's interactive, one-step-at-a-time workflow. You stay in the loo /gsd ``` -GSD reads the state of your `.gsd/` directory and presents a wizard showing what's completed and what's next. It then executes one unit of work and pauses. +SF reads the state of your `.gsd/` directory and presents a wizard showing what's completed and what's next. It then executes one unit of work and pauses. ## How It Works @@ -25,7 +25,7 @@ After each unit completes, you see results and decide what to do next. This is i - New projects where you want to shape the architecture - Critical work where you want to review each step -- Learning how GSD works before trusting auto mode +- Learning how SF works before trusting auto mode ## Steering During Step Mode @@ -34,18 +34,18 @@ Between steps, you can: - **Discuss** — `/gsd discuss` to talk through architecture decisions - **Skip** — `/gsd skip` to prevent a unit from being dispatched - **Undo** — `/gsd undo` to revert the last completed unit -- **Switch to auto** — `/gsd auto` to let GSD continue autonomously +- **Switch to auto** — `/gsd auto` to let SF continue autonomously ## When to Use Step Mode -- **First milestone** — Review GSD's work before trusting it to run solo +- **First milestone** — Review SF's work before trusting it to run solo - **Architectural decisions** — When you want to guide the approach -- **Unfamiliar codebases** — When you want to ensure GSD understands the project +- **Unfamiliar codebases** — When you want to ensure SF understands the project - **High-stakes changes** — When mistakes would be costly ## Transitioning to Auto Mode -Once you're comfortable with GSD's approach, switch to auto mode: +Once you're comfortable with SF's approach, switch to auto mode: ``` /gsd auto diff --git a/gitbook/features/captures.md b/gitbook/features/captures.md index 54a2a27e1..920945c45 100644 --- a/gitbook/features/captures.md +++ b/gitbook/features/captures.md @@ -1,6 +1,6 @@ # Captures & Triage -Captures let you fire-and-forget thoughts during auto-mode execution. Instead of pausing auto mode to steer, capture ideas, bugs, or scope changes and let GSD triage them at natural seams between tasks. +Captures let you fire-and-forget thoughts during auto-mode execution. Instead of pausing auto mode to steer, capture ideas, bugs, or scope changes and let SF triage them at natural seams between tasks. ## Quick Start @@ -20,7 +20,7 @@ Capture → Triage → Confirm → Resolve → Resume ``` 1. **Capture** — your thought is saved with a timestamp -2. **Triage** — between tasks, GSD classifies each capture +2. **Triage** — between tasks, SF classifies each capture 3. **Confirm** — you see the proposed resolution and approve or adjust 4. **Resolve** — the resolution is applied 5. **Resume** — auto mode continues diff --git a/gitbook/features/cost-management.md b/gitbook/features/cost-management.md index 62204c586..03e7ecf23 100644 --- a/gitbook/features/cost-management.md +++ b/gitbook/features/cost-management.md @@ -1,6 +1,6 @@ # Cost Management -GSD tracks token usage and cost for every unit of work during auto mode. This data powers the dashboard, budget enforcement, and cost projections. +SF tracks token usage and cost for every unit of work during auto mode. This data powers the dashboard, budget enforcement, and cost projections. ## Viewing Costs @@ -36,7 +36,7 @@ budget_enforcement: pause # default when ceiling is set ## Cost Projections -Once at least two slices have completed, GSD projects the remaining cost: +Once at least two slices have completed, SF projects the remaining cost: ``` Projected remaining: $12.40 ($6.20/slice avg × 2 remaining) @@ -44,7 +44,7 @@ Projected remaining: $12.40 ($6.20/slice avg × 2 remaining) ## Budget Pressure -When approaching the budget ceiling, GSD automatically uses cheaper models: +When approaching the budget ceiling, SF automatically uses cheaper models: | Budget Used | Effect | |------------|--------| diff --git a/gitbook/features/dynamic-model-routing.md b/gitbook/features/dynamic-model-routing.md index a9903f715..b34d45440 100644 --- a/gitbook/features/dynamic-model-routing.md +++ b/gitbook/features/dynamic-model-routing.md @@ -75,7 +75,7 @@ The `budget` profile + dynamic routing provides maximum cost savings. ## Adaptive Learning -GSD tracks routing outcomes in `.gsd/routing-history.json`. If a tier's failure rate exceeds 20% for a given task type, future classifications are bumped up. +SF tracks routing outcomes in `.gsd/routing-history.json`. If a tier's failure rate exceeds 20% for a given task type, future classifications are bumped up. Use `/gsd rate` to submit feedback: diff --git a/gitbook/features/github-sync.md b/gitbook/features/github-sync.md index aa89c8602..57218fa70 100644 --- a/gitbook/features/github-sync.md +++ b/gitbook/features/github-sync.md @@ -1,6 +1,6 @@ # GitHub Sync -GSD can auto-sync milestones, slices, and tasks to GitHub Issues, PRs, and Milestones. +SF can auto-sync milestones, slices, and tasks to GitHub Issues, PRs, and Milestones. ## Setup diff --git a/gitbook/features/headless.md b/gitbook/features/headless.md index 5cc1e9351..ec047c426 100644 --- a/gitbook/features/headless.md +++ b/gitbook/features/headless.md @@ -1,6 +1,6 @@ # Headless & CI Mode -`gsd headless` runs GSD commands without a terminal UI — designed for CI pipelines, cron jobs, and scripted automation. +`gsd headless` runs SF commands without a terminal UI — designed for CI pipelines, cron jobs, and scripted automation. ## Basic Usage @@ -73,7 +73,7 @@ Any `/gsd` subcommand works as a positional argument: `gsd headless status`, `gs ## MCP Server Mode -`gsd --mode mcp` runs GSD as a Model Context Protocol server over stdin/stdout, exposing all GSD tools to external AI clients: +`gsd --mode mcp` runs SF as a Model Context Protocol server over stdin/stdout, exposing all SF tools to external AI clients: ```bash gsd --mode mcp diff --git a/gitbook/features/parallel.md b/gitbook/features/parallel.md index a94615308..120e64fff 100644 --- a/gitbook/features/parallel.md +++ b/gitbook/features/parallel.md @@ -19,7 +19,7 @@ Parallel mode is off by default. Enable it in preferences to use `/gsd parallel` ``` /gsd parallel start ``` - GSD scans milestones, checks dependencies and file overlap, shows an eligibility report, and spawns workers. + SF scans milestones, checks dependencies and file overlap, shows an eligibility report, and spawns workers. 3. Monitor: ``` @@ -33,7 +33,7 @@ Parallel mode is off by default. Enable it in preferences to use `/gsd parallel` ## How It Works -Each worker is a separate GSD process with complete isolation: +Each worker is a separate SF process with complete isolation: | Resource | Isolation | |----------|----------| @@ -47,7 +47,7 @@ Workers communicate with the coordinator through file-based IPC — heartbeat fi ## Eligibility -Before starting, GSD checks which milestones can run concurrently: +Before starting, SF checks which milestones can run concurrently: 1. **Not complete** — finished milestones are skipped 2. **Dependencies satisfied** — all `dependsOn` entries must be complete diff --git a/gitbook/features/remote-questions.md b/gitbook/features/remote-questions.md index 2c16ef8db..40d1e4fa0 100644 --- a/gitbook/features/remote-questions.md +++ b/gitbook/features/remote-questions.md @@ -1,6 +1,6 @@ # Remote Questions -Remote questions let GSD ask for your input via Slack, Discord, or Telegram when running in headless auto mode. When GSD needs a decision, it posts the question to your configured channel and polls for a response. +Remote questions let SF ask for your input via Slack, Discord, or Telegram when running in headless auto mode. When SF needs a decision, it posts the question to your configured channel and polls for a response. ## Setup @@ -51,13 +51,13 @@ remote_questions: ## How It Works -1. GSD encounters a decision point during auto mode +1. SF encounters a decision point during auto mode 2. The question is posted to your channel as a rich message -3. GSD polls for a response at the configured interval +3. SF polls for a response at the configured interval 4. You respond by: - **Reacting** with a number emoji (1️⃣, 2️⃣, etc.) for single-question prompts - **Replying** with a number, comma-separated numbers, or free text -5. GSD picks up the response and continues +5. SF picks up the response and continues 6. A ✅ reaction confirms receipt ### Response Formats @@ -68,7 +68,7 @@ remote_questions: ### Timeouts -If no response arrives within `timeout_minutes`, GSD continues with a timeout result — typically making a conservative default choice. +If no response arrives within `timeout_minutes`, SF continues with a timeout result — typically making a conservative default choice. ## Commands diff --git a/gitbook/features/skills.md b/gitbook/features/skills.md index 4a9fd46b7..8d9e9ba1c 100644 --- a/gitbook/features/skills.md +++ b/gitbook/features/skills.md @@ -1,8 +1,8 @@ # Skills -Skills are specialized instruction sets that GSD loads when the task matches. They provide domain-specific guidance — coding patterns, framework idioms, testing strategies, and tool usage. +Skills are specialized instruction sets that SF loads when the task matches. They provide domain-specific guidance — coding patterns, framework idioms, testing strategies, and tool usage. -Skills follow the open [Agent Skills standard](https://agentskills.io/) and work across multiple AI agents, not just GSD. +Skills follow the open [Agent Skills standard](https://agentskills.io/) and work across multiple AI agents, not just SF. ## Skill Directories @@ -36,7 +36,7 @@ npx skills update ## Onboarding Catalog -During `gsd init`, GSD detects your project's tech stack and recommends relevant skill packs: +During `gsd init`, SF detects your project's tech stack and recommends relevant skill packs: - **Swift** — SwiftUI, Swift Core, concurrency, Charts, Testing - **iOS** — App Intents, Widgets, StoreKit, MapKit, Core ML, Vision, accessibility @@ -46,7 +46,7 @@ During `gsd init`, GSD detects your project's tech stack and recommends relevant ## Skill Discovery -The `skill_discovery` preference controls how GSD finds skills during auto mode: +The `skill_discovery` preference controls how SF finds skills during auto mode: | Mode | Behavior | |------|----------| diff --git a/gitbook/features/teams.md b/gitbook/features/teams.md index 44dac0c57..9325192b2 100644 --- a/gitbook/features/teams.md +++ b/gitbook/features/teams.md @@ -1,6 +1,6 @@ # Working in Teams -GSD supports multi-user workflows where several developers work on the same repository concurrently. +SF supports multi-user workflows where several developers work on the same repository concurrently. ## Quick Setup @@ -57,12 +57,12 @@ Share planning artifacts while keeping runtime files local: ```bash git add .gsd/PREFERENCES.md -git commit -m "chore: enable GSD team workflow" +git commit -m "chore: enable SF team workflow" ``` ## Keeping `.gsd/` Local -For teams where only some members use GSD: +For teams where only some members use SF: ```yaml git: @@ -88,4 +88,4 @@ depends_on: [M001-eh88as] --- ``` -GSD enforces that dependent milestones complete before starting downstream work. +SF enforces that dependent milestones complete before starting downstream work. diff --git a/gitbook/features/token-optimization.md b/gitbook/features/token-optimization.md index c89493618..cbaaabbd7 100644 --- a/gitbook/features/token-optimization.md +++ b/gitbook/features/token-optimization.md @@ -1,6 +1,6 @@ # Token Optimization -GSD's token optimization system can reduce token usage by 40-60% without sacrificing output quality. It has three pillars: **token profiles**, **context compression**, and **complexity-based task routing**. +SF's token optimization system can reduce token usage by 40-60% without sacrificing output quality. It has three pillars: **token profiles**, **context compression**, and **complexity-based task routing**. ## Token Profiles @@ -58,7 +58,7 @@ Each profile controls how much context is pre-loaded into AI prompts: ## Complexity-Based Task Routing -GSD classifies each task by complexity and routes it to an appropriate model: +SF classifies each task by complexity and routes it to an appropriate model: | Complexity | Indicators | Model Level | |-----------|------------|-------------| @@ -86,7 +86,7 @@ models: ## Adaptive Learning -GSD tracks success and failure of tier assignments over time. If a model tier's failure rate exceeds 20% for a given task type, future tasks of that type are bumped to a higher tier. +SF tracks success and failure of tier assignments over time. If a model tier's failure rate exceeds 20% for a given task type, future tasks of that type are bumped to a higher tier. Submit manual feedback with: diff --git a/gitbook/features/web-interface.md b/gitbook/features/web-interface.md index 6870ffc41..d7d985261 100644 --- a/gitbook/features/web-interface.md +++ b/gitbook/features/web-interface.md @@ -1,6 +1,6 @@ # Web Interface -GSD includes a browser-based interface for project management and real-time progress monitoring. +SF includes a browser-based interface for project management and real-time progress monitoring. ## Quick Start diff --git a/gitbook/getting-started/choosing-a-model.md b/gitbook/getting-started/choosing-a-model.md index 64b2e3aad..644876967 100644 --- a/gitbook/getting-started/choosing-a-model.md +++ b/gitbook/getting-started/choosing-a-model.md @@ -1,10 +1,10 @@ # Choosing a Model -GSD auto-selects a default model after you log in to a provider. You can switch models at any time. +SF auto-selects a default model after you log in to a provider. You can switch models at any time. ## Switch Models -Inside a GSD session, type: +Inside a SF session, type: ``` /model @@ -30,7 +30,7 @@ Omit a key to use whatever model is currently active for that phase. ## Model Fallbacks -If a model is unavailable (provider down, rate limited, credits exhausted), GSD can automatically fall back to another: +If a model is unavailable (provider down, rate limited, credits exhausted), SF can automatically fall back to another: ```yaml models: @@ -61,7 +61,7 @@ See [Token Optimization](../features/token-optimization.md) for details. ## Dynamic Model Routing -When enabled, GSD automatically picks cheaper models for simple tasks and reserves expensive ones for complex work: +When enabled, SF automatically picks cheaper models for simple tasks and reserves expensive ones for complex work: ```yaml dynamic_routing: @@ -74,7 +74,7 @@ See [Dynamic Model Routing](../features/dynamic-model-routing.md) for the full g ## Supported Providers -GSD supports 20+ providers out of the box. See [Provider Setup](../configuration/providers.md) for setup instructions: +SF supports 20+ providers out of the box. See [Provider Setup](../configuration/providers.md) for setup instructions: | Provider | Auth Method | |----------|-------------| diff --git a/gitbook/getting-started/first-project.md b/gitbook/getting-started/first-project.md index dd0551035..333369478 100644 --- a/gitbook/getting-started/first-project.md +++ b/gitbook/getting-started/first-project.md @@ -1,6 +1,6 @@ # Your First Project -## Launch GSD +## Launch SF Open a terminal in any project directory (or an empty one) and run: @@ -8,22 +8,22 @@ Open a terminal in any project directory (or an empty one) and run: gsd ``` -GSD shows a welcome screen with your version, active model, and available tool keys. +SF shows a welcome screen with your version, active model, and available tool keys. ## Start a Discussion -Type `/gsd` to enter step mode. GSD reads the state of your project directory and determines the next logical action: +Type `/gsd` to enter step mode. SF reads the state of your project directory and determines the next logical action: - **No `.gsd/` directory** — starts a discussion flow to capture your project vision - **Milestone exists, no roadmap** — discuss or research the milestone - **Roadmap exists, slices pending** — plan the next slice or execute a task - **Mid-task** — resume where you left off -For a new project, GSD will ask you to describe what you want to build. Talk through your vision — GSD captures requirements, architectural decisions, and scope. +For a new project, SF will ask you to describe what you want to build. Talk through your vision — SF captures requirements, architectural decisions, and scope. ## The Project Hierarchy -After discussion, GSD organizes your work into: +After discussion, SF organizes your work into: ``` Milestone → a shippable version (4-10 slices) @@ -35,13 +35,13 @@ The key rule: **a task must fit in one AI context window.** If it can't, it beco ## Run Auto Mode -Once you have a milestone and roadmap, let GSD take the wheel: +Once you have a milestone and roadmap, let SF take the wheel: ``` /gsd auto ``` -GSD autonomously: +SF autonomously: 1. **Plans** each slice — scouts the codebase, researches docs, decomposes into tasks 2. **Executes** each task — writes code in a fresh AI session 3. **Completes** the slice — writes summaries, commits with meaningful messages diff --git a/gitbook/getting-started/installation.md b/gitbook/getting-started/installation.md index e1e72fe80..264528e62 100644 --- a/gitbook/getting-started/installation.md +++ b/gitbook/getting-started/installation.md @@ -1,9 +1,9 @@ # Installation -## Install GSD +## Install SF ```bash -npm install -g gsd-pi +npm install -g sf-run ``` Requires **Node.js 22.0.0 or later** (24 LTS recommended) and **Git**. @@ -12,11 +12,11 @@ Requires **Node.js 22.0.0 or later** (24 LTS recommended) and **Git**. **`command not found: gsd`?** Your shell may not have npm's global bin directory in `$PATH`. Run `npm prefix -g` to find it, then add `$(npm prefix -g)/bin` to your PATH. See [Troubleshooting](../reference/troubleshooting.md) for details. {% endhint %} -GSD checks for updates once every 24 hours. When a new version is available, you'll see a prompt at startup with the option to update immediately or skip. You can also update from within a session with `/gsd update`. +SF checks for updates once every 24 hours. When a new version is available, you'll see a prompt at startup with the option to update immediately or skip. You can also update from within a session with `/gsd update`. ## Set Up Your LLM Provider -Launch GSD for the first time: +Launch SF for the first time: ```bash gsd @@ -37,7 +37,7 @@ For detailed provider setup, see [Provider Setup](../configuration/providers.md) ## Set Up API Keys for Tools -If you use a non-Anthropic model, you may need a search API key for web search. Run `/gsd config` inside any GSD session to set keys globally — they're saved to `~/.gsd/agent/auth.json` and apply to all projects. +If you use a non-Anthropic model, you may need a search API key for web search. Run `/gsd config` inside any SF session to set keys globally — they're saved to `~/.gsd/agent/auth.json` and apply to all projects. | Tool | Purpose | Get a Key | |------|---------|-----------| @@ -49,7 +49,7 @@ Anthropic models have built-in web search and don't need these keys. ## VS Code Extension -GSD is also available as a VS Code extension. Install from the marketplace (publisher: FluxLabs) or search for "GSD" in VS Code extensions. +SF is also available as a VS Code extension. Install from the marketplace (publisher: FluxLabs) or search for "SF" in VS Code extensions. The extension provides: @@ -57,11 +57,11 @@ The extension provides: - **Sidebar dashboard** — connection status, model info, token usage, quick actions - **Full command palette** — start/stop agent, switch models, export sessions -The CLI (`gsd-pi`) must be installed first — the extension connects to it via RPC. +The CLI (`sf-run`) must be installed first — the extension connects to it via RPC. ## Web Interface -GSD also has a browser-based interface: +SF also has a browser-based interface: ```bash gsd --web diff --git a/gitbook/reference/cli-flags.md b/gitbook/reference/cli-flags.md index a1de87f37..146eb8d3b 100644 --- a/gitbook/reference/cli-flags.md +++ b/gitbook/reference/cli-flags.md @@ -1,6 +1,6 @@ # CLI Flags -## Starting GSD +## Starting SF | Flag | Description | |------|-------------| diff --git a/gitbook/reference/commands.md b/gitbook/reference/commands.md index e042723da..e49ba29e2 100644 --- a/gitbook/reference/commands.md +++ b/gitbook/reference/commands.md @@ -6,7 +6,7 @@ |---------|-------------| | `/gsd` | Step mode — execute one unit at a time | | `/gsd auto` | Autonomous mode — research, plan, execute, commit, repeat | -| `/gsd quick` | Quick task with GSD guarantees but no full planning | +| `/gsd quick` | Quick task with SF guarantees but no full planning | | `/gsd stop` | Stop auto mode gracefully | | `/gsd pause` | Pause auto mode (preserves state) | | `/gsd steer` | Modify plan documents during execution | @@ -23,7 +23,7 @@ | `/gsd visualize` | Open workflow visualizer | | `/gsd export --html` | Generate HTML report for current milestone | | `/gsd export --html --all` | Generate reports for all milestones | -| `/gsd update` | Update GSD to the latest version | +| `/gsd update` | Update SF to the latest version | | `/gsd knowledge` | Add persistent project knowledge | | `/gsd fast` | Toggle service tier for supported models | | `/gsd rate` | Rate last unit's model tier (over/ok/under) | diff --git a/gitbook/reference/environment-variables.md b/gitbook/reference/environment-variables.md index c23af72df..c48971244 100644 --- a/gitbook/reference/environment-variables.md +++ b/gitbook/reference/environment-variables.md @@ -1,16 +1,16 @@ # Environment Variables -## GSD Configuration +## SF Configuration | Variable | Default | Description | |----------|---------|-------------| -| `GSD_HOME` | `~/.gsd` | Global GSD directory. All paths derive from this unless individually overridden. | -| `GSD_PROJECT_ID` | (auto-hash) | Override automatic project identity hash. Useful for CI/CD or sharing state across repo clones. | -| `GSD_STATE_DIR` | `$GSD_HOME` | Per-project state root. Controls where `projects//` directories are created. | -| `GSD_CODING_AGENT_DIR` | `$GSD_HOME/agent` | Agent directory for extensions, auth, and managed resources. | -| `GSD_FETCH_ALLOWED_URLS` | (none) | Comma-separated hostnames exempt from internal URL blocking. | -| `GSD_ALLOWED_COMMAND_PREFIXES` | (built-in) | Comma-separated command prefixes allowed for value resolution. | -| `GSD_WEB_PROJECT_CWD` | — | Default project path for `gsd --web` when `?project=` is not specified. | +| `SF_HOME` | `~/.gsd` | Global SF directory. All paths derive from this unless individually overridden. | +| `SF_PROJECT_ID` | (auto-hash) | Override automatic project identity hash. Useful for CI/CD or sharing state across repo clones. | +| `SF_STATE_DIR` | `$SF_HOME` | Per-project state root. Controls where `projects//` directories are created. | +| `SF_CODING_AGENT_DIR` | `$SF_HOME/agent` | Agent directory for extensions, auth, and managed resources. | +| `SF_FETCH_ALLOWED_URLS` | (none) | Comma-separated hostnames exempt from internal URL blocking. | +| `SF_ALLOWED_COMMAND_PREFIXES` | (built-in) | Comma-separated command prefixes allowed for value resolution. | +| `SF_WEB_PROJECT_CWD` | — | Default project path for `gsd --web` when `?project=` is not specified. | ## LLM Provider Keys @@ -48,7 +48,7 @@ The `fetch_page` tool blocks requests to private/internal networks by default (SSRF protection). To allow specific internal hosts: ```bash -export GSD_FETCH_ALLOWED_URLS="internal-docs.company.com,192.168.1.50" +export SF_FETCH_ALLOWED_URLS="internal-docs.company.com,192.168.1.50" ``` Or set `fetchAllowedUrls` in `~/.gsd/agent/settings.json`. diff --git a/gitbook/reference/keyboard-shortcuts.md b/gitbook/reference/keyboard-shortcuts.md index 8b2013729..58f8d3d9f 100644 --- a/gitbook/reference/keyboard-shortcuts.md +++ b/gitbook/reference/keyboard-shortcuts.md @@ -22,7 +22,7 @@ If `Ctrl+Alt` shortcuts trigger the wrong action (e.g., `Ctrl+Alt+G` opens exter ## cmux Integration -If you use cmux (terminal multiplexer), GSD can integrate with it: +If you use cmux (terminal multiplexer), SF can integrate with it: | Command | Description | |---------|-------------| diff --git a/gitbook/reference/migration.md b/gitbook/reference/migration.md index 54d548dc8..bee8b8657 100644 --- a/gitbook/reference/migration.md +++ b/gitbook/reference/migration.md @@ -1,6 +1,6 @@ # Migration from v1 -If you have projects with `.planning` directories from the original Get Shit Done (v1), you can migrate them to GSD-2's `.gsd` format. +If you have projects with `.planning` directories from the original Singularity Forge (v1), you can migrate them to SF's `.gsd` format. ## Running the Migration diff --git a/gitbook/reference/troubleshooting.md b/gitbook/reference/troubleshooting.md index 8102ede58..32bc06c56 100644 --- a/gitbook/reference/troubleshooting.md +++ b/gitbook/reference/troubleshooting.md @@ -69,7 +69,7 @@ Auto mode pauses with "Budget ceiling reached." Auto mode won't start, says another session is running. -**Fix:** GSD auto-detects stale locks (dead PID = auto cleanup). If automatic recovery fails: +**Fix:** SF auto-detects stale locks (dead PID = auto cleanup). If automatic recovery fails: ```bash rm -f .gsd/auto.lock @@ -100,7 +100,7 @@ See [Notifications](../configuration/notifications.md) for details. ### Server discovery times out -**Fix:** Run the configured command outside GSD to confirm it starts. Check that backend services are reachable. +**Fix:** Run the configured command outside SF to confirm it starts. Check that backend services are reachable. ### Server connection closed immediately @@ -133,7 +133,7 @@ Rebuilds `STATE.md` from plan and roadmap files and fixes inconsistencies. ## Getting Help -- **GitHub Issues:** [github.com/gsd-build/GSD-2/issues](https://github.com/gsd-build/GSD-2/issues) +- **GitHub Issues:** [github.com/gsd-build/SF/issues](https://github.com/gsd-build/SF/issues) - **Dashboard:** `Ctrl+Alt+G` or `/gsd status` - **Forensics:** `/gsd forensics` for post-mortem analysis - **Session logs:** `.gsd/activity/` contains JSONL session dumps diff --git a/gsd-orchestrator/SKILL.md b/gsd-orchestrator/SKILL.md index ad423afdf..2ec2ae289 100644 --- a/gsd-orchestrator/SKILL.md +++ b/gsd-orchestrator/SKILL.md @@ -1,7 +1,7 @@ --- name: gsd-orchestrator description: > - Build software products autonomously via GSD headless mode. Handles the full + Build software products autonomously via SF headless mode. Handles the full lifecycle: write a spec, launch a build, poll for completion, handle blockers, track costs, and verify the result. Use when asked to "build something", "create a project", "run gsd", "check build status", or any task that @@ -12,18 +12,18 @@ metadata: bins: [gsd] install: kind: node - package: gsd-pi + package: sf-run bins: [gsd] --- -You are an autonomous agent that builds software by orchestrating GSD as a subprocess. -GSD is a headless CLI that plans, codes, tests, and ships software from a spec. +You are an autonomous agent that builds software by orchestrating SF as a subprocess. +SF is a headless CLI that plans, codes, tests, and ships software from a spec. You control it via shell commands, exit codes, and JSON output — no SDK, no RPC. -GSD headless is a subprocess you launch and monitor. Think of it like a junior developer +SF headless is a subprocess you launch and monitor. Think of it like a junior developer you hand a spec to: 1. You write the spec (what to build) @@ -33,7 +33,7 @@ you hand a spec to: 5. If blocked, you intervene (steer, supply answers, or escalate) The subprocess handles all planning, coding, testing, and git commits internally. -You never write application code yourself — GSD does that. +You never write application code yourself — SF does that. @@ -42,7 +42,7 @@ You never write application code yourself — GSD does that. - **Check exit codes.** 0=success, 1=error, 10=blocked (needs you), 11=cancelled. - **Use `query` to poll.** Instant (~50ms), no LLM cost. Use it between steps, not `auto` for status. - **Budget awareness.** Track `cost.total` from query results. Set limits before launching long runs. -- **One project directory per build.** Each GSD project needs its own directory with a `.gsd/` folder. +- **One project directory per build.** Each SF project needs its own directory with a `.gsd/` folder. @@ -109,7 +109,7 @@ echo "$RESULT" | jq '{status: .status, phase: .phase, cost: .cost.total}' -GSD creates and manages all state in `.gsd/`: +SF creates and manages all state in `.gsd/`: ``` .gsd/ PROJECT.md # What this project is @@ -130,7 +130,7 @@ GSD creates and manages all state in `.gsd/`: T01-SUMMARY.md # Task completion summary ``` -State is derived from files on disk — checkboxes in ROADMAP.md and PLAN.md are the source of truth for completion. You never need to edit these files. GSD manages them. But you can read them to understand progress. +State is derived from files on disk — checkboxes in ROADMAP.md and PLAN.md are the source of truth for completion. You never need to edit these files. SF manages them. But you can read them to understand progress. @@ -182,7 +182,7 @@ gsd headless --json auto 2>/dev/null | while read -r line; do TYPE=$(echo "$line" | jq -r '.type') case "$TYPE" in tool_execution_start) echo "Tool: $(echo "$line" | jq -r '.toolName')" ;; - extension_ui_request) echo "GSD: $(echo "$line" | jq -r '.message // .title // empty')" ;; + extension_ui_request) echo "SF: $(echo "$line" | jq -r '.message // .title // empty')" ;; agent_end) echo "Session ended" ;; esac done diff --git a/gsd-orchestrator/references/answer-injection.md b/gsd-orchestrator/references/answer-injection.md index 369a3828b..7cd27c625 100644 --- a/gsd-orchestrator/references/answer-injection.md +++ b/gsd-orchestrator/references/answer-injection.md @@ -39,10 +39,10 @@ The `--answers` flag takes a path to a JSON file containing pre-supplied answers ## How Secrets Work -Secrets are injected as environment variables into the GSD child process: +Secrets are injected as environment variables into the SF child process: 1. The orchestrator passes the answer file via `--answers` -2. GSD reads the file and sets secret values as env vars in the child process +2. SF reads the file and sets secret values as env vars in the child process 3. When `secure_env_collect` runs inside the agent, it finds the keys already in `process.env` 4. The tool skips the interactive prompt and reports the keys as "already configured" @@ -52,7 +52,7 @@ Secrets are never logged or included in event streams. Two-phase correlation: -1. **Observe** — GSD monitors `tool_execution_start` events for `ask_user_questions` to extract question metadata (ID, options, allowMultiple) +1. **Observe** — SF monitors `tool_execution_start` events for `ask_user_questions` to extract question metadata (ID, options, allowMultiple) 2. **Match** — Subsequent `extension_ui_request` events are correlated to the metadata and responded to with the pre-supplied answer Handles out-of-order events (extension_ui_request can arrive before tool_execution_start) via a deferred processing queue with 500ms timeout. diff --git a/gsd-orchestrator/references/commands.md b/gsd-orchestrator/references/commands.md index 52b55d61a..767ed674f 100644 --- a/gsd-orchestrator/references/commands.md +++ b/gsd-orchestrator/references/commands.md @@ -1,4 +1,4 @@ -# GSD Commands Reference +# SF Commands Reference All commands run as subprocesses via `gsd headless [flags] [command] [args...]`. @@ -193,7 +193,7 @@ gsd headless knowledge "Always use UTC timestamps in API responses" ## Phases -GSD workflows progress through these phases: +SF workflows progress through these phases: ``` pre-planning → needs-discussion → discussing → researching → planning → diff --git a/gsd-orchestrator/references/json-result.md b/gsd-orchestrator/references/json-result.md index 50eff75c8..bb30a1d31 100644 --- a/gsd-orchestrator/references/json-result.md +++ b/gsd-orchestrator/references/json-result.md @@ -1,6 +1,6 @@ # HeadlessJsonResult Reference -When using `--output-format json`, GSD collects events silently and emits a single `HeadlessJsonResult` JSON object to stdout at process exit. This is the structured result for orchestrator decision-making. +When using `--output-format json`, SF collects events silently and emits a single `HeadlessJsonResult` JSON object to stdout at process exit. This is the structured result for orchestrator decision-making. ## Obtaining the Result @@ -31,7 +31,7 @@ echo "$RESULT" | jq '.nextAction' | `toolCalls` | `number` | Total number of tool calls made during the session. | | `events` | `number` | Total number of events processed during the session. | | `milestone` | `string \| undefined` | Active milestone ID (e.g. `"M001"`). | -| `phase` | `string \| undefined` | Current GSD phase at session end (e.g. `"executing"`, `"blocked"`, `"complete"`). | +| `phase` | `string \| undefined` | Current SF phase at session end (e.g. `"executing"`, `"blocked"`, `"complete"`). | | `nextAction` | `string \| undefined` | Recommended next action from the state machine (e.g. `"dispatch"`, `"complete"`). | | `artifacts` | `string[] \| undefined` | Paths to artifacts created or modified during the session. | | `commits` | `string[] \| undefined` | Git commit SHAs created during the session. | diff --git a/gsd-orchestrator/workflows/build-from-spec.md b/gsd-orchestrator/workflows/build-from-spec.md index e3c70e02c..244384e19 100644 --- a/gsd-orchestrator/workflows/build-from-spec.md +++ b/gsd-orchestrator/workflows/build-from-spec.md @@ -4,7 +4,7 @@ End-to-end workflow: take a product idea or specification, produce working softw ## Prerequisites -- `gsd` CLI installed (`npm install -g gsd-pi`) +- `gsd` CLI installed (`npm install -g sf-run`) - A directory for the project (can be empty) - Git initialized in the directory @@ -16,7 +16,7 @@ End-to-end workflow: take a product idea or specification, produce working softw PROJECT_DIR="/tmp/my-project-name" mkdir -p "$PROJECT_DIR" cd "$PROJECT_DIR" -git init 2>/dev/null # GSD needs a git repo +git init 2>/dev/null # SF needs a git repo ``` ### Step 2: Write the spec file @@ -52,7 +52,7 @@ SPEC ### Step 3: Launch the build -**Fire-and-forget (simplest — GSD does everything):** +**Fire-and-forget (simplest — SF does everything):** ```bash cd "$PROJECT_DIR" RESULT=$(gsd headless --output-format json --timeout 0 --context spec.md new-milestone --auto 2>/dev/null) diff --git a/gsd-orchestrator/workflows/monitor-and-poll.md b/gsd-orchestrator/workflows/monitor-and-poll.md index 346cb8613..bfa4e884b 100644 --- a/gsd-orchestrator/workflows/monitor-and-poll.md +++ b/gsd-orchestrator/workflows/monitor-and-poll.md @@ -1,6 +1,6 @@ # Monitor and Poll -Check status of a GSD project, handle blockers, track costs, and decide next actions. +Check status of a SF project, handle blockers, track costs, and decide next actions. ## Checking Project State @@ -77,7 +77,7 @@ gsd headless --answers fix.json auto gsd headless dispatch replan # 5. Option D: Escalate to user -echo "GSD build blocked. Phase: $(gsd headless query | jq -r '.state.phase')" +echo "SF build blocked. Phase: $(gsd headless query | jq -r '.state.phase')" echo "Manual intervention required." ``` @@ -165,7 +165,7 @@ gsd headless --resume "$SESSION_ID" --output-format json auto 2>/dev/null ## Reading Build Artifacts -After completion, inspect what GSD produced: +After completion, inspect what SF produced: ```bash cd /path/to/project @@ -182,6 +182,6 @@ cat .gsd/REQUIREMENTS.md # Milestone summary cat .gsd/milestones/M001-*/M001-*-SUMMARY.md 2>/dev/null -# Git history (GSD commits per-slice) +# Git history (SF commits per-slice) git log --oneline ``` diff --git a/gsd-orchestrator/workflows/step-by-step.md b/gsd-orchestrator/workflows/step-by-step.md index 1690aa306..5d25198d2 100644 --- a/gsd-orchestrator/workflows/step-by-step.md +++ b/gsd-orchestrator/workflows/step-by-step.md @@ -1,6 +1,6 @@ # Step-by-Step Execution -Run GSD one unit at a time with decision points between steps. Use this when you need +Run SF one unit at a time with decision points between steps. Use this when you need control over execution — budget enforcement, progress reporting, conditional logic, or the ability to steer mid-build. diff --git a/mintlify-docs/docs.json b/mintlify-docs/docs.json index 2bc2e7005..4974e7b93 100644 --- a/mintlify-docs/docs.json +++ b/mintlify-docs/docs.json @@ -1,7 +1,7 @@ { "$schema": "https://mintlify.com/docs.json", "theme": "mint", - "name": "GSD", + "name": "SF", "logo": { "light": "/images/logo.svg", "dark": "/images/logo.svg", @@ -97,6 +97,6 @@ ] }, "search": { - "prompt": "Search GSD docs..." + "prompt": "Search SF docs..." } } diff --git a/mintlify-docs/getting-started.mdx b/mintlify-docs/getting-started.mdx index 64cc49646..8930ced70 100644 --- a/mintlify-docs/getting-started.mdx +++ b/mintlify-docs/getting-started.mdx @@ -1,12 +1,12 @@ --- title: "Getting started" -description: "Install GSD, configure your LLM provider, and run your first autonomous session." +description: "Install SF, configure your LLM provider, and run your first autonomous session." --- ## Install ```bash -npm install -g gsd-pi +npm install -g sf-run ``` Requires Node.js 22+ and Git. @@ -15,7 +15,7 @@ Requires Node.js 22+ and Git. **`command not found: gsd`?** Your shell may not have npm's global bin directory in `$PATH`. Run `npm prefix -g` to find it, then add `$(npm prefix -g)/bin` to your PATH. See [troubleshooting](/guides/troubleshooting) for details. -GSD checks for updates every 24 hours. Update in-session with `/gsd update`. +SF checks for updates every 24 hours. Update in-session with `/gsd update`. ## First launch @@ -40,15 +40,15 @@ For non-Anthropic models, you may need a search API key. Run `/gsd config` to se ### Set up MCP servers -To connect GSD to local or external MCP servers, add project-local config in `.mcp.json` or `.gsd/mcp.json`. See [configuration](/guides/configuration) for examples. Use `/gsd mcp` to verify connectivity. +To connect SF to local or external MCP servers, add project-local config in `.mcp.json` or `.gsd/mcp.json`. See [configuration](/guides/configuration) for examples. Use `/gsd mcp` to verify connectivity. ### Offline mode -GSD works fully offline with local models (Ollama, vLLM, LM Studio). Configure a [custom model](/guides/custom-models) and GSD handles the rest — no internet connection required. +SF works fully offline with local models (Ollama, vLLM, LM Studio). Configure a [custom model](/guides/custom-models) and SF handles the rest — no internet connection required. ## Choose a model -GSD auto-selects a default model after login. Switch anytime: +SF auto-selects a default model after login. Switch anytime: ``` /model @@ -60,7 +60,7 @@ Or configure per-phase models in [preferences](/guides/configuration). - Type `/gsd` inside a session. GSD executes one unit at a time, pausing between each with a wizard showing what completed and what's next. + Type `/gsd` inside a session. SF executes one unit at a time, pausing between each with a wizard showing what completed and what's next. - **No `.gsd/` directory** → starts a discussion to capture your project vision - **Milestone exists, no roadmap** → discuss or research the milestone @@ -68,7 +68,7 @@ Or configure per-phase models in [preferences](/guides/configuration). - **Mid-task** → resume where you left off - Type `/gsd auto` and walk away. GSD autonomously researches, plans, executes, verifies, commits, and advances through every slice until the milestone is complete. + Type `/gsd auto` and walk away. SF autonomously researches, plans, executes, verifies, commits, and advances through every slice until the milestone is complete. ``` /gsd auto @@ -102,7 +102,7 @@ Both terminals read and write the same `.gsd/` files. Decisions in terminal 2 ar ## Project structure -GSD organizes work into a hierarchy: +SF organizes work into a hierarchy: ``` Milestone → a shippable version (4-10 slices) @@ -150,13 +150,13 @@ gsd sessions ## VS Code extension -GSD is also available as a VS Code extension (publisher: FluxLabs). It provides: +SF is also available as a VS Code extension (publisher: FluxLabs). It provides: - **`@gsd` chat participant** — talk to the agent in VS Code Chat - **Sidebar dashboard** — connection status, model info, token usage, quick actions - **Full command palette** — start/stop agent, switch models, export sessions -The CLI (`gsd-pi`) must be installed first — the extension connects to it via RPC. +The CLI (`sf-run`) must be installed first — the extension connects to it via RPC. ## Web interface @@ -168,7 +168,7 @@ A browser-based dashboard with real-time progress and multi-project support. See ## Troubleshooting -### `gsd` runs `git svn dcommit` instead of GSD +### `gsd` runs `git svn dcommit` instead of SF The [oh-my-zsh git plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git) defines `alias gsd='git svn dcommit'`. diff --git a/mintlify-docs/guides/auto-mode.mdx b/mintlify-docs/guides/auto-mode.mdx index 1c840a011..6bc9a9510 100644 --- a/mintlify-docs/guides/auto-mode.mdx +++ b/mintlify-docs/guides/auto-mode.mdx @@ -1,6 +1,6 @@ --- title: "Auto mode" -description: "GSD's autonomous execution engine — run /gsd auto, walk away, come back to built software with clean git history." +description: "SF's autonomous execution engine — run /gsd auto, walk away, come back to built software with clean git history." --- Auto mode is a **state machine driven by files on disk**. It reads `.gsd/STATE.md`, determines the next unit of work, creates a fresh agent session with pre-loaded context, and lets the LLM execute. When the LLM finishes, auto mode reads disk state again and dispatches the next unit. @@ -40,7 +40,7 @@ The amount of context inlined is controlled by your [token profile](/guides/toke ### Git isolation -GSD isolates milestone work using one of three modes (configured via `git.isolation` in preferences): +SF isolates milestone work using one of three modes (configured via `git.isolation` in preferences): - **`none`** (default) — work happens on your current branch. No isolation overhead. - **`worktree`** — each milestone runs in its own git worktree. Squash-merged to main on completion. @@ -64,7 +64,7 @@ A lock file tracks the current unit. If the session dies, the next `/gsd auto` s ### Stuck detection -A sliding-window analysis detects stuck loops — catching cycles like A→B→A→B as well as single-unit repeats. On detection, GSD retries once with a diagnostic prompt. If it fails again, auto mode stops with the exact file it expected. +A sliding-window analysis detects stuck loops — catching cycles like A→B→A→B as well as single-unit repeats. On detection, SF retries once with a diagnostic prompt. If it fails again, auto mode stops with the exact file it expected. ### Timeout supervision @@ -85,7 +85,7 @@ auto_supervisor: ### Incremental memory -GSD maintains a `KNOWLEDGE.md` file — an append-only register of project-specific rules, patterns, and lessons learned. The agent reads it at the start of every unit and appends when discovering recurring issues or non-obvious patterns. +SF maintains a `KNOWLEDGE.md` file — an append-only register of project-specific rules, patterns, and lessons learned. The agent reads it at the start of every unit and appends when discovering recurring issues or non-obvious patterns. ### Verification enforcement @@ -101,7 +101,7 @@ Failures trigger auto-fix retries — the agent sees the output and attempts to ### HTML reports -After milestone completion, GSD auto-generates a self-contained HTML report with progress tree, dependency graph, cost/token metrics, execution timeline, and changelog. +After milestone completion, SF auto-generates a self-contained HTML report with progress tree, dependency graph, cost/token metrics, execution timeline, and changelog. ```yaml auto_report: true # enabled by default @@ -111,7 +111,7 @@ Generate manually with `/gsd export --html`, or for all milestones with `/gsd ex ### Reactive task execution -When `reactive_execution: true` is set, GSD derives a dependency graph from IO annotations in task plans. Tasks that don't conflict are dispatched in parallel via subagents. +When `reactive_execution: true` is set, SF derives a dependency graph from IO annotations in task plans. Tasks that don't conflict are dispatched in parallel via subagents. ```yaml reactive_execution: true # disabled by default diff --git a/mintlify-docs/guides/captures-triage.mdx b/mintlify-docs/guides/captures-triage.mdx index 9ac838640..85b7f5baa 100644 --- a/mintlify-docs/guides/captures-triage.mdx +++ b/mintlify-docs/guides/captures-triage.mdx @@ -3,7 +3,7 @@ title: "Captures and triage" description: "Fire-and-forget thought capture during auto-mode with automated triage." --- -Captures let you fire-and-forget thoughts during auto-mode execution. Instead of pausing to steer, capture ideas, bugs, or scope changes and let GSD triage them at natural seams between tasks. +Captures let you fire-and-forget thoughts during auto-mode execution. Instead of pausing to steer, capture ideas, bugs, or scope changes and let SF triage them at natural seams between tasks. ## Quick start @@ -27,7 +27,7 @@ capture → triage → confirm → resolve → resume `/gsd capture "thought"` appends to `.gsd/CAPTURES.md` with a timestamp and unique ID. - At natural seams between tasks, GSD classifies each capture. + At natural seams between tasks, SF classifies each capture. You're shown the proposed resolution. Plan-modifying resolutions require confirmation. diff --git a/mintlify-docs/guides/change-management.mdx b/mintlify-docs/guides/change-management.mdx index 168511fd7..989cd8441 100644 --- a/mintlify-docs/guides/change-management.mdx +++ b/mintlify-docs/guides/change-management.mdx @@ -7,7 +7,7 @@ Reality diverges from plans. This guide covers every situation where you need to ## Mental model -GSD's pipeline looks like this: +SF's pipeline looks like this: ``` M001 complete → M002 complete → M003 → M004 → ... @@ -27,7 +27,7 @@ Between milestones you have the most freedom. Inside a running milestone you hav /gsd quick "fix the date formatting bug in the invoice renderer" ``` -`/gsd quick` executes immediately with full GSD guarantees (atomic commit, state tracking) but skips milestone ceremony. It doesn't touch the milestone pipeline. +`/gsd quick` executes immediately with full SF guarantees (atomic commit, state tracking) but skips milestone ceremony. It doesn't touch the milestone pipeline. --- @@ -76,7 +76,7 @@ For structural changes (adding tasks, removing tasks), the agent triggers a slic ``` /gsd new-milestone ``` - Describe the bugs and features. GSD creates a milestone — the title is what matters, not the number. + Describe the bugs and features. SF creates a milestone — the title is what matters, not the number. ``` @@ -107,7 +107,7 @@ For structural changes (adding tasks, removing tasks), the agent triggers a slic **You want to change M003's scope — add slices, remove slices, change the approach — before it starts.** -Since M003 hasn't started, its plan files can be edited directly. Use `/gsd discuss` to talk through the changes and let GSD rewrite the artifacts: +Since M003 hasn't started, its plan files can be edited directly. Use `/gsd discuss` to talk through the changes and let SF rewrite the artifacts: ``` /gsd discuss @@ -117,7 +117,7 @@ Since M003 hasn't started, its plan files can be edited directly. Use `/gsd disc Or use `/gsd steer` to edit plan files directly. -If M003 is partially done (some slices complete), auto-mode calls `reassess-roadmap` automatically after each slice. You can also discuss changes during a pause — GSD can add, modify, or remove pending slices without touching the completed ones. +If M003 is partially done (some slices complete), auto-mode calls `reassess-roadmap` automatically after each slice. You can also discuss changes during a pause — SF can add, modify, or remove pending slices without touching the completed ones. --- @@ -125,7 +125,7 @@ If M003 is partially done (some slices complete), auto-mode calls `reassess-road **Your "Milestone 3" is effectively now "Milestone 4" because new work must insert before it.** -GSD milestone numbers are labels, not positions. Execution order is controlled by the queue, not the ID. The procedure is the same as above: create the new milestone, confirm queue order with `/gsd queue`, park M003 if needed. +SF milestone numbers are labels, not positions. Execution order is controlled by the queue, not the ID. The procedure is the same as above: create the new milestone, confirm queue order with `/gsd queue`, park M003 if needed. The milestone IDs stay as-is — M003 just executes later. No renumbering needed. @@ -139,7 +139,7 @@ The milestone IDs stay as-is — M003 just executes later. No renumbering needed /gsd new-milestone ``` -Describe the full bug list. GSD creates a milestone with slices organized by system or severity. Run it in auto-mode like any other milestone. When done, all bugs land as clean commits with a formal milestone summary — readable as a bugfix release. +Describe the full bug list. SF creates a milestone with slices organized by system or severity. Run it in auto-mode like any other milestone. When done, all bugs land as clean commits with a formal milestone summary — readable as a bugfix release. --- @@ -151,7 +151,7 @@ Describe the full bug list. GSD creates a milestone with slices organized by sys /gsd capture "dark mode toggle on the dashboard" ``` -Deferred captures surface during roadmap reassessment. GSD can fold them into a later milestone when the timing makes sense. Or queue a dedicated features milestone directly: +Deferred captures surface during roadmap reassessment. SF can fold them into a later milestone when the timing makes sense. Or queue a dedicated features milestone directly: ``` /gsd queue diff --git a/mintlify-docs/guides/commands.mdx b/mintlify-docs/guides/commands.mdx index 8c9c9bba0..41c6fabdc 100644 --- a/mintlify-docs/guides/commands.mdx +++ b/mintlify-docs/guides/commands.mdx @@ -1,6 +1,6 @@ --- title: "Commands reference" -description: "Every GSD command, keyboard shortcut, and CLI flag." +description: "Every SF command, keyboard shortcut, and CLI flag." --- ## Session commands @@ -10,7 +10,7 @@ description: "Every GSD command, keyboard shortcut, and CLI flag." | `/gsd` | Step mode — execute one unit at a time, pause between each | | `/gsd next` | Explicit step mode (same as `/gsd`) | | `/gsd auto` | Autonomous mode — research, plan, execute, commit, repeat | -| `/gsd quick` | Execute a quick task with GSD guarantees without full planning overhead | +| `/gsd quick` | Execute a quick task with SF guarantees without full planning overhead | | `/gsd stop` | Stop auto mode gracefully | | `/gsd pause` | Pause auto mode (preserves state, `/gsd auto` to resume) | | `/gsd steer` | Hard-steer plan documents during execution | @@ -25,11 +25,11 @@ description: "Every GSD command, keyboard shortcut, and CLI flag." | `/gsd dispatch` | Dispatch a specific phase directly | | `/gsd history` | View execution history (supports `--cost`, `--phase`, `--model` filters) | | `/gsd forensics` | Full-access debugger for auto-mode failures | -| `/gsd cleanup` | Clean up GSD state files and stale worktrees | +| `/gsd cleanup` | Clean up SF state files and stale worktrees | | `/gsd visualize` | Open workflow visualizer | | `/gsd export --html` | Generate self-contained HTML report | | `/gsd export --html --all` | Generate reports for all milestones | -| `/gsd update` | Update GSD to the latest version in-session | +| `/gsd update` | Update SF to the latest version in-session | | `/gsd knowledge` | Add persistent project knowledge | | `/gsd fast` | Toggle service tier for supported models | | `/gsd rate` | Rate last unit's model tier (over/ok/under) | @@ -138,7 +138,7 @@ In terminals without Kitty keyboard protocol support (macOS Terminal.app, JetBra | `gsd --version` (`-v`) | Print version and exit | | `gsd sessions` | Interactive session picker | | `gsd config` | Set up global API keys | -| `gsd update` | Update GSD to the latest version | +| `gsd update` | Update SF to the latest version | ## Headless mode @@ -179,4 +179,4 @@ gsd headless query | jq '.cost.total' # total spend gsd --mode mcp ``` -Runs GSD as a Model Context Protocol server over stdin/stdout, exposing all tools to external AI clients (Claude Desktop, VS Code Copilot, etc.). +Runs SF as a Model Context Protocol server over stdin/stdout, exposing all tools to external AI clients (Claude Desktop, VS Code Copilot, etc.). diff --git a/mintlify-docs/guides/configuration.mdx b/mintlify-docs/guides/configuration.mdx index 4961d66b9..49bf208bd 100644 --- a/mintlify-docs/guides/configuration.mdx +++ b/mintlify-docs/guides/configuration.mdx @@ -3,7 +3,7 @@ title: "Configuration" description: "Preferences, model selection, MCP servers, hooks, and all settings." --- -GSD preferences live in `~/.gsd/PREFERENCES.md` (global) or `.gsd/PREFERENCES.md` (project-local). Manage interactively with `/gsd prefs`. +SF preferences live in `~/.gsd/PREFERENCES.md` (global) or `.gsd/PREFERENCES.md` (project-local). Manage interactively with `/gsd prefs`. ## Preferences commands @@ -62,7 +62,7 @@ Anthropic models have built-in web search — no extra keys needed. ## MCP servers -GSD connects to external MCP servers configured in project files: +SF connects to external MCP servers configured in project files: - `.mcp.json` — repo-shared config - `.gsd/mcp.json` — local-only config @@ -97,7 +97,7 @@ GSD connects to external MCP servers configured in project files: -Verify from a GSD session: `mcp_servers` → `mcp_discover` → `mcp_call`. +Verify from a SF session: `mcp_servers` → `mcp_discover` → `mcp_call`. ## Models @@ -118,7 +118,7 @@ models: **Phases:** `research`, `planning`, `execution`, `execution_simple`, `completion`, `subagent` -When a model fails to switch, GSD automatically tries the next model in the `fallbacks` list. +When a model fails to switch, SF automatically tries the next model in the `fallbacks` list. For custom providers (Ollama, vLLM, LM Studio), see [custom models](/guides/custom-models). @@ -236,10 +236,10 @@ See [parallel orchestration](/guides/parallel-orchestration). | Variable | Default | Description | |----------|---------|-------------| -| `GSD_HOME` | `~/.gsd` | Global GSD directory | -| `GSD_PROJECT_ID` | (auto-hash) | Override project identity hash | -| `GSD_STATE_DIR` | `$GSD_HOME` | Per-project state root | -| `GSD_CODING_AGENT_DIR` | `$GSD_HOME/agent` | Agent directory | +| `SF_HOME` | `~/.gsd` | Global SF directory | +| `SF_PROJECT_ID` | (auto-hash) | Override project identity hash | +| `SF_STATE_DIR` | `$SF_HOME` | Per-project state root | +| `SF_CODING_AGENT_DIR` | `$SF_HOME/agent` | Agent directory | ## Full example diff --git a/mintlify-docs/guides/cost-management.mdx b/mintlify-docs/guides/cost-management.mdx index 52e25e6c8..70bb9aa9b 100644 --- a/mintlify-docs/guides/cost-management.mdx +++ b/mintlify-docs/guides/cost-management.mdx @@ -3,7 +3,7 @@ title: "Cost management" description: "Budget ceilings, cost tracking, projections, and enforcement modes." --- -GSD tracks token usage and cost for every unit of work dispatched during auto mode. This data powers the dashboard, budget enforcement, and cost projections. +SF tracks token usage and cost for every unit of work dispatched during auto mode. This data powers the dashboard, budget enforcement, and cost projections. ## Cost tracking @@ -42,7 +42,7 @@ budget_ceiling: 50.00 ## Cost projections -After two or more slices complete, GSD projects the remaining cost: +After two or more slices complete, SF projects the remaining cost: ``` Projected remaining: $12.40 ($6.20/slice avg × 2 remaining) diff --git a/mintlify-docs/guides/git-strategy.mdx b/mintlify-docs/guides/git-strategy.mdx index 67ce24742..d0db3cabc 100644 --- a/mintlify-docs/guides/git-strategy.mdx +++ b/mintlify-docs/guides/git-strategy.mdx @@ -3,7 +3,7 @@ title: "Git strategy" description: "Isolation modes, branching model, and merge behavior for milestone work." --- -GSD uses git for milestone isolation and sequential commits. You choose an **isolation mode** that controls where work happens. The strategy is fully automated — no manual branch management needed. +SF uses git for milestone isolation and sequential commits. You choose an **isolation mode** that controls where work happens. The strategy is fully automated — no manual branch management needed. ## Isolation modes @@ -17,7 +17,7 @@ Configure via the `git.isolation` preference: ### `none` mode (default) -Work happens directly on your current branch. No worktree, no milestone branch. GSD still commits sequentially with conventional commit messages, but there's no branch isolation. This is the simplest mode and works well for most projects. +Work happens directly on your current branch. No worktree, no milestone branch. SF still commits sequentially with conventional commit messages, but there's no branch isolation. This is the simplest mode and works well for most projects. ### `worktree` mode @@ -61,16 +61,16 @@ Merges happen sequentially to avoid conflicts. ### Commit format -Conventional commit format with GSD metadata in trailers: +Conventional commit format with SF metadata in trailers: ``` feat: core type definitions -GSD-Task: M001/S01/T01 +SF-Task: M001/S01/T01 feat: markdown parser for plan files -GSD-Task: M001/S01/T02 +SF-Task: M001/S01/T02 ``` ## Workflow modes @@ -125,7 +125,7 @@ Pushes the milestone branch and creates a PR targeting your specified branch. Re ### `commit_docs: false` -Adds `.gsd/` to `.gitignore` and keeps all planning artifacts local-only. Useful for teams where only some members use GSD. +Adds `.gsd/` to `.gitignore` and keeps all planning artifacts local-only. Useful for teams where only some members use SF. ## Worktree management @@ -148,7 +148,7 @@ Adds `.gsd/` to `.gitignore` and keeps all planning artifacts local-only. Useful ## Self-healing -GSD includes automatic recovery for common git issues: +SF includes automatic recovery for common git issues: - **Detached HEAD** — automatically reattaches to the correct branch - **Stale lock files** — removes `index.lock` files from crashed processes diff --git a/mintlify-docs/guides/migration.mdx b/mintlify-docs/guides/migration.mdx index 8f4646d79..58414da80 100644 --- a/mintlify-docs/guides/migration.mdx +++ b/mintlify-docs/guides/migration.mdx @@ -1,9 +1,9 @@ --- title: "Migration from v1" -description: "Migrate .planning directories from the original GSD to GSD-2's .gsd format." +description: "Migrate .planning directories from the original SF to SF's .gsd format." --- -If you have projects with `.planning` directories from the original Get Shit Done (v1), you can migrate them to GSD-2's `.gsd` format. +If you have projects with `.planning` directories from the original Singularity Forge (v1), you can migrate them to SF's `.gsd` format. ## Running the migration diff --git a/mintlify-docs/guides/parallel-orchestration.mdx b/mintlify-docs/guides/parallel-orchestration.mdx index 830f0d10e..4c9d2e58c 100644 --- a/mintlify-docs/guides/parallel-orchestration.mdx +++ b/mintlify-docs/guides/parallel-orchestration.mdx @@ -35,7 +35,7 @@ parallel: ``` ┌─────────────────────────────────────────────────────┐ -│ Coordinator (your GSD session) │ +│ Coordinator (your SF session) │ │ │ │ ┌──────────┐ ┌──────────┐ ┌──────────┐ │ │ │ Worker 1 │ │ Worker 2 │ │ Worker 3 │ ... │ @@ -53,13 +53,13 @@ parallel: |----------|-----------------| | Filesystem | Git worktree — separate checkout | | Git branch | `milestone/` per milestone | -| State | `GSD_MILESTONE_LOCK` — each worker sees only its milestone | +| State | `SF_MILESTONE_LOCK` — each worker sees only its milestone | | Context | Separate process with its own agent sessions | | Metrics | Each worktree has its own `metrics.json` | ## Eligibility analysis -Before starting, GSD checks which milestones can run concurrently: +Before starting, SF checks which milestones can run concurrently: 1. **Not complete** — finished milestones are skipped 2. **Dependencies satisfied** — all `dependsOn` entries must be complete diff --git a/mintlify-docs/guides/remote-questions.mdx b/mintlify-docs/guides/remote-questions.mdx index a21ac9ea8..10b3dce50 100644 --- a/mintlify-docs/guides/remote-questions.mdx +++ b/mintlify-docs/guides/remote-questions.mdx @@ -3,7 +3,7 @@ title: "Remote questions" description: "Discord, Slack, and Telegram integration for headless auto-mode." --- -Remote questions allow GSD to ask for user input via Slack, Discord, or Telegram when running in headless auto-mode. When GSD encounters a decision point, it posts the question to your configured channel and polls for a response. +Remote questions allow SF to ask for user input via Slack, Discord, or Telegram when running in headless auto-mode. When SF encounters a decision point, it posts the question to your configured channel and polls for a response. ## Setup @@ -55,11 +55,11 @@ remote_questions: ## How it works -1. GSD encounters a decision point during auto-mode +1. SF encounters a decision point during auto-mode 2. The question is posted to your channel as a rich embed (Discord) or Block Kit message (Slack) -3. GSD polls for a response at the configured interval +3. SF polls for a response at the configured interval 4. You respond by reacting with a number emoji or replying with text -5. GSD picks up the response and continues +5. SF picks up the response and continues 6. A check reaction confirms receipt ### Response formats diff --git a/mintlify-docs/guides/skills.mdx b/mintlify-docs/guides/skills.mdx index 66a05b096..75ea193ad 100644 --- a/mintlify-docs/guides/skills.mdx +++ b/mintlify-docs/guides/skills.mdx @@ -3,11 +3,11 @@ title: "Skills" description: "Specialized instruction sets that provide domain-specific guidance to the LLM." --- -Skills are specialized instruction sets that GSD loads when the task matches. They provide domain-specific guidance — coding patterns, framework idioms, testing strategies, and tool usage. +Skills are specialized instruction sets that SF loads when the task matches. They provide domain-specific guidance — coding patterns, framework idioms, testing strategies, and tool usage. ## Bundled skills -GSD ships with these skills, installed to `~/.gsd/agent/skills/`: +SF ships with these skills, installed to `~/.gsd/agent/skills/`: | Skill | Trigger | Description | |-------|---------|-------------| @@ -25,7 +25,7 @@ GSD ships with these skills, installed to `~/.gsd/agent/skills/`: ## Skill discovery -The `skill_discovery` preference controls how GSD finds skills: +The `skill_discovery` preference controls how SF finds skills: | Mode | Behavior | |------|----------| diff --git a/mintlify-docs/guides/token-optimization.mdx b/mintlify-docs/guides/token-optimization.mdx index ae79bf525..50e0732c1 100644 --- a/mintlify-docs/guides/token-optimization.mdx +++ b/mintlify-docs/guides/token-optimization.mdx @@ -3,7 +3,7 @@ title: "Token optimization" description: "Token profiles, context compression, and complexity-based task routing to reduce costs by 40-60%." --- -GSD's token optimization system has three pillars: **token profiles**, **context compression**, and **complexity-based task routing**. +SF's token optimization system has three pillars: **token profiles**, **context compression**, and **complexity-based task routing**. ## Token profiles @@ -57,7 +57,7 @@ Each profile maps to an **inline level** controlling how much context is pre-loa ### Prompt compression -GSD can apply deterministic text compression before falling back to section-boundary truncation: +SF can apply deterministic text compression before falling back to section-boundary truncation: ```yaml compression_strategy: compress # or "truncate" @@ -81,7 +81,7 @@ context_selection: smart # or "full" ## Complexity-based task routing -GSD classifies each task by complexity and routes it to an appropriate model tier. +SF classifies each task by complexity and routes it to an appropriate model tier. Dynamic routing requires explicit `models` in your preferences. Without a `models` section, routing is skipped. @@ -112,7 +112,7 @@ When approaching the budget ceiling, the classifier automatically downgrades tie ## Adaptive learning -GSD tracks success/failure per tier and adjusts classifications over time. User feedback via `/gsd rate` is weighted 2x: +SF tracks success/failure per tier and adjusts classifications over time. User feedback via `/gsd rate` is weighted 2x: ``` /gsd rate over # model was overpowered diff --git a/mintlify-docs/guides/troubleshooting.mdx b/mintlify-docs/guides/troubleshooting.mdx index a95cd8557..061a23864 100644 --- a/mintlify-docs/guides/troubleshooting.mdx +++ b/mintlify-docs/guides/troubleshooting.mdx @@ -38,7 +38,7 @@ It checks file structure, referential integrity, completion state consistency, g source ~/.zshrc ``` - **Workaround:** `npx gsd-pi` or `$(npm prefix -g)/bin/gsd` + **Workaround:** `npx sf-run` or `$(npm prefix -g)/bin/gsd` @@ -63,7 +63,7 @@ It checks file structure, referential integrity, completion state consistency, g - GSD auto-detects stale locks. If automatic recovery fails: + SF auto-detects stale locks. If automatic recovery fails: ```bash rm -f .gsd/auto.lock rm -rf "$(dirname .gsd)/.gsd.lock" @@ -71,7 +71,7 @@ It checks file structure, referential integrity, completion state consistency, g - GSD auto-resolves conflicts on `.gsd/` runtime files. For code conflicts, the LLM attempts resolution. If that fails, resolve manually. + SF auto-resolves conflicts on `.gsd/` runtime files. For code conflicts, the LLM attempts resolution. If that fails, resolve manually. @@ -91,7 +91,7 @@ It checks file structure, referential integrity, completion state consistency, g - **Cause:** GSD v2.45+ checks for Node.js >= 22 and git availability at startup. + **Cause:** SF v2.45+ checks for Node.js >= 22 and git availability at startup. **Fix:** Install Node.js 22+ (24 LTS recommended) and ensure `git` is in your PATH. @@ -117,10 +117,10 @@ Use `/gsd mcp` to check MCP server status and connectivity at a glance. - Run the configured command outside GSD to confirm the server starts. Check backend URLs and dependencies. + Run the configured command outside SF to confirm the server starts. Check backend URLs and dependencies. - + Use absolute paths. Set required environment variables in the MCP config's `env` block. @@ -152,7 +152,7 @@ Rebuilds `STATE.md` from plan and roadmap files on disk. ## Getting help -- **GitHub Issues:** [github.com/gsd-build/GSD-2/issues](https://github.com/gsd-build/gsd-2/issues) +- **GitHub Issues:** [github.com/gsd-build/SF/issues](https://github.com/gsd-build/gsd-2/issues) - **Dashboard:** `Ctrl+Alt+G` or `/gsd status` - **Forensics:** `/gsd forensics` - **Session logs:** `.gsd/activity/` diff --git a/mintlify-docs/guides/web-interface.mdx b/mintlify-docs/guides/web-interface.mdx index 75f769c86..b12b02930 100644 --- a/mintlify-docs/guides/web-interface.mdx +++ b/mintlify-docs/guides/web-interface.mdx @@ -3,7 +3,7 @@ title: "Web interface" description: "Browser-based project management with real-time progress and multi-project support." --- -GSD includes a browser-based web interface for project management, real-time progress monitoring, and multi-project support. +SF includes a browser-based web interface for project management, real-time progress monitoring, and multi-project support. ## Quick start diff --git a/mintlify-docs/guides/working-in-teams.mdx b/mintlify-docs/guides/working-in-teams.mdx index d59bce66b..645c2bc0b 100644 --- a/mintlify-docs/guides/working-in-teams.mdx +++ b/mintlify-docs/guides/working-in-teams.mdx @@ -3,7 +3,7 @@ title: "Working in teams" description: "Multi-user workflows with unique milestone IDs, push branches, and shared planning artifacts." --- -GSD supports multi-user workflows where several developers work on the same repository concurrently. +SF supports multi-user workflows where several developers work on the same repository concurrently. ## Setup @@ -49,12 +49,12 @@ Share planning artifacts while keeping runtime files local: ```bash git add .gsd/PREFERENCES.md -git commit -m "chore: enable GSD team workflow" +git commit -m "chore: enable SF team workflow" ``` ## `commit_docs: false` -For teams where only some members use GSD: +For teams where only some members use SF: ```yaml git: @@ -74,4 +74,4 @@ depends_on: [M001-eh88as] --- ``` -GSD enforces that dependent milestones complete before starting downstream work. +SF enforces that dependent milestones complete before starting downstream work. diff --git a/mintlify-docs/images/favicon.svg b/mintlify-docs/images/favicon.svg index 90071ea65..d396bf107 100644 --- a/mintlify-docs/images/favicon.svg +++ b/mintlify-docs/images/favicon.svg @@ -49,7 +49,7 @@ ╚═════╝ ╚══════╝╚═════╝ - Get Shit Done v1.0.1 + Singularity Forge v1.0.1 A meta-prompting, context engineering and spec-driven development system for Claude Code by TÂCHES. diff --git a/mintlify-docs/images/logo.svg b/mintlify-docs/images/logo.svg index d9f61c16e..9c242593e 100644 --- a/mintlify-docs/images/logo.svg +++ b/mintlify-docs/images/logo.svg @@ -5,7 +5,7 @@ - + diff --git a/mintlify-docs/introduction.mdx b/mintlify-docs/introduction.mdx index ea30b2d5d..f0f48c6da 100644 --- a/mintlify-docs/introduction.mdx +++ b/mintlify-docs/introduction.mdx @@ -1,11 +1,11 @@ --- -title: "GSD — Get Shit Done" +title: "SF — Singularity Forge" description: "An autonomous coding agent that researches, plans, executes, and commits code while you focus on what matters." --- -GSD is an autonomous coding agent. Describe what you want built, run `/gsd auto`, and walk away. Come back to working software with clean git history. +SF is an autonomous coding agent. Describe what you want built, run `/gsd auto`, and walk away. Come back to working software with clean git history. -## What GSD does +## What SF does @@ -24,7 +24,7 @@ GSD is an autonomous coding agent. Describe what you want built, run `/gsd auto` ## How it works -GSD organizes work into a hierarchy: +SF organizes work into a hierarchy: ``` Milestone → a shippable version (4-10 slices) @@ -48,7 +48,7 @@ Every phase gets a fresh context window with pre-loaded context — no accumulat - Type `/gsd` inside a session. GSD executes one unit at a time, pausing between each so you can review. + Type `/gsd` inside a session. SF executes one unit at a time, pausing between each so you can review. ```bash gsd @@ -56,7 +56,7 @@ Every phase gets a fresh context window with pre-loaded context — no accumulat ``` - Type `/gsd auto` and walk away. GSD autonomously researches, plans, executes, verifies, and commits until the milestone is complete. + Type `/gsd auto` and walk away. SF autonomously researches, plans, executes, verifies, and commits until the milestone is complete. ```bash gsd @@ -86,7 +86,7 @@ gsd ## Next steps - + Get up and running in under a minute. diff --git a/native/Cargo.toml b/native/Cargo.toml index 1a96d837f..b821847a4 100644 --- a/native/Cargo.toml +++ b/native/Cargo.toml @@ -6,7 +6,7 @@ resolver = "2" version = "0.1.0" edition = "2021" license = "MIT" -authors = ["GSD Contributors"] +authors = ["SF Contributors"] repository = "https://github.com/gsd-build/gsd-2" [profile.release] diff --git a/native/README.md b/native/README.md index 4f6829681..54b8ef8bd 100644 --- a/native/README.md +++ b/native/README.md @@ -1,6 +1,6 @@ -# GSD Native Engine +# SF Native Engine -Rust N-API addon providing high-performance native modules for GSD. +Rust N-API addon providing high-performance native modules for SF. ## Architecture @@ -13,7 +13,7 @@ native/crates/ └── ast/ (ast-grep structural search) ``` -Inspired by [Oh My Pi's pi-natives](https://github.com/can1357/oh-my-pi), adapted for GSD's Node.js runtime. +Inspired by [Oh My Pi's pi-natives](https://github.com/can1357/oh-my-pi), adapted for SF's Node.js runtime. ## Prerequisites @@ -105,7 +105,7 @@ const contentResult = searchContent(Buffer.from(fileContent), { ### gsd_parser -GSD file parsing and frontmatter extraction. Reads `.gsd` files and extracts structured metadata from YAML frontmatter blocks. +SF file parsing and frontmatter extraction. Reads `.gsd` files and extracts structured metadata from YAML frontmatter blocks. ### highlight @@ -113,7 +113,7 @@ Syntect-based syntax highlighting. Tokenizes source code and produces highlighte ### html -HTML-to-Markdown conversion. Transforms HTML content into clean Markdown, useful for importing web content into GSD notes and documents. +HTML-to-Markdown conversion. Transforms HTML content into clean Markdown, useful for importing web content into SF notes and documents. ### image diff --git a/native/crates/ast/Cargo.toml b/native/crates/ast/Cargo.toml index d0fc47d7a..3e329952b 100644 --- a/native/crates/ast/Cargo.toml +++ b/native/crates/ast/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true license.workspace = true authors.workspace = true repository.workspace = true -description = "AST-aware structural search and rewrite via ast-grep for GSD native engine" +description = "AST-aware structural search and rewrite via ast-grep for SF native engine" [dependencies] ast-grep-core = { version = "0.39", default-features = false, features = ["tree-sitter"] } diff --git a/native/crates/ast/src/lib.rs b/native/crates/ast/src/lib.rs index 8b4591654..7b21fec16 100644 --- a/native/crates/ast/src/lib.rs +++ b/native/crates/ast/src/lib.rs @@ -1,4 +1,4 @@ -//! AST-aware structural search and rewrite for GSD. +//! AST-aware structural search and rewrite for SF. #![allow(clippy::needless_pass_by_value)] pub mod ast; diff --git a/native/crates/engine/Cargo.toml b/native/crates/engine/Cargo.toml index 6038b9e12..6b831cb54 100644 --- a/native/crates/engine/Cargo.toml +++ b/native/crates/engine/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true license.workspace = true authors.workspace = true repository.workspace = true -description = "N-API native addon for GSD — exposes high-performance Rust modules to Node.js" +description = "N-API native addon for SF — exposes high-performance Rust modules to Node.js" [lib] crate-type = ["cdylib", "rlib"] diff --git a/native/crates/engine/src/git.rs b/native/crates/engine/src/git.rs index a37d0c2ef..c32461340 100644 --- a/native/crates/engine/src/git.rs +++ b/native/crates/engine/src/git.rs @@ -1,6 +1,6 @@ //! Native git operations via libgit2. //! -//! Provides high-performance git operations for GSD, eliminating the need +//! Provides high-performance git operations for SF, eliminating the need //! to spawn `git` child processes via execSync. Both read and write //! operations are implemented natively. //! diff --git a/native/crates/engine/src/gsd_parser.rs b/native/crates/engine/src/gsd_parser.rs index b4a7dc279..342affeb0 100644 --- a/native/crates/engine/src/gsd_parser.rs +++ b/native/crates/engine/src/gsd_parser.rs @@ -1,7 +1,7 @@ -//! GSD `.gsd/` directory file parser. +//! SF `.gsd/` directory file parser. //! //! Parses markdown files containing YAML-like frontmatter, section headings, -//! and structured content used by GSD's planning system (roadmaps, plans, +//! and structured content used by SF's planning system (roadmaps, plans, //! summaries, continue files). //! //! Key operations: @@ -36,7 +36,7 @@ pub struct SectionResult { pub found: bool, } -/// A single parsed GSD file from batch parsing. +/// A single parsed SF file from batch parsing. #[napi(object)] pub struct ParsedGsdFile { /// Relative path from the base directory. @@ -835,7 +835,7 @@ pub fn parse_roadmap_file(content: String) -> NativeRoadmap { parse_roadmap_internal(&content) } -// ─── GSD Tree Scanner ─────────────────────────────────────────────────────── +// ─── SF Tree Scanner ─────────────────────────────────────────────────────── #[napi(object)] pub struct GsdTreeEntry { diff --git a/native/crates/engine/src/lib.rs b/native/crates/engine/src/lib.rs index 32ee9a418..572cfc3c1 100644 --- a/native/crates/engine/src/lib.rs +++ b/native/crates/engine/src/lib.rs @@ -1,4 +1,4 @@ -//! N-API addon for GSD. +//! N-API addon for SF. //! //! Exposes high-performance Rust modules to Node.js via napi-rs. //! ```text diff --git a/native/crates/grep/Cargo.toml b/native/crates/grep/Cargo.toml index f7c422a2a..59c9ece3a 100644 --- a/native/crates/grep/Cargo.toml +++ b/native/crates/grep/Cargo.toml @@ -5,7 +5,7 @@ edition.workspace = true license.workspace = true authors.workspace = true repository.workspace = true -description = "Ripgrep-backed search library for GSD native engine" +description = "Ripgrep-backed search library for SF native engine" [dependencies] grep-regex = "0.1" diff --git a/native/crates/grep/src/lib.rs b/native/crates/grep/src/lib.rs index 5ee377277..da3d33d89 100644 --- a/native/crates/grep/src/lib.rs +++ b/native/crates/grep/src/lib.rs @@ -1,4 +1,4 @@ -//! Ripgrep-backed search library for GSD. +//! Ripgrep-backed search library for SF. //! //! Provides two search modes: //! - `search_content()`: search in-memory content (a byte slice). diff --git a/native/npm/darwin-arm64/package.json b/native/npm/darwin-arm64/package.json index f45d588fc..6ffa6a717 100644 --- a/native/npm/darwin-arm64/package.json +++ b/native/npm/darwin-arm64/package.json @@ -1,7 +1,7 @@ { "name": "@singularity-forge/engine-darwin-arm64", "version": "2.74.0", - "description": "GSD native engine binary for macOS ARM64", + "description": "SF native engine binary for macOS ARM64", "os": [ "darwin" ], diff --git a/native/npm/darwin-x64/package.json b/native/npm/darwin-x64/package.json index 35c57d060..3a8e96a56 100644 --- a/native/npm/darwin-x64/package.json +++ b/native/npm/darwin-x64/package.json @@ -1,7 +1,7 @@ { "name": "@singularity-forge/engine-darwin-x64", "version": "2.74.0", - "description": "GSD native engine binary for macOS Intel", + "description": "SF native engine binary for macOS Intel", "os": [ "darwin" ], diff --git a/native/npm/linux-arm64-gnu/package.json b/native/npm/linux-arm64-gnu/package.json index bb5ba5131..fb35a3cd3 100644 --- a/native/npm/linux-arm64-gnu/package.json +++ b/native/npm/linux-arm64-gnu/package.json @@ -1,7 +1,7 @@ { "name": "@singularity-forge/engine-linux-arm64-gnu", "version": "2.74.0", - "description": "GSD native engine binary for Linux ARM64 (glibc)", + "description": "SF native engine binary for Linux ARM64 (glibc)", "os": [ "linux" ], diff --git a/native/npm/linux-x64-gnu/package.json b/native/npm/linux-x64-gnu/package.json index 0d3d11d48..c840d711c 100644 --- a/native/npm/linux-x64-gnu/package.json +++ b/native/npm/linux-x64-gnu/package.json @@ -1,7 +1,7 @@ { "name": "@singularity-forge/engine-linux-x64-gnu", "version": "2.74.0", - "description": "GSD native engine binary for Linux x64 (glibc)", + "description": "SF native engine binary for Linux x64 (glibc)", "os": [ "linux" ], diff --git a/native/npm/win32-x64-msvc/package.json b/native/npm/win32-x64-msvc/package.json index fe4387e66..40642e299 100644 --- a/native/npm/win32-x64-msvc/package.json +++ b/native/npm/win32-x64-msvc/package.json @@ -1,7 +1,7 @@ { "name": "@singularity-forge/engine-win32-x64-msvc", "version": "2.74.0", - "description": "GSD native engine binary for Windows x64 (MSVC)", + "description": "SF native engine binary for Windows x64 (MSVC)", "os": [ "win32" ], diff --git a/native/scripts/build.js b/native/scripts/build.js index b6697fff2..ea399695b 100644 --- a/native/scripts/build.js +++ b/native/scripts/build.js @@ -1,7 +1,7 @@ #!/usr/bin/env node /** - * Build script for the GSD native Rust addon. + * Build script for the SF native Rust addon. * * Usage: * node native/scripts/build.js # release build diff --git a/package-lock.json b/package-lock.json index a0686e3b1..694cb0e3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { - "name": "gsd-pi", + "name": "sf-run", "version": "2.74.0", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "gsd-pi", + "name": "sf-run", "version": "2.74.0", "hasInstallScript": true, "license": "MIT", diff --git a/package.json b/package.json index 705741628..5b6de7da7 100644 --- a/package.json +++ b/package.json @@ -59,15 +59,15 @@ "test:compile": "node scripts/compile-tests.mjs", "test:unit": "npm run test:compile && node --import ./scripts/dist-test-resolve.mjs --experimental-test-isolation=process --test-reporter=./scripts/test-reporter-compact.mjs --test \"dist-test/src/tests/*.test.js\" \"dist-test/src/resources/extensions/gsd/tests/*.test.js\" \"dist-test/src/resources/extensions/gsd/tests/*.test.mjs\" \"dist-test/src/resources/extensions/shared/tests/*.test.js\" \"dist-test/src/resources/extensions/claude-code-cli/tests/*.test.js\" \"dist-test/src/resources/extensions/github-sync/tests/*.test.js\" \"dist-test/src/resources/extensions/universal-config/tests/*.test.js\" \"dist-test/src/resources/extensions/voice/tests/*.test.js\" \"dist-test/src/resources/extensions/mcp-client/tests/*.test.js\"", "test:packages": "node --test packages/pi-coding-agent/dist/core/*.test.js packages/pi-coding-agent/dist/core/tools/spawn-shell-windows.test.js", - "test:marketplace": "node scripts/with-env.mjs GSD_TEST_CLONE_MARKETPLACES=1 -- node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --test src/resources/extensions/gsd/tests/claude-import-tui.test.ts src/resources/extensions/gsd/tests/plugin-importer-live.test.ts src/tests/marketplace-discovery.test.ts", + "test:marketplace": "node scripts/with-env.mjs SF_TEST_CLONE_MARKETPLACES=1 -- node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --test src/resources/extensions/gsd/tests/claude-import-tui.test.ts src/resources/extensions/gsd/tests/plugin-importer-live.test.ts src/tests/marketplace-discovery.test.ts", "test:coverage": "c8 --reporter=text --reporter=lcov --exclude=\"src/resources/extensions/gsd/tests/**\" --exclude=\"src/tests/**\" --exclude=\"scripts/**\" --exclude=\"native/**\" --exclude=\"node_modules/**\" --check-coverage --statements=40 --lines=40 --branches=20 --functions=20 node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --experimental-test-isolation=process --test src/resources/extensions/gsd/tests/*.test.ts src/resources/extensions/gsd/tests/*.test.mjs src/tests/*.test.ts src/resources/extensions/shared/tests/*.test.ts", "test:integration": "node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --test \"src/tests/integration/*.test.ts\" \"src/resources/extensions/gsd/tests/integration/*.test.ts\" \"src/resources/extensions/async-jobs/*.test.ts\" \"src/resources/extensions/browser-tools/tests/*.test.mjs\"", "pretest": "npm run typecheck:extensions", "test": "npm run test:unit && npm run test:integration", "test:smoke": "node --experimental-strip-types tests/smoke/run.ts", "test:fixtures": "node --experimental-strip-types tests/fixtures/run.ts", - "test:fixtures:record": "node scripts/with-env.mjs GSD_FIXTURE_MODE=record -- node --experimental-strip-types tests/fixtures/record.ts", - "test:live": "node scripts/with-env.mjs GSD_LIVE_TESTS=1 -- node --experimental-strip-types tests/live/run.ts", + "test:fixtures:record": "node scripts/with-env.mjs SF_FIXTURE_MODE=record -- node --experimental-strip-types tests/fixtures/record.ts", + "test:live": "node scripts/with-env.mjs SF_LIVE_TESTS=1 -- node --experimental-strip-types tests/live/run.ts", "test:browser-tools": "node --test src/resources/extensions/browser-tools/tests/browser-tools-unit.test.cjs src/resources/extensions/browser-tools/tests/browser-tools-integration.test.mjs", "test:native": "node --test packages/native/src/__tests__/grep.test.mjs", "test:secret-scan": "node --import ./src/resources/extensions/gsd/tests/resolve-ts.mjs --experimental-strip-types --test src/tests/secret-scan.test.ts", diff --git a/packages/daemon/src/channel-manager.ts b/packages/daemon/src/channel-manager.ts index b0ae1604c..9d5f11b8f 100644 --- a/packages/daemon/src/channel-manager.ts +++ b/packages/daemon/src/channel-manager.ts @@ -1,6 +1,6 @@ /** * ChannelManager — manages per-project Discord text channels under a - * 'GSD Projects' category, with archive support. + * 'SF Projects' category, with archive support. * * Pure helper `sanitizeChannelName` exported separately for testability. */ @@ -19,8 +19,8 @@ import type { Logger } from './logger.js'; // Constants // --------------------------------------------------------------------------- -const DEFAULT_CATEGORY_NAME = 'GSD Projects'; -const ARCHIVE_CATEGORY_NAME = 'GSD Archive'; +const DEFAULT_CATEGORY_NAME = 'SF Projects'; +const ARCHIVE_CATEGORY_NAME = 'SF Archive'; const CHANNEL_PREFIX = 'gsd-'; const MAX_CHANNEL_NAME_LENGTH = 100; // Discord's limit @@ -135,7 +135,7 @@ export class ChannelManager { } /** - * Create a text channel for a project under the GSD Projects category. + * Create a text channel for a project under the SF Projects category. * Channel name is derived from the project directory path. */ async createProjectChannel(projectDir: string): Promise { @@ -159,7 +159,7 @@ export class ChannelManager { } /** - * Archive a channel by moving it to the 'GSD Archive' category and + * Archive a channel by moving it to the 'SF Archive' category and * setting permission overwrite to deny ViewChannel for @everyone. */ async archiveChannel(channelId: string): Promise { diff --git a/packages/daemon/src/commands.ts b/packages/daemon/src/commands.ts index d46d92269..b88810d38 100644 --- a/packages/daemon/src/commands.ts +++ b/packages/daemon/src/commands.ts @@ -25,15 +25,15 @@ export function buildCommands(): RESTPostAPIChatInputApplicationCommandsJSONBody return [ new SlashCommandBuilder() .setName('gsd-status') - .setDescription('Show status of all active GSD sessions') + .setDescription('Show status of all active SF sessions') .toJSON(), new SlashCommandBuilder() .setName('gsd-start') - .setDescription('Start a new GSD session') + .setDescription('Start a new SF session') .toJSON(), new SlashCommandBuilder() .setName('gsd-stop') - .setDescription('Stop a running GSD session') + .setDescription('Stop a running SF session') .toJSON(), new SlashCommandBuilder() .setName('gsd-verbose') diff --git a/packages/daemon/src/config.ts b/packages/daemon/src/config.ts index c1dddbbd6..50a77a7b6 100644 --- a/packages/daemon/src/config.ts +++ b/packages/daemon/src/config.ts @@ -29,11 +29,11 @@ function defaults(): DaemonConfig { /** * Resolve the config file path. - * Priority: explicit CLI arg → GSD_DAEMON_CONFIG env → ~/.gsd/daemon.yaml + * Priority: explicit CLI arg → SF_DAEMON_CONFIG env → ~/.gsd/daemon.yaml */ export function resolveConfigPath(cliPath?: string): string { if (cliPath) return expandTilde(cliPath); - const envPath = process.env['GSD_DAEMON_CONFIG']; + const envPath = process.env['SF_DAEMON_CONFIG']; if (envPath) return expandTilde(envPath); return resolve(homedir(), '.gsd', 'daemon.yaml'); } diff --git a/packages/daemon/src/daemon.test.ts b/packages/daemon/src/daemon.test.ts index 8519bcaf7..b3c2aeb51 100644 --- a/packages/daemon/src/daemon.test.ts +++ b/packages/daemon/src/daemon.test.ts @@ -41,26 +41,26 @@ describe('resolveConfigPath', () => { assert.ok(p.endsWith('my-daemon.yaml')); }); - it('falls back to GSD_DAEMON_CONFIG env var', () => { - const prev = process.env['GSD_DAEMON_CONFIG']; + it('falls back to SF_DAEMON_CONFIG env var', () => { + const prev = process.env['SF_DAEMON_CONFIG']; try { - process.env['GSD_DAEMON_CONFIG'] = '/env/path.yaml'; + process.env['SF_DAEMON_CONFIG'] = '/env/path.yaml'; const p = resolveConfigPath(); assert.equal(p, '/env/path.yaml'); } finally { - if (prev === undefined) delete process.env['GSD_DAEMON_CONFIG']; - else process.env['GSD_DAEMON_CONFIG'] = prev; + if (prev === undefined) delete process.env['SF_DAEMON_CONFIG']; + else process.env['SF_DAEMON_CONFIG'] = prev; } }); it('defaults to ~/.gsd/daemon.yaml', () => { - const prev = process.env['GSD_DAEMON_CONFIG']; + const prev = process.env['SF_DAEMON_CONFIG']; try { - delete process.env['GSD_DAEMON_CONFIG']; + delete process.env['SF_DAEMON_CONFIG']; const p = resolveConfigPath(); assert.equal(p, join(homedir(), '.gsd', 'daemon.yaml')); } finally { - if (prev !== undefined) process.env['GSD_DAEMON_CONFIG'] = prev; + if (prev !== undefined) process.env['SF_DAEMON_CONFIG'] = prev; } }); }); diff --git a/packages/daemon/src/discord-bot.test.ts b/packages/daemon/src/discord-bot.test.ts index e450fd885..6757fbbb2 100644 --- a/packages/daemon/src/discord-bot.test.ts +++ b/packages/daemon/src/discord-bot.test.ts @@ -342,7 +342,7 @@ describe('ChannelManager', () => { const mgr = new ChannelManager({ guild: guild as any, logger: logger as any }); const cat = await mgr.resolveCategory(); - assert.equal(cat.name, 'GSD Projects'); + assert.equal(cat.name, 'SF Projects'); assert.equal(cat.type, ChannelType.GuildCategory); }); @@ -363,7 +363,7 @@ describe('ChannelManager', () => { // Pre-populate a matching category guild._channels.set('existing-cat', { id: 'existing-cat', - name: 'GSD Projects', + name: 'SF Projects', type: ChannelType.GuildCategory, parentId: null, }); diff --git a/packages/daemon/src/discord-bot.ts b/packages/daemon/src/discord-bot.ts index e4c302354..9c90ac1ab 100644 --- a/packages/daemon/src/discord-bot.ts +++ b/packages/daemon/src/discord-bot.ts @@ -397,7 +397,7 @@ export class DiscordBot { const projectPath = collected.values[0]; this.logger.info('gsd-start: project selected', { projectPath }); - // Defer the update immediately — startSession can take 10-30s to spawn the GSD process, + // Defer the update immediately — startSession can take 10-30s to spawn the SF process, // and Discord's component interaction token expires in 3 seconds without deferral. await collected.deferUpdate(); diff --git a/packages/daemon/src/event-bridge.ts b/packages/daemon/src/event-bridge.ts index f59bab209..da8a94f28 100644 --- a/packages/daemon/src/event-bridge.ts +++ b/packages/daemon/src/event-bridge.ts @@ -6,7 +6,7 @@ * - Session lifecycle → Discord channel creation and cleanup * - Event streaming → format + verbosity filter + batcher * - Blocker resolution → interactive buttons + text relay - * - Conversation relay → Discord messages forwarded to GSD sessions + * - Conversation relay → Discord messages forwarded to SF sessions * - DM backup → owner gets DM on blocker when dm_on_blocker configured */ @@ -383,7 +383,7 @@ export class EventBridge { } // ----------------------------------------------------------------------- - // Conversation relay — Discord → GSD + // Conversation relay — Discord → SF // ----------------------------------------------------------------------- private async handleMessageCreate(message: Message): Promise { @@ -417,7 +417,7 @@ export class EventBridge { return; } - // Otherwise, relay the message to the GSD session + // Otherwise, relay the message to the SF session // Use steer() when running (injects mid-turn), prompt() otherwise (starts new turn) try { if (session.status === 'running') { diff --git a/packages/daemon/src/launchd.ts b/packages/daemon/src/launchd.ts index fbb6385c6..92916b155 100644 --- a/packages/daemon/src/launchd.ts +++ b/packages/daemon/src/launchd.ts @@ -67,7 +67,7 @@ function buildEnvPath(nodePath: string): string { // --------------- plist generation --------------- -/** Generate valid launchd plist XML for the GSD daemon. */ +/** Generate valid launchd plist XML for the SF daemon. */ export function generatePlist(opts: PlistOptions): string { const home = homedir(); const workDir = opts.workingDirectory ?? home; diff --git a/packages/daemon/src/orchestrator.ts b/packages/daemon/src/orchestrator.ts index fe2998d8f..a945554b8 100644 --- a/packages/daemon/src/orchestrator.ts +++ b/packages/daemon/src/orchestrator.ts @@ -64,7 +64,7 @@ export interface OrchestratorDeps { // System Prompt // --------------------------------------------------------------------------- -const SYSTEM_PROMPT = `You are GSD Control — a concise, capable orchestrator for managing GSD (Get Shit Done) coding agent sessions via Discord. +const SYSTEM_PROMPT = `You are SF Control — a concise, capable orchestrator for managing SF (Singularity Forge) coding agent sessions via Discord. You have tools to list projects, start sessions, get status, stop sessions, and inspect session details. Use them to fulfill the user's requests. @@ -93,7 +93,7 @@ const TOOLS: Tool[] = [ }, { name: 'start_session', - description: 'Start a new GSD auto-mode session for a project. Provide the absolute project path. Optionally provide a command to run instead of the default "/gsd auto".', + description: 'Start a new SF auto-mode session for a project. Provide the absolute project path. Optionally provide a command to run instead of the default "/gsd auto".', input_schema: { type: 'object' as const, properties: { @@ -105,7 +105,7 @@ const TOOLS: Tool[] = [ }, { name: 'get_status', - description: 'Get the current status of all active GSD sessions. Shows project name, status, duration, and cost for each.', + description: 'Get the current status of all active SF sessions. Shows project name, status, duration, and cost for each.', input_schema: { type: 'object' as const, properties: {}, @@ -114,7 +114,7 @@ const TOOLS: Tool[] = [ }, { name: 'stop_session', - description: 'Stop a running GSD session. Provide a session ID or project name — fuzzy matching is used to find the session.', + description: 'Stop a running SF session. Provide a session ID or project name — fuzzy matching is used to find the session.', input_schema: { type: 'object' as const, properties: { diff --git a/packages/daemon/src/session-manager.test.ts b/packages/daemon/src/session-manager.test.ts index 8adccd670..79584cba9 100644 --- a/packages/daemon/src/session-manager.test.ts +++ b/packages/daemon/src/session-manager.test.ts @@ -3,7 +3,7 @@ * * Uses the MockRpcClient + TestableSessionManager pattern (K008) to test * session lifecycle, event handling, cost tracking, blocker detection, - * and cleanup without spawning real GSD processes. + * and cleanup without spawning real SF processes. */ import { describe, it, beforeEach, afterEach } from 'node:test'; diff --git a/packages/daemon/src/session-manager.ts b/packages/daemon/src/session-manager.ts index bb398b567..54c4260a5 100644 --- a/packages/daemon/src/session-manager.ts +++ b/packages/daemon/src/session-manager.ts @@ -1,5 +1,5 @@ /** - * SessionManager — manages RpcClient lifecycle for daemon-driven GSD execution. + * SessionManager — manages RpcClient lifecycle for daemon-driven SF execution. * * Extends EventEmitter to emit typed session lifecycle events. * One active session per projectDir. Tracks events in a ring buffer, @@ -67,7 +67,7 @@ export class SessionManager extends EventEmitter { } /** - * Start a new GSD auto-mode session for the given project directory. + * Start a new SF auto-mode session for the given project directory. * * Rejects if a session already exists for this projectDir. * Creates an RpcClient, starts the process, performs the v2 init handshake, @@ -275,13 +275,13 @@ export class SessionManager extends EventEmitter { } /** - * Resolve the GSD CLI path. + * Resolve the SF CLI path. * - * 1. GSD_CLI_PATH env var (highest priority) + * 1. SF_CLI_PATH env var (highest priority) * 2. `which gsd` → resolve to the actual dist/cli.js */ static resolveCLIPath(): string { - const envPath = process.env['GSD_CLI_PATH']; + const envPath = process.env['SF_CLI_PATH']; if (envPath) return resolve(envPath); try { @@ -292,7 +292,7 @@ export class SessionManager extends EventEmitter { } throw new Error( - 'Cannot find GSD CLI. Set GSD_CLI_PATH environment variable or ensure `gsd` is in PATH.' + 'Cannot find SF CLI. Set SF_CLI_PATH environment variable or ensure `gsd` is in PATH.' ); } diff --git a/packages/daemon/src/types.ts b/packages/daemon/src/types.ts index 163bdb412..4fd16c5ea 100644 --- a/packages/daemon/src/types.ts +++ b/packages/daemon/src/types.ts @@ -63,7 +63,7 @@ export type SessionStatus = 'starting' | 'running' | 'blocked' | 'completed' | ' // --------------------------------------------------------------------------- /** - * A daemon-managed GSD headless session. + * A daemon-managed SF headless session. */ export interface ManagedSession { /** Unique session ID returned from RpcClient.init() */ @@ -170,7 +170,7 @@ export interface StartSessionOptions { /** Run in bare mode (skip user config) */ bare?: boolean; - /** Path to CLI binary (overrides GSD_CLI_PATH and which resolution) */ + /** Path to CLI binary (overrides SF_CLI_PATH and which resolution) */ cliPath?: string; } @@ -179,7 +179,7 @@ export interface StartSessionOptions { // --------------------------------------------------------------------------- /** - * Formatted Discord message payload for a GSD event. + * Formatted Discord message payload for a SF event. * content is the plain-text fallback; embeds and components are optional. */ export interface FormattedEvent { diff --git a/packages/mcp-server/README.md b/packages/mcp-server/README.md index 642657dd7..513b33276 100644 --- a/packages/mcp-server/README.md +++ b/packages/mcp-server/README.md @@ -1,12 +1,12 @@ # @gsd-build/mcp-server -MCP server exposing GSD orchestration tools for Claude Code, Cursor, and other MCP-compatible clients. +MCP server exposing SF orchestration tools for Claude Code, Cursor, and other MCP-compatible clients. -Start GSD auto-mode sessions, poll progress, resolve blockers, and retrieve results — all through the [Model Context Protocol](https://modelcontextprotocol.io/). +Start SF auto-mode sessions, poll progress, resolve blockers, and retrieve results — all through the [Model Context Protocol](https://modelcontextprotocol.io/). This package now exposes two tool surfaces: -- session/read tools for starting and inspecting GSD sessions +- session/read tools for starting and inspecting SF sessions - MCP-native interactive tools for structured user input - headless-safe workflow tools for planning, completion, validation, reassessment, metadata persistence, and journal reads @@ -36,7 +36,7 @@ Add to your project's `.mcp.json`: "command": "npx", "args": ["gsd-mcp-server"], "env": { - "GSD_CLI_PATH": "/path/to/gsd" + "SF_CLI_PATH": "/path/to/gsd" } } } @@ -66,7 +66,7 @@ Add to `.cursor/mcp.json`: "command": "npx", "args": ["gsd-mcp-server"], "env": { - "GSD_CLI_PATH": "/path/to/gsd" + "SF_CLI_PATH": "/path/to/gsd" } } } @@ -109,18 +109,18 @@ The workflow MCP surface includes: - `gsd_milestone_status` - `gsd_journal_query` -These tools use the same GSD workflow handlers as the native in-process tool path wherever a shared handler exists. +These tools use the same SF workflow handlers as the native in-process tool path wherever a shared handler exists. ### Interactive tools -The packaged server now exposes `ask_user_questions` through MCP form elicitation. This keeps the existing GSD answer payload shape while allowing Claude Code CLI and other elicitation-capable clients to surface structured user choices. +The packaged server now exposes `ask_user_questions` through MCP form elicitation. This keeps the existing SF answer payload shape while allowing Claude Code CLI and other elicitation-capable clients to surface structured user choices. `secure_env_collect` is still not exposed by this package. That path needs MCP URL elicitation or an equivalent secure bridge because secrets should not flow through form elicitation. Current support boundary: -- when running inside the GSD monorepo checkout, the MCP server auto-discovers the shared workflow executor module -- outside the monorepo, set `GSD_WORKFLOW_EXECUTORS_MODULE` to an importable `workflow-tool-executors` module path if you want the mutation tools enabled +- when running inside the SF monorepo checkout, the MCP server auto-discovers the shared workflow executor module +- outside the monorepo, set `SF_WORKFLOW_EXECUTORS_MODULE` to an importable `workflow-tool-executors` module path if you want the mutation tools enabled - `ask_user_questions` requires an MCP client that supports form elicitation - session/read tools do not depend on this bridge @@ -128,7 +128,7 @@ If the executor bridge cannot be loaded, workflow mutation calls will fail with ### `gsd_execute` -Start a GSD auto-mode session for a project directory. +Start a SF auto-mode session for a project directory. | Parameter | Type | Required | Description | |-----------|------|----------|-------------| @@ -141,7 +141,7 @@ Start a GSD auto-mode session for a project directory. ### `gsd_status` -Poll the current status of a running GSD session. +Poll the current status of a running SF session. | Parameter | Type | Required | Description | |-----------|------|----------|-------------| @@ -195,7 +195,7 @@ Cancel a running session. Aborts the current operation and stops the agent proce ### `gsd_query` -Query GSD project state from the filesystem without an active session. Returns STATE.md, PROJECT.md, requirements, and milestone listing. +Query SF project state from the filesystem without an active session. Returns STATE.md, PROJECT.md, requirements, and milestone listing. | Parameter | Type | Required | Description | |-----------|------|----------|-------------| @@ -231,8 +231,8 @@ Resolve a pending blocker in a session by sending a response to the blocked UI r | Variable | Description | |----------|-------------| -| `GSD_CLI_PATH` | Absolute path to the GSD CLI binary. If not set, the server resolves `gsd` via `which`. | -| `GSD_WORKFLOW_EXECUTORS_MODULE` | Optional absolute path or `file:` URL for the shared GSD workflow executor module used by workflow mutation tools. | +| `SF_CLI_PATH` | Absolute path to the SF CLI binary. If not set, the server resolves `gsd` via `which`. | +| `SF_WORKFLOW_EXECUTORS_MODULE` | Optional absolute path or `file:` URL for the shared SF workflow executor module used by workflow mutation tools. | The server also hydrates supported model-provider and tool credentials from `~/.gsd/agent/auth.json` on startup. Keys saved through `/gsd config` or `/gsd keys` become available to the MCP server process automatically, and any explicitly-set environment variable still wins. @@ -248,14 +248,14 @@ The server also hydrates supported model-provider and tool credentials from `~/. │ @gsd-build/rpc-client │ │ │ │ │ ▼ │ - │ GSD CLI (child │ + │ SF CLI (child │ │ process via RPC)│ └──────────────────┘ ``` - **@gsd-build/mcp-server** — MCP protocol adapter. Translates MCP tool calls into SessionManager operations. - **SessionManager** — Manages RpcClient lifecycle. One session per project directory. Tracks events in a ring buffer (last 50), detects blockers, accumulates cost. -- **@gsd-build/rpc-client** — Low-level RPC client that spawns and communicates with the GSD CLI process via JSON-RPC over stdio. +- **@gsd-build/rpc-client** — Low-level RPC client that spawns and communicates with the SF CLI process via JSON-RPC over stdio. ## License diff --git a/packages/mcp-server/src/env-writer.test.ts b/packages/mcp-server/src/env-writer.test.ts index 2d08ecea5..deee26f13 100644 --- a/packages/mcp-server/src/env-writer.test.ts +++ b/packages/mcp-server/src/env-writer.test.ts @@ -40,15 +40,15 @@ describe('checkExistingEnvKeys', () => { it('finds key in process.env', async () => { const tmp = makeTempDir('env-check'); - const saved = process.env.GSD_MCP_TEST_KEY_1; + const saved = process.env.SF_MCP_TEST_KEY_1; try { - process.env.GSD_MCP_TEST_KEY_1 = 'some-value'; + process.env.SF_MCP_TEST_KEY_1 = 'some-value'; const envPath = join(tmp, '.env'); - const result = await checkExistingEnvKeys(['GSD_MCP_TEST_KEY_1'], envPath); - assert.deepStrictEqual(result, ['GSD_MCP_TEST_KEY_1']); + const result = await checkExistingEnvKeys(['SF_MCP_TEST_KEY_1'], envPath); + assert.deepStrictEqual(result, ['SF_MCP_TEST_KEY_1']); } finally { - delete process.env.GSD_MCP_TEST_KEY_1; - if (saved !== undefined) process.env.GSD_MCP_TEST_KEY_1 = saved; + delete process.env.SF_MCP_TEST_KEY_1; + if (saved !== undefined) process.env.SF_MCP_TEST_KEY_1 = saved; rmSync(tmp, { recursive: true, force: true }); } }); @@ -200,18 +200,18 @@ describe('applySecrets', () => { it('writes keys to .env and hydrates process.env', async () => { const tmp = makeTempDir('apply'); const envPath = join(tmp, '.env'); - savedKeys.GSD_APPLY_TEST_A = process.env.GSD_APPLY_TEST_A; + savedKeys.SF_APPLY_TEST_A = process.env.SF_APPLY_TEST_A; try { const { applied, errors } = await applySecrets( - [{ key: 'GSD_APPLY_TEST_A', value: 'val-a' }], + [{ key: 'SF_APPLY_TEST_A', value: 'val-a' }], 'dotenv', { envFilePath: envPath }, ); - assert.deepStrictEqual(applied, ['GSD_APPLY_TEST_A']); + assert.deepStrictEqual(applied, ['SF_APPLY_TEST_A']); assert.deepStrictEqual(errors, []); - assert.equal(process.env.GSD_APPLY_TEST_A, 'val-a'); + assert.equal(process.env.SF_APPLY_TEST_A, 'val-a'); const content = readFileSync(envPath, 'utf8'); - assert.ok(content.includes('GSD_APPLY_TEST_A=val-a')); + assert.ok(content.includes('SF_APPLY_TEST_A=val-a')); } finally { rmSync(tmp, { recursive: true, force: true }); } diff --git a/packages/mcp-server/src/import-candidates.test.ts b/packages/mcp-server/src/import-candidates.test.ts index 5e678b49e..ef581e8bd 100644 --- a/packages/mcp-server/src/import-candidates.test.ts +++ b/packages/mcp-server/src/import-candidates.test.ts @@ -1,4 +1,4 @@ -// GSD-2 — Regression tests for importLocalModule candidate resolution (#3954) +// SF — Regression tests for importLocalModule candidate resolution (#3954) import { describe, it } from "node:test"; import assert from "node:assert/strict"; diff --git a/packages/mcp-server/src/index.ts b/packages/mcp-server/src/index.ts index 5600698a3..cb815bf6c 100644 --- a/packages/mcp-server/src/index.ts +++ b/packages/mcp-server/src/index.ts @@ -1,5 +1,5 @@ /** - * @singularity-forge/mcp-server — MCP server for GSD orchestration and project state. + * @singularity-forge/mcp-server — MCP server for SF orchestration and project state. */ export { SessionManager } from './session-manager.js'; diff --git a/packages/mcp-server/src/mcp-server.test.ts b/packages/mcp-server/src/mcp-server.test.ts index 70214b49b..a0f510d4e 100644 --- a/packages/mcp-server/src/mcp-server.test.ts +++ b/packages/mcp-server/src/mcp-server.test.ts @@ -524,33 +524,33 @@ describe('SessionManager', () => { // --------------------------------------------------------------------------- describe('SessionManager.resolveCLIPath', () => { - const originalGsdPath = process.env['GSD_CLI_PATH']; + const originalGsdPath = process.env['SF_CLI_PATH']; const originalPath = process.env['PATH']; afterEach(() => { if (originalGsdPath !== undefined) { - process.env['GSD_CLI_PATH'] = originalGsdPath; + process.env['SF_CLI_PATH'] = originalGsdPath; } else { - delete process.env['GSD_CLI_PATH']; + delete process.env['SF_CLI_PATH']; } if (originalPath !== undefined) { process.env['PATH'] = originalPath; } }); - it('GSD_CLI_PATH env var takes precedence', () => { - process.env['GSD_CLI_PATH'] = '/custom/path/to/gsd'; + it('SF_CLI_PATH env var takes precedence', () => { + process.env['SF_CLI_PATH'] = '/custom/path/to/gsd'; const result = SessionManager.resolveCLIPath(); assert.equal(result, resolve('/custom/path/to/gsd')); }); - it('throws when GSD_CLI_PATH not set and which fails', () => { - delete process.env['GSD_CLI_PATH']; + it('throws when SF_CLI_PATH not set and which fails', () => { + delete process.env['SF_CLI_PATH']; process.env['PATH'] = '/nonexistent'; assert.throws( () => SessionManager.resolveCLIPath(), (err: Error) => { - assert.ok(err.message.includes('Cannot find GSD CLI')); + assert.ok(err.message.includes('Cannot find SF CLI')); return true; }, ); diff --git a/packages/mcp-server/src/readers/captures.ts b/packages/mcp-server/src/readers/captures.ts index 9cbd71570..9c48fd1bd 100644 --- a/packages/mcp-server/src/readers/captures.ts +++ b/packages/mcp-server/src/readers/captures.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — captures reader +// SF MCP Server — captures reader // Copyright (c) 2026 Jeremy McSpadden import { readFileSync, existsSync } from 'node:fs'; diff --git a/packages/mcp-server/src/readers/doctor-lite.ts b/packages/mcp-server/src/readers/doctor-lite.ts index 8b826090c..8212b7118 100644 --- a/packages/mcp-server/src/readers/doctor-lite.ts +++ b/packages/mcp-server/src/readers/doctor-lite.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — lightweight structural health checks +// SF MCP Server — lightweight structural health checks // Copyright (c) 2026 Jeremy McSpadden import { existsSync, readFileSync } from 'node:fs'; diff --git a/packages/mcp-server/src/readers/graph.test.ts b/packages/mcp-server/src/readers/graph.test.ts index 456dd4be4..236e61646 100644 --- a/packages/mcp-server/src/readers/graph.test.ts +++ b/packages/mcp-server/src/readers/graph.test.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — knowledge graph reader tests +// SF MCP Server — knowledge graph reader tests // Copyright (c) 2026 Jeremy McSpadden import { describe, it, before, after, beforeEach, afterEach } from 'node:test'; @@ -36,7 +36,7 @@ function writeFixture(base: string, relPath: string, content: string): void { function makeProjectWithArtifacts(projectDir: string): void { writeFixture(projectDir, '.gsd/STATE.md', [ - '# GSD State', + '# SF State', '', '**Active Milestone:** M001: Auth System', '**Active Slice:** S01: Login flow', diff --git a/packages/mcp-server/src/readers/graph.ts b/packages/mcp-server/src/readers/graph.ts index 0867a5935..165fcaeb2 100644 --- a/packages/mcp-server/src/readers/graph.ts +++ b/packages/mcp-server/src/readers/graph.ts @@ -1,8 +1,8 @@ -// GSD MCP Server — knowledge graph reader +// SF MCP Server — knowledge graph reader // Copyright (c) 2026 Jeremy McSpadden /** - * Knowledge Graph for GSD projects. + * Knowledge Graph for SF projects. * * Parses .gsd/ artifacts (STATE.md, milestone ROADMAPs, slice PLANs, * KNOWLEDGE.md) into a graph of nodes and edges. Parse errors in any diff --git a/packages/mcp-server/src/readers/index.ts b/packages/mcp-server/src/readers/index.ts index fc34db7ae..7cdd7b510 100644 --- a/packages/mcp-server/src/readers/index.ts +++ b/packages/mcp-server/src/readers/index.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — readers barrel export +// SF MCP Server — readers barrel export // Copyright (c) 2026 Jeremy McSpadden export { resolveGsdRoot, resolveRootFile } from './paths.js'; diff --git a/packages/mcp-server/src/readers/knowledge.ts b/packages/mcp-server/src/readers/knowledge.ts index 134df44e0..b6fe3c85a 100644 --- a/packages/mcp-server/src/readers/knowledge.ts +++ b/packages/mcp-server/src/readers/knowledge.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — knowledge base reader +// SF MCP Server — knowledge base reader // Copyright (c) 2026 Jeremy McSpadden import { readFileSync, existsSync } from 'node:fs'; diff --git a/packages/mcp-server/src/readers/metrics.ts b/packages/mcp-server/src/readers/metrics.ts index 0b6635ceb..f0222eccc 100644 --- a/packages/mcp-server/src/readers/metrics.ts +++ b/packages/mcp-server/src/readers/metrics.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — metrics/history reader +// SF MCP Server — metrics/history reader // Copyright (c) 2026 Jeremy McSpadden import { readFileSync, existsSync } from 'node:fs'; diff --git a/packages/mcp-server/src/readers/paths.ts b/packages/mcp-server/src/readers/paths.ts index ad0418a36..d8987e2dc 100644 --- a/packages/mcp-server/src/readers/paths.ts +++ b/packages/mcp-server/src/readers/paths.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — .gsd/ directory resolution +// SF MCP Server — .gsd/ directory resolution // Copyright (c) 2026 Jeremy McSpadden import { existsSync, statSync, readdirSync } from 'node:fs'; diff --git a/packages/mcp-server/src/readers/readers.test.ts b/packages/mcp-server/src/readers/readers.test.ts index 98d157279..df7453ed5 100644 --- a/packages/mcp-server/src/readers/readers.test.ts +++ b/packages/mcp-server/src/readers/readers.test.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — reader tests +// SF MCP Server — reader tests // Copyright (c) 2026 Jeremy McSpadden import { describe, it, before, after } from 'node:test'; @@ -41,7 +41,7 @@ describe('readProgress', () => { before(() => { projectDir = tmpProject(); - writeFixture(projectDir, '.gsd/STATE.md', `# GSD State + writeFixture(projectDir, '.gsd/STATE.md', `# SF State **Active Milestone:** M002: Auth System **Active Slice:** S01: Login flow @@ -448,7 +448,7 @@ describe('runDoctorLite', () => { // M001: complete milestone (has summary) writeFixture(projectDir, '.gsd/PROJECT.md', '# Test Project'); - writeFixture(projectDir, '.gsd/STATE.md', '# GSD State'); + writeFixture(projectDir, '.gsd/STATE.md', '# SF State'); writeFixture(projectDir, '.gsd/milestones/M001/M001-CONTEXT.md', '# M001'); writeFixture(projectDir, '.gsd/milestones/M001/M001-ROADMAP.md', '# Roadmap'); writeFixture(projectDir, '.gsd/milestones/M001/M001-SUMMARY.md', '# Done'); diff --git a/packages/mcp-server/src/readers/roadmap.ts b/packages/mcp-server/src/readers/roadmap.ts index 29a6e1941..74b47e883 100644 --- a/packages/mcp-server/src/readers/roadmap.ts +++ b/packages/mcp-server/src/readers/roadmap.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — roadmap structure reader +// SF MCP Server — roadmap structure reader // Copyright (c) 2026 Jeremy McSpadden import { readFileSync, existsSync } from 'node:fs'; diff --git a/packages/mcp-server/src/readers/state.ts b/packages/mcp-server/src/readers/state.ts index 93ea7d38f..309ea76c9 100644 --- a/packages/mcp-server/src/readers/state.ts +++ b/packages/mcp-server/src/readers/state.ts @@ -1,4 +1,4 @@ -// GSD MCP Server — project state reader +// SF MCP Server — project state reader // Copyright (c) 2026 Jeremy McSpadden import { readFileSync, existsSync } from 'node:fs'; diff --git a/packages/mcp-server/src/server.ts b/packages/mcp-server/src/server.ts index f0718269f..373b689f2 100644 --- a/packages/mcp-server/src/server.ts +++ b/packages/mcp-server/src/server.ts @@ -1,5 +1,5 @@ /** - * MCP Server — registers GSD orchestration, project-state, and workflow tools. + * MCP Server — registers SF orchestration, project-state, and workflow tools. * * Session tools (6): gsd_execute, gsd_status, gsd_result, gsd_cancel, gsd_query, gsd_resolve_blocker * Interactive tools (2): ask_user_questions, secure_env_collect via MCP form elicitation @@ -355,7 +355,7 @@ export async function createMcpServer(sessionManager: SessionManager): Promise<{ ); // ----------------------------------------------------------------------- - // gsd_execute — start a new GSD auto-mode session. + // gsd_execute — start a new SF auto-mode session. // // If the JSON-RPC request is aborted while the session is starting (or // immediately after), we cancel the session so we don't leak a background @@ -364,7 +364,7 @@ export async function createMcpServer(sessionManager: SessionManager): Promise<{ // ----------------------------------------------------------------------- server.tool( 'gsd_execute', - 'Start a GSD auto-mode session for a project directory. Returns a sessionId for tracking.', + 'Start a SF auto-mode session for a project directory. Returns a sessionId for tracking.', { projectDir: z.string().describe('Absolute path to the project directory'), command: z.string().optional().describe('Command to send (default: "/gsd auto")'), @@ -397,7 +397,7 @@ export async function createMcpServer(sessionManager: SessionManager): Promise<{ // ----------------------------------------------------------------------- server.tool( 'gsd_status', - 'Get the current status of a GSD session including progress, recent events, and pending blockers.', + 'Get the current status of a SF session including progress, recent events, and pending blockers.', { sessionId: z.string().describe('Session ID returned from gsd_execute'), }, @@ -441,7 +441,7 @@ export async function createMcpServer(sessionManager: SessionManager): Promise<{ // ----------------------------------------------------------------------- server.tool( 'gsd_result', - 'Get the result of a GSD session. Returns partial results if the session is still running.', + 'Get the result of a SF session. Returns partial results if the session is still running.', { sessionId: z.string().describe('Session ID returned from gsd_execute'), }, @@ -461,7 +461,7 @@ export async function createMcpServer(sessionManager: SessionManager): Promise<{ // ----------------------------------------------------------------------- server.tool( 'gsd_cancel', - 'Cancel a running GSD session. Aborts the current operation and stops the process.', + 'Cancel a running SF session. Aborts the current operation and stops the process.', { sessionId: z.string().describe('Session ID returned from gsd_execute'), }, @@ -486,7 +486,7 @@ export async function createMcpServer(sessionManager: SessionManager): Promise<{ // ----------------------------------------------------------------------- server.tool( 'gsd_query', - 'Query GSD project state from the filesystem. By default returns STATE.md, PROJECT.md, requirements, and milestone listing. Pass `query` to narrow the response (accepted: "state"/"status", "project", "requirements", "milestones", "all"). Does not require an active session.', + 'Query SF project state from the filesystem. By default returns STATE.md, PROJECT.md, requirements, and milestone listing. Pass `query` to narrow the response (accepted: "state"/"status", "project", "requirements", "milestones", "all"). Does not require an active session.', { projectDir: z.string().describe('Absolute path to the project directory'), query: z @@ -510,7 +510,7 @@ export async function createMcpServer(sessionManager: SessionManager): Promise<{ // ----------------------------------------------------------------------- server.tool( 'gsd_resolve_blocker', - 'Resolve a pending blocker in a GSD session by sending a response to the UI request.', + 'Resolve a pending blocker in a SF session by sending a response to the UI request.', { sessionId: z.string().describe('Session ID returned from gsd_execute'), response: z.string().describe('Response to send for the pending blocker'), @@ -803,7 +803,7 @@ export async function createMcpServer(sessionManager: SessionManager): Promise<{ ); // ----------------------------------------------------------------------- - // gsd_graph — knowledge graph for GSD projects + // gsd_graph — knowledge graph for SF projects // // Modes: // build Parse .gsd/ artifacts and write graph.json atomically. @@ -814,7 +814,7 @@ export async function createMcpServer(sessionManager: SessionManager): Promise<{ server.tool( 'gsd_graph', [ - 'Manage the GSD project knowledge graph. No session required.', + 'Manage the SF project knowledge graph. No session required.', '', 'Modes:', ' build Parse .gsd/ artifacts (STATE.md, milestone ROADMAPs, slice PLANs,', diff --git a/packages/mcp-server/src/session-manager.ts b/packages/mcp-server/src/session-manager.ts index 84e7308ce..88341eb80 100644 --- a/packages/mcp-server/src/session-manager.ts +++ b/packages/mcp-server/src/session-manager.ts @@ -1,5 +1,5 @@ /** - * SessionManager — manages RpcClient lifecycle for background GSD execution. + * SessionManager — manages RpcClient lifecycle for background SF execution. * * One active session per projectDir. Tracks events in a ring buffer, * detects blockers, tracks terminal state, and accumulates cost using @@ -56,7 +56,7 @@ export class SessionManager { private sessions = new Map(); /** - * Start a new GSD auto-mode session for the given project directory. + * Start a new SF auto-mode session for the given project directory. * * Rejects if a session already exists for this projectDir. * Creates an RpcClient, starts the process, performs the v2 init handshake, @@ -237,14 +237,14 @@ export class SessionManager { } /** - * Resolve the GSD CLI path. + * Resolve the SF CLI path. * - * 1. GSD_CLI_PATH env var (highest priority) + * 1. SF_CLI_PATH env var (highest priority) * 2. `which gsd` → resolve to the actual dist/cli.js */ static resolveCLIPath(): string { // Check env var first - const envPath = process.env['GSD_CLI_PATH']; + const envPath = process.env['SF_CLI_PATH']; if (envPath) return resolve(envPath); // Fallback: locate `gsd` via which @@ -259,7 +259,7 @@ export class SessionManager { } throw new Error( - 'Cannot find GSD CLI. Set GSD_CLI_PATH environment variable or ensure `gsd` is in PATH.' + 'Cannot find SF CLI. Set SF_CLI_PATH environment variable or ensure `gsd` is in PATH.' ); } diff --git a/packages/mcp-server/src/tool-credentials.test.ts b/packages/mcp-server/src/tool-credentials.test.ts index b6838a29f..573f93c0d 100644 --- a/packages/mcp-server/src/tool-credentials.test.ts +++ b/packages/mcp-server/src/tool-credentials.test.ts @@ -78,14 +78,14 @@ describe("tool credentials", () => { } }); - it("resolves auth.json from GSD_CODING_AGENT_DIR", () => { + it("resolves auth.json from SF_CODING_AGENT_DIR", () => { const tempRoot = mkdtempSync(join(tmpdir(), "gsd-mcp-agent-dir-")); const agentDir = join(tempRoot, "agent"); mkdirSync(agentDir, { recursive: true }); try { assert.equal( - resolveAuthPath({ GSD_CODING_AGENT_DIR: agentDir }), + resolveAuthPath({ SF_CODING_AGENT_DIR: agentDir }), join(agentDir, "auth.json"), ); } finally { diff --git a/packages/mcp-server/src/tool-credentials.ts b/packages/mcp-server/src/tool-credentials.ts index d19487437..b9d05d970 100644 --- a/packages/mcp-server/src/tool-credentials.ts +++ b/packages/mcp-server/src/tool-credentials.ts @@ -61,7 +61,7 @@ function getStoredApiKey(data: AuthStorageData, providerId: string): string | un } export function resolveAuthPath(env: NodeJS.ProcessEnv = process.env): string { - const agentDir = env.GSD_CODING_AGENT_DIR?.trim(); + const agentDir = env.SF_CODING_AGENT_DIR?.trim(); if (agentDir) return join(expandHome(agentDir), "auth.json"); return join(homedir(), ".gsd", "agent", "auth.json"); } diff --git a/packages/mcp-server/src/types.ts b/packages/mcp-server/src/types.ts index 4cce6d1d6..26ac37b25 100644 --- a/packages/mcp-server/src/types.ts +++ b/packages/mcp-server/src/types.ts @@ -92,7 +92,7 @@ export interface ExecuteOptions { /** Run in bare mode (skip user config) */ bare?: boolean; - /** Path to CLI binary (overrides GSD_CLI_PATH and which resolution) */ + /** Path to CLI binary (overrides SF_CLI_PATH and which resolution) */ cliPath?: string; } diff --git a/packages/mcp-server/src/workflow-tools.test.ts b/packages/mcp-server/src/workflow-tools.test.ts index 957ed0a99..4893d2ec3 100644 --- a/packages/mcp-server/src/workflow-tools.test.ts +++ b/packages/mcp-server/src/workflow-tools.test.ts @@ -108,9 +108,9 @@ describe("workflow MCP tools", () => { it("rejects workflow tool calls outside the configured project root", async () => { const base = makeTmpBase(); const otherBase = makeTmpBase(); - const prevRoot = process.env.GSD_WORKFLOW_PROJECT_ROOT; + const prevRoot = process.env.SF_WORKFLOW_PROJECT_ROOT; try { - process.env.GSD_WORKFLOW_PROJECT_ROOT = base; + process.env.SF_WORKFLOW_PROJECT_ROOT = base; const server = makeMockServer(); registerWorkflowTools(server as any); const tool = server.tools.find((t) => t.name === "gsd_summary_save"); @@ -128,9 +128,9 @@ describe("workflow MCP tools", () => { ); } finally { if (prevRoot === undefined) { - delete process.env.GSD_WORKFLOW_PROJECT_ROOT; + delete process.env.SF_WORKFLOW_PROJECT_ROOT; } else { - process.env.GSD_WORKFLOW_PROJECT_ROOT = prevRoot; + process.env.SF_WORKFLOW_PROJECT_ROOT = prevRoot; } cleanup(base); cleanup(otherBase); @@ -139,11 +139,11 @@ describe("workflow MCP tools", () => { it("rejects non-file executor module URLs", async () => { const base = makeTmpBase(); - const prevModule = process.env.GSD_WORKFLOW_EXECUTORS_MODULE; - const prevRoot = process.env.GSD_WORKFLOW_PROJECT_ROOT; + const prevModule = process.env.SF_WORKFLOW_EXECUTORS_MODULE; + const prevRoot = process.env.SF_WORKFLOW_PROJECT_ROOT; try { - process.env.GSD_WORKFLOW_PROJECT_ROOT = base; - process.env.GSD_WORKFLOW_EXECUTORS_MODULE = "data:text/javascript,export default {}"; + process.env.SF_WORKFLOW_PROJECT_ROOT = base; + process.env.SF_WORKFLOW_EXECUTORS_MODULE = "data:text/javascript,export default {}"; const { registerWorkflowTools: freshRegisterWorkflowTools } = await import(`./workflow-tools.ts?bad-module=${randomUUID()}`); const server = makeMockServer(); freshRegisterWorkflowTools(server as any); @@ -162,14 +162,14 @@ describe("workflow MCP tools", () => { ); } finally { if (prevModule === undefined) { - delete process.env.GSD_WORKFLOW_EXECUTORS_MODULE; + delete process.env.SF_WORKFLOW_EXECUTORS_MODULE; } else { - process.env.GSD_WORKFLOW_EXECUTORS_MODULE = prevModule; + process.env.SF_WORKFLOW_EXECUTORS_MODULE = prevModule; } if (prevRoot === undefined) { - delete process.env.GSD_WORKFLOW_PROJECT_ROOT; + delete process.env.SF_WORKFLOW_PROJECT_ROOT; } else { - process.env.GSD_WORKFLOW_PROJECT_ROOT = prevRoot; + process.env.SF_WORKFLOW_PROJECT_ROOT = prevRoot; } cleanup(base); } diff --git a/packages/mcp-server/src/workflow-tools.ts b/packages/mcp-server/src/workflow-tools.ts index 7369490c8..eda1ce8ba 100644 --- a/packages/mcp-server/src/workflow-tools.ts +++ b/packages/mcp-server/src/workflow-tools.ts @@ -1,5 +1,5 @@ /** - * Workflow MCP tools — exposes the core GSD mutation/read handlers over MCP. + * Workflow MCP tools — exposes the core SF mutation/read handlers over MCP. */ import { isAbsolute, relative, resolve } from "node:path"; @@ -253,7 +253,7 @@ let workflowExecutionQueue: Promise = Promise.resolve(); let workflowWriteGatePromise: Promise | null = null; function getAllowedProjectRoot(env: NodeJS.ProcessEnv = process.env): string | null { - const configuredRoot = env.GSD_WORKFLOW_PROJECT_ROOT?.trim(); + const configuredRoot = env.SF_WORKFLOW_PROJECT_ROOT?.trim(); return configuredRoot ? resolve(configuredRoot) : null; } @@ -320,10 +320,10 @@ function getSupportedSummaryArtifactTypes(executors: WorkflowToolExecutors): rea function getWriteGateModuleCandidates(): string[] { const candidates: string[] = []; - const explicitModule = process.env.GSD_WORKFLOW_WRITE_GATE_MODULE?.trim(); + const explicitModule = process.env.SF_WORKFLOW_WRITE_GATE_MODULE?.trim(); if (explicitModule) { if (/^[a-z]{2,}:/i.test(explicitModule) && !explicitModule.startsWith("file:")) { - throw new Error("GSD_WORKFLOW_WRITE_GATE_MODULE only supports file: URLs or filesystem paths."); + throw new Error("SF_WORKFLOW_WRITE_GATE_MODULE only supports file: URLs or filesystem paths."); } candidates.push(explicitModule.startsWith("file:") ? explicitModule : toFileUrl(explicitModule)); } @@ -378,10 +378,10 @@ async function importLocalModule(relativePath: string): Promise { function getWorkflowExecutorModuleCandidates(env: NodeJS.ProcessEnv = process.env): string[] { const candidates: string[] = []; - const explicitModule = env.GSD_WORKFLOW_EXECUTORS_MODULE?.trim(); + const explicitModule = env.SF_WORKFLOW_EXECUTORS_MODULE?.trim(); if (explicitModule) { if (/^[a-z]{2,}:/i.test(explicitModule) && !explicitModule.startsWith("file:")) { - throw new Error("GSD_WORKFLOW_EXECUTORS_MODULE only supports file: URLs or filesystem paths."); + throw new Error("SF_WORKFLOW_EXECUTORS_MODULE only supports file: URLs or filesystem paths."); } candidates.push(explicitModule.startsWith("file:") ? explicitModule : toFileUrl(explicitModule)); } @@ -412,9 +412,9 @@ async function getWorkflowToolExecutors(): Promise { } throw new Error( - "Unable to load GSD workflow executor bridge for MCP mutation tools. " + - "Set GSD_WORKFLOW_EXECUTORS_MODULE to an importable workflow-tool-executors module, " + - "or run the MCP server from a GSD checkout that includes src/resources/extensions/sf/tools/workflow-tool-executors.(js|ts). " + + "Unable to load SF workflow executor bridge for MCP mutation tools. " + + "Set SF_WORKFLOW_EXECUTORS_MODULE to an importable workflow-tool-executors module, " + + "or run the MCP server from a SF checkout that includes src/resources/extensions/sf/tools/workflow-tool-executors.(js|ts). " + `Attempts: ${attempts.join("; ")}`, ); })(); @@ -444,7 +444,7 @@ async function getWorkflowWriteGateModule(): Promise { } throw new Error( - "Unable to load GSD write-gate bridge for workflow MCP tools. " + + "Unable to load SF write-gate bridge for workflow MCP tools. " + `Attempts: ${attempts.join("; ")}`, ); })(); @@ -520,7 +520,7 @@ async function runSerializedWorkflowDbOperation( ); const dbAvailable = await ensureDbOpen(projectDir); if (!dbAvailable) { - throw new Error("GSD database is not available"); + throw new Error("SF database is not available"); } return fn(); }); @@ -983,7 +983,7 @@ const journalQuerySchema = z.object(journalQueryParams); export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_decision_save", - "Record a project decision to the GSD database and regenerate DECISIONS.md.", + "Record a project decision to the SF database and regenerate DECISIONS.md.", decisionSaveParams, async (args: Record) => { const parsed = parseWorkflowArgs(decisionSaveSchema, args); @@ -999,7 +999,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_save_decision", - "Alias for gsd_decision_save. Record a project decision to the GSD database and regenerate DECISIONS.md.", + "Alias for gsd_decision_save. Record a project decision to the SF database and regenerate DECISIONS.md.", decisionSaveParams, async (args: Record) => { const parsed = parseWorkflowArgs(decisionSaveSchema, args); @@ -1015,7 +1015,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_requirement_update", - "Update an existing requirement in the GSD database and regenerate REQUIREMENTS.md.", + "Update an existing requirement in the SF database and regenerate REQUIREMENTS.md.", requirementUpdateParams, async (args: Record) => { const parsed = parseWorkflowArgs(requirementUpdateSchema, args); @@ -1031,7 +1031,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_update_requirement", - "Alias for gsd_requirement_update. Update an existing requirement in the GSD database and regenerate REQUIREMENTS.md.", + "Alias for gsd_requirement_update. Update an existing requirement in the SF database and regenerate REQUIREMENTS.md.", requirementUpdateParams, async (args: Record) => { const parsed = parseWorkflowArgs(requirementUpdateSchema, args); @@ -1047,7 +1047,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_requirement_save", - "Record a new requirement to the GSD database and regenerate REQUIREMENTS.md.", + "Record a new requirement to the SF database and regenerate REQUIREMENTS.md.", requirementSaveParams, async (args: Record) => { const parsed = parseWorkflowArgs(requirementSaveSchema, args); @@ -1063,7 +1063,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_save_requirement", - "Alias for gsd_requirement_save. Record a new requirement to the GSD database and regenerate REQUIREMENTS.md.", + "Alias for gsd_requirement_save. Record a new requirement to the SF database and regenerate REQUIREMENTS.md.", requirementSaveParams, async (args: Record) => { const parsed = parseWorkflowArgs(requirementSaveSchema, args); @@ -1079,7 +1079,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_milestone_generate_id", - "Generate the next milestone ID for a new GSD milestone.", + "Generate the next milestone ID for a new SF milestone.", milestoneGenerateIdParams, async (args: Record) => { const { projectDir } = parseWorkflowArgs(milestoneGenerateIdSchema, args); @@ -1107,7 +1107,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_generate_milestone_id", - "Alias for gsd_milestone_generate_id. Generate the next milestone ID for a new GSD milestone.", + "Alias for gsd_milestone_generate_id. Generate the next milestone ID for a new SF milestone.", milestoneGenerateIdParams, async (args: Record) => { const { projectDir } = parseWorkflowArgs(milestoneGenerateIdSchema, args); @@ -1135,7 +1135,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_plan_milestone", - "Write milestone planning state to the GSD database and render ROADMAP.md from DB.", + "Write milestone planning state to the SF database and render ROADMAP.md from DB.", planMilestoneParams, async (args: Record) => { const parsed = parseWorkflowArgs(planMilestoneSchema, args); @@ -1148,7 +1148,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_plan_slice", - "Write slice/task planning state to the GSD database and render plan artifacts from DB.", + "Write slice/task planning state to the SF database and render plan artifacts from DB.", planSliceParams, async (args: Record) => { const parsed = parseWorkflowArgs(planSliceSchema, args); @@ -1161,7 +1161,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_plan_task", - "Write task planning state to the GSD database and render tasks/T##-PLAN.md from DB.", + "Write task planning state to the SF database and render tasks/T##-PLAN.md from DB.", planTaskParams, async (args: Record) => { const parsed = parseWorkflowArgs(planTaskSchema, args); @@ -1182,7 +1182,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_task_plan", - "Alias for gsd_plan_task. Write task planning state to the GSD database and render tasks/T##-PLAN.md from DB.", + "Alias for gsd_plan_task. Write task planning state to the SF database and render tasks/T##-PLAN.md from DB.", planTaskParams, async (args: Record) => { const parsed = parseWorkflowArgs(planTaskSchema, args); @@ -1223,7 +1223,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_slice_complete", - "Record a completed slice to the GSD database, render SUMMARY.md + UAT.md, and update roadmap projection.", + "Record a completed slice to the SF database, render SUMMARY.md + UAT.md, and update roadmap projection.", sliceCompleteParams, async (args: Record) => { const parsed = parseWorkflowArgs(sliceCompleteSchema, args); @@ -1233,7 +1233,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_complete_slice", - "Alias for gsd_slice_complete. Record a completed slice to the GSD database and render summary/UAT artifacts.", + "Alias for gsd_slice_complete. Record a completed slice to the SF database and render summary/UAT artifacts.", sliceCompleteParams, async (args: Record) => { const parsed = parseWorkflowArgs(sliceCompleteSchema, args); @@ -1273,7 +1273,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_complete_milestone", - "Record a completed milestone to the GSD database and render its SUMMARY.md.", + "Record a completed milestone to the SF database and render its SUMMARY.md.", completeMilestoneParams, async (args: Record) => { const parsed = parseWorkflowArgs(completeMilestoneSchema, args); @@ -1283,7 +1283,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_milestone_complete", - "Alias for gsd_complete_milestone. Record a completed milestone to the GSD database and render its SUMMARY.md.", + "Alias for gsd_complete_milestone. Record a completed milestone to the SF database and render its SUMMARY.md.", completeMilestoneParams, async (args: Record) => { const parsed = parseWorkflowArgs(completeMilestoneSchema, args); @@ -1293,7 +1293,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_validate_milestone", - "Validate a milestone, persist validation results to the GSD database, and render VALIDATION.md.", + "Validate a milestone, persist validation results to the SF database, and render VALIDATION.md.", validateMilestoneParams, async (args: Record) => { const parsed = parseWorkflowArgs(validateMilestoneSchema, args); @@ -1333,7 +1333,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_save_gate_result", - "Save a quality gate result to the GSD database.", + "Save a quality gate result to the SF database.", saveGateResultParams, async (args: Record) => { const parsed = parseWorkflowArgs(saveGateResultSchema, args); @@ -1343,7 +1343,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_summary_save", - "Save a GSD summary/research/context/assessment artifact to the database and disk.", + "Save a SF summary/research/context/assessment artifact to the database and disk.", summarySaveParams, async (args: Record) => { const parsed = parseWorkflowArgs(summarySaveSchema, args); @@ -1364,7 +1364,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_task_complete", - "Record a completed task to the GSD database and render its SUMMARY.md.", + "Record a completed task to the SF database and render its SUMMARY.md.", taskCompleteParams, async (args: Record) => { const parsed = parseWorkflowArgs(taskCompleteSchema, args); @@ -1375,7 +1375,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_complete_task", - "Alias for gsd_task_complete. Record a completed task to the GSD database and render its SUMMARY.md.", + "Alias for gsd_task_complete. Record a completed task to the SF database and render its SUMMARY.md.", taskCompleteParams, async (args: Record) => { const parsed = parseWorkflowArgs(taskCompleteSchema, args); @@ -1386,7 +1386,7 @@ export function registerWorkflowTools(server: McpToolServer): void { server.tool( "gsd_milestone_status", - "Read the current status of a milestone and all its slices from the GSD database.", + "Read the current status of a milestone and all its slices from the SF database.", milestoneStatusParams, async (args: Record) => { const { projectDir, milestoneId } = parseWorkflowArgs(milestoneStatusSchema, args); diff --git a/packages/native/src/__tests__/clipboard.test.mjs b/packages/native/src/__tests__/clipboard.test.mjs index 08b1154de..1816dd93e 100644 --- a/packages/native/src/__tests__/clipboard.test.mjs +++ b/packages/native/src/__tests__/clipboard.test.mjs @@ -32,7 +32,7 @@ if (!native) { describe("native clipboard: copyToClipboard()", () => { test("copies text without throwing", () => { assert.doesNotThrow(() => { - native.copyToClipboard("GSD clipboard test"); + native.copyToClipboard("SF clipboard test"); }); }); @@ -51,7 +51,7 @@ describe("native clipboard: copyToClipboard()", () => { describe("native clipboard: readTextFromClipboard()", () => { test("reads back text that was copied", () => { - const testText = `GSD clipboard roundtrip ${Date.now()}`; + const testText = `SF clipboard roundtrip ${Date.now()}`; native.copyToClipboard(testText); const result = native.readTextFromClipboard(); assert.equal(result, testText); diff --git a/packages/native/src/__tests__/module-compat.test.mjs b/packages/native/src/__tests__/module-compat.test.mjs index 8f989c1cd..a957730ad 100644 --- a/packages/native/src/__tests__/module-compat.test.mjs +++ b/packages/native/src/__tests__/module-compat.test.mjs @@ -33,7 +33,7 @@ describe("@sf-run/native module compatibility (#2861)", () => { test("package.json should explicitly declare type: commonjs", () => { // When installed as a dependency under a parent with "type": "module" - // (e.g. gsd-pi), an absent "type" field would inherit the parent's + // (e.g. sf-run), an absent "type" field would inherit the parent's // ESM setting. Explicit "commonjs" overrides this. assert.equal( pkg.type, diff --git a/packages/native/src/forge-parser/index.ts b/packages/native/src/forge-parser/index.ts index f7f419ebc..28ad68061 100644 --- a/packages/native/src/forge-parser/index.ts +++ b/packages/native/src/forge-parser/index.ts @@ -1,5 +1,5 @@ /** - * GSD file parser — native Rust implementation. + * SF file parser — native Rust implementation. * * Parses `.gsd/` directory markdown files containing YAML-like frontmatter * and structured sections. Replaces the JS regex-based parser for diff --git a/packages/native/src/forge-parser/types.ts b/packages/native/src/forge-parser/types.ts index c1c2f1db6..f4e510608 100644 --- a/packages/native/src/forge-parser/types.ts +++ b/packages/native/src/forge-parser/types.ts @@ -1,5 +1,5 @@ /** - * GSD file parser type definitions. + * SF file parser type definitions. * * Types for the native Rust parser that handles `.gsd/` directory files * containing YAML-like frontmatter and markdown sections. diff --git a/packages/pi-ai/src/providers/provider-capabilities.test.ts b/packages/pi-ai/src/providers/provider-capabilities.test.ts index 7b8728975..f3d95b48c 100644 --- a/packages/pi-ai/src/providers/provider-capabilities.test.ts +++ b/packages/pi-ai/src/providers/provider-capabilities.test.ts @@ -1,4 +1,4 @@ -// GSD-2 — Provider Capabilities Registry Tests (ADR-005 Phase 1) +// SF — Provider Capabilities Registry Tests (ADR-005 Phase 1) import { describe, test } from "node:test"; import assert from "node:assert/strict"; diff --git a/packages/pi-ai/src/providers/provider-capabilities.ts b/packages/pi-ai/src/providers/provider-capabilities.ts index b49a1f319..d2a15aafc 100644 --- a/packages/pi-ai/src/providers/provider-capabilities.ts +++ b/packages/pi-ai/src/providers/provider-capabilities.ts @@ -1,4 +1,4 @@ -// GSD-2 — Provider Capabilities Registry (ADR-005 Phase 1) +// SF — Provider Capabilities Registry (ADR-005 Phase 1) // Declarative registry of what each API provider supports, consolidating // scattered knowledge from *-shared.ts files into a queryable data structure. diff --git a/packages/pi-ai/src/providers/transform-messages-report.test.ts b/packages/pi-ai/src/providers/transform-messages-report.test.ts index 85ae585ba..4c31777c0 100644 --- a/packages/pi-ai/src/providers/transform-messages-report.test.ts +++ b/packages/pi-ai/src/providers/transform-messages-report.test.ts @@ -1,4 +1,4 @@ -// GSD-2 — ProviderSwitchReport Tests (ADR-005 Phase 3) +// SF — ProviderSwitchReport Tests (ADR-005 Phase 3) import { describe, test } from "node:test"; import assert from "node:assert/strict"; diff --git a/packages/pi-ai/src/providers/transform-messages.ts b/packages/pi-ai/src/providers/transform-messages.ts index bcfd5234a..6ee755260 100644 --- a/packages/pi-ai/src/providers/transform-messages.ts +++ b/packages/pi-ai/src/providers/transform-messages.ts @@ -77,7 +77,7 @@ function logProviderSwitchReport(report: ProviderSwitchReport): void { if (report.thoughtSignaturesDropped > 0) parts.push(`${report.thoughtSignaturesDropped} thought signatures dropped`); // Use process.stderr for debug output — this is observable in verbose/debug modes // without polluting stdout which may be used for structured output (RPC/MCP). - if (process.env.GSD_VERBOSE === "1" || process.env.PI_VERBOSE === "1") { + if (process.env.SF_VERBOSE === "1" || process.env.PI_VERBOSE === "1") { process.stderr.write(`[provider-switch] ${parts.join(", ")}\n`); } } diff --git a/packages/pi-coding-agent/src/core/agent-session-tool-refresh.test.ts b/packages/pi-coding-agent/src/core/agent-session-tool-refresh.test.ts index f1a14a15b..1e5a8ae49 100644 --- a/packages/pi-coding-agent/src/core/agent-session-tool-refresh.test.ts +++ b/packages/pi-coding-agent/src/core/agent-session-tool-refresh.test.ts @@ -1,4 +1,4 @@ -// GSD-2 — Regression tests for #3616: tool list persistence across newSession() calls +// SF — Regression tests for #3616: tool list persistence across newSession() calls // Copyright (c) 2026 Jeremy McSpadden import test, { describe } from "node:test"; diff --git a/packages/pi-coding-agent/src/core/extensions/extension-manifest.test.ts b/packages/pi-coding-agent/src/core/extensions/extension-manifest.test.ts index 3796ab071..efe3ba388 100644 --- a/packages/pi-coding-agent/src/core/extensions/extension-manifest.test.ts +++ b/packages/pi-coding-agent/src/core/extensions/extension-manifest.test.ts @@ -1,4 +1,4 @@ -// GSD-2 — Extension Manifest Tests +// SF — Extension Manifest Tests // Copyright (c) 2026 Jeremy McSpadden import { describe, it } from "node:test"; diff --git a/packages/pi-coding-agent/src/core/extensions/extension-manifest.ts b/packages/pi-coding-agent/src/core/extensions/extension-manifest.ts index 673f5a410..981f39953 100644 --- a/packages/pi-coding-agent/src/core/extensions/extension-manifest.ts +++ b/packages/pi-coding-agent/src/core/extensions/extension-manifest.ts @@ -1,4 +1,4 @@ -// GSD-2 — Extension Manifest: Types and reading for extension-manifest.json +// SF — Extension Manifest: Types and reading for extension-manifest.json // Copyright (c) 2026 Jeremy McSpadden import { existsSync, readFileSync } from "node:fs"; diff --git a/packages/pi-coding-agent/src/core/extensions/extension-sort.test.ts b/packages/pi-coding-agent/src/core/extensions/extension-sort.test.ts index 30a4b667e..f58413300 100644 --- a/packages/pi-coding-agent/src/core/extensions/extension-sort.test.ts +++ b/packages/pi-coding-agent/src/core/extensions/extension-sort.test.ts @@ -1,4 +1,4 @@ -// GSD-2 — Extension Sort Tests +// SF — Extension Sort Tests // Copyright (c) 2026 Jeremy McSpadden import { describe, it } from "node:test"; diff --git a/packages/pi-coding-agent/src/core/extensions/extension-sort.ts b/packages/pi-coding-agent/src/core/extensions/extension-sort.ts index 07a3e67d6..8d16a215f 100644 --- a/packages/pi-coding-agent/src/core/extensions/extension-sort.ts +++ b/packages/pi-coding-agent/src/core/extensions/extension-sort.ts @@ -1,4 +1,4 @@ -// GSD-2 — Extension Sort: Topological dependency ordering +// SF — Extension Sort: Topological dependency ordering // Copyright (c) 2026 Jeremy McSpadden import { readManifestFromEntryPath } from "./extension-manifest.js"; diff --git a/packages/pi-coding-agent/src/core/extensions/loader.ts b/packages/pi-coding-agent/src/core/extensions/loader.ts index a0d63879b..ef24bb191 100644 --- a/packages/pi-coding-agent/src/core/extensions/loader.ts +++ b/packages/pi-coding-agent/src/core/extensions/loader.ts @@ -92,7 +92,7 @@ const STATIC_BUNDLED_MODULES: Record = { const VIRTUAL_MODULES: Record = { ...STATIC_BUNDLED_MODULES }; const require = createRequire(import.meta.url); -const EXTENSION_TIMING_ENABLED = process.env.GSD_STARTUP_TIMING === "1" || process.env.PI_TIMING === "1"; +const EXTENSION_TIMING_ENABLED = process.env.SF_STARTUP_TIMING === "1" || process.env.PI_TIMING === "1"; /** * Bundled npm packages whose subpath exports should be auto-resolved for extensions. @@ -989,7 +989,7 @@ function discoverExtensionsInDir(dir: string): string[] { * Discover and load extensions from standard locations. * * @deprecated Use DefaultResourceLoader.reload() instead — this function is - * not called in the GSD loading flow. Extension discovery happens through + * not called in the SF loading flow. Extension discovery happens through * DefaultPackageManager.resolve() → addAutoDiscoveredResources(). Kept for * backwards compatibility with direct pi-coding-agent consumers. */ diff --git a/packages/pi-coding-agent/src/core/fallback-resolver.test.ts b/packages/pi-coding-agent/src/core/fallback-resolver.test.ts index fafadc0a4..10443803e 100644 --- a/packages/pi-coding-agent/src/core/fallback-resolver.test.ts +++ b/packages/pi-coding-agent/src/core/fallback-resolver.test.ts @@ -1,4 +1,4 @@ -// GSD Provider Fallback Resolver Tests +// SF Provider Fallback Resolver Tests // Copyright (c) 2026 Jeremy McSpadden import { describe, it, beforeEach, mock } from "node:test"; diff --git a/packages/pi-coding-agent/src/core/fallback-resolver.ts b/packages/pi-coding-agent/src/core/fallback-resolver.ts index 9a8fcbea2..1798ef63c 100644 --- a/packages/pi-coding-agent/src/core/fallback-resolver.ts +++ b/packages/pi-coding-agent/src/core/fallback-resolver.ts @@ -1,4 +1,4 @@ -// GSD Provider Fallback Resolver +// SF Provider Fallback Resolver // Copyright (c) 2026 Jeremy McSpadden /** diff --git a/packages/pi-coding-agent/src/core/lsp/index.ts b/packages/pi-coding-agent/src/core/lsp/index.ts index a0c010ddd..fd843193f 100644 --- a/packages/pi-coding-agent/src/core/lsp/index.ts +++ b/packages/pi-coding-agent/src/core/lsp/index.ts @@ -453,7 +453,7 @@ export function createLspTool(cwd: string): AgentTool 0) { diagnostics.push("\nDetected projects missing language servers:"); diagnostics.push(...matchedButMissing); - diagnostics.push("\nInstall the missing server command and restart GSD, or run: lsp reload"); + diagnostics.push("\nInstall the missing server command and restart SF, or run: lsp reload"); } else { diagnostics.push("No recognized project markers found in the working directory."); diagnostics.push("LSP auto-detects projects via files like package.json, Cargo.toml, go.mod, pyproject.toml, etc."); diff --git a/packages/pi-coding-agent/src/core/lsp/lspmux.ts b/packages/pi-coding-agent/src/core/lsp/lspmux.ts index 6e01d7807..a6c28a301 100644 --- a/packages/pi-coding-agent/src/core/lsp/lspmux.ts +++ b/packages/pi-coding-agent/src/core/lsp/lspmux.ts @@ -119,7 +119,7 @@ export async function detectLspmux(): Promise { return cachedState; } - if (process.env.PI_DISABLE_LSPMUX === "1" || process.env.GSD_DISABLE_LSPMUX === "1") { + if (process.env.PI_DISABLE_LSPMUX === "1" || process.env.SF_DISABLE_LSPMUX === "1") { cachedState = { available: false, running: false, binaryPath: null, config: null }; cacheTimestamp = now; return cachedState; diff --git a/packages/pi-coding-agent/src/core/resolve-config-value.ts b/packages/pi-coding-agent/src/core/resolve-config-value.ts index 9b72ca65f..7adb51f77 100644 --- a/packages/pi-coding-agent/src/core/resolve-config-value.ts +++ b/packages/pi-coding-agent/src/core/resolve-config-value.ts @@ -33,7 +33,7 @@ let activeCommandPrefixes: string[] = SAFE_COMMAND_PREFIXES; /** * Replace the active command prefix allowlist. * Called during initialization when the user has configured `allowedCommandPrefixes` - * in global settings.json or via the GSD_ALLOWED_COMMAND_PREFIXES env var. + * in global settings.json or via the SF_ALLOWED_COMMAND_PREFIXES env var. */ export function setAllowedCommandPrefixes(prefixes: string[]): void { if (prefixes.length === 0) { diff --git a/packages/pi-coding-agent/src/core/resource-loader-cache-reset.test.ts b/packages/pi-coding-agent/src/core/resource-loader-cache-reset.test.ts index f59c557a7..dfb3cecdd 100644 --- a/packages/pi-coding-agent/src/core/resource-loader-cache-reset.test.ts +++ b/packages/pi-coding-agent/src/core/resource-loader-cache-reset.test.ts @@ -1,4 +1,4 @@ -// GSD-2 — Regression test for #3616: reload() must reset jiti extension loader cache +// SF — Regression test for #3616: reload() must reset jiti extension loader cache // Copyright (c) 2026 Jeremy McSpadden import test, { describe } from "node:test"; diff --git a/packages/pi-coding-agent/src/core/tools/spawn-shell-windows.test.ts b/packages/pi-coding-agent/src/core/tools/spawn-shell-windows.test.ts index 213bd6bc5..e44b170b5 100644 --- a/packages/pi-coding-agent/src/core/tools/spawn-shell-windows.test.ts +++ b/packages/pi-coding-agent/src/core/tools/spawn-shell-windows.test.ts @@ -30,7 +30,7 @@ const coreDir = join(__dirname, ".."); * it does not need the guard and should NOT appear here. */ const SPAWN_FILES_NEEDING_SHELL_GUARD = [ - // Extension's GSD client — spawns the `gsd` binary which is a .cmd on Windows + // Extension's SF client — spawns the `gsd` binary which is a .cmd on Windows join(coreDir, "..", "..", "..", "vscode-extension", "src", "gsd-client.ts"), // exec.ts — used by extensions to run arbitrary commands join(coreDir, "exec.ts"), diff --git a/packages/pi-coding-agent/src/core/tools/tool-compatibility-registry.ts b/packages/pi-coding-agent/src/core/tools/tool-compatibility-registry.ts index 9e5bea3b5..86df2b65e 100644 --- a/packages/pi-coding-agent/src/core/tools/tool-compatibility-registry.ts +++ b/packages/pi-coding-agent/src/core/tools/tool-compatibility-registry.ts @@ -1,4 +1,4 @@ -// GSD-2 — Tool Compatibility Registry (ADR-005 Phase 2) +// SF — Tool Compatibility Registry (ADR-005 Phase 2) // Maps tool names to their provider compatibility metadata. // Used by the model router to filter tools incompatible with the selected provider. diff --git a/packages/pi-coding-agent/src/modes/interactive/components/__tests__/provider-display-name.test.ts b/packages/pi-coding-agent/src/modes/interactive/components/__tests__/provider-display-name.test.ts index 6b918294d..7d33b369a 100644 --- a/packages/pi-coding-agent/src/modes/interactive/components/__tests__/provider-display-name.test.ts +++ b/packages/pi-coding-agent/src/modes/interactive/components/__tests__/provider-display-name.test.ts @@ -1,4 +1,4 @@ -// GSD-2 — Provider display name mapping tests +// SF — Provider display name mapping tests import { test, describe } from "node:test"; import assert from "node:assert/strict"; import { providerDisplayName } from "../model-selector.js"; diff --git a/packages/pi-coding-agent/src/modes/interactive/components/footer.ts b/packages/pi-coding-agent/src/modes/interactive/components/footer.ts index fb43466f8..77d334219 100644 --- a/packages/pi-coding-agent/src/modes/interactive/components/footer.ts +++ b/packages/pi-coding-agent/src/modes/interactive/components/footer.ts @@ -140,7 +140,7 @@ export class FooterComponent implements Component { } // Per-prompt cost annotation (opt-in via show_token_cost preference, #1515) - if (process.env.GSD_SHOW_TOKEN_COST === "1") { + if (process.env.SF_SHOW_TOKEN_COST === "1") { const lastTurnCost = this.session.getLastTurnCost(); if (lastTurnCost > 0) { costGroup.push(`(last: ${formatPromptCost(lastTurnCost)})`); diff --git a/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts b/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts index b8d3c4e40..58287febc 100644 --- a/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts +++ b/packages/pi-coding-agent/src/modes/interactive/components/login-dialog.ts @@ -1,4 +1,4 @@ -// GSD Login Dialog Component — OAuth login flow UI +// SF Login Dialog Component — OAuth login flow UI // Copyright (c) 2026 Jeremy McSpadden import { getOAuthProviders } from "@sf-run/pi-ai/oauth"; import { Container, type Focusable, getEditorKeybindings, Input, Spacer, Text, truncateToWidth, type TUI } from "@sf-run/pi-tui"; diff --git a/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts b/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts index d3293f929..95a3c6bf1 100644 --- a/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts +++ b/packages/pi-coding-agent/src/modes/interactive/components/tool-execution.ts @@ -1047,7 +1047,7 @@ export class ToolExecutionComponent extends Container { // Generic tool / MCP tool without a registered renderer. // MCP tool names from Claude Code arrive as `mcp____`; // render the server prefix in muted style so the tool name reads - // cleanly. GSD-registered MCP tools have already had their prefix + // cleanly. SF-registered MCP tools have already had their prefix // stripped upstream in partial-builder.ts and won't reach this branch. const parsed = parseMcpToolName(this.toolName); const displayName = parsed ? parsed.tool : this.toolName; diff --git a/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts b/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts index b5ba886e9..c9cbed9f5 100644 --- a/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts +++ b/packages/pi-coding-agent/src/modes/interactive/interactive-mode.ts @@ -2601,7 +2601,7 @@ export class InteractiveMode { let msg = "No editor configured. Set $VISUAL or $EDITOR environment variable."; if (process.env.TERM_PROGRAM === "iTerm.app") { msg += - "\n\nTip: If you meant to open the GSD dashboard (Ctrl+Alt+G), set Left Option Key to" + + "\n\nTip: If you meant to open the SF dashboard (Ctrl+Alt+G), set Left Option Key to" + " \"Esc+\" in iTerm2 → Profiles → Keys. With the default \"Normal\" setting," + " Ctrl+Alt+G sends Ctrl+G instead."; } diff --git a/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts b/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts index 41127bab8..1df4c2380 100644 --- a/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts +++ b/packages/pi-coding-agent/src/modes/interactive/theme/theme.ts @@ -15,7 +15,7 @@ import { builtinThemes } from "./themes.js"; // Issue #453: native preview highlighting can wedge the entire interactive // session after a successful file tool. Keep the safer plain-text path as the // default and allow native highlighting only as an explicit opt-in. -const NATIVE_TUI_HIGHLIGHT_ENABLED = process.env.GSD_ENABLE_NATIVE_TUI_HIGHLIGHT === "1"; +const NATIVE_TUI_HIGHLIGHT_ENABLED = process.env.SF_ENABLE_NATIVE_TUI_HIGHLIGHT === "1"; // ============================================================================ // Types & Schema diff --git a/packages/pi-coding-agent/src/modes/rpc/rpc-mode.ts b/packages/pi-coding-agent/src/modes/rpc/rpc-mode.ts index 7d36e563a..0c307b05b 100644 --- a/packages/pi-coding-agent/src/modes/rpc/rpc-mode.ts +++ b/packages/pi-coding-agent/src/modes/rpc/rpc-mode.ts @@ -88,7 +88,7 @@ export async function runRpcMode(session: AgentSession): Promise { // v2 event filtering: null = no filter (all events); Set = only listed event types let eventFilter: Set | null = null; - const embeddedTerminalEnabled = process.env.GSD_WEB_BRIDGE_TUI === "1"; + const embeddedTerminalEnabled = process.env.SF_WEB_BRIDGE_TUI === "1"; const remoteTerminal = embeddedTerminalEnabled ? new RemoteTerminal({ onWrite: (data) => { diff --git a/packages/rpc-client/README.md b/packages/rpc-client/README.md index 6dcad70e6..520c14692 100644 --- a/packages/rpc-client/README.md +++ b/packages/rpc-client/README.md @@ -1,6 +1,6 @@ # @gsd-build/rpc-client -Standalone RPC client SDK for GSD. Spawn the agent process, perform a v2 protocol handshake, send commands, and consume typed events via an async generator — all in a few lines of TypeScript. +Standalone RPC client SDK for SF. Spawn the agent process, perform a v2 protocol handshake, send commands, and consume typed events via an async generator — all in a few lines of TypeScript. Zero internal dependencies. Ships its own inlined types. diff --git a/packages/rpc-client/src/index.ts b/packages/rpc-client/src/index.ts index ff5cefdd4..3921dba43 100644 --- a/packages/rpc-client/src/index.ts +++ b/packages/rpc-client/src/index.ts @@ -1,5 +1,5 @@ /** - * @singularity-forge/rpc-client — standalone RPC client SDK for GSD. + * @singularity-forge/rpc-client — standalone RPC client SDK for SF. * * Re-exports all types, JSONL utilities, and the RpcClient class. */ diff --git a/scripts/dist-test-resolve.mjs b/scripts/dist-test-resolve.mjs index 8b1074348..f7e1db86e 100644 --- a/scripts/dist-test-resolve.mjs +++ b/scripts/dist-test-resolve.mjs @@ -16,7 +16,7 @@ import { join } from 'node:path'; const DIST_TEST = new URL('../dist-test/', import.meta.url).href; // Absolute paths to compiled @sf-run/* entry points -const GSD_ALIASES = { +const SF_ALIASES = { '@sf-run/pi-coding-agent': new URL('../dist-test/packages/pi-coding-agent/src/index.js', import.meta.url).href, '@sf-run/pi-ai/oauth': new URL('../dist-test/packages/pi-ai/src/utils/oauth/index.js', import.meta.url).href, '@sf-run/pi-ai': new URL('../dist-test/packages/pi-ai/src/index.js', import.meta.url).href, @@ -27,8 +27,8 @@ const GSD_ALIASES = { export function resolve(specifier, context, nextResolve) { // 1. @sf-run/* bare imports → compiled dist-test counterpart - if (specifier in GSD_ALIASES) { - return nextResolve(GSD_ALIASES[specifier], context); + if (specifier in SF_ALIASES) { + return nextResolve(SF_ALIASES[specifier], context); } // 2. .ts relative imports inside dist-test → .js diff --git a/scripts/install-pi-global.js b/scripts/install-pi-global.js index 6f4f36a3e..9aa8670a6 100644 --- a/scripts/install-pi-global.js +++ b/scripts/install-pi-global.js @@ -31,14 +31,14 @@ if (existsSync(agentsMdSrc)) { copied.push('AGENTS.md') } -const workflowSrc = join(resourcesDir, 'GSD-WORKFLOW.md') +const workflowSrc = join(resourcesDir, 'SF-WORKFLOW.md') if (existsSync(workflowSrc)) { - writeFileSync(join(piRoot, 'GSD-WORKFLOW.md'), readFileSync(workflowSrc)) - copied.push('GSD-WORKFLOW.md') + writeFileSync(join(piRoot, 'SF-WORKFLOW.md'), readFileSync(workflowSrc)) + copied.push('SF-WORKFLOW.md') } process.stdout.write( - `Installed GSD resources for pi in ${piRoot}\n` + + `Installed SF resources for pi in ${piRoot}\n` + `Copied: ${copied.join(', ')}\n` + `Extensions are now available under ${join(piAgentDir, 'extensions')}\n` ) diff --git a/scripts/parallel-monitor.mjs b/scripts/parallel-monitor.mjs index e3acd6545..7184c84ca 100755 --- a/scripts/parallel-monitor.mjs +++ b/scripts/parallel-monitor.mjs @@ -1,8 +1,8 @@ #!/usr/bin/env node /** - * GSD Parallel Worker Monitor + * SF Parallel Worker Monitor * - * Real-time TUI dashboard for monitoring parallel GSD auto-mode workers. + * Real-time TUI dashboard for monitoring parallel SF auto-mode workers. * Zero dependencies — uses raw ANSI escape codes, Node.js builtins only. * * Usage: @@ -274,7 +274,7 @@ function extractCostFromNdjson(mid) { // ─── Self-Healing ──────────────────────────────────────────────────────────── -// Auto-detect the GSD loader path — works across npm global, homebrew, and local installs +// Auto-detect the SF loader path — works across npm global, homebrew, and local installs function findGsdLoader() { // 1. Check if we're running from inside the gsd-2 repo itself const repoLoader = path.resolve(import.meta.dirname, '..', 'dist', 'loader.js'); @@ -284,7 +284,7 @@ function findGsdLoader() { try { const globalRoot = execSync('npm root -g', { encoding: 'utf-8', timeout: 3000 }).trim(); const candidates = [ - path.join(globalRoot, 'gsd-pi', 'dist', 'loader.js'), + path.join(globalRoot, 'sf-run', 'dist', 'loader.js'), path.join(globalRoot, '@gsd', 'pi', 'dist', 'loader.js'), ]; for (const c of candidates) { @@ -308,7 +308,7 @@ function findGsdLoader() { return null; } -const GSD_LOADER = findGsdLoader(); +const SF_LOADER = findGsdLoader(); /** * Respawn a dead worker. Returns the new PID or null on failure. @@ -317,7 +317,7 @@ const GSD_LOADER = findGsdLoader(); function respawnWorker(mid) { const worktreeDir = path.resolve(PROJECT_ROOT, `.gsd/worktrees/${mid}`); if (!fs.existsSync(worktreeDir)) return null; - if (!fs.existsSync(GSD_LOADER)) return null; + if (!fs.existsSync(SF_LOADER)) return null; const stdoutLog = path.resolve(PROJECT_ROOT, PARALLEL_DIR, `${mid}.stdout.log`); const stderrLog = path.resolve(PROJECT_ROOT, PARALLEL_DIR, `${mid}.stderr.log`); @@ -329,14 +329,14 @@ function respawnWorker(mid) { stdoutFd = fs.openSync(stdoutLog, 'a'); stderrFd = fs.openSync(stderrLog, 'a'); - const child = spawn(process.execPath, [GSD_LOADER, 'headless', '--json', 'auto'], { + const child = spawn(process.execPath, [SF_LOADER, 'headless', '--json', 'auto'], { cwd: worktreeDir, detached: true, env: { ...process.env, - GSD_MILESTONE_LOCK: mid, - GSD_PROJECT_ROOT: PROJECT_ROOT, - GSD_PARALLEL_WORKER: '1', + SF_MILESTONE_LOCK: mid, + SF_PROJECT_ROOT: PROJECT_ROOT, + SF_PARALLEL_WORKER: '1', }, stdio: ['ignore', stdoutFd, stderrFd], windowsHide: true, @@ -630,7 +630,7 @@ function render(workers) { // ── Header ── buf.push(''); - const title = ' GSD Parallel Monitor '; + const title = ' SF Parallel Monitor '; const titlePad = Math.max(0, Math.floor((w - title.length) / 2)); buf.push( `${' '.repeat(titlePad)}${BOLD}${BG.blue}${FG.white}${title}${RESET}` diff --git a/scripts/postinstall.js b/scripts/postinstall.js index 95a0336e6..f483e89e5 100644 --- a/scripts/postinstall.js +++ b/scripts/postinstall.js @@ -16,15 +16,15 @@ const PLAYWRIGHT_SKIP = process.env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD === '1' || process.env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD === 'true' const RTK_SKIP = - process.env.GSD_SKIP_RTK_INSTALL === '1' || - process.env.GSD_SKIP_RTK_INSTALL === 'true' || - process.env.GSD_RTK_DISABLED === '1' || - process.env.GSD_RTK_DISABLED === 'true' + process.env.SF_SKIP_RTK_INSTALL === '1' || + process.env.SF_SKIP_RTK_INSTALL === 'true' || + process.env.SF_RTK_DISABLED === '1' || + process.env.SF_RTK_DISABLED === 'true' const RTK_VERSION = '0.33.1' const RTK_REPO = 'rtk-ai/rtk' const RTK_ENV = { ...process.env, RTK_TELEMETRY_DISABLED: '1' } -const managedBinDir = join(process.env.GSD_HOME || join(homedir(), '.gsd'), 'agent', 'bin') +const managedBinDir = join(process.env.SF_HOME || process.env.SF_HOME || join(homedir(), '.gsd'), 'agent', 'bin') const managedBinaryPath = join(managedBinDir, platform() === 'win32' ? 'rtk.exe' : 'rtk') function run(cmd) { @@ -69,7 +69,7 @@ function sha256File(path) { } async function downloadToFile(url, destination) { - const response = await fetch(url, { headers: { 'User-Agent': 'gsd-pi-postinstall' } }) + const response = await fetch(url, { headers: { 'User-Agent': 'sf-run-postinstall' } }) if (!response.ok) { throw new Error(`download failed (${response.status}) for ${url}`) } @@ -121,7 +121,7 @@ async function ensureRtkInstalled() { try { const checksumsResponse = await fetch(`${releaseBase}/checksums.txt`, { - headers: { 'User-Agent': 'gsd-pi-postinstall' }, + headers: { 'User-Agent': 'sf-run-postinstall' }, }) if (!checksumsResponse.ok) { throw new Error(`failed to fetch RTK checksums (${checksumsResponse.status})`) diff --git a/scripts/pr-risk-check.mjs b/scripts/pr-risk-check.mjs index 94b61f13b..6e6eb1752 100644 --- a/scripts/pr-risk-check.mjs +++ b/scripts/pr-risk-check.mjs @@ -32,7 +32,7 @@ const RISK_TIERS = { 'Auto Engine', 'MCP Server/Client', 'Native/Rust Tools', ], high: [ - 'GSD Workflow', 'Tool System', 'AI Providers', 'Extension Registry', + 'SF Workflow', 'Tool System', 'AI Providers', 'Extension Registry', 'Session Management', 'Extensions', 'Modes', 'Event System', 'Node.js Bindings', 'Compaction', ], @@ -89,7 +89,7 @@ function parseMap(mapPath) { const rawPath = cols[0]; const rawSystems = cols[1] || ''; - // Skip bold section headers like **GSD Extension (Core Workflow Engine)** + // Skip bold section headers like **SF Extension (Core Workflow Engine)** if (rawPath.startsWith('**') || rawPath === '') continue; // Clean up path — remove parenthetical notes like "(50+ files)" diff --git a/scripts/preview-dashboard.ts b/scripts/preview-dashboard.ts index d7ea76441..15220a45e 100644 --- a/scripts/preview-dashboard.ts +++ b/scripts/preview-dashboard.ts @@ -120,13 +120,13 @@ function render(w: number, healthState: { icon: string; color: string; summary: // Top bar lines.push(...ui.bar()); - // Header: GSD AUTO + health ... elapsed + ETA + // Header: SF AUTO + health ... elapsed + ETA const dot = theme.fg("accent", GLYPH.statusActive); const healthIcon = healthState.color === "success" ? "o" : healthState.color === "warning" ? "!" : "x"; const healthStr = ` ${theme.fg(healthState.color, healthIcon)} ${theme.fg(healthState.color, healthState.summary)}`; - const headerLeft = `${pad}${dot} ${theme.fg("accent", theme.bold("GSD"))} ${theme.fg("success", modeTag)}${healthStr}`; + const headerLeft = `${pad}${dot} ${theme.fg("accent", theme.bold("SF"))} ${theme.fg("success", modeTag)}${healthStr}`; const headerRight = `${theme.fg("dim", elapsed)} ${theme.fg("dim", "·")} ${theme.fg("dim", etaShort)}`; lines.push(rightAlign(headerLeft, headerRight, w)); diff --git a/scripts/recover-gsd-1364.ps1 b/scripts/recover-gsd-1364.ps1 index f83b48372..e85ed03cf 100644 --- a/scripts/recover-gsd-1364.ps1 +++ b/scripts/recover-gsd-1364.ps1 @@ -1,6 +1,6 @@ # recover-gsd-1364.ps1 - Recovery script for issue #1364 (Windows) # -# CRITICAL DATA-LOSS BUG: GSD versions 2.30.0-2.35.x unconditionally added +# CRITICAL DATA-LOSS BUG: SF versions 2.30.0-2.35.x unconditionally added # ".gsd" to .gitignore via ensureGitignore(), causing git to report all # tracked .gsd/ files as deleted. Fixed in v2.36.0 (PR #1367). # @@ -337,7 +337,7 @@ if ($GsdIsSymlink) { if ($DryRun) { Write-Host " (dry-run) Would append: .gsd" -ForegroundColor Yellow } else { - $appendLines = @('', '# GSD external state (symlink/junction — added by recover-gsd-1364)', '.gsd') + $appendLines = @('', '# SF external state (symlink/junction — added by recover-gsd-1364)', '.gsd') Add-Content -LiteralPath $gitignorePath -Value $appendLines -Encoding UTF8 Write-Ok '".gsd" added to .gitignore.' } diff --git a/scripts/recover-gsd-1364.sh b/scripts/recover-gsd-1364.sh index 0dfe3c3ec..65e8f30a5 100755 --- a/scripts/recover-gsd-1364.sh +++ b/scripts/recover-gsd-1364.sh @@ -4,7 +4,7 @@ # For Windows use the PowerShell equivalent: # powershell -ExecutionPolicy Bypass -File scripts\recover-gsd-1364.ps1 [-DryRun] # -# CRITICAL DATA-LOSS BUG: GSD versions 2.30.0–2.35.x unconditionally added +# CRITICAL DATA-LOSS BUG: SF versions 2.30.0–2.35.x unconditionally added # ".gsd" to .gitignore via ensureGitignore(), causing git to report all # tracked .gsd/ files as deleted. Fixed in v2.36.0 (PR #1367). # Three residual vectors remain on v2.36.0–v2.38.0 — see PR #1635 for details. @@ -88,18 +88,18 @@ fi section "── Step 1: Detect .gsd/ directory ────────────────────────────────────" -GSD_DIR="$REPO_ROOT/.gsd" -GSD_IS_SYMLINK=false +SF_DIR="$REPO_ROOT/.gsd" +SF_IS_SYMLINK=false -if [[ ! -e "$GSD_DIR" ]]; then +if [[ ! -e "$SF_DIR" ]]; then ok ".gsd/ does not exist in this repo — not affected." exit 0 fi -if [[ -L "$GSD_DIR" ]]; then +if [[ -L "$SF_DIR" ]]; then # Scenario C: migration succeeded (symlink in place) but git index was never # cleaned — tracked .gsd/* files still appear as deleted through the symlink. - GSD_IS_SYMLINK=true + SF_IS_SYMLINK=true warn ".gsd/ is a symlink — checking for stale git index entries (Scenario C)..." else info ".gsd/ is a real directory (Scenario A/B)." @@ -111,35 +111,35 @@ section "── Step 2: Check .gitignore for .gsd entry ──────── GITIGNORE="$REPO_ROOT/.gitignore" -if [[ ! -f "$GITIGNORE" ]] && ! $GSD_IS_SYMLINK; then +if [[ ! -f "$GITIGNORE" ]] && ! $SF_IS_SYMLINK; then ok ".gitignore does not exist — not affected." exit 0 fi # Look for a bare ".gsd" line (not a comment, not a sub-path like .gsd/) -GSD_IGNORE_LINE="" +SF_IGNORE_LINE="" if [[ -f "$GITIGNORE" ]]; then while IFS= read -r line; do trimmed="${line#"${line%%[![:space:]]*}"}" trimmed="${trimmed%"${trimmed##*[![:space:]]}"}" if [[ "$trimmed" == ".gsd" ]] && [[ "${trimmed:0:1}" != "#" ]]; then - GSD_IGNORE_LINE="$trimmed" + SF_IGNORE_LINE="$trimmed" break fi done < "$GITIGNORE" fi -if $GSD_IS_SYMLINK; then +if $SF_IS_SYMLINK; then # Symlink layout: .gsd SHOULD be ignored (it's external state). # Missing = needs adding. Present = correct. - if [[ -z "$GSD_IGNORE_LINE" ]]; then + if [[ -z "$SF_IGNORE_LINE" ]]; then warn '".gsd" missing from .gitignore — will add (migration complete, .gsd/ is external).' else ok '".gsd" already in .gitignore — correct for external-state layout.' fi else # Real-directory layout: .gsd should NOT be ignored. - if [[ -z "$GSD_IGNORE_LINE" ]]; then + if [[ -z "$SF_IGNORE_LINE" ]]; then ok '".gsd" not found in .gitignore — .gitignore not affected.' else warn '".gsd" found in .gitignore — this is the bad pattern from #1364.' @@ -156,12 +156,12 @@ DELETED_FILES="$(git ls-files --deleted -- '.gsd/*' 2>/dev/null || true)" # Files tracked in HEAD right now TRACKED_IN_HEAD="$(git ls-tree -r --name-only HEAD -- '.gsd/' 2>/dev/null || true)" -if $GSD_IS_SYMLINK; then +if $SF_IS_SYMLINK; then # Scenario C: migration succeeded. Files are safe via symlink. # Only index entries can be stale — no need to scan commit history. if [[ -z "$TRACKED_IN_HEAD" ]] && [[ -z "$DELETED_FILES" ]]; then ok "No stale index entries found — symlink layout is healthy." - if [[ -z "$GSD_IGNORE_LINE" ]]; then + if [[ -z "$SF_IGNORE_LINE" ]]; then info "Add .gsd to .gitignore manually to complete the migration." fi exit 0 @@ -176,7 +176,7 @@ else if [[ -z "$TRACKED_IN_HEAD" ]] && [[ -z "$DELETED_FILES" ]] && [[ -z "$DELETED_FROM_HISTORY" ]]; then ok "No .gsd/ files tracked in this repo — not affected by #1364." - if [[ -n "$GSD_IGNORE_LINE" ]]; then + if [[ -n "$SF_IGNORE_LINE" ]]; then warn '".gsd" is still in .gitignore but there is nothing to restore.' fi exit 0 @@ -200,7 +200,7 @@ else fi if [[ -n "$TRACKED_IN_HEAD" ]] && [[ -z "$DELETED_FILES" ]]; then - if [[ -z "$GSD_IGNORE_LINE" ]]; then + if [[ -z "$SF_IGNORE_LINE" ]]; then ok "No action needed — .gsd/ is tracked in HEAD and .gitignore is clean." exit 0 fi @@ -216,7 +216,7 @@ DAMAGE_COMMIT="" CLEAN_COMMIT="" RESTORABLE="" -if $GSD_IS_SYMLINK; then +if $SF_IS_SYMLINK; then info "Scenario C: symlink layout — skipping commit history scan (no file restore needed)." else # Find the commit where ".gsd" was first added to .gitignore @@ -260,7 +260,7 @@ fi # ─── Step 5: Clean index (Scenario C) or restore deleted files (Scenario A/B) ─ -if $GSD_IS_SYMLINK; then +if $SF_IS_SYMLINK; then section "── Step 5: Clean stale git index entries ───────────────────────────────" info "Running: git rm -r --cached --ignore-unmatch .gsd/ ..." @@ -302,14 +302,14 @@ fi section "── Step 6: Fix .gitignore ───────────────────────────────────────────────" -if $GSD_IS_SYMLINK; then +if $SF_IS_SYMLINK; then # Scenario C: .gsd IS external — it should be in .gitignore. Add if missing. - if [[ -z "$GSD_IGNORE_LINE" ]]; then + if [[ -z "$SF_IGNORE_LINE" ]]; then info 'Adding ".gsd" to .gitignore (migration complete — .gsd/ is external state)...' if $DRY_RUN; then echo -e " ${YELLOW}(dry-run)${RESET} Would append: .gsd" else - printf '\n# GSD external state (symlink — added by recover-gsd-1364)\n.gsd\n' >> "$GITIGNORE" + printf '\n# SF external state (symlink — added by recover-gsd-1364)\n.gsd\n' >> "$GITIGNORE" ok '".gsd" added to .gitignore.' fi else @@ -317,7 +317,7 @@ if $GSD_IS_SYMLINK; then fi else # Scenario A/B: .gsd is a real tracked directory — remove the bad ignore line. - if [[ -z "$GSD_IGNORE_LINE" ]]; then + if [[ -z "$SF_IGNORE_LINE" ]]; then ok '".gsd" not in .gitignore — nothing to fix.' else info 'Removing bare ".gsd" line from .gitignore...' @@ -343,7 +343,7 @@ if ! $DRY_RUN; then if [[ -z "$CHANGED" ]]; then ok "No staged changes — working tree was already clean." else - if $GSD_IS_SYMLINK; then + if $SF_IS_SYMLINK; then # Scenario C: the git rm --cached already staged the index cleanup. # Only stage .gitignore — adding .gsd/ would fail (now gitignored). git add .gitignore 2>/dev/null || true @@ -366,7 +366,7 @@ else if (( FINAL_STAGED > 0 )); then echo -e "${GREEN}Recovery complete. Commit with:${RESET}" echo "" - if $GSD_IS_SYMLINK; then + if $SF_IS_SYMLINK; then echo " git commit -m \"fix: clean stale .gsd/ index entries after external-state migration\"" else echo " git commit -m \"fix: restore .gsd/ files deleted by #1364 regression\"" diff --git a/scripts/recover-gsd-1668.ps1 b/scripts/recover-gsd-1668.ps1 index 9af51ec64..4baac1a0f 100644 --- a/scripts/recover-gsd-1668.ps1 +++ b/scripts/recover-gsd-1668.ps1 @@ -1,6 +1,6 @@ # recover-gsd-1668.ps1 — Recovery script for issue #1668 (Windows) # -# GSD v2.39.x deleted the milestone branch and worktree directory when a +# SF v2.39.x deleted the milestone branch and worktree directory when a # merge failed due to the repo using `master` as its default branch (not # `main`). The commits were never merged — they are orphaned in the git # object store and can be recovered via git reflog or git fsck. @@ -8,7 +8,7 @@ # This script: # 1. Searches git reflog for the deleted milestone branch (fastest path) # 2. Falls back to git fsck --unreachable to find orphaned commits -# 3. Ranks candidates by recency and GSD commit message patterns +# 3. Ranks candidates by recency and SF commit message patterns # 4. Creates a recovery branch at the identified commit # 5. Reports what was found and how to complete the merge manually # @@ -16,14 +16,14 @@ # powershell -ExecutionPolicy Bypass -File scripts\recover-gsd-1668.ps1 [-MilestoneId ] [-DryRun] [-Auto] # # Options: -# -MilestoneId GSD milestone ID (e.g. M001-g2nalq). +# -MilestoneId SF milestone ID (e.g. M001-g2nalq). # -DryRun Show what would be done without making any changes. # -Auto Pick best candidate automatically (no prompts). # # Requirements: git >= 2.23, PowerShell >= 5.1, Git for Windows # -# Affected versions: GSD 2.39.x -# Fixed in: GSD 2.40.1 (PR #1669) +# Affected versions: SF.39.x +# Fixed in: SF.40.1 (PR #1669) [CmdletBinding()] param( @@ -188,7 +188,7 @@ if (-not $reflogFoundSha) { $score = 0 if ($MilestoneId -and ($commitMsg + $commitBody) -match [regex]::Escape($MilestoneId)) { $score += 100 } if ($commitMsg -match '^feat\([A-Z][0-9]+') { $score += 50 } - if (($commitMsg + $commitBody) -match 'milestone/|complete-milestone|GSD|slice') { $score += 20 } + if (($commitMsg + $commitBody) -match 'milestone/|complete-milestone|SF|slice') { $score += 20 } $weekAgo = (Get-Date).AddDays(-7).ToUnixTimeSeconds() if ($commitDate -gt $weekAgo) { $score += 10 } @@ -212,7 +212,7 @@ if (-not $reflogFoundSha) { $sortedCandidates = $candidates | Sort-Object -Property Score -Descending | Select-Object -First 10 - Info "Top candidates (scored by recency and GSD message patterns):" + Info "Top candidates (scored by recency and SF message patterns):" Write-Host "" $num = 1 foreach ($c in $sortedCandidates) { @@ -334,6 +334,6 @@ Write-Host "" Write-Host " 4. Clean up after verifying:" Write-Host " git branch -D $recoveryBranch" Write-Host "" -Write-Host "Note: update GSD to v2.40.1+ to prevent this from recurring." -ForegroundColor DarkGray +Write-Host "Note: update SF to v2.40.1+ to prevent this from recurring." -ForegroundColor DarkGray Write-Host " PR: https://github.com/singularity-forge/sf-run/pull/1669" -ForegroundColor DarkGray Write-Host "" diff --git a/scripts/recover-gsd-1668.sh b/scripts/recover-gsd-1668.sh index aa133e3a6..fafc02fa6 100755 --- a/scripts/recover-gsd-1668.sh +++ b/scripts/recover-gsd-1668.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # recover-gsd-1668.sh — Recovery script for issue #1668 (Linux / macOS) # -# GSD v2.39.x deleted the milestone branch and worktree directory when a +# SF v2.39.x deleted the milestone branch and worktree directory when a # merge failed due to the repo using `master` as its default branch (not # `main`). The commits were never merged — they are orphaned in the git # object store and can be recovered via git reflog or git fsck. @@ -9,7 +9,7 @@ # This script: # 1. Searches git reflog for the deleted milestone branch (fastest path) # 2. Falls back to git fsck --unreachable to find orphaned commits -# 3. Ranks candidates by recency and GSD commit message patterns +# 3. Ranks candidates by recency and SF commit message patterns # 4. Creates a recovery branch at the identified commit # 5. Reports what was found and how to complete the merge manually # @@ -17,15 +17,15 @@ # bash scripts/recover-gsd-1668.sh [--milestone ] [--dry-run] [--auto] # # Options: -# --milestone GSD milestone ID (e.g. M001-g2nalq). +# --milestone SF milestone ID (e.g. M001-g2nalq). # When omitted the script scans all recent orphans. # --dry-run Show what would be done without making any changes. # --auto Pick the best candidate automatically (no prompts). # # Requirements: git >= 2.23, bash >= 4.x # -# Affected versions: GSD 2.39.x -# Fixed in: GSD 2.40.1 (PR #1669) +# Affected versions: SF.39.x +# Fixed in: SF.40.1 (PR #1669) set -euo pipefail @@ -222,8 +222,8 @@ if [[ -z "$REFLOG_FOUND_SHA" ]]; then exit 1 fi - # Score each unreachable commit — rank by recency and GSD message patterns. - # GSD milestone commits look like: "feat(M001-g2nalq): " + # Score each unreachable commit — rank by recency and SF message patterns. + # SF milestone commits look like: "feat(M001-g2nalq): <title>" # Slice merges look like: "feat(M001-g2nalq/S01): <slice>" # # Performance: use a single `git log --no-walk=unsorted --stdin` call to @@ -249,7 +249,7 @@ if [[ -z "$REFLOG_FOUND_SHA" ]]; then if echo "$commit_msg" | grep -qE '^feat\([A-Z][0-9]+'; then SCORE=$((SCORE + 50)) fi - if echo "$commit_msg" | grep -qiE 'milestone/|complete-milestone|GSD|slice'; then + if echo "$commit_msg" | grep -qiE 'milestone/|complete-milestone|SF|slice'; then SCORE=$((SCORE + 20)) fi if [[ "$commit_ts" -gt "$WEEK_AGO" ]]; then @@ -278,7 +278,7 @@ if [[ -z "$REFLOG_FOUND_SHA" ]]; then )) unset IFS - info "Top candidates (scored by recency and GSD message patterns):" + info "Top candidates (scored by recency and SF message patterns):" echo "" NUM=1 SORTED_IDXS=() @@ -441,6 +441,6 @@ echo "" echo -e " ${BOLD}4. Clean up after verifying:${RESET}" echo " git branch -D ${RECOVERY_BRANCH}" echo "" -echo -e "${DIM}Note: update GSD to v2.40.1+ to prevent this from recurring.${RESET}" +echo -e "${DIM}Note: update SF to v2.40.1+ to prevent this from recurring.${RESET}" echo " PR: https://github.com/singularity-forge/sf-run/pull/1669" echo "" diff --git a/scripts/require-tests.sh b/scripts/require-tests.sh index 900be6226..eaf188763 100755 --- a/scripts/require-tests.sh +++ b/scripts/require-tests.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# GSD-2 — Require tests with source changes +# SF — Require tests with source changes # Copyright (c) 2026 Jeremy McSpadden <jeremy@fluxlabs.net> # # Fails CI if a PR changes source files but includes no test file changes. diff --git a/scripts/rtk-benchmark.mjs b/scripts/rtk-benchmark.mjs index ef6480b85..6ab09446f 100644 --- a/scripts/rtk-benchmark.mjs +++ b/scripts/rtk-benchmark.mjs @@ -108,7 +108,7 @@ function renderMarkdown({ summary, history, binaryPath }) { function main() { const outputIndex = process.argv.indexOf('--output') const outputPath = outputIndex !== -1 ? process.argv[outputIndex + 1] : null - const binaryPath = process.env.GSD_RTK_PATH || getManagedRtkPath() + const binaryPath = process.env.SF_RTK_PATH || getManagedRtkPath() if (!binaryPath) { throw new Error('RTK binary path not resolved') diff --git a/scripts/sync-pkg-version.cjs b/scripts/sync-pkg-version.cjs index 3e05bacc6..2334dc207 100644 --- a/scripts/sync-pkg-version.cjs +++ b/scripts/sync-pkg-version.cjs @@ -2,7 +2,7 @@ /** * Sync pkg/package.json version with the installed @mariozechner/pi-coding-agent version. * - * gsd-pi sets PI_PACKAGE_DIR=pkg/ so that pi's config.js reads piConfig from + * sf-run sets PI_PACKAGE_DIR=pkg/ so that pi's config.js reads piConfig from * pkg/package.json (for branding: name="gsd", configDir=".gsd"). However, config.js * also reads `version` from that same file and uses it for the update check * (comparing against npm registry). If pkg/package.json has a stale version, diff --git a/scripts/test-replace.txt b/scripts/test-replace.txt new file mode 100644 index 000000000..fccfb6164 --- /dev/null +++ b/scripts/test-replace.txt @@ -0,0 +1,3 @@ +apricot +blueberry +cherry diff --git a/scripts/test-write.txt b/scripts/test-write.txt new file mode 100644 index 000000000..9daeafb98 --- /dev/null +++ b/scripts/test-write.txt @@ -0,0 +1 @@ +test diff --git a/scripts/uninstall-pi-global.js b/scripts/uninstall-pi-global.js index 616ec503e..a933bee63 100644 --- a/scripts/uninstall-pi-global.js +++ b/scripts/uninstall-pi-global.js @@ -57,10 +57,10 @@ removeResourceEntries('extensions') removeResourceEntries('skills') removeResourceEntries('agents') removeIfContentMatches(join(piAgentDir, 'AGENTS.md'), join(resourcesDir, 'AGENTS.md'), 'agent/AGENTS.md') -removeIfContentMatches(join(piRoot, 'GSD-WORKFLOW.md'), join(resourcesDir, 'GSD-WORKFLOW.md'), 'GSD-WORKFLOW.md') +removeIfContentMatches(join(piRoot, 'SF-WORKFLOW.md'), join(resourcesDir, 'SF-WORKFLOW.md'), 'SF-WORKFLOW.md') process.stdout.write( - `Removed GSD resources from ${piRoot}\n` + + `Removed SF resources from ${piRoot}\n` + `Removed: ${removed.length ? removed.join(', ') : '(nothing)'}\n` + (skipped.length ? `Skipped: ${skipped.join(', ')}\n` : '') ) diff --git a/scripts/validate-pack.js b/scripts/validate-pack.js index ba2567559..9edbb9827 100644 --- a/scripts/validate-pack.js +++ b/scripts/validate-pack.js @@ -148,7 +148,7 @@ try { // This catches the Windows-style failure where symlinkSync fails silently and // node_modules/@sf-run/ is never populated, causing ERR_MODULE_NOT_FOUND at runtime. console.log('==> Verifying @sf-run/* workspace package resolution...'); - const installedRoot = join(installDir, 'node_modules', 'gsd-pi'); + const installedRoot = join(installDir, 'node_modules', 'sf-run'); const criticalPackages = [ { scope: '@gsd', name: 'pi-coding-agent' }, { scope: '@gsd-build', name: 'rpc-client' }, diff --git a/scripts/verify-s03.sh b/scripts/verify-s03.sh index 14ae2dd50..81143facf 100755 --- a/scripts/verify-s03.sh +++ b/scripts/verify-s03.sh @@ -131,7 +131,7 @@ tmp6=$(mktemp) ( env -i HOME="$HOME" PATH="$PATH" \ ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY:-}" \ - GSD_TEST_AUTH_PATH="$tmp_auth" \ + SF_TEST_AUTH_PATH="$tmp_auth" \ node -e " import('./dist/app-paths.js').then(async (paths) => { // Override authFilePath for test diff --git a/scripts/verify-s04.sh b/scripts/verify-s04.sh index 090b40e24..cca3a2d23 100755 --- a/scripts/verify-s04.sh +++ b/scripts/verify-s04.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # S04 verification — npm pack tarball install smoke test -# Checks: dist integrity, GSD_BUNDLED_EXTENSION_PATHS, prepublishOnly, +# Checks: dist integrity, SF_BUNDLED_EXTENSION_PATHS, prepublishOnly, # npm pack dry-run, tarball install, binary exists, launch (no extension # errors, "gsd" branding), ~/.gsd/ untouched, non-TTY warning/no exit 1. @@ -38,20 +38,20 @@ else fi # ---------------------------------------------------------------- -# Check 2 — GSD_BUNDLED_EXTENSION_PATHS does NOT reference src/resources +# Check 2 — SF_BUNDLED_EXTENSION_PATHS does NOT reference src/resources # ---------------------------------------------------------------- # The variable must be present and must use agentDir-based paths only. -paths_line=$(grep "GSD_BUNDLED_EXTENSION_PATHS" dist/loader.js | grep -v "src/resources" | head -1) +paths_line=$(grep "SF_BUNDLED_EXTENSION_PATHS" dist/loader.js | grep -v "src/resources" | head -1) if [ -n "$paths_line" ]; then # Double-check: none of the actual join() lines (not comments) reference src/resources. # We look only at lines containing join( to avoid matching comment lines like "NOT src/resources". - if grep -A 15 "GSD_BUNDLED_EXTENSION_PATHS" dist/loader.js | grep "join(" | grep -q "src/resources"; then - fail "2 — GSD_BUNDLED_EXTENSION_PATHS still references src/resources path(s)" + if grep -A 15 "SF_BUNDLED_EXTENSION_PATHS" dist/loader.js | grep "join(" | grep -q "src/resources"; then + fail "2 — SF_BUNDLED_EXTENSION_PATHS still references src/resources path(s)" else - pass "2 — GSD_BUNDLED_EXTENSION_PATHS uses agentDir-based paths (no src/resources)" + pass "2 — SF_BUNDLED_EXTENSION_PATHS uses agentDir-based paths (no src/resources)" fi else - fail "2 — GSD_BUNDLED_EXTENSION_PATHS line not found or still references src/resources" + fail "2 — SF_BUNDLED_EXTENSION_PATHS line not found or still references src/resources" fi echo "" diff --git a/src/app-paths.ts b/src/app-paths.ts index 49760897c..1e7de596c 100644 --- a/src/app-paths.ts +++ b/src/app-paths.ts @@ -1,7 +1,7 @@ import { homedir } from 'os' import { join } from 'path' -export const appRoot = process.env.GSD_HOME || join(homedir(), '.gsd') +export const appRoot = process.env.SF_HOME || join(homedir(), '.sf') export const agentDir = join(appRoot, 'agent') export const sessionsDir = join(appRoot, 'sessions') export const authFilePath = join(agentDir, 'auth.json') diff --git a/src/cli.ts b/src/cli.ts index 837ff9969..c5b660bc7 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -31,7 +31,7 @@ import { import { stopWebMode } from './web-mode.js' import { getProjectSessionsDir } from './project-sessions.js' import { markStartup, printStartupTimings } from './startup-timings.js' -import { bootstrapRtk, GSD_RTK_DISABLED_ENV } from './rtk.js' +import { bootstrapRtk, SF_RTK_DISABLED_ENV, SF_RTK_DISABLED_ENV } from './rtk.js' import { loadEffectiveGSDPreferences } from './resources/extensions/sf/preferences.js' // --------------------------------------------------------------------------- @@ -44,7 +44,7 @@ if (parseInt(process.versions.node) >= 22) { } function exitIfManagedResourcesAreNewer(currentAgentDir: string): void { - const currentVersion = process.env.GSD_VERSION || '0.0.0' + const currentVersion = process.env.SF_VERSION || '0.0.0' const managedVersion = getNewerManagedResourceVersion(currentAgentDir, currentVersion) if (!managedVersion) { return @@ -53,7 +53,7 @@ function exitIfManagedResourcesAreNewer(currentAgentDir: string): void { process.stderr.write( `[sf] ${chalk.yellow('Version mismatch detected')}\n` + `[sf] Synced resources are from ${chalk.bold(`v${managedVersion}`)}, but this \`sf\` binary is ${chalk.dim(`v${currentVersion}`)}.\n` + - `[sf] Run ${chalk.bold('npm install -g gsd-pi@latest')} or ${chalk.bold('sf update')}, then try again.\n`, + `[sf] Run ${chalk.bold('npm install -g sf-run@latest')} or ${chalk.bold('sf update')}, then try again.\n`, ) process.exit(1) } @@ -133,7 +133,7 @@ const isPrintMode = cliFlags.print || cliFlags.mode !== undefined // subcommand, otherwise fall back to general help. if (process.argv.includes('--help') || process.argv.includes('-h')) { const helpSubcommand = cliFlags.messages[0] - const version = process.env.GSD_VERSION || '0.0.0' + const version = process.env.SF_VERSION || '0.0.0' if (!helpSubcommand || !printSubcommandHelp(helpSubcommand, version)) { printHelp(version) } @@ -145,13 +145,14 @@ if (process.argv.includes('--help') || process.argv.includes('-h')) { let rtkBootstrapPromise: Promise<void> | undefined async function doRtkBootstrap(): Promise<void> { // RTK is opt-in via experimental.rtk preference. Default: disabled. - // Honor GSD_RTK_DISABLED if already explicitly set in the environment + // Honor SF_RTK_DISABLED (or SF_RTK_DISABLED) if already explicitly set in the environment // (env var takes precedence over preferences for manual override). - if (!process.env[GSD_RTK_DISABLED_ENV]) { + if (!process.env[SF_RTK_DISABLED_ENV] && !process.env[SF_RTK_DISABLED_ENV]) { const prefs = loadEffectiveGSDPreferences() const rtkEnabled = prefs?.preferences.experimental?.rtk === true if (!rtkEnabled) { - process.env[GSD_RTK_DISABLED_ENV] = '1' + process.env[SF_RTK_DISABLED_ENV] = '1' + process.env[SF_RTK_DISABLED_ENV] = '1' } } @@ -177,15 +178,15 @@ if (cliFlags.messages[0] === 'update') { // --------------------------------------------------------------------------- if (cliFlags.messages[0] === 'graph') { const sub = cliFlags.messages[1] - const { buildGraph, writeGraph, graphStatus, graphQuery, graphDiff, resolveGsdRoot } = await import('@singularity-forge/mcp-server') + const { buildGraph, writeGraph, graphStatus, graphQuery, graphDiff, resolveSfRoot } = await import('@singularity-forge/mcp-server') const projectDir = process.cwd() - const gsdRoot = resolveGsdRoot(projectDir) + const sfRoot = resolveSfRoot(projectDir) if (!sub || sub === 'build') { try { const graph = await buildGraph(projectDir) - await writeGraph(gsdRoot, graph) + await writeGraph(sfRoot, graph) process.stdout.write(`Graph built: ${graph.nodes.length} nodes, ${graph.edges.length} edges\n`) } catch (err) { process.stderr.write(`[sf] graph build failed: ${err instanceof Error ? err.message : String(err)}\n`) @@ -544,7 +545,7 @@ if (isPrintMode) { exitIfManagedResourcesAreNewer(agentDir) initResources(agentDir) markStartup('initResources') - // Route print mode through buildResourceLoader so the GSD extension registry + // Route print mode through buildResourceLoader so the SF extension registry // filter (extensionPathsTransform) is applied consistently with TUI mode. // Constructing DefaultResourceLoader directly bypassed the filter and let // disabled bundled extensions (e.g. `ollama` superseded by `@0xkobold/pi-ollama`) @@ -619,7 +620,7 @@ if (isPrintMode) { await startMcpServer({ tools: session.agent.state.tools ?? [], - version: process.env.GSD_VERSION || '0.0.0', + version: process.env.SF_VERSION || '0.0.0', }) // MCP server runs until the transport closes; keep alive await new Promise(() => {}) @@ -798,7 +799,7 @@ if (!process.stdin.isTTY || !process.stdout.isTTY) { // Welcome screen — shown on every fresh interactive session before TUI takes over. // Skip when the first-run banner was already printed in loader.ts (prevents double banner). -if (!process.env.GSD_FIRST_RUN_BANNER) { +if (!process.env.SF_FIRST_RUN_BANNER && !process.env.SF_FIRST_RUN_BANNER) { const { printWelcomeScreen } = await import('./welcome-screen.js') let remoteChannel: string | undefined try { @@ -807,7 +808,7 @@ if (!process.env.GSD_FIRST_RUN_BANNER) { if (rc) remoteChannel = rc.channel } catch { /* non-fatal */ } printWelcomeScreen({ - version: process.env.GSD_VERSION || '0.0.0', + version: process.env.SF_VERSION || '0.0.0', modelName: settingsManager.getDefaultModel() || undefined, provider: settingsManager.getDefaultProvider() || undefined, remoteChannel, diff --git a/src/headless-query.ts b/src/headless-query.ts index f802e89c9..b8276b0e6 100644 --- a/src/headless-query.ts +++ b/src/headless-query.ts @@ -25,7 +25,7 @@ const jiti = createJiti(fileURLToPath(import.meta.url), { interopDefault: true, // Resolve extensions from the synced agent directory so headless-query // loads the same extension copy as interactive/auto modes (#3471). // Falls back to bundled source for source-tree dev workflows. -const agentExtensionsDir = join(process.env.GSD_AGENT_DIR || join(homedir(), '.gsd', 'agent'), 'extensions', 'gsd') +const agentExtensionsDir = join(process.env.SF_AGENT_DIR || join(homedir(), '.gsd', 'agent'), 'extensions', 'gsd') const { existsSync } = await import('node:fs') const useAgentDir = existsSync(join(agentExtensionsDir, 'state.ts')) const gsdExtensionPath = (...segments: string[]) => diff --git a/src/headless-ui.ts b/src/headless-ui.ts index 0e25cd4e8..ad6103ddd 100644 --- a/src/headless-ui.ts +++ b/src/headless-ui.ts @@ -145,7 +145,7 @@ export function summarizeToolArgs(toolName: unknown, toolInput: unknown): string case 'browser_navigate': return String(input.url ?? '') default: { - // GSD tools: show milestone/slice/task IDs when present + // SF tools: show milestone/slice/task IDs when present if (name.startsWith('gsd_')) { return summarizeGsdTool(name, input) } @@ -160,7 +160,7 @@ export function summarizeToolArgs(toolName: unknown, toolInput: unknown): string } } -/** Summarize GSD extension tool args into a compact identifier string. */ +/** Summarize SF extension tool args into a compact identifier string. */ function summarizeGsdTool(name: string, input: Record<string, unknown>): string { const parts: string[] = [] if (input.milestoneId) parts.push(String(input.milestoneId)) @@ -175,7 +175,7 @@ function summarizeGsdTool(name: string, input: Record<string, unknown>): string } return id } - // Fallback for GSD tools without IDs (e.g. gsd_decision_save) + // Fallback for SF tools without IDs (e.g. gsd_decision_save) if (input.decision) { const d = String(input.decision) return d.length > 60 ? d.slice(0, 57) + '...' : d diff --git a/src/headless.ts b/src/headless.ts index 0af428bd4..9a3927038 100644 --- a/src/headless.ts +++ b/src/headless.ts @@ -335,9 +335,9 @@ async function runHeadlessOnce(options: HeadlessOptions, restartCount: number): } // Resolve CLI path for the child process - const cliPath = process.env.GSD_BIN_PATH || process.argv[1] + const cliPath = process.env.SF_BIN_PATH || process.argv[1] if (!cliPath) { - process.stderr.write('[headless] Error: Cannot determine CLI path. Set GSD_BIN_PATH or run via gsd.\n') + process.stderr.write('[headless] Error: Cannot determine CLI path. Set SF_BIN_PATH or run via gsd.\n') process.exit(1) } @@ -352,8 +352,8 @@ async function runHeadlessOnce(options: HeadlessOptions, restartCount: number): if (injector) { clientOptions.env = injector.getSecretEnvVars() } - // Signal headless mode to the GSD extension (skips UAT human pause, etc.) - clientOptions.env = { ...(clientOptions.env as Record<string, string> || {}), GSD_HEADLESS: '1' } + // Signal headless mode to the SF extension (skips UAT human pause, etc.) + clientOptions.env = { ...(clientOptions.env as Record<string, string> || {}), SF_HEADLESS: '1' } // Propagate --bare to the child process if (options.bare) { clientOptions.args = [...((clientOptions.args as string[]) || []), '--bare'] diff --git a/src/help-text.ts b/src/help-text.ts index 4569c5667..505b39415 100644 --- a/src/help-text.ts +++ b/src/help-text.ts @@ -17,9 +17,9 @@ const SUBCOMMAND_HELP: Record<string, string> = { update: [ 'Usage: gsd update', '', - 'Update GSD to the latest version.', + 'Update SF to the latest version.', '', - 'Equivalent to: npm install -g gsd-pi@latest', + 'Equivalent to: npm install -g sf-run@latest', ].join('\n'), sessions: [ @@ -94,7 +94,7 @@ const SUBCOMMAND_HELP: Record<string, string> = { graph: [ 'Usage: gsd graph <subcommand> [options]', '', - 'Manage the GSD project knowledge graph. Reads .gsd/ artifacts and builds', + 'Manage the SF project knowledge graph. Reads .gsd/ artifacts and builds', 'a queryable graph of milestones, slices, tasks, rules, patterns, and lessons.', '', 'Subcommands:', @@ -173,7 +173,7 @@ const SUBCOMMAND_HELP: Record<string, string> = { SUBCOMMAND_HELP['wt'] = SUBCOMMAND_HELP['worktree'] export function printHelp(version: string): void { - process.stdout.write(`GSD v${version} — Get Shit Done\n\n`) + process.stdout.write(`SF v${version} — Singularity Forge\n\n`) process.stdout.write('Usage: gsd [options] [message...]\n\n') process.stdout.write('Options:\n') process.stdout.write(' --mode <text|json|rpc|mcp> Output mode (default: interactive)\n') @@ -192,7 +192,7 @@ export function printHelp(version: string): void { process.stdout.write(' install <source> Install a package/extension source\n') process.stdout.write(' remove <source> Remove an installed package source\n') process.stdout.write(' list List installed package sources\n') - process.stdout.write(' update Update GSD to the latest version\n') + process.stdout.write(' update Update SF to the latest version\n') process.stdout.write(' sessions List and resume a past session\n') process.stdout.write(' worktree <cmd> Manage worktrees (list, merge, clean, remove)\n') process.stdout.write(' auto [args] Run auto-mode without TUI (pipeable)\n') @@ -204,7 +204,7 @@ export function printHelp(version: string): void { export function printSubcommandHelp(subcommand: string, version: string): boolean { const help = SUBCOMMAND_HELP[subcommand] if (!help) return false - process.stdout.write(`GSD v${version} — Get Shit Done\n\n`) + process.stdout.write(`SF v${version} — Singularity Forge\n\n`) process.stdout.write(help + '\n') return true } diff --git a/src/loader.ts b/src/loader.ts index 1b1ef8e8a..5bd82f505 100644 --- a/src/loader.ts +++ b/src/loader.ts @@ -12,7 +12,7 @@ const gsdRoot = resolve(dirname(fileURLToPath(import.meta.url)), '..') const args = process.argv.slice(2) const firstArg = args[0] -// Read package.json once — reused for version, banner, and GSD_VERSION below +// Read package.json once — reused for version, banner, and SF_VERSION below let gsdVersion = '0.0.0' try { const pkg = JSON.parse(readFileSync(join(gsdRoot, 'package.json'), 'utf-8')) @@ -91,7 +91,7 @@ process.env.PI_SKIP_VERSION_CHECK = '1' // SF runs its own update check in cli. process.title = 'sf' // Print branded banner on first launch (before ~/.gsd/ exists). -// Set GSD_FIRST_RUN_BANNER so cli.ts skips the duplicate welcome screen. +// Set SF_FIRST_RUN_BANNER so cli.ts skips the duplicate welcome screen. if (!existsSync(appRoot)) { const cyan = '\x1b[36m' const green = '\x1b[32m' @@ -104,19 +104,19 @@ if (!existsSync(appRoot)) { ` Singularity Forge ${dim}v${gsdVersion}${reset}\n` + ` ${green}Welcome.${reset} Setting up your environment...\n\n` ) - process.env.GSD_FIRST_RUN_BANNER = '1' + process.env.SF_FIRST_RUN_BANNER = '1' } -// GSD_CODING_AGENT_DIR — tells pi's getAgentDir() to return ~/.gsd/agent/ instead of ~/.gsd/agent/ -process.env.GSD_CODING_AGENT_DIR = agentDir +// SF_CODING_AGENT_DIR — tells pi's getAgentDir() to return ~/.gsd/agent/ instead of ~/.gsd/agent/ +process.env.SF_CODING_AGENT_DIR = agentDir -// GSD_PKG_ROOT — absolute path to gsd-pi package root. Used by deployed extensions +// SF_PKG_ROOT — absolute path to sf-run package root. Used by deployed extensions // (e.g. auto.ts resume path) to import modules like resource-loader.js that live // in the package tree, not in the deployed ~/.gsd/agent/ tree. -process.env.GSD_PKG_ROOT = gsdRoot +process.env.SF_PKG_ROOT = gsdRoot // RTK environment — make ~/.gsd/agent/bin visible to all child-process paths, -// not just the bash tool, and force-disable RTK telemetry for GSD-managed use. +// not just the bash tool, and force-disable RTK telemetry for SF-managed use. applyRtkProcessEnv(process.env) // NODE_PATH — make gsd's own node_modules available to extensions loaded via jiti. @@ -133,24 +133,24 @@ process.env.NODE_PATH = [gsdNodeModules, process.env.NODE_PATH] const { Module } = await import('module'); (Module as any)._initPaths?.() -// GSD_VERSION — expose package version so extensions can display it -process.env.GSD_VERSION = gsdVersion +// SF_VERSION — expose package version so extensions can display it +process.env.SF_VERSION = gsdVersion -// GSD_BIN_PATH — absolute path to this loader (dist/loader.js), used by patched subagent +// SF_BIN_PATH — absolute path to this loader (dist/loader.js), used by patched subagent // to spawn gsd instead of pi when dispatching workflow tasks. // Respect a pre-set value so a source-mode wrapper (e.g. bin/gsd-from-source) can // advertise the executable shim instead of the .ts loader path (which spawn() can't exec). -process.env.GSD_BIN_PATH = process.env.GSD_BIN_PATH || process.argv[1] +process.env.SF_BIN_PATH = process.env.SF_BIN_PATH || process.argv[1] -// GSD_WORKFLOW_PATH — absolute path to bundled GSD-WORKFLOW.md, used by patched gsd extension +// SF_WORKFLOW_PATH — absolute path to bundled SF-WORKFLOW.md, used by patched gsd extension // when dispatching workflow prompts. Prefers dist/resources/ (stable, set at build time) // over src/resources/ (live working tree) — see resource-loader.ts for rationale. const distRes = join(gsdRoot, 'dist', 'resources') const srcRes = join(gsdRoot, 'src', 'resources') const resourcesDir = existsSync(distRes) ? distRes : srcRes -process.env.GSD_WORKFLOW_PATH = join(resourcesDir, 'GSD-WORKFLOW.md') +process.env.SF_WORKFLOW_PATH = join(resourcesDir, 'SF-WORKFLOW.md') -// GSD_BUNDLED_EXTENSION_PATHS — dynamically discovered bundled extension entry points. +// SF_BUNDLED_EXTENSION_PATHS — dynamically discovered bundled extension entry points. // Uses the shared discoverExtensionEntryPaths() to scan the bundled resources // directory, then remaps discovered paths to agentDir (~/.gsd/agent/extensions/) // where initResources() will sync them. @@ -165,10 +165,10 @@ const discoveredExtensionPaths = discoverExtensionEntryPaths(bundledExtDir) return isExtensionEnabled(registry, manifest.id) }) -process.env.GSD_BUNDLED_EXTENSION_PATHS = serializeBundledExtensionPaths(discoveredExtensionPaths) +process.env.SF_BUNDLED_EXTENSION_PATHS = serializeBundledExtensionPaths(discoveredExtensionPaths) // Respect HTTP_PROXY / HTTPS_PROXY / NO_PROXY env vars for all outbound requests. -// pi-coding-agent's cli.ts sets this, but GSD bypasses that entry point — so we +// pi-coding-agent's cli.ts sets this, but SF bypasses that entry point — so we // must set it here before any SDK clients are created. // Lazy-load undici (~200ms) only when proxy env vars are actually set. if (process.env.HTTP_PROXY || process.env.HTTPS_PROXY || process.env.http_proxy || process.env.https_proxy) { @@ -209,13 +209,13 @@ const missingPackages = criticalPackages.filter(pkg => !existsSync(join(gsdScope if (missingPackages.length > 0) { const missing = missingPackages.map(p => `@sf-run/${p}`).join(', ') process.stderr.write( - `\nError: GSD installation is broken — missing packages: ${missing}\n\n` + + `\nError: SF installation is broken — missing packages: ${missing}\n\n` + `This is usually caused by one of:\n` + - ` • An outdated version installed from npm (run: npm install -g gsd-pi@latest)\n` + + ` • An outdated version installed from npm (run: npm install -g sf-run@latest)\n` + ` • The packages/ directory was excluded from the installed tarball\n` + ` • A filesystem error prevented linking or copying the workspace packages\n\n` + `Fix it by reinstalling:\n\n` + - ` npm install -g gsd-pi@latest\n\n` + + ` npm install -g sf-run@latest\n\n` + `If the issue persists, please open an issue at:\n` + ` https://github.com/singularity-forge/sf-run/issues\n` ) diff --git a/src/mcp-server.ts b/src/mcp-server.ts index 1dbfd8b10..2abeaa23c 100644 --- a/src/mcp-server.ts +++ b/src/mcp-server.ts @@ -1,5 +1,5 @@ /** - * Minimal tool interface matching GSD's AgentTool shape. + * Minimal tool interface matching SF's AgentTool shape. * Avoids a direct dependency on @sf-run/pi-agent-core from this compiled module. */ export interface McpToolDef { @@ -33,12 +33,12 @@ const MCP_PKG = '@modelcontextprotocol/sdk' /** * Starts a native MCP (Model Context Protocol) server over stdin/stdout. * - * This enables GSD's tools (read, write, edit, bash, grep, glob, ls, etc.) + * This enables SF's tools (read, write, edit, bash, grep, glob, ls, etc.) * to be used by external AI clients such as Claude Desktop, VS Code Copilot, * and any MCP-compatible host. * * The server registers all tools from the agent session's tool registry and - * maps MCP tools/list and tools/call requests to GSD tool definitions and + * maps MCP tools/list and tools/call requests to SF tool definitions and * execution, respectively. * * All MCP SDK imports are dynamic to avoid subpath export resolution issues @@ -69,7 +69,7 @@ export async function startMcpServer(options: { { capabilities: { tools: {} } }, ) - // tools/list — return every registered GSD tool with its JSON Schema parameters + // tools/list — return every registered SF tool with its JSON Schema parameters server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: tools.map((t: McpToolDef) => ({ name: t.name, diff --git a/src/models-resolver.ts b/src/models-resolver.ts index db9a61a45..ff1ea4eb4 100644 --- a/src/models-resolver.ts +++ b/src/models-resolver.ts @@ -1,12 +1,12 @@ /** * Models.json resolution with fallback to ~/.pi/agent/models.json * - * GSD uses ~/.gsd/agent/models.json, but for a smooth migration/development + * SF uses ~/.gsd/agent/models.json, but for a smooth migration/development * experience, this module provides resolution logic that: * * 1. Reads ~/.gsd/agent/models.json if it exists - * 2. Falls back to ~/.pi/agent/models.json if GSD file doesn't exist - * 3. Merges both files if both exist (GSD takes precedence) + * 2. Falls back to ~/.pi/agent/models.json if SF file doesn't exist + * 3. Merges both files if both exist (SF takes precedence) */ import { existsSync, readFileSync } from 'node:fs' @@ -14,7 +14,7 @@ import { homedir } from 'node:os' import { join } from 'node:path' import { agentDir } from './app-paths.js' -const GSD_MODELS_PATH = join(agentDir, 'models.json') +const SF_MODELS_PATH = join(agentDir, 'models.json') const PI_MODELS_PATH = join(homedir(), '.pi', 'agent', 'models.json') /** @@ -23,18 +23,18 @@ const PI_MODELS_PATH = join(homedir(), '.pi', 'agent', 'models.json') * Priority: * 1. ~/.gsd/agent/models.json (exists) → return this path * 2. ~/.pi/agent/models.json (exists) → return this path (fallback) - * 3. Neither exists → return GSD path (will be created) + * 3. Neither exists → return SF path (will be created) * * @returns The path to use for models.json */ export function resolveModelsJsonPath(): string { - if (existsSync(GSD_MODELS_PATH)) { - return GSD_MODELS_PATH + if (existsSync(SF_MODELS_PATH)) { + return SF_MODELS_PATH } if (existsSync(PI_MODELS_PATH)) { return PI_MODELS_PATH } - return GSD_MODELS_PATH + return SF_MODELS_PATH } diff --git a/src/onboarding.ts b/src/onboarding.ts index 262cd0546..006541c1e 100644 --- a/src/onboarding.ts +++ b/src/onboarding.ts @@ -226,12 +226,12 @@ export async function runOnboarding(authStorage: AuthStorage): Promise<void> { // ── Intro ───────────────────────────────────────────────────────────────── process.stderr.write(renderLogo(pc.cyan)) - p.intro(pc.bold('Welcome to GSD — let\'s get you set up')) + p.intro(pc.bold('Welcome to SF — let\'s get you set up')) // ── LLM Provider Selection ──────────────────────────────────────────────── const llmResult = await runStep(p, 'LLM setup failed', () => runLlmStep(p, pc, authStorage), { - cancelMessage: 'Setup cancelled — you can run /login inside GSD later.', - errorInfo: 'You can configure your LLM provider later with /login inside GSD.', + cancelMessage: 'Setup cancelled — you can run /login inside SF later.', + errorInfo: 'You can configure your LLM provider later with /login inside SF.', }) if (llmResult === STEP_CANCELLED) return const llmConfigured = llmResult ?? false @@ -266,19 +266,19 @@ export async function runOnboarding(authStorage: AuthStorage): Promise<void> { summaryLines.push(`${pc.green('✓')} LLM provider configured`) } } else { - summaryLines.push(`${pc.yellow('↷')} LLM provider: skipped — use /login inside GSD`) + summaryLines.push(`${pc.yellow('↷')} LLM provider: skipped — use /login inside SF`) } if (searchConfigured) { summaryLines.push(`${pc.green('✓')} Web search: ${searchConfigured}`) } else { - summaryLines.push(`${pc.dim('↷')} Web search: not configured — use /search-provider inside GSD`) + summaryLines.push(`${pc.dim('↷')} Web search: not configured — use /search-provider inside SF`) } if (remoteConfigured) { summaryLines.push(`${pc.green('✓')} Remote questions: ${remoteConfigured}`) } else { - summaryLines.push(`${pc.dim('↷')} Remote questions: not configured — use /gsd remote inside GSD`) + summaryLines.push(`${pc.dim('↷')} Remote questions: not configured — use /gsd remote inside SF`) } if (toolKeyCount > 0) { @@ -288,7 +288,7 @@ export async function runOnboarding(authStorage: AuthStorage): Promise<void> { } p.note(summaryLines.join('\n'), 'Setup complete') - p.outro(pc.dim('Launching GSD...')) + p.outro(pc.dim('Launching SF...')) } // ─── LLM Authentication Step ────────────────────────────────────────────────── @@ -320,7 +320,7 @@ async function runLlmStep(p: ClackModule, pc: PicoModule, authStorage: AuthStora authOptions.push( { value: 'browser', label: 'Sign in with your browser', hint: 'GitHub Copilot, ChatGPT, Google, etc.' }, { value: 'api-key', label: 'Paste an API key', hint: 'from your provider dashboard' }, - { value: 'skip', label: 'Skip for now', hint: 'use /login inside GSD later' }, + { value: 'skip', label: 'Skip for now', hint: 'use /login inside SF later' }, ) const method = await p.select({ @@ -492,7 +492,7 @@ async function runApiKeyFlow( // Provider-specific post-setup hints if (providerId === 'openrouter') { - p.log.info(`Use ${pc.cyan('/model')} inside GSD to pick an OpenRouter model.`) + p.log.info(`Use ${pc.cyan('/model')} inside SF to pick an OpenRouter model.`) p.log.info(`To add custom models or control routing, see ${pc.dim('docs/providers.md#openrouter')}`) } @@ -681,7 +681,7 @@ async function runWebSearchStep( options.push( { value: 'brave', label: 'Brave Search', hint: 'requires API key — brave.com/search/api' }, { value: 'tavily', label: 'Tavily', hint: 'requires API key — tavily.com' }, - { value: 'skip', label: 'Skip for now', hint: 'use /search-provider inside GSD later' }, + { value: 'skip', label: 'Skip for now', hint: 'use /search-provider inside SF later' }, ) const choice = await p.select({ @@ -795,11 +795,11 @@ async function runRemoteQuestionsStep( { value: 'discord', label: 'Discord', hint: 'receive questions in a Discord channel' }, { value: 'slack', label: 'Slack', hint: 'receive questions in a Slack channel' }, { value: 'telegram', label: 'Telegram', hint: 'receive questions via Telegram bot' }, - { value: 'skip', label: 'Skip for now', hint: 'use /gsd remote inside GSD later' }, + { value: 'skip', label: 'Skip for now', hint: 'use /gsd remote inside SF later' }, ) const choice = await p.select({ - message: 'Set up remote questions? (get notified when GSD needs input)', + message: 'Set up remote questions? (get notified when SF needs input)', options, }) @@ -918,7 +918,7 @@ async function runRemoteQuestionsStep( const res = await fetch(`https://api.telegram.org/bot${trimmed}/sendMessage`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ chat_id: trimmedChatId, text: 'GSD remote questions connected.' }), + body: JSON.stringify({ chat_id: trimmedChatId, text: 'SF remote questions connected.' }), signal: AbortSignal.timeout(15_000), }) const data = await res.json() as any @@ -1013,7 +1013,7 @@ async function runDiscordChannelStep(p: ClackModule, pc: PicoModule, token: stri // Select channel const MANUAL_VALUE = '__manual__' const channelChoice = await p.select({ - message: 'Which channel should GSD use for remote questions?', + message: 'Which channel should SF use for remote questions?', options: [ ...channels.map(ch => ({ value: ch.id, label: `#${ch.name}` })), { value: MANUAL_VALUE, label: 'Enter channel ID manually' }, diff --git a/src/pi-migration.ts b/src/pi-migration.ts index d5571783d..f717170a2 100644 --- a/src/pi-migration.ts +++ b/src/pi-migration.ts @@ -1,6 +1,6 @@ /** * One-time migration of provider credentials from Pi (~/.pi/agent/auth.json) - * into GSD's auth storage. Runs when GSD has no LLM providers configured, + * into SF's auth storage. Runs when SF has no LLM providers configured, * so users with an existing Pi install skip re-authentication. */ @@ -27,10 +27,10 @@ const LLM_PROVIDER_IDS = [ ] /** - * Migrate provider credentials from Pi's auth.json into GSD's AuthStorage. + * Migrate provider credentials from Pi's auth.json into SF's AuthStorage. * - * Only runs when GSD has no LLM provider configured and Pi's auth.json exists. - * Copies any credentials GSD doesn't already have. Returns true if an LLM + * Only runs when SF has no LLM provider configured and Pi's auth.json exists. + * Copies any credentials SF doesn't already have. Returns true if an LLM * provider was migrated (so onboarding can be skipped). */ export function migratePiCredentials(authStorage: AuthStorage): boolean { diff --git a/src/resource-loader.ts b/src/resource-loader.ts index 870d1cf20..5c80516c9 100644 --- a/src/resource-loader.ts +++ b/src/resource-loader.ts @@ -1,5 +1,5 @@ import { DefaultResourceLoader, sortExtensionPaths } from '@sf-run/pi-coding-agent' -if (process.env.GSD_DEBUG_EXTENSIONS) process.stderr.write("[gsd-debug] resource-loader.ts loaded\n") +if (process.env.SF_DEBUG_EXTENSIONS) process.stderr.write("[gsd-debug] resource-loader.ts loaded\n") import { createHash } from 'node:crypto' import { homedir } from 'node:os' import { chmodSync, copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, openSync, closeSync, readFileSync, readlinkSync, readdirSync, rmSync, statSync, symlinkSync, unlinkSync, writeFileSync } from 'node:fs' @@ -35,14 +35,14 @@ interface ManagedResourceManifest { /** Content fingerprint of bundled resources — detects same-version content changes. */ contentHash?: string /** - * Root-level files installed in extensions/ by this GSD version. + * Root-level files installed in extensions/ by this SF version. * Used on the next upgrade to detect and prune files that were removed or * moved into a subdirectory, preventing orphaned non-extension files from * causing extension load errors. */ installedExtensionRootFiles?: string[] /** - * Subdirectory extension names installed in extensions/ by this GSD version. + * Subdirectory extension names installed in extensions/ by this SF version. * Used on the next upgrade to detect and prune subdirectory extensions that * were removed from the bundle. */ @@ -61,9 +61,9 @@ function getManagedResourceManifestPath(agentDir: string): string { } function getBundledGsdVersion(): string { - // Prefer GSD_VERSION env var (set once by loader.ts) to avoid re-reading package.json - if (process.env.GSD_VERSION && process.env.GSD_VERSION !== '0.0.0') { - return process.env.GSD_VERSION + // Prefer SF_VERSION env var (set once by loader.ts) to avoid re-reading package.json + if (process.env.SF_VERSION && process.env.SF_VERSION !== '0.0.0') { + return process.env.SF_VERSION } try { const pkg = JSON.parse(readFileSync(join(packageRoot, 'package.json'), 'utf-8')) @@ -280,7 +280,7 @@ function copyDirRecursive(src: string, dest: string): void { } /** - * Creates (or updates) a symlink at agentDir/node_modules pointing to GSD's + * Creates (or updates) a symlink at agentDir/node_modules pointing to SF's * own node_modules directory. * * Native ESM `import()` ignores NODE_PATH — it resolves packages by walking @@ -391,7 +391,7 @@ function reconcileMergedNodeModules( // Symlink entries from the hoisted node_modules (external deps) try { for (const entry of readdirSync(hoisted, { withFileTypes: true })) { - // Skip the gsd-pi package itself and dotfiles + // Skip the sf-run package itself and dotfiles if (entry.name === basename(packageRoot)) continue if (entry.name.startsWith('.')) continue try { symlinkSync(join(hoisted, entry.name), join(agentNodeModules, entry.name), 'junction'); linkedCount++ } catch { /* skip individual */ } @@ -433,7 +433,7 @@ function mergedFingerprint(hoisted: string, internal: string): string { } /** - * Prune root-level extension files that were installed by a previous GSD version + * Prune root-level extension files that were installed by a previous SF version * but have since been removed or relocated to a subdirectory. * * Two strategies: @@ -510,14 +510,14 @@ function pruneRemovedBundledExtensions( * * - extensions/ → ~/.gsd/agent/extensions/ (overwrite when version changes) * - agents/ → ~/.gsd/agent/agents/ (overwrite when version changes) - * - GSD-WORKFLOW.md → ~/.gsd/agent/GSD-WORKFLOW.md (fallback for env var miss) + * - SF-WORKFLOW.md → ~/.gsd/agent/SF-WORKFLOW.md (fallback for env var miss) * * Skills are NOT synced here. They are installed by the user via the * skills.sh CLI (`npx skills add <repo>`) into ~/.agents/skills/ — the * industry-standard Agent Skills ecosystem directory. * * Skips the copy when the managed-resources.json version matches the current - * GSD version, avoiding ~128ms of synchronous cpSync on every startup. + * SF version, avoiding ~128ms of synchronous cpSync on every startup. * After `npm update -g @glittercowboy/gsd`, versions will differ and the * copy runs once to land the new resources. * @@ -537,9 +537,9 @@ export function initResources(agentDir: string): void { pruneRemovedBundledExtensions(manifest, agentDir) pruneStaleSiblingFiles(bundledExtensionsDir, extensionsDir) - // Ensure ~/.gsd/agent/node_modules symlinks to GSD's node_modules on EVERY + // Ensure ~/.gsd/agent/node_modules symlinks to SF's node_modules on EVERY // launch, not just during resource syncs. A stale/broken symlink makes ALL - // extensions fail to resolve @sf-run/* packages, rendering GSD non-functional. + // extensions fail to resolve @sf-run/* packages, rendering SF non-functional. ensureNodeModulesSymlink(agentDir) // Migrate legacy skills on every launch (not gated by manifest) so that @@ -570,11 +570,11 @@ export function initResources(agentDir: string): void { // above the manifest check so it runs on every launch (including retries // after partial copy failures). - // Sync GSD-WORKFLOW.md to agentDir as a fallback for when GSD_WORKFLOW_PATH + // Sync SF-WORKFLOW.md to agentDir as a fallback for when SF_WORKFLOW_PATH // env var is not set (e.g. fork/dev builds, alternative entry points). - const workflowSrc = join(resourcesDir, 'GSD-WORKFLOW.md') + const workflowSrc = join(resourcesDir, 'SF-WORKFLOW.md') if (existsSync(workflowSrc)) { - try { copyFileSync(workflowSrc, join(agentDir, 'GSD-WORKFLOW.md')) } catch { /* non-fatal */ } + try { copyFileSync(workflowSrc, join(agentDir, 'SF-WORKFLOW.md')) } catch { /* non-fatal */ } } // Ensure all newly copied files are owner-writable so the next run can @@ -594,7 +594,7 @@ export function initResources(agentDir: string): void { * The migration is conservative: * - Only skill directories containing a SKILL.md are considered. * - Copies, does not move — the old directory stays intact so downgrading - * to a pre-migration GSD version still works. + * to a pre-migration SF version still works. * - Collision-safe — if a skill name already exists in the target, the * existing ecosystem skill wins (user may have already installed a newer * version via skills.sh). @@ -609,7 +609,7 @@ function migrateSkillsToEcosystemDir(agentDir: string): void { if (!existsSync(legacyDir)) return // Atomic marker check — 'wx' fails if file already exists, preventing races - // when two GSD processes start simultaneously. + // when two SF processes start simultaneously. let markerFd: number try { markerFd = openSync(markerPath, 'wx') @@ -716,7 +716,7 @@ export function hasStaleCompiledExtensionSiblings(extensionsDir: string, sourceD /** * Constructs a DefaultResourceLoader that loads extensions from both - * ~/.gsd/agent/extensions/ (GSD's default) and ~/.pi/agent/extensions/ (pi's default). + * ~/.gsd/agent/extensions/ (SF's default) and ~/.pi/agent/extensions/ (pi's default). * This allows users to use extensions from either location. */ // Cache bundled extension keys at module load — avoids re-scanning the extensions @@ -734,7 +734,7 @@ function getBundledExtensionKeys(): Set<string> { /** * Optional overrides passed through to DefaultResourceLoader. Print mode * needs these — it used to construct DefaultResourceLoader directly, which - * bypassed buildResourceLoader's extensionPathsTransform (= the GSD registry + * bypassed buildResourceLoader's extensionPathsTransform (= the SF registry * filter) and let disabled bundled extensions like `ollama` leak through and * conflict with community replacements such as `@0xkobold/pi-ollama`. */ @@ -772,7 +772,7 @@ export function buildResourceLoader( appendSystemPrompt: options.appendSystemPrompt, bundledExtensionKeys: bundledKeys, extensionPathsTransform: (paths: string[]) => { - // Filter community + bundled extensions through the GSD registry so + // Filter community + bundled extensions through the SF registry so // explicitly-disabled entries (e.g. bundled `ollama` superseded by // `@0xkobold/pi-ollama`) never reach the runtime and trigger command // conflicts. diff --git a/src/resources/GSD-WORKFLOW.md b/src/resources/SF-WORKFLOW.md similarity index 98% rename from src/resources/GSD-WORKFLOW.md rename to src/resources/SF-WORKFLOW.md index 736ce117a..433808a91 100644 --- a/src/resources/GSD-WORKFLOW.md +++ b/src/resources/SF-WORKFLOW.md @@ -1,8 +1,8 @@ -# GSD Workflow — Manual Bootstrap Protocol +# SF Workflow — Manual Bootstrap Protocol -> This document teaches you how to operate the GSD planning methodology manually using files on disk. +> This document teaches you how to operate the SF planning methodology manually using files on disk. > -> **When to read this:** At the start of any session working on GSD-managed work, or when loaded by `/gsd`. +> **When to read this:** At the start of any session working on SF-managed work, or when loaded by `/gsd`. > > **After reading this, always read `.gsd/STATE.md` to find out what's next.** > If the milestone has a `M###-CONTEXT.md`, read that too. If the active slice has an `S##-CONTEXT.md`, read that as well — these files contain project-specific decisions, reference paths, and implementation guidance that this generic methodology doc does not. @@ -45,7 +45,7 @@ All artifacts live in `.gsd/` at the project root: .gsd/ STATE.md # Dashboard — always read first (derived cache; runtime, gitignored) DECISIONS.md # Append-only decisions register - CODEBASE.md # Generated codebase map cache (auto-refreshed by GSD) + CODEBASE.md # Generated codebase map cache (auto-refreshed by SF) milestones/ M001/ M001-ROADMAP.md # Milestone plan (checkboxes = state) @@ -194,7 +194,7 @@ Critical wiring between artifacts: ### `STATE.md` ```markdown -# GSD State +# SF State **Active Milestone:** M001 — Title **Active Slice:** S02 — Slice Title @@ -595,7 +595,7 @@ Commit types: `feat`, `fix`, `test`, `refactor`, `docs`, `perf`, `chore` ``` feat(M001/S01): file I/O foundation -Agent can parse, format, load, and save all GSD file types with round-trip fidelity. +Agent can parse, format, load, and save all SF file types with round-trip fidelity. Tasks completed: - T01: core types and interfaces diff --git a/src/resources/agents/worker.md b/src/resources/agents/worker.md index fe1aff305..199d35a23 100644 --- a/src/resources/agents/worker.md +++ b/src/resources/agents/worker.md @@ -8,7 +8,7 @@ You are a worker agent with full capabilities. You operate in an isolated contex Work autonomously to complete the assigned task. Use all available tools as needed, with one important restriction: - Do **not** spawn subagents or act as an orchestrator unless the parent task explicitly instructs you to do so. -- If the task looks like GSD orchestration, planning, scouting, parallel dispatch, or review routing, stop and report that the caller should use the appropriate specialist agent instead (for example: `gsd-worker`, `gsd-scout`, `gsd-reviewer`, or the top-level orchestrator). +- If the task looks like SF orchestration, planning, scouting, parallel dispatch, or review routing, stop and report that the caller should use the appropriate specialist agent instead (for example: `gsd-worker`, `gsd-scout`, `gsd-reviewer`, or the top-level orchestrator). - In particular, do **not** call `gsd_scout`, `subagent`, `launch_parallel_view`, or `gsd_execute_parallel` on your own initiative. Output format when finished: diff --git a/src/resources/extensions/bg-shell/overlay.ts b/src/resources/extensions/bg-shell/overlay.ts index 3d3c0fdbb..87dfee24c 100644 --- a/src/resources/extensions/bg-shell/overlay.ts +++ b/src/resources/extensions/bg-shell/overlay.ts @@ -126,7 +126,7 @@ export class BgManagerOverlay { this.invalidate(); this.tui.requestRender(); }).catch((err) => { - if (process.env.GSD_DEBUG) console.error('[bg-shell] restart failed:', err); + if (process.env.SF_DEBUG) console.error('[bg-shell] restart failed:', err); this.invalidate(); this.tui.requestRender(); }); diff --git a/src/resources/extensions/browser-tools/BROWSER-TOOLS-V2-PROPOSAL.md b/src/resources/extensions/browser-tools/BROWSER-TOOLS-V2-PROPOSAL.md index d8c1b2aef..f565a4925 100644 --- a/src/resources/extensions/browser-tools/BROWSER-TOOLS-V2-PROPOSAL.md +++ b/src/resources/extensions/browser-tools/BROWSER-TOOLS-V2-PROPOSAL.md @@ -6,7 +6,7 @@ This document proposes a comprehensive evolution of `agent/extensions/browser-to - autonomous verification - end-to-end testing -- GSD slice validation +- SF slice validation - debugging and observability - general internet task execution - low-token, high-reliability browser interaction @@ -46,7 +46,7 @@ However, the current system still operates mostly as a **toolbox of action primi If implemented well, these changes would make browser-tools materially better for both: -- **GSD automatic verification and UAT generation** +- **SF automatic verification and UAT generation** - **general-purpose agentic browser use on arbitrary websites and apps** --- @@ -231,7 +231,7 @@ State deltas are often more useful than fresh full state. Trace files, HAR data, visual diffs, and debug bundles should generally be persisted and summarized, not inlined. -### 7. Optimize for GSD verification +### 7. Optimize for SF verification The browser device should be excellent at producing: @@ -252,14 +252,14 @@ Add a `browser_assert` tool and a small assertion language built around common b ## Why it matters -This is the single most important missing capability for GSD and autonomous QA. +This is the single most important missing capability for SF and autonomous QA. Today the agent must infer correctness from prose and heuristics. That is weaker than explicit pass/fail evaluation. ## What it enables - deterministic verification -- clean GSD artifact generation +- clean SF artifact generation - structured failure reporting - simpler agent reasoning - less repeated browser inspection @@ -493,7 +493,7 @@ Forms are one of the highest-leverage abstractions in browser automation. - stronger semantic mapping between labels and inputs - automatic handling of required fields and validation messages - better submit targeting -- more robust GSD verification of user flows +- more robust SF verification of user flows ## `browser_analyze_form` should return @@ -741,7 +741,7 @@ Add explicit debug artifact tools. ## Why it matters -For GSD and for hard UI debugging, you need failure evidence that survives the current context window. +For SF and for hard UI debugging, you need failure evidence that survives the current context window. ## What it enables @@ -969,7 +969,7 @@ This makes the system far more debuggable and composable. - request correlation - failure bundle generation - concise flow summaries -- better GSD verification records +- better SF verification records ## Suggested stored fields per action @@ -1061,11 +1061,11 @@ rather than always restating the whole page summary. --- -# 16. Add GSD-Native Verification Outputs +# 16. Add SF-Native Verification Outputs ## Proposal -Make browser-tools able to emit outputs that directly support GSD slice/task completion. +Make browser-tools able to emit outputs that directly support SF slice/task completion. ## Why it matters @@ -1100,7 +1100,7 @@ Write a markdown or JSON artifact summarizing: - outcome - diagnostics -This is especially useful for GSD artifacts. +This is especially useful for SF artifacts. --- @@ -1185,7 +1185,7 @@ These are the ideas that move the extension from excellent tooling into a genuin 5. `browser_verify_flow` 6. `browser_run_task` -## Biggest wins for GSD +## Biggest wins for SF 1. explicit verification outputs 2. debug bundles on failure @@ -1266,7 +1266,7 @@ The most important changes are: If these are implemented well, browser-tools can become not just a useful extension, but a foundational AI-native capability for both: - **agentic browser use across the web** -- **automatic verification inside GSD workflows** +- **automatic verification inside SF workflows** --- diff --git a/src/resources/extensions/browser-tools/settle.ts b/src/resources/extensions/browser-tools/settle.ts index d4ea3d0b6..2185280c0 100644 --- a/src/resources/extensions/browser-tools/settle.ts +++ b/src/resources/extensions/browser-tools/settle.ts @@ -126,7 +126,7 @@ export async function settleAfterActionAdaptive( // Install mutation counter + read initial state in one evaluate sequence. // ensureMutationCounter must run first (installs the observer), then we // read the baseline via the combined reader. - await ensureMutationCounter(p).catch((e) => { if (process.env.GSD_DEBUG) console.error("[browser-tools] ensureMutationCounter failed:", e.message); }); + await ensureMutationCounter(p).catch((e) => { if (process.env.SF_DEBUG) console.error("[browser-tools] ensureMutationCounter failed:", e.message); }); const initial = await readSettleState(p, checkFocus); let previousMutationCount = initial.mutationCount; let previousFocus = initial.focusDescriptor; diff --git a/src/resources/extensions/browser-tools/tools/device.ts b/src/resources/extensions/browser-tools/tools/device.ts index c70e3e2af..d8b91e6a5 100644 --- a/src/resources/extensions/browser-tools/tools/device.ts +++ b/src/resources/extensions/browser-tools/tools/device.ts @@ -134,7 +134,7 @@ export function registerDeviceTools(pi: ExtensionAPI, deps: ToolDeps): void { // Navigate back to previous URL if it wasn't about:blank if (currentUrl && currentUrl !== "about:blank") { - await page.goto(currentUrl, { waitUntil: "domcontentloaded", timeout: 15000 }).catch((e) => { if (process.env.GSD_DEBUG) console.error("[browser-tools] device goto restore failed:", e.message); }); + await page.goto(currentUrl, { waitUntil: "domcontentloaded", timeout: 15000 }).catch((e) => { if (process.env.SF_DEBUG) console.error("[browser-tools] device goto restore failed:", e.message); }); } const viewport = deviceDescriptor.viewport; diff --git a/src/resources/extensions/claude-code-cli/index.ts b/src/resources/extensions/claude-code-cli/index.ts index 2d57aada3..f1ff710be 100644 --- a/src/resources/extensions/claude-code-cli/index.ts +++ b/src/resources/extensions/claude-code-cli/index.ts @@ -5,7 +5,7 @@ * locally-installed Claude Code CLI via the official Agent SDK. * * Users with a Claude Code subscription (Pro/Max/Team) get access to - * subsidized inference through GSD's UI — no API key required. + * subsidized inference through SF's UI — no API key required. * * TOS-compliant: uses Anthropic's official `@anthropic-ai/claude-agent-sdk`, * never touches credentials, never offers a login flow. diff --git a/src/resources/extensions/claude-code-cli/partial-builder.ts b/src/resources/extensions/claude-code-cli/partial-builder.ts index c71aec6f3..e222a36d5 100644 --- a/src/resources/extensions/claude-code-cli/partial-builder.ts +++ b/src/resources/extensions/claude-code-cli/partial-builder.ts @@ -2,7 +2,7 @@ * Content-block mapping helpers and streaming state tracker. * * Translates the Claude Agent SDK's `BetaRawMessageStreamEvent` sequence - * into GSD's `AssistantMessageEvent` deltas for incremental TUI rendering. + * into SF's `AssistantMessageEvent` deltas for incremental TUI rendering. */ import type { @@ -39,7 +39,7 @@ export function parseMcpToolName(name: string): { server: string; tool: string } } /** - * Build a GSD ToolCall block from a Claude Code SDK tool_use block, stripping + * Build a SF ToolCall block from a Claude Code SDK tool_use block, stripping * the `mcp__<server>__` prefix from the name so registered extension renderers * (which use the unprefixed canonical names) can match. The original server * name is preserved on the block for diagnostics and rendering. @@ -67,7 +67,7 @@ function toolCallFromBlock( // --------------------------------------------------------------------------- /** - * Convert a single BetaContentBlock to the corresponding GSD content type. + * Convert a single BetaContentBlock to the corresponding SF content type. */ export function mapContentBlock( block: BetaContentBlock, @@ -123,7 +123,7 @@ export function mapStopReason(reason: string | null): StopReason { } /** - * Convert SDK usage + total_cost_usd into GSD's Usage shape. + * Convert SDK usage + total_cost_usd into SF's Usage shape. * * The SDK does not break cost down per-bucket, so all cost is * attributed to `cost.total`. diff --git a/src/resources/extensions/claude-code-cli/stream-adapter.ts b/src/resources/extensions/claude-code-cli/stream-adapter.ts index 5d0ce7ad9..dacadd392 100644 --- a/src/resources/extensions/claude-code-cli/stream-adapter.ts +++ b/src/resources/extensions/claude-code-cli/stream-adapter.ts @@ -1,10 +1,10 @@ /** - * Stream adapter: bridges the Claude Agent SDK into GSD's streamSimple contract. + * Stream adapter: bridges the Claude Agent SDK into SF's streamSimple contract. * * The SDK runs the full agentic loop (multi-turn, tool execution, compaction) * in one call. This adapter translates the SDK's streaming output into * AssistantMessageEvents for TUI rendering, then strips tool-call blocks from - * the final AssistantMessage so GSD's agent loop doesn't try to dispatch them. + * the final AssistantMessage so SF's agent loop doesn't try to dispatch them. */ import type { @@ -207,7 +207,7 @@ function extractMessageText(msg: { role: string; content: unknown }): string { } /** - * Build a full conversational prompt from GSD's context messages. + * Build a full conversational prompt from SF's context messages. * * Previous behaviour sent only the last user message, making every SDK * call effectively stateless. This version serialises the complete @@ -629,7 +629,7 @@ export function createClaudeCodeElicitationHandler( } /** - * Aborted by the caller's AbortSignal — distinct from exhaustion. GSD's + * Aborted by the caller's AbortSignal — distinct from exhaustion. SF's * agent loop keys off `stopReason === "aborted"` to treat this as a clean * user cancel instead of a retry-eligible provider failure. */ @@ -656,23 +656,23 @@ export function makeAbortedMessage(model: string, lastTextContent: string): Assi /** * Resolve the Claude Code permission mode for the current run. * - * GSD subagents run underneath a host Claude Code session the user has + * SF subagents run underneath a host Claude Code session the user has * already consented to, and their work (edits, shell inspection, MCP calls) * spans the full workflow toolset. Defaulting the inner SDK to * `bypassPermissions` avoids per-tool approval prompts that offer no * meaningful safety beyond what the host session and the subagent prompts - * already enforce. `GSD_CLAUDE_CODE_PERMISSION_MODE` lets security-conscious + * already enforce. `SF_CLAUDE_CODE_PERMISSION_MODE` lets security-conscious * users opt into a stricter mode (`acceptEdits`, `default`, `plan`). * * Tradeoff: bypass means a prompt-injection payload read from an untrusted - * file could trigger tool calls without a second gate. Accepted for GSD + * file could trigger tool calls without a second gate. Accepted for SF * because the workflow is explicit user intent and the alternative * (#4099) is continuous approval fatigue that blocks real work. */ export async function resolveClaudePermissionMode( env: NodeJS.ProcessEnv = process.env, ): Promise<"bypassPermissions" | "acceptEdits" | "default" | "plan"> { - const override = env.GSD_CLAUDE_CODE_PERMISSION_MODE?.trim(); + const override = env.SF_CLAUDE_CODE_PERMISSION_MODE?.trim(); if (override === "bypassPermissions" || override === "acceptEdits" || override === "default" || override === "plan") { return override; } @@ -704,7 +704,7 @@ export function buildSdkOptions( // server's tools. `acceptEdits` mode (the interactive default) only // auto-approves file edits — Read/Glob/Grep, basic shell inspection, and // every `mcp__gsd-workflow__*` call still surface as "This command - // requires approval" and block GSD actions (#4099). + // requires approval" and block SF actions (#4099). const allowedTools = [ "Read", "Write", @@ -870,7 +870,7 @@ export function mergePendingToolCalls( // --------------------------------------------------------------------------- /** - * GSD streamSimple function that delegates to the Claude Agent SDK. + * SF streamSimple function that delegates to the Claude Agent SDK. * * Emits AssistantMessageEvent deltas for real-time TUI rendering * (thinking, text, tool calls). The final AssistantMessage has tool-call @@ -914,7 +914,7 @@ async function pumpSdkMessages( }) => AsyncIterable<SDKMessage>; }; - // Bridge GSD's AbortSignal to SDK's AbortController + // Bridge SF's AbortSignal to SDK's AbortController const controller = new AbortController(); if (options?.signal) { options.signal.addEventListener("abort", () => controller.abort(), { once: true }); @@ -1141,7 +1141,7 @@ async function pumpSdkMessages( } // Generator exhaustion without a terminal result is a stream interruption, - // not a successful completion. Emitting an error lets GSD classify it as a + // not a successful completion. Emitting an error lets SF classify it as a // transient provider failure instead of advancing auto-mode state. const fallback = makeStreamExhaustedErrorMessage(modelId, lastTextContent); stream.push({ type: "error", reason: "error", error: fallback }); diff --git a/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts b/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts index cbb28319f..0d2938506 100644 --- a/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts +++ b/src/resources/extensions/claude-code-cli/tests/stream-adapter.test.ts @@ -453,18 +453,18 @@ describe("stream-adapter — session persistence (#2859)", () => { test("buildSdkOptions includes workflow MCP server config when env is set", () => { const prev = { - GSD_WORKFLOW_MCP_COMMAND: process.env.GSD_WORKFLOW_MCP_COMMAND, - GSD_WORKFLOW_MCP_NAME: process.env.GSD_WORKFLOW_MCP_NAME, - GSD_WORKFLOW_MCP_ARGS: process.env.GSD_WORKFLOW_MCP_ARGS, - GSD_WORKFLOW_MCP_ENV: process.env.GSD_WORKFLOW_MCP_ENV, - GSD_WORKFLOW_MCP_CWD: process.env.GSD_WORKFLOW_MCP_CWD, + SF_WORKFLOW_MCP_COMMAND: process.env.SF_WORKFLOW_MCP_COMMAND, + SF_WORKFLOW_MCP_NAME: process.env.SF_WORKFLOW_MCP_NAME, + SF_WORKFLOW_MCP_ARGS: process.env.SF_WORKFLOW_MCP_ARGS, + SF_WORKFLOW_MCP_ENV: process.env.SF_WORKFLOW_MCP_ENV, + SF_WORKFLOW_MCP_CWD: process.env.SF_WORKFLOW_MCP_CWD, }; try { - process.env.GSD_WORKFLOW_MCP_COMMAND = "node"; - process.env.GSD_WORKFLOW_MCP_NAME = "gsd-workflow"; - process.env.GSD_WORKFLOW_MCP_ARGS = JSON.stringify(["packages/mcp-server/dist/cli.js"]); - process.env.GSD_WORKFLOW_MCP_ENV = JSON.stringify({ GSD_CLI_PATH: "/tmp/gsd" }); - process.env.GSD_WORKFLOW_MCP_CWD = "/tmp/project"; + process.env.SF_WORKFLOW_MCP_COMMAND = "node"; + process.env.SF_WORKFLOW_MCP_NAME = "gsd-workflow"; + process.env.SF_WORKFLOW_MCP_ARGS = JSON.stringify(["packages/mcp-server/dist/cli.js"]); + process.env.SF_WORKFLOW_MCP_ENV = JSON.stringify({ SF_CLI_PATH: "/tmp/gsd" }); + process.env.SF_WORKFLOW_MCP_CWD = "/tmp/project"; const options = buildSdkOptions("claude-sonnet-4-20250514", "test"); const mcpServers = options.mcpServers as Record<string, any>; @@ -473,9 +473,9 @@ describe("stream-adapter — session persistence (#2859)", () => { assert.equal(srv.command, "node"); assert.deepEqual(srv.args, ["packages/mcp-server/dist/cli.js"]); assert.equal(srv.cwd, "/tmp/project"); - assert.equal(srv.env.GSD_CLI_PATH, "/tmp/gsd"); - assert.equal(srv.env.GSD_PERSIST_WRITE_GATE_STATE, "1"); - assert.equal(srv.env.GSD_WORKFLOW_PROJECT_ROOT, "/tmp/project"); + assert.equal(srv.env.SF_CLI_PATH, "/tmp/gsd"); + assert.equal(srv.env.SF_PERSIST_WRITE_GATE_STATE, "1"); + assert.equal(srv.env.SF_WORKFLOW_PROJECT_ROOT, "/tmp/project"); assert.deepEqual(options.disallowedTools, ["AskUserQuestion"]); assert.deepEqual(options.allowedTools, [ "Read", @@ -488,28 +488,28 @@ describe("stream-adapter — session persistence (#2859)", () => { "mcp__gsd-workflow__*", ]); } finally { - process.env.GSD_WORKFLOW_MCP_COMMAND = prev.GSD_WORKFLOW_MCP_COMMAND; - process.env.GSD_WORKFLOW_MCP_NAME = prev.GSD_WORKFLOW_MCP_NAME; - process.env.GSD_WORKFLOW_MCP_ARGS = prev.GSD_WORKFLOW_MCP_ARGS; - process.env.GSD_WORKFLOW_MCP_ENV = prev.GSD_WORKFLOW_MCP_ENV; - process.env.GSD_WORKFLOW_MCP_CWD = prev.GSD_WORKFLOW_MCP_CWD; + process.env.SF_WORKFLOW_MCP_COMMAND = prev.SF_WORKFLOW_MCP_COMMAND; + process.env.SF_WORKFLOW_MCP_NAME = prev.SF_WORKFLOW_MCP_NAME; + process.env.SF_WORKFLOW_MCP_ARGS = prev.SF_WORKFLOW_MCP_ARGS; + process.env.SF_WORKFLOW_MCP_ENV = prev.SF_WORKFLOW_MCP_ENV; + process.env.SF_WORKFLOW_MCP_CWD = prev.SF_WORKFLOW_MCP_CWD; } }); test("buildSdkOptions disables AskUserQuestion for custom workflow MCP server names", () => { const prev = { - GSD_WORKFLOW_MCP_COMMAND: process.env.GSD_WORKFLOW_MCP_COMMAND, - GSD_WORKFLOW_MCP_NAME: process.env.GSD_WORKFLOW_MCP_NAME, - GSD_WORKFLOW_MCP_ARGS: process.env.GSD_WORKFLOW_MCP_ARGS, - GSD_WORKFLOW_MCP_ENV: process.env.GSD_WORKFLOW_MCP_ENV, - GSD_WORKFLOW_MCP_CWD: process.env.GSD_WORKFLOW_MCP_CWD, + SF_WORKFLOW_MCP_COMMAND: process.env.SF_WORKFLOW_MCP_COMMAND, + SF_WORKFLOW_MCP_NAME: process.env.SF_WORKFLOW_MCP_NAME, + SF_WORKFLOW_MCP_ARGS: process.env.SF_WORKFLOW_MCP_ARGS, + SF_WORKFLOW_MCP_ENV: process.env.SF_WORKFLOW_MCP_ENV, + SF_WORKFLOW_MCP_CWD: process.env.SF_WORKFLOW_MCP_CWD, }; try { - process.env.GSD_WORKFLOW_MCP_COMMAND = "node"; - process.env.GSD_WORKFLOW_MCP_NAME = "custom-workflow"; - process.env.GSD_WORKFLOW_MCP_ARGS = JSON.stringify(["packages/mcp-server/dist/cli.js"]); - process.env.GSD_WORKFLOW_MCP_ENV = JSON.stringify({ GSD_CLI_PATH: "/tmp/gsd" }); - process.env.GSD_WORKFLOW_MCP_CWD = "/tmp/project"; + process.env.SF_WORKFLOW_MCP_COMMAND = "node"; + process.env.SF_WORKFLOW_MCP_NAME = "custom-workflow"; + process.env.SF_WORKFLOW_MCP_ARGS = JSON.stringify(["packages/mcp-server/dist/cli.js"]); + process.env.SF_WORKFLOW_MCP_ENV = JSON.stringify({ SF_CLI_PATH: "/tmp/gsd" }); + process.env.SF_WORKFLOW_MCP_CWD = "/tmp/project"; const options = buildSdkOptions("claude-sonnet-4-20250514", "test"); const mcpServers = options.mcpServers as Record<string, any>; @@ -526,28 +526,28 @@ describe("stream-adapter — session persistence (#2859)", () => { "mcp__custom-workflow__*", ]); } finally { - process.env.GSD_WORKFLOW_MCP_COMMAND = prev.GSD_WORKFLOW_MCP_COMMAND; - process.env.GSD_WORKFLOW_MCP_NAME = prev.GSD_WORKFLOW_MCP_NAME; - process.env.GSD_WORKFLOW_MCP_ARGS = prev.GSD_WORKFLOW_MCP_ARGS; - process.env.GSD_WORKFLOW_MCP_ENV = prev.GSD_WORKFLOW_MCP_ENV; - process.env.GSD_WORKFLOW_MCP_CWD = prev.GSD_WORKFLOW_MCP_CWD; + process.env.SF_WORKFLOW_MCP_COMMAND = prev.SF_WORKFLOW_MCP_COMMAND; + process.env.SF_WORKFLOW_MCP_NAME = prev.SF_WORKFLOW_MCP_NAME; + process.env.SF_WORKFLOW_MCP_ARGS = prev.SF_WORKFLOW_MCP_ARGS; + process.env.SF_WORKFLOW_MCP_ENV = prev.SF_WORKFLOW_MCP_ENV; + process.env.SF_WORKFLOW_MCP_CWD = prev.SF_WORKFLOW_MCP_CWD; } }); test("buildSdkOptions auto-discovers bundled MCP server even without env hints", () => { const prev = { - GSD_WORKFLOW_MCP_COMMAND: process.env.GSD_WORKFLOW_MCP_COMMAND, - GSD_WORKFLOW_MCP_NAME: process.env.GSD_WORKFLOW_MCP_NAME, - GSD_WORKFLOW_MCP_ARGS: process.env.GSD_WORKFLOW_MCP_ARGS, - GSD_WORKFLOW_MCP_ENV: process.env.GSD_WORKFLOW_MCP_ENV, - GSD_WORKFLOW_MCP_CWD: process.env.GSD_WORKFLOW_MCP_CWD, + SF_WORKFLOW_MCP_COMMAND: process.env.SF_WORKFLOW_MCP_COMMAND, + SF_WORKFLOW_MCP_NAME: process.env.SF_WORKFLOW_MCP_NAME, + SF_WORKFLOW_MCP_ARGS: process.env.SF_WORKFLOW_MCP_ARGS, + SF_WORKFLOW_MCP_ENV: process.env.SF_WORKFLOW_MCP_ENV, + SF_WORKFLOW_MCP_CWD: process.env.SF_WORKFLOW_MCP_CWD, }; try { - delete process.env.GSD_WORKFLOW_MCP_COMMAND; - delete process.env.GSD_WORKFLOW_MCP_NAME; - delete process.env.GSD_WORKFLOW_MCP_ARGS; - delete process.env.GSD_WORKFLOW_MCP_ENV; - delete process.env.GSD_WORKFLOW_MCP_CWD; + delete process.env.SF_WORKFLOW_MCP_COMMAND; + delete process.env.SF_WORKFLOW_MCP_NAME; + delete process.env.SF_WORKFLOW_MCP_ARGS; + delete process.env.SF_WORKFLOW_MCP_ENV; + delete process.env.SF_WORKFLOW_MCP_CWD; const originalCwd = process.cwd(); const emptyDir = mkdtempSync(join(tmpdir(), "claude-mcp-none-")); @@ -566,32 +566,32 @@ describe("stream-adapter — session persistence (#2859)", () => { } rmSync(emptyDir, { recursive: true, force: true }); } finally { - process.env.GSD_WORKFLOW_MCP_COMMAND = prev.GSD_WORKFLOW_MCP_COMMAND; - process.env.GSD_WORKFLOW_MCP_NAME = prev.GSD_WORKFLOW_MCP_NAME; - process.env.GSD_WORKFLOW_MCP_ARGS = prev.GSD_WORKFLOW_MCP_ARGS; - process.env.GSD_WORKFLOW_MCP_ENV = prev.GSD_WORKFLOW_MCP_ENV; - process.env.GSD_WORKFLOW_MCP_CWD = prev.GSD_WORKFLOW_MCP_CWD; + process.env.SF_WORKFLOW_MCP_COMMAND = prev.SF_WORKFLOW_MCP_COMMAND; + process.env.SF_WORKFLOW_MCP_NAME = prev.SF_WORKFLOW_MCP_NAME; + process.env.SF_WORKFLOW_MCP_ARGS = prev.SF_WORKFLOW_MCP_ARGS; + process.env.SF_WORKFLOW_MCP_ENV = prev.SF_WORKFLOW_MCP_ENV; + process.env.SF_WORKFLOW_MCP_CWD = prev.SF_WORKFLOW_MCP_CWD; } }); test("buildSdkOptions auto-detects local workflow MCP dist CLI when present", () => { const prev = { - GSD_WORKFLOW_MCP_COMMAND: process.env.GSD_WORKFLOW_MCP_COMMAND, - GSD_WORKFLOW_MCP_NAME: process.env.GSD_WORKFLOW_MCP_NAME, - GSD_WORKFLOW_MCP_ARGS: process.env.GSD_WORKFLOW_MCP_ARGS, - GSD_WORKFLOW_MCP_ENV: process.env.GSD_WORKFLOW_MCP_ENV, - GSD_WORKFLOW_MCP_CWD: process.env.GSD_WORKFLOW_MCP_CWD, - GSD_CLI_PATH: process.env.GSD_CLI_PATH, + SF_WORKFLOW_MCP_COMMAND: process.env.SF_WORKFLOW_MCP_COMMAND, + SF_WORKFLOW_MCP_NAME: process.env.SF_WORKFLOW_MCP_NAME, + SF_WORKFLOW_MCP_ARGS: process.env.SF_WORKFLOW_MCP_ARGS, + SF_WORKFLOW_MCP_ENV: process.env.SF_WORKFLOW_MCP_ENV, + SF_WORKFLOW_MCP_CWD: process.env.SF_WORKFLOW_MCP_CWD, + SF_CLI_PATH: process.env.SF_CLI_PATH, }; const originalCwd = process.cwd(); const repoDir = mkdtempSync(join(tmpdir(), "claude-mcp-detect-")); try { - delete process.env.GSD_WORKFLOW_MCP_COMMAND; - delete process.env.GSD_WORKFLOW_MCP_NAME; - delete process.env.GSD_WORKFLOW_MCP_ARGS; - delete process.env.GSD_WORKFLOW_MCP_ENV; - delete process.env.GSD_WORKFLOW_MCP_CWD; - process.env.GSD_CLI_PATH = "/tmp/gsd"; + delete process.env.SF_WORKFLOW_MCP_COMMAND; + delete process.env.SF_WORKFLOW_MCP_NAME; + delete process.env.SF_WORKFLOW_MCP_ARGS; + delete process.env.SF_WORKFLOW_MCP_ENV; + delete process.env.SF_WORKFLOW_MCP_CWD; + process.env.SF_CLI_PATH = "/tmp/gsd"; const distDir = join(repoDir, "packages", "mcp-server", "dist"); mkdirSync(distDir, { recursive: true }); @@ -606,45 +606,45 @@ describe("stream-adapter — session persistence (#2859)", () => { assert.equal(srv.command, process.execPath); assert.deepEqual(srv.args, [realpathSync(resolve(repoDir, "packages", "mcp-server", "dist", "cli.js"))]); assert.equal(srv.cwd, resolvedRepoDir); - assert.equal(srv.env.GSD_CLI_PATH, "/tmp/gsd"); - assert.equal(srv.env.GSD_PERSIST_WRITE_GATE_STATE, "1"); - assert.equal(srv.env.GSD_WORKFLOW_PROJECT_ROOT, resolvedRepoDir); + assert.equal(srv.env.SF_CLI_PATH, "/tmp/gsd"); + assert.equal(srv.env.SF_PERSIST_WRITE_GATE_STATE, "1"); + assert.equal(srv.env.SF_WORKFLOW_PROJECT_ROOT, resolvedRepoDir); assert.deepEqual(options.disallowedTools, ["AskUserQuestion"]); } finally { process.chdir(originalCwd); rmSync(repoDir, { recursive: true, force: true }); - process.env.GSD_WORKFLOW_MCP_COMMAND = prev.GSD_WORKFLOW_MCP_COMMAND; - process.env.GSD_WORKFLOW_MCP_NAME = prev.GSD_WORKFLOW_MCP_NAME; - process.env.GSD_WORKFLOW_MCP_ARGS = prev.GSD_WORKFLOW_MCP_ARGS; - process.env.GSD_WORKFLOW_MCP_ENV = prev.GSD_WORKFLOW_MCP_ENV; - process.env.GSD_WORKFLOW_MCP_CWD = prev.GSD_WORKFLOW_MCP_CWD; - process.env.GSD_CLI_PATH = prev.GSD_CLI_PATH; + process.env.SF_WORKFLOW_MCP_COMMAND = prev.SF_WORKFLOW_MCP_COMMAND; + process.env.SF_WORKFLOW_MCP_NAME = prev.SF_WORKFLOW_MCP_NAME; + process.env.SF_WORKFLOW_MCP_ARGS = prev.SF_WORKFLOW_MCP_ARGS; + process.env.SF_WORKFLOW_MCP_ENV = prev.SF_WORKFLOW_MCP_ENV; + process.env.SF_WORKFLOW_MCP_CWD = prev.SF_WORKFLOW_MCP_CWD; + process.env.SF_CLI_PATH = prev.SF_CLI_PATH; } }); test("buildSdkOptions preserves runtime callbacks such as onElicitation", () => { const prev = { - GSD_WORKFLOW_MCP_COMMAND: process.env.GSD_WORKFLOW_MCP_COMMAND, - GSD_WORKFLOW_MCP_NAME: process.env.GSD_WORKFLOW_MCP_NAME, - GSD_WORKFLOW_MCP_ARGS: process.env.GSD_WORKFLOW_MCP_ARGS, - GSD_WORKFLOW_MCP_ENV: process.env.GSD_WORKFLOW_MCP_ENV, - GSD_WORKFLOW_MCP_CWD: process.env.GSD_WORKFLOW_MCP_CWD, + SF_WORKFLOW_MCP_COMMAND: process.env.SF_WORKFLOW_MCP_COMMAND, + SF_WORKFLOW_MCP_NAME: process.env.SF_WORKFLOW_MCP_NAME, + SF_WORKFLOW_MCP_ARGS: process.env.SF_WORKFLOW_MCP_ARGS, + SF_WORKFLOW_MCP_ENV: process.env.SF_WORKFLOW_MCP_ENV, + SF_WORKFLOW_MCP_CWD: process.env.SF_WORKFLOW_MCP_CWD, }; const onElicitation = async () => ({ action: "decline" as const }); try { - delete process.env.GSD_WORKFLOW_MCP_COMMAND; - delete process.env.GSD_WORKFLOW_MCP_NAME; - delete process.env.GSD_WORKFLOW_MCP_ARGS; - delete process.env.GSD_WORKFLOW_MCP_ENV; - delete process.env.GSD_WORKFLOW_MCP_CWD; + delete process.env.SF_WORKFLOW_MCP_COMMAND; + delete process.env.SF_WORKFLOW_MCP_NAME; + delete process.env.SF_WORKFLOW_MCP_ARGS; + delete process.env.SF_WORKFLOW_MCP_ENV; + delete process.env.SF_WORKFLOW_MCP_CWD; const options = buildSdkOptions("claude-sonnet-4-20250514", "test", undefined, { onElicitation }); assert.equal(options.onElicitation, onElicitation); } finally { - process.env.GSD_WORKFLOW_MCP_COMMAND = prev.GSD_WORKFLOW_MCP_COMMAND; - process.env.GSD_WORKFLOW_MCP_NAME = prev.GSD_WORKFLOW_MCP_NAME; - process.env.GSD_WORKFLOW_MCP_ARGS = prev.GSD_WORKFLOW_MCP_ARGS; - process.env.GSD_WORKFLOW_MCP_ENV = prev.GSD_WORKFLOW_MCP_ENV; - process.env.GSD_WORKFLOW_MCP_CWD = prev.GSD_WORKFLOW_MCP_CWD; + process.env.SF_WORKFLOW_MCP_COMMAND = prev.SF_WORKFLOW_MCP_COMMAND; + process.env.SF_WORKFLOW_MCP_NAME = prev.SF_WORKFLOW_MCP_NAME; + process.env.SF_WORKFLOW_MCP_ARGS = prev.SF_WORKFLOW_MCP_ARGS; + process.env.SF_WORKFLOW_MCP_ENV = prev.SF_WORKFLOW_MCP_ENV; + process.env.SF_WORKFLOW_MCP_CWD = prev.SF_WORKFLOW_MCP_CWD; } }); }); @@ -978,18 +978,18 @@ describe("stream-adapter — final-turn tool-call merge (F3)", () => { // --------------------------------------------------------------------------- describe("stream-adapter — permission mode (F10)", () => { - // Earlier tests in this file set GSD_WORKFLOW_MCP_* env vars and restore + // Earlier tests in this file set SF_WORKFLOW_MCP_* env vars and restore // them by reassigning from `prev.*`. When `prev.*` was undefined, node // coerces the assignment to the literal string "undefined", which then // fails JSON.parse inside buildWorkflowMcpServers. Clear the relevant // slots before each permission-mode test so buildSdkOptions doesn't throw. function clearWorkflowMcpEnv(): void { for (const key of [ - "GSD_WORKFLOW_MCP_COMMAND", - "GSD_WORKFLOW_MCP_NAME", - "GSD_WORKFLOW_MCP_ARGS", - "GSD_WORKFLOW_MCP_ENV", - "GSD_WORKFLOW_MCP_CWD", + "SF_WORKFLOW_MCP_COMMAND", + "SF_WORKFLOW_MCP_NAME", + "SF_WORKFLOW_MCP_ARGS", + "SF_WORKFLOW_MCP_ENV", + "SF_WORKFLOW_MCP_CWD", ]) { if (process.env[key] === undefined || process.env[key] === "undefined") { delete process.env[key]; @@ -1015,14 +1015,14 @@ describe("stream-adapter — permission mode (F10)", () => { ); }); - test("resolveClaudePermissionMode honours the GSD_CLAUDE_CODE_PERMISSION_MODE env override", async () => { - const env = { GSD_CLAUDE_CODE_PERMISSION_MODE: "acceptEdits" } as NodeJS.ProcessEnv; + test("resolveClaudePermissionMode honours the SF_CLAUDE_CODE_PERMISSION_MODE env override", async () => { + const env = { SF_CLAUDE_CODE_PERMISSION_MODE: "acceptEdits" } as NodeJS.ProcessEnv; const mode = await resolveClaudePermissionMode(env); assert.equal(mode, "acceptEdits"); }); test("resolveClaudePermissionMode rejects unknown override values (fallback path)", async () => { - const env = { GSD_CLAUDE_CODE_PERMISSION_MODE: "nonsense" } as NodeJS.ProcessEnv; + const env = { SF_CLAUDE_CODE_PERMISSION_MODE: "nonsense" } as NodeJS.ProcessEnv; const mode = await resolveClaudePermissionMode(env); // Unknown override falls back to auto-detect → either bypass or acceptEdits assert.ok( diff --git a/src/resources/extensions/github-sync/index.ts b/src/resources/extensions/github-sync/index.ts index f82b07a83..e389848f2 100644 --- a/src/resources/extensions/github-sync/index.ts +++ b/src/resources/extensions/github-sync/index.ts @@ -1,7 +1,7 @@ /** - * GitHub Sync extension for GSD. + * GitHub Sync extension for SF. * - * Opt-in extension that syncs GSD lifecycle events to GitHub: + * Opt-in extension that syncs SF lifecycle events to GitHub: * milestones → GH Milestones + tracking issues, slices → draft PRs, * tasks → sub-issues with auto-close on commit. * diff --git a/src/resources/extensions/github-sync/mapping.ts b/src/resources/extensions/github-sync/mapping.ts index f63befec8..594785f87 100644 --- a/src/resources/extensions/github-sync/mapping.ts +++ b/src/resources/extensions/github-sync/mapping.ts @@ -1,7 +1,7 @@ /** * Persistence layer for the GitHub sync mapping. * - * The mapping lives at `.gsd/github-sync.json` and tracks which GSD + * The mapping lives at `.gsd/github-sync.json` and tracks which SF * entities have been synced to which GitHub entities (issues, PRs, * milestones) along with their numbers and sync timestamps. */ diff --git a/src/resources/extensions/github-sync/sync.ts b/src/resources/extensions/github-sync/sync.ts index fb1939f70..ecf676215 100644 --- a/src/resources/extensions/github-sync/sync.ts +++ b/src/resources/extensions/github-sync/sync.ts @@ -1,8 +1,8 @@ /** * Core GitHub sync engine. * - * Entry point: `runGitHubSync()` — called from the GSD post-unit pipeline. - * Routes to per-event sync functions based on the unit type, reads GSD + * Entry point: `runGitHubSync()` — called from the SF post-unit pipeline. + * Routes to per-event sync functions based on the unit type, reads SF * files to build GitHub entities, and persists the sync mapping. * * All errors are caught internally — sync failures never block execution. @@ -58,7 +58,7 @@ import { // ─── Entry Point ──────────────────────────────────────────────────────────── /** - * Main sync entry point — called from GSD post-unit pipeline. + * Main sync entry point — called from SF post-unit pipeline. * Routes to the appropriate sync function based on unit type. */ export async function runGitHubSync( diff --git a/src/resources/extensions/github-sync/templates.ts b/src/resources/extensions/github-sync/templates.ts index d6398716a..dea4524ef 100644 --- a/src/resources/extensions/github-sync/templates.ts +++ b/src/resources/extensions/github-sync/templates.ts @@ -48,7 +48,7 @@ export function formatMilestoneIssueBody(data: MilestoneData): string { } lines.push("---"); - lines.push("*Auto-generated by GSD GitHub Sync*"); + lines.push("*Auto-generated by SF GitHub Sync*"); return lines.join("\n"); } @@ -100,7 +100,7 @@ export function formatSlicePRBody(data: SliceData): string { } lines.push("---"); - lines.push("*Auto-generated by GSD GitHub Sync*"); + lines.push("*Auto-generated by SF GitHub Sync*"); return lines.join("\n"); } diff --git a/src/resources/extensions/github-sync/tests/commit-linking.test.ts b/src/resources/extensions/github-sync/tests/commit-linking.test.ts index d1d85eab3..14401d1ae 100644 --- a/src/resources/extensions/github-sync/tests/commit-linking.test.ts +++ b/src/resources/extensions/github-sync/tests/commit-linking.test.ts @@ -11,7 +11,7 @@ describe("commit linking", () => { }); assert.ok(msg.includes("Resolves #43"), "should include Resolves trailer"); assert.ok(msg.startsWith("feat:"), "subject line has no scope"); - assert.ok(msg.includes("GSD-Task: S01/T02"), "GSD-Task trailer present"); + assert.ok(msg.includes("SF-Task: S01/T02"), "SF-Task trailer present"); }); it("includes both key files and Resolves #N", () => { @@ -23,13 +23,13 @@ describe("commit linking", () => { }); assert.ok(msg.includes("- src/auth.ts"), "key files present"); assert.ok(msg.includes("Resolves #43"), "Resolves trailer present"); - assert.ok(msg.includes("GSD-Task: S01/T02"), "GSD-Task trailer present"); - // GSD-Task should come after key files but before Resolves + assert.ok(msg.includes("SF-Task: S01/T02"), "SF-Task trailer present"); + // SF-Task should come after key files but before Resolves const keyFilesIdx = msg.indexOf("- src/auth.ts"); - const taskIdx = msg.indexOf("GSD-Task: S01/T02"); + const taskIdx = msg.indexOf("SF-Task: S01/T02"); const resolvesIdx = msg.indexOf("Resolves #43"); - assert.ok(taskIdx > keyFilesIdx, "GSD-Task after key files"); - assert.ok(resolvesIdx > taskIdx, "Resolves after GSD-Task"); + assert.ok(taskIdx > keyFilesIdx, "SF-Task after key files"); + assert.ok(resolvesIdx > taskIdx, "Resolves after SF-Task"); }); it("no Resolves trailer when issueNumber is not set", () => { @@ -38,6 +38,6 @@ describe("commit linking", () => { taskTitle: "implement auth", }); assert.ok(!msg.includes("Resolves"), "no Resolves when no issueNumber"); - assert.ok(msg.includes("GSD-Task: S01/T02"), "GSD-Task trailer still present"); + assert.ok(msg.includes("SF-Task: S01/T02"), "SF-Task trailer still present"); }); }); diff --git a/src/resources/extensions/github-sync/types.ts b/src/resources/extensions/github-sync/types.ts index a4d8882e6..fe541daa1 100644 --- a/src/resources/extensions/github-sync/types.ts +++ b/src/resources/extensions/github-sync/types.ts @@ -1,7 +1,7 @@ /** * Type definitions for the GitHub Sync extension. * - * Config shape (stored in GSD preferences under `github` key) and + * Config shape (stored in SF preferences under `github` key) and * sync mapping records (stored in `.gsd/github-sync.json`). */ diff --git a/src/resources/extensions/gsd/activity-log.ts b/src/resources/extensions/gsd/activity-log.ts index 889b92758..d0f08a436 100644 --- a/src/resources/extensions/gsd/activity-log.ts +++ b/src/resources/extensions/gsd/activity-log.ts @@ -1,5 +1,5 @@ /** - * GSD Activity Log — Save raw chat sessions to .gsd/activity/ + * SF Activity Log — Save raw chat sessions to .gsd/activity/ * * Before each context wipe in auto-mode, dumps the full session * as JSONL. No formatting, no truncation, no information loss. @@ -11,7 +11,7 @@ import { writeFileSync, writeSync, mkdirSync, readdirSync, unlinkSync, statSync, openSync, closeSync, constants } from "node:fs"; import { createHash } from "node:crypto"; import { join } from "node:path"; -import { GSDError, GSD_IO_ERROR } from "./errors.js"; +import { GSDError, SF_IO_ERROR } from "./errors.js"; const SEQ_PREFIX_RE = /^(\d+)-/; import type { ExtensionContext } from "@sf-run/pi-coding-agent"; @@ -98,7 +98,7 @@ function nextActivityFilePath( } } // Fallback: should never reach here in practice - throw new GSDError(GSD_IO_ERROR, `Failed to find available activity log sequence in ${activityDir}`); + throw new GSDError(SF_IO_ERROR, `Failed to find available activity log sequence in ${activityDir}`); } export function saveActivityLog( diff --git a/src/resources/extensions/gsd/auto-artifact-paths.ts b/src/resources/extensions/gsd/auto-artifact-paths.ts index 6e54f5b07..bfc61940f 100644 --- a/src/resources/extensions/gsd/auto-artifact-paths.ts +++ b/src/resources/extensions/gsd/auto-artifact-paths.ts @@ -1,4 +1,4 @@ -// GSD Auto-mode — Artifact Path Resolution +// SF Auto-mode — Artifact Path Resolution // // resolveExpectedArtifactPath and diagnoseExpectedArtifact moved here from // auto-recovery.ts (Phase 5 dead-code cleanup). The artifact verification diff --git a/src/resources/extensions/gsd/auto-dashboard.ts b/src/resources/extensions/gsd/auto-dashboard.ts index 2c5c81f82..c60fc22d0 100644 --- a/src/resources/extensions/gsd/auto-dashboard.ts +++ b/src/resources/extensions/gsd/auto-dashboard.ts @@ -651,7 +651,7 @@ export function updateProgressWidget( : "x"; const healthStr = ` ${theme.fg(healthColor, healthIcon)} ${theme.fg(healthColor, score.summary)}`; - const headerLeft = `${pad}${dot} ${theme.fg("accent", theme.bold("GSD"))} ${theme.fg("success", modeTag)}${healthStr}`; + const headerLeft = `${pad}${dot} ${theme.fg("accent", theme.bold("SF"))} ${theme.fg("success", modeTag)}${healthStr}`; // ETA in header right, after elapsed const eta = estimateTimeRemaining(); diff --git a/src/resources/extensions/gsd/auto-dispatch.ts b/src/resources/extensions/gsd/auto-dispatch.ts index 0f5d727d5..bcc86a8a0 100644 --- a/src/resources/extensions/gsd/auto-dispatch.ts +++ b/src/resources/extensions/gsd/auto-dispatch.ts @@ -1,7 +1,7 @@ /** * Auto-mode Dispatch Table — declarative phase → unit mapping. * - * Each rule maps a GSD state to the unit type, unit ID, and prompt builder + * Each rule maps a SF state to the unit type, unit ID, and prompt builder * that should be dispatched. Rules are evaluated in order; the first match wins. * * This replaces the 130-line if-else chain in dispatchNextUnit with a @@ -265,7 +265,7 @@ export const DISPATCH_RULES: DispatchRule[] = [ uatContent ?? "", basePath, ), - pauseAfterDispatch: !process.env.GSD_HEADLESS && uatType !== "artifact-driven" && uatType !== "browser-executable" && uatType !== "runtime-executable", + pauseAfterDispatch: !process.env.SF_HEADLESS && uatType !== "artifact-driven" && uatType !== "browser-executable" && uatType !== "runtime-executable", }; }, }, diff --git a/src/resources/extensions/gsd/auto-post-unit.ts b/src/resources/extensions/gsd/auto-post-unit.ts index 698dc524e..aa18fe0fe 100644 --- a/src/resources/extensions/gsd/auto-post-unit.ts +++ b/src/resources/extensions/gsd/auto-post-unit.ts @@ -339,7 +339,7 @@ export async function postUnitPreVerification(pctx: PostUnitContext, opts?: PreV const { s, ctx, pi, buildSnapshotOpts, stopAuto, pauseAuto } = pctx; // ── Parallel worker signal check ── - const milestoneLock = process.env.GSD_MILESTONE_LOCK; + const milestoneLock = process.env.SF_MILESTONE_LOCK; if (milestoneLock) { const signal = consumeSignal(s.basePath, milestoneLock); if (signal) { diff --git a/src/resources/extensions/gsd/auto-prompts.ts b/src/resources/extensions/gsd/auto-prompts.ts index b64bf0604..51e222d8d 100644 --- a/src/resources/extensions/gsd/auto-prompts.ts +++ b/src/resources/extensions/gsd/auto-prompts.ts @@ -1571,7 +1571,7 @@ export async function buildCompleteMilestonePrompt( inlined.push(await inlineFile(summaryPath, summaryRel, `${sid} Summary`)); } - // Inline root GSD files (skip for minimal — completion can read these if needed) + // Inline root SF files (skip for minimal — completion can read these if needed) if (inlineLevel !== "minimal") { const requirementsInline = await inlineRequirementsFromDb(base, mid, undefined, inlineLevel); if (requirementsInline) inlined.push(requirementsInline); @@ -1582,7 +1582,7 @@ export async function buildCompleteMilestonePrompt( } const knowledgeInlineCM = await inlineGsdRootFile(base, "knowledge.md", "Project Knowledge"); if (knowledgeInlineCM) inlined.push(knowledgeInlineCM); - // Inline milestone context file (milestone-level, not GSD root) + // Inline milestone context file (milestone-level, not SF root) const contextPath = resolveMilestoneFile(base, mid, "CONTEXT"); const contextRel = relMilestoneFile(base, mid, "CONTEXT"); const contextInline = await inlineFileOptional(contextPath, contextRel, "Milestone Context"); @@ -1698,7 +1698,7 @@ export async function buildValidateMilestonePrompt( inlined.push(`### Previous Validation (re-validation round ${remediationRound})\nSource: \`${validationRel}\`\n\n${validationContent.trim()}`); } - // Inline root GSD files + // Inline root SF files if (inlineLevel !== "minimal") { const requirementsInline = await inlineRequirementsFromDb(base, mid, undefined, inlineLevel); if (requirementsInline) inlined.push(requirementsInline); diff --git a/src/resources/extensions/gsd/auto-start.ts b/src/resources/extensions/gsd/auto-start.ts index 4ec3b3932..14cf06ebc 100644 --- a/src/resources/extensions/gsd/auto-start.ts +++ b/src/resources/extensions/gsd/auto-start.ts @@ -274,7 +274,7 @@ export async function bootstrapAutoSession( // // Precedence: // 1) Explicit session override via /gsd model (this session) - // 2) GSD model preferences from PREFERENCES.md (validated against live auth) + // 2) SF model preferences from PREFERENCES.md (validated against live auth) // 3) Current session model from settings/session restore (if provider ready) // // This preserves #3517 defaults while honoring explicit runtime model @@ -322,11 +322,11 @@ export async function bootstrapAutoSession( : null); try { - // Validate GSD_PROJECT_ID early so the user gets immediate feedback - const customProjectId = process.env.GSD_PROJECT_ID; + // Validate SF_PROJECT_ID early so the user gets immediate feedback + const customProjectId = process.env.SF_PROJECT_ID; if (customProjectId && !validateProjectId(customProjectId)) { ctx.ui.notify( - `GSD_PROJECT_ID must contain only alphanumeric characters, hyphens, and underscores. Got: "${customProjectId}"`, + `SF_PROJECT_ID must contain only alphanumeric characters, hyphens, and underscores. Got: "${customProjectId}"`, "error", ); return releaseLockAndReturn(); @@ -392,7 +392,7 @@ export async function bootstrapAutoSession( ); // ── Debug mode ── - if (!isDebugEnabled() && process.env.GSD_DEBUG === "1") { + if (!isDebugEnabled() && process.env.SF_DEBUG === "1") { enableDebug(base); } if (isDebugEnabled()) { @@ -782,11 +782,11 @@ export async function bootstrapAutoSession( s.manualSessionModelOverride = manualSessionOverride ?? null; // Apply worker model override from parallel orchestrator (#worker-model). - // GSD_WORKER_MODEL is injected by the coordinator when parallel.worker_model + // SF_WORKER_MODEL is injected by the coordinator when parallel.worker_model // is configured, so parallel milestone workers use a cheaper model than the // coordinator session (e.g. Haiku for execution, Sonnet for planning). - const workerModelOverride = process.env.GSD_WORKER_MODEL; - if (workerModelOverride && process.env.GSD_PARALLEL_WORKER === "1") { + const workerModelOverride = process.env.SF_WORKER_MODEL; + if (workerModelOverride && process.env.SF_PARALLEL_WORKER === "1") { const availableModels = ctx.modelRegistry.getAvailable(); const { resolveModelId } = await import("./auto-model-selection.js"); const overrideModel = resolveModelId(workerModelOverride, availableModels, ctx.model?.provider); diff --git a/src/resources/extensions/gsd/auto-worktree.ts b/src/resources/extensions/gsd/auto-worktree.ts index 2f6ad4036..4b80bc88b 100644 --- a/src/resources/extensions/gsd/auto-worktree.ts +++ b/src/resources/extensions/gsd/auto-worktree.ts @@ -1,5 +1,5 @@ /** - * GSD Auto-Worktree -- lifecycle management for auto-mode worktrees. + * SF Auto-Worktree -- lifecycle management for auto-mode worktrees. * * Auto-mode creates worktrees with `milestone/<MID>` branches (distinct from * manual `/worktree` which uses `worktree/<name>` branches). This module @@ -20,7 +20,7 @@ import { } from "node:fs"; import { isAbsolute, join, sep as pathSep } from "node:path"; import { homedir } from "node:os"; -import { GSDError, GSD_IO_ERROR, GSD_GIT_ERROR } from "./errors.js"; +import { GSDError, SF_IO_ERROR, SF_GIT_ERROR } from "./errors.js"; import { reconcileWorktreeDb, isDbAvailable, @@ -67,7 +67,7 @@ import { nativeMergeAbort, } from "./native-git-bridge.js"; -const gsdHome = process.env.GSD_HOME || join(homedir(), ".gsd"); +const gsdHome = process.env.SF_HOME || join(homedir(), ".gsd"); const PROJECT_PREFERENCES_FILE = "PREFERENCES.md"; const LEGACY_PROJECT_PREFERENCES_FILE = "preferences.md"; @@ -408,7 +408,7 @@ export function syncStateToProjectRoot( */ export function readResourceVersion(): string | null { const agentDir = - process.env.GSD_CODING_AGENT_DIR || join(gsdHome, "agent"); + process.env.SF_CODING_AGENT_DIR || join(gsdHome, "agent"); const manifestPath = join(agentDir, "managed-resources.json"); try { const manifest = JSON.parse(readFileSync(manifestPath, "utf-8")); @@ -432,7 +432,7 @@ export function checkResourcesStale( const current = readResourceVersion(); if (current === null) return null; if (current !== versionOnStart) { - return "GSD resources were updated since this session started. Restart gsd to load the new code."; + return "SF resources were updated since this session started. Restart gsd to load the new code."; } return null; } @@ -1117,7 +1117,7 @@ export function createAutoWorktree( // If chdir fails, the worktree was created but we couldn't enter it. // Don't store originalBase -- caller can retry or clean up. throw new GSDError( - GSD_IO_ERROR, + SF_IO_ERROR, `Auto-worktree created at ${info.path} but chdir failed: ${err instanceof Error ? err.message : String(err)}`, ); } @@ -1199,7 +1199,7 @@ export function teardownAutoWorktree( originalBase = null; } catch (err) { throw new GSDError( - GSD_IO_ERROR, + SF_IO_ERROR, `Failed to chdir back to ${originalBasePath} during teardown: ${err instanceof Error ? err.message : String(err)}`, ); } @@ -1233,7 +1233,7 @@ export function teardownAutoWorktree( } } else { console.error( - `[GSD] REFUSING fallback rmSync — path is outside .gsd/worktrees/: ${wtDir}`, + `[SF] REFUSING fallback rmSync — path is outside .gsd/worktrees/: ${wtDir}`, ); } } @@ -1296,7 +1296,7 @@ export function enterAutoWorktree( const p = worktreePath(basePath, milestoneId); if (!existsSync(p)) { throw new GSDError( - GSD_IO_ERROR, + SF_IO_ERROR, `Auto-worktree for ${milestoneId} does not exist at ${p}`, ); } @@ -1305,7 +1305,7 @@ export function enterAutoWorktree( const gitPath = join(p, ".git"); if (!existsSync(gitPath)) { throw new GSDError( - GSD_GIT_ERROR, + SF_GIT_ERROR, `Auto-worktree path ${p} exists but is not a git worktree (no .git)`, ); } @@ -1313,14 +1313,14 @@ export function enterAutoWorktree( const content = readFileSync(gitPath, "utf8").trim(); if (!content.startsWith("gitdir: ")) { throw new GSDError( - GSD_GIT_ERROR, + SF_GIT_ERROR, `Auto-worktree path ${p} has a .git but it is not a worktree gitdir pointer`, ); } } catch (err) { if (err instanceof Error && err.message.includes("worktree")) throw err; throw new GSDError( - GSD_IO_ERROR, + SF_IO_ERROR, `Auto-worktree path ${p} exists but .git is unreadable`, ); } @@ -1332,7 +1332,7 @@ export function enterAutoWorktree( originalBase = basePath; } catch (err) { throw new GSDError( - GSD_IO_ERROR, + SF_IO_ERROR, `Failed to enter auto-worktree at ${p}: ${err instanceof Error ? err.message : String(err)}`, ); } @@ -1572,7 +1572,7 @@ export function mergeMilestoneToMain( // Diverged — fail loudly rather than silently losing commits process.chdir(previousCwd); throw new GSDError( - GSD_GIT_ERROR, + SF_GIT_ERROR, `Worktree HEAD (${worktreeHead.slice(0, 8)}) diverged from ` + `${milestoneBranch} (${branchHead.slice(0, 8)}). ` + `Manual reconciliation required before merge.`, @@ -1734,7 +1734,7 @@ export function mergeMilestoneToMain( ? `Dirty files:\n${mergeResult.dirtyFiles.map((f) => ` ${f}`).join("\n")}` : `Check \`git status\` in the project root for details.`; throw new GSDError( - GSD_GIT_ERROR, + SF_GIT_ERROR, `Squash merge of ${milestoneBranch} rejected: working tree has dirty or untracked files ` + `that conflict with the merge. ${fileList}`, ); @@ -1747,8 +1747,8 @@ export function mergeMilestoneToMain( : nativeConflictFiles(originalBasePath_); if (conflictedFiles.length > 0) { - // Separate auto-resolvable conflicts (GSD state files + build artifacts) - // from real code conflicts. GSD state files diverge between branches + // Separate auto-resolvable conflicts (SF state files + build artifacts) + // from real code conflicts. SF state files diverge between branches // during normal operation. Build artifacts are machine-generated and // regenerable. Both are safe to accept from the milestone branch. const autoResolvable = conflictedFiles.filter(isSafeToAutoResolve); @@ -1919,7 +1919,7 @@ export function mergeMilestoneToMain( // Milestone has unanchored code changes — abort teardown. process.chdir(previousCwd); throw new GSDError( - GSD_GIT_ERROR, + SF_GIT_ERROR, `Squash merge produced nothing to commit but milestone branch "${milestoneBranch}" ` + `has ${codeChanges.length} code file(s) not on "${mainBranch}". ` + `Aborting worktree teardown to prevent data loss.`, @@ -1984,7 +1984,7 @@ export function mergeMilestoneToMain( "--base", prTarget, "--head", milestoneBranch, "--title", `Milestone ${milestoneId} complete`, - "--body", "Auto-created by GSD on milestone completion.", + "--body", "Auto-created by SF on milestone completion.", ], { cwd: originalBasePath_, stdio: ["ignore", "pipe", "pipe"], diff --git a/src/resources/extensions/gsd/auto.ts b/src/resources/extensions/gsd/auto.ts index 2aad24e86..29bcd456f 100644 --- a/src/resources/extensions/gsd/auto.ts +++ b/src/resources/extensions/gsd/auto.ts @@ -1,5 +1,5 @@ /** - * GSD Auto Mode — Fresh Session Per Unit + * SF Auto Mode — Fresh Session Per Unit * * State machine driven by .gsd/ files on disk. Each "unit" of work * (plan slice, execute task, complete slice) gets a fresh session via @@ -258,20 +258,20 @@ const STATE_REBUILD_MIN_INTERVAL_MS = 30_000; function captureProjectRootEnv(projectRoot: string): void { if (!s.projectRootEnvCaptured) { - s.hadProjectRootEnv = Object.prototype.hasOwnProperty.call(process.env, "GSD_PROJECT_ROOT"); - s.previousProjectRootEnv = process.env.GSD_PROJECT_ROOT ?? null; + s.hadProjectRootEnv = Object.prototype.hasOwnProperty.call(process.env, "SF_PROJECT_ROOT"); + s.previousProjectRootEnv = process.env.SF_PROJECT_ROOT ?? null; s.projectRootEnvCaptured = true; } - process.env.GSD_PROJECT_ROOT = projectRoot; + process.env.SF_PROJECT_ROOT = projectRoot; } function restoreProjectRootEnv(): void { if (!s.projectRootEnvCaptured) return; if (s.hadProjectRootEnv && s.previousProjectRootEnv !== null) { - process.env.GSD_PROJECT_ROOT = s.previousProjectRootEnv; + process.env.SF_PROJECT_ROOT = s.previousProjectRootEnv; } else { - delete process.env.GSD_PROJECT_ROOT; + delete process.env.SF_PROJECT_ROOT; } s.previousProjectRootEnv = null; @@ -281,15 +281,15 @@ function restoreProjectRootEnv(): void { function captureMilestoneLockEnv(milestoneId: string | null): void { if (!s.milestoneLockEnvCaptured) { - s.hadMilestoneLockEnv = Object.prototype.hasOwnProperty.call(process.env, "GSD_MILESTONE_LOCK"); - s.previousMilestoneLockEnv = process.env.GSD_MILESTONE_LOCK ?? null; + s.hadMilestoneLockEnv = Object.prototype.hasOwnProperty.call(process.env, "SF_MILESTONE_LOCK"); + s.previousMilestoneLockEnv = process.env.SF_MILESTONE_LOCK ?? null; s.milestoneLockEnvCaptured = true; } if (milestoneId) { - process.env.GSD_MILESTONE_LOCK = milestoneId; + process.env.SF_MILESTONE_LOCK = milestoneId; } else { - delete process.env.GSD_MILESTONE_LOCK; + delete process.env.SF_MILESTONE_LOCK; } } @@ -297,9 +297,9 @@ function restoreMilestoneLockEnv(): void { if (!s.milestoneLockEnvCaptured) return; if (s.hadMilestoneLockEnv && s.previousMilestoneLockEnv !== null) { - process.env.GSD_MILESTONE_LOCK = s.previousMilestoneLockEnv; + process.env.SF_MILESTONE_LOCK = s.previousMilestoneLockEnv; } else { - delete process.env.GSD_MILESTONE_LOCK; + delete process.env.SF_MILESTONE_LOCK; } s.previousMilestoneLockEnv = null; @@ -349,7 +349,7 @@ export function shouldUseWorktreeIsolation(): boolean { /** * Model captured at auto-mode start. Used to prevent model bleed between - * concurrent GSD instances sharing the same global settings.json (#650). + * concurrent SF instances sharing the same global settings.json (#650). * When preferences don't specify a model for a unit type, this ensures * the session's original model is re-applied instead of reading from * the shared global settings (which another instance may have overwritten). @@ -477,7 +477,7 @@ export function markToolEnd(toolCallId: string): void { /** * Record a tool invocation error on the current session (#2883). - * Called from tool_execution_end when a GSD tool fails with isError. + * Called from tool_execution_end when a SF tool fails with isError. * Only stores the error if it matches the tool-invocation-error pattern * (malformed/truncated JSON), not normal business-logic errors. */ @@ -658,8 +658,8 @@ function handleLostSessionLock( const message = lockStatus?.failureReason === "pid-mismatch" ? lockStatus.existingPid - ? `Session lock (${lockFilePath}) moved to PID ${lockStatus.existingPid} — another GSD process appears to have taken over. Stopping gracefully.${recoverySuggestion}` - : `Session lock (${lockFilePath}) moved to a different process — another GSD process appears to have taken over. Stopping gracefully.${recoverySuggestion}` + ? `Session lock (${lockFilePath}) moved to PID ${lockStatus.existingPid} — another SF process appears to have taken over. Stopping gracefully.${recoverySuggestion}` + : `Session lock (${lockFilePath}) moved to a different process — another SF process appears to have taken over. Stopping gracefully.${recoverySuggestion}` : lockStatus?.failureReason === "missing-metadata" ? `Session lock metadata (${lockFilePath}) disappeared, so ownership could not be confirmed. Stopping gracefully.${recoverySuggestion}` : lockStatus?.failureReason === "compromised" @@ -1463,13 +1463,13 @@ export async function startAuto( restoreHookState(s.basePath); // Re-sync managed resources on resume so long-lived auto sessions pick up // bundled extension updates before resume-time verification/state logic runs. - // GSD_PKG_ROOT is set by loader.ts and points to the gsd-pi package root. + // SF_PKG_ROOT is set by loader.ts and points to the sf-run package root. // The relative import ("../../../resource-loader.js") only works from the source // tree; deployed extensions live at ~/.gsd/agent/extensions/gsd/ where the // relative path resolves to ~/.gsd/agent/resource-loader.js which doesn't exist. - // Using GSD_PKG_ROOT constructs a correct absolute path in both contexts (#3949). - const agentDir = process.env.GSD_CODING_AGENT_DIR || join(process.env.GSD_HOME || homedir(), ".gsd", "agent"); - const pkgRoot = process.env.GSD_PKG_ROOT; + // Using SF_PKG_ROOT constructs a correct absolute path in both contexts (#3949). + const agentDir = process.env.SF_CODING_AGENT_DIR || join(process.env.SF_HOME || homedir(), ".gsd", "agent"); + const pkgRoot = process.env.SF_PKG_ROOT; const resourceLoaderPath = pkgRoot ? pathToFileURL(join(pkgRoot, "dist", "resource-loader.js")).href : new URL("../../../resource-loader.js", import.meta.url).href; diff --git a/src/resources/extensions/gsd/auto/loop.ts b/src/resources/extensions/gsd/auto/loop.ts index cb5d012a0..713b66718 100644 --- a/src/resources/extensions/gsd/auto/loop.ts +++ b/src/resources/extensions/gsd/auto/loop.ts @@ -263,9 +263,9 @@ export async function autoLoop( // GRAPH.yaml. Shares runGuards and runUnitPhase with the dev path. // After unit execution, verifies then reconciles via the engine layer. // - // GSD_ENGINE_BYPASS=1 skips the engine layer entirely — falls through + // SF_ENGINE_BYPASS=1 skips the engine layer entirely — falls through // to the dev path below. - if (s.activeEngineId != null && s.activeEngineId !== "dev" && !sidecarItem && process.env.GSD_ENGINE_BYPASS !== "1") { + if (s.activeEngineId != null && s.activeEngineId !== "dev" && !sidecarItem && process.env.SF_ENGINE_BYPASS !== "1") { debugLog("autoLoop", { phase: "custom-engine-derive", iteration, engineId: s.activeEngineId }); const { engine, policy } = resolveEngine({ diff --git a/src/resources/extensions/gsd/auto/phases.ts b/src/resources/extensions/gsd/auto/phases.ts index 5dafb1293..39fc2fc1c 100644 --- a/src/resources/extensions/gsd/auto/phases.ts +++ b/src/resources/extensions/gsd/auto/phases.ts @@ -180,7 +180,7 @@ async function generateMilestoneReport( (m: { id: string }) => m.id === milestoneId, ); const msTitle = completedMs?.title ?? milestoneId; - const gsdVersion = process.env.GSD_VERSION ?? "0.0.0"; + const gsdVersion = process.env.SF_VERSION ?? "0.0.0"; const projName = basename(reportBasePath); const doneSlices = snapData.milestones.reduce( (acc: number, m: { slices: { done: boolean }[] }) => @@ -448,7 +448,7 @@ export async function runPreDispatch( if ( prefs?.slice_parallel?.enabled && mid && - !process.env.GSD_PARALLEL_WORKER && + !process.env.SF_PARALLEL_WORKER && isDbAvailable() ) { try { @@ -509,7 +509,7 @@ export async function runPreDispatch( "info", ); deps.sendDesktopNotification( - "GSD", + "SF", `Milestone ${s.currentMilestoneId} complete!`, "success", "milestone", @@ -668,7 +668,7 @@ export async function runPreDispatch( // PR creation (auto_pr) is handled inside mergeMilestoneToMain (#2302) } deps.sendDesktopNotification( - "GSD", + "SF", "All milestones complete!", "success", "milestone", @@ -699,7 +699,7 @@ export async function runPreDispatch( // were temporarily unresolvable (e.g. after reassessment added new slices). await deps.pauseAuto(ctx, pi); ctx.ui.notify(`${blockerMsg}. Fix and run /gsd auto to resume.`, "warning"); - deps.sendDesktopNotification("GSD", blockerMsg, "warning", "attention", basename(s.originalBasePath || s.basePath)); + deps.sendDesktopNotification("SF", blockerMsg, "warning", "attention", basename(s.originalBasePath || s.basePath)); deps.logCmuxEvent(prefs, blockerMsg, "warning"); } else { const ids = incomplete.map((m: { id: string }) => m.id).join(", "); @@ -782,7 +782,7 @@ export async function runPreDispatch( // PR creation (auto_pr) is handled inside mergeMilestoneToMain (#2302) } deps.sendDesktopNotification( - "GSD", + "SF", `Milestone ${mid} complete!`, "success", "milestone", @@ -814,7 +814,7 @@ export async function runPreDispatch( } await deps.pauseAuto(ctx, pi); ctx.ui.notify(`${blockerMsg}. Fix and run /gsd auto to resume.`, "warning"); - deps.sendDesktopNotification("GSD", blockerMsg, "warning", "attention", basename(s.originalBasePath || s.basePath)); + deps.sendDesktopNotification("SF", blockerMsg, "warning", "attention", basename(s.originalBasePath || s.basePath)); deps.logCmuxEvent(prefs, blockerMsg, "warning"); debugLog("autoLoop", { phase: "exit", reason: "blocked" }); deps.emitJournalEvent({ ts: new Date().toISOString(), flowId: ic.flowId, seq: ic.nextSeq(), eventType: "terminal", data: { reason: "blocked", blockers: state.blockers } }); @@ -1039,7 +1039,7 @@ export async function runGuards( ctx.ui.notify(label, "warning"); deps.sendDesktopNotification( - "GSD", label, "warning", "stop-directive", + "SF", label, "warning", "stop-directive", basename(s.originalBasePath || s.basePath), ); @@ -1078,7 +1078,7 @@ export async function runGuards( // In parallel worker mode, only count cost from the current auto-mode session // to avoid hitting the ceiling due to historical project-wide spend (#2184). let costUnits = currentLedger?.units; - if (process.env.GSD_PARALLEL_WORKER && s.autoStartTime && Array.isArray(costUnits)) { + if (process.env.SF_PARALLEL_WORKER && s.autoStartTime && Array.isArray(costUnits)) { const sessionStartISO = new Date(s.autoStartTime).toISOString(); costUnits = costUnits.filter( (u: { startedAt?: string }) => u.startedAt != null && u.startedAt >= sessionStartISO, @@ -1111,7 +1111,7 @@ export async function runGuards( // 100% — special enforcement logic (halt/pause/warn) const msg = `Budget ceiling ${deps.formatCost(budgetCeiling)} reached (spent ${deps.formatCost(totalCost)}).`; if (budgetEnforcementAction === "halt") { - deps.sendDesktopNotification("GSD", msg, "error", "budget", basename(s.originalBasePath || s.basePath)); + deps.sendDesktopNotification("SF", msg, "error", "budget", basename(s.originalBasePath || s.basePath)); await deps.stopAuto(ctx, pi, "Budget ceiling reached"); debugLog("autoLoop", { phase: "exit", reason: "budget-halt" }); return { action: "break", reason: "budget-halt" }; @@ -1121,21 +1121,21 @@ export async function runGuards( `${msg} Pausing auto-mode — /gsd auto to override and continue.`, "warning", ); - deps.sendDesktopNotification("GSD", msg, "warning", "budget", basename(s.originalBasePath || s.basePath)); + deps.sendDesktopNotification("SF", msg, "warning", "budget", basename(s.originalBasePath || s.basePath)); deps.logCmuxEvent(prefs, msg, "warning"); await deps.pauseAuto(ctx, pi); debugLog("autoLoop", { phase: "exit", reason: "budget-pause" }); return { action: "break", reason: "budget-pause" }; } ctx.ui.notify(`${msg} Continuing (enforcement: warn).`, "warning"); - deps.sendDesktopNotification("GSD", msg, "warning", "budget", basename(s.originalBasePath || s.basePath)); + deps.sendDesktopNotification("SF", msg, "warning", "budget", basename(s.originalBasePath || s.basePath)); deps.logCmuxEvent(prefs, msg, "warning"); } else if (threshold.pct < 100) { // Sub-100% — simple notification const msg = `${threshold.label}: ${deps.formatCost(totalCost)} / ${deps.formatCost(budgetCeiling)}`; ctx.ui.notify(msg, threshold.notifyLevel); deps.sendDesktopNotification( - "GSD", + "SF", msg, threshold.notifyLevel, "budget", @@ -1165,7 +1165,7 @@ export async function runGuards( "warning", ); deps.sendDesktopNotification( - "GSD", + "SF", `Context ${contextUsage.percent}% — paused`, "warning", "attention", diff --git a/src/resources/extensions/gsd/auto/session.ts b/src/resources/extensions/gsd/auto/session.ts index 049a72819..7a583f0b6 100644 --- a/src/resources/extensions/gsd/auto/session.ts +++ b/src/resources/extensions/gsd/auto/session.ts @@ -136,7 +136,7 @@ export class AutoSession { sidecarQueue: SidecarItem[] = []; // ── Tool invocation errors (#2883) ────────────────────────────────── - /** Set when a GSD tool execution ends with isError due to malformed/truncated + /** Set when a SF tool execution ends with isError due to malformed/truncated * JSON arguments. Checked by postUnitPreVerification to break retry loops. */ lastToolInvocationError: string | null = null; /** Set when turn-level git action fails during closeout. */ diff --git a/src/resources/extensions/gsd/bootstrap/crash-log.ts b/src/resources/extensions/gsd/bootstrap/crash-log.ts index da87c3b61..919d1fcfa 100644 --- a/src/resources/extensions/gsd/bootstrap/crash-log.ts +++ b/src/resources/extensions/gsd/bootstrap/crash-log.ts @@ -11,12 +11,12 @@ import { homedir } from "node:os"; import { join } from "node:path"; /** - * Write a crash log to ~/.gsd/crash/<timestamp>.log (or $GSD_HOME/crash/). + * Write a crash log to ~/.gsd/crash/<timestamp>.log (or $SF_HOME/crash/). * Never throws — must be safe to call from any error handler. */ export function writeCrashLog(err: Error, source: string): void { try { - const crashDir = join(process.env.GSD_HOME ?? join(homedir(), ".gsd"), "crash"); + const crashDir = join(process.env.SF_HOME ?? join(homedir(), ".gsd"), "crash"); mkdirSync(crashDir, { recursive: true }); const ts = new Date().toISOString().replace(/[:.]/g, "-"); const logPath = join(crashDir, `${ts}.log`); diff --git a/src/resources/extensions/gsd/bootstrap/db-tools.ts b/src/resources/extensions/gsd/bootstrap/db-tools.ts index cc88cec57..a3030d5e7 100644 --- a/src/resources/extensions/gsd/bootstrap/db-tools.ts +++ b/src/resources/extensions/gsd/bootstrap/db-tools.ts @@ -42,7 +42,7 @@ export function registerDbTools(pi: ExtensionAPI): void { const dbAvailable = await ensureDbOpen(); if (!dbAvailable) { return { - content: [{ type: "text" as const, text: "Error: GSD database is not available. Cannot save decision." }], + content: [{ type: "text" as const, text: "Error: SF database is not available. Cannot save decision." }], details: { operation: "save_decision", error: "db_unavailable" } as any, }; } @@ -78,9 +78,9 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_decision_save", label: "Save Decision", description: - "Record a project decision to the GSD database and regenerate DECISIONS.md. " + + "Record a project decision to the SF database and regenerate DECISIONS.md. " + "Decision IDs are auto-assigned — never provide an ID manually.", - promptSnippet: "Record a project decision to the GSD database (auto-assigns ID, regenerates DECISIONS.md)", + promptSnippet: "Record a project decision to the SF database (auto-assigns ID, regenerates DECISIONS.md)", promptGuidelines: [ "Use gsd_decision_save when recording an architectural, pattern, library, or observability decision.", "Decision IDs are auto-assigned (D001, D002, ...) — never guess or provide an ID.", @@ -129,7 +129,7 @@ export function registerDbTools(pi: ExtensionAPI): void { const dbAvailable = await ensureDbOpen(); if (!dbAvailable) { return { - content: [{ type: "text" as const, text: "Error: GSD database is not available. Cannot update requirement." }], + content: [{ type: "text" as const, text: "Error: SF database is not available. Cannot update requirement." }], details: { operation: "update_requirement", id: params.id, error: "db_unavailable" } as any, }; } @@ -161,9 +161,9 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_requirement_update", label: "Update Requirement", description: - "Update an existing requirement in the GSD database and regenerate REQUIREMENTS.md. " + + "Update an existing requirement in the SF database and regenerate REQUIREMENTS.md. " + "Provide the requirement ID (e.g. R001) and any fields to update.", - promptSnippet: "Update an existing GSD requirement by ID (regenerates REQUIREMENTS.md)", + promptSnippet: "Update an existing SF requirement by ID (regenerates REQUIREMENTS.md)", promptGuidelines: [ "Use gsd_requirement_update to change status, validation, notes, or other fields on an existing requirement.", "The id parameter is required — it must be an existing RXXX identifier.", @@ -207,7 +207,7 @@ export function registerDbTools(pi: ExtensionAPI): void { const dbAvailable = await ensureDbOpen(); if (!dbAvailable) { return { - content: [{ type: "text" as const, text: "Error: GSD database is not available. Cannot save requirement." }], + content: [{ type: "text" as const, text: "Error: SF database is not available. Cannot save requirement." }], details: { operation: "save_requirement", error: "db_unavailable" } as any, }; } @@ -245,9 +245,9 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_requirement_save", label: "Save Requirement", description: - "Record a new requirement to the GSD database and regenerate REQUIREMENTS.md. " + + "Record a new requirement to the SF database and regenerate REQUIREMENTS.md. " + "Requirement IDs are auto-assigned — never provide an ID manually.", - promptSnippet: "Record a new GSD requirement to the database (auto-assigns ID, regenerates REQUIREMENTS.md)", + promptSnippet: "Record a new SF requirement to the database (auto-assigns ID, regenerates REQUIREMENTS.md)", promptGuidelines: [ "Use gsd_requirement_save when recording a new functional, non-functional, or operational requirement.", "Requirement IDs are auto-assigned (R001, R002, ...) — never guess or provide an ID.", @@ -296,9 +296,9 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_summary_save", label: "Save Summary", description: - "Save a summary, research, context, or assessment artifact to the GSD database and write it to disk. " + + "Save a summary, research, context, or assessment artifact to the SF database and write it to disk. " + "Computes the file path from milestone/slice/task IDs automatically.", - promptSnippet: "Save a GSD artifact (summary/research/context/assessment) to DB and disk", + promptSnippet: "Save a SF artifact (summary/research/context/assessment) to DB and disk", promptGuidelines: [ "Use gsd_summary_save to persist structured artifacts (SUMMARY, RESEARCH, CONTEXT, ASSESSMENT, CONTEXT-DRAFT).", "milestone_id is required. slice_id and task_id are optional — they determine the file path.", @@ -390,7 +390,7 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_milestone_generate_id", label: "Generate Milestone ID", description: - "Generate the next milestone ID for a new GSD milestone. " + + "Generate the next milestone ID for a new SF milestone. " + "Scans existing milestones on disk and respects the unique_milestone_ids preference. " + "Always use this tool when creating a new milestone — never invent milestone IDs manually.", promptSnippet: "Generate a valid milestone ID (respects unique_milestone_ids preference)", @@ -429,7 +429,7 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_plan_milestone", label: "Plan Milestone", description: - "Write milestone planning state to the GSD database, render ROADMAP.md from DB, and clear caches after a successful render.", + "Write milestone planning state to the SF database, render ROADMAP.md from DB, and clear caches after a successful render.", promptSnippet: "Plan a milestone via DB write + roadmap render + cache invalidation", promptGuidelines: [ "Use gsd_plan_milestone for milestone planning instead of writing ROADMAP.md directly.", @@ -491,7 +491,7 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_plan_slice", label: "Plan Slice", description: - "Write slice planning state to the GSD database, render S##-PLAN.md plus task PLAN artifacts from DB, and clear caches after a successful render.", + "Write slice planning state to the SF database, render S##-PLAN.md plus task PLAN artifacts from DB, and clear caches after a successful render.", promptSnippet: "Plan a slice via DB write + PLAN render + cache invalidation", promptGuidelines: [ "Use gsd_plan_slice for slice planning instead of writing S##-PLAN.md or task PLAN files directly.", @@ -533,7 +533,7 @@ export function registerDbTools(pi: ExtensionAPI): void { const dbAvailable = await ensureDbOpen(); if (!dbAvailable) { return { - content: [{ type: "text" as const, text: "Error: GSD database is not available. Cannot plan task." }], + content: [{ type: "text" as const, text: "Error: SF database is not available. Cannot plan task." }], details: { operation: "plan_task", error: "db_unavailable" } as any, }; } @@ -570,7 +570,7 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_plan_task", label: "Plan Task", description: - "Write task planning state to the GSD database, render tasks/T##-PLAN.md from DB, and clear caches after a successful render.", + "Write task planning state to the SF database, render tasks/T##-PLAN.md from DB, and clear caches after a successful render.", promptSnippet: "Plan a task via DB write + task PLAN render + cache invalidation", promptGuidelines: [ "Use gsd_plan_task for task planning instead of writing tasks/T##-PLAN.md directly.", @@ -607,9 +607,9 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_task_complete", label: "Complete Task", description: - "Record a completed task to the GSD database, render a SUMMARY.md to disk, and toggle the plan checkbox — all in one atomic operation. " + + "Record a completed task to the SF database, render a SUMMARY.md to disk, and toggle the plan checkbox — all in one atomic operation. " + "Writes the task row inside a transaction, then performs filesystem writes outside the transaction.", - promptSnippet: "Complete a GSD task (DB write + summary render + checkbox toggle)", + promptSnippet: "Complete a SF task (DB write + summary render + checkbox toggle)", promptGuidelines: [ "Use gsd_task_complete (or gsd_complete_task) when a task is finished and needs to be recorded.", "All string fields are required. verificationEvidence is an array of objects with command, exitCode, verdict, durationMs.", @@ -660,9 +660,9 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_slice_complete", label: "Complete Slice", description: - "Record a completed slice to the GSD database, render SUMMARY.md + UAT.md to disk, and toggle the roadmap checkbox — all in one atomic operation. " + + "Record a completed slice to the SF database, render SUMMARY.md + UAT.md to disk, and toggle the roadmap checkbox — all in one atomic operation. " + "Validates all tasks are complete before proceeding. Writes the slice row inside a transaction, then performs filesystem writes outside the transaction.", - promptSnippet: "Complete a GSD slice (DB write + summary/UAT render + roadmap checkbox toggle)", + promptSnippet: "Complete a SF slice (DB write + summary/UAT render + roadmap checkbox toggle)", promptGuidelines: [ "Use gsd_slice_complete (or gsd_complete_slice) when all tasks in a slice are finished and the slice needs to be recorded.", "All tasks in the slice must have status 'complete' — the handler validates this before proceeding.", @@ -753,7 +753,7 @@ export function registerDbTools(pi: ExtensionAPI): void { const dbAvailable = await ensureDbOpen(); if (!dbAvailable) { return { - content: [{ type: "text" as const, text: "Error: GSD database is not available. Cannot skip slice." }], + content: [{ type: "text" as const, text: "Error: SF database is not available. Cannot skip slice." }], details: { operation: "skip_slice", error: "db_unavailable" } as any, }; } @@ -821,7 +821,7 @@ export function registerDbTools(pi: ExtensionAPI): void { description: "Mark a slice as skipped so auto-mode advances past it without executing. " + "The slice data is preserved for reference. The state machine treats skipped slices like completed ones for dependency satisfaction.", - promptSnippet: "Skip a GSD slice (mark as skipped, auto-mode will advance past it)", + promptSnippet: "Skip a SF slice (mark as skipped, auto-mode will advance past it)", promptGuidelines: [ "Use gsd_skip_slice when a slice should be bypassed — descoped, superseded, or no longer relevant.", "Cannot skip a slice that is already complete.", @@ -845,9 +845,9 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_complete_milestone", label: "Complete Milestone", description: - "Record a completed milestone to the GSD database, render MILESTONE-SUMMARY.md to disk — all in one atomic operation. " + + "Record a completed milestone to the SF database, render MILESTONE-SUMMARY.md to disk — all in one atomic operation. " + "Validates all slices are complete before proceeding.", - promptSnippet: "Complete a GSD milestone (DB write + summary render)", + promptSnippet: "Complete a SF milestone (DB write + summary render)", promptGuidelines: [ "Use gsd_complete_milestone when all slices in a milestone are finished and the milestone needs to be recorded.", "All slices in the milestone must have status 'complete' — the handler validates this before proceeding.", @@ -889,7 +889,7 @@ export function registerDbTools(pi: ExtensionAPI): void { description: "Validate a milestone before completion — persist validation results to the DB, render VALIDATION.md to disk. " + "Records verdict (pass/needs-attention/needs-remediation) and rationale.", - promptSnippet: "Validate a GSD milestone (DB write + VALIDATION.md render)", + promptSnippet: "Validate a SF milestone (DB write + VALIDATION.md render)", promptGuidelines: [ "Use gsd_validate_milestone when all slices are done and the milestone needs validation before completion.", "Parameters: milestoneId, verdict, remediationRound, successCriteriaChecklist, sliceDeliveryAudit, crossSliceIntegration, requirementCoverage, verificationClasses (optional), verdictRationale, remediationPlan (optional).", @@ -927,7 +927,7 @@ export function registerDbTools(pi: ExtensionAPI): void { "Replan a slice after a blocker is discovered. Structurally enforces preservation of completed tasks — " + "mutations to completed task IDs are rejected with actionable error payloads. Writes replan history to DB, " + "applies task mutations, re-renders PLAN.md, and renders REPLAN.md.", - promptSnippet: "Replan a GSD slice with structural enforcement of completed tasks", + promptSnippet: "Replan a SF slice with structural enforcement of completed tasks", promptGuidelines: [ "Use gsd_replan_slice (canonical) or gsd_slice_replan (alias) when a blocker is discovered and the slice plan needs rewriting.", "The tool structurally enforces that completed tasks cannot be updated or removed — violations return specific error payloads naming the blocked task ID.", @@ -974,7 +974,7 @@ export function registerDbTools(pi: ExtensionAPI): void { "Reassess the milestone roadmap after a slice completes. Structurally enforces preservation of completed slices — " + "mutations to completed slice IDs are rejected with actionable error payloads. Writes assessment to DB, " + "applies slice mutations, re-renders ROADMAP.md, and renders ASSESSMENT.md.", - promptSnippet: "Reassess a GSD roadmap with structural enforcement of completed slices", + promptSnippet: "Reassess a SF roadmap with structural enforcement of completed slices", promptGuidelines: [ "Use gsd_reassess_roadmap (canonical) or gsd_roadmap_reassess (alias) after a slice completes to reassess the roadmap.", "The tool structurally enforces that completed slices cannot be modified or removed — violations return specific error payloads naming the blocked slice ID.", @@ -1026,7 +1026,7 @@ export function registerDbTools(pi: ExtensionAPI): void { name: "gsd_save_gate_result", label: "Save Gate Result", description: - "Save the result of a quality gate evaluation (Q3-Q8 or MV01-MV04) to the GSD database. " + + "Save the result of a quality gate evaluation (Q3-Q8 or MV01-MV04) to the SF database. " + "Called by gate evaluation sub-agents after analyzing a specific quality question.", promptSnippet: "Save quality gate evaluation result (verdict, rationale, findings)", promptGuidelines: [ diff --git a/src/resources/extensions/gsd/bootstrap/journal-tools.ts b/src/resources/extensions/gsd/bootstrap/journal-tools.ts index b67a0b42d..9e0ae3402 100644 --- a/src/resources/extensions/gsd/bootstrap/journal-tools.ts +++ b/src/resources/extensions/gsd/bootstrap/journal-tools.ts @@ -11,7 +11,7 @@ export function registerJournalTools(pi: ExtensionAPI): void { description: "Query the structured event journal for auto-mode iterations. " + "Returns matching journal entries filtered by flow ID, unit ID, rule name, event type, or time range.", - promptSnippet: "Query the GSD event journal with filters (flowId, unitId, rule, eventType, time range, limit)", + promptSnippet: "Query the SF event journal with filters (flowId, unitId, rule, eventType, time range, limit)", promptGuidelines: [ "Filter by flowId to trace all events from a single auto-mode iteration.", "Filter by unitId to reconstruct the causal chain for a specific milestone/slice/task.", diff --git a/src/resources/extensions/gsd/bootstrap/notify-interceptor.ts b/src/resources/extensions/gsd/bootstrap/notify-interceptor.ts index d93b999c5..30df765c9 100644 --- a/src/resources/extensions/gsd/bootstrap/notify-interceptor.ts +++ b/src/resources/extensions/gsd/bootstrap/notify-interceptor.ts @@ -1,4 +1,4 @@ -// GSD Extension — Notify Interceptor +// SF Extension — Notify Interceptor // Wraps ctx.ui.notify() in-place to persist every notification through the // notification store. Uses a WeakSet to prevent double-wrapping and handle // UI context replacement on /reload gracefully. diff --git a/src/resources/extensions/gsd/bootstrap/query-tools.ts b/src/resources/extensions/gsd/bootstrap/query-tools.ts index 991d541f0..bd6577ef7 100644 --- a/src/resources/extensions/gsd/bootstrap/query-tools.ts +++ b/src/resources/extensions/gsd/bootstrap/query-tools.ts @@ -10,7 +10,7 @@ export function registerQueryTools(pi: ExtensionAPI): void { name: "gsd_milestone_status", label: "Milestone Status", description: - "Read the current status of a milestone and all its slices from the GSD database. " + + "Read the current status of a milestone and all its slices from the SF database. " + "Returns milestone metadata, per-slice status, and task counts per slice. " + "Use this instead of querying .gsd/gsd.db directly via sqlite3 or better-sqlite3.", promptSnippet: "Get milestone status, slice statuses, and task counts for a given milestoneId", @@ -24,7 +24,7 @@ export function registerQueryTools(pi: ExtensionAPI): void { const dbAvailable = await ensureDbOpen(); if (!dbAvailable) { return { - content: [{ type: "text", text: "Error: GSD database is not available. Cannot read milestone status." }], + content: [{ type: "text", text: "Error: SF database is not available. Cannot read milestone status." }], details: { operation: "milestone_status", error: "db_unavailable" }, }; } diff --git a/src/resources/extensions/gsd/bootstrap/register-extension.ts b/src/resources/extensions/gsd/bootstrap/register-extension.ts index 4108f7b20..a24c07bfc 100644 --- a/src/resources/extensions/gsd/bootstrap/register-extension.ts +++ b/src/resources/extensions/gsd/bootstrap/register-extension.ts @@ -1,4 +1,4 @@ -// GSD2 — Extension registration: wires all GSD tools, commands, and hooks into pi +// GSD2 — Extension registration: wires all SF tools, commands, and hooks into pi import type { ExtensionAPI, ExtensionCommandContext } from "@sf-run/pi-coding-agent"; @@ -66,7 +66,7 @@ export function registerGsdExtension(pi: ExtensionAPI): void { installEpipeGuard(); pi.registerCommand("kill", { - description: "Exit GSD immediately (no cleanup)", + description: "Exit SF immediately (no cleanup)", handler: async (_args: string, _ctx: ExtensionCommandContext) => { process.exit(0); }, diff --git a/src/resources/extensions/gsd/bootstrap/register-hooks.ts b/src/resources/extensions/gsd/bootstrap/register-hooks.ts index d3c00923a..ed14f00f6 100644 --- a/src/resources/extensions/gsd/bootstrap/register-hooks.ts +++ b/src/resources/extensions/gsd/bootstrap/register-hooks.ts @@ -65,13 +65,13 @@ export function registerHooks(pi: ExtensionAPI): void { try { const { loadEffectiveGSDPreferences } = await import("../preferences.js"); const prefs = loadEffectiveGSDPreferences(); - process.env.GSD_SHOW_TOKEN_COST = prefs?.preferences.show_token_cost ? "1" : ""; + process.env.SF_SHOW_TOKEN_COST = prefs?.preferences.show_token_cost ? "1" : ""; } catch { /* non-fatal */ } if (isFirstSession) { isFirstSession = false; } else { try { - const gsdBinPath = process.env.GSD_BIN_PATH; + const gsdBinPath = process.env.SF_BIN_PATH; if (gsdBinPath) { const { dirname } = await import("node:path"); const { printWelcomeScreen } = await import( @@ -85,7 +85,7 @@ export function registerHooks(pi: ExtensionAPI): void { if (rc) remoteChannel = rc.channel; } catch { /* non-fatal */ } - printWelcomeScreen({ version: process.env.GSD_VERSION || "0.0.0", remoteChannel }); + printWelcomeScreen({ version: process.env.SF_VERSION || "0.0.0", remoteChannel }); } } catch { /* non-fatal */ } } diff --git a/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts b/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts index 9d58a17f9..bf7c8cd82 100644 --- a/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts +++ b/src/resources/extensions/gsd/bootstrap/register-shortcuts.ts @@ -7,7 +7,7 @@ import { Key } from "@sf-run/pi-tui"; import { GSDDashboardOverlay } from "../dashboard-overlay.js"; import { GSDNotificationOverlay } from "../notification-overlay.js"; import { ParallelMonitorOverlay } from "../parallel-monitor-overlay.js"; -import { GSD_SHORTCUTS } from "../shortcut-defs.js"; +import { SF_SHORTCUTS } from "../shortcut-defs.js"; import { projectRoot } from "../commands/context.js"; import { shortcutDesc } from "../../shared/mod.js"; @@ -66,30 +66,30 @@ export function registerShortcuts(pi: ExtensionAPI): void { ); }; - pi.registerShortcut(Key.ctrlAlt(GSD_SHORTCUTS.dashboard.key), { - description: shortcutDesc(GSD_SHORTCUTS.dashboard.action, GSD_SHORTCUTS.dashboard.command), + pi.registerShortcut(Key.ctrlAlt(SF_SHORTCUTS.dashboard.key), { + description: shortcutDesc(SF_SHORTCUTS.dashboard.action, SF_SHORTCUTS.dashboard.command), handler: openDashboardOverlay, }); // Fallback for terminals where Ctrl+Alt letter chords are not forwarded reliably. - pi.registerShortcut(Key.ctrlShift(GSD_SHORTCUTS.dashboard.key), { - description: shortcutDesc(`${GSD_SHORTCUTS.dashboard.action} (fallback)`, GSD_SHORTCUTS.dashboard.command), + pi.registerShortcut(Key.ctrlShift(SF_SHORTCUTS.dashboard.key), { + description: shortcutDesc(`${SF_SHORTCUTS.dashboard.action} (fallback)`, SF_SHORTCUTS.dashboard.command), handler: openDashboardOverlay, }); - pi.registerShortcut(Key.ctrlAlt(GSD_SHORTCUTS.notifications.key), { - description: shortcutDesc(GSD_SHORTCUTS.notifications.action, GSD_SHORTCUTS.notifications.command), + pi.registerShortcut(Key.ctrlAlt(SF_SHORTCUTS.notifications.key), { + description: shortcutDesc(SF_SHORTCUTS.notifications.action, SF_SHORTCUTS.notifications.command), handler: openNotificationsOverlay, }); // Fallback for terminals where Ctrl+Alt letter chords are not forwarded reliably. - pi.registerShortcut(Key.ctrlShift(GSD_SHORTCUTS.notifications.key), { - description: shortcutDesc(`${GSD_SHORTCUTS.notifications.action} (fallback)`, GSD_SHORTCUTS.notifications.command), + pi.registerShortcut(Key.ctrlShift(SF_SHORTCUTS.notifications.key), { + description: shortcutDesc(`${SF_SHORTCUTS.notifications.action} (fallback)`, SF_SHORTCUTS.notifications.command), handler: openNotificationsOverlay, }); - pi.registerShortcut(Key.ctrlAlt(GSD_SHORTCUTS.parallel.key), { - description: shortcutDesc(GSD_SHORTCUTS.parallel.action, GSD_SHORTCUTS.parallel.command), + pi.registerShortcut(Key.ctrlAlt(SF_SHORTCUTS.parallel.key), { + description: shortcutDesc(SF_SHORTCUTS.parallel.action, SF_SHORTCUTS.parallel.command), handler: openParallelOverlay, }); diff --git a/src/resources/extensions/gsd/bootstrap/system-context.ts b/src/resources/extensions/gsd/bootstrap/system-context.ts index 415d0dc84..50ce25c83 100644 --- a/src/resources/extensions/gsd/bootstrap/system-context.ts +++ b/src/resources/extensions/gsd/bootstrap/system-context.ts @@ -22,7 +22,7 @@ import { toPosixPath } from "../../shared/mod.js"; import { markCmuxPromptShown, shouldPromptToEnableCmux } from "../../cmux/index.js"; import { autoEnableCmuxPreferences } from "../commands-cmux.js"; -const gsdHome = process.env.GSD_HOME || join(homedir(), ".gsd"); +const gsdHome = process.env.SF_HOME || join(homedir(), ".gsd"); /** * Bundled skill triggers — resolved dynamically at runtime instead of @@ -57,9 +57,9 @@ function warnDeprecatedAgentInstructions(): void { for (const path of paths) { if (existsSync(path)) { console.warn( - `[GSD] DEPRECATED: ${path} is no longer loaded. ` + + `[SF] DEPRECATED: ${path} is no longer loaded. ` + `Migrate your instructions to AGENTS.md (or CLAUDE.md) in the same directory. ` + - `See https://github.com/gsd-build/GSD-2/issues/1492`, + `See https://github.com/gsd-build/SF/issues/1492`, ); } } @@ -97,7 +97,7 @@ export async function buildBeforeAgentStartResult( preferenceBlock = `\n\n${renderPreferencesForSystemPrompt(loadedPreferences.preferences, report.resolutions)}`; if (report.warnings.length > 0) { ctx.ui.notify( - `GSD skill preferences: ${report.warnings.length} unresolved skill${report.warnings.length === 1 ? "" : "s"}: ${report.warnings.join(", ")}`, + `SF skill preferences: ${report.warnings.length} unresolved skill${report.warnings.length === 1 ? "" : "s"}: ${report.warnings.join(", ")}`, "warning", ); } @@ -106,7 +106,7 @@ export async function buildBeforeAgentStartResult( const { block: knowledgeBlock, globalSizeKb } = loadKnowledgeBlock(gsdHome, process.cwd()); if (globalSizeKb > 4) { ctx.ui.notify( - `GSD: ~/.gsd/agent/KNOWLEDGE.md is ${globalSizeKb.toFixed(1)}KB — consider trimming to keep system prompt lean.`, + `SF: ~/.gsd/agent/KNOWLEDGE.md is ${globalSizeKb.toFixed(1)}KB — consider trimming to keep system prompt lean.`, "warning", ); } @@ -161,7 +161,7 @@ export async function buildBeforeAgentStartResult( const content = rawContent.length > MAX_CODEBASE_CHARS ? rawContent.slice(0, MAX_CODEBASE_CHARS) + "\n\n*(truncated — see .gsd/CODEBASE.md for full map)*" : rawContent; - codebaseBlock = `\n\n[PROJECT CODEBASE — File structure and descriptions (generated ${generatedAt}, auto-refreshed when GSD detects tracked file changes; use /gsd codebase stats for status)]\n\n${content}`; + codebaseBlock = `\n\n[PROJECT CODEBASE — File structure and descriptions (generated ${generatedAt}, auto-refreshed when SF detects tracked file changes; use /gsd codebase stats for status)]\n\n${content}`; } } catch (e) { logWarning("bootstrap", `CODEBASE file read failed: ${(e as Error).message}`); @@ -182,7 +182,7 @@ export async function buildBeforeAgentStartResult( ? `\n\n## Subagent Model\n\nWhen spawning subagents via the \`subagent\` tool, always pass \`model: "${subagentModelConfig.primary}"\` in the tool call parameters. Never omit this — always specify it explicitly.` : ""; - const fullSystem = `${event.systemPrompt}\n\n[SYSTEM CONTEXT — GSD]\n\n${systemContent}${preferenceBlock}${knowledgeBlock}${codebaseBlock}${memoryBlock}${newSkillsBlock}${worktreeBlock}${subagentModelBlock}`; + const fullSystem = `${event.systemPrompt}\n\n[SYSTEM CONTEXT — SF]\n\n${systemContent}${preferenceBlock}${knowledgeBlock}${codebaseBlock}${memoryBlock}${newSkillsBlock}${worktreeBlock}${subagentModelBlock}`; stopContextTimer({ systemPromptSize: fullSystem.length, @@ -259,13 +259,13 @@ function buildWorktreeContextBlock(): string { `IMPORTANT: Ignore the "Current working directory" shown earlier in this prompt.`, `The actual current working directory is: ${toPosixPath(process.cwd())}`, "", - `You are working inside a GSD worktree.`, + `You are working inside a SF worktree.`, `- Worktree name: ${worktreeName}`, `- Worktree path (this is the real cwd): ${toPosixPath(process.cwd())}`, `- Main project: ${toPosixPath(worktreeMainCwd)}`, `- Branch: worktree/${worktreeName}`, "", - "All file operations, bash commands, and GSD state resolve against the worktree path above.", + "All file operations, bash commands, and SF state resolve against the worktree path above.", "Use /worktree merge to merge changes back. Use /worktree return to switch back to the main tree.", ].join("\n"); } @@ -278,13 +278,13 @@ function buildWorktreeContextBlock(): string { `IMPORTANT: Ignore the "Current working directory" shown earlier in this prompt.`, `The actual current working directory is: ${toPosixPath(process.cwd())}`, "", - "You are working inside a GSD auto-worktree.", + "You are working inside a SF auto-worktree.", `- Milestone worktree: ${autoWorktree.worktreeName}`, `- Worktree path (this is the real cwd): ${toPosixPath(process.cwd())}`, `- Main project: ${toPosixPath(autoWorktree.originalBase)}`, `- Branch: ${autoWorktree.branch}`, "", - "All file operations, bash commands, and GSD state resolve against the worktree path above.", + "All file operations, bash commands, and SF state resolve against the worktree path above.", "Write every .gsd artifact in the worktree path above, never in the main project tree.", ].join("\n"); } @@ -370,7 +370,7 @@ async function buildTaskExecutionContextInjection( const overridesSection = formatOverridesSection(activeOverrides); return [ - "[GSD Guided Execute Context]", + "[SF Guided Execute Context]", "Use this injected context as startup context for guided task execution. Treat the inlined task plan as the authoritative local execution contract. Use source artifacts to verify details and run checks.", overridesSection, "", "", diff --git a/src/resources/extensions/gsd/bootstrap/write-gate.ts b/src/resources/extensions/gsd/bootstrap/write-gate.ts index b8e6cf8e5..5d446515e 100644 --- a/src/resources/extensions/gsd/bootstrap/write-gate.ts +++ b/src/resources/extensions/gsd/bootstrap/write-gate.ts @@ -9,7 +9,7 @@ const DEPTH_VERIFICATION_MILESTONE_RE = /depth_verification[_-](M\d+(?:-[a-z0-9] * Path segment that identifies .gsd/ planning artifacts. * Writes to these paths are allowed during queue mode. */ -const GSD_DIR_RE = /(^|[/\\])\.gsd([/\\]|$)/; +const SF_DIR_RE = /(^|[/\\])\.gsd([/\\]|$)/; /** * Read-only tool names that are always safe during queue mode. @@ -71,7 +71,7 @@ export interface WriteGateSnapshot { } function shouldPersistWriteGateSnapshot(env: NodeJS.ProcessEnv = process.env): boolean { - return env.GSD_PERSIST_WRITE_GATE_STATE === "1"; + return env.SF_PERSIST_WRITE_GATE_STATE === "1"; } function writeGateSnapshotPath(basePath: string = process.cwd()): string { @@ -437,7 +437,7 @@ export function shouldBlockQueueExecutionInSnapshot( // write/edit — allow if targeting .gsd/ planning artifacts if (toolName === "write" || toolName === "edit") { - if (GSD_DIR_RE.test(input)) return { block: false }; + if (SF_DIR_RE.test(input)) return { block: false }; return { block: true, reason: `Blocked: /gsd queue is a planning tool — it creates milestones, not executes work. ` + diff --git a/src/resources/extensions/gsd/branch-patterns.ts b/src/resources/extensions/gsd/branch-patterns.ts index 70d8a40ab..56225abf9 100644 --- a/src/resources/extensions/gsd/branch-patterns.ts +++ b/src/resources/extensions/gsd/branch-patterns.ts @@ -1,5 +1,5 @@ /** - * GSD branch naming patterns — single source of truth. + * SF branch naming patterns — single source of truth. * * gsd/<worktree>/<milestone>/<slice> → SLICE_BRANCH_RE * gsd/quick/<id>-<slug> → QUICK_BRANCH_RE diff --git a/src/resources/extensions/gsd/cache.ts b/src/resources/extensions/gsd/cache.ts index 456a66ad9..ed5330d5b 100644 --- a/src/resources/extensions/gsd/cache.ts +++ b/src/resources/extensions/gsd/cache.ts @@ -1,6 +1,6 @@ -// GSD Extension — Cache Invalidation +// SF Extension — Cache Invalidation // -// Three module-scoped caches exist across the GSD extension: +// Three module-scoped caches exist across the SF extension: // 1. State cache (state.ts) — memoized deriveState() result // 2. Path cache (paths.ts) — directory listing results (readdirSync) // 3. Parse cache (files.ts) — parsed markdown file results @@ -15,7 +15,7 @@ import { clearParseCache } from './files.js'; import { clearArtifacts } from './gsd-db.js'; /** - * Invalidate all GSD runtime caches in one call. + * Invalidate all SF runtime caches in one call. * * Call this after file writes, milestone transitions, merge reconciliation, * or any operation that changes .gsd/ contents on disk. Forgetting to clear diff --git a/src/resources/extensions/gsd/captures.ts b/src/resources/extensions/gsd/captures.ts index 2de7278b7..66db90c6c 100644 --- a/src/resources/extensions/gsd/captures.ts +++ b/src/resources/extensions/gsd/captures.ts @@ -1,5 +1,5 @@ /** - * GSD Captures — Fire-and-forget thought capture with triage classification + * SF Captures — Fire-and-forget thought capture with triage classification * * Append-only capture file at `.gsd/CAPTURES.md`. Each capture is an H3 section * with bold metadata fields, parseable by the same patterns used in files.ts. diff --git a/src/resources/extensions/gsd/changelog.ts b/src/resources/extensions/gsd/changelog.ts index fea2cb853..2cf49deb9 100644 --- a/src/resources/extensions/gsd/changelog.ts +++ b/src/resources/extensions/gsd/changelog.ts @@ -1,5 +1,5 @@ /** - * GSD Changelog — Fetch and display categorized release notes from GitHub + * SF Changelog — Fetch and display categorized release notes from GitHub * * Fetches releases from the singularity-forge/sf-run GitHub repository, * prompts the user for a version filter, and sends raw release notes @@ -138,7 +138,7 @@ export async function handleChangelog( } // ── Determine version filter ──────────────────────────────────────────── - const currentVersion = process.env.GSD_VERSION || ""; + const currentVersion = process.env.SF_VERSION || ""; let sinceVersion: string | undefined; let showCurrentOnly = false; @@ -167,7 +167,7 @@ export async function handleChangelog( if (showCurrentOnly) { if (!currentVersion) { ctx.ui.notify( - "GSD_VERSION is not set — cannot determine current release. Provide a version instead.", + "SF_VERSION is not set — cannot determine current release. Provide a version instead.", "warning", ); return; @@ -198,7 +198,7 @@ export async function handleChangelog( : `for current release ${matched[0].name || matched[0].tag_name}`; const prompt = [ - `Here are the raw GSD changelog entries ${versionRange}.`, + `Here are the raw SF changelog entries ${versionRange}.`, "Summarize the most important changes — group by category (Added, Changed, Fixed, etc.),", "keep only the most impactful items (max 5 per category), skip trivial changes,", "and include the version where each item appeared. Keep it concise and scannable.", diff --git a/src/resources/extensions/gsd/claude-import.ts b/src/resources/extensions/gsd/claude-import.ts index 3fd8dcc37..bf8b8787c 100644 --- a/src/resources/extensions/gsd/claude-import.ts +++ b/src/resources/extensions/gsd/claude-import.ts @@ -518,7 +518,7 @@ export async function runClaudeImportFlow( const { marketplaces, flat } = categorizePluginRoots(pluginRoots); // Determine import mode - const assetChoice = await ctx.ui.select("Import Claude assets into GSD/Pi config", [ + const assetChoice = await ctx.ui.select("Import Claude assets into SF/Pi config", [ "Skills + plugins", "Skills only", "Plugins only", @@ -541,7 +541,7 @@ export async function runClaudeImportFlow( const selectedSkills = await chooseMany(ctx, `Claude skills → ${scope} preferences`, discoveredSkills); if (selectedSkills.length > 0) { - const prefMode = await ctx.ui.select("How should GSD treat the imported skills?", [ + const prefMode = await ctx.ui.select("How should SF treat the imported skills?", [ "Always use when relevant", "Prefer when relevant", "Do not modify skill preferences", @@ -690,7 +690,7 @@ export async function runClaudeImportFlow( ]; if (importedSkillsCount > 0) { lines.push(`- Skill paths added to Pi settings (${scope}) for availability`); - lines.push(`- Skill refs added to GSD preferences (${scope}) when selected`); + lines.push(`- Skill refs added to SF preferences (${scope}) when selected`); } if (importedPluginsCount > 0) { lines.push(`- Plugin/package paths added to Pi settings (${scope}) packages`); diff --git a/src/resources/extensions/gsd/codebase-generator.ts b/src/resources/extensions/gsd/codebase-generator.ts index b0e777c85..34265c746 100644 --- a/src/resources/extensions/gsd/codebase-generator.ts +++ b/src/resources/extensions/gsd/codebase-generator.ts @@ -1,5 +1,5 @@ /** - * GSD Codebase Map Generator + * SF Codebase Map Generator * * Produces .gsd/CODEBASE.md — a structural table of contents for the project. * Gives fresh agent contexts instant orientation without filesystem exploration. diff --git a/src/resources/extensions/gsd/commands-add-tests.ts b/src/resources/extensions/gsd/commands-add-tests.ts index 117b33289..f61a40367 100644 --- a/src/resources/extensions/gsd/commands-add-tests.ts +++ b/src/resources/extensions/gsd/commands-add-tests.ts @@ -1,5 +1,5 @@ /** - * GSD Command — /gsd add-tests + * SF Command — /gsd add-tests * * Generates tests for a completed slice by dispatching an LLM prompt * with implementation context (summaries, changed files, test patterns). diff --git a/src/resources/extensions/gsd/commands-backlog.ts b/src/resources/extensions/gsd/commands-backlog.ts index 2f94c93c8..452f50154 100644 --- a/src/resources/extensions/gsd/commands-backlog.ts +++ b/src/resources/extensions/gsd/commands-backlog.ts @@ -1,5 +1,5 @@ /** - * GSD Command — /gsd backlog + * SF Command — /gsd backlog * * Structured backlog management with 999.x numbering. * Items stored in .gsd/BACKLOG.md as markdown checklist. diff --git a/src/resources/extensions/gsd/commands-bootstrap.ts b/src/resources/extensions/gsd/commands-bootstrap.ts index 36b85c4cd..e65e8a7da 100644 --- a/src/resources/extensions/gsd/commands-bootstrap.ts +++ b/src/resources/extensions/gsd/commands-bootstrap.ts @@ -41,7 +41,7 @@ const TOP_LEVEL_SUBCOMMANDS = [ { cmd: "parallel", desc: "Parallel milestone orchestration" }, { cmd: "park", desc: "Park a milestone" }, { cmd: "unpark", desc: "Reactivate a parked milestone" }, - { cmd: "update", desc: "Update GSD to the latest version" }, + { cmd: "update", desc: "Update SF to the latest version" }, { cmd: "start", desc: "Start a workflow template" }, { cmd: "templates", desc: "List available workflow templates" }, { cmd: "extensions", desc: "Manage extensions" }, @@ -197,7 +197,7 @@ function getGsdArgumentCompletions(prefix: string) { { cmd: "refactor", desc: "Inventory, plan waves, migrate, verify" }, { cmd: "security-audit", desc: "Scan, triage, remediate, re-scan" }, { cmd: "dep-upgrade", desc: "Assess, upgrade, fix breaks, verify" }, - { cmd: "full-project", desc: "Complete GSD workflow with full ceremony" }, + { cmd: "full-project", desc: "Complete SF workflow with full ceremony" }, { cmd: "resume", desc: "Resume an in-progress workflow" }, { cmd: "--list", desc: "List all available templates" }, { cmd: "--dry-run", desc: "Preview workflow without executing" }, @@ -253,7 +253,7 @@ function getGsdArgumentCompletions(prefix: string) { export function registerLazyGSDCommand(pi: ExtensionAPI): void { pi.registerCommand("gsd", { - description: "GSD — Get Shit Done", + description: "SF — Singularity Forge", getArgumentCompletions: getGsdArgumentCompletions, handler: async (args: string, ctx: ExtensionCommandContext) => { const { handleGSDCommand } = await importExtensionModule<typeof import("./commands.js")>(import.meta.url, "./commands.js"); diff --git a/src/resources/extensions/gsd/commands-cmux.ts b/src/resources/extensions/gsd/commands-cmux.ts index 0a81dada5..46e3e2306 100644 --- a/src/resources/extensions/gsd/commands-cmux.ts +++ b/src/resources/extensions/gsd/commands-cmux.ts @@ -32,7 +32,7 @@ export function autoEnableCmuxPreferences(): boolean { prefs.version = prefs.version || 1; const frontmatter = serializePreferencesToFrontmatter(prefs); - let body = "\n# GSD Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; + let body = "\n# SF Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; const preserved = extractBodyAfterFrontmatter(readFileSync(path, "utf-8")); if (preserved) body = preserved; @@ -62,7 +62,7 @@ async function writeProjectCmuxPreferences( prefs.version = prefs.version || 1; const frontmatter = serializePreferencesToFrontmatter(prefs); - let body = "\n# GSD Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; + let body = "\n# SF Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; if (existsSync(path)) { const preserved = extractBodyAfterFrontmatter(readFileSync(path, "utf-8")); if (preserved) body = preserved; diff --git a/src/resources/extensions/gsd/commands-codebase.ts b/src/resources/extensions/gsd/commands-codebase.ts index d0254c754..ccd754303 100644 --- a/src/resources/extensions/gsd/commands-codebase.ts +++ b/src/resources/extensions/gsd/commands-codebase.ts @@ -1,5 +1,5 @@ /** - * GSD Command — /gsd codebase + * SF Command — /gsd codebase * * Generate and manage the codebase map (.gsd/CODEBASE.md). * Subcommands: generate, update, stats, help @@ -24,7 +24,7 @@ const USAGE = " stats — Show file count, coverage, and generation time\n" + " help — Show this help\n\n" + "With no subcommand, shows stats if a map exists or help if not.\n" + - "GSD also refreshes CODEBASE.md automatically before prompt injection and after completed units when tracked files change.\n\n" + + "SF also refreshes CODEBASE.md automatically before prompt injection and after completed units when tracked files change.\n\n" + "Configure defaults via preferences.md:\n" + " codebase:\n" + " exclude_patterns: [\"docs/\", \"fixtures/\"]\n" + diff --git a/src/resources/extensions/gsd/commands-config.ts b/src/resources/extensions/gsd/commands-config.ts index d1bf5439f..c0e35edd1 100644 --- a/src/resources/extensions/gsd/commands-config.ts +++ b/src/resources/extensions/gsd/commands-config.ts @@ -1,5 +1,5 @@ /** - * GSD Config — Tool API key management. + * SF Config — Tool API key management. * * Contains: TOOL_KEYS, loadToolApiKeys, getConfigAuthStorage, handleConfig */ @@ -59,7 +59,7 @@ export async function handleConfig(ctx: ExtensionCommandContext): Promise<void> const auth = getConfigAuthStorage(); // Show current status - const statusLines = ["GSD Tool Configuration\n"]; + const statusLines = ["SF Tool Configuration\n"]; for (const tool of TOOL_KEYS) { const hasKey = !!process.env[tool.env] || !!getStoredToolKey(auth, tool.id); statusLines.push(` ${hasKey ? "\u2713" : "\u2717"} ${tool.label}${hasKey ? "" : ` \u2014 get key at ${tool.hint}`}`); diff --git a/src/resources/extensions/gsd/commands-do.ts b/src/resources/extensions/gsd/commands-do.ts index cee1d61ab..bb42c5bb4 100644 --- a/src/resources/extensions/gsd/commands-do.ts +++ b/src/resources/extensions/gsd/commands-do.ts @@ -1,5 +1,5 @@ /** - * GSD Command — /gsd do + * SF Command — /gsd do * * Routes freeform natural language to the correct /gsd subcommand * using keyword matching. Falls back to /gsd quick for task-like input. diff --git a/src/resources/extensions/gsd/commands-extensions.ts b/src/resources/extensions/gsd/commands-extensions.ts index fadfda0ac..448416e8e 100644 --- a/src/resources/extensions/gsd/commands-extensions.ts +++ b/src/resources/extensions/gsd/commands-extensions.ts @@ -1,5 +1,5 @@ /** - * GSD Extensions Command — /gsd extensions + * SF Extensions Command — /gsd extensions * * Manage the extension registry: list, enable, disable, info. * Self-contained — no imports outside the extensions tree (extensions are loaded @@ -11,7 +11,7 @@ import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, writeFile import { dirname, join } from "node:path"; import { homedir } from "node:os"; -const gsdHome = process.env.GSD_HOME || join(homedir(), ".gsd"); +const gsdHome = process.env.SF_HOME || join(homedir(), ".gsd"); // ─── Types (mirrored from extension-registry.ts) ──────────────────────────── @@ -215,7 +215,7 @@ function handleEnable(id: string | undefined, ctx: ExtensionCommandContext): voi registry.entries[id] = { id, enabled: true, source: "bundled" }; } saveRegistry(registry); - ctx.ui.notify(`Enabled "${id}". Restart GSD to activate.`, "info"); + ctx.ui.notify(`Enabled "${id}". Restart SF to activate.`, "info"); } function handleDisable(id: string | undefined, reason: string, ctx: ExtensionCommandContext): void { @@ -258,7 +258,7 @@ function handleDisable(id: string | undefined, reason: string, ctx: ExtensionCom }; } saveRegistry(registry); - ctx.ui.notify(`Disabled "${id}". Restart GSD to deactivate.`, "info"); + ctx.ui.notify(`Disabled "${id}". Restart SF to deactivate.`, "info"); } function handleInfo(id: string | undefined, ctx: ExtensionCommandContext): void { diff --git a/src/resources/extensions/gsd/commands-extract-learnings.ts b/src/resources/extensions/gsd/commands-extract-learnings.ts index 71b3b6810..7c8e9793f 100644 --- a/src/resources/extensions/gsd/commands-extract-learnings.ts +++ b/src/resources/extensions/gsd/commands-extract-learnings.ts @@ -1,5 +1,5 @@ /** - * GSD Command — /gsd extract-learnings + * SF Command — /gsd extract-learnings * * Analyses completed milestone artefacts and dispatches an LLM turn that * extracts structured knowledge into 4 categories: diff --git a/src/resources/extensions/gsd/commands-handlers.ts b/src/resources/extensions/gsd/commands-handlers.ts index aec8288ce..e2dc6ff2c 100644 --- a/src/resources/extensions/gsd/commands-handlers.ts +++ b/src/resources/extensions/gsd/commands-handlers.ts @@ -1,5 +1,5 @@ /** - * GSD Command Handlers — fire-and-forget handlers that delegate to other modules. + * SF Command Handlers — fire-and-forget handlers that delegate to other modules. * * Contains: handleDoctor, handleSteer, handleCapture, handleTriage, handleKnowledge, * handleRunHook, handleUpdate, handleSkillHealth @@ -25,7 +25,7 @@ import { getAutoWorktreePath } from "./auto-worktree.js"; import { projectRoot } from "./commands/context.js"; import { loadPrompt } from "./prompt-loader.js"; -const UPDATE_REGISTRY_URL = "https://registry.npmjs.org/gsd-pi/latest"; +const UPDATE_REGISTRY_URL = "https://registry.npmjs.org/sf-run/latest"; const UPDATE_FETCH_TIMEOUT_MS = 5000; function resolveInstallCommand(pkg: string): string { @@ -51,7 +51,7 @@ async function fetchLatestVersionForCommand(): Promise<string | null> { } export function dispatchDoctorHeal(pi: ExtensionAPI, scope: string | undefined, reportText: string, structuredIssues: string): void { - const workflowPath = process.env.GSD_WORKFLOW_PATH ?? join(process.env.HOME ?? "~", ".gsd", "agent", "GSD-WORKFLOW.md"); + const workflowPath = process.env.SF_WORKFLOW_PATH ?? join(process.env.HOME ?? "~", ".gsd", "agent", "SF-WORKFLOW.md"); const workflow = readFileSync(workflowPath, "utf-8"); const prompt = loadPrompt("doctor-heal", { doctorSummary: reportText, @@ -60,7 +60,7 @@ export function dispatchDoctorHeal(pi: ExtensionAPI, scope: string | undefined, doctorCommandSuffix: scope ? ` ${scope}` : "", }); - const content = `Read the following GSD workflow protocol and execute exactly.\n\n${workflow}\n\n## Your Task\n\n${prompt}`; + const content = `Read the following SF workflow protocol and execute exactly.\n\n${workflow}\n\n## Your Task\n\n${prompt}`; pi.sendMessage( { customType: "gsd-doctor-heal", content, display: false }, @@ -108,7 +108,7 @@ export async function handleDoctor(args: string, ctx: ExtensionCommandContext, p scope: effectiveScope, includeWarnings: mode === "audit", maxIssues: mode === "audit" ? 50 : 12, - title: mode === "audit" ? "GSD doctor audit." : mode === "heal" ? "GSD doctor heal prep." : undefined, + title: mode === "audit" ? "SF doctor audit." : mode === "heal" ? "SF doctor heal prep." : undefined, }); ctx.ui.notify(reportText, report.ok ? "info" : "warning"); @@ -238,13 +238,13 @@ export async function handleTriage(ctx: ExtensionCommandContext, pi: ExtensionAP roadmapContext: roadmapContext || "(no active roadmap)", }); - const workflowPath = process.env.GSD_WORKFLOW_PATH ?? join(process.env.HOME ?? "~", ".gsd", "agent", "GSD-WORKFLOW.md"); + const workflowPath = process.env.SF_WORKFLOW_PATH ?? join(process.env.HOME ?? "~", ".gsd", "agent", "SF-WORKFLOW.md"); const workflow = readFileSync(workflowPath, "utf-8"); pi.sendMessage( { customType: "gsd-triage", - content: `Read the following GSD workflow protocol and execute exactly.\n\n${workflow}\n\n## Your Task\n\n${prompt}`, + content: `Read the following SF workflow protocol and execute exactly.\n\n${workflow}\n\n## Your Task\n\n${prompt}`, display: false, }, { triggerTurn: true }, @@ -418,8 +418,8 @@ function compareSemverLocal(a: string, b: string): number { export async function handleUpdate(ctx: ExtensionCommandContext): Promise<void> { const { execSync } = await import("node:child_process"); - const NPM_PACKAGE = "gsd-pi"; - const current = process.env.GSD_VERSION || "0.0.0"; + const NPM_PACKAGE = "sf-run"; + const current = process.env.SF_VERSION || "0.0.0"; ctx.ui.notify(`Current version: v${current}\nChecking npm registry...`, "info"); @@ -442,7 +442,7 @@ export async function handleUpdate(ctx: ExtensionCommandContext): Promise<void> stdio: ["ignore", "pipe", "ignore"], }); ctx.ui.notify( - `Updated to v${latest}. Restart your GSD session to use the new version.`, + `Updated to v${latest}. Restart your SF session to use the new version.`, "info", ); } catch { diff --git a/src/resources/extensions/gsd/commands-inspect.ts b/src/resources/extensions/gsd/commands-inspect.ts index 9b8b704c1..fc564a5e5 100644 --- a/src/resources/extensions/gsd/commands-inspect.ts +++ b/src/resources/extensions/gsd/commands-inspect.ts @@ -1,5 +1,5 @@ /** - * GSD Inspect — SQLite DB diagnostics. + * SF Inspect — SQLite DB diagnostics. * * Contains: InspectData type, formatInspectOutput, handleInspect */ @@ -20,7 +20,7 @@ export interface InspectData { export function formatInspectOutput(data: InspectData): string { const lines: string[] = []; - lines.push("=== GSD Database Inspect ==="); + lines.push("=== SF Database Inspect ==="); lines.push(`Schema version: ${data.schemaVersion ?? "unknown"}`); lines.push(""); lines.push(`Decisions: ${data.counts.decisions}`); @@ -54,14 +54,14 @@ export async function handleInspect(ctx: ExtensionCommandContext): Promise<void> const gsdDir = gsdRoot(process.cwd()); const dbPath = join(gsdDir, "gsd.db"); if (!existsSync(gsdDir) || !existsSync(dbPath) || !openDatabase(dbPath)) { - ctx.ui.notify("No GSD database available. Run /gsd auto to create one.", "info"); + ctx.ui.notify("No SF database available. Run /gsd auto to create one.", "info"); return; } } const adapter = _getAdapter(); if (!adapter) { - ctx.ui.notify("No GSD database available. Run /gsd auto to create one.", "info"); + ctx.ui.notify("No SF database available. Run /gsd auto to create one.", "info"); return; } @@ -94,6 +94,6 @@ export async function handleInspect(ctx: ExtensionCommandContext): Promise<void> ctx.ui.notify(formatInspectOutput(data), "info"); } catch (err) { logWarning("command", `/gsd inspect failed: ${getErrorMessage(err)}`); - ctx.ui.notify("Failed to inspect GSD database. Check stderr for details.", "error"); + ctx.ui.notify("Failed to inspect SF database. Check stderr for details.", "error"); } } diff --git a/src/resources/extensions/gsd/commands-logs.ts b/src/resources/extensions/gsd/commands-logs.ts index 0863180df..6986c0ba0 100644 --- a/src/resources/extensions/gsd/commands-logs.ts +++ b/src/resources/extensions/gsd/commands-logs.ts @@ -286,7 +286,7 @@ async function handleLogsList(basePath: string, ctx: ExtensionCommandContext): P if (activities.length === 0 && debugLogs.length === 0) { ctx.ui.notify( - "No logs found.\n\nActivity logs are created during auto-mode.\nDebug logs require GSD_DEBUG=1.", + "No logs found.\n\nActivity logs are created during auto-mode.\nDebug logs require SF_DEBUG=1.", "info", ); return; @@ -347,7 +347,7 @@ async function handleLogsList(basePath: string, ctx: ExtensionCommandContext): P } lines.push(""); - lines.push("Tip: Enable debug logging with GSD_DEBUG=1 before /gsd auto"); + lines.push("Tip: Enable debug logging with SF_DEBUG=1 before /gsd auto"); ctx.ui.notify(lines.join("\n"), "info"); } @@ -416,7 +416,7 @@ async function handleLogsDebug(basePath: string, ctx: ExtensionCommandContext, i if (debugLogs.length === 0) { ctx.ui.notify( - "No debug logs found.\n\nEnable debug logging: GSD_DEBUG=1 gsd auto", + "No debug logs found.\n\nEnable debug logging: SF_DEBUG=1 gsd auto", "info", ); return; diff --git a/src/resources/extensions/gsd/commands-maintenance.ts b/src/resources/extensions/gsd/commands-maintenance.ts index d529e5787..d711b028f 100644 --- a/src/resources/extensions/gsd/commands-maintenance.ts +++ b/src/resources/extensions/gsd/commands-maintenance.ts @@ -1,5 +1,5 @@ /** - * GSD Maintenance — cleanup, skip, dry-run, and recover handlers. + * SF Maintenance — cleanup, skip, dry-run, and recover handlers. * * Contains: handleCleanupBranches, handleCleanupSnapshots, handleCleanupWorktrees, handleSkip, handleDryRun, handleRecover */ @@ -15,7 +15,7 @@ export async function handleCleanupBranches(ctx: ExtensionCommandContext, basePa branches = nativeBranchList(basePath, "gsd/*"); } catch (e) { logWarning("command", `branch list failed: ${(e as Error).message}`); - ctx.ui.notify("No GSD branches to clean up.", "info"); + ctx.ui.notify("No SF branches to clean up.", "info"); return; } @@ -112,8 +112,8 @@ export async function handleCleanupBranches(ctx: ExtensionCommandContext, basePa const nonQuickCount = branches.filter((b) => !b.startsWith("gsd/quick/")).length; ctx.ui.notify( nonQuickCount > 0 - ? `${nonQuickCount} GSD branch${nonQuickCount === 1 ? "" : "es"} found, none merged into ${mainBranch} yet.` - : "No non-quick GSD branches to clean up.", + ? `${nonQuickCount} SF branch${nonQuickCount === 1 ? "" : "es"} found, none merged into ${mainBranch} yet.` + : "No non-quick SF branches to clean up.", "info", ); return; @@ -176,7 +176,7 @@ export async function handleCleanupWorktrees(ctx: ExtensionCommandContext, baseP } if (statuses.length === 0) { - ctx.ui.notify("No GSD worktrees found.", "info"); + ctx.ui.notify("No SF worktrees found.", "info"); return; } @@ -436,7 +436,7 @@ export async function handleCleanupProjects(args: string, ctx: ExtensionCommandC if (unknown.length > 0) { lines.push(`Unknown (${unknown.length}) — no metadata yet:`); for (const h of unknown) { - lines.push(` ? ${h} (open that project in GSD once to register metadata)`); + lines.push(` ? ${h} (open that project in SF once to register metadata)`); } lines.push(""); } @@ -493,7 +493,7 @@ export async function handleRecover(ctx: ExtensionCommandContext, basePath: stri const { invalidateStateCache } = await import("./state.js"); if (!dbAvailable()) { - ctx.ui.notify("gsd recover: No database open. Run a GSD command first to initialize the DB.", "error"); + ctx.ui.notify("gsd recover: No database open. Run a SF command first to initialize the DB.", "error"); return; } diff --git a/src/resources/extensions/gsd/commands-mcp-status.ts b/src/resources/extensions/gsd/commands-mcp-status.ts index beb7b799e..9339929e3 100644 --- a/src/resources/extensions/gsd/commands-mcp-status.ts +++ b/src/resources/extensions/gsd/commands-mcp-status.ts @@ -7,7 +7,7 @@ * /gsd mcp — Overview of all servers (alias: /gsd mcp status) * /gsd mcp status — Same as bare /gsd mcp * /gsd mcp check <srv> — Detailed status for a specific server - * /gsd mcp init [dir] — Write project-local GSD workflow MCP config + * /gsd mcp init [dir] — Write project-local SF workflow MCP config */ import type { ExtensionCommandContext } from "@sf-run/pi-coding-agent"; @@ -49,7 +49,7 @@ export function formatMcpInitResult( `Project: ${targetPath}`, `Config: ${configPath}`, "", - "Claude Code can now load the GSD workflow MCP server from this folder.", + "Claude Code can now load the SF workflow MCP server from this folder.", ].join("\n"); } @@ -119,7 +119,7 @@ export function formatMcpStatusReport(servers: McpServerStatus[]): string { "No MCP servers configured.", "", "Add servers to .mcp.json or .gsd/mcp.json to enable MCP integrations.", - "Tip: run /gsd mcp init . to write the local GSD workflow MCP config.", + "Tip: run /gsd mcp init . to write the local SF workflow MCP config.", "See: https://modelcontextprotocol.io/quickstart", ].join("\n"); } @@ -287,7 +287,7 @@ export async function handleMcpStatus( "Usage: /gsd mcp [status|check <server>|init [dir]]\n\n" + " status Show all MCP server statuses (default)\n" + " check <server> Detailed status for a specific server\n" + - " init [dir] Write .mcp.json for the local GSD workflow MCP server", + " init [dir] Write .mcp.json for the local SF workflow MCP server", "warning", ); } diff --git a/src/resources/extensions/gsd/commands-pr-branch.ts b/src/resources/extensions/gsd/commands-pr-branch.ts index df28ea894..10a5caaaf 100644 --- a/src/resources/extensions/gsd/commands-pr-branch.ts +++ b/src/resources/extensions/gsd/commands-pr-branch.ts @@ -1,5 +1,5 @@ /** - * GSD Command — /gsd pr-branch + * SF Command — /gsd pr-branch * * Creates a clean PR branch by cherry-picking commits while stripping * any changes to .gsd/, .planning/, and PLAN.md paths. Useful for diff --git a/src/resources/extensions/gsd/commands-prefs-wizard.ts b/src/resources/extensions/gsd/commands-prefs-wizard.ts index ea19767fc..6968f84ed 100644 --- a/src/resources/extensions/gsd/commands-prefs-wizard.ts +++ b/src/resources/extensions/gsd/commands-prefs-wizard.ts @@ -1,5 +1,5 @@ /** - * GSD Preferences Wizard — TUI wizard for configuring GSD preferences. + * SF Preferences Wizard — TUI wizard for configuring SF preferences. * * Contains: handlePrefsWizard, buildCategorySummaries, all configure* functions, * serializePreferencesToFrontmatter, yamlSafeString, ensurePreferencesFile, @@ -84,7 +84,7 @@ export async function handlePrefs(args: string, ctx: ExtensionCommandContext): P : `missing: ${canonicalGlobal}`; const projectStatus = projectPrefs ? `present: ${projectPrefs.path}` : `missing: ${getProjectGSDPreferencesPath()}`; - const lines = [`GSD skill prefs — global ${globalStatus}; project ${projectStatus}`]; + const lines = [`SF skill prefs — global ${globalStatus}; project ${projectStatus}`]; const effective = loadEffectiveGSDPreferences(); let hasUnresolved = false; @@ -123,7 +123,7 @@ export async function handleImportClaude(ctx: ExtensionCommandContext, scope: "g const writePrefs = async (prefs: Record<string, unknown>): Promise<void> => { prefs.version = prefs.version || 1; const frontmatter = serializePreferencesToFrontmatter(prefs); - let body = "\n# GSD Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; + let body = "\n# SF Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; if (existsSync(path)) { const preserved = extractBodyAfterFrontmatter(readFileSync(path, "utf-8")); if (preserved) body = preserved; @@ -145,7 +145,7 @@ export async function handlePrefsMode(ctx: ExtensionCommandContext, scope: "glob prefs.version = prefs.version || 1; const frontmatter = serializePreferencesToFrontmatter(prefs); - let body = "\n# GSD Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; + let body = "\n# SF Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; if (existsSync(path)) { const preserved = extractBodyAfterFrontmatter(readFileSync(path, "utf-8")); if (preserved) body = preserved; @@ -704,7 +704,7 @@ export async function handlePrefsWizard( const existing = scope === "project" ? loadProjectGSDPreferences() : loadGlobalGSDPreferences(); const prefs: Record<string, unknown> = existing?.preferences ? { ...existing.preferences } : {}; - ctx.ui.notify(`GSD preferences (${scope}) — pick a category to configure.`, "info"); + ctx.ui.notify(`SF preferences (${scope}) — pick a category to configure.`, "info"); while (true) { const summaries = buildCategorySummaries(prefs); @@ -720,7 +720,7 @@ export async function handlePrefsWizard( `── Save & Exit ──`, ]; - const raw = await ctx.ui.select("GSD Preferences", options); + const raw = await ctx.ui.select("SF Preferences", options); const choice = typeof raw === "string" ? raw : ""; if (!choice || choice.includes("Save & Exit")) break; @@ -739,7 +739,7 @@ export async function handlePrefsWizard( const frontmatter = serializePreferencesToFrontmatter(prefs); // Preserve existing body content (everything after closing ---) - let body = "\n# GSD Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; + let body = "\n# SF Skill Preferences\n\nSee `~/.gsd/agent/extensions/gsd/docs/preferences-reference.md` for full field documentation and examples.\n"; if (existsSync(path)) { const preserved = extractBodyAfterFrontmatter(readFileSync(path, "utf-8")); if (preserved) body = preserved; @@ -853,12 +853,12 @@ export async function ensurePreferencesFile( if (!existsSync(path)) { const template = await loadFile(join(dirname(fileURLToPath(import.meta.url)), "templates", "PREFERENCES.md")); if (!template) { - ctx.ui.notify("Could not load GSD preferences template.", "error"); + ctx.ui.notify("Could not load SF preferences template.", "error"); return; } await saveFile(path, template); - ctx.ui.notify(`Created ${scope} GSD skill preferences at ${path}`, "info"); + ctx.ui.notify(`Created ${scope} SF skill preferences at ${path}`, "info"); } else { - ctx.ui.notify(`Using existing ${scope} GSD skill preferences at ${path}`, "info"); + ctx.ui.notify(`Using existing ${scope} SF skill preferences at ${path}`, "info"); } } diff --git a/src/resources/extensions/gsd/commands-session-report.ts b/src/resources/extensions/gsd/commands-session-report.ts index 8e6aa66ab..40e312d7d 100644 --- a/src/resources/extensions/gsd/commands-session-report.ts +++ b/src/resources/extensions/gsd/commands-session-report.ts @@ -1,5 +1,5 @@ /** - * GSD Command — /gsd session-report + * SF Command — /gsd session-report * * Summarizes the current session: tasks completed, cost, tokens, * duration, model usage breakdown. diff --git a/src/resources/extensions/gsd/commands-ship.ts b/src/resources/extensions/gsd/commands-ship.ts index bba26cbf9..3d8365d01 100644 --- a/src/resources/extensions/gsd/commands-ship.ts +++ b/src/resources/extensions/gsd/commands-ship.ts @@ -1,5 +1,5 @@ /** - * GSD Command — /gsd ship + * SF Command — /gsd ship * * Creates a PR from milestone artifacts: generates title + body from * roadmap, slice summaries, and metrics, then opens via `gh pr create`. @@ -141,7 +141,7 @@ function generatePRContent(basePath: string, milestoneId: string, milestoneTitle // AI disclosure sections.push("---\n"); - sections.push("*This PR was prepared with AI assistance (GSD auto-mode).*"); + sections.push("*This PR was prepared with AI assistance (SF auto-mode).*"); return { title, body: sections.join("\n") }; } @@ -173,7 +173,7 @@ export async function handleShip( const milestoneId = state.activeMilestone.id; const milestoneTitle = state.activeMilestone.title ?? ""; - // 2. Check for incomplete work (use GSD phase as proxy — no phase field on ActiveRef) + // 2. Check for incomplete work (use SF phase as proxy — no phase field on ActiveRef) if (state.phase !== "complete" && !force) { ctx.ui.notify( `Milestone ${milestoneId} may not be complete (phase: ${state.phase}). Use --force to ship anyway.`, diff --git a/src/resources/extensions/gsd/commands-workflow-templates.ts b/src/resources/extensions/gsd/commands-workflow-templates.ts index 7b72a8c3c..92ae82bde 100644 --- a/src/resources/extensions/gsd/commands-workflow-templates.ts +++ b/src/resources/extensions/gsd/commands-workflow-templates.ts @@ -1,5 +1,5 @@ /** - * GSD Workflow Template Commands — /gsd start, /gsd templates + * SF Workflow Template Commands — /gsd start, /gsd templates * * Handles the `/gsd start [template] [description]` and `/gsd templates` commands. * Resolves templates by name or auto-detection, then dispatches the workflow prompt. @@ -321,7 +321,7 @@ export async function handleStart( " refactor Inventory → plan → migrate → verify\n" + " security-audit Scan → triage → remediate → re-scan\n" + " dep-upgrade Assess → upgrade → fix → verify\n" + - " full-project Complete GSD with full ceremony\n\n" + + " full-project Complete SF with full ceremony\n\n" + "Examples:\n" + " /gsd start bugfix fix login button not responding\n" + " /gsd start spike evaluate auth libraries\n" + @@ -383,7 +383,7 @@ export async function handleStart( return; } - // ─── Route full-project to standard GSD workflow ──────────────────────── + // ─── Route full-project to standard SF workflow ──────────────────────── if (templateId === "full-project") { const root = gsdRoot(basePath); @@ -396,7 +396,7 @@ export async function handleStart( pi.sendMessage( { customType: "gsd-workflow-template", - content: "The user wants to start a full GSD project. Run `/gsd init` to bootstrap the project, then `/gsd auto` to begin execution.", + content: "The user wants to start a full SF project. Run `/gsd init` to bootstrap the project, then `/gsd auto` to begin execution.", display: false, }, { triggerTurn: true }, diff --git a/src/resources/extensions/gsd/commands/catalog.ts b/src/resources/extensions/gsd/commands/catalog.ts index 8a7095170..ba746349f 100644 --- a/src/resources/extensions/gsd/commands/catalog.ts +++ b/src/resources/extensions/gsd/commands/catalog.ts @@ -5,7 +5,7 @@ import { join } from "node:path"; import { loadRegistry } from "../workflow-templates.js"; import { resolveProjectRoot } from "../worktree.js"; -const gsdHome = process.env.GSD_HOME || join(homedir(), ".gsd"); +const gsdHome = process.env.SF_HOME || join(homedir(), ".gsd"); export interface GsdCommandDefinition { cmd: string; @@ -14,8 +14,8 @@ export interface GsdCommandDefinition { type CompletionMap = Record<string, readonly GsdCommandDefinition[]>; -export const GSD_COMMAND_DESCRIPTION = - "GSD — Get Shit Done: /gsd help|start|templates|next|auto|stop|pause|status|widget|visualize|queue|quick|discuss|capture|triage|dispatch|history|undo|undo-task|reset-slice|rate|skip|export|cleanup|model|mode|prefs|config|keys|hooks|run-hook|skill-health|doctor|logs|forensics|changelog|migrate|remote|steer|knowledge|new-milestone|parallel|cmux|park|unpark|init|setup|inspect|extensions|update|fast|mcp|rethink|codebase|notifications|ship|do|session-report|backlog|pr-branch|add-tests"; +export const SF_COMMAND_DESCRIPTION = + "SF — Singularity Forge: /gsd help|start|templates|next|auto|stop|pause|status|widget|visualize|queue|quick|discuss|capture|triage|dispatch|history|undo|undo-task|reset-slice|rate|skip|export|cleanup|model|mode|prefs|config|keys|hooks|run-hook|skill-health|doctor|logs|forensics|changelog|migrate|remote|steer|knowledge|new-milestone|parallel|cmux|park|unpark|init|setup|inspect|extensions|update|fast|mcp|rethink|codebase|notifications|ship|do|session-report|backlog|pr-branch|add-tests"; export const TOP_LEVEL_SUBCOMMANDS: readonly GsdCommandDefinition[] = [ { cmd: "help", desc: "Categorized command reference with descriptions" }, @@ -65,7 +65,7 @@ export const TOP_LEVEL_SUBCOMMANDS: readonly GsdCommandDefinition[] = [ { cmd: "cmux", desc: "Manage cmux integration (status, sidebar, notifications, splits)" }, { cmd: "park", desc: "Park a milestone — skip without deleting" }, { cmd: "unpark", desc: "Reactivate a parked milestone" }, - { cmd: "update", desc: "Update GSD to the latest version" }, + { cmd: "update", desc: "Update SF to the latest version" }, { cmd: "start", desc: "Start a workflow template (bugfix, spike, feature, etc.)" }, { cmd: "templates", desc: "List available workflow templates" }, { cmd: "extensions", desc: "Manage extensions (list, enable, disable, info)" }, @@ -75,7 +75,7 @@ export const TOP_LEVEL_SUBCOMMANDS: readonly GsdCommandDefinition[] = [ { cmd: "workflow", desc: "Custom workflow lifecycle (new, run, list, validate, pause, resume)" }, { cmd: "codebase", desc: "Generate, refresh, and inspect the codebase map cache (.gsd/CODEBASE.md)" }, { cmd: "ship", desc: "Create PR from milestone artifacts and open for review" }, - { cmd: "do", desc: "Route freeform text to the right GSD command" }, + { cmd: "do", desc: "Route freeform text to the right SF command" }, { cmd: "session-report", desc: "Session cost, tokens, and work summary" }, { cmd: "backlog", desc: "Manage backlog items (add, promote, remove, list)" }, { cmd: "pr-branch", desc: "Create clean PR branch filtering .gsd/ commits" }, @@ -184,7 +184,7 @@ const NESTED_COMPLETIONS: CompletionMap = { { cmd: "refactor", desc: "Inventory, plan waves, migrate, verify" }, { cmd: "security-audit", desc: "Scan, triage, remediate, re-scan" }, { cmd: "dep-upgrade", desc: "Assess, upgrade, fix breaks, verify" }, - { cmd: "full-project", desc: "Complete GSD workflow with full ceremony" }, + { cmd: "full-project", desc: "Complete SF workflow with full ceremony" }, { cmd: "resume", desc: "Resume an in-progress workflow" }, { cmd: "--list", desc: "List all available templates" }, { cmd: "--dry-run", desc: "Preview workflow without executing" }, @@ -207,7 +207,7 @@ const NESTED_COMPLETIONS: CompletionMap = { mcp: [ { cmd: "status", desc: "Show all MCP server statuses (default)" }, { cmd: "check", desc: "Detailed status for a specific server" }, - { cmd: "init", desc: "Write .mcp.json for the local GSD workflow MCP server" }, + { cmd: "init", desc: "Write .mcp.json for the local SF workflow MCP server" }, ], doctor: [ { cmd: "fix", desc: "Auto-fix detected issues" }, diff --git a/src/resources/extensions/gsd/commands/context.ts b/src/resources/extensions/gsd/commands/context.ts index 5fdb6641b..6868fdb47 100644 --- a/src/resources/extensions/gsd/commands/context.ts +++ b/src/resources/extensions/gsd/commands/context.ts @@ -13,7 +13,7 @@ export interface GsdDispatchContext { } /** - * Typed error for when GSD is run outside a valid project directory. + * Typed error for when SF is run outside a valid project directory. * Command handlers catch this to show a friendly message instead of a raw exception. */ export class GSDNoProjectError extends Error { @@ -35,7 +35,7 @@ export function projectRoot(): string { const pathToCheck = root !== cwd ? cwd : root; const result = validateDirectory(pathToCheck); if (result.severity === "blocked") { - throw new GSDNoProjectError(result.reason ?? "GSD must be run inside a project directory."); + throw new GSDNoProjectError(result.reason ?? "SF must be run inside a project directory."); } return root; } @@ -55,7 +55,7 @@ export async function guardRemoteSession( // In RPC/web bridge mode, interactive TUI prompts (showNextAction) block // forever because there is no terminal to answer them. Notify and bail. - if (process.env.GSD_WEB_BRIDGE_TUI === "1") { + if (process.env.SF_WEB_BRIDGE_TUI === "1") { ctx.ui.notify( `Another auto-mode session (PID ${remote.pid}) is running on this project (${unitLabel}). ` + `Stop it first with /gsd stop, or use /gsd steer to redirect it.`, @@ -74,7 +74,7 @@ export async function guardRemoteSession( { id: "status", label: "View status", - description: "Show the current GSD progress dashboard.", + description: "Show the current SF progress dashboard.", recommended: true, }, { diff --git a/src/resources/extensions/gsd/commands/handlers/core.ts b/src/resources/extensions/gsd/commands/handlers/core.ts index f905d3ad5..faa7bfd94 100644 --- a/src/resources/extensions/gsd/commands/handlers/core.ts +++ b/src/resources/extensions/gsd/commands/handlers/core.ts @@ -14,7 +14,7 @@ import { formattedShortcutPair } from "../../shortcut-defs.js"; export function showHelp(ctx: ExtensionCommandContext, args = ""): void { const summaryLines = [ - "GSD — Get Shit Done\n", + "SF — Singularity Forge\n", "QUICK START", " /gsd start <tpl> Start a workflow template", " /gsd Run next unit (same as /gsd next)", @@ -47,7 +47,7 @@ export function showHelp(ctx: ExtensionCommandContext, args = ""): void { ]; const fullLines = [ - "GSD — Get Shit Done\n", + "SF — Singularity Forge\n", "WORKFLOW", " /gsd start <tpl> Start a workflow template (bugfix, spike, feature, hotfix, etc.)", " /gsd templates List available workflow templates [info <name>]", @@ -104,7 +104,7 @@ export function showHelp(ctx: ExtensionCommandContext, args = ""): void { " /gsd migrate Migrate .planning/ (v1) to .gsd/ (v2) format", " /gsd remote Control remote auto-mode [slack|discord|status|disconnect]", " /gsd inspect Show SQLite DB diagnostics (schema, row counts, recent entries)", - " /gsd update Update GSD to the latest version via npm", + " /gsd update Update SF to the latest version via npm", ]; const full = ["full", "--full", "all"].includes(args.trim().toLowerCase()); ctx.ui.notify((full ? fullLines : summaryLines).join("\n"), "info"); @@ -118,7 +118,7 @@ export async function handleStatus(ctx: ExtensionCommandContext): Promise<void> const state = await deriveState(basePath); if (state.registry.length === 0) { - ctx.ui.notify("No GSD milestones found. Run /gsd to start.", "info"); + ctx.ui.notify("No SF milestones found. Run /gsd to start.", "info"); return; } @@ -176,7 +176,7 @@ export async function handleSetup(args: string, ctx: ExtensionCommandContext): P const globalConfigured = hasGlobalSetup(); const detection = detectProjectState(projectRoot()); - const statusLines = ["GSD Setup Status\n"]; + const statusLines = ["SF Setup Status\n"]; statusLines.push(` Global preferences: ${globalConfigured ? "configured" : "not set"}`); statusLines.push(` Project state: ${detection.state}`); if (detection.projectSignals.primaryLanguage) { @@ -337,7 +337,7 @@ async function handleModel(trimmedArgs: string, ctx: ExtensionCommandContext, pi return; } - // /gsd model is an explicit per-session pin for GSD dispatches. + // /gsd model is an explicit per-session pin for SF dispatches. // This is captured at auto bootstrap so it survives internal session // switches during /gsd auto and /gsd next runs. const sessionId = ctx.sessionManager?.getSessionId?.(); @@ -426,7 +426,7 @@ export async function handleCoreCommand( } export function formatTextStatus(state: GSDState): string { - const lines: string[] = ["GSD Status\n"]; + const lines: string[] = ["SF Status\n"]; lines.push(formatProgressLine(computeProgressScore())); lines.push(""); lines.push(`Phase: ${state.phase}`); diff --git a/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts b/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts index 3434634f7..1e5b78976 100644 --- a/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts +++ b/src/resources/extensions/gsd/commands/handlers/notifications-handler.ts @@ -1,4 +1,4 @@ -// GSD Extension — /gsd notifications Command Handler +// SF Extension — /gsd notifications Command Handler // View, filter, and clear the persistent notification history. import type { ExtensionAPI, ExtensionCommandContext } from "@sf-run/pi-coding-agent"; diff --git a/src/resources/extensions/gsd/commands/index.ts b/src/resources/extensions/gsd/commands/index.ts index 816cf4654..af26e11bd 100644 --- a/src/resources/extensions/gsd/commands/index.ts +++ b/src/resources/extensions/gsd/commands/index.ts @@ -1,10 +1,10 @@ import type { ExtensionAPI, ExtensionCommandContext } from "@sf-run/pi-coding-agent"; -import { GSD_COMMAND_DESCRIPTION, getGsdArgumentCompletions } from "./catalog.js"; +import { SF_COMMAND_DESCRIPTION, getGsdArgumentCompletions } from "./catalog.js"; export function registerGSDCommand(pi: ExtensionAPI): void { pi.registerCommand("gsd", { - description: GSD_COMMAND_DESCRIPTION, + description: SF_COMMAND_DESCRIPTION, getArgumentCompletions: getGsdArgumentCompletions, handler: async (args: string, ctx: ExtensionCommandContext) => { const { handleGSDCommand } = await import("./dispatcher.js"); diff --git a/src/resources/extensions/gsd/complexity-classifier.ts b/src/resources/extensions/gsd/complexity-classifier.ts index 82027227f..ea085b1d7 100644 --- a/src/resources/extensions/gsd/complexity-classifier.ts +++ b/src/resources/extensions/gsd/complexity-classifier.ts @@ -1,4 +1,4 @@ -// GSD Extension — Complexity Classifier +// SF Extension — Complexity Classifier // Classifies unit complexity for dynamic model routing. // Pure heuristics + adaptive learning — no LLM calls. Sub-millisecond classification. diff --git a/src/resources/extensions/gsd/config-overlay.ts b/src/resources/extensions/gsd/config-overlay.ts index 2faad694f..5d546797a 100644 --- a/src/resources/extensions/gsd/config-overlay.ts +++ b/src/resources/extensions/gsd/config-overlay.ts @@ -1,7 +1,7 @@ /** - * GSD Configuration Overlay + * SF Configuration Overlay * - * Read-only TUI overlay showing the effective GSD configuration: + * Read-only TUI overlay showing the effective SF configuration: * token profile, model assignments, dynamic routing, git settings, * budget, workflow toggles, and preference file sources. * Opened via `/gsd show-config` or `/gsd config`. @@ -202,7 +202,7 @@ function collectConfigSections(): ConfigSection[] { export function formatConfigText(): string { const sections = collectConfigSections(); - const lines: string[] = ["GSD Configuration\n"]; + const lines: string[] = ["SF Configuration\n"]; let maxLabel = 0; for (const section of sections) { @@ -293,7 +293,7 @@ export class GSDConfigOverlay { const allLines: string[] = []; // Header - allLines.push(t.bold(t.fg("accent", " GSD Configuration "))); + allLines.push(t.bold(t.fg("accent", " SF Configuration "))); allLines.push(t.fg("muted", "\u2500".repeat(w))); // Find max label width for alignment diff --git a/src/resources/extensions/gsd/constants.ts b/src/resources/extensions/gsd/constants.ts index 15812dc93..052ae789d 100644 --- a/src/resources/extensions/gsd/constants.ts +++ b/src/resources/extensions/gsd/constants.ts @@ -1,7 +1,7 @@ /** - * GSD Extension — Shared Constants + * SF Extension — Shared Constants * - * Centralized timeout and cache-size constants used across the GSD extension. + * Centralized timeout and cache-size constants used across the SF extension. */ // ─── Timeouts ───────────────────────────────────────────────────────────────── @@ -23,11 +23,11 @@ export const CACHE_MAX = 50; // ─── Tool Scoping ───────────────────────────────────────────────────────────── /** - * GSD tools allowed during discuss flows (#2949). + * SF tools allowed during discuss flows (#2949). * * xAI/Grok (and potentially other providers with grammar-based constrained * decoding) return "Grammar is too complex" (HTTP 400) when the combined - * tool schemas exceed their internal grammar limit. The full GSD tool set + * tool schemas exceed their internal grammar limit. The full SF tool set * registers ~33 tools with deeply nested schemas; discuss flows only need * a small subset. * diff --git a/src/resources/extensions/gsd/context-masker.ts b/src/resources/extensions/gsd/context-masker.ts index 824c3a91e..13eddd50f 100644 --- a/src/resources/extensions/gsd/context-masker.ts +++ b/src/resources/extensions/gsd/context-masker.ts @@ -1,5 +1,5 @@ /** - * Observation masking for GSD auto-mode sessions. + * Observation masking for SF auto-mode sessions. * * Replaces tool result content older than N turns with a placeholder. * Reduces context bloat between compactions with zero LLM overhead. diff --git a/src/resources/extensions/gsd/context-store.ts b/src/resources/extensions/gsd/context-store.ts index df938555a..e0db59594 100644 --- a/src/resources/extensions/gsd/context-store.ts +++ b/src/resources/extensions/gsd/context-store.ts @@ -1,4 +1,4 @@ -// GSD Context Store — Query Layer & Formatters +// SF Context Store — Query Layer & Formatters // // Typed query functions for decisions and requirements from the DB views, // with optional filtering. Format functions produce prompt-injectable markdown. diff --git a/src/resources/extensions/gsd/crash-recovery.ts b/src/resources/extensions/gsd/crash-recovery.ts index 2f76b61ad..8fb4c1137 100644 --- a/src/resources/extensions/gsd/crash-recovery.ts +++ b/src/resources/extensions/gsd/crash-recovery.ts @@ -1,5 +1,5 @@ /** - * GSD Crash Recovery + * SF Crash Recovery * * Detects interrupted auto-mode sessions via a lock file. * Written on auto-start, updated on each unit dispatch, deleted on clean stop. diff --git a/src/resources/extensions/gsd/custom-verification.ts b/src/resources/extensions/gsd/custom-verification.ts index 77d76d30e..931572a2c 100644 --- a/src/resources/extensions/gsd/custom-verification.ts +++ b/src/resources/extensions/gsd/custom-verification.ts @@ -150,7 +150,7 @@ function handleContentHeuristic( * * SECURITY: The command string comes from a frozen DEFINITION.yaml written * at run-creation time. The trust boundary is the workflow definition author. - * Commands run with the same privileges as the GSD process. Only use + * Commands run with the same privileges as the SF process. Only use * shell-command verification with definitions you trust. */ function handleShellCommand( diff --git a/src/resources/extensions/gsd/dashboard-overlay.ts b/src/resources/extensions/gsd/dashboard-overlay.ts index 4f6cad5a1..aa47663dc 100644 --- a/src/resources/extensions/gsd/dashboard-overlay.ts +++ b/src/resources/extensions/gsd/dashboard-overlay.ts @@ -1,5 +1,5 @@ /** - * GSD Dashboard Overlay + * SF Dashboard Overlay * * Full-screen overlay showing auto-mode progress: milestone/slice/task * breakdown, current unit, completed units, timing, and activity log. @@ -297,7 +297,7 @@ export class GSDDashboardOverlay { const hr = () => row(th.fg("dim", "─".repeat(contentWidth))); const centered = (content: string) => row(centerLine(content, contentWidth)); - const title = th.fg("accent", th.bold("GSD Dashboard")); + const title = th.fg("accent", th.bold("SF Dashboard")); const isRemote = !!this.dashData.remoteSession; const status = this.dashData.active ? `${Date.now() % 2000 < 1000 ? th.fg("success", "●") : th.fg("dim", "○")} ${th.fg("success", "AUTO")}` diff --git a/src/resources/extensions/gsd/db-writer.ts b/src/resources/extensions/gsd/db-writer.ts index ee09cf99c..b7950bb7e 100644 --- a/src/resources/extensions/gsd/db-writer.ts +++ b/src/resources/extensions/gsd/db-writer.ts @@ -1,4 +1,4 @@ -// GSD DB Writer — Markdown generators + DB-first write helpers +// SF DB Writer — Markdown generators + DB-first write helpers // // The missing DB→markdown direction. S03 established markdown→DB (md-importer.ts). // This module generates DECISIONS.md and REQUIREMENTS.md from DB state, @@ -13,7 +13,7 @@ import { readFileSync, existsSync, statSync } from 'node:fs'; import type { Decision, Requirement } from './types.js'; import { resolveGsdRootFile } from './paths.js'; import { saveFile } from './files.js'; -import { GSDError, GSD_STALE_STATE, GSD_IO_ERROR } from './errors.js'; +import { GSDError, SF_STALE_STATE, SF_IO_ERROR } from './errors.js'; import { logWarning, logError } from './workflow-logger.js'; import { invalidateStateCache } from './state.js'; import { clearPathCache } from './paths.js'; @@ -288,7 +288,7 @@ export async function saveRequirementToDb( // Atomic ID assignment + insert inside a transaction. const id = db.transaction(() => { const adapter = db._getAdapter(); - if (!adapter) throw new GSDError(GSD_STALE_STATE, "gsd-db: No database open"); + if (!adapter) throw new GSDError(SF_STALE_STATE, "gsd-db: No database open"); const row = adapter .prepare('SELECT MAX(CAST(SUBSTR(id, 2) AS INTEGER)) as max_num FROM requirements') @@ -396,7 +396,7 @@ export async function saveDecisionToDb( // parallel calls from racing on the same MAX(id) value. const id = db.transaction(() => { const adapter = db._getAdapter(); - if (!adapter) throw new GSDError(GSD_STALE_STATE, "gsd-db: No database open"); + if (!adapter) throw new GSDError(SF_STALE_STATE, "gsd-db: No database open"); const row = adapter .prepare('SELECT MAX(CAST(SUBSTR(id, 2) AS INTEGER)) as max_num FROM decisions') @@ -680,7 +680,7 @@ export async function saveArtifactToDb( const gsdDir = resolve(basePath, '.gsd'); const fullPath = resolve(basePath, '.gsd', opts.path); if (!fullPath.startsWith(gsdDir)) { - throw new GSDError(GSD_IO_ERROR, `saveArtifactToDb: path escapes .gsd/ directory: ${opts.path}`); + throw new GSDError(SF_IO_ERROR, `saveArtifactToDb: path escapes .gsd/ directory: ${opts.path}`); } // Shrinkage guard: if the file already exists and the new content is diff --git a/src/resources/extensions/gsd/debug-logger.ts b/src/resources/extensions/gsd/debug-logger.ts index df1ef9b4e..4e29b633c 100644 --- a/src/resources/extensions/gsd/debug-logger.ts +++ b/src/resources/extensions/gsd/debug-logger.ts @@ -1,5 +1,5 @@ -// GSD Extension — Debug Logger -// Structured JSONL debug logging for diagnosing stuck/slow GSD sessions. +// SF Extension — Debug Logger +// Structured JSONL debug logging for diagnosing stuck/slow SF sessions. // Zero overhead when disabled — all public functions are no-ops. import { appendFileSync, mkdirSync, readdirSync, unlinkSync } from 'node:fs'; @@ -34,7 +34,7 @@ const MAX_DEBUG_LOGS = 5; /** * Enable debug logging. Creates the log file and prunes old logs. - * Can be activated via `--debug` flag or `GSD_DEBUG=1` env var. + * Can be activated via `--debug` flag or `SF_DEBUG=1` env var. */ export function enableDebug(basePath: string): void { const debugDir = join(gsdRoot(basePath), 'debug'); @@ -98,7 +98,7 @@ export function debugLog(event: string, data?: Record<string, unknown>): void { try { appendFileSync(_logPath, JSON.stringify(entry) + '\n'); } catch { - // Silently ignore write failures — debug logging must never break GSD + // Silently ignore write failures — debug logging must never break SF } } diff --git a/src/resources/extensions/gsd/detection.ts b/src/resources/extensions/gsd/detection.ts index 3cfa9bdb8..535b553b6 100644 --- a/src/resources/extensions/gsd/detection.ts +++ b/src/resources/extensions/gsd/detection.ts @@ -1,5 +1,5 @@ /** - * GSD Detection — Project state and ecosystem detection. + * SF Detection — Project state and ecosystem detection. * * Pure functions, zero UI dependencies, zero side effects. * Used by init-wizard.ts and guided-flow.ts to determine what onboarding @@ -11,15 +11,15 @@ import { join } from "node:path"; import { homedir } from "node:os"; import { gsdRoot } from "./paths.js"; -const gsdHome = process.env.GSD_HOME || join(homedir(), ".gsd"); +const gsdHome = process.env.SF_HOME || join(homedir(), ".gsd"); // ─── Types ────────────────────────────────────────────────────────────────────── export interface ProjectDetection { - /** What kind of GSD state exists in this directory */ + /** What kind of SF state exists in this directory */ state: "none" | "v1-planning" | "v2-gsd" | "v2-gsd-empty"; - /** Is this the first time GSD has been used on this machine? */ + /** Is this the first time SF has been used on this machine? */ isFirstEverLaunch: boolean; /** Does ~/.gsd/ exist with preferences? */ @@ -320,7 +320,7 @@ export function detectProjectState(basePath: string): ProjectDetection { // ─── V1 Planning Detection ────────────────────────────────────────────────────── /** - * Detect a v1 .planning/ directory with GSD v1 markers. + * Detect a v1 .planning/ directory with SF v1 markers. * Returns null if no .planning/ directory found. */ export function detectV1Planning(basePath: string): V1Detection | null { @@ -357,7 +357,7 @@ export function detectV1Planning(basePath: string): V1Detection | null { }; } -// ─── V2 GSD Detection ────────────────────────────────────────────────────────── +// ─── V2 SF Detection ────────────────────────────────────────────────────────── function detectV2Gsd(basePath: string): V2Detection | null { const gsdPath = gsdRoot(basePath); @@ -716,7 +716,7 @@ function detectVerificationCommands( // ─── Global Setup Detection ───────────────────────────────────────────────────── /** - * Check if global GSD setup exists (has ~/.gsd/ with preferences). + * Check if global SF setup exists (has ~/.gsd/ with preferences). */ export function hasGlobalSetup(): boolean { return ( @@ -726,7 +726,7 @@ export function hasGlobalSetup(): boolean { } /** - * Check if this is the very first time GSD has been used on this machine. + * Check if this is the very first time SF has been used on this machine. * Returns true if ~/.gsd/ doesn't exist or has no preferences or auth. */ export function isFirstEverLaunch(): boolean { diff --git a/src/resources/extensions/gsd/dev-execution-policy.ts b/src/resources/extensions/gsd/dev-execution-policy.ts index 873b91aec..96f657724 100644 --- a/src/resources/extensions/gsd/dev-execution-policy.ts +++ b/src/resources/extensions/gsd/dev-execution-policy.ts @@ -14,7 +14,7 @@ export class DevExecutionPolicy implements ExecutionPolicy { _basePath: string, _milestoneId: string, ): Promise<void> { - // no-op — workspace preparation handled by existing GSD logic + // no-op — workspace preparation handled by existing SF logic } async selectModel( diff --git a/src/resources/extensions/gsd/dev-workflow-engine.ts b/src/resources/extensions/gsd/dev-workflow-engine.ts index 7d698dcbd..6d79cc22b 100644 --- a/src/resources/extensions/gsd/dev-workflow-engine.ts +++ b/src/resources/extensions/gsd/dev-workflow-engine.ts @@ -1,8 +1,8 @@ /** * dev-workflow-engine.ts — DevWorkflowEngine implementation. * - * Implements WorkflowEngine by delegating to existing GSD state derivation - * and dispatch logic. This is the "dev" engine — it wraps the current GSD + * Implements WorkflowEngine by delegating to existing SF state derivation + * and dispatch logic. This is the "dev" engine — it wraps the current SF * auto-mode behavior behind the engine-polymorphic interface. */ @@ -24,7 +24,7 @@ import { loadEffectiveGSDPreferences } from "./preferences.js"; // ─── Bridge: DispatchAction → EngineDispatchAction ──────────────────────── /** - * Map a GSD-specific DispatchAction (which carries `matchedRule`, `unitType`, + * Map a SF-specific DispatchAction (which carries `matchedRule`, `unitType`, * etc.) to the engine-generic EngineDispatchAction discriminated union. * * Exported for unit testing. @@ -101,7 +101,7 @@ export class DevWorkflowEngine implements WorkflowEngine { getDisplayMetadata(state: EngineState): DisplayMetadata { return { - engineLabel: "GSD Dev", + engineLabel: "SF Dev", currentPhase: state.phase, progressSummary: `${state.currentMilestoneId ?? "no milestone"} / ${state.activeSliceId ?? "—"} / ${state.activeTaskId ?? "—"}`, stepCount: null, diff --git a/src/resources/extensions/gsd/diff-context.ts b/src/resources/extensions/gsd/diff-context.ts index 637679c94..cf00d24b5 100644 --- a/src/resources/extensions/gsd/diff-context.ts +++ b/src/resources/extensions/gsd/diff-context.ts @@ -8,7 +8,7 @@ import { execFileSync, execFile } from "node:child_process"; import { resolve } from "node:path"; -import { GSDError, GSD_PARSE_ERROR } from "./errors.js"; +import { GSDError, SF_PARSE_ERROR } from "./errors.js"; // ─── Types ────────────────────────────────────────────────────────────────── @@ -76,7 +76,7 @@ export async function getRecentlyChangedFiles( try { const days = Math.max(1, Math.floor(Number(sinceDays))); - if (!Number.isFinite(days)) throw new GSDError(GSD_PARSE_ERROR, "invalid sinceDays"); + if (!Number.isFinite(days)) throw new GSDError(SF_PARSE_ERROR, "invalid sinceDays"); // Run all three queries concurrently — they read independent git state const [logRaw, stagedRaw, statusRaw] = await Promise.all([ diff --git a/src/resources/extensions/gsd/dispatch-guard.ts b/src/resources/extensions/gsd/dispatch-guard.ts index 4f7422f88..85274e00b 100644 --- a/src/resources/extensions/gsd/dispatch-guard.ts +++ b/src/resources/extensions/gsd/dispatch-guard.ts @@ -1,4 +1,4 @@ -// GSD Dispatch Guard — prevents out-of-order slice dispatch +// SF Dispatch Guard — prevents out-of-order slice dispatch import { resolveMilestoneFile } from "./paths.js"; import { findMilestoneIds } from "./guided-flow.js"; @@ -27,12 +27,12 @@ export function getPriorSliceCompletionBlocker( const { milestone: targetMid, slice: targetSid } = parseUnitId(unitId); if (!targetMid || !targetSid) return null; - // Parallel worker isolation: when GSD_MILESTONE_LOCK is set, this worker + // Parallel worker isolation: when SF_MILESTONE_LOCK is set, this worker // is scoped to a single milestone. Skip the cross-milestone dependency // check — other milestones are being handled by their own workers. // Without this, the dispatch guard sees incomplete slices in M010/M011 // (cloned into the worktree DB) and blocks M012 from ever starting. #2797 - const milestoneLock = process.env.GSD_MILESTONE_LOCK; + const milestoneLock = process.env.SF_MILESTONE_LOCK; // Use findMilestoneIds to respect custom queue order. // Only check milestones that come BEFORE the target in queue order. diff --git a/src/resources/extensions/gsd/docs/claude-marketplace-import.md b/src/resources/extensions/gsd/docs/claude-marketplace-import.md index b9126b1e8..753a1ac1d 100644 --- a/src/resources/extensions/gsd/docs/claude-marketplace-import.md +++ b/src/resources/extensions/gsd/docs/claude-marketplace-import.md @@ -1,12 +1,12 @@ # Claude Marketplace Import -This document describes the Claude marketplace import feature in GSD: what it reads, what it imports, what it persists, and what it does not translate into active GSD/Pi runtime behavior. +This document describes the Claude marketplace import feature in SF: what it reads, what it imports, what it persists, and what it does not translate into active SF/Pi runtime behavior. --- ## What this feature does -GSD can read Claude Code marketplace catalogs, inspect the plugins they reference, and import selected Claude skills into GSD/Pi while preserving Claude-style namespace identity. +SF can read Claude Code marketplace catalogs, inspect the plugins they reference, and import selected Claude skills into SF/Pi while preserving Claude-style namespace identity. The interactive entry point is: @@ -53,25 +53,25 @@ Anthropic also documents user-added marketplace sources under: ~/.claude/plugins/marketplaces ``` -GSD aligns its Claude import flow to that model. +SF aligns its Claude import flow to that model. --- -## Where GSD looks +## Where SF looks -For Claude plugin and marketplace material, GSD prefers Claude-managed locations first: +For Claude plugin and marketplace material, SF prefers Claude-managed locations first: 1. `~/.claude/plugins/marketplaces` 2. `~/.claude/plugins/cache` 3. `~/.claude/plugins` -After that, GSD still allows local clone-style convenience paths such as sibling repos or `~/repos/...` paths. Those fallbacks remain supported for developer workflows, but they are not the primary Claude storage model. +After that, SF still allows local clone-style convenience paths such as sibling repos or `~/repos/...` paths. Those fallbacks remain supported for developer workflows, but they are not the primary Claude storage model. --- -## What GSD imports +## What SF imports -### Imported into GSD/Pi settings +### Imported into SF/Pi settings - Claude skills discovered directly from configured skill roots - Marketplace-derived skills @@ -92,7 +92,7 @@ scientific-method:experiment-protocol - hooks - MCP server definitions - LSP server definitions -- other plugin metadata that does not currently map directly into active GSD/Pi runtime surfaces +- other plugin metadata that does not currently map directly into active SF/Pi runtime surfaces --- @@ -105,13 +105,13 @@ The import flow does the following: 3. inspect discovered plugins and inventory their components 4. let you select components to import 5. validate the selection for canonical conflicts and ambiguity -6. persist imported resources into GSD/Pi settings +6. persist imported resources into SF/Pi settings --- ## Namespace behavior -GSD preserves Claude plugin namespace semantics rather than flattening plugin components into anonymous global names. +SF preserves Claude plugin namespace semantics rather than flattening plugin components into anonymous global names. ### Canonical references @@ -122,11 +122,11 @@ Canonical references remain available for imported components: ### Shorthand -GSD supports shorthand lookup when it is unambiguous. +SF supports shorthand lookup when it is unambiguous. ### Local-first resolution -When a namespaced component refers to another component by bare name, GSD tries the same plugin namespace first before broader lookup. +When a namespaced component refers to another component by bare name, SF tries the same plugin namespace first before broader lookup. --- @@ -138,7 +138,7 @@ Claude plugin agent directories are markdown agent-definition directories, for e .../plugins/python3-development/agents ``` -GSD does **not** persist imported marketplace agent directories into: +SF does **not** persist imported marketplace agent directories into: ```json settings.packages @@ -154,7 +154,7 @@ Persisting an `.../agents` directory into `settings.packages` can cause Pi start Cannot find module '.../agents' ``` -GSD now avoids writing those entries. +SF now avoids writing those entries. --- @@ -162,7 +162,7 @@ GSD now avoids writing those entries. ### Skills -Imported skills are persisted into Pi skill settings. Depending on the selection path, they may also be added to GSD preferences. +Imported skills are persisted into Pi skill settings. Depending on the selection path, they may also be added to SF preferences. ### Marketplace agents @@ -172,7 +172,7 @@ Marketplace agents remain part of the import model and validation surface, but t ## Diagnostics -GSD distinguishes between: +SF distinguishes between: - **canonical conflicts** — hard errors - **shorthand overlaps** — warnings when canonical names remain distinct @@ -201,7 +201,7 @@ Real host validation included: ## Current limitations -- GSD does not yet translate every Claude plugin component type into active Pi-native runtime behavior +- SF does not yet translate every Claude plugin component type into active Pi-native runtime behavior - marketplace-derived agents are not persisted as package roots, by design - clone-style local fallbacks still exist for developer convenience, even though Claude-managed marketplace/plugin locations are preferred first diff --git a/src/resources/extensions/gsd/docs/preferences-reference.md b/src/resources/extensions/gsd/docs/preferences-reference.md index d8e142a79..e7c3549b5 100644 --- a/src/resources/extensions/gsd/docs/preferences-reference.md +++ b/src/resources/extensions/gsd/docs/preferences-reference.md @@ -1,4 +1,4 @@ -# GSD Preferences Reference +# SF Preferences Reference Full documentation for `~/.gsd/PREFERENCES.md` (global) and `.gsd/PREFERENCES.md` (project). @@ -9,7 +9,7 @@ Full documentation for `~/.gsd/PREFERENCES.md` (global) and `.gsd/PREFERENCES.md - Keep this skill-first. - Prefer explicit skill names or absolute paths. - Use absolute paths for personal/local skills when you want zero ambiguity. -- These preferences guide which skills GSD should load and follow; they do not override higher-priority instructions in the current conversation. +- These preferences guide which skills SF should load and follow; they do not override higher-priority instructions in the current conversation. - For Claude marketplace/plugin import behavior, see `~/.gsd/agent/extensions/gsd/docs/claude-marketplace-import.md`. --- @@ -18,7 +18,7 @@ Full documentation for `~/.gsd/PREFERENCES.md` (global) and `.gsd/PREFERENCES.md ### Empty Arrays vs Omitted Fields -**Empty arrays (`[]`) are equivalent to omitting the field entirely.** During validation, GSD deletes empty arrays from the preferences object (see `validatePreferences()` in `preferences.ts`): +**Empty arrays (`[]`) are equivalent to omitting the field entirely.** During validation, SF deletes empty arrays from the preferences object (see `validatePreferences()` in `preferences.ts`): ```typescript for (const key of [ @@ -68,7 +68,7 @@ These are **separate concerns**: | Field | What it controls | Code reference | | ---------------------------------------------------- | --------------------------------------------------------- | -------------------------------------------------------- | -| `skill_discovery` | **Whether** GSD looks for relevant skills during research | `resolveSkillDiscoveryMode()` in `preferences.ts` | +| `skill_discovery` | **Whether** SF looks for relevant skills during research | `resolveSkillDiscoveryMode()` in `preferences.ts` | | `always_use_skills`, `prefer_skills`, `avoid_skills` | **Which** skills to use when they're found relevant | `renderPreferencesForSystemPrompt()` in `preferences.ts` | Setting `prefer_skills: []` does **not** disable skill discovery — it just means you have no preference overrides. Use `skill_discovery: off` to disable discovery entirely. @@ -92,11 +92,11 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea Quick setup: `/gsd mode` (global) or `/gsd mode project` (project-level). -- `always_use_skills`: skills GSD should use whenever they are relevant. +- `always_use_skills`: skills SF should use whenever they are relevant. -- `prefer_skills`: soft defaults GSD should prefer when relevant. +- `prefer_skills`: soft defaults SF should prefer when relevant. -- `avoid_skills`: skills GSD should avoid unless clearly needed. +- `avoid_skills`: skills SF should avoid unless clearly needed. - `skill_rules`: situational rules with a human-readable `when` trigger and one or more of `use`, `prefer`, or `avoid`. @@ -115,7 +115,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea - `skill_staleness_days`: number — skills unused for this many days get deprioritized during discovery. Set to `0` to disable staleness tracking. Default: `60`. -- `skill_discovery`: controls how GSD discovers and applies skills during auto-mode. Valid values: +- `skill_discovery`: controls how SF discovers and applies skills during auto-mode. Valid values: - `auto` — skills are found and applied automatically without prompting. - `suggest` — (default) skills are identified during research but not installed automatically. - `off` — skill discovery is disabled entirely. @@ -126,7 +126,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea - `idle_timeout_minutes`: minutes of inactivity before the supervisor intervenes (default: 10). - `hard_timeout_minutes`: minutes before the supervisor forces termination (default: 30). -- `git`: configures GSD's git behavior. All fields are optional — omit any to use defaults. Keys: +- `git`: configures SF's git behavior. All fields are optional — omit any to use defaults. Keys: - `auto_push`: boolean — automatically push commits to the remote after committing. Default: `false`. - `push_branches`: boolean — push the milestone branch to the remote after commits. Default: `false`. - `remote`: string — git remote name to push to. Default: `"origin"`. @@ -136,7 +136,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea - `main_branch`: string — the primary branch name for new git repos (e.g., `"main"`, `"master"`, `"trunk"`). Also used by `getMainBranch()` as the preferred branch when auto-detection is ambiguous. Default: `"main"`. - `merge_strategy`: `"squash"` or `"merge"` — controls how worktree branches are merged back. `"squash"` combines all commits into one; `"merge"` preserves individual commits. Default: `"squash"`. - `isolation`: `"worktree"`, `"branch"`, or `"none"` — controls auto-mode git isolation strategy. `"worktree"` creates a milestone worktree for isolated work; `"branch"` works directly in the project root but creates a milestone branch (useful for submodule-heavy repos); `"none"` works directly on the current branch with no worktree or milestone branch (ideal for step-mode with hot reloads). Default: `"worktree"`. - - `manage_gitignore`: boolean — when `false`, GSD will not touch `.gitignore` at all. Useful when your project has a strictly managed `.gitignore` and you don't want GSD adding entries. Default: `true`. + - `manage_gitignore`: boolean — when `false`, SF will not touch `.gitignore` at all. Useful when your project has a strictly managed `.gitignore` and you don't want SF adding entries. Default: `true`. - `worktree_post_create`: string — script to run after a worktree is created (both auto-mode and manual `/worktree`). Receives `SOURCE_DIR` and `WORKTREE_DIR` as environment variables. Can be absolute or relative to project root. Runs with 30-second timeout. Failure is non-fatal (logged as warning). Default: none. - `auto_pr`: boolean — automatically create a GitHub pull request after a milestone branch is merged. Requires `gh` CLI to be installed. Default: `false`. - `pr_target_branch`: string — branch to target when `auto_pr` is enabled. Defaults to `main_branch` when omitted. @@ -177,7 +177,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea - `on_milestone`: boolean — notify when a milestone finishes. Default: `true`. - `on_attention`: boolean — notify when manual attention is needed. Default: `true`. -- `cmux`: configures cmux terminal integration when GSD is running inside a cmux workspace. Keys: +- `cmux`: configures cmux terminal integration when SF is running inside a cmux workspace. Keys: - `enabled`: boolean — master toggle for cmux integration. Default: `false`. - `notifications`: boolean — route desktop notifications through cmux. Default: `true` when enabled. - `sidebar`: boolean — publish status, progress, and log metadata to the cmux sidebar. Default: `true` when enabled. @@ -196,7 +196,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea - `uok`: orchestration kernel controls. Keys: - `enabled`: boolean — enable kernel wrappers and contract observers. Default: `true`. - `legacy_fallback.enabled`: boolean — emergency release fallback that forces legacy orchestration behavior even when `uok.enabled` is `true`. Default: `false`. - - Runtime override: set `GSD_UOK_FORCE_LEGACY=1` (or `GSD_UOK_LEGACY_FALLBACK=1`) to force legacy behavior for the current process. + - Runtime override: set `SF_UOK_FORCE_LEGACY=1` (or `SF_UOK_LEGACY_FALLBACK=1`) to force legacy behavior for the current process. - `gates.enabled`: boolean — route checks through the unified gate runner and persist `gate_runs`. - `model_policy.enabled`: boolean — enforce policy filtering before model capability scoring. - `execution_graph.enabled`: boolean — enable DAG scheduler facade/adapters for execution. @@ -210,7 +210,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea - `observation_masking`: boolean — mask old tool results to reduce context bloat. Default: `true`. - `observation_mask_turns`: number — keep this many recent turns verbatim (1-50). Default: `8`. - `compaction_threshold_percent`: number — trigger compaction at this % of context window (0.5-0.95). Lower values fire compaction earlier, reducing drift. Default: `0.70`. - - `tool_result_max_chars`: number — max chars per tool result in GSD sessions (200-10000). Default: `800`. + - `tool_result_max_chars`: number — max chars per tool result in SF sessions (200-10000). Default: `800`. - `auto_visualize`: boolean — show a visualizer hint after each milestone completion in auto-mode. Default: `false`. @@ -267,7 +267,7 @@ Setting `prefer_skills: []` does **not** disable skill discovery — it just mea **Known unit types for `before`/`after`:** `research-milestone`, `plan-milestone`, `research-slice`, `plan-slice`, `execute-task`, `complete-slice`, `replan-slice`, `reassess-roadmap`, `run-uat`. - `experimental`: opt-in experimental features. All features here are **off by default** — you must explicitly set each one to `true` to enable it. Features in this block may change or be removed without a deprecation cycle while in experimental status. Keys: - - `rtk`: boolean — enable RTK (Real-Time Kompression) shell-command compression. When enabled, GSD wraps shell commands through the RTK binary to reduce token usage during command execution. RTK is downloaded automatically on first use if not already installed. **Default: `false`** (opt-in required). Set `GSD_RTK_DISABLED=1` in the environment to force-disable regardless of this preference. + - `rtk`: boolean — enable RTK (Real-Time Kompression) shell-command compression. When enabled, SF wraps shell commands through the RTK binary to reduce token usage during command execution. RTK is downloaded automatically on first use if not already installed. **Default: `false`** (opt-in required). Set `SF_RTK_DISABLED=1` in the environment to force-disable regardless of this preference. --- @@ -378,7 +378,7 @@ models: --- ``` -When a model fails to switch (provider unavailable, rate limited, credits exhausted), GSD automatically tries the next model in the `fallbacks` list. This ensures auto-mode continues even when your preferred provider hits limits. +When a model fails to switch (provider unavailable, rate limited, credits exhausted), SF automatically tries the next model in the `fallbacks` list. This ensures auto-mode continues even when your preferred provider hits limits. ## Provider Targeting @@ -401,7 +401,7 @@ models: --- ``` -If you use a bare model ID (no provider prefix) and it exists in multiple providers, GSD will warn you and resolve to the first available match. Use `provider/model` format to avoid ambiguity. +If you use a bare model ID (no provider prefix) and it exists in multiple providers, SF will warn you and resolve to the first available match. Use `provider/model` format to avoid ambiguity. **Cost-optimized example** — use cheap models with expensive ones as fallback for critical phases: @@ -524,7 +524,7 @@ cmux: --- ``` -Enables cmux-aware notifications, sidebar metadata, and visible subagent splits when GSD is running inside a cmux terminal. +Enables cmux-aware notifications, sidebar metadata, and visible subagent splits when SF is running inside a cmux terminal. --- @@ -691,4 +691,4 @@ experimental: --- ``` -Opts in to RTK shell-command compression. RTK is downloaded automatically on first use. Set `GSD_RTK_DISABLED=1` to force-disable at the environment level regardless of this setting. +Opts in to RTK shell-command compression. RTK is downloaded automatically on first use. Set `SF_RTK_DISABLED=1` to force-disable at the environment level regardless of this setting. diff --git a/src/resources/extensions/gsd/doctor-environment.ts b/src/resources/extensions/gsd/doctor-environment.ts index 563afdbb4..faffb9609 100644 --- a/src/resources/extensions/gsd/doctor-environment.ts +++ b/src/resources/extensions/gsd/doctor-environment.ts @@ -1,5 +1,5 @@ /** - * GSD Doctor — Environment Health Checks (#1221) + * SF Doctor — Environment Health Checks (#1221) * * Deterministic checks for environment readiness that prevent the model * from spinning its wheels on missing tools, port conflicts, stale @@ -45,11 +45,11 @@ const WORKTREE_PATH_SEGMENT = `${join(".gsd", "worktrees")}/`; * auto-worktree. Returns `null` if not in a worktree. * * Detection order: - * 1. `GSD_WORKTREE` env var (set by the worktree launcher) + * 1. `SF_WORKTREE` env var (set by the worktree launcher) * 2. `.gsd/worktrees/` segment in basePath */ function resolveWorktreeProjectRoot(basePath: string): string | null { - const envRoot = process.env.GSD_WORKTREE; + const envRoot = process.env.SF_WORKTREE; if (envRoot) return envRoot; const normalised = basePath.replace(/\\/g, "/"); diff --git a/src/resources/extensions/gsd/doctor-format.ts b/src/resources/extensions/gsd/doctor-format.ts index a22d64e97..95ea3ca82 100644 --- a/src/resources/extensions/gsd/doctor-format.ts +++ b/src/resources/extensions/gsd/doctor-format.ts @@ -39,7 +39,7 @@ export function formatDoctorReport( const summary = summarizeDoctorIssues(scopedIssues); const maxIssues = options?.maxIssues ?? 12; const lines: string[] = []; - lines.push(options?.title ?? (summary.errors > 0 ? "GSD doctor found blocking issues." : "GSD doctor report.")); + lines.push(options?.title ?? (summary.errors > 0 ? "SF doctor found blocking issues." : "SF doctor report.")); lines.push(`Scope: ${options?.scope ?? "all milestones"}`); lines.push(`Issues: ${summary.total} total · ${summary.errors} error(s) · ${summary.warnings} warning(s) · ${summary.fixable} fixable`); diff --git a/src/resources/extensions/gsd/doctor-git-checks.ts b/src/resources/extensions/gsd/doctor-git-checks.ts index 2ceffe97e..6a6e4bea6 100644 --- a/src/resources/extensions/gsd/doctor-git-checks.ts +++ b/src/resources/extensions/gsd/doctor-git-checks.ts @@ -412,7 +412,7 @@ export async function checkGitHealth( } // ── Worktree lifecycle checks ────────────────────────────────────────── - // Check GSD-managed worktrees for: merged branches, stale work, dirty + // Check SF-managed worktrees for: merged branches, stale work, dirty // state, and unpushed commits. Only worktrees under .gsd/worktrees/. try { const healthStatuses = getAllWorktreeHealth(basePath); diff --git a/src/resources/extensions/gsd/doctor-global-checks.ts b/src/resources/extensions/gsd/doctor-global-checks.ts index cc181910a..d7d0cbd49 100644 --- a/src/resources/extensions/gsd/doctor-global-checks.ts +++ b/src/resources/extensions/gsd/doctor-global-checks.ts @@ -61,7 +61,7 @@ export async function checkGlobalHealth( code: "orphaned_project_state", scope: "project", unitId: "global", - message: `${orphaned.length} orphaned GSD project state director${orphaned.length === 1 ? "y" : "ies"} in ${projectsDir} whose git root no longer exists: ${labels}${overflow}${unknownNote}. Run /gsd cleanup projects to audit or /gsd cleanup projects --fix to reclaim disk space.`, + message: `${orphaned.length} orphaned SF project state director${orphaned.length === 1 ? "y" : "ies"} in ${projectsDir} whose git root no longer exists: ${labels}${overflow}${unknownNote}. Run /gsd cleanup projects to audit or /gsd cleanup projects --fix to reclaim disk space.`, file: projectsDir, fixable: true, }); diff --git a/src/resources/extensions/gsd/doctor-proactive.ts b/src/resources/extensions/gsd/doctor-proactive.ts index eb7c11a7f..e80723c17 100644 --- a/src/resources/extensions/gsd/doctor-proactive.ts +++ b/src/resources/extensions/gsd/doctor-proactive.ts @@ -1,5 +1,5 @@ /** - * GSD Doctor — Proactive Healing Layer + * SF Doctor — Proactive Healing Layer * * Three mechanisms for automatic health monitoring during auto-mode: * diff --git a/src/resources/extensions/gsd/doctor-providers.ts b/src/resources/extensions/gsd/doctor-providers.ts index 2d6e64e5a..e483972aa 100644 --- a/src/resources/extensions/gsd/doctor-providers.ts +++ b/src/resources/extensions/gsd/doctor-providers.ts @@ -1,5 +1,5 @@ /** - * GSD Doctor — Provider & Integration Health Checks + * SF Doctor — Provider & Integration Health Checks * * Fast, deterministic checks for external service configuration. * Checks key presence in auth.json and environment variables — no HTTP calls, @@ -261,7 +261,7 @@ function checkLlmProviders(): ProviderCheckResult[] { category: "llm", status: "warning", message: `${label} — all credentials backed off (rate limited)`, - detail: `GSD will retry automatically`, + detail: `SF will retry automatically`, required: true, }); } else { diff --git a/src/resources/extensions/gsd/doctor-runtime-checks.ts b/src/resources/extensions/gsd/doctor-runtime-checks.ts index 5b4b99572..2ce16bf4c 100644 --- a/src/resources/extensions/gsd/doctor-runtime-checks.ts +++ b/src/resources/extensions/gsd/doctor-runtime-checks.ts @@ -304,7 +304,7 @@ export async function checkRuntimeHealth( ); // Check for critical runtime patterns that must be present. - // NOTE: GSD_RUNTIME_PATTERNS in gitignore.ts is the canonical source of truth. + // NOTE: SF_RUNTIME_PATTERNS in gitignore.ts is the canonical source of truth. // This is a minimal subset for the doctor check. const criticalPatterns = [ ".gsd/activity/", @@ -326,14 +326,14 @@ export async function checkRuntimeHealth( code: "gitignore_missing_patterns", scope: "project", unitId: "project", - message: `${missing.length} critical GSD runtime pattern(s) missing from .gitignore: ${missing.join(", ")}`, + message: `${missing.length} critical SF runtime pattern(s) missing from .gitignore: ${missing.join(", ")}`, file: ".gitignore", fixable: true, }); if (shouldFix("gitignore_missing_patterns")) { ensureGitignore(basePath); - fixesApplied.push("added missing GSD runtime patterns to .gitignore"); + fixesApplied.push("added missing SF runtime patterns to .gitignore"); } } } @@ -403,7 +403,7 @@ export async function checkRuntimeHealth( code: "numbered_gsd_variant", scope: "project", unitId: "project", - message: `Found macOS collision variant "${v}" — this can cause GSD state to appear deleted.`, + message: `Found macOS collision variant "${v}" — this can cause SF state to appear deleted.`, file: v, fixable: true, }); @@ -582,7 +582,7 @@ export async function checkRuntimeHealth( */ function buildStateMarkdownForCheck(state: Awaited<ReturnType<typeof deriveState>>): string { const lines: string[] = []; - lines.push("# GSD State", ""); + lines.push("# SF State", ""); const activeMilestone = state.activeMilestone ? `${state.activeMilestone.id}: ${state.activeMilestone.title}` diff --git a/src/resources/extensions/gsd/doctor-types.ts b/src/resources/extensions/gsd/doctor-types.ts index 309848048..b4cd539c1 100644 --- a/src/resources/extensions/gsd/doctor-types.ts +++ b/src/resources/extensions/gsd/doctor-types.ts @@ -48,7 +48,7 @@ export type DoctorIssueCode = // Git / worktree integrity checks | "integration_branch_missing" | "worktree_directory_orphaned" - // GSD state structural checks + // SF state structural checks | "circular_slice_dependency" | "orphaned_slice_directory" | "missing_slice_dir" diff --git a/src/resources/extensions/gsd/doctor.ts b/src/resources/extensions/gsd/doctor.ts index bf3a59307..76b11a15c 100644 --- a/src/resources/extensions/gsd/doctor.ts +++ b/src/resources/extensions/gsd/doctor.ts @@ -26,7 +26,7 @@ export { runEnvironmentChecks, runFullEnvironmentChecks, formatEnvironmentReport export { computeProgressScore, computeProgressScoreWithContext, formatProgressLine, formatProgressReport, type ProgressScore, type ProgressLevel } from "./progress-score.js"; /** - * Characters that are used as delimiters in GSD state management documents + * Characters that are used as delimiters in SF state management documents * and should not appear in milestone or slice titles. * * - "\u2014" (em dash, U+2014): used as a display separator in STATE.md and other docs. @@ -40,7 +40,7 @@ const TITLE_DELIMITER_RE = /[\u2014\u2013\/]/; // em dash, en dash, forward slas /** * Check whether a milestone or slice title contains characters that conflict - * with GSD's state document delimiter conventions. + * with SF's state document delimiter conventions. * Returns a human-readable description of the problem, or null if the title is safe. */ export function validateTitle(title: string): string | null { @@ -48,7 +48,7 @@ export function validateTitle(title: string): string | null { const found: string[] = []; if (/[\u2014\u2013]/.test(title)) found.push("em/en dash (\u2014 or \u2013)"); if (/\//.test(title)) found.push("forward slash (/)"); - return `title contains ${found.join(" and ")}, which conflict with GSD state document delimiters`; + return `title contains ${found.join(" and ")}, which conflict with SF state document delimiters`; } return null; } @@ -91,7 +91,7 @@ function validatePreferenceShape(preferences: GSDPreferences): string[] { /** Build STATE.md content from derived state. Exported for guided-flow pre-dispatch rebuild (#3475). */ export function buildStateMarkdown(state: Awaited<ReturnType<typeof deriveState>>): string { const lines: string[] = []; - lines.push("# GSD State", ""); + lines.push("# SF State", ""); const activeMilestone = state.activeMilestone ? `${state.activeMilestone.id}: ${state.activeMilestone.title}` @@ -352,7 +352,7 @@ export async function runGSDDoctor(basePath: string, options?: { fix?: boolean; code: "invalid_preferences", scope: "project", unitId: "project", - message: `GSD preferences invalid: ${issue}`, + message: `SF preferences invalid: ${issue}`, file: prefs.path, fixable: false, }); diff --git a/src/resources/extensions/gsd/engine-resolver.ts b/src/resources/extensions/gsd/engine-resolver.ts index 98dca05f2..013e82515 100644 --- a/src/resources/extensions/gsd/engine-resolver.ts +++ b/src/resources/extensions/gsd/engine-resolver.ts @@ -3,7 +3,7 @@ * * Routes `null` and `"dev"` engine IDs to the DevWorkflowEngine/DevExecutionPolicy * pair. Any other non-null engine ID is treated as a custom workflow engine that - * reads its state from an `activeRunDir`. Respects `GSD_ENGINE_BYPASS=1` kill + * reads its state from an `activeRunDir`. Respects `SF_ENGINE_BYPASS=1` kill * switch to skip the engine layer entirely. */ @@ -27,7 +27,7 @@ export interface ResolvedEngine { * - any other non-null ID → CustomWorkflowEngine(activeRunDir) + CustomExecutionPolicy() * (requires activeRunDir to be a non-empty string) * - * Note: `GSD_ENGINE_BYPASS=1` is checked in autoLoop before calling this function. + * Note: `SF_ENGINE_BYPASS=1` is checked in autoLoop before calling this function. */ export function resolveEngine( session: { activeEngineId: string | null; activeRunDir?: string | null }, diff --git a/src/resources/extensions/gsd/engine-types.ts b/src/resources/extensions/gsd/engine-types.ts index 22275e732..ea63cfa63 100644 --- a/src/resources/extensions/gsd/engine-types.ts +++ b/src/resources/extensions/gsd/engine-types.ts @@ -1,9 +1,9 @@ /** * engine-types.ts — Engine-polymorphic type contracts. * - * LEAF NODE: This file must have ZERO imports from any GSD module. + * LEAF NODE: This file must have ZERO imports from any SF module. * Only `node:` imports are permitted. All engine/policy interfaces - * depend on these types; nothing here depends on GSD internals. + * depend on these types; nothing here depends on SF internals. */ /** Snapshot of engine state at a point in time. */ @@ -13,7 +13,7 @@ export interface EngineState { activeSliceId: string | null; activeTaskId: string | null; isComplete: boolean; - /** Opaque engine-specific state — never narrowed to a GSD-specific type. */ + /** Opaque engine-specific state — never narrowed to a SF-specific type. */ raw: unknown; } diff --git a/src/resources/extensions/gsd/env-utils.ts b/src/resources/extensions/gsd/env-utils.ts index 7386ec22e..06f69a8d5 100644 --- a/src/resources/extensions/gsd/env-utils.ts +++ b/src/resources/extensions/gsd/env-utils.ts @@ -1,4 +1,4 @@ -// GSD Extension — Environment variable utilities +// SF Extension — Environment variable utilities // Copyright (c) 2026 Jeremy McSpadden <jeremy@fluxlabs.net> // // Pure utility for checking existing env keys in .env files and process.env. diff --git a/src/resources/extensions/gsd/errors.ts b/src/resources/extensions/gsd/errors.ts index f6ee5090f..82653042d 100644 --- a/src/resources/extensions/gsd/errors.ts +++ b/src/resources/extensions/gsd/errors.ts @@ -1,20 +1,20 @@ /** - * GSD Error Types — Typed error hierarchy for diagnostics and crash recovery. + * SF Error Types — Typed error hierarchy for diagnostics and crash recovery. * - * All GSD-specific errors extend GSDError, which carries a stable `code` + * All SF-specific errors extend GSDError, which carries a stable `code` * string suitable for programmatic matching. Error codes are defined as * constants so callers can switch on them without string-matching. */ // ─── Error Codes ────────────────────────────────────────────────────────────── -export const GSD_STALE_STATE = "GSD_STALE_STATE"; -export const GSD_LOCK_HELD = "GSD_LOCK_HELD"; -export const GSD_ARTIFACT_MISSING = "GSD_ARTIFACT_MISSING"; -export const GSD_GIT_ERROR = "GSD_GIT_ERROR"; -export const GSD_MERGE_CONFLICT = "GSD_MERGE_CONFLICT"; -export const GSD_PARSE_ERROR = "GSD_PARSE_ERROR"; -export const GSD_IO_ERROR = "GSD_IO_ERROR"; +export const SF_STALE_STATE = "SF_STALE_STATE"; +export const SF_LOCK_HELD = "SF_LOCK_HELD"; +export const SF_ARTIFACT_MISSING = "SF_ARTIFACT_MISSING"; +export const SF_GIT_ERROR = "SF_GIT_ERROR"; +export const SF_MERGE_CONFLICT = "SF_MERGE_CONFLICT"; +export const SF_PARSE_ERROR = "SF_PARSE_ERROR"; +export const SF_IO_ERROR = "SF_IO_ERROR"; // ─── Base Error ─────────────────────────────────────────────────────────────── diff --git a/src/resources/extensions/gsd/exit-command.ts b/src/resources/extensions/gsd/exit-command.ts index fb41f7a1f..6a1340c35 100644 --- a/src/resources/extensions/gsd/exit-command.ts +++ b/src/resources/extensions/gsd/exit-command.ts @@ -7,10 +7,10 @@ export function registerExitCommand( deps: { stopAuto?: StopAutoFn } = {}, ): void { pi.registerCommand("exit", { - description: "Exit GSD gracefully", + description: "Exit SF gracefully", handler: async (_args: string, ctx: ExtensionCommandContext) => { // Stop auto-mode first so locks and activity state are cleaned up before shutdown. - // Wrapped in try/catch: if gsd-pi was updated on disk mid-session, the dynamic + // Wrapped in try/catch: if sf-run was updated on disk mid-session, the dynamic // import may resolve a new auto-worktree.js whose static imports reference // exports absent from the process-cached native-git-bridge.js (ESM cache is // immutable). The user's work is already saved — this is cleanup only. diff --git a/src/resources/extensions/gsd/export-html.ts b/src/resources/extensions/gsd/export-html.ts index 09c40a022..6b24c280f 100644 --- a/src/resources/extensions/gsd/export-html.ts +++ b/src/resources/extensions/gsd/export-html.ts @@ -1,8 +1,8 @@ /** - * GSD HTML Report Generator + * SF HTML Report Generator * * Produces a single self-contained HTML file with: - * - Branding header (project name, path, GSD version, generated timestamp) + * - Branding header (project name, path, SF version, generated timestamp) * - Project summary & overall progress * - Progress tree (milestones → slices → tasks, with critical path) * - Execution timeline (chronological unit history) @@ -73,14 +73,14 @@ export function generateHtmlReport( <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<title>GSD Report — ${esc(opts.projectName)}${opts.milestoneId ? ` — ${esc(opts.milestoneId)}` : ''} +SF Report — ${esc(opts.projectName)}${opts.milestoneId ? ` — ${esc(opts.milestoneId)}` : ''}
- + v${esc(opts.gsdVersion)}
@@ -114,7 +114,7 @@ ${sections.join('\n')}