T-ZZD1-setup-generalizes-claude-subtree-unignore
Status: closed/obsoleted · Impact: low · Complexity: small
Auto-generated from a /sdlc:task-work post-mortem. Review and
promote to open/ready before picking up.
.claude/ and .sdlc/ are both gitignored by default with explicit
allowlists (!.claude/hooks/**, !.sdlc/skill-ext/**, etc.)
un-ignoring the shareable bits. When a project adopts a new committed
subtree under either root (today: .sdlc/skill-ext/ for project-local
skill extensions per
T-R4XL-project-local-skill-extension-mechanism), the operator
has to remember to add another !<root>/<subtree>/** line by hand.
Easy to miss; silent failure mode (file shows untracked, doesn’t get
committed). A /sdlc:setup step that scaffolds the un-ignore for any
of the well-known committed subtrees under either root would close
the gap. Cited by T-R4XL-project-local-skill-extension-mechanism.
T-AWEM-sdlc-setup-seeds-hooks-gitignore-unignore (already
shipped, closed/done) covers seeding !.claude/hooks/**
specifically. But the underlying gap — “any new committed
project-local subtree needs its own un-ignore line” — recurred
when .sdlc/skill-ext/ landed. The existing logic only knows
about hooks/ under .claude/.
Originating post-mortem bullet:
.claude/and.sdlc/are both gitignored except for an explicit allowlist. Adding the new.sdlc/skill-ext/tree required editing.gitignoreto add another carve-out, which is easy to miss.
Proposed
Section titled “Proposed”/sdlc:setup carries a list of well-known committed subtrees keyed
by their root (today: .claude/hooks, .claude/skills,
.claude/commands, .claude/agents, .sdlc/skill-ext). When run, it
ensures each is un-ignored in .gitignore. Idempotent — re-running
with everything already un-ignored is a no-op. New subtree adoption
becomes: extend the list in the setup script, re-run /sdlc:setup,
done.
Approach
Section titled “Approach”- Locate the existing un-ignore logic in
/sdlc:setup(likely inplugin/skills/setup/setup_planning.pyor a sibling). - Promote the hard-coded single subtree to a list of
(root, name)pairs covering both.claude/and.sdlc/subtrees the plugin owns. - For each, ensure both
!<root>/<name>/and!<root>/<name>/**lines are present in.gitignore, and ensure the root’s own blanket-ignore line (<root>/*) precedes the un-ignore lines. - Add a test that asserts idempotency.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
plugin/skills/setup/setup_planning.py | modify | extend |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
/sdlc:setuprun against a fresh project produces a.gitignorewith un-ignore lines for every well-known committed subtree under both.claude/and.sdlc/. - AC-2: Re-running
/sdlc:setupagainst a project whose.gitignorealready has all the un-ignore lines is a no-op (no diff to.gitignore). - AC-3: Adopting a new
.sdlc/skill-ext/<slug>/tree in a consuming project doesn’t require manual.gitignoreediting beyond what/sdlc:setupalready does.
Out of scope
Section titled “Out of scope”- Designing a generic plugin-driven manifest of “subtrees this
plugin contributes”. The list is short; hard-coding it inside
setupis fine until the second plugin needs to extend it.
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”Spawned by /sdlc:task-work post-mortem of T-R4XL-project-local-skill-extension-mechanism on 2026-05-21.