Skip to content

T-NFSM-project-cleanup-port

Status: closed/done · Impact: medium · Complexity: large

project_cleanup.ts (1625 lines, the largest composite) gathers and classifies branches, worktrees, remote branches, and task linkage — read-only — and the skill executes actions only after sub-agent investigation and human approval. Port it as ONE op, sdlc project cleanup: the granularity rule cuts only at the LLM-judgment seam, which already lives in the skill.

LocationRole today
plugin/scripts/project_cleanup.tsgather → classify → emit markdown/JSON report; zero mutations
plugin/skills/project-cleanup/SKILL.mdconsumes the report; dispatches investigation; executes after approval

services/project/ops/cleanup.ts — a flat verb on the project noun (one op, no singleton subgroup), report output locked by golden, read-only property proven. The skill flow is unchanged until T-QL5F-skill-prose-codemod repoints its invocation line.

  1. Golden-snapshot the report (markdown + JSON modes) against a fixture repo state with known branch/worktree/task conditions.
  2. Port as a single composite op; worktree/git helpers via util/git.
  3. Render hook for the markdown mode; --json canonical.
  4. Read-only proof: run against a dirty fixture, assert zero filesystem/git mutations.
LocationKindChange
plugin/lib/services/project/ops/cleanup.tsnewthe composite op
plugin/scripts/project_cleanup.tsmodifythins to forwarder until deletion
plugin/lib/services/project/modifytests for report parity + read-only proof
  • AC-1: report golden parity (markdown and JSON) on the fixture repo state.
  • AC-2: a test proves zero mutations: repo state hash identical before/after the op on a dirty fixture.
  • AC-3: sdlc project cleanup visible in sdlc project --help; dispatches via the registry.
  • AC-4: full bun test green.
  • Executing cleanup actions (stays in the skill, after human approval).
  • Skill prose (T-QL5F-skill-prose-codemod).
  • Changing classification heuristics.
  • D-0007 §4 granularity rule — “coarse, deterministic composites are legitimate”; docs/plans/op-substrate-full-sweep.md T10.

T-NV49-op-path-substrate


← Back to Tasks