Commit graph

3080 commits

Author SHA1 Message Date
Jeremy
cc5157e534 fix(gsd): remove broken discuss-prepared template, inject briefs into discuss.md
The discuss-prepared.md template (PR #3602) broke new project init by
presenting codebase analysis as scope recommendations before asking
the user what they want to build. On fresh projects it would invent
project scope from existing files instead of asking "What's the vision?"

- Delete discuss-prepared.md, context-enhanced.md, prompt-validation.ts
- Rewrite prepareAndBuildDiscussPrompt() to inject preparation briefs
  as supplementary context into the standard discuss.md template
- Add {{preparationContext}} placeholder to discuss.md
- Delete 5 test files that only tested removed code
- Keep preparation.ts engine intact — codebase analysis is useful
  background context, just shouldn't drive scope

Fixes #3934
2026-04-10 11:30:10 -05:00
github-actions[bot]
61ea410e33 release: v2.68.1 2026-04-10 15:59:03 +00:00
Jeremy McSpadden
65ecf669cc Merge pull request #3933 from jeremymcs/fix/broken-resource-loader-import
fix(gsd): resolve resource-loader import for deployed extensions
2026-04-10 10:39:30 -05:00
Jeremy
9d477b4a2e fix(ci): update FILE-SYSTEM-MAP.md path after docs reorganization
The docs reorg moved FILE-SYSTEM-MAP.md from docs/ to docs/dev/ but
pr-risk-check.mjs was not updated, causing the PR Risk Report CI job
to fail on every PR.
2026-04-10 10:26:33 -05:00
Jeremy
6d9f02054d fix(test): update discord invite test path after docs reorganization
The docs were moved from docs/what-is-pi/ to docs/dev/what-is-pi/ but
the test path was not updated, causing CI to fail with ENOENT.
2026-04-10 10:19:07 -05:00
Jeremy
41d4de1c32 test(gsd): add regression test for resource-loader import path
Verifies auto.ts does not use a relative import reaching above
extensions/ for resource-loader (breaks on deployment to ~/.gsd/).
Guards against regression of the fix for #3899.
2026-04-10 10:13:01 -05:00
Jeremy
02b905f3f5 fix(gsd): resolve resource-loader import for deployed extensions
The relative import `../../../resource-loader.js` in auto.ts works from
the source tree (src/resources/extensions/gsd/ → src/resource-loader.js)
but breaks when extensions are deployed to ~/.gsd/agent/extensions/gsd/
(resolves to ~/.gsd/resource-loader.js which doesn't exist).

Use createRequire to resolve the gsd-pi package root and import
dist/resource-loader.js from there, which works in both source and
deployed contexts.

Regression introduced in #3899 (9ed543f1c8).
2026-04-10 10:05:37 -05:00
Jeremy McSpadden
b87e5dc43c Merge pull request #3929 from jeremymcs/docs/update-readme-links
docs: update README links for docs reorganization
2026-04-10 09:47:00 -05:00
Jeremy
6b213f3901 docs: fix README accuracy — agents count, extension count, prefs, remove AGENTS.md ref 2026-04-10 09:37:56 -05:00
Jeremy
95b4b87503 docs: update README links for user-docs/dev paths, remove gsd.build reference 2026-04-10 09:33:14 -05:00
Jeremy McSpadden
804f1d4b94 Merge pull request #3928 from jeremymcs/docs/reorganize-folder-structure
docs: reorganize into user-docs/ and dev/ subdirectories
2026-04-10 09:26:39 -05:00
Jeremy McSpadden
754cc61dc1 Merge pull request #3927 from jeremymcs/main
docs: update README What's New for v2.68
2026-04-10 09:25:51 -05:00
Jeremy
872b0adb48 docs: reorganize into user-docs/ and dev/ subdirectories
Split flat docs/ into user-docs/ (guides, config, troubleshooting) and
dev/ (ADRs, architecture, extension guides, proposals). Updated
docs/README.md index to reflect new paths.
2026-04-10 09:25:31 -05:00
Jeremy
5ac6c2d61b docs: update README What's New section for v2.68 2026-04-10 09:03:22 -05:00
github-actions[bot]
80a2b99d83 release: v2.68.0 2026-04-10 13:53:47 +00:00
Jeremy McSpadden
2ce0ca2d73 Merge pull request #3923 from jeremymcs/fix/prevent-false-degraded-mode-warning-v2
fix(state): prevent false degraded-mode warning when DB not yet initialized
2026-04-10 08:34:04 -05:00
Jeremy
be2032794b test: add regression test for wasDbOpenAttempted flag
Verifies the flag returns true after openDatabase() is called and
persists after closeDatabase(), ensuring the "not yet initialized"
vs "genuinely unavailable" distinction works correctly.
2026-04-10 08:19:58 -05:00
Jeremy
96490d269d fix(state): prevent false degraded-mode warning when DB not yet initialized
deriveState() is called during before_agent_start context injection,
before any tool invocation has had a chance to open the DB. Previously,
isDbAvailable() returning false in this path triggered a misleading
"DB unavailable — using filesystem state derivation (degraded mode)"
warning, even though the DB was simply not yet initialized (not failed).

Add a _dbOpenAttempted flag in gsd-db.ts that tracks whether
openDatabase() has been called at least once. The degraded-mode warning
now only fires when the DB was actually attempted and failed to open,
not when it hasn't been initialized yet.

Supersedes #3922.
2026-04-10 08:16:29 -05:00
Jeremy McSpadden
da352847e2 Merge pull request #2281 from jeremymcs/worktree-local-commands-stay-local
feat: contextual tips
2026-04-10 07:38:18 -05:00
Jeremy McSpadden
e7e27a8ad3 Merge pull request #1687 from dpearson2699/fix/stale-interrupted-session-resume
fix stale interrupted-session resume prompts
2026-04-10 07:36:47 -05:00
Jeremy McSpadden
56f137860e Merge pull request #3896 from mastertyko/fix/3859-forensics-context-hijack
fix(gsd): stop stale forensics context hijacks
2026-04-10 07:35:59 -05:00
Jeremy McSpadden
ee417db63b Merge pull request #3871 from mastertyko/fix/3868-copyplanningartifacts-samepath
fix(gsd): skip same-path planning artifact copies
2026-04-10 07:34:46 -05:00
Jeremy McSpadden
f6a7c3138f Merge pull request #3898 from mastertyko/fix/3897-verification-not-applicable-emdash
fix(gsd): accept em-dash none verification rationale
2026-04-10 07:34:21 -05:00
Jeremy McSpadden
a250ba92c8 Merge pull request #3899 from mastertyko/fix/3761-resync-resources-on-auto-resume
fix(gsd): resync managed resources on auto resume
2026-04-10 07:34:04 -05:00
Jeremy McSpadden
57c993f806 Merge pull request #3919 from jeremymcs/fix/merge-cwd-guard-parallel
fix: guard autoCommitDirtyState and restore cwd on MergeConflictError
2026-04-10 07:03:03 -05:00
Jeremy McSpadden
2ee5cc6c98 Merge pull request #3921 from jeremymcs/fix/3915-manifest-skipped-slices
fix(gsd): avoid false manifest and skipped-slice warnings
2026-04-10 07:02:29 -05:00
Jeremy
d8c6bd99fa fix(gsd): use debugLog in catch block to satisfy empty-catch lint
The compiled JS strips comments, so the catch body needs real code.
2026-04-10 06:51:35 -05:00
Jeremy
3f1699bdf7 fix(gsd): avoid false manifest and skipped-slice warnings 2026-04-10 06:48:47 -05:00
Jeremy McSpadden
c6ada95441 Merge pull request #3908 from jeremymcs/fix/claude-code-mcp-tool-output
fix: Claude Code MCP tool output rendering and real-time streaming
2026-04-10 06:46:49 -05:00
Jeremy
475bf6cd84 fix(gsd): replace empty catch block with descriptive comment
CI lint rule forbids empty catch blocks in migrated files.
2026-04-10 06:44:18 -05:00
Jeremy
7240b284dd test(gsd): use beforeEach/afterEach per CONTRIBUTING.md test standards
Replace try/finally cleanup with describe + beforeEach/afterEach pattern
and array-join for fixture data per project test conventions.
2026-04-10 06:39:55 -05:00
Jeremy
f6f15ddec6 fix: guard autoCommitDirtyState and restore cwd on MergeConflictError (#2929)
Three fixes to prevent cross-milestone contamination during parallel merge:

1. autoCommitDirtyState branch guard: only auto-commit when cwd is on the
   milestone branch, not the integration branch. Prevents committing dirty
   files from other milestones onto main.

2. process.chdir(previousCwd) before MergeConflictError throw: restores cwd
   so the next merge in a parallel sequence doesn't inherit a leaked cwd.

3. Pre-teardown auto-commit branch guard: skip the safety-net commit when
   cwd is on the integration branch, not the milestone branch.

Supersedes #3130.
2026-04-10 06:38:06 -05:00
Jeremy
ac1a51ef55 fix: Claude Code MCP tool output rendering and real-time streaming
- Stream tool results in real-time during Claude Code SDK sessions
  instead of deferring until session end. Tool calls (read, bash, write,
  etc.) now show their output as they complete, not collapsed as "..."

- Stop suppressing toolcall_start/delta/end events from stream adapter
  so the TUI can render tool call progress during streaming

- On SDK turn boundary (user message with tool results), push synthetic
  toolcall_end events with externalResult attached for immediate rendering

- Chat controller checks for externalResult on toolcall_end message
  updates and calls updateResult on pending ToolExecutionComponents

- Fix case-sensitive tool name matching (Read vs read, Bash vs bash)
  in TUI ToolExecutionComponent rendering

- Auto-discover and pass GSD_WORKFLOW_EXECUTORS_MODULE and
  GSD_WORKFLOW_WRITE_GATE_MODULE env vars in MCP server launch config

- Add /gsd mcp init command and auto-bootstrap .mcp.json for Claude
  Code provider during auto-start

- Add tool_execution_update event type for web UI streaming updates

- Add setStderrLoggingEnabled toggle for workflow logger
2026-04-10 06:12:44 -05:00
Jeremy McSpadden
0c37a88024 Merge pull request #3905 from jeremymcs/fix/workflow-mcp-auto-discovery
Fix workflow MCP auto-discovery for Claude Code auto-mode
2026-04-09 19:01:52 -05:00
Jeremy
26afe8b2a0 Prefer project MCP CLI over bundled fallback 2026-04-09 18:41:46 -05:00
Jeremy
bb2fdf0145 Build and link bundled RPC client 2026-04-09 18:29:38 -05:00
Jeremy
c6ff8b026d Fix MCP server packaging in clean builds 2026-04-09 18:00:24 -05:00
Jeremy McSpadden
35568d0543 Merge pull request #3904 from jeremymcs/fix/init-bootstrap-completeness
fix(gsd): create gsd.db, runtime/, and STATE.md during init
2026-04-09 17:53:44 -05:00
Jeremy
b573af4828 Fix workflow MCP bundled CLI lookup in tests 2026-04-09 17:50:01 -05:00
Jeremy
c19830b702 Fix workflow MCP auto-discovery for Claude Code 2026-04-09 17:45:28 -05:00
Jeremy
ae9afc0b9b fix(gsd): surface warnings when DB or STATE.md init fails
ensureDbOpen() returns false on failure instead of throwing, so the
try/catch alone was not catching the real failure path. Now check the
return value and notify the user with a visible warning when DB or
STATE.md generation fails, instead of silently claiming full success.
2026-04-09 17:32:55 -05:00
Jeremy
77e7342756 fix(gsd): create gsd.db, runtime/, and STATE.md during init (#3880)
The init wizard created .gsd/milestones/ and PREFERENCES.md but never
called ensureDbOpen(), leaving GSD in degraded markdown-only mode on
every fresh install. 20+ DB-gated features were disabled until a tool
handler happened to trigger DB creation as a side effect.

- Call ensureDbOpen(basePath) after bootstrapGsdDirectory() so the
  SQLite database exists immediately
- Create .gsd/runtime/ directory to match the headless bootstrap path
- Generate initial STATE.md via deriveState + buildStateMarkdown so
  the explicit /gsd init path produces it (showSmartEntry would have
  generated it, but ops.ts returns before entering that flow)

All three additions are wrapped in non-fatal try/catch — failures
log warnings but never block project init.

Closes #3880
2026-04-09 17:22:56 -05:00
Jeremy McSpadden
9fde7c4d95 Merge pull request #3901 from jeremymcs/codex/fix-gsd-tui-stderr-corruption
[codex] fix(gsd): suppress workflow stderr during /gsd
2026-04-09 16:22:18 -05:00
Jeremy
c666ff55eb group gsd model picker by provider 2026-04-09 16:09:20 -05:00
Jeremy
c1d1d3e5db group gsd model picker by provider 2026-04-09 16:02:45 -05:00
Jeremy
f5c6c1d94c fix(gsd): suppress workflow stderr during /gsd 2026-04-09 15:49:27 -05:00
Jeremy McSpadden
6c708f7795 Merge pull request #3890 from jeremymcs/feat/workflow-mcp-provider-parity
feat: expose GSD workflow tools over MCP for provider parity
2026-04-09 15:09:55 -05:00
Jeremy
20cbc1ed37 fix(gsd): enforce workflow write gates over MCP 2026-04-09 14:42:38 -05:00
Derek Pearson
228dccf3f4 fix: restore autoStartTime on resume + replace empty catch blocks (#3585)
- auto.ts: restore s.autoStartTime from meta.autoStartTime in both
  custom workflow and milestone resume paths, with Date.now() fallback
  and zero-guard
- auto.ts: replace 3 empty catch blocks with logWarning calls
- guided-flow.ts: replace empty catch with logWarning call
- interrupted-session.ts: add autoStartTime to PausedSessionMetadata
2026-04-09 15:31:11 -04:00
Jeremy
c297559211 fix(mcp): harden workflow tool boundary 2026-04-09 14:29:15 -05:00