Summary
Three related items for dz kit add / dz kit update that together complete the registry-pointer schema for multi-method kit imports:
--method flag — dz kit add <url> --method submodule|subtree|copy (default: submodule); persists import_method field in registry pointer
--pin flag — dz kit add <url> --pin v1.0.0 (or SHA, or branch); hybrid semver + git-native versioning; persists pin field
dz kit update <name> — dispatches by import_method: git submodule update --remote for submodules, git subtree pull for subtrees, warn for copies; respects pin when set
These items are filed together because they share a registry-pointer schema change and overlapping CLI surface; splitting them across three issues would create churn in the same code path.
Motivation
Today dz add / dz kit add only supports git submodule add. Real-world adopters need:
- Subtree — when you want the kit's history vendored into your monorepo (no
.gitmodules, no detached-HEAD pain)
- Copy — when you want a one-time snapshot with no upstream tracking (e.g., for vendoring third-party kits you don't trust to evolve)
- Pinning — when you want to depend on
v1.0.0 (semver) or abc1234 (SHA) rather than tracking a branch
The design notes for these have existed since 2026-04-15:
notes/cli/2026-04-15__00-51-26__both_kit-import-methods-submodule-vs-subtree-vs-copy.md
notes/cli/2026-04-15__00-43-09__both_versioning-strategy-for-tools-kits-aggregators.md
Schema additions to registry pointer
Current registry pointer (kits/<kit>.kit.json):
{
"kit": "wtf",
"url": "https://github.com/DazzleTools/wtf-windows.git",
"branch": "main",
"path": "projects/wtf"
}
Proposed additions:
{
"kit": "wtf",
"url": "https://github.com/DazzleTools/wtf-windows.git",
"branch": "main",
"path": "projects/wtf",
"import_method": "submodule", // submodule | subtree | copy
"pin": "v1.0.0" // semver tag, SHA, or branch name
}
Acceptance criteria
dz kit add --method
dz kit add --pin
dz kit update <name>
Estimated scope
~150-200 LOC across cli.py (new args, dispatch), loader.py (registry pointer schema), engine.py (validation), plus ~50 lines of tests.
Phasing
- Phase 1 (~1 day):
--method flag + schema + dz kit info display
- Phase 2 (~1 day):
--pin flag + schema + resolution
- Phase 3 (~1-2 days):
dz kit update dispatching all three methods + --all + --dry-run
Related issues
Analysis
- Design notes:
notes/cli/2026-04-15__00-51-26__both_kit-import-methods-submodule-vs-subtree-vs-copy.md, notes/cli/2026-04-15__00-43-09__both_versioning-strategy-for-tools-kits-aggregators.md
- Master closeout plan:
2026-04-29__07-41-11__claude-plan__0-7-x-closeout-ultraplan.md (4d-8 / 4d-9 / X-23 in Tier 2)
Summary
Three related items for
dz kit add/dz kit updatethat together complete the registry-pointer schema for multi-method kit imports:--methodflag —dz kit add <url> --method submodule|subtree|copy(default: submodule); persistsimport_methodfield in registry pointer--pinflag —dz kit add <url> --pin v1.0.0(or SHA, or branch); hybrid semver + git-native versioning; persistspinfielddz kit update <name>— dispatches byimport_method:git submodule update --remotefor submodules,git subtree pullfor subtrees, warn for copies; respectspinwhen setThese items are filed together because they share a registry-pointer schema change and overlapping CLI surface; splitting them across three issues would create churn in the same code path.
Motivation
Today
dz add/dz kit addonly supportsgit submodule add. Real-world adopters need:.gitmodules, no detached-HEAD pain)v1.0.0(semver) orabc1234(SHA) rather than tracking a branchThe design notes for these have existed since 2026-04-15:
notes/cli/2026-04-15__00-51-26__both_kit-import-methods-submodule-vs-subtree-vs-copy.mdnotes/cli/2026-04-15__00-43-09__both_versioning-strategy-for-tools-kits-aggregators.mdSchema additions to registry pointer
Current registry pointer (
kits/<kit>.kit.json):{ "kit": "wtf", "url": "https://github.com/DazzleTools/wtf-windows.git", "branch": "main", "path": "projects/wtf" }Proposed additions:
{ "kit": "wtf", "url": "https://github.com/DazzleTools/wtf-windows.git", "branch": "main", "path": "projects/wtf", "import_method": "submodule", // submodule | subtree | copy "pin": "v1.0.0" // semver tag, SHA, or branch name }Acceptance criteria
dz kit add --methoddz kit add <url> --method submodule(default) — runsgit submodule add(current behavior)dz kit add <url> --method subtree— runsgit subtree add --prefix=<path> <url> <branch> --squashdz kit add <url> --method copy— doesgit clone --depth 1then removes.git/(snapshot mode)import_methodfield persists inkits/<kit>.kit.jsondz kit info <kit>displays the import method~/.dazzlecmd/config.json:kit_import.default_methoddz kit add --pindz kit add <url> --pin v1.0.0resolves the tag and pins to that SHAdz kit add <url> --pin abc1234(full or short SHA) pins to that commitdz kit add <url> --pin main(branch name) tracks the branch (no pin)pinfield persists in registry pointerdz kit info <kit>displays the pin and resolved SHAdz tree(or similar) shows pin info per kitdz kit update <name>dz kit update <kit>dispatches byimport_method:git submodule update --remote <path>(orgit submodule update --initif not yet checked out)git subtree pull --prefix=<path> <url> <branch> --squashCannot auto-update copies. Re-import via: dz kit add <url> --method copypinis set: refuses to update past the pin (or prompts: "Pinned to v1.0.0; update bumps pin?")dz kit update --allupdates all kitsdz kit update --dry-runshows planned actions without running themEstimated scope
~150-200 LOC across
cli.py(new args, dispatch),loader.py(registry pointer schema),engine.py(validation), plus ~50 lines of tests.Phasing
--methodflag + schema +dz kit infodisplay--pinflag + schema + resolutiondz kit updatedispatching all three methods +--all+--dry-runRelated issues
dz newredesign (sibling: both touchdzimport/scaffolding surface)Analysis
notes/cli/2026-04-15__00-51-26__both_kit-import-methods-submodule-vs-subtree-vs-copy.md,notes/cli/2026-04-15__00-43-09__both_versioning-strategy-for-tools-kits-aggregators.md2026-04-29__07-41-11__claude-plan__0-7-x-closeout-ultraplan.md(4d-8 / 4d-9 / X-23 in Tier 2)