Commit graph

2692 commits

Author SHA1 Message Date
Jeremy McSpadden
301e7833ea Merge pull request #3690 from Tibsfox/fix/gitignore-bg-shell
fix(gsd): add .bg-shell/ to baseline gitignore patterns
2026-04-07 07:02:15 -05:00
Jeremy McSpadden
1146352202 Merge pull request #3692 from Tibsfox/fix/complete-task-normalize-list-inputs
fix(gsd): normalize list inputs in complete-task + fix roadmap dep parsing
2026-04-07 07:02:02 -05:00
Jeremy McSpadden
a23fb1e873 Merge pull request #3693 from Tibsfox/fix/frontmatter-parse-noise
fix(gsd): suppress repeated frontmatter YAML parse warnings
2026-04-07 06:57:43 -05:00
Jeremy McSpadden
0339317d10 Merge pull request #3696 from Tibsfox/fix/prompt-step-ordering-and-tools
fix(gsd): prompt ordering, correct tools, crash guard, compaction fix
2026-04-07 06:57:28 -05:00
Jeremy McSpadden
a7cb1389b8 Merge pull request #3697 from Tibsfox/fix/set-slice-sequence-on-insert
fix(gsd): set slice sequence at all three insertion sites
2026-04-07 06:56:53 -05:00
Jeremy McSpadden
627510695c Merge pull request #3698 from Tibsfox/fix/allow-skipped-validation-completion
fix(gsd): allow milestone completion when validation skipped by preference
2026-04-07 06:56:41 -05:00
Jeremy McSpadden
bf1d7cfd4d Merge pull request #3699 from Tibsfox/fix/import-done-milestones-as-complete
fix(gsd): import all-done milestones as complete during DB migration
2026-04-07 06:56:27 -05:00
Jeremy McSpadden
0ccb3b627b Merge pull request #3709 from Tibsfox/fix/discuss-incremental-persistence
fix(gsd): add incremental persistence to discuss prompts
2026-04-07 06:56:06 -05:00
Jeremy McSpadden
313658586a Merge pull request #3676 from Tibsfox/fix/stop-projection-overwriting-plan
fix(gsd): stop renderAllProjections from overwriting authoritative PLAN.md
2026-04-07 06:55:45 -05:00
Jeremy McSpadden
128ddba5df Merge pull request #3677 from Tibsfox/fix/pre-execution-checks-false-positives
fix(gsd): fix pre-execution-checks false positives from backticks and task.files
2026-04-07 06:03:44 -05:00
Tibsfox
3f5956d7c3 fix(gsd): add incremental persistence to discuss prompts
Discuss sessions with no persistence lost all confirmed work on crash.
Now both milestone and slice discuss prompts instruct agents to
silently save CONTEXT-DRAFT every 2 question rounds via
gsd_summary_save. The final context file overwrites the draft.

Closes #2152

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 03:27:46 -07:00
Jeremy McSpadden
69007b594f Merge pull request #3656 from Tibsfox/fix/auto-dispatch-planning-stuck 2026-04-07 04:22:49 -05:00
Tibsfox
6fa3a6ac94 test: move missing file refs from task.files to task.inputs per #3626 fix 2026-04-06 23:01:34 -07:00
Tibsfox
fa344e79a0 fix(test): escape regex metacharacters in skip-by-preference pattern test
The test regex used unescaped (?:...) groups which were interpreted as
regex syntax instead of matching the literal source text. Escape parens
to match the actual regex pattern in the source code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:55:55 -07:00
Tibsfox
ae6f9bab8a fix(test): search for numbered step definitions in prompt ordering test
The test used indexOf which found "gsd_complete_milestone" in the
"Do NOT call" warning (line 34) before the actual step 10 definition
(line 43). Use regex to match numbered step patterns instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:54:21 -07:00
Tibsfox
f8e98de19f fix(test): update stuck-planning test to expect executing after reconciliation
The fix reconciles plan-file tasks into the DB when the planner skips
persistence, so the phase correctly advances to executing instead of
remaining stuck in planning. Update the known-issue test to expect the
fixed behavior.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:42:17 -07:00
Tibsfox
9479fe07bd fix(test): update file path consistency tests for inputs-only checking
The fix changed checkFilePathConsistency to only check task.inputs, not
task.files, since files includes paths the task will create. Update tests
to use inputs instead of files for consistency checks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:40:29 -07:00
Tibsfox
8dd8744b91 test: add regression test for pre-execution backtick strip and inputs-only check
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:53 -07:00
Tibsfox
fe84893351 test: add regression test for importing done milestones as complete
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:51 -07:00
Tibsfox
ef68e37e79 test: add regression test for skipped validation completion
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:33 -07:00
Tibsfox
fceb983beb test: add regression test for slice sequence on insert
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:19 -07:00
Tibsfox
08ebf3387d test: add regression test for projection plan overwrite prevention
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:06 -07:00
Tibsfox
474c3c287d test: add regression test for prompt step ordering and runtime fixes
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:26:04 -07:00
Tibsfox
fc210a4edf test: add regression test for .bg-shell/ in gitignore BASELINE_PATTERNS
Structural verification that .bg-shell/ is included in the
BASELINE_PATTERNS array in gitignore.ts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:38 -07:00
Tibsfox
5222801ebd test: add regression test for frontmatter parse noise suppression
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:32 -07:00
Tibsfox
1d428c5ffd test: add regression test for complete-task normalizeListParam
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:10 -07:00
Tibsfox
9475757d9a test: add regression test for dispatcher stuck-planning reconciliation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:25:10 -07:00
github-actions[bot]
a1fb64a6ba release: v2.65.0 2026-04-07 04:25:48 +00:00
Jeremy McSpadden
97bd6bf0ee Merge pull request #3700 from jeremymcs/fix/notification-overlay-backdrop
fix(gsd): wrap notification messages and fit overlay to content
2026-04-06 23:05:27 -05:00
Jeremy
5b959648f9 test(gsd): add wrapText tests for notification overlay wrapping
Tests cover: short text, long wrapping, single-word truncation,
empty string, exact-fit, and word preservation across lines.
2026-04-06 22:52:46 -05:00
Jeremy
073a6dc546 fix(gsd): wrap long notification messages and fit overlay to content
Long messages now word-wrap onto continuation lines aligned with the
message start instead of being truncated with ellipsis. Overlay box
sizes to content height instead of padding to fill the viewport.
2026-04-06 22:49:14 -05:00
Tibsfox
f65f92cf76 fix(gsd): import all-done milestones as complete during DB migration
migrateHierarchyToDb imported milestones with all-done roadmap slices
as "active" when SUMMARY.md was missing. This let plan-milestone
overwrite already-completed work.

Now checks parsed roadmap slices — if all are done, imports as
"complete" even without SUMMARY.md.

Closes #3390
Closes #3379

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 20:07:42 -07:00
Tibsfox
5affaaf734 fix(gsd): allow milestone completion when validation skipped by preference
The completing-milestone dispatch guard blocked completion when
operational verification was planned but the validation was
intentionally skipped by a budget profile preference. The guard
now detects skip-by-preference markers in the validation content
and allows completion to proceed.

Closes #3399
Closes #3344

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:52:55 -07:00
Tibsfox
2d3723691a fix(gsd): set slice sequence at all three insertion sites
All slices got sequence=0 because the three code paths that insert
slices never set the sequence column. This made positional ordering
degenerate to alphabetical-by-ID, causing deadlocks when dependency-
free slices were ordered after blocked ones.

Now passes sequence at:
- plan-milestone: array index from agent-ordered params.slices
- reassess-roadmap: existingCount + index for newly added slices
- md-importer: parse order from roadmap content

Closes #3356

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:51:16 -07:00
Tibsfox
994fc15c9d fix(gsd): four prompt/runtime fixes for completion and session stability
1. complete-milestone: move gsd_requirement_update before
   gsd_complete_milestone so agents don't exit before updating
   requirement status (#3155)
2. complete-slice: use gsd_requirement_update instead of
   gsd_save_decision for requirement status transitions (#3154)
3. uncaughtException handler: log instead of re-throwing to prevent
   fatal double-fault that kills the session (#3163)
4. session_before_compact: only cancel during active auto-mode, not
   when paused — allows compaction during interactive work (#3165)

Closes #3155
Closes #3154
Closes #3163
Closes #3165

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:47:38 -07:00
Tibsfox
db19c2e67a fix(gsd): suppress repeated frontmatter YAML parse warnings
logWarning fired on every preferences load when YAML was malformed,
flooding the TUI. Now warns at most once per session with a suppression
notice.

Closes #3376

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:33:55 -07:00
Tibsfox
09acec6dce fix(gsd): normalize list inputs in complete-task + fix roadmap dep parsing
Two fixes:
1. gsd_complete_task now normalizes keyFiles/keyDecisions from strings
   (newline-delimited bullet lists) into arrays at the tool boundary,
   preventing type mismatch rejections on first call (#3361)
2. Legacy roadmap table parser now detects the dependency column from
   the header and only parses deps from that column or cells with
   explicit depends/deps keywords — prevents false deps from slice
   titles that mention other S-IDs (#3383, #3336)

Closes #3361
Closes #3383
Closes #3336

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:32:17 -07:00
Tibsfox
34049b4a7e fix(gsd): add .bg-shell/ to baseline gitignore patterns
The bg-shell process manifest directory is ephemeral runtime state that
should never be committed, but ensureGitignore() was not including it.

Closes #3389
Closes #3388

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:27:06 -07:00
Jeremy McSpadden
bd574d412e Merge pull request #3666 from jeremymcs/fix/notification-overlay-backdrop
fix(gsd): notification overlay backdrop and truncation fixes
2026-04-06 21:01:17 -05:00
Tibsfox
08a79875bb fix(gsd): fix pre-execution-checks false positives from backticks and task.files
Three fixes:
1. Strip backtick wrapping in normalizeFilePath — LLM-generated paths
   like \`src/foo.ts\` resolve to nonexistent paths, causing false blocks
2. Exclude task.files from existence checks — it includes files the task
   will create, so they legitimately don't pre-exist
3. Lower minimum task count from 2 to 1 — single-task slices are valid
   per the planning prompt

Closes #3649
Closes #3626

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 19:00:47 -07:00
Tibsfox
bf0e3fb0e4 fix(gsd): stop renderAllProjections from overwriting authoritative PLAN.md
renderAllProjections called renderPlanProjection which overwrote the
complete PLAN.md (from markdown-renderer.js) with a simplified projection
missing Must-Haves, Verification, Files Likely Touched sections and
corrupting multi-line task descriptions.

Remove the plan projection call from renderAllProjections — the
authoritative renderer in plan-slice/replan-slice tools is the sole
writer. The renderIfMissing recovery path is preserved for when the
file is actually missing.

Closes #3651

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 18:59:00 -07:00
Jeremy
af158235eb fix(gsd): remove background color from backdrop, fix message truncation
Backdrop was painting empty lines with dark gray background (48;5;233),
making the entire screen go black. Now uses dim + gray foreground only.

Message truncation now measures actual prefix width with visibleWidth()
instead of hardcoded 20-char estimate, and uses truncateToWidth() for
proper Unicode handling.
2026-04-06 20:11:07 -05:00
Tibsfox
b1d9798e30 fix(gsd): reconcile plan-file tasks into DB when planner skips persistence (#3600)
When the planning agent writes S##-PLAN.md with task entries but never
calls the gsd_plan_slice persistence tool, the DB has zero task rows
even though the plan file on disk contains valid tasks. This causes
deriveState to return phase='planning' forever — the auto-mode
dispatcher re-dispatches plan-slice in an infinite loop.

Add a reconciliation step in deriveStateFromDb: when the DB returns zero
tasks but the plan file exists and contains parsed tasks, import them
into the DB so the state machine can advance past planning into
execution. This mirrors the existing #2514 reconciliation pattern for
stale task status.

Fixes #3600

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 17:51:33 -07:00
Jeremy
41d5189c4c fix(gsd): restore consistent overlay height to prevent ghost artifacts
Differential renderer can't clear old overlay positions when height
changes between filter cycles. Pad to maxVisibleRows so the overlay
stays the same size regardless of filter state.
2026-04-06 19:31:32 -05:00
Jeremy McSpadden
b4c6229360 Merge pull request #3646 from jeremymcs/fix/notification-overlay-backdrop
fix(gsd): notification overlay backdrop and sizing
2026-04-06 19:09:22 -05:00
Jeremy
2c91b8c6d8 test(tui): add test for 256-color backdrop codes 2026-04-06 18:57:02 -05:00
Jeremy
c35385fe53 fix(gsd): improve notification overlay backdrop and content-fit sizing
Use dark gray background + dim foreground for visible backdrop effect
instead of barely-perceptible SGR dim. Size overlay box to content
instead of padding to fill the entire viewport.
2026-04-06 18:53:26 -05:00
Jeremy McSpadden
6d2345e939 Merge pull request #3638 from jeremymcs/fix/notification-overlay-backdrop
fix(gsd): notification overlay backdrop dimming and viewport padding
2026-04-06 18:27:52 -05:00
Jeremy
9d1e343e41 test(gsd): add overlay backdrop and notification lock safety tests
- Overlay layout: verify backdrop dims base lines, no dim without flag,
  overlay composites on top of dimmed background
- Notification store: verify markAllRead and clearNotifications do not
  delete a foreign process's lock file
2026-04-06 17:44:34 -05:00
Jeremy
d553455732 fix(gsd): only unlink notification lock when owned, prevent foreign lock deletion
_withLock() was unconditionally unlinking the lock file in finally,
even when lock acquisition failed. This could delete another process's
lock and allow unlocked concurrent writes. Now tracks ownership and
only cleans up locks we created.
2026-04-06 17:39:44 -05:00