Skip to content

fix: respect commit_docs: false — stop committing .planning/ files (#790)#850

Closed
0xLeathery wants to merge 10 commits intogsd-build:mainfrom
0xLeathery:fix/commit-docs-ignored-790
Closed

fix: respect commit_docs: false — stop committing .planning/ files (#790)#850
0xLeathery wants to merge 10 commits intogsd-build:mainfrom
0xLeathery:fix/commit-docs-ignored-790

Conversation

@0xLeathery
Copy link
Contributor

What

Fix three compounding bugs that caused .planning/ files to be committed even when commit_docs: false was set in config.

Why

Users setting commit_docs: false expect zero .planning/ commits. Three independent bugs defeated this: isGitIgnored() missed tracked files, loadConfig() silently fell back to true on parse errors, and 33 commit calls across workflows/agents had no defense-in-depth guards.

Changes

  • isGitIgnored() — added --no-index to git check-ignore -q so gitignore rules evaluate without consulting the index (fixes tracked .planning/ files)
  • loadConfig() — split single try/catch into separate file-read and JSON-parse catches; parse failures now return commit_docs: false (safe direction) instead of true
  • add-tests.md — replaced raw git add + git commit with gsd-tools.cjs commit --files to route through the commit_docs gate
  • 23 workflow/agent files — added If commit_docs is true: guards before all 33 unguarded gsd-tools.cjs commit calls
  • 3 new testsisGitIgnored returns true for gitignored paths, false for non-ignored paths, and true for tracked-but-gitignored paths (validates --no-index)
  • 1 updated test — invalid JSON config now expects commit_docs: false

Testing

  • Tested on macOS
  • Tested on Windows
  • Tested on Linux

Checklist

  • Follows GSD style (no enterprise patterns, no filler)
  • Updates CHANGELOG.md for user-facing changes
  • No unnecessary dependencies added
  • Works on Windows (backslash paths tested)

Breaking Changes

None

Ethan Hurst added 10 commits February 28, 2026 20:28
Command shipped in a92512a but was missing from all documentation.
Added to help.md (full reference + common workflows), README.md
command table, and USER-GUIDE.md command reference.
Add centralized path resolution layer (paths.cjs) that enables
milestone-scoped directories for parallel milestone work. All 11 lib
files refactored to use resolvePlanningPaths() instead of hardcoded
.planning/ paths.

Key changes:
- New paths.cjs: resolvePlanningPaths(cwd, milestoneOverride) resolves
  abs/rel paths based on ACTIVE_MILESTONE file or --milestone CLI flag
- --milestone <name> CLI flag parsed in gsd-tools.cjs
- New commands: milestone create/switch/list/status
- All init commands output milestone, is_multi_milestone, planning_base
- Legacy mode (no ACTIVE_MILESTONE) returns identical paths to before
- Auto-migration: first milestone create copies existing global state
- 25 new tests for paths and milestone commands (457 total, 0 failures)
Replace hardcoded .planning/ paths in bash commands and commit
file lists with init JSON variables ({state_path}, {roadmap_path},
{planning_base}/...). Workflows without init calls gain appropriate
init calls. Global paths (PROJECT.md, codebase/) left unchanged.
…tusline, and docs (gsd-build#291)

Phase 5: polish for concurrent milestone execution.
- Milestone-scoped commit prefixes in execute-plan.md (v2.0/08-02)
- cmdMilestoneSwitch warns about in-progress work before switching
- /gsd:switch-milestone workflow and command
- Statusline shows active milestone in cyan [v2.0]
- new-milestone.md calls milestone create for multi-milestone mode
- Help and README updated with switch-milestone and concurrent docs
…itch-warning tests (gsd-build#291)

- USER-GUIDE: add /gsd:switch-milestone, concurrent milestones section,
  multi-milestone directory layout
- CHANGELOG: add [Unreleased] entry for concurrent milestone execution
- planner-subagent-prompt.md: replace hardcoded .planning/ paths with
  milestone-aware template variables
- 4 new tests: switch in-progress warning, idle switch, same-milestone
  switch, and auto-migration on first milestone create (461 total)
…ration (gsd-build#99)

Add structured bug reporting lifecycle: report → triage → investigate → fix → resolve.

- Skill file, workflow, and bug-report template
- CLI commands: bug list/update/resolve, init bugs, scaffold bugs
- Severity inference from keywords (critical/high/medium/low)
- Diagnostic log capture (git state, error output, log files)
- Optional GitHub issue creation via gh CLI
- 13 new tests across 4 test suites
- Registered in help, README, USER-GUIDE, CHANGELOG
- STATE.md and progress workflow track active bugs
…ion (gsd-build#210)

Add fourth model profile (adaptive) that auto-selects models per-plan
based on complexity scoring. Includes medium tier alignment with balanced
profile, keyword regex precision fixes, enriched plan context (type,
depends_on), usage logging, verifier adaptive resolution, and additional
scoring signals (TDD, dependencies, test files). 528 tests passing.
)

resolveModelInternal was converting every 'opus' result to 'inherit'
before returning it. 'inherit' tells Claude Code's Task tool to use
the parent session's model — which defaults to Sonnet 4.6, silently
running quality/balanced-profile agents on the wrong model.

Pass 'opus' directly; Claude Code's Task tool resolves it to the
current Opus version. Orgs that block Opus will now get a clear error
instead of a silent Sonnet downgrade.

- Remove opus → 'inherit' conversion from all 3 return sites in
  resolveModelInternal (core.cjs)
- Update 7 test assertions and fix validValues set (core.test.cjs)
- Update model-profiles.md, model-profile-resolution.md, and
  adaptive-model-selection.md to reflect the change
Installs GSD commands as Kimi skills to the XDG path
~/.config/agents/skills/gsd-<name>/SKILL.md (invoked via /skill:gsd-<name>)
and agents as dual-file YAML + system prompt under ~/.kimi/agents/.

- Full Claude→Kimi tool name mapping (kimi_cli.tools.file:ReadFile, etc.)
- MCP tools excluded from agent tool lists
- ${VAR} escaping in agent system prompts
- --kimi --local guard with clear error message
- KIMI_CONFIG_DIR / KIMI_SKILLS_DIR env overrides
- 25 new tests in tests/kimi-config.test.cjs (553 total, 0 failures)
…sd-build#790)

Three compounding bugs caused .planning/ commits despite commit_docs: false:
- isGitIgnored() missed tracked files (added --no-index)
- loadConfig() fell back to commit_docs: true on parse errors (now false)
- 33 workflow/agent commit calls lacked defense-in-depth guards (all gated)
Copy link
Collaborator

@glittercowboy glittercowboy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: Split Required

The commit_docs fix itself is sound — --no-index on isGitIgnored, defaulting commit_docs: false on parse error, and defense-in-depth guards on commit calls are all correct and needed.

However, this PR bundles ~4,400 lines across 74 files, and the actual bug fix is maybe 100 of those lines. The rest is:

  • Kimi CLI support (large new feature)
  • Adaptive model profiles (large new feature)
  • Bug reporting system (new feature)
  • Switch-milestone command (new feature)
  • Opus model resolution fix (separate bug)
  • 8 new/modified test files for unrelated features

This makes the PR unreviewable as a bug fix. It also conflicts heavily with your other PRs (#852, #845) since they share ~95% of the same diff.

Requested action: Please extract the commit_docs fix into a standalone PR (the isGitIgnored change, loadConfig default, and the 33 workflow/agent commit guards). The shared features (Kimi, adaptive profiles, bug reporting, etc.) should go in a separate feature PR that all three of your current PRs can be consolidated into.

Note: The isGitIgnored --no-index fix has been merged via #821, so your standalone fix PR can build on that.

@0xLeathery
Copy link
Contributor Author

Superseded by #877 (commit_docs fix only) + #875 (consolidated features). The original PR bundled 9 shared feature commits inflating it to ~3,670 additions. The replacement PRs are focused and reviewable.

@0xLeathery 0xLeathery closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants