Skip to content

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 .gitignore to add another carve-out, which is easy to miss.

/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.

  1. Locate the existing un-ignore logic in /sdlc:setup (likely in plugin/skills/setup/setup_planning.py or a sibling).
  2. Promote the hard-coded single subtree to a list of (root, name) pairs covering both .claude/ and .sdlc/ subtrees the plugin owns.
  3. 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.
  4. Add a test that asserts idempotency.
LocationKindChange
plugin/skills/setup/setup_planning.pymodifyextend
  • AC-1: /sdlc:setup run against a fresh project produces a .gitignore with un-ignore lines for every well-known committed subtree under both .claude/ and .sdlc/.
  • AC-2: Re-running /sdlc:setup against a project whose .gitignore already 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 .gitignore editing beyond what /sdlc:setup already does.
  • Designing a generic plugin-driven manifest of “subtrees this plugin contributes”. The list is short; hard-coding it inside setup is fine until the second plugin needs to extend it.
  • none

Spawned by /sdlc:task-work post-mortem of T-R4XL-project-local-skill-extension-mechanism on 2026-05-21.


← Back to Tasks