Commit graph

75 commits

Author SHA1 Message Date
Justin Wyer
5ae78d8f8b docs: document command allowlist and fetch_page URL blocking
- custom-models.md: add Command Allowlist section under Value Resolution
  explaining the restriction, default list, and how to override via
  allowedCommandPrefixes setting or GSD_ALLOWED_COMMAND_PREFIXES env var

- configuration.md: add URL Blocking (fetch_page) section documenting
  what's blocked by default, why, and how to allowlist specific hosts
  via fetchAllowedUrls setting or GSD_FETCH_ALLOWED_URLS env var

- configuration.md: add both env vars to the Environment Variables table
2026-04-02 13:55:07 +02:00
Tom Boucher
fb0fb5582e fix: replace invalid Discord invite links with canonical URL (#3056)
Closes #2699

The Discord badge in README.md pointed to https://discord.gg/gsd (expired
vanity URL) and the Pi ecosystem doc used an old invite code. Both now use
the canonical invite https://discord.com/invite/nKXTsAcmbT that was
established in commit 0a1dad9a.

Adds a regression test that validates all Discord invite links in
user-facing files match the canonical URL.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-30 14:45:32 -06:00
Jeremy McSpadden
ff2c2605f3 feat(gsd): enable safety mechanisms by default (snapshots, pre-merge checks) (#2678)
Flip two safety mechanisms from opt-in to opt-out so all users benefit
from rollback protection and merge regression checks without manual
configuration.

- git.snapshots: false → true (creates recovery refs before destructive ops)
- git.pre_merge_check: false → "auto" in solo mode (auto-detects test runner)

Both remain configurable; users can explicitly disable with snapshots: false
or pre_merge_check: false.

Closes #2677
2026-03-26 18:15:31 -06:00
Iouri Goussev
a952391b33 chore: rename preferences.md to PREFERENCES.md for consistency (#2700) (#2738)
All other .gsd/ state files use uppercase naming (DECISIONS.md,
REQUIREMENTS.md, PROJECT.md, etc). This renames the canonical
preferences file to PREFERENCES.md while keeping a migration
fallback — the loader checks PREFERENCES.md first, then falls
back to lowercase preferences.md for existing installations.

Closes #2700

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 16:09:59 -06:00
Yang Yang
665e2aa1cb fix(notifications): prefer terminal-notifier over osascript on macOS (#2633)
osascript display notification is silently swallowed by macOS when the
calling terminal app (Ghostty, iTerm2, etc.) lacks notification
permissions in System Settings. The command exits 0 with no error,
making the failure invisible.

terminal-notifier registers as its own Notification Center app, so
macOS prompts the user for permission on first use — the expected UX.

Changes:
- Add findExecutable() helper to locate terminal-notifier on PATH
- buildDesktopNotificationCommand() prefers terminal-notifier when
  available, falls back to osascript (preserving existing behavior)
- Update tests to handle both terminal-notifier and osascript paths
- Add macOS delivery note to docs/configuration.md notifications section
- Add troubleshooting entry for notifications not appearing on macOS

Fixes #2632

Co-authored-by: Yang Yang(NYC) <Yang.Yang2@bcg.com>
2026-03-26 09:24:32 -06:00
Jeremy McSpadden
f8c6ab0c54 chore: consolidate docs, remove stale artifacts, and repo hygiene (#2665)
* fix(vscode): add extensionKind and error handler for Remote SSH support

* fix(vscode): reject failed RPC startup

* docs: consolidate docs, remove stale artifacts, and repo hygiene

- Remove docs-internal/ (duplicate of docs/); update pr-risk-check.mjs path
- Sync 9 diverged files to latest content (commands, config, troubleshooting, etc.)
- Fix pi --web → gsd --web naming in docs/README.md
- Copy FRONTIER-TECHNIQUES.md and ADR-004 to docs/ before removal
- Delete orphaned PR screenshot folders (pr-876/, pr-1530/) — unreferenced
- Remove committed pnpm-lock.yaml files (project uses npm)
- Move PLAN.md → .plans/doctor-cleanup-consolidation.md
- Move web/left-native-tui-main-session-plan.md → .plans/
- Delete .DS_Store and vscode-extension/dist/ from disk

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-26 09:13:41 -06:00
Lex Christopherson
9f4bf8c452 fix: restore PR files lost during merge conflict resolution
Files added by PR #2008 that were not in main were dropped during
the merge. Restore all src/, docs/, and scripts/ files from the
pre-merge PR head.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:39:33 -06:00
Lex Christopherson
91ec77291a merge: resolve conflicts with origin/main for PR #2008
Merge main's userSubdirs guard pattern with ecosystem skills directory
migration logic. Keep both detection.ts entry sets (PR's expanded markers
+ main's .NET/Xcode/Docker entries). Preserve PR's skills test assertion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 22:36:37 -06:00
Lex Christopherson
d20d5e8fb5 docs: add Mintlify documentation site and move internal docs
Add a proper public-facing documentation site using Mintlify with 19 MDX
pages covering getting started, auto mode, commands, configuration, and
all user-facing features. Move internal/SDK documentation (Pi SDK, TUI,
context & hooks, research notes, ADRs) to docs-internal/ since they
should not be part of the public documentation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 09:54:41 -06:00
Tom Boucher
3e68acfa11 docs: sync documentation with codebase through v2.44.0 (#2415) 2026-03-24 21:36:25 -06:00
Lex Christopherson
fa376bf816 merge: incorporate main into next (resolve 26 conflicts)
Merges 39 commits from main into next, including:
- WAL/journal runtime exclusion fixes (#2299)
- Memory and resource leak fixes (#2314)
- Freeform DECISIONS.md preservation (#2319)
- Per-prompt token cost display (#2357)
- Web UI project root switching (#2355)
- CODEOWNERS and team workflow docs (#2286)
- CI flake threshold fix (#2327)
- Various other bugfixes

All conflicts resolved preserving both PR #2280 DB-backed planning
functionality and main's bugfixes.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 13:21:19 -06:00
Lex Christopherson
7ca3ce04a4 fix(gsd): remove stale observability validator + fix greenfield worktree check
The observability validator checked for markdown headings (## Observability / Diagnostics,
## Observability Impact) that the DB-backed renderer never produces, causing false-positive
warnings on every dispatch. Removed entirely — the DB schema enforces structure at write time.

The worktree health check blocked execution in directories without recognized project files
(package.json, Cargo.toml, etc.), preventing greenfield projects from scaffolding. Downgraded
to a warning — .git check remains as the hard gate.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 07:27:48 -06:00
Derek Pearson
6889f6666f docs(skills): update all references from ~/.gsd/agent/skills/ to ~/.agents/skills/
Updates docs/skills.md with:
- New skill directories section (global + project-local)
- Migration note for existing users
- Installation via skills.sh CLI
- Curated onboarding catalog with all available packs
- Maintainer guide for adding/editing catalog entries

Also updates:
- docs/configuration.md: skill lookup paths
- docs/what-is-pi/09-the-customization-stack.md: placement paths
- docs/context-and-hooks/07-the-system-prompt-anatomy.md: example path
- src/resource-loader.ts: JSDoc comment (skills no longer synced)
2026-03-22 05:35:14 -04:00
TÂCHES
60885610ac feat(gsd): unified rule registry, event journal, journal query tool, and tool naming convention (#1928)
Unify dispatch rules and hooks into a flat rule registry, add structured event journal with causal tracing, expose journal query as an LLM tool, and adopt gsd_concept_action tool naming.

- RuleRegistry class absorbs dispatch rules + hooks into UnifiedRule objects with common when/where/then shape
- post-unit-hooks.ts refactored from 524 lines → 90-line thin facade delegating to the registry
- Event journal emits structured JSONL events with per-iteration flowId grouping and causedBy chains
- gsd_journal_query LLM-callable tool for AI self-debugging of autonomous runs
- 4 DB tools renamed to gsd_concept_action pattern with backward-compatible aliases
- 164 new tests, zero regressions

Closes #1763, closes #1764, closes #1766

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 18:47:41 -06:00
Jeremy McSpadden
bdd1e765f5 feat(ci): PR risk checker — classify changed files by system and surface risk level (#1930) 2026-03-21 18:12:01 -06:00
Tom Boucher
9fe82c18dc docs: add v2.41.0 release notes to README and docs (#1840)
Update README "What's New" section with v2.41.0 highlights organized by
category: new features (web interface, doctor lifecycle), data loss
prevention (7 critical fixes), auto-mode stability, roadmap parser
improvements, state/git fixes, Windows/platform support, and DX.

- Add web-interface.md documenting the new browser-based UI
- Add web interface entry to docs/README.md index
- Move v2.39-v2.40 highlights to "Previous highlights" section

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 13:55:28 -06:00
Tom Boucher
c1c7f8b6b0 perf(ci): reduce pipeline minutes with shallow clones, npm caching, and exponential backoff (#1700)
CI workflow:
- Replace fetch-depth: 0 with shallow clones (depth 1-2) in lint and
  build jobs — saves ~30-60s per job
- Remove fetch-depth: 0 from build and windows-portability (default
  depth 1 is sufficient for build/test)

Pipeline workflow:
- Add cache: 'npm' to dev-publish, test-verify, and prod-release
  setup-node steps — saves ~1-2 min per job on npm ci
- Move ${{ }} expressions from run: blocks to env: variables in
  prod-release and update-builder to prevent command injection vectors
- Use fetch-depth: 2 in update-builder (only needs parent diff)

Build-native workflow:
- Replace hardcoded sleep 30 + single verification with exponential
  backoff polling (5s → 10s → 20s → 30s cap, max 5 attempts)
- Replace fixed 15s retry intervals in post-publish smoke test with
  exponential backoff (5s → 10s → 20s → 30s cap, 8 attempts)
- Replace fixed 15s dist-tag verification loop with exponential
  backoff (6 attempts vs 10 × 15s)

Estimated savings: ~5-10 min per full CI+pipeline run, ~1-3 min per
native build publish.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: TÂCHES <afromanguy@me.com>
2026-03-21 08:43:56 -06:00
Matt Haynes
6277440581 fix: harden auto-mode against stale integration metadata and Windows file locks (#1633)
Fixes #1575
2026-03-21 08:40:27 -06:00
Tom Boucher
55d6c7d9f1 feat(ci): skip build/test for docs-only PRs and add prompt injection scan (#1699)
Docs-only PRs (only .md files and docs/ changes) now skip the expensive
build, typecheck, and test jobs while still running lint and a new
docs-check job. The docs-check job runs a prompt injection scanner that
detects hidden directives, role overrides, system prompt markers, tool
call injection, and invisible Unicode in markdown prose (excluding
fenced code blocks and inline code spans).

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 08:39:03 -06:00
Tom Boucher
7385cf4bb8 docs: update documentation for v2.39.0–v2.40.0 release (#1696)
Cover all new features across README, commands, configuration,
auto-mode, and getting-started docs: GitHub sync extension, Skill
tool resolution, health check phase 2, forensics debugger upgrade,
auto PR on milestone completion, RUNTIME.md template, welcome screen,
GSD_HOME/GSD_PROJECT_ID env vars, browser/runtime UAT types, pipeline
decomposition, sliding-window stuck detection, and data-loss recovery.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 08:38:05 -06:00
Italo Almeida
e4c23f9c28 feat(docs): add Custom Models guide and update related documentation (#1670) 2026-03-21 08:35:31 -06:00
Tom Boucher
ea4d7d639e docs: update documentation for v2.38.0 release (#1636)
Update README "What's New" section to v2.38 with reactive task
execution (ADR-004), Anthropic Vertex AI provider, CI optimization,
and batch verification. Collapse v2.34–v2.37 into previous highlights.

Add reactive task execution section to auto-mode guide with
configuration and implementation details. Add AI triage workflow and
CI optimization note to CI/CD pipeline guide. Add ADR-003 to docs
index. Add 3 troubleshooting entries: session lock theft, worktree
commits on wrong branch, and extension subpath export errors.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 13:20:44 -06:00
Glen
869e037202 feat: add GSD_HOME env var to override global ~/.gsd directory (#1566)
Centralise all ~/.gsd path construction through app-paths.ts (compiled
code) or a module-level `gsdHome` const (runtime extensions that cannot
import app-paths). When GSD_HOME is set, every path that previously
resolved under ~/.gsd now resolves under the override.

Existing overrides (GSD_STATE_DIR, GSD_CODING_AGENT_DIR) continue to
take precedence when set.
2026-03-20 08:29:01 -06:00
Nathan Roe
39cd932abb feat: add anthropic-vertex provider for Claude on Vertex AI (#1533)
* feat: add anthropic-vertex provider for Claude models on Google Vertex AI

Add a new anthropic-vertex provider that enables using Claude models
(Opus 4.6, Sonnet 4.6, Haiku 4.5) through Google Vertex AI using the
@anthropic-ai/vertex-sdk package. Follows the same pattern as the
existing google/google-vertex provider split.

Detection uses ANTHROPIC_VERTEX_PROJECT_ID (same env var as Claude Code)
with CLOUD_ML_REGION for region selection, falling back to us-central1.

Extracts shared Anthropic utilities into anthropic-shared.ts (message
conversion, tool conversion, param building, stream processing) to
avoid duplication between anthropic.ts and anthropic-vertex.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add full Claude model set for anthropic-vertex provider

Add 200K context window variants for Opus 4.6 and Sonnet 4.6, plus
older models (Sonnet 4.5, Sonnet 4, Opus 4.5, Opus 4.1, Opus 4, Haiku 4.5).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: add @anthropic-ai/vertex-sdk to root dependencies

Required for the published package to resolve the vertex SDK at runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: remove unnecessary comments to match codebase style

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: remove duplicate stream functions after rebase

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Nathan Roe <nathan.roe@carvana.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 23:14:13 -06:00
Jeremy McSpadden
111537f460 docs: fix stale references across documentation (#1543)
* docs: update README for v2.37 — changelog, extensions, stale refs

- Update "What's New" section from v2.33 to v2.37
- Update extensions table: add Async Jobs and GitHub, remove LSP (Pi SDK core)
- Fix extension count in architecture section (12 → 18)
- Remove stale v2.17 version tags from Token Optimization section

* docs: fix stale references across documentation

- commands.md: update version example from v2.28 to v2.37
- troubleshooting.md: fix Node.js requirement from ≥20.6.0 to ≥22.0.0
- skills.md: fix project-local skills path from .pi/ to .gsd/
- CONTRIBUTING.md: fix scope area paths to include packages/ prefix,
  remove incorrect PR #1232 supply chain attack reference
- vscode-extension: fix Node.js requirement, remove hardcoded RPC
  command count (changes over time)

* docs: add troubleshooting for command not found after install

Addresses #1542 — npm global bin directory not in PATH is a common
issue on macOS, especially with Homebrew Node, version managers, or
oh-my-zsh git aliases.

- Add "command not found: gsd" section to troubleshooting.md
- Add callout to getting-started.md install section
2026-03-19 22:14:03 -06:00
Jeremy McSpadden
c9d79a829c feat(dashboard): two-column layout with redesigned widget (#1530)
* feat(dashboard): two-column layout with redesigned widget

- Two-column layout: progress bar left, task checklist right
- 4 widget modes: full → small → min → off (cycle with /gsd widget)
- Health indicator and ETA in header line for immediate visibility
- Simplified stats: 3 items (hit rate, cost, context %) instead of 7
- Short PWD (last 2 segments), git worktree name with ⎇ prefix
- Last commit time + message in footer (cached every 15s)
- Preview script with mock data for all modes

* docs: add dashboard widget screenshots for PR #1530

* docs: update dashboard screenshots with wider renders

* docs: wider full-width dashboard screenshots

* feat(dashboard): persist widget_mode in preferences

- Add widget_mode to GSDPreferences and KNOWN_PREFERENCE_KEYS
- Load saved widget_mode from preferences on first access
- Persist to global PREFERENCES.md on /gsd widget change
- Default remains "full" when no preference is set
2026-03-19 20:07:18 -06:00
TÂCHES
c2d46a951b fix: wire dead token-profile defaults and add /gsd rate command (#1505) (#1516)
- Wire resolveProfileDefaults into loadEffectiveGSDPreferences so
  token_profile: budget actually sets cheaper models and skips phases
- Add /gsd rate <over|ok|under> command to submit user feedback on
  model tier assignments, completing the adaptive routing feedback loop
- Document that models config is required for dynamic routing activation
- Document ceiling behavior when dynamic routing is active
- Document reassess_after_slice as required for reassessment

Closes #1505 (partial — escalateTier wiring deferred to follow-up)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 17:53:00 -06:00
Tom Boucher
8aa71bfb55 fix: prevent ensureGitignore from adding .gsd when tracked in git (#1364) (#1367)
* rfc: GitOps branching & versioning strategy proposal

Proposes a Git-Flow Lite model with automated integration branches:

  main          ← production-ready, tagged releases only
  next          ← integration branch for next minor (PRs target here)
  release/X.Y   ← stabilization branch, only bugfixes allowed
  hotfix/X.Y.Z  ← emergency fixes cherry-picked to release

Includes:
  - RFC document with lifecycle diagrams, migration path, open questions
  - Workflow scaffolds (in docs/proposals/workflows/, NOT .github/):
    - create-release.yml: manual dispatch to cut release branch from next
    - sync-next.yml: auto-sync next branch after version tags
    - backmerge.yml: auto back-merge release fixes to next

This is an experimental proposal requesting community feedback before
any implementation. The workflow files are inert scaffolds — they do
not run in CI.

* fix: prevent ensureGitignore from adding .gsd when tracked in git (#1364)

CRITICAL DATA-LOSS FIX: ensureGitignore() unconditionally added '.gsd' to
.gitignore even when .gsd/ was a real git-tracked directory, causing git to
report ~889 tracked files as deleted.

Root cause: BASELINE_PATTERNS included '.gsd' unconditionally, and the
gitignore modification ran BEFORE migration checks in auto-start.ts.

Changes:
- Add hasGitTrackedGsdFiles() helper using nativeLsFiles to detect tracked
  .gsd/ content
- ensureGitignore() now skips the '.gsd' pattern when .gsd/ has tracked files
- untrackRuntimeFiles() now skips entirely when .gsd/ has tracked files
- migrateToExternalState() aborts when .gsd/ has tracked files
- Reorder auto-start.ts: migration runs BEFORE gitignore modification
- Add 8 regression tests covering all scenarios

Fixes #1364

* fix: break recursive dialog loop when all milestones complete (#1348)

Two interacting bugs:

1. Recursive dialog loop: When all milestones are complete, bootstrapAutoSession
   calls showSmartEntry → sets pendingAutoStart → checkAutoStartAfterDiscuss
   calls startAuto → bootstrapAutoSession → showSmartEntry → infinite loop.
   The discuss workflow completes without producing a milestone directory, so
   phase stays 'complete' and the cycle never breaks.

   Fix: Add a re-entry counter (_consecutiveCompleteBootstraps) that tracks
   how many times bootstrapAutoSession enters the 'complete' branch without
   advancing. After 2 consecutive attempts, break the loop with a warning
   message and return false.

2. Missing _releaseFunction = null in retry lock onCompromised handler:
   The retry lock path in session-lock.ts set _lockCompromised but didn't
   null out _releaseFunction, which could leave a stale reference that
   masks the compromise detection in validateSessionLock().

Fixes #1348

* fix: self-heal stale roadmap checkbox for interrupted complete-slice (#1350)

When complete-slice is interrupted after writing SUMMARY.md and UAT.md but
before flipping the roadmap checkbox, auto-mode enters an infinite loop —
re-launching the same complete-slice unit because the dispatch loop uses
the roadmap checkbox as the sole 'slice done' signal.

Fix: Add a self-heal case in selfHealRuntimeRecords that detects when
SUMMARY + UAT exist but the roadmap checkbox is unchecked, and auto-fixes
the checkbox. This allows the verification to pass and the dispatch loop
to advance.

Fixes #1350

* fix: add EISDIR guard to complete/validate milestone prompts (#1343)

The LLM was passing tasks/ directory paths to the read tool during
milestone completion, causing EISDIR crashes. Added file system safety
instructions to both complete-milestone and validate-milestone prompts
telling the LLM to use ls/find for directory listing, not the read tool.

Fixes #1343

* feat: improve extension conflict messages with removal guidance (#1347)

When a user extension registers tools/commands that now ship as built-ins,
the conflict message now includes '(built-in tool supersedes — consider
removing <path>)' and the log level is downgraded from 'Extension load error'
to 'Extension conflict'.

Changes:
- resource-loader.ts: detect built-in vs user extension conflicts, add hint
- cli.ts: downgrade severity for superseded-tool conflicts

Fixes #1347

* test: fix always-skipped preferences test, add test:marketplace script

- preferences.test.ts: Replace always-skipped getIsolationMode test with
  a filesystem-independent version that validates the default through
  validatePreferences() instead of reading ~/.gsd/preferences.md.
  Reduces skipped count from 3 → 2.

- package.json: Add test:marketplace script for running marketplace
  contract tests (claude-import-tui, plugin-importer-live,
  marketplace-discovery) with GSD_TEST_CLONE_MARKETPLACES=1.
  These tests need external repos and self-skip in unit test runs.

Remaining 2 skips:
- Marketplace contract test suites (need external repos, run via test:marketplace)
- Windows-only tests in validate-directory.test.ts are platform-conditional
  and correctly skip on macOS

* fix: use execFileSync in regression tests for Windows portability

The regression tests used execSync with shell-dependent constructs:
- '&&' command chaining (works in bash/cmd but fragile)
- Single-quoted commit messages (bash-only, cmd.exe splits on spaces)

Replaced with execFileSync via a git() helper that bypasses the shell
entirely. Each git operation is a separate call with proper argument
arrays, eliminating all shell interpretation issues.

Fixes windows-portability CI failure.

* fix: guard milestone completion against missing slice summaries (#1368)

Auto-mode could report a milestone as complete after executing only the
last slice, skipping earlier unexecuted slices. The milestone completion
signal fired based on roadmap checkbox state, which could be stale or
inconsistent after worktree transitions.

Changes:
- auto-dispatch.ts: Added slice SUMMARY file existence check to both
  validating-milestone and completing-milestone dispatch rules. If any
  slice lacks a SUMMARY file, dispatch stops with a diagnostic error
  instead of proceeding to validation/completion.
- validate-milestone.test.ts: Updated tests to create slice summary
  files (required by the new guard).
- file-watcher.test.ts: Fixed flaky 'auth.json change emits auth-changed
  event' test by adding watcher initialization delay and increasing event
  propagation timeout (race condition when run in full suite).

Fixes #1368

* fix: warn on common misspelled preference keys + verify field guidance (#1373, #1341)

#1373: Users setting 'taskIsolation.mode: none' instead of 'git.isolation: none'
got a generic 'unknown key' warning. Added KEY_MIGRATION_HINTS that map common
misspellings (taskIsolation, task_isolation, isolation, manage_gitignore, auto_push,
main_branch) to their correct git.* equivalents with actionable messages.

#1341: Planning agent writes aspirational prose in Verify fields ('Sections 3.1
and 3.2 exist with exact formulas. Zero TBD.') instead of executable commands.
Added explicit verify field rules to the plan template: must be mechanically
executable, with examples of good vs bad patterns for content tasks.

Fixes #1373, partially addresses #1341

* refactor: extract roadmap-mutations.ts + shared test-utils.ts

Consolidation:
- roadmap-mutations.ts: Extracted markSliceDoneInRoadmap() and markTaskDoneInPlan()
  from duplicated implementations in doctor.ts, mechanical-completion.ts, and
  auto-recovery.ts. All three callers used identical regex patterns.
  mechanical-completion.ts and auto-recovery.ts now import the shared utility.
  (doctor.ts deferred — touched by PR #1349)

- test-utils.ts: Shared cross-platform test utilities for GSD extension tests.
  Provides git() helper (execFileSync, no shell), makeTempRepo() with
  core.autocrlf=false, cleanup(), createFile(), safeReadFile(), and
  writeMilestoneFixture(). 12 test files currently define their own versions
  of these helpers — new tests should import from test-utils.ts instead.

Security audit: No injection vectors (sid/tid are alphanumeric from roadmap
parser), no path traversal, no secrets, no new dependencies.

* fix: port conflict false positive on non-Node projects + paused worktree resume (#1381, #1383)

projects without package.json. macOS AirPlay Receiver listens on port 5000,
causing a spurious warning on non-Node projects.
Fix: Skip port checks entirely when no package.json exists. When using
default ports, filter out 5000 on macOS.

in-memory only. Re-entering /gsd started a fresh bootstrap from the project
root instead of the active worktree.
Fix: pauseAuto() now writes paused-session.json to .gsd/runtime/ with
milestoneId, worktreePath, originalBasePath, and stepMode. startAuto()
checks for this file before bootstrap and restores the paused session
context, including worktree re-entry. stopAuto() cleans up the file.

Fixes #1381, #1383

* fix: catch spawn ENOENT in uncaught exception guard + snapshot session lock path (#1384, #1363)

uncaught exception and crashes auto-mode. The EPIPE guard now also catches
ENOENT from spawn syscalls — logs the error and continues instead of
terminating the process.

the lock path differently via gsdRoot() because basePath could be either the
project root or a worktree path. gsdRoot() produces different results for
each, so the lock was written to one path and validated against another.
Fix: Snapshot the resolved lock path (_snapshotLockPath) at acquisition time
and reuse it for all subsequent lock operations within the session.

Fixes #1384, #1363

* fix: suppress false-positive lock compromise + skip migration with active worktrees (#1362, #1337)

because the event loop stall delays the heartbeat mtime update. The handler
now checks elapsed time since acquisition — if within the 30-minute stale
window, it logs a warning and continues instead of setting _lockCompromised.
Real takeovers (past the stale window) still trigger the compromise flag.

even when .gsd/worktrees/ contained active git worktrees with locked
directory handles. This caused EBUSY errors and destructive data loss.
Migration now checks for active worktree directories and skips entirely
if any are found.

Fixes #1362, #1337
2026-03-19 17:06:01 -06:00
TÂCHES
671b72b684 Merge pull request #1446 from frizynn/refactor/extension-type-guards-consolidation
refactor: consolidate extension type guards and inline handler aliases
2026-03-19 15:44:17 -06:00
frizynn
bbc180a3b6 refactor: consolidate extension type guards and inline handler type aliases
Replace 7 individual ToolResultEvent type guards (isBashToolResult,
isReadToolResult, etc.) with a unified isToolResultEventType() function,
mirroring the existing isToolCallEventType() pattern.

Inline 14 handler type aliases (SendMessageHandler, SetModelHandler, etc.)
directly into the ExtensionActions interface since they were only used there
and added no semantic value.

Update documentation examples to use the new unified guard.
2026-03-19 14:55:00 -03:00
John Brahy
0c83046a51 docs: add guidance for local custom MCP setup 2026-03-19 01:27:37 -07:00
Tom Boucher
0e4db4b709 docs: update README and docs for v2.33.0 release (#1320) 2026-03-18 21:15:11 -06:00
TÂCHES
8ac58d88f0 feat: simplify auto pipeline — merge research into planning, mechanical completion (ADR-003) (#1235)
Reduces auto-mode session count from ~30 to ~16 per milestone by:

1. Merging research into planning: plan-milestone and plan-slice prompts
   now include exploration instructions instead of depending on separate
   research sessions. All profiles default skip_research/skip_slice_research.

2. Mechanical completion: new mechanical-completion.ts deterministically
   aggregates task summaries into slice/milestone artifacts (SUMMARY, UAT,
   VALIDATION, roadmap checkboxes) post-verification, eliminating LLM
   sessions for complete-slice and validate-milestone.

3. Reassess opt-in: reassess-roadmap now requires explicit
   reassess_after_slice: true instead of firing by default.

4. Reduced context inlining: plan prompts reference PROJECT/REQUIREMENTS/
   DECISIONS by path instead of inlining full content.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 13:53:51 -06:00
TÂCHES
28c741c196 refactor: replace MCPorter with native MCP client (#1210)
* refactor: replace MCPorter CLI with native MCP client using @modelcontextprotocol/sdk

MCPorter is a third-party global CLI that fails to install on many systems,
producing error noise on every startup. Replace it with a native extension
that uses the already-bundled @modelcontextprotocol/sdk Client class directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: update README extension table from MCPorter to MCP Client

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: add .js suffix to MCP SDK subpath imports for NodeNext resolution

The SDK wildcard export (./*) requires .js suffix for TypeScript NodeNext
module resolution. Also add .js-suffixed virtual module keys so jiti
resolves them correctly in compiled Bun binaries.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 12:26:16 -06:00
Tom Boucher
556443b6e3 docs: comprehensive documentation update (#1142)
README.md:
- Updated 'What's New' section with CI/CD, Docker, /gsd keys, milestone
  parking, Studio, per-project MCP config
- Added CI/CD pipeline doc link
- Added /gsd keys to commands table

docs/commands.md:
- Added /gsd keys, /gsd config, /gsd new-milestone commands
- Added Milestone Management section with park/unpark/discard/skip/undo

docs/troubleshooting.md:
- Added Windows-specific issues (LSP ENOENT, EBUSY file locks)
- Added database initialization troubleshooting
- Added verification gate syntax error troubleshooting
2026-03-18 08:31:09 -06:00
TÂCHES
d3242c4c6e Merge pull request #1021 from trek-e/ci-cd
CI/CD: Three-stage promotion pipeline (Dev → Test → Prod)
2026-03-17 22:18:51 -06:00
TÂCHES
965028e219 Merge pull request #1077 from jeremymcs/feat/token-optimization-suite
feat: token optimization suite — caching, compression, smart context selection
2026-03-17 22:07:52 -06:00
Tom Boucher
41186ad9b0 docs: document /gsd config for global API keys (#1079)
* docs: add Node LTS pinning guide for macOS Homebrew users

New doc (docs/node-lts-macos.md) explains how to pin Node 24 LTS
via Homebrew to avoid running on odd-numbered development releases.
Covers brew install/link/pin, version managers as alternatives,
and verification steps.

Added notice banner in README linking to the guide.

* docs: document /gsd config for global API keys

Added Global API Keys section to configuration.md explaining:
- /gsd config saves keys to ~/.gsd/agent/auth.json
- Keys apply to all projects automatically
- Three supported keys: Tavily, Brave, Context7
- How precedence works (env vars > saved keys)
- Anthropic models don't need search keys

Updated commands.md gsd config entry to link to the new section.
Added Set up API keys section to getting-started.md for first-run.
2026-03-17 22:03:10 -06:00
Tom Boucher
41ebc6b643 docs: recommend pi-dashscope extension for DashScope models (#1056)
* docs: add Node LTS pinning guide for macOS Homebrew users

New doc (docs/node-lts-macos.md) explains how to pin Node 24 LTS
via Homebrew to avoid running on odd-numbered development releases.
Covers brew install/link/pin, version managers as alternatives,
and verification steps.

Added notice banner in README linking to the guide.

* docs: recommend pi-dashscope extension for DashScope models

The built-in alibaba-coding-plan provider uses the Anthropic-compat
endpoint and lacks per-model thinking format and compatibility flags,
causing issues like #1003 (MiniMax-M2.5 thinking loop).

The community pi-dashscope extension uses the correct OpenAI-compat
endpoint, sets thinkingFormat per model (qwen/zai), includes compat
flags (supportsDeveloperRole, supportsReasoningEffort), and provides
an interactive /dashscope-configure command.

Added Community Provider Extensions section to configuration docs
recommending pi-dashscope over the built-in provider.
2026-03-17 21:59:01 -06:00
Tom Boucher
004f0ac861 docs: update README and docs for v2.28.0 release (#1054)
* docs: add Node LTS pinning guide for macOS Homebrew users

New doc (docs/node-lts-macos.md) explains how to pin Node 24 LTS
via Homebrew to avoid running on odd-numbered development releases.
Covers brew install/link/pin, version managers as alternatives,
and verification steps.

Added notice banner in README linking to the guide.

* docs: update README and docs for v2.28.0 release

- README: add 'What's New in v2.28' section with key features
- commands.md: add /gsd update, /gsd export --html --all, and
  Export section with usage examples
- auto-mode.md: add --all flag to export, add Failure Recovery
  (v2.28) section documenting reliability hardening
- getting-started.md: mention /gsd update as in-session option
2026-03-17 21:58:07 -06:00
Tom Boucher
c5739f1282 feat: auto-create PR on milestone completion (#687) (#1084)
* docs: add Node LTS pinning guide for macOS Homebrew users

New doc (docs/node-lts-macos.md) explains how to pin Node 24 LTS
via Homebrew to avoid running on odd-numbered development releases.
Covers brew install/link/pin, version managers as alternatives,
and verification steps.

Added notice banner in README linking to the guide.

* feat: auto-create PR on milestone completion (#687)

New git preferences:
- git.auto_pr (boolean, default false): create a PR when a
  milestone completes via gh CLI
- git.pr_target_branch (string, default main branch): target
  branch for auto-created PRs (e.g. develop, qa, staging)

Implementation:
- GitPreferences: added auto_pr and pr_target_branch fields
- preferences.ts: added validation for both fields
- auto-worktree.ts: after push, pushes milestone branch and
  creates PR via 'gh pr create' (non-fatal on failure)

Documentation:
- configuration.md: added fields to git config block, table,
  and new git.auto_pr section with requirements and flow
- git-strategy.md: added Automatic Pull Requests section with
  Gitflow example config
2026-03-17 21:45:29 -06:00
Tom Boucher
792b166ce6 fix: improve LSP diagnostics when no servers detected (#1082) (#1086)
* docs: add Node LTS pinning guide for macOS Homebrew users

New doc (docs/node-lts-macos.md) explains how to pin Node 24 LTS
via Homebrew to avoid running on odd-numbered development releases.
Covers brew install/link/pin, version managers as alternatives,
and verification steps.

Added notice banner in README linking to the guide.

* fix: improve LSP diagnostics when no servers detected (#1082)

When lsp status returns 'No language servers configured', the output
now includes diagnostics:
- Which project markers were detected (e.g. package.json found)
- Which server commands are missing (e.g. typescript-language-server)
- Install instructions

Also added LSP troubleshooting section to docs/troubleshooting.md
with common install commands per language.
2026-03-17 21:45:11 -06:00
Jeremy McSpadden
d65da6c927 feat: wire semantic chunking, add preferences, metrics, and docs
- Wire semantic chunker into inlineFileSmart() for large file context selection
- Use inlineFileSmart for knowledge file in buildExecuteTaskPrompt (TF-IDF relevance)
- Add compression_strategy and context_selection preferences with profile defaults
- Add resolveCompressionStrategy() and resolveContextSelection() resolvers
- Add cacheHitRate and compressionSavings to UnitMetrics
- Add aggregateCacheHitRate() for session-wide cache performance
- Update token-optimization.md with compression, chunking, and distillation docs
- Add 12 integration tests for optimization preferences and modules
2026-03-17 22:07:05 -05:00
Tom Boucher
7ba993cbfb docs: add troubleshooting for oh-my-zsh gsd alias collision (#722) (#1051)
oh-my-zsh's git plugin defines alias gsd='git svn dcommit' which
shadows the GSD binary. Added troubleshooting section to
getting-started.md with two solutions: unalias in .zshrc, or use
the gsd-cli alternative binary name.
2026-03-17 18:41:04 -06:00
Tom Boucher
c3a7d5aad1 docs: add CI/CD pipeline guide for maintainers and contributors
Covers: environment promotion flow, testing dev/next/latest builds,
Docker images, gating tests (including AutoSession encapsulation),
rollback procedures, fixture recording, and GitHub configuration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 20:25:19 -04:00
Tom Boucher
fbdec3216f Add CI/CD pipeline implementation plan
11 tasks across 6 chunks: version stamping, Dockerfile, smoke tests,
fixture provider, fixture recordings, live test stubs, pipeline workflow,
cleanup workflow, builder image, recording helper, final integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 20:25:19 -04:00
Tom Boucher
69116d57ae Add CI/CD pipeline design spec
Three-stage promotion pipeline (Dev → Test → Prod) using npm dist-tags,
GitHub Environments, Docker images, and an LLM fixture recording system.
Addresses reviewer feedback: concurrency control, failure recovery,
native binary strategy, workflow deduplication, builder image versioning.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 20:25:19 -04:00
Tom Boucher
f432eea5a7 fix: replace ambiguous compound question in reflection step (#963) (#1002)
* Add CI/CD pipeline design spec

Three-stage promotion pipeline (Dev → Test → Prod) using npm dist-tags,
GitHub Environments, Docker images, and an LLM fixture recording system.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: replace ambiguous compound question in reflection step (#963)

The reflection prompt 'Did I get that right, or did I miss something?'
is a compound question where 'yes' maps to both possible answers.

Replaced with 'Does that capture it? If not, tell me what I missed.'
— one closed question plus an instruction, removing ambiguity.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 18:00:08 -06:00
Juan Francisco Lebrero
99c3375f18 feat: add gsd headless query for instant state inspection (#951)
* feat: add `gsd headless query` for structured state inspection

Add read-only query commands that return parseable JSON without
spawning an LLM session. Decouples orchestrators from .gsd/ internals.

Targets: phase, cost, progress, next

* simplify: single `query` command returning full snapshot

Replace 4 query targets (phase/cost/progress/next) with one command
that returns everything in a single JSON object. Caller uses jq.

Also document query in README.md and docs/commands.md.

* docs: update gsd-headless skill and references

- SKILL.md: add missing flags (--supervised, --max-restarts, --response-timeout)
- references/commands.md: add query, discuss, remote, inspect, forensics
- references/multi-session.md: fix spawning syntax, use query for budget

* fix: remove integration tests that entered via merge

These files belong to the feat/headless-orchestration-skill branch
and were accidentally included during the upstream/main merge.
They contain TS errors (sessionTerminated scope issue) that break CI.

* fix: restore headless-command.ts deleted by accident
2026-03-17 16:03:59 -06:00
Tom Boucher
87122e0b7a docs: update documentation for v2.27.0 release (#959)
README.md:
- Added provider error recovery section (item 5) covering transient
  vs permanent error classification and auto-resume behavior
- Updated crash recovery to mention headless auto-restart with backoff
- Fixed numbered list (was 1-11 with duplicate 7, now 1-12 sequential)

docs/parallel-orchestration.md:
- Updated worker crash recovery section to reflect v2.27 persistent
  state — workers now survive crashes via disk state recovery
2026-03-17 15:50:55 -06:00