Skip to content

T-PSR1-reference-sweep-greps-unfiltered

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

AUTO-DEFINED: this spec was best-effort machine-authored by /sdlc:task-auto-define on 2026-06-03 because the task is autonomy: autonomous/pr. Review the Goal, Approach, Today, Files-to-touch, and Acceptance-criteria carefully before trusting it.

The plugin’s task-definition guidance lets the pickup-time reference sweep that populates a task’s ## Files to touch / delete rows use extension-filtered grep, which can miss live citations in unexpected file types. The guidance (plugin/lib/model/entities/task/definition.md, implementation-ready.md, and the task-define family of skills) should mandate an unfiltered grep when enumerating references for delete rows, so no citation is silently dropped.

The pickup-time reference sweep that populates a task’s Files-to-touch / delete rows used extension-filtered grep (--include='*.md' --include='*.ts') and missed a live citation in a .json string field (plugin/lib/model/entities/task/schema.json#priority). The task-definition guidance (plugin/lib/model/entities/task/definition.md

  • implementation-ready.md, and the task-define skills) should mandate an unfiltered grep when enumerating references for delete rows, so no citation in an unexpected file type is missed.

— originating task T-XD7M-retire-task-sort-stub

LocationRole today
plugin/lib/model/entities/task/implementation-ready.mdUnder Required body sections, the Files-to-touch bullet (the delete-row paragraph) tells the author to “enumerate every file that references the removed path” but does NOT say how to find them. With no grep methodology mandated, an extension-filtered sweep is permitted — exactly the gap this task closes.
plugin/skills/task-define/SKILL.mdStep 4’s (“Resolve gaps one at a time”) Today/Files-to-touch drafting guidance covers table shape and the five-form Location grammar, but says nothing about how to enumerate references for a delete row.
plugin/skills/task-auto-define/SKILL.mdStep 4’s (“Synthesize gap fills”) codebase-context guidance says to cite confirmed paths for delete rows but, like its interactive sibling, never mandates an unfiltered sweep when hunting references.
plugin/lib/model/entities/task/schema.json#priorityConcrete incident: a live citation in a .json string field (the priority property description references docs/planning/decisions/D-Q2WR-task-pickup-order.md). An --include='*.md' --include='*.ts' sweep would never see this file, so a doc-delete touchpoint set built that way would drop the row.

The canonical reference-enumeration paragraph in implementation-ready.md gains an explicit unfiltered grep mandate: when enumerating files that reference a path being deleted, the sweep MUST NOT use extension filters (--include/--exclude/glob-scoped grep), because citations live in unexpected file types (.json string fields, .yaml, lockfiles, CI configs). The task-define and task-auto-define skills gain a matching one-line reminder at the point where they draft delete-row touchpoints, pointing back to the contract so the mandate is discoverable at the moment a sweep is run.

  1. In plugin/lib/model/entities/task/implementation-ready.md, strengthen the existing delete-row enumeration sentence under Required body sections (the “also enumerate every file that references the removed path” paragraph). Append an explicit mandate: the enumerating grep MUST be unfiltered — no --include/--exclude extension filters and no glob-scoped path restriction — because reference citations occur in unexpected file types. Name the failure mode concretely (a .json string-field citation missed by an --include='*.md' --include='*.ts' sweep) so the rationale survives.
  2. In plugin/skills/task-define/SKILL.md, Step 4 (“Resolve gaps one at a time”), within the ## Files to touch drafting bullet, add a one-line reminder: when a row is delete, run an unfiltered grep for the removed path to enumerate referencing modify rows, per the implementation-ready contract.
  3. In plugin/skills/task-auto-define/SKILL.md, Step 4 (“Synthesize gap fills”), within the ## Today / ## Files to touch codebase-context bullet, add the same one-line unfiltered-grep reminder for delete rows, pointing back to the contract.
  4. Keep the three edits consistent in wording so the mandate reads as one rule expressed once (in the contract) and referenced twice (in the skills) — no divergent restatements.
LocationKindChange
plugin/lib/model/entities/task/implementation-ready.mdmodifyUnder Required body sections: strengthen the delete-row enumeration paragraph with an explicit unfiltered-grep mandate and the concrete .json-citation failure mode.
plugin/skills/task-define/SKILL.mdmodifyIn Step 4 (“Resolve gaps one at a time”): add a one-line unfiltered-grep reminder for delete-row reference enumeration, pointing at the contract.
plugin/skills/task-auto-define/SKILL.mdmodifyIn Step 4 (“Synthesize gap fills”): add the matching one-line unfiltered-grep reminder for delete-row reference enumeration.
  • AC-1: implementation-ready.md states, in the delete-row enumeration paragraph, that the reference-enumerating grep must be unfiltered — i.e. it explicitly forbids --include/--exclude extension filters (or glob-scoped path restriction) when sweeping for references to a deleted path.
  • AC-2: That same paragraph names the concrete failure mode: a citation in an unexpected file type (e.g. a .json string field) being missed by an extension-filtered sweep.
  • AC-3: plugin/skills/task-define/SKILL.md contains a reminder, at its Files-to-touch drafting guidance, to run an unfiltered grep when enumerating references for a delete row.
  • AC-4: plugin/skills/task-auto-define/SKILL.md contains the matching unfiltered-grep reminder at its delete-row drafting guidance.
  • AC-5: The skill reminders point back to the implementation-ready.md contract rather than restating the full rule, so the mandate has a single canonical home.
  • AC-6: bun run plugin/validators/validate_frontmatter.ts docs/planning/tasks/T-PSR1-reference-sweep-greps-unfiltered.md exits 0.
  • Building any automated tool or validator that runs the unfiltered sweep. This task mandates the methodology in prose; it does not add a script or a CI check that enforces it.
  • Backfilling or re-sweeping already-defined tasks. The mandate applies to future delete-row enumeration, not a retroactive audit of existing Files-to-touch tables.
  • Changing the five-form Location grammar or the Files-to-touch table shape — only the enumeration methodology for delete rows changes.
  • none

Spawned by /sdlc:spawn-task-pr on 2026-06-03 UTC from T-XD7M-retire-task-sort-stub in git@github.com:sksizer/dev.git.


← Back to Tasks