Skip to content

Dynamic default branch, /cdd-merge-base rename, CamelCase PROJECT_DIR#31

Merged
drabaioli merged 3 commits into
mainfrom
dynamic_default_branch_and_camelcase
Jun 20, 2026
Merged

Dynamic default branch, /cdd-merge-base rename, CamelCase PROJECT_DIR#31
drabaioli merged 3 commits into
mainfrom
dynamic_default_branch_and_camelcase

Conversation

@drabaioli

Copy link
Copy Markdown
Owner

Summary

  • Dynamic default branch: cdd-pre-pr.md and cdd-merge-base.md (both repo and template copies) now resolve the default branch via git symbolic-ref --quiet --short refs/remotes/origin/HEAD (fallback main) instead of hardcoding main. Fixes usage on projects whose default branch is devel, 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.
  • CamelCase PROJECT_DIR: bootstrap-cdd-project.sh now accepts ^[A-Za-z][A-Za-z0-9_-]*$ for the dir slug (was lowercase-only), so repos like PyGroundControl bootstrap without a manual --dir workaround. CI smoke extended with a CamelCase case.
  • Dynamic REPO_ROOT in cdd-next-step.md: the printed worktree-helper source line now uses git rev-parse --show-toplevel instead of the hardcoded ~/Code/<PROJECT_DIR> path.
  • Roadmap: three retrofit-trial defects ticked off; gitflow case (platform default ≠ integration branch) added as the remaining open item.

Test plan

  • bash -n on all scripts
  • ./scripts/command-drift-check.sh exits 0
  • Standard end-to-end smoke (demo-project) passes all assertions
  • CamelCase smoke (MyProject) passes all assertions
  • CI workflow (template-smoke.yml) extended with the CamelCase case

🤖 Generated with Claude Code

drabaioli and others added 3 commits June 20, 2026 12:03
…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>
Comment thread CLAUDE.md Outdated
Comment thread template/BOOTSTRAP.md Outdated
@drabaioli drabaioli merged commit 35966fa into main Jun 20, 2026
1 check passed
@drabaioli drabaioli deleted the dynamic_default_branch_and_camelcase branch June 20, 2026 14:08
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.

1 participant