refactor(git-submodules): retrofit to the ADR-0020 context contract

Description 480 -> 248 chars, body 1011 -> 347 words. The single
submodules.md splits into setup-and-update, urls-and-config, and removal.

Restores three regressions the first pass introduced: 'repointing' as the
trigger for the URL branch, which had none while the boundary clause
steered those queries to git-remotes; clone and absorbgitdirs in the output
enum, which dispatch still routed to; and status --cached, the flag that
makes the pre-commit pointer gate verifiable.
This commit is contained in:
2026-08-30 13:10:53 +00:00
parent 3c74beb280
commit 261e5b5491
16 changed files with 512 additions and 328 deletions

View File

@@ -6,10 +6,26 @@ metadata:
# References
## submodules.md
One file per task branch in SKILL.md's dispatch table. Load only the one that matches the request.
Deep-dive reference: full `update` flag table, workflow patterns (clone, add, keep-pinned, update-to-latest, override URL), the complete safe-removal sequence, `absorbgitdirs`, and `foreach` shell variables. Load when SKILL.md's condensed Operations list isn't enough detail.
## setup-and-update.md
Cloning a superproject that has submodules, adding a dependency as a submodule, initializing
without cloning, and updating or re-pinning. Carries the `add` and `update` flag tables and the
keep-pinned and move-the-pin-forward workflows.
## urls-and-config.md
Where a submodule points and how it is configured: the `.gitmodules` vs `.git/config` split, both
key tables, `sync` / `set-url` / `set-branch`, local mirror overrides, relative URL resolution, the
security gate on custom `update` commands, and `absorbgitdirs`.
## removal.md
Removing a submodule, and why `deinit` alone does not remove one. Carries the full four-step
removal sequence including the manual `.git/modules/<name>/` cleanup.
## sources.md
Research sources that informed this skill — provenance chain for git-scm-submodule-docs reference material.
Research sources that informed this skill — provenance chain for git-scm-submodule-docs reference
material.