fix(settings): route /gsd-settings reads/writes through workstream-aware config path (#2285)

settings.md was reading and writing .planning/config.json directly while
gsd-tools config-get/config-set route to .planning/workstreams/<slug>/config.json
when GSD_WORKSTREAM is active, causing silent write-read drift (Closes #2282).

- config.cjs: add cmdConfigPath() — emits the planningDir-resolved config path as
  plain text (always raw, no JSON wrapping) so shell substitution works correctly
- gsd-tools.cjs: wire config-path subcommand
- settings.md: resolve GSD_CONFIG_PATH via config-path in ensure_and_load_config;
  replace hardcoded cat .planning/config.json and Write to .planning/config.json
  with $GSD_CONFIG_PATH throughout
- phase.cjs: fix renameDecimalPhases to preserve zero-padded prefix (06.3 → 06.2
  not 6.2) — pre-existing test failure on main
- tests/config.test.cjs: add config-path command tests (#2282)

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-04-15 16:46:10 -04:00
committed by GitHub
parent 55877d372f
commit 5f521e0867
4 changed files with 60 additions and 3 deletions

View File

@@ -639,6 +639,11 @@ async function runCommand(command, args, cwd, raw, defaultValue) {
break;
}
case 'config-path': {
config.cmdConfigPath(cwd, raw);
break;
}
case 'agent-skills': {
init.cmdAgentSkills(cwd, args[1], raw);
break;