Skip to content

T-CWLT-files-to-touch-gitignore-resolution-lint

Status: closed/superseded · Impact: low · Complexity: small

Auto-generated from a /sdlc:task-work post-mortem. Review and promote to open/ready before picking up.

A task that lists a path under ## Files to touch which is silently gitignored never makes that file part of the PR — git add does nothing, git status shows it untracked, and the implementer only notices when grep-checking after the commit. A pre-implementation lint would catch this in seconds. Surfaced by post-mortem of T-E69Y-skill-md-runtime-drift-audit where .claude/scripts/audit_skill_runtime.py was ignored by the default .claude/* rule until an explicit un-ignore was added.

/sdlc:task-ensure-ready (the readiness gate) checks that referenced files exist (or are listed as new), but it does not check that any listed path would actually be tracked by git if created. The default .gitignore ignores broad swaths of common new-file locations (.claude/, dist/, target/, etc.); a Files to touch entry under those paths is a latent bug in the task spec.

Extend the readiness contract to run, for each path under ## Files to touch, a git check-ignore <path> against the project root. If the path is ignored AND not already covered by an explicit un-ignore rule, flag it as a definition gap. The lint stops at reporting; auto-fixing the .gitignore is out of scope (un-ignore decisions are context-dependent).

  1. Inside /sdlc:task-ensure-ready (or its ensure_ready_mutate.py helper), parse ## Files to touch bullets into path strings.
  2. For each path, invoke git check-ignore --no-index <path> in the project root. Capture the result: a non-zero exit means the path is NOT ignored (good); zero exit means the path is ignored (gap).
  3. Roll ignored paths into the existing definition_gap flow so the user is forced to either un-ignore the path or remove it from Files to touch before the readiness gate passes.
LocationKindChange
plugin/skills/task-ensure-ready/SKILL.mdnewdocument the new
plugin/entities/task/implementation-ready.mdmodifyadd the
plugin/skills/task-ensure-ready/ensure_ready_mutate.pymodify*(if the
plugin/skills/task-ensure-ready/tests/modifyfixture covering both
  • AC-1: A task whose ## Files to touch lists a path matched by the project’s .gitignore (without an un-ignore rule) is classified NEEDS-DEFINITION by /sdlc:task-ensure-ready, with the definition_gap: naming the ignored path.
  • AC-2: A task whose ## Files to touch lists a path covered by a !-un-ignore rule (e.g. !.claude/scripts/**) passes the lint without complaint.
  • Auto-editing .gitignore to add un-ignore rules — that’s a judgment call left to the implementer.
  • Validating paths against more than the project root’s .gitignore (no traversal into submodule ignores, no global exclude files).
  • none

Spawned by /sdlc:task-work post-mortem of T-E69Y-skill-md-runtime-drift-audit on 2026-05-21.


← Back to Tasks