chore: sync workspace state after rebrand
- 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) <noreply@anthropic.com>
This commit is contained in:
parent
a1454a29ff
commit
35dc87ef53
1751 changed files with 256076 additions and 4203 deletions
14
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
14
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
2
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
|
@ -44,7 +44,7 @@ Closes #<!-- issue number — required -->
|
|||
- [ ] `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
|
||||
|
||||
|
|
|
|||
8
.github/workflows/ai-triage.yml
vendored
8
.github/workflows/ai-triage.yml
vendored
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
10
.github/workflows/pipeline.yml
vendored
10
.github/workflows/pipeline.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
10
.gitignore
vendored
10
.gitignore
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
108
CHANGELOG.md
108
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<string, any> 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/<MID>` 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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
|
|
|
|||
10
Dockerfile
10
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
|
||||
|
|
|
|||
36
Makefile
Normal file
36
Makefile
Normal file
|
|
@ -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
|
||||
102
README.md
102
README.md
|
|
@ -1,25 +1,25 @@
|
|||
<div align="center">
|
||||
|
||||
# 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.**
|
||||
|
||||
[](https://www.npmjs.com/package/gsd-pi)
|
||||
[](https://www.npmjs.com/package/gsd-pi)
|
||||
[](https://github.com/gsd-build/GSD-2)
|
||||
[](https://www.npmjs.com/package/sf-run)
|
||||
[](https://www.npmjs.com/package/sf-run)
|
||||
[](https://github.com/gsd-build/SF)
|
||||
[](https://discord.com/invite/nKXTsAcmbT)
|
||||
[](LICENSE)
|
||||
[](https://dexscreener.com/solana/dwudwjvan7bzkw9zwlbyv6kspdlvhwzrqy6ebk8xzxkv)
|
||||
[](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.
|
||||
|
||||
<pre><code>npm install -g gsd-pi@latest</code></pre>
|
||||
<pre><code>npm install -g sf-run@latest</code></pre>
|
||||
|
||||
> 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 `<details
|
|||
|
||||
## How It Works
|
||||
|
||||
GSD structures work into a hierarchy:
|
||||
SF structures work into a hierarchy:
|
||||
|
||||
```
|
||||
Milestone → a shippable version (4-10 slices)
|
||||
|
|
@ -231,7 +231,7 @@ Plan (with integrated research) → Execute (per task) → Complete → Reassess
|
|||
|
||||
### `/gsd auto` — The Main Event
|
||||
|
||||
This is what makes GSD different. Run it, walk away, come back to built software.
|
||||
This is what makes SF different. Run it, walk away, come back to built software.
|
||||
|
||||
```
|
||||
/gsd auto
|
||||
|
|
@ -285,7 +285,7 @@ Step mode is the on-ramp. Auto mode is the highway.
|
|||
### Install
|
||||
|
||||
```bash
|
||||
npm install -g gsd-pi
|
||||
npm install -g sf-run
|
||||
```
|
||||
|
||||
### Log in to a provider
|
||||
|
|
@ -299,7 +299,7 @@ gsd
|
|||
|
||||
Select from 20+ providers — Anthropic, OpenAI, Google, OpenRouter, GitHub Copilot, and more. If you have a Claude Max or Copilot subscription, the OAuth flow handles everything. Otherwise, paste your API key when prompted.
|
||||
|
||||
GSD auto-selects a default model after login. To switch models later:
|
||||
SF auto-selects a default model after login. To switch models later:
|
||||
|
||||
```bash
|
||||
/model
|
||||
|
|
@ -313,11 +313,11 @@ Open a terminal in your project and run:
|
|||
gsd
|
||||
```
|
||||
|
||||
GSD opens an interactive agent session. From there, you have two ways to work:
|
||||
SF opens an interactive agent session. From there, you have two ways to work:
|
||||
|
||||
**`/gsd` — step mode.** Type `/gsd` and GSD executes one unit of work at a time, pausing between each with a wizard showing what completed and what's next. Same state machine as auto mode, but you stay in the loop. No project yet? It starts the discussion flow. Roadmap exists? It plans or executes the next step.
|
||||
**`/gsd` — step mode.** Type `/gsd` and SF executes one unit of work at a time, pausing between each with a wizard showing what completed and what's next. Same state machine as auto mode, but you stay in the loop. No project yet? It starts the discussion flow. Roadmap exists? It plans or executes the next step.
|
||||
|
||||
**`/gsd auto` — autonomous mode.** Type `/gsd auto` and walk away. GSD researches, plans, executes, verifies, commits, and advances through every slice until the milestone is complete. Fresh context window per task. No babysitting.
|
||||
**`/gsd auto` — autonomous mode.** Type `/gsd auto` and walk away. SF researches, plans, executes, verifies, commits, and advances through every slice until the milestone is complete. Fresh context window per task. No babysitting.
|
||||
|
||||
### Two terminals, one project
|
||||
|
||||
|
|
@ -364,11 +364,11 @@ gsd headless dispatch plan
|
|||
|
||||
Headless auto-responds to interactive prompts, detects completion, and exits with structured codes: `0` complete, `1` error/timeout, `2` blocked. Auto-restarts on crash with exponential backoff. Use `gsd headless query` for instant, machine-readable state inspection — returns phase, next dispatch preview, and parallel worker costs as a single JSON object without spawning an LLM session. Pair with [remote questions](./docs/user-docs/remote-questions.md) to route decisions to Slack or Discord when human input is needed.
|
||||
|
||||
**Multi-session orchestration** — headless mode supports file-based IPC in `.gsd/parallel/` for coordinating multiple GSD workers across milestones. Build orchestrators that spawn, monitor, and budget-cap a fleet of GSD workers.
|
||||
**Multi-session orchestration** — headless mode supports file-based IPC in `.gsd/parallel/` for coordinating multiple SF workers across milestones. Build orchestrators that spawn, monitor, and budget-cap a fleet of SF workers.
|
||||
|
||||
### First launch
|
||||
|
||||
On first run, GSD launches a branded setup wizard that walks you through LLM provider selection (OAuth or API key), then optional tool API keys (Brave Search, Context7, Jina, Slack, Discord). Every step is skippable — press Enter to skip any. If you have an existing Pi installation, your provider credentials (LLM and tool keys) are imported automatically. Run `gsd config` anytime to re-run the wizard.
|
||||
On first run, SF launches a branded setup wizard that walks you through LLM provider selection (OAuth or API key), then optional tool API keys (Brave Search, Context7, Jina, Slack, Discord). Every step is skippable — press Enter to skip any. If you have an existing Pi installation, your provider credentials (LLM and tool keys) are imported automatically. Run `gsd config` anytime to re-run the wizard.
|
||||
|
||||
### Commands
|
||||
|
||||
|
|
@ -377,7 +377,7 @@ On first run, GSD launches a branded setup wizard that walks you through LLM pro
|
|||
| `/gsd` | Step mode — executes one unit at a time, pauses between each |
|
||||
| `/gsd next` | Explicit step mode (same as bare `/gsd`) |
|
||||
| `/gsd auto` | Autonomous mode — researches, plans, executes, commits, repeats |
|
||||
| `/gsd quick` | Execute a quick task with GSD guarantees, skip planning overhead |
|
||||
| `/gsd quick` | Execute a quick task with SF guarantees, skip planning overhead |
|
||||
| `/gsd stop` | Stop auto mode gracefully |
|
||||
| `/gsd steer` | Hard-steer plan documents during execution |
|
||||
| `/gsd discuss` | Discuss architecture and decisions (works alongside auto mode) |
|
||||
|
|
@ -387,9 +387,9 @@ On first run, GSD launches a branded setup wizard that walks you through LLM pro
|
|||
| `/gsd queue` | Queue future milestones (safe during auto mode) |
|
||||
| `/gsd prefs` | Model selection, timeouts, budget ceiling |
|
||||
| `/gsd migrate` | Migrate a v1 `.planning` directory to `.gsd` format |
|
||||
| `/gsd help` | Categorized command reference for all GSD subcommands |
|
||||
| `/gsd help` | Categorized command reference for all SF subcommands |
|
||||
| `/gsd mode` | Switch workflow mode (solo/team) with coordinated defaults |
|
||||
| `/gsd forensics` | Full-access GSD debugger for auto-mode failure investigation |
|
||||
| `/gsd forensics` | Full-access SF debugger for auto-mode failure investigation |
|
||||
| `/gsd cleanup` | Archive phase directories from completed milestones |
|
||||
| `/gsd doctor` | Runtime health checks — issues surface across widget, visualizer, and reports |
|
||||
| `/gsd keys` | API key manager — list, add, remove, test, rotate, doctor |
|
||||
|
|
@ -398,14 +398,14 @@ On first run, GSD launches a branded setup wizard that walks you through LLM pro
|
|||
| `/worktree` (`/wt`) | Git worktree lifecycle — create, switch, merge, remove |
|
||||
| `/voice` | Toggle real-time speech-to-text (macOS, Linux) |
|
||||
| `/exit` | Graceful shutdown — saves session state before exiting |
|
||||
| `/kill` | Kill GSD process immediately |
|
||||
| `/kill` | Kill SF process immediately |
|
||||
| `/clear` | Start a new session (alias for `/new`) |
|
||||
| `Ctrl+Alt+G` | Toggle dashboard overlay |
|
||||
| `Ctrl+Alt+V` | Toggle voice transcription |
|
||||
| `Ctrl+Alt+B` | Show background shell processes |
|
||||
| `Alt+V` | Paste clipboard image (macOS) |
|
||||
| `gsd config` | Re-run the setup wizard (LLM provider + tool keys) |
|
||||
| `gsd update` | Update GSD to the latest version |
|
||||
| `gsd update` | Update SF to the latest version |
|
||||
| `gsd headless [cmd]` | Run `/gsd` commands without TUI (CI, cron, scripts) |
|
||||
| `gsd headless query` | Instant JSON snapshot — state, next dispatch, costs (no LLM) |
|
||||
| `gsd --continue` (`-c`) | Resume the most recent session for the current directory |
|
||||
|
|
@ -414,7 +414,7 @@ On first run, GSD launches a branded setup wizard that walks you through LLM pro
|
|||
|
||||
---
|
||||
|
||||
## What GSD Manages For You
|
||||
## What SF Manages For You
|
||||
|
||||
### Context Engineering
|
||||
|
||||
|
|
@ -476,7 +476,7 @@ The verification ladder: static checks → command execution → behavioral test
|
|||
|
||||
### HTML Reports
|
||||
|
||||
After a milestone completes, GSD auto-generates a self-contained HTML report in `.gsd/reports/`. Each report includes project summary, progress tree, slice dependency graph (SVG DAG), cost/token metrics with bar charts, execution timeline, changelog, and knowledge base sections. No external dependencies — all CSS and JS are inlined, printable to PDF from any browser.
|
||||
After a milestone completes, SF auto-generates a self-contained HTML report in `.gsd/reports/`. Each report includes project summary, progress tree, slice dependency graph (SVG DAG), cost/token metrics with bar charts, execution timeline, changelog, and knowledge base sections. No external dependencies — all CSS and JS are inlined, printable to PDF from any browser.
|
||||
|
||||
An auto-generated `index.html` shows all reports with progression metrics across milestones.
|
||||
|
||||
|
|
@ -489,7 +489,7 @@ An auto-generated `index.html` shows all reports with progression metrics across
|
|||
|
||||
### Preferences
|
||||
|
||||
GSD preferences live in `~/.gsd/PREFERENCES.md` (global) or `.gsd/PREFERENCES.md` (project). Manage with `/gsd prefs`.
|
||||
SF preferences live in `~/.gsd/PREFERENCES.md` (global) or `.gsd/PREFERENCES.md` (project). Manage with `/gsd prefs`.
|
||||
|
||||
```yaml
|
||||
---
|
||||
|
|
@ -522,7 +522,7 @@ auto_report: true
|
|||
| Setting | What it controls |
|
||||
| ---------------------- | ----------------------------------------------------------------------------------------------------- |
|
||||
| `models.*` | Per-phase model selection — string for a single model, or `{model, fallbacks}` for automatic failover |
|
||||
| `skill_discovery` | `auto` / `suggest` / `off` — how GSD finds and applies skills |
|
||||
| `skill_discovery` | `auto` / `suggest` / `off` — how SF finds and applies skills |
|
||||
| `auto_supervisor.*` | Timeout thresholds for auto mode supervision |
|
||||
| `budget_ceiling` | USD ceiling — auto mode pauses when reached |
|
||||
| `uat_dispatch` | Enable automatic UAT runs after slice completion |
|
||||
|
|
@ -531,7 +531,7 @@ auto_report: true
|
|||
| `skill_staleness_days` | Skills unused for N days get deprioritized (default: 60, 0 = disabled) |
|
||||
| `unique_milestone_ids` | Uses unique milestone names to avoid clashes when working in teams of people |
|
||||
| `git.isolation` | `none` (default), `worktree`, or `branch` — enable worktree or branch isolation for milestone work |
|
||||
| `git.manage_gitignore` | Set `false` to prevent GSD from modifying `.gitignore` |
|
||||
| `git.manage_gitignore` | Set `false` to prevent SF from modifying `.gitignore` |
|
||||
| `verification_commands`| Array of shell commands to run after task execution (e.g., `["npm run lint", "npm run test"]`) |
|
||||
| `verification_auto_fix`| Auto-retry on verification failures (default: true) |
|
||||
| `verification_max_retries` | Max retries for verification failures (default: 2) |
|
||||
|
|
@ -546,11 +546,11 @@ Place an `AGENTS.md` file in any directory to provide persistent behavioral guid
|
|||
|
||||
### Debug Mode
|
||||
|
||||
Start GSD with `gsd --debug` to enable structured JSONL diagnostic logging. Debug logs capture dispatch decisions, state transitions, and timing data for troubleshooting auto-mode issues.
|
||||
Start SF with `gsd --debug` to enable structured JSONL diagnostic logging. Debug logs capture dispatch decisions, state transitions, and timing data for troubleshooting auto-mode issues.
|
||||
|
||||
### Token Optimization
|
||||
|
||||
GSD includes a coordinated token optimization system that reduces usage by 40-60% on cost-sensitive workloads. Set a single preference to coordinate model selection, phase skipping, and context compression:
|
||||
SF includes a coordinated token optimization system that reduces usage by 40-60% on cost-sensitive workloads. Set a single preference to coordinate model selection, phase skipping, and context compression:
|
||||
|
||||
```yaml
|
||||
token_profile: budget # or balanced (default), quality
|
||||
|
|
@ -570,11 +570,11 @@ See the full [Token Optimization Guide](./docs/user-docs/token-optimization.md)
|
|||
|
||||
### Bundled Tools
|
||||
|
||||
GSD ships with 24 extensions, all loaded automatically:
|
||||
SF ships with 24 extensions, all loaded automatically:
|
||||
|
||||
| Extension | What it provides |
|
||||
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
||||
| **GSD** | Core workflow engine, auto mode, commands, dashboard |
|
||||
| **SF** | Core workflow engine, auto mode, commands, dashboard |
|
||||
| **Browser Tools** | Playwright-based browser with form intelligence, intent-ranked element finding, semantic actions, PDF export, session state persistence, network mocking, device emulation, structured extraction, visual diffing, region zoom, test code generation, and prompt injection detection |
|
||||
| **Search the Web** | Brave Search, Tavily, or Jina page extraction |
|
||||
| **Google Search** | Gemini-powered web search with AI-synthesized answers |
|
||||
|
|
@ -620,7 +620,7 @@ The best practice for working in teams is to ensure unique milestone names acros
|
|||
### Suggested .gitignore setup
|
||||
|
||||
```bash
|
||||
# ── GSD: Runtime / Ephemeral (per-developer, per-session) ──────────────────
|
||||
# ── SF: Runtime / Ephemeral (per-developer, per-session) ──────────────────
|
||||
# Crash detection sentinel — PID lock, written per auto-mode session
|
||||
.gsd/auto.lock
|
||||
# Auto-mode dispatch tracker — prevents re-running completed units (includes archived per-milestone files)
|
||||
|
|
@ -674,18 +674,18 @@ Milestone names will now be generated with a 6 char random string appended e.g.
|
|||
1. Ensure you are not in the middle of any milestones (clean state)
|
||||
2. Update the `.gsd/` related entries in your `.gitignore` to follow the `Suggested .gitignore setup` section under `Working in teams` (ensure you are no longer blanket ignoring the whole `.gsd/` directory)
|
||||
3. Update your `.gsd/PREFERENCES.md` file within the repo as per section `Unique Milestone Names`
|
||||
4. If you want to update all your existing milestones use this prompt in GSD: `I have turned on unique milestone ids, please update all old milestone ids to use this new format e.g. M001-abc123 where abc123 is a random 6 char lowercase alpha numeric string. Update all references in all .gsd file contents, file names and directory names. Validate your work once done to ensure referential integrity.`
|
||||
4. If you want to update all your existing milestones use this prompt in SF: `I have turned on unique milestone ids, please update all old milestone ids to use this new format e.g. M001-abc123 where abc123 is a random 6 char lowercase alpha numeric string. Update all references in all .gsd file contents, file names and directory names. Validate your work once done to ensure referential integrity.`
|
||||
5. Commit to git
|
||||
|
||||
---
|
||||
|
||||
## Architecture
|
||||
|
||||
GSD is a TypeScript application that embeds the Pi coding agent SDK.
|
||||
SF is a TypeScript application that embeds the Pi coding agent SDK.
|
||||
|
||||
```
|
||||
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
|
||||
├─ headless.ts Headless orchestrator (spawns RPC child, auto-responds, detects completion)
|
||||
├─ onboarding.ts First-run setup wizard (LLM provider + tool keys)
|
||||
|
|
@ -693,10 +693,10 @@ gsd (CLI binary)
|
|||
├─ 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 (auto, state, commands, ...)
|
||||
├─ extensions/gsd/ Core SF extension (auto, state, commands, ...)
|
||||
├─ extensions/... 21 supporting extensions
|
||||
├─ agents/ scout, researcher, worker, javascript-pro, typescript-pro
|
||||
└─ GSD-WORKFLOW.md Manual bootstrap protocol
|
||||
└─ SF-WORKFLOW.md Manual bootstrap protocol
|
||||
```
|
||||
|
||||
**Key design decisions:**
|
||||
|
|
@ -726,7 +726,7 @@ Optional:
|
|||
|
||||
## Use Any Model
|
||||
|
||||
GSD isn't locked to one provider. It runs on the [Pi SDK](https://github.com/badlogic/pi-mono), which supports **20+ model providers** out of the box. Use different models for different phases — Opus for planning, Sonnet for execution, a fast model for research.
|
||||
SF isn't locked to one provider. It runs on the [Pi SDK](https://github.com/badlogic/pi-mono), which supports **20+ model providers** out of the box. Use different models for different phases — Opus for planning, Sonnet for execution, a fast model for research.
|
||||
|
||||
### Built-in Providers
|
||||
|
||||
|
|
@ -742,11 +742,11 @@ If you have a **Claude Max**, **Codex**, or **GitHub Copilot** subscription, you
|
|||
> - **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
|
|||
|
||||
<div align="center">
|
||||
|
||||
**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`**
|
||||
|
||||
</div>
|
||||
|
|
|
|||
10
VISION.md
10
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.
|
||||
|
|
|
|||
|
|
@ -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" "$@"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
# ──────────────────────────────────────────────
|
||||
# GSD Docker Sandbox — Environment Variables
|
||||
# SF Docker Sandbox — Environment Variables
|
||||
# Copy this file to .env and fill in your keys.
|
||||
# ──────────────────────────────────────────────
|
||||
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ services:
|
|||
context: .
|
||||
dockerfile: Dockerfile.sandbox
|
||||
args:
|
||||
GSD_VERSION: latest
|
||||
SF_VERSION: latest
|
||||
container_name: gsd-sandbox
|
||||
ports:
|
||||
- "3000:3000"
|
||||
|
|
|
|||
|
|
@ -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}" "$@"
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
|-------|-------------|
|
||||
|
|
|
|||
|
|
@ -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 -- <runtime paths>` (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 <commit>:.gsd/...`.
|
||||
When SF detects an empty `.gsd/` in a worktree, reconstruct state from the branch's git history using `git show <commit>:.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()`
|
||||
|
|
|
|||
|
|
@ -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 →
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
|
|
|
|||
|
|
@ -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/<repo-hash>/` 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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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@<version>-dev.<sha> with @dev tag
|
||||
│ DEV │ → publishes sf-run@<version>-dev.<sha> 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-sha>`, 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@<previous-good-version> latest
|
||||
npm dist-tag add sf-run@<previous-good-version> latest
|
||||
|
||||
# Roll back Docker
|
||||
docker pull ghcr.io/singularity-forge/sf-run:<previous-good-version>
|
||||
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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**
|
||||
|
||||
|
|
|
|||
|
|
@ -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: <current>-dev.<short-sha> │
|
||||
│ 2. npm publish gsd-pi@<version>-dev.<sha> --tag dev │
|
||||
│ 3. Smoke test: npx gsd-pi@dev --version │
|
||||
│ 2. npm publish sf-run@<version>-dev.<sha> --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@<version> next │
|
||||
│ 4. npm dist-tag add sf-run@<version> 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@<version> latest │
|
||||
│ 2. npm dist-tag add sf-run@<version> latest │
|
||||
│ 3. GitHub Release created with changelog │
|
||||
│ 4. Docker: tag runtime image as :latest + :v<version> │
|
||||
│ 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@<last-good> dev` |
|
||||
| Test stage fails after promoting to `@next` | Broken version on `@next` tag | Manual: `npm dist-tag add gsd-pi@<last-good> next`. `@latest` is never affected. |
|
||||
| Prod promotion publishes `@latest` then found broken | Broken production release | Manual: `npm dist-tag add gsd-pi@<previous-stable> latest` and `docker tag ghcr.io/singularity-forge/sf-run:<previous> 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@<last-good> dev` |
|
||||
| Test stage fails after promoting to `@next` | Broken version on `@next` tag | Manual: `npm dist-tag add sf-run@<last-good> next`. `@latest` is never affected. |
|
||||
| Prod promotion publishes `@latest` then found broken | Broken production release | Manual: `npm dist-tag add sf-run@<previous-stable> latest` and `docker tag ghcr.io/singularity-forge/sf-run:<previous> 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@<old-dev-version>`. 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@<old-dev-version>`. 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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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/<MID>/` on a `milestone/<MID>` 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/<MID>` 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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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="<tool_name>", 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/<GSD_PROJECT_ID>/` 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/<repo-hash>/` 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/<SF_PROJECT_ID>/` 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/<repo-hash>/` 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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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 (`<project>/.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 |
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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/<MID>` — 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 |
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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/<MID>/<MID>-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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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/)。
|
||||
|
||||
| 指南 | 说明 |
|
||||
|------|------|
|
||||
|
|
|
|||
|
|
@ -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/<MID>/` 下自己的 git worktree 中,分支名为 `milestone/<MID>`。所有 slice 工作都顺序提交,不需要切分支,也不会在 milestone 内部产生合并冲突。milestone 完成后,再整体 squash merge 回主分支,形成一个干净提交。
|
||||
- **`branch`**:工作发生在项目根目录下的 `milestone/<MID>` 分支上。适合子模块较多、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 # 默认关闭
|
||||
|
|
|
|||
|
|
@ -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**:自动模式继续运行
|
||||
|
|
|
|||
|
|
@ -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 自身不会拦截、生成或重放订阅凭据
|
||||
|
||||
## 审查过的来源
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
|||
<a id="mcp-server-mode"></a>
|
||||
## 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.
|
||||
```
|
||||
|
||||
如果已经是最新版本,它会给出提示且不做任何操作。
|
||||
|
|
|
|||
|
|
@ -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="<tool_name>", 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="<tool_name>", 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="<tool_name>", args={...})
|
|||
|
||||
| 变量 | 默认值 | 说明 |
|
||||
|------|--------|------|
|
||||
| `GSD_HOME` | `~/.gsd` | 全局 GSD 目录。除非单独覆盖,否则其它路径都从这里派生。影响偏好、skills、sessions 以及项目状态。(v2.39) |
|
||||
| `GSD_PROJECT_ID` | (自动哈希) | 覆盖自动生成的项目身份哈希。这样项目状态会写入 `$GSD_HOME/projects/<GSD_PROJECT_ID>/`,而不是计算出的哈希目录。适用于 CI/CD 或多个克隆共享状态。(v2.39) |
|
||||
| `GSD_STATE_DIR` | `$GSD_HOME` | 项目状态根目录。控制 `projects/<repo-hash>/` 的创建位置。对项目状态的优先级高于 `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/<SF_PROJECT_ID>/`,而不是计算出的哈希目录。适用于 CI/CD 或多个克隆共享状态。(v2.39) |
|
||||
| `SF_STATE_DIR` | `$SF_HOME` | 项目状态根目录。控制 `projects/<repo-hash>/` 的创建位置。对项目状态的优先级高于 `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 会记录告警后继续。
|
||||
|
||||
<a id="gitauto_pr"></a>
|
||||
#### `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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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(`<project>/.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` |
|
||||
|
|
|
|||
|
|
@ -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+) |
|
||||
|
||||
|
|
|
|||
|
|
@ -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 次进程拉起,从而提升了自动模式吞吐量。
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# 从 v1 迁移
|
||||
|
||||
如果你有仍在使用原始 Get Shit Done(v1)`.planning` 目录结构的项目,可以把它们迁移到 GSD-2 的 `.gsd` 格式。
|
||||
如果你有仍在使用原始 Singularity Forge(v1)`.planning` 目录结构的项目,可以把它们迁移到 SF 的 `.gsd` 格式。
|
||||
|
||||
## 运行迁移
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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/<MID>`:每个 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 集成** | 检测并清理孤儿会话 |
|
||||
|
|
|
|||
|
|
@ -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 @@
|
|||
<a id="built-in-providers"></a>
|
||||
## 内置 Providers
|
||||
|
||||
内置 providers 的 models 已经预注册在 GSD 里。你只需要提供认证信息。
|
||||
内置 providers 的 models 已经预注册在 SF 里。你只需要提供认证信息。
|
||||
|
||||
<a id="anthropic-claude"></a>
|
||||
### 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="..."
|
|||
<a id="local-providers"></a>
|
||||
## 本地 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` 参数完全一
|
|||
<a id="custom-openai-compatible-endpoints"></a>
|
||||
## 自定义 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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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 会根据当前上下文处理超时,通常是做一个保守默认选择,或者暂停自动模式。
|
||||
|
||||
## 命令
|
||||
|
||||
|
|
|
|||
|
|
@ -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`,供人工审核。
|
||||
|
||||
一个关键设计原则是:技能**永远不会被自动修改**。研究表明,人工策展的技能明显优于自动生成技能,因此保留人工审核是必要的。
|
||||
|
|
|
|||
|
|
@ -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:
|
|||
<a id="complexity-based-task-routing"></a>
|
||||
## 基于复杂度的 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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
```
|
||||
|
|
|
|||
|
|
@ -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。
|
||||
|
||||
## 认证令牌持久化
|
||||
|
||||
|
|
|
|||
|
|
@ -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 先完成,之后才会启动下游工作。
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
|-----------|----------|---------|
|
||||
|
|
|
|||
|
|
@ -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/<MID>` 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
|
||||
|
|
|
|||
|
|
@ -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="<tool>", args={...})` — confirms a real tool call works
|
||||
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 <model>` |
|
||||
| LM Studio model ID mismatch | ID doesn't match server | Check LM Studio's server tab for the exact identifier |
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 |
|
||||
|------------|--------|
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue