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.jsonstring 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
| Location | Role today |
|---|---|
plugin/lib/model/entities/task/implementation-ready.md | Under 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.md | Step 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.md | Step 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#priority | Concrete 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. |
Proposed
Section titled “Proposed”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.
Approach
Section titled “Approach”- In
plugin/lib/model/entities/task/implementation-ready.md, strengthen the existingdelete-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/--excludeextension filters and no glob-scoped path restriction — because reference citations occur in unexpected file types. Name the failure mode concretely (a.jsonstring-field citation missed by an--include='*.md' --include='*.ts'sweep) so the rationale survives. - In
plugin/skills/task-define/SKILL.md, Step 4 (“Resolve gaps one at a time”), within the## Files to touchdrafting bullet, add a one-line reminder: when a row isdelete, run an unfiltered grep for the removed path to enumerate referencingmodifyrows, per the implementation-ready contract. - In
plugin/skills/task-auto-define/SKILL.md, Step 4 (“Synthesize gap fills”), within the## Today/## Files to touchcodebase-context bullet, add the same one-line unfiltered-grep reminder fordeleterows, pointing back to the contract. - 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.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
plugin/lib/model/entities/task/implementation-ready.md | modify | Under 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.md | modify | In 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.md | modify | In Step 4 (“Synthesize gap fills”): add the matching one-line unfiltered-grep reminder for delete-row reference enumeration. |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
implementation-ready.mdstates, in thedelete-row enumeration paragraph, that the reference-enumerating grep must be unfiltered — i.e. it explicitly forbids--include/--excludeextension 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
.jsonstring field) being missed by an extension-filtered sweep. - AC-3:
plugin/skills/task-define/SKILL.mdcontains a reminder, at its Files-to-touch drafting guidance, to run an unfiltered grep when enumerating references for adeleterow. - AC-4:
plugin/skills/task-auto-define/SKILL.mdcontains the matching unfiltered-grep reminder at itsdelete-row drafting guidance. - AC-5: The skill reminders point back to the
implementation-ready.mdcontract 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.mdexits 0.
Out of scope
Section titled “Out of scope”- 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
deleterows changes.
Dependencies
Section titled “Dependencies”- none
Discovery context
Section titled “Discovery context”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.