Commit graph

4627 commits

Author SHA1 Message Date
TÂCHES
ed47018496 refactor(git): branchless worktree architecture (#506)
Eliminate slice branches — all work commits sequentially on milestone/<MID>
within auto-mode worktrees. No branch creation, switching, or merging
within a worktree. Planning artifacts (.gsd/milestones/) tracked in git
properly instead of being blanket-gitignored then force-added.

Removes ~2,600 lines: ensureSliceBranch, switchToMain, mergeSliceToMain,
mergeSliceToMilestone, shouldUseWorktreeIsolation, getMergeToMainMode,
withMergeHeal, recoverCheckout, fix-merge dispatch/labels, and associated
tests. Adds legacy_slice_branches doctor check, deprecation warnings for
git.isolation and git.merge_to_main preferences.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 13:21:58 -06:00
Flux Labs
6188c040fa fix: normalize path separators in debug-logger test for Windows CI 2026-03-15 13:06:38 -05:00
Flux Labs
314c134962 Merge branch 'main' into fix/gsd-extension-ctx-log 2026-03-15 12:51:42 -05:00
Flux Labs
afd4a514e0 feat: add gsd --debug mode with structured JSONL diagnostic logging (#468)
Add `gsd auto --debug` and `gsd next --debug` flags (also GSD_DEBUG=1
env var) that write structured JSONL debug logs to `.gsd/debug/`.

Instrumentation points:
- deriveState() timing and result phase
- parseRoadmap/parsePlan timing with native flag
- TTSR checkDelta timing, buffer size, and peak tracking
- Unit dispatch cycle/lifetime counts
- Context injection sizing
- Debug summary with aggregated stats on stop

The logger is zero-overhead when disabled — all functions check a
boolean and return immediately. Auto-prunes to 5 most recent logs.
2026-03-15 12:51:24 -05:00
Flux Labs
5cc99ac77e Merge branch 'main' into worktree-investigate-468 2026-03-15 12:50:33 -05:00
Flux Labs
fa4dae7e08 fix: prevent CPU spinning from regex backtracking and TTSR throttling (#468)
Replace [\s\S]*? regex patterns with indexOf-based string parsing in
boundary map, preferences, and skill-discovery frontmatter parsers to
eliminate catastrophic backtracking on content containing code fences.

Add 50ms throttle to TTSR JS-fallback regex path to prevent CPU spinning
when token deltas arrive faster than regex evaluation on growing buffers.

Closes #468
2026-03-15 12:41:28 -05:00
TÂCHES
14875effae Merge branch 'main' into feat-google-oauth-search 2026-03-15 11:27:44 -06:00
TÂCHES
b503c55722 Merge branch 'main' into fix/openrouter-preferences 2026-03-15 11:27:26 -06:00
TÂCHES
2d4a14b7ca Merge pull request #491 from fluxlabs/fix/hook-orchestration
fix: hook orchestration — finalize records, add supervision, fix retry
2026-03-15 11:27:12 -06:00
Flux Labs
266e58effb merge: resolve conflict with main in parseScalar
Merge main's unknown return type and []/{}  literal support with
our inline comment stripping and quote handling changes.
2026-03-15 12:19:07 -05:00
Flux Labs
71f33de869 Merge branch 'main' into fix/hook-orchestration 2026-03-15 12:16:41 -05:00
Flux Labs
94336dd445 fix: hook orchestration — finalize runtime records, add supervision, fix retry
Hooks were dispatched (runtime record created with phase="dispatched") but
never properly tracked through completion. Four issues fixed:

1. Hook runtime records now finalized: handleAgentEnd writes phase="finalized"
   and clears the record when a hook completes. Previously records stayed at
   "dispatched" forever because verifyExpectedArtifact returned false for
   hook types.

2. Supervision timer for hooks: hook dispatch now sets a hard timeout so
   stuck hooks don't hang auto-mode indefinitely.

3. Hook retry removes completion key: when a hook requests retry via
   retry_on, the trigger unit's completion key is removed from the
   idempotency set so dispatchNextUnit will re-dispatch it.

4. Hook closeout in dispatchNextUnit: hook units are properly closed out
   (pushed to completedUnits, runtime cleared) without polluting the
   idempotency set. verifyExpectedArtifact returns true for hook/ types.

Fixes #140 (comment 4063396798)
2026-03-15 12:14:30 -05:00
Flux Labs
ba5e2ceded fix: harden YAML preferences parser for OpenRouter model IDs (#488)
Fix parsing issues that prevented OpenRouter model preferences from
being correctly picked up during auto-mode dispatching:

- Array items with colons (e.g. qwen/qwen3-coder:free) were incorrectly
  parsed as objects instead of strings. Now only items matching a valid
  key-value pattern (key:value where key is [A-Za-z0-9_]+) are treated
  as structured objects.

- Inline YAML comments (# after whitespace) were included in parsed
  values, causing model ID lookups to fail silently.

- Frontmatter regex now handles Windows CRLF line endings.

- GSDPreferences.models type updated from GSDModelConfig (legacy
  string-only) to GSDModelConfig | GSDModelConfigV2 to match actual
  runtime usage with extended object format.

- Explicit comment-line skipping in the parser loop for clarity.

- Added comprehensive test suite covering OpenRouter-style org/model IDs,
  colon variants, inline comments, CRLF, and mixed format configs.
2026-03-15 12:07:12 -05:00
Flux Labs
4a76d7b174 Merge branch 'main' into fix/tui-resource-leaks-and-quality 2026-03-15 11:39:52 -05:00
Lex Christopherson
e147b2dfdf fix(state): empty slice plan stays in planning, not summarizing (#454)
A plan file with zero tasks caused `find(t => !t.done)` to return
undefined, which was treated as "all tasks done" → summarizing phase.
Now requires `tasks.length > 0` before entering summarizing.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 10:05:03 -06:00
TÂCHES
65acf67762 Merge pull request #461 from deseltrus/feat/multi-milestone-enforcement
feat(discuss): three-layer enforcement for multi-milestone discussions
2026-03-15 10:02:00 -06:00
TÂCHES
996dc3d7dc Merge branch 'main' into fix/gsd-extension-ctx-log 2026-03-15 09:59:08 -06:00
TÂCHES
58506cf833 Merge pull request #459 from deseltrus/fix/session-config
feat: session-internal /gsd config + fix key hydration in gsd config
2026-03-15 09:53:49 -06:00
TÂCHES
c0ab967f35 Merge pull request #457 from deseltrus/fix/skill-diagnostics-ux
fix(ux): improve preferences wizard and skill diagnostics
2026-03-15 09:53:46 -06:00
TÂCHES
2b34d79f8d Merge pull request #443 from fluxlabs/fix/discuss-needs-discussion-deadlock-440
fix: /gsd discuss routes to draft discussion when phase is needs-discussion
2026-03-15 09:53:43 -06:00
TÂCHES
f347572758 Merge branch 'main' into feat/multi-milestone-enforcement 2026-03-15 09:49:51 -06:00
TÂCHES
9f57da3fdb Merge branch 'main' into fix/gsd-extension-ctx-log 2026-03-15 09:49:20 -06:00
Lex Christopherson
9f12e6a8c3 2.13.1 2026-03-15 09:30:52 -06:00
Lex Christopherson
eef3ee4a5f docs: update changelog for v2.13.1 2026-03-15 09:30:52 -06:00
Lex Christopherson
7f7f373e15 fix(tests): skip worktree path-matching tests on Windows
Git worktree path resolution on Windows CI uses UNC/8.3 temp dir forms
that don't survive normalization for path matching. The underlying source
logic works correctly (tested on macOS/Linux); these tests exercise git
worktree infrastructure that has inherent platform differences in path
representation.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 09:25:40 -06:00
TÂCHES
4b167509c8 Merge pull request #484 from gsd-build/fix/m003-windows-path-compat
fix(doctor): Windows path compatibility for worktree/branch detection
2026-03-15 09:16:09 -06:00
Lex Christopherson
954e333228 fix(doctor): Windows path compatibility for worktree/branch detection
Three fixes for Windows CI failures:

1. Remove single quotes from git branch --list glob patterns. On Windows,
   cmd.exe passes single quotes literally to git, preventing glob expansion.
   Affects shouldUseWorktreeIsolation() and stale branch detection.

2. Extend listWorktrees() branch-name fallback to cover milestone/* branches,
   not just worktree/* branches. On Windows, path normalization can prevent
   path-based worktree matching; the branch-name fallback is the safety net.

3. Use path.sep instead of hardcoded "/" in CWD prefix checks (doctor.ts
   orphan fix guard, worktree-manager.ts removeWorktree guard).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 09:15:30 -06:00
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
Flux Labs
f4f97f2e78 Merge branch 'main' into fix/tui-resource-leaks-and-quality 2026-03-15 10:02:56 -05: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
Flux Labs
ea2b626c98 test(pi-tui): add regression tests for loader, cancellable-loader, input
First test coverage for pi-tui components (8 tests):
- Loader: start() idempotency, dispose() cleanup, stop() safety
- CancellableLoader: abort on dispose, callback cleanup, signal state
- Input: paste buffer reset on focus loss, focused getter/setter
2026-03-15 09:56:50 -05:00
Flux Labs
b448bf9400 feat(ux): terminal width warning and dashboard dispose safety
- cli.ts: warn on stderr when terminal is narrower than 40 columns
- dashboard-overlay.ts: add disposed flag checked before scheduling
  refreshes and after async loadData() to prevent rendering on a
  stopped TUI
2026-03-15 09:56:45 -05:00
Flux Labs
4995afed90 refactor: replace hardcoded ANSI escapes with chalk, add debug logging
- cli.ts: use chalk.yellow/dim/bold instead of raw \x1b sequences for
  version mismatch message; chalk v5 auto-respects NO_COLOR
- update-check.ts: same chalk migration for the update banner
- guided-flow.ts: log auto-start errors when GSD_DEBUG is set instead
  of silently swallowing them
2026-03-15 09:56:41 -05:00
Flux Labs
ea2efe804f fix(pi-tui): patch 5 resource leak bugs in TUI components
- Loader: clear existing interval in start() to prevent orphaned timers
  on double-call; add dispose() to stop and null TUI ref
- CancellableLoader: abort the AbortController and clear onAbort in
  dispose() so external signal holders release the controller
- Editor: add public dispose() that clears the autocomplete debounce
  timer to prevent post-removal callbacks
- Input: convert focused to getter/setter that resets isInPaste and
  pasteBuffer on focus loss, preventing paste state corruption
- TUI.stop(): iterate overlayStack calling dispose() on each component
  before clearing, stopping overlay timers (e.g. dashboard refresh)
2026-03-15 09:56:36 -05: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