Commit graph

630 commits

Author SHA1 Message Date
Lex Christopherson
d27bf45740 fix(auto-worktree): use execFileSync for git commands with user content
Shell string interpolation of multi-line commit messages breaks on
Windows — the closing quote gets consumed mid-message, causing the
branch name suffix to be parsed as a second argument to git merge
(producing "fatal: No remote for the current branch").

Switch to execFileSync with argument arrays for merge, commit, and
add commands that include user-generated content.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 09:05:07 -06:00
TÂCHES
39540ecef1 Merge pull request #483 from gsd-build/fix/m003-windows-test-portability
fix(tests): Windows portability for M003 worktree tests
2026-03-15 09:04:44 -06:00
Lex Christopherson
23d310cd3b fix(tests): Windows portability for M003 worktree tests
- Replace single-quoted git commit messages with double quotes
- Replace bash redirect syntax with cross-platform alternatives
- Add git branch -M main to git-self-heal test setup for consistent branch naming

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 09:01:30 -06:00
Lex Christopherson
eaf909cd4b 2.13.0 2026-03-15 08:44:31 -06:00
Lex Christopherson
4504e2d6f4 docs: update changelog for v2.13.0 2026-03-15 08:44:10 -06:00
TÂCHES
2fdcc08eb0 Merge pull request #475 from gsd-build/feat/m003-worktree-isolation
feat(M003): Worktree isolation — auto-worktree lifecycle, merge strategies, self-healing git
2026-03-15 08:33:23 -06:00
Lex Christopherson
f2fc9df922 chore(M003): auto-commit after complete-milestone 2026-03-15 08:33:13 -06:00
Lex Christopherson
599c0b7648 test(M003/S07): Test suite for worktree-isolated flow
Tasks:
- chore(M003/S07): auto-commit after complete-slice
- chore(M003/S07/T01): auto-commit after execute-task
- chore(M003/S07): auto-commit after plan-slice
- docs(S07): add slice plan

Branch: gsd/M003/S07
2026-03-15 08:33:13 -06:00
Lex Christopherson
8100a1b5a0 docs(M003): reassess roadmap after S06 2026-03-15 08:33:13 -06:00
Lex Christopherson
f9b9f6bf32 chore(M003/S06): Doctor + cleanup + code simplification
Tasks:
- chore(M003/S06): auto-commit after complete-slice
- chore(M003/S06/T02): auto-commit after execute-task
- chore(M003/S06/T01): auto-commit after execute-task
- chore(M003/S06): auto-commit after plan-slice
- docs(S06): add slice plan

Branch: gsd/M003/S06
2026-03-15 08:33:13 -06:00
Lex Christopherson
34cd1056ea feat(M003/S05): Self-healing git repair
Tasks:
- chore(M003/S05): auto-commit after complete-slice
- docs: tighten GSD system prompt tool-routing — prescriptive rules + anti-patterns
- chore(M003/S05/T02): auto-commit after execute-task
- chore(M003/S05/T01): auto-commit after execute-task
- chore(M003/S05): auto-commit after plan-slice
- docs(S05): add slice plan

Branch: gsd/M003/S05
2026-03-15 08:33:13 -06:00
Lex Christopherson
4ec30cdc2d chore(M003/S04): auto-commit after reassess-roadmap 2026-03-15 08:33:13 -06:00
Lex Christopherson
01f5d2bf7f docs(M003): reassess roadmap after S04 2026-03-15 08:33:13 -06:00
Lex Christopherson
4d60b49f25 feat(M003/S04): worktree-aware merge + isolation preferences 2026-03-15 08:33:13 -06:00
Lex Christopherson
84b6f80399 docs(M003): reassess roadmap after S03 2026-03-15 08:33:13 -06:00
Lex Christopherson
b001005869 feat(M003/S03): Milestone-to-main squash merge + worktree teardown
Tasks:
- chore(M003/S03): auto-commit after complete-slice
- chore(M003/S03/T02): auto-commit after execute-task
- chore(M003/S03/T01): auto-commit after execute-task
- chore(M003/S03): auto-commit after plan-slice
- docs(S03): add slice plan

Branch: gsd/M003/S03
2026-03-15 08:33:13 -06:00
Lex Christopherson
dbc89e5b23 feat(M003/S02): --no-ff slice merges + conflict elimination
Tasks:
- chore(M003/S02): auto-commit after complete-slice
- chore(M003/S02/T02): auto-commit after execute-task
- chore(M003/S02/T01): auto-commit after execute-task
- chore(M003/S02): auto-commit after plan-slice
- docs(S02): add slice plan

Branch: gsd/M003/S02
2026-03-15 08:33:13 -06:00
Lex Christopherson
a9d97a8d4b docs(M003): reassess roadmap after S01 2026-03-15 08:33:13 -06:00
Lex Christopherson
d67c3ff5e8 feat(M003/S01): Auto-worktree lifecycle in auto-mode
Tasks:
- chore(M003/S01): auto-commit after complete-slice
- chore(M003/S01/T03): auto-commit after execute-task
- chore(M003/S01/T02): auto-commit after execute-task
- chore(M003/S01/T01): auto-commit after execute-task
- chore(M003/S01): auto-commit after plan-slice
- chore: untrack .gsd/ runtime files from git index
- docs(S01): add slice plan

Branch: gsd/M003/S01
2026-03-15 08:33:13 -06:00
Lex Christopherson
948e8983b5 chore(M003): record integration branch 2026-03-15 08:33:13 -06:00
Lex Christopherson
24597873a0 docs(M003): context, requirements, and roadmap 2026-03-15 08:33:13 -06:00
TÂCHES
ac33781fd0 Merge pull request #477 from gsd-build/fix/dispatch-loop-parse-cache-and-completion
fix(auto): kill dispatch loop paths A and B
2026-03-15 08:33:06 -06:00
Lex Christopherson
85960464eb fix(auto): clear parse cache in dispatch + verify completion in handleAgentEnd
Kills two independent failure paths causing the recurring dispatch loop bug:

Path B: dispatchNextUnit() called clearPathCache() but not clearParseCache(),
allowing stale parsed roadmap data (with [ ] instead of [x]) to persist
through the doctor→dispatch transition.

Path A: handleAgentEnd() never verified whether the just-completed unit
produced its expected artifact before re-entering the dispatch loop.
Now persists completion key after verification, so the idempotency
check in dispatchNextUnit() skips already-completed units.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 08:23:57 -06:00
TÂCHES
85b9c10265 Merge pull request #465 from deseltrus/fix/loop-recovery-all-unit-types
fix: verify artifacts on disk before bailing on dispatch loop limit
2026-03-15 08:06:01 -06:00
TÂCHES
8234e818eb Merge pull request #463 from ggomaeng/fix/loop-recovery-infinite-dispatch
fix: persist completion key in loop-recovery/self-repair to prevent infinite dispatch loops
2026-03-15 08:05:54 -06:00
deseltrus
271ab39576 fix: verify artifacts on disk before bailing on dispatch loop limit
The loop detection in dispatchNextUnit stops auto-mode when a unit has
been dispatched MAX_UNIT_DISPATCHES (3) times. Previously, only
execute-task had reconciliation logic to check whether the artifact
actually exists on disk before bailing. All other unit types
(complete-slice, plan-slice, research-slice, etc.) would immediately
stop — even if the Nth attempt successfully produced the artifact.

This is a race between the dispatch counter and disk verification:
the counter increments at dispatch time, but artifact verification
only runs during closeout of the NEXT unit. If the last allowed
attempt succeeds, the counter is already at the limit when the next
dispatch tries to run, and nobody checks disk state.

Reproduction scenario:
1. complete-slice dispatched 3 times (LLM missed writing UAT on
   attempts 1-2, succeeded on attempt 3)
2. Attempt 3 produces both SUMMARY and UAT — auto-committed to disk
3. Dispatch 4 fires: prevCount (3) >= MAX_UNIT_DISPATCHES (3)
4. No disk check for complete-slice → pipeline stops with
   'Expected artifact not found' despite artifacts existing

Fix: add a general verifyExpectedArtifact() check after the
execute-task-specific reconciliation and before the final bail-out.
If artifacts exist on disk, clear the counter and advance. If not,
same error as before — no behavior change for genuinely stuck units.
2026-03-15 10:52:50 +01:00
0xggoma
88e6957f64 fix: persist completion key in loop-recovery/self-repair to prevent infinite dispatch loops
When loop-recovery or self-repair reconciliation succeeds (artifacts exist on
disk), the dispatch counter is reset but the unit is never marked complete in
completed-units.json. If deriveState() continues returning the same unit, the
cycle repeats indefinitely: 3 dispatches → stuck detection → reconciliation
→ counter reset → 3 more dispatches...

This was observed in production burning $93.87 on 103 dispatches of a single
already-completed task over 4.9 hours.

Changes:
1. Persist completed key (persistCompletedKey + completedKeySet.add) in both
   the loop-recovery and self-repair success paths, so the idempotency check
   at the top of dispatchNextUnit prevents re-dispatch.
2. Add invalidateStateCache() after reconciliation writes to ensure the next
   deriveState() call sees fresh disk state.
3. Add a hard lifetime dispatch counter (unitLifetimeDispatches) that survives
   counter resets from reconciliation paths. Caps any single unit at 6 total
   dispatches across all reconciliation cycles.

Fixes #462
2026-03-15 01:39:19 -07:00
Flux Labs
3bfa444809 fix: debounce @ file autocomplete to prevent TUI freeze on large codebases (#448) (#452)
The synchronous fuzzyFind() native call blocks the event loop during
@ file autocomplete. On large codebases (e.g. Java projects with deep
directory trees), each call can take seconds. Since updateAutocomplete()
was called on every keystroke while autocomplete was active, rapid typing
would cascade into dozens of blocking searches — freezing the TUI for
minutes. This made it appear that arrow keys caused the freeze, when
the actual cause was accumulated backlog from processing buffered input.

Debounce all @ file reference autocomplete paths (character input,
backspace, forward delete, and re-trigger after cancellation) with a
150ms delay so only the final keystroke triggers the expensive search.
Slash command autocomplete remains synchronous since it's cheap.

Co-authored-by: TÂCHES <afromanguy@me.com>
2026-03-14 23:45:05 -06:00
Colin Johnson
fe03743b08 fix: guard against newer synced resources (#445)
Co-authored-by: TÂCHES <afromanguy@me.com>
2026-03-14 22:58:18 -06:00
Flux Labs
16364c7dba fix: prevent web_search tool injection for non-Anthropic providers serving Claude models (#444) (#446)
GitHub Copilot users with Claude models got 400 errors because the native
Anthropic web_search_20250305 tool was injected into requests to Copilot's
API proxy, which doesn't support it. The root cause was that model_select
never fires before the first API request on new sessions, so the fallback
heuristic (model name starts with "claude-") couldn't distinguish direct
Anthropic from proxied providers.

Fix: pass the resolved Model object through to the before_provider_request
event so extensions can check model.provider directly instead of relying on
model name heuristics.
2026-03-14 22:15:00 -06:00
Lex Christopherson
861a06cf34 2.12.0 2026-03-14 21:19:54 -06:00
Lex Christopherson
f719c48f09 docs: update changelog for v2.12.0 2026-03-14 21:19:38 -06:00
TÂCHES
11234b7456 fix(agent-core): await event queue in tool hooks for safe parallel execution (#439)
Moves extension tool_call/tool_result interception from wrapToolsWithExtensions
(which fires inside the agent loop, bypassing event settlement) to
beforeToolCall/afterToolCall hooks that await _agentEventQueue. This ensures
extensions always see settled state — including the appended assistant message —
even when tools execute in parallel.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 21:16:17 -06:00
Copilot
6d2ff3d4a5 Fix: em dash and slash in milestone/slice titles corrupt GSD state management (#426)
* Initial plan

* chore: establish baseline before implementing em-dash fix

Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>

* fix: validate milestone titles against delimiter characters (em dash, slash) that break state management

- Changed STATE.md separator from em dash to colon in buildStateMarkdown and state.md template
- Removed ambiguous '— Context' suffix from context.md H1 template
- Added validateTitle() function to detect problematic delimiter characters
- Added delimiter_in_title doctor issue code for milestone/slice title validation
- Added tests for validateTitle() and doctor delimiter detection
- Added em-dash-in-title cases to regex-hardening test

Fixes: milestone titles containing '—' caused state corruption when the LLM
misread the ambiguous STATE.md separator format and wrote incorrect planning files.

Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>
2026-03-14 21:03:55 -06:00
Flux Labs
ecf8125e39 feat: add Ollama Cloud as model and web tool provider (#430) (#434)
Add Ollama Cloud (ollama.com) as a built-in provider with both model
hosting and web search/fetch capabilities.

Model provider:
- 13 curated models via OpenAI-compatible API (Llama 3.1, Qwen 3,
  DeepSeek R1, Gemma 3, Mistral, Phi-4, GPT-OSS)
- Auth via OLLAMA_API_KEY environment variable
- Registered in onboarding, env hydration, and model resolver

Web tool provider:
- Search via POST ollama.com/api/web_search
- Page fetch via POST ollama.com/api/web_fetch (fallback after Jina)
- Added as third search provider option alongside Tavily and Brave
- /search-provider command updated with ollama option

Closes #430
2026-03-14 21:03:31 -06:00
Copilot
3fed189e00 feat(pi-agent-core): parallel tool calling with before/after hooks (#427)
* Initial plan

* feat(pi-agent-core): add parallel tool calling support with beforeToolCall/afterToolCall hooks

Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: glittercowboy <186001655+glittercowboy@users.noreply.github.com>
2026-03-14 21:02:43 -06:00
gkd67pjznr-ctrl
3c931b2e19 fix(guided-flow): add self-heal for stale runtime records on wizard start (#436)
auto.ts has selfHealRuntimeRecords() which cleans up stale .gsd/runtime/units/
records when /gsd auto starts. However, guided-flow.ts (used by /gsd manual
mode) had zero awareness of runtime records — it only checked auto.lock.

This means if auto-mode crashes mid-unit, the stale runtime records persist
until the next /gsd auto run. Users who alternate between manual and auto
mode, or who only use manual mode after a crash, would accumulate stale
records that could cause spurious re-dispatch or confusing state.

Add selfHealRuntimeRecords() to guided-flow.ts that:
- Clears records where the expected artifact already exists (completed but
  closeout didn't finish)
- Clears records stuck in dispatched or timeout phase (process died mid-unit)
- Notifies the user how many stale records were cleaned

Called in showSmartEntry() before the crash lock check so the wizard always
starts from a clean state regardless of how the previous session ended.

Co-authored-by: Thomas <twilliams1234@gmail.com>
2026-03-14 20:54:16 -06:00
Flux Labs
0e3284215a fix: bg_shell ready_port timeout and error handling (#428) (#435)
When a server fails to bind to the configured ready_port, the process
would stay in "starting" status indefinitely after the probing interval
cleared, with no error surfaced to the agent. This fixes the hang by:

- Transitioning process to "error" status when port probing times out
- Detecting process exit during port polling and reporting stderr context
- Adding ready_timeout parameter for custom timeout values
- Including stderr output in waitForReady timeout/error responses
- Registering SIGTERM/SIGINT handlers to clean up bg processes on exit

Closes #428
2026-03-14 20:51:02 -06:00
Flux Labs
96ced0357b fix: clear cachedReaddir before dispatch and artifact verification (#431) (#432)
The directory listing cache in paths.ts has no TTL and was never cleared
in production, causing dispatchNextUnit to re-dispatch the same unit
when files written by the previous unit weren't visible to deriveState.

Add clearPathCache() calls at the top of dispatchNextUnit (before
deriveState) and verifyExpectedArtifact so each dispatch cycle and
artifact check sees fresh disk state.

Closes #431
2026-03-14 20:48:43 -06:00
TÂCHES
cad9971f9f Merge pull request #429 from gsd-build/release/v2.11.1 2026-03-14 18:57:47 -06:00
TÂCHES
c2a063bddd release: v2.11.1 — urgent fix for auto-mode loop on research-slice/plan-slice 2026-03-14 18:52:05 -06:00
TÂCHES
8c45a0dda3 Merge pull request #424 from gsd-build/perf/inline-static-templates
perf: inline static templates into prompt builders to eliminate ~44 READ tool calls per milestone
2026-03-14 18:18:14 -06:00
TÂCHES
9f56049509 Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-14 17:55:23 -06:00
TÂCHES
36a810be8a Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-03-14 17:55:05 -06:00
Lex Christopherson
3551d2291b perf: inline static templates into prompt builders to eliminate ~44 READ tool calls per milestone
Add loadTemplate() and inlineTemplate() to prompt-loader.ts, then use
them in all 7 auto.ts builder functions and ~9 guided-flow.ts callsites
to inject template content at prompt-build time. Update 16 prompt .md
files to reference inlined templates instead of instructing agents to
read them from disk.

Over a typical 3-slice/15-task milestone run, this eliminates ~44
unnecessary READ tool calls (~45-90s latency, ~5-9k wasted tokens).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 17:34:42 -06:00
TÂCHES
73c0fd8043 Merge pull request #416 from fluxlabs/feat/post-unit-hooks-140
feat: extensible hook system for auto-mode state machine
2026-03-14 17:14:31 -06:00
TÂCHES
af4cd1ec35 Merge pull request #421 from gsd-build/fix/auto-clear-caches
fix(auto): clear parse and path caches alongside state cache
2026-03-14 17:06:50 -06:00
Lex Christopherson
9c82a1b79f fix(auto): clear parse and path caches alongside state cache
Ensures auto-mode reads fresh file data after unit completion,
slice merges, and self-healing — prevents stale cached parses
from the memoized deriveState pipeline.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 17:02:32 -06:00
TÂCHES
1b5b413eb1 Merge pull request #420 from gsd-build/fix/smoke-test-banner
fix(ci): smoke test handles banner output
2026-03-14 17:01:11 -06:00
Lex Christopherson
bce3c1457e fix(ci): strip ANSI codes and match version line in smoke test
The --version flag outputs a banner with ANSI escape codes. The smoke
test compared the entire multi-line output against the bare version
string, causing false failures on every release.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-14 16:56:57 -06:00