Commit graph

3175 commits

Author SHA1 Message Date
Jeremy McSpadden
6bf76274a3 Merge pull request #4009 from jeremymcs/fix/pinned-output-message-end-duplicate
fix(tui): clear pinned output on message_end to prevent duplicate display
2026-04-11 17:55:14 -05:00
Jeremy
b488961609 fix(tui): clear pinned output on message_end to prevent duplicate display
The pinned "Latest Output" zone was only cleared at agent_end, but during
flows with form elicitation (e.g. discuss-phase), there is a gap between
message_end and agent_end where the agent waits for user input. During this
gap, the same content was visible in both the chat history and the pinned
zone. Clear the pinned zone at message_end when the assistant message is
finalized in the chat container.
2026-04-11 17:41:50 -05:00
Jeremy McSpadden
65c42ba6dc Merge pull request #4008 from jeremymcs/fix/latest-output-duplicate
fix(tui): clear pinned latest output on turn completion
2026-04-11 17:09:54 -05:00
Jeremy
5531538e0d fix(tui): clear pinned latest output on turn completion 2026-04-11 16:58:48 -05:00
Jeremy McSpadden
de065094ea Merge pull request #4006 from jeremymcs/fix/workflow-events-toctou
fix: TOCTOU file locking race conditions in event log and custom workflow graph
2026-04-11 16:27:37 -05:00
Jeremy
01b4177041 test(gsd): add file-lock TOCTOU fallback coverage 2026-04-11 16:15:51 -05:00
Jeremy McSpadden
31e88c99d2 Merge pull request #4007 from jeremymcs/refactor/state-derive-god-function
refactor: extract deriveStateFromDb logic into composable helpers
2026-04-11 16:11:45 -05:00
Jeremy
647056aa7d test(state): add tests for extracted deriveStateFromDb helpers
Cover the composable helpers extracted from deriveStateFromDb:
reconcileDiskToDb, buildCompletenessSet, buildRegistryAndFindActive,
handleNoActiveMilestone, resolveSliceDependencies, reconcileSliceTasks,
detectBlockers, checkReplanTrigger, checkInterruptedWork, and queue
order sorting.
2026-04-11 16:00:28 -05:00
Jeremy McSpadden
9b1a44aa61 Merge pull request #4003 from Git-Scram/fix/tui-pinned-output
fix(tui): restore pinned output above editor during tool execution
2026-04-11 15:39:50 -05:00
Jeremy
c63220ab72 refactor: extract deriveStateFromDb logic into composable helpers
Extracts the monolithic deriveStateFromDb function into distinct,
composable helper functions (reconcileDiskToDb, resolveSliceDependencies,
detectBlockers, etc.) inside state.ts.

Resolves technical debt identified during the code quality audit by
drastically reducing cyclomatic complexity while preserving the exact
type signature and logical behavior.

Also removes duplicate disk->DB reconciliation that could overwrite
milestone statuses.
2026-04-11 15:19:48 -05:00
Git-Scram
1d1e47e78b fix(tui): restore pinned output above editor during tool execution
Restores the pinned assistant output zone that shows the latest narration
during tool execution. Adds markdown rendering, animated spinner, height
capping to prevent render flashing, and session rebuild support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 15:53:29 -04:00
Jeremy
68b638a588 fix: TOCTOU file locking race conditions in event log and custom workflow graph
Implements file-level advisory locking via proper-lockfile to ensure
atomic read-modify-write sequences in:
- compactMilestoneEvents (event-log.jsonl)
- custom-workflow-engine reconcile (GRAPH.yaml)

Fixes silent data loss when concurrent auto-mode or dashboard
sessions overlap in these operations.
2026-04-11 14:49:19 -05:00
Jeremy McSpadden
ad61c43907 Merge pull request #3997 from jeremymcs/fix/mcp-output-stream-order-secure-fallback
fix(interactive): keep MCP tool ordering and secure env fallback prompts
2026-04-11 13:42:16 -05:00
Jeremy
2d531720f7 fix(tui): mask secure extension input values in interactive mode 2026-04-11 13:28:17 -05:00
Jeremy
bf4bcfadde fix(claude-code): harden MCP elicitation schema handling 2026-04-11 13:26:24 -05:00
Jeremy
1495e711e1 fix(claude-code): accept secure_env_collect MCP elicitation forms 2026-04-11 13:18:27 -05:00
Jeremy
6b52f5df3f chore(pr): drop web-layer changes from MCP stream-order fix 2026-04-11 12:53:26 -05:00
Jeremy
74fee9ed48 fix(interactive): keep MCP tool output ordered and restore secure prompt fallback 2026-04-11 12:47:41 -05:00
Jeremy McSpadden
959f4c53d1 Merge pull request #3996 from jeremymcs/feat/mcp-secure-env-collect
feat(mcp-server): add secure_env_collect tool via MCP elicitation
2026-04-11 12:06:02 -05:00
Jeremy
ea506f66c8 feat(mcp-server): add secure_env_collect tool via MCP form elicitation
Exposes secure_env_collect as an MCP tool so any MCP client (Claude Code,
Cursor, etc.) can collect secrets through form-based input. Values are
written directly to .env/Vercel/Convex and never appear in LLM context —
only key names and applied/skipped status are returned.

- New env-writer.ts with writeEnvKey, detectDestination, checkExistingEnvKeys, applySecrets
- Uses server.server.elicitInput() to present form fields to the MCP client
- Pre-checks existing keys to skip already-set env vars
- Auto-detects destination from project files (vercel.json, convex/ dir)
- 27 tests covering utilities and tool integration

Closes #3975
2026-04-11 11:51:43 -05:00
Jeremy McSpadden
5d48038816 Merge pull request #3992 from jeremymcs/fix/mcp-output-stream-order
fix(interactive): preserve MCP tool output stream ordering
2026-04-11 11:46:23 -05:00
Jeremy
ba6c1f5d7e test(interactive): cover MCP tool output ordering in chat controller 2026-04-11 11:32:28 -05:00
Jeremy
58d729894e fix(interactive): preserve MCP tool output stream ordering 2026-04-11 11:26:08 -05:00
Jeremy McSpadden
23f1e72868 Merge pull request #3975 from jeremymcs/fix/windows-portability-sweep
fix(gsd): harden Claude Code workflow MCP bootstrap and guidance
2026-04-11 10:49:23 -05:00
Jeremy
9e5203fdf8 fix(gsd): resolve workflow MCP test typing regressions 2026-04-11 10:34:51 -05:00
Jeremy
24b0460ba8 Merge branch 'worktree-gitbook-user-docs' into fix/windows-portability-sweep 2026-04-11 10:34:11 -05:00
Jeremy
edf9d0be6f docs: add GitBook-ready user-facing documentation
33 markdown files organized for GitBook import with SUMMARY.md navigation.
Covers installation, core concepts, auto mode, configuration, all providers,
cost management, skills, parallel orchestration, remote questions, teams,
headless CI, and full command reference. User-facing only — no internal/dev content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-11 10:34:07 -05:00
Jeremy McSpadden
902c020590 Merge pull request #3979 from jeremymcs/fix/mcp-tool-iserror-flag
fix(mcp): return isError flag on workflow tool execution failures
2026-04-11 10:31:58 -05:00
Jeremy
818bf97c36 test(gsd): add regression for plan_slice isError failures 2026-04-11 10:18:20 -05:00
Jeremy McSpadden
64359306c0 Merge pull request #3977 from jeremymcs/fix/discuss-multi-round-questions
fix(discuss): add multi-round questioning to new-project discuss phase
2026-04-11 10:16:11 -05:00
Jeremy
d572e372a1 fix(mcp): return isError flag on workflow tool execution failures
This fixes an issue where MCP workflow tools (e.g. gsd_plan_slice) would return error details in their JSON response, but without setting the 'isError: true' flag at the top level of the tool response payload. This caused MCP clients (like Claude Code) to interpret failed validations (like empty tasks arrays) as successes and get stuck in infinite validation failure loops.
2026-04-11 09:51:03 -05:00
Jeremy
d853992cb7 fix(discuss): add structuredQuestionsAvailable conditional to all gates
The depth verification gate and multi-milestone readiness gate
unconditionally referenced ask_user_questions. On transports where
structuredQuestionsAvailable is false, this would trap the flow in
re-ask loops.

Add {{structuredQuestionsAvailable}} conditionals to:
- Depth verification (true: ask_user_questions, false: plain text)
- Multi-milestone Phase 3 readiness gate
- Per-milestone technical assumption verification
2026-04-11 09:44:08 -05:00
Jeremy
6f27e514ca fix(discuss): add multi-round questioning to new-project discuss phase
The discuss.md prompt (used for /gsd new project creation) only asked
"What's the vision?" once and relied on LLM judgment for follow-ups.
This led to the agent asking a single question then jumping straight
to planning without gathering enough context.

Add explicit Question Rounds section with:
- 1-3 questions per round structure
- Conditional ask_user_questions vs plain text support
- Incremental persistence (CONTEXT-DRAFT save every 2 rounds)
- Depth-matching rule (1-2 rounds for simple, 4+ for large visions)
- Round cadence that drives toward the depth enforcement checklist

Thread structuredQuestionsAvailable through buildDiscussPrompt() and
prepareAndBuildDiscussPrompt() so the template variable resolves
correctly at runtime.

Closes #3976
2026-04-11 09:32:20 -05:00
Jeremy
4301a72522 fix(gsd): harden claude-code workflow MCP bootstrap
Ensure startup/session/init paths auto-prepare workflow MCP for Claude Code.

Disable native AskUserQuestion in Claude Code SDK options to avoid broken host prompts.

Add explicit /gsd mcp init . guidance when workflow MCP is missing.

Refs #3964
2026-04-11 08:35:19 -05:00
Jeremy McSpadden
40bcf84ee8 Merge pull request #3974 from jeremymcs/docs/claude-code-mcp-setup
docs: rewrite getting-started guide with per-OS step-by-step instructions
2026-04-11 08:25:46 -05:00
Jeremy
cefb70ba75 docs(user-docs): rewrite getting-started guide with per-OS step-by-step instructions
Add comprehensive installation walkthroughs for macOS, Windows, Linux (Ubuntu/Debian,
Fedora/RHEL, Arch, nvm), and Docker. Each OS section follows a consistent numbered
step-by-step flow covering dependency install, verification, GSD install, provider
setup, first launch, and verification. Includes download links, platform-specific
tips, and a quick troubleshooting table.
2026-04-11 08:19:08 -05:00
Jeremy McSpadden
dda2534ef2 Merge pull request #3972 from jeremymcs/docs/claude-code-mcp-setup
docs: add Claude Code MCP server setup to providers guide
2026-04-11 07:38:40 -05:00
Jeremy
452ad4fafe docs: add Claude Code MCP server setup instructions to providers guide
Add Option C covering how Claude Pro/Max subscribers can use GSD's
workflow tools directly inside Claude Code via the MCP server — including
automatic setup, manual config, and verification steps.
2026-04-11 07:37:23 -05:00
Jeremy McSpadden
679587bee2 Merge pull request #3970 from jeremymcs/fix/ask-user-question-stream-order
fix(web): preserve only final ask_user_questions text
2026-04-11 07:36:30 -05:00
Jeremy
bd91186e2f fix(web): drop provisional pre-tool question text 2026-04-11 07:20:18 -05:00
github-actions[bot]
26696be2fa release: v2.70.1 2026-04-11 04:22:31 +00:00
Jeremy McSpadden
1e6919d92b Merge pull request #3963 from jeremymcs/fix/3962-model-routing-transparency
fix(routing): skip dynamic routing for interactive dispatches (#3962)
2026-04-10 22:54:10 -05:00
Jeremy
66710f2b28 fix(routing): address codex review — complete interactive bypass and accurate banner
resolvePreferredModelConfig now skips routing-ceiling synthesis when
isAutoMode=false, preventing interactive dispatches from silently switching
to the tier_models.heavy model. The auto-start banner now reflects
effective routing state by checking flat-rate provider suppression and
using the actual ceiling from tier_models.heavy when configured.
2026-04-10 22:18:42 -05:00
Jeremy McSpadden
19cbb17683 Merge pull request #3961 from jeremymcs/fix/windows-portability-sweep
fix: harden Windows portability across runtime and tooling
2026-04-10 21:53:10 -05:00
Jeremy
839cd8d55b fix(routing): skip dynamic routing for interactive dispatches, always show model changes (#3962)
Dynamic routing silently downgraded models in interactive commands (guided-flow),
overriding the user's /model selection. Now routing only applies in auto-mode where
cost optimization is expected. Model downgrade notifications always fire regardless
of verbose setting, and auto-mode shows routing status upfront on start.
2026-04-10 21:51:18 -05:00
Jeremy
ef91a17bb2 fix(ci): trim windows portability integration load 2026-04-10 21:11:26 -05:00
Jeremy
96e760240c fix(ci): narrow windows portability coverage 2026-04-10 20:57:44 -05:00
Jeremy
897e4b6bc1 fix(ci): skip validate-pack in windows portability job 2026-04-10 20:49:03 -05:00
Jeremy
153ed252fe fix(ci): unblock windows portability follow-up 2026-04-10 20:45:51 -05:00
Jeremy
61204ce771 fix(windows): harden portability across runtime and tooling 2026-04-10 20:33:18 -05:00