Replace legacy scripts/ with git-repokit-common subtree
Problem
scripts/ contains a divergent, older copy of git hooks and version management that was created before git-repokit-common was extracted as a shared project. The two have drifted:
- dazzlecmd uses bash
update-version.sh; repokit-common uses Python sync-versions.py
- dazzlecmd hooks have hardcoded
src/dazzlecmd/ paths; repokit-common auto-detects package dirs
- dazzlecmd pre-push uses
py_compile glob; repokit-common uses compileall (handles src/ layout)
- repokit-common has additional tools:
gh_issue_full.py, gh_sub_issues.py, search_sesslog.py, safe_move.sh
What needs to happen
- Stash or commit all outstanding uncommitted work first --
git subtree add requires a completely clean working tree (including submodules)
- Remove existing
scripts/ from git
git subtree add --prefix=scripts repokit-common main --squash
- Add
[tool.repokit-common] config to pyproject.toml:
[tool.repokit-common]
version-source = "src/dazzlecmd/_version.py"
changelog = "CHANGELOG.md"
repo-url = "https://github.com/DazzleTools/dazzlecmd"
tag-prefix = "v"
tag-format = "human"
private-patterns = ["private/", ".env"]
- Run
bash scripts/install-hooks.sh to install new hooks
- Verify hooks work: commit, push, tag push
Gotcha: clean working tree required
git subtree add refuses to run with ANY dirty files -- even unrelated ones, even submodules with modified content. The wtf submodule's nested tools/core/restarted submodule was dirty, plus untracked directories like projects/dazzletools/private-init/ blocked it. Best to do this when the tree is genuinely clean.
Upstream already prepared
- repokit-common v0.2.3 (61ebd1e) includes the tag-only push skip from this session
- Remote
repokit-common already added to dazzlecmd: https://github.com/DazzleTools/git-repokit-common.git
- repokit-common's pre-commit has fallback: tries
sync-versions.py first, falls back to update-version.sh
Post-subtree tasks
- Remove
scripts.bak/ if it still exists
- Update
CLAUDE.md version bump checklist (sync-versions.py replaces manual update-version.sh)
- Consider adding
[tool.repokit-common] section to pyproject.toml
- Future updates:
git subtree pull --prefix=scripts repokit-common main --squash
Replace legacy scripts/ with git-repokit-common subtree
Problem
scripts/contains a divergent, older copy of git hooks and version management that was created before git-repokit-common was extracted as a shared project. The two have drifted:update-version.sh; repokit-common uses Pythonsync-versions.pysrc/dazzlecmd/paths; repokit-common auto-detects package dirspy_compileglob; repokit-common usescompileall(handles src/ layout)gh_issue_full.py,gh_sub_issues.py,search_sesslog.py,safe_move.shWhat needs to happen
git subtree addrequires a completely clean working tree (including submodules)scripts/from gitgit subtree add --prefix=scripts repokit-common main --squash[tool.repokit-common]config topyproject.toml:bash scripts/install-hooks.shto install new hooksGotcha: clean working tree required
git subtree addrefuses to run with ANY dirty files -- even unrelated ones, even submodules with modified content. The wtf submodule's nestedtools/core/restartedsubmodule was dirty, plus untracked directories likeprojects/dazzletools/private-init/blocked it. Best to do this when the tree is genuinely clean.Upstream already prepared
repokit-commonalready added to dazzlecmd:https://github.com/DazzleTools/git-repokit-common.gitsync-versions.pyfirst, falls back toupdate-version.shPost-subtree tasks
scripts.bak/if it still existsCLAUDE.mdversion bump checklist (sync-versions.py replaces manual update-version.sh)[tool.repokit-common]section to pyproject.tomlgit subtree pull --prefix=scripts repokit-common main --squash