T-IDW6-task-inflight-project-scans
Status: closed/done · Impact: medium · Complexity: medium
count_inflight_tasks reads task frontmatter, leases, and PRs, and its
only caller (orchestrate) speaks exclusively in “in-flight tasks” — it is
a task op, not a service. find_todos and scan_planning_candidates are
read-only scans of the project. Port all three to their final homes:
task inflight and the depth-3 project scan {todos, candidates} group.
| Location | Role today |
|---|---|
plugin/scripts/count_inflight_tasks.ts | categorizes task/worktree/lease/PR pairs against sdlc.yaml limits; orchestrate parses its output |
plugin/scripts/find_todos.ts | TODO/FIXME/HACK scanner for review-todos |
plugin/scripts/scan_planning_candidates.ts | walks a root for planning-shaped prose; JSON manifest for import-planning |
plugin/lib/model/entities/task/ops/ | no inflight op |
Proposed
Section titled “Proposed”model/entities/task/ops/inflight.ts (sdlc task inflight, on the task
noun per the re-homing decision);
services/project/ops/{scan-todos,scan-candidates}.ts
(sdlc project scan todos|candidates, the one group that earns depth-3).
Output contracts preserved via render hooks where text is consumed.
Approach
Section titled “Approach”- Goldens for all three (inflight summary format, todos table, candidates JSON manifest).
- Port
inflight—gh pr listviactx.gh, worktree helpers viautil/git. - Port
scan-todos, thenscan-candidatesunder theproject scangroup. - CLI-spawned parity tests;
sdlc project scan --helplists both leaves.
Files to touch
Section titled “Files to touch”| Location | Kind | Change |
|---|---|---|
plugin/lib/model/entities/task/ops/inflight.ts | new | task inflight op |
plugin/lib/services/project/ops/scan-todos.ts | new | depth-3 leaf |
plugin/lib/services/project/ops/scan-candidates.ts | new | depth-3 leaf |
plugin/scripts/count_inflight_tasks.ts | modify | thins to forwarder until deletion |
plugin/scripts/find_todos.ts | modify | same |
plugin/scripts/scan_planning_candidates.ts | modify | same |
Acceptance criteria
Section titled “Acceptance criteria”- AC-1:
sdlc task inflightoutput matches the golden orchestrate consumes (per-status buckets). - AC-2:
sdlc project scan todosandsdlc project scan candidatesmatch their goldens; the candidates JSON drives import-planning’s existing eval fixture unchanged. - AC-3:
sdlc project scan --helprenders the group with both leaves;sdlc task --helpshows inflight. - AC-4: full
bun testgreen.
Out of scope
Section titled “Out of scope”- Orchestrate / review-todos / import-planning prose (T-QL5F-skill-prose-codemod).
project setup|doctor|cleanup(T-6FBO-project-plugin-ports, T-NFSM-project-cleanup-port).
Dependencies
Section titled “Dependencies”- T-NV49-op-path-substrate — depth-3 machinery.
- Sequencing: shares
services/project/ops/with T-6FBO-project-plugin-ports and T-NFSM-project-cleanup-port — same-noun ports land sequentially, this one after T-6FBO-project-plugin-ports scaffolds the noun (or first, by agreement at execution time).
Discovery context
Section titled “Discovery context”- Adversarial synthesis:
task inflightre-homing fixed the consensus “worst guess” of the original flat surface (inflight count); docs/plans/op-substrate-full-sweep.md §1a.