Dynamic default branch, /cdd-merge-base rename, CamelCase PROJECT_DIR#31
Merged
Conversation
…se PROJECT_DIR, dynamic repo path Three Phase 10 defects closed: 1. cdd-merge-main.md → cdd-merge-base.md (both repo + template copies). The new command resolves the default branch at runtime via `git symbolic-ref --quiet --short refs/remotes/origin/HEAD` (fallback `main`), matching the worktree helper's existing approach. All `origin/main` git-command references replaced with `$DEFAULT_BRANCH`. cdd-pre-pr.md updated the same way. A scope note documents the gitflow case (platform default ≠ integration branch) as out of scope; tracked as a new Phase 10 item in the roadmap. 2. bootstrap-cdd-project.sh PROJECT_DIR regex loosened from ^[a-z][a-z0-9_-]*$ to ^[A-Za-z][A-Za-z0-9_-]*$ so CamelCase dirs like PyGroundControl are accepted. The rendered handoff path in cdd-next-step.md now matches what the worktree helper derives from the actual directory basename, closing the "No handoff file" divergence defect. CamelCase bootstrap case added to CI workflow and CLAUDE.md build/test section. 3. cdd-next-step.md §8 updated in both copies to resolve the repo root via `git rev-parse --show-toplevel` and embed the actual path in the printed source line, instead of hardcoding $HOME/Code/... Cross-cuts: all cdd-merge-main references swept across the full repo (process doc, demo, CLAUDE.md, template/CLAUDE.md, BOOTSTRAP.md, cdd-process-pr, cdd-retrofit, roadmap, ADR, feature/arch docs). Process doc §2.9 and template/BOOTSTRAP.md updated to note CamelCase is permitted for PROJECT_DIR. Roadmap Phase 10 items marked done; new gitflow item filed. Whitelist updated with three new <...> tokens introduced by the commands. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
… shorten BOOTSTRAP.md PROJECT_DIR description Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
drabaioli
commented
Jun 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cdd-pre-pr.mdandcdd-merge-base.md(both repo and template copies) now resolve the default branch viagit symbolic-ref --quiet --short refs/remotes/origin/HEAD(fallbackmain) instead of hardcodingmain. Fixes usage on projects whose default branch isdevel,master,trunk, etc./cdd-merge-main→/cdd-merge-base: renamed throughout — command files, process doc, CLAUDE.md, README, template, demo, ADR, roadmap. "Base branch" is standard PR terminology and decouples the name from any specific branch name.PROJECT_DIR:bootstrap-cdd-project.shnow accepts^[A-Za-z][A-Za-z0-9_-]*$for the dir slug (was lowercase-only), so repos likePyGroundControlbootstrap without a manual--dirworkaround. CI smoke extended with a CamelCase case.REPO_ROOTincdd-next-step.md: the printed worktree-helper source line now usesgit rev-parse --show-toplevelinstead of the hardcoded~/Code/<PROJECT_DIR>path.Test plan
bash -non all scripts./scripts/command-drift-check.shexits 0demo-project) passes all assertionsMyProject) passes all assertionstemplate-smoke.yml) extended with the CamelCase case🤖 Generated with Claude Code