Commit Graph

2676 Commits

Author SHA1 Message Date
Tom Boucher
d4d4178603 Merge pull request #3483 from radioflyer28/feat/agent-launch-reasoning-transport-3474
feat: transport resolved reasoning effort to agent launches
2026-05-14 20:01:32 -04:00
Tom Boucher
9ccd97a9e0 Merge pull request #3528 from gsd-build/fix/3522-gsd-sdk-query-commit-files-silently-over
feat(sdk): add --respect-staged opt-in to commit --files
2026-05-14 19:58:36 -04:00
Tom Boucher
e6790238aa Merge pull request #3527 from gsd-build/fix/3523-bug-cjs-loadconfig-warns-top-level-branc
fix(3523): stop false 'branching_strategy will be ignored' warning in CJS loadConfig
2026-05-14 19:58:08 -04:00
Tom Boucher
cda6cd3e06 Merge pull request #3526 from gsd-build/fix/3521-workflows-quick-md-two-bugs-in-post-merg
fix(quick): pin cleanup-loop CWD to project root before bare git commands (#3521)
2026-05-14 19:57:45 -04:00
Tom Boucher
f737fd37a6 Merge pull request #3525 from gsd-build/fix/3516-reapply-patches-md-filter-on-line-231-mi
fix(reapply-patches): add gsd-update filter arm to git-enhanced two-way merge (#3516)
2026-05-14 19:57:15 -04:00
Tom Boucher
7c5adeaad1 test: allow runtime output assertions 2026-05-14 19:47:48 -04:00
Tom Boucher
585e417f9e fix: harden respect-staged pathspec handling 2026-05-14 19:44:04 -04:00
Tom Boucher
75dffc8069 fix: address branching strategy review findings 2026-05-14 19:44:01 -04:00
Tom Boucher
085154ace7 docs: clarify gsd-update reapply changeset 2026-05-14 19:43:59 -04:00
Tom Boucher
017abd9236 feat(sdk): add --respect-staged opt-in to gsd-sdk query commit --files (#3522)
Closes #3522. When --respect-staged is passed the git add loop is skipped
entirely so per-hunk staging from git add -p is preserved. Default behavior
(full re-stage) is unchanged. The #3061 pathspec invariant holds under both
modes. Nothing-staged within scope returns { committed: false, reason:
'nothing staged' } without error.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:08:08 -04:00
Tom Boucher
0f7b018d4d chore: changeset for fix/3523 (branching_strategy false warning)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:03:42 -04:00
Tom Boucher
3ab24c6c56 fix(3523): self-healing migration of legacy top-level branching_strategy
Three-part fix for the false "unknown config key(s)" warning fired for
top-level `branching_strategy` in .planning/config.json:

1. On-disk migration (option 3, mirroring multiRepo → planning.sub_repos):
   When loadConfig reads a config.json with top-level `branching_strategy`
   set and `git.branching_strategy` unset, it grafts the value into
   `git.branching_strategy` and deletes the top-level key, then persists.
   If `git.branching_strategy` is already set, the nested value wins
   (matches SDK mergeDefaults precedence, PR #3116).

2. KNOWN_TOP_LEVEL safety net: 'branching_strategy' added to the deprecated-
   keys bucket so the warning never fires even on the first read of a root
   config that feeds a workstream merge (where `parsed` may still carry it).

3. Double-emission guard: a module-level `_warnedUnknownConfigKeys` Set
   deduplicates the unknown-key warning across multiple loadConfig calls
   within a single CLI invocation (init phase-op N called it twice).

Closes #3523

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:03:39 -04:00
Tom Boucher
e4ed71bf79 test(3523): red — legacy top-level branching_strategy warning + migration + parity
Six failing tests covering all Done-when criteria from #3523:
  1. No warning emitted for top-level branching_strategy
  2. Value still surfaced via git.branching_strategy after loadConfig
  3. Double-emission capped to single-emission per process
  4-5. On-disk migration (option 3): write-back + no-clobber guard
  6. CJS↔SDK contract: both agree on legacy-shape fixture

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:03:31 -04:00
Tom Boucher
c974d9de74 chore: pin changeset pr field to #3526
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:02:53 -04:00
Tom Boucher
e1270c3547 fix(quick): pin cleanup-loop CWD to project root before bare git commands (#3521)
The post-merge worktree-cleanup loop in quick.md issued bare `git diff`,
`git merge`, and related commands relying on CWD = project root. An LLM
orchestrator that reformats bash across separate tool calls can leak CWD
into a worktree, causing the merge to silently no-op.

At the top of each iteration body, resolve PROJECT_ROOT via
`git -C "$WT" rev-parse --git-common-dir` and `cd "$PROJECT_ROOT"`.
If the root cannot be resolved or reached, log a skip message and
continue to the next manifest entry. All existing guards (pre-merge
deletion guard #1756, STATE.md/ROADMAP.md backup/restore, resurrection
guard #2501/#3195) remain intact after the CWD pin.

Closes #3521 (bug 1 — CWD safety only; bug 2 / resurrection guard was
already fixed in a6beac40 / PR #3201 and is pending reporter retest).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:02:16 -04:00
Tom Boucher
9fb549e499 test(3521): add regression test for quick.md cleanup-loop CWD safety
Simulates orchestrator-leaked CWD in the post-merge cleanup loop and
asserts that PROJECT_ROOT is resolved via `git -C "$WT" rev-parse
--git-common-dir` before any bare git command, that a missing root
causes a logged skip/continue, and that the existing pre-merge deletion
guard (#1756) and STATE.md/ROADMAP.md backup/restore remain in-place
after the CWD pin.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 19:02:06 -04:00
Tom Boucher
04c1296aed chore: add changeset fragment for #3516 filter fix 2026-05-14 19:00:41 -04:00
Tom Boucher
8cbb0cbc45 fix(reapply-patches): add gsd-update arm to git-enhanced two-way merge filter (#3516)
The grep -v alternation in the git-enhanced two-way merge step was missing
the 'gsd-update' arm after the slash-command rename from /gsd:update to
/gsd-update. Commits authored by the current update flow fell through the
filter and were misclassified as user customizations, causing spurious merge
prompts during /gsd-update --reapply.

Adds 'gsd-update' between 'gsd:update' and 'GSD update'. The legacy
'gsd:update' arm is preserved for back-compat; 'GSD update' and 'gsd-install'
exclusions are unchanged.
2026-05-14 19:00:38 -04:00
Tom Boucher
490b2706f2 test(3516): add failing regression for missing gsd-update filter arm
Adds bug-3516-reapply-patches-gsd-update-filter.test.cjs — 7 tests that
assert all four exclusion patterns (gsd:update, gsd-update, GSD update,
gsd-install) are present in the git-enhanced two-way merge filter inside
get-shit-done/workflows/reapply-patches.md.

Two tests fail before the fix: 'filter excludes renamed gsd-update commits'
and 'all four expected exclusion patterns are present in the filter'.
2026-05-14 19:00:32 -04:00
Tom Boucher
7212e61142 Merge pull request #3520 from gsd-build/fix/3517-phase-complete-leaves-state-md-body-fron
fix(sdk): derive STATE.md fields from ROADMAP and refresh all stale fields after phase.complete (#3517)
2026-05-14 18:35:38 -04:00
Tom Boucher
2bee9ffb88 test(3517): add allow-test-rule exemption — STATE.md is the runtime contract 2026-05-14 17:40:45 -04:00
Tom Boucher
16eee9606a chore: pin changeset pr field to #3520 2026-05-14 17:22:34 -04:00
Tom Boucher
200c012f84 fix(sdk): derive completed_phases from ROADMAP and refresh all STATE.md fields after phase.complete
Fixes two root causes behind bug #3517:

1. Idempotency: completed_phases was blindly incremented (parseInt + 1),
   causing phase.complete N run twice to double-count (4 → 5 → 6).
   Now derives from ROADMAP progress table Complete-row count, making
   the operation idempotent.

2. Field coverage: eight STATE.md fields were left stale after phase
   completion. Now updates in the same atomic lock section:
   - frontmatter: stopped_at, last_updated, total_plans, completed_plans
   - body: Current focus, Status line, By Phase table row

   completed_plans = count of *-SUMMARY.md files across all phase dirs
   total_plans = sum of M/N plan counts from ROADMAP progress table
   percent = recomputed from fresh derived counts

Closes #3517

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 16:56:18 -04:00
Tom Boucher
f45f2ec746 Merge pull request #3515 from gsd-build/feat/2937-enhancement-statusline-opt-in-context-po
feat(statusline): opt-in context_position config for narrow terminals
2026-05-14 16:41:38 -04:00
Tom Boucher
3c2a252e14 test(2937): add CLI write-path negative test for invalid context_position (CR nitpick) 2026-05-14 16:38:05 -04:00
Tom Boucher
b40bc6bf3d chore: pin changeset pr field to #3515
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 15:46:35 -04:00
Tom Boucher
e0adba7e08 feat(statusline): add opt-in context_position config for narrow terminals (#2937)
Extract composeStatusline() helper from duplicated inline template logic in
runStatusline() and renderStatusline(). Both call sites now route through the
helper, which accepts a position param ('end' | 'front', default 'end').

- 'end' (default) preserves byte-identical output to v1.38.x and earlier
- 'front' renders ctx immediately after model name, before the first │
- Invalid values silently coerce to 'end' at runtime (belt-and-suspenders;
  config-set rejects invalid values upfront via enum validator)

Adds statusline.context_position to VALID_CONFIG_KEYS in both CJS and TS
schemas, enum validator in config.cjs, docs row in CONFIGURATION.md,
and a changeset. Closes #2937.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 15:45:41 -04:00
Tom Boucher
3f054b4a96 Merge pull request #3505 from gsd-build/fix/3346-codex-aot-toml-event-key
fix(install): emit event-name leaf key for Codex AoT hooks migration (#3346)
2026-05-14 14:03:54 -04:00
Tom Boucher
0e1de9627a Merge pull request #3508 from gsd-build/feat/3086-allow-disabling-or-customizing-the-miles
feat(workflow): add git.create_tag config to disable milestone tagging
2026-05-14 14:03:18 -04:00
Tom Boucher
db7d82513e Merge pull request #3510 from gsd-build/fix/3509-test-suite-cli-break-when-repo-path-cont
fix(tests): use array args for space-containing paths — closes #3509
2026-05-14 14:02:56 -04:00
Tom Boucher
79259c537e Merge pull request #3512 from gsd-build/codex/issue-3427-codex-skill-path
fix(codex): remove duplicate skill copies and consolidate hooks.json
2026-05-14 14:02:35 -04:00
Tom Boucher
e6627dfd77 test(codex): support direct SessionStart hooks in #2698 helper 2026-05-14 13:52:55 -04:00
Tom Boucher
44e65428e0 test(codex): harden hooks.json sessionStart test helper 2026-05-14 13:46:34 -04:00
Tom Boucher
3195d26d3f test(codex): migrate #2698 hook assertion to hooks.json 2026-05-14 13:45:11 -04:00
Tom Boucher
9dc9e37445 test(codex): align hook assertions with hooks.json 2026-05-14 13:38:41 -04:00
Tom Boucher
92260b3dc9 fix(config): add create_tag to buildNewProjectConfig for git.* consistency (CR nitpick) 2026-05-14 13:30:59 -04:00
Tom Boucher
925cce684a fix(codex): remove managed hooks.json SessionStart on uninstall 2026-05-14 13:30:59 -04:00
Tom Boucher
51f549caaf test(codex): align install contracts with no gsd skill copies 2026-05-14 13:27:12 -04:00
Tom Boucher
1d6284a718 fix(codex): remove duplicate skill copies and consolidate hook payloads 2026-05-14 13:17:39 -04:00
Tom Boucher
434e6aa162 test(3346): assert handler body drops legacy event field (CR nitpick) 2026-05-14 12:59:38 -04:00
Tom Boucher
f1be1111cf fix(tests): round-trip via frontmatter get to satisfy lint-no-source-grep 2026-05-14 12:49:48 -04:00
Tom Boucher
79425989e7 chore: pin changeset pr field to #3510
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 12:44:25 -04:00
Tom Boucher
c21bbf116e fix(tests): use array form for space-containing paths in CLI invocations
On machines where os.tmpdir() returns a path with a space (e.g.
/Volumes/Mini Me/tmp), runGsdTools() string args were whitespace-split by
the helper tokeniser, truncating paths at the first space.  Switch all
calls that embed a dynamic path into the argument list to the array form
of runGsdTools() so execFileSync receives each path as a single argv slot.

Fixes #3509

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 12:43:48 -04:00
Tom Boucher
efd98cdb76 fix(workflow): align complete-milestone tag placeholders 2026-05-14 12:30:16 -04:00
Tom Boucher
e1f742788e chore: pin changeset pr field to #3508
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 12:09:55 -04:00
Tom Boucher
da21edfb59 feat(workflow): add git.create_tag config to disable milestone tagging
Adds boolean config key `git.create_tag` (default: true, fully backcompat)
so projects with their own release flow can disable GSD's automatic
`git tag -a v[X.Y]` on milestone completion. Also adds tag-collision
pre-check to prevent silent failure on re-run. Closes #3086

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 12:06:36 -04:00
Tom Boucher
625ccf5217 docs(context): capture 2026-05-14 triage-session learnings
Adds eight Session learnings entries covering the seven defect PRs opened
in this session plus the multi-PR triage operational pattern:

- #3095/#3490 — executor failure classification + cross-runtime sentinels
- #3489/#3499 — STATE.md idempotency oracle for state.complete-phase
- #3488/#3501 — same-phase short-form depends_on lookup index
- #3491/#3502 — git rev-parse --is-inside-work-tree primitive for nested
  worktree detection
- #3493/#3500 — extractCurrentMilestone generic Phase Details continuation
- #3503/#3504 — homedir substring containment trailing-slash anchor
- #3346/#3505 — Codex AoT TOML leaf key event-name composition
- #3506/#3507 — label-scoped stale-bot sub-job pattern

Plus operational lessons on GitHub auto-close-keyword parsing in PR bodies,
gh-templates-first hook gating, sub-agent capacity ceilings on 24 GB
systems, and trust-but-verify discipline on agent return reports.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:52:40 -04:00
Tom Boucher
b3aced3ca2 Merge pull request #3507 from gsd-build/chore/3506-stale-retest-5day
chore(ci): add 5-day auto-close for awaiting-retest / needs-reproduction (#3506)
2026-05-14 10:48:51 -04:00
Tom Boucher
35a09e7612 chore(ci): add 5-day auto-close for awaiting-retest / needs-reproduction (#3506)
Adds a second job to .github/workflows/stale.yml scoped via only-issue-labels
to awaiting-retest and needs-reproduction. days-before-issue-stale=5,
days-before-issue-close=0 — when the inactivity threshold trips the stale
+ close messages fire in the same run. PR side of the action is disabled
(-1 sentinel) so this job touches issues only.

The existing broad 28+14 job adds awaiting-retest and needs-reproduction to
its exempt-issue-labels list so the two jobs do not fight over the same
issues.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:48:08 -04:00
Tom Boucher
619915de96 fix(install): emit event-name leaf key for Codex AoT hooks migration (#3346)
migrateCodexHooksMapFormat re-emitted the raw `[hooks.<X>]` path segment as
the leaf TOML key of the new `[[hooks.<EVENT>]]` block. When the legacy
table key was a `<file>:<event>:<line>:<col>` location identifier and the
real event lived in an `event = "..."` body field, the migration emitted a
header like `[[hooks."C:\\Users\\helen\\.codex\\config.toml:session_start:0:0"]]`
that Codex 0.124.0+ refuses to load — causing `npx get-shit-done-cc@latest`
to abort the Codex runtime install on Windows configs that pre-date AoT.

Mirror the flat-AoT branch in the map-format and stale-namespaced-AoT
branches: when the section body declares `event = "..."`, that name wins
as the leaf key and `event` is excluded from the re-emitted handler body.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-14 10:43:09 -04:00