Skip to content

T-AQR9-task-work-cutover-stop-mirror-writes

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

Stage 5 of D-S30G-task-state-plane-split — the cutover. From this task on, in-progress is never written to frontmatter and a task’s file changes on main exactly twice after creation: at promotion and at closure.

LocationRole today
apps/sdlc/skills/task-work/start_task.tsCommits status: in-progress + last_reviewed + the ## Post-mortem stub to main, then transitions the lease claimed → working.
apps/sdlc/skills/task-work/append_pr_url.tsCommits the PR URL to prs[] on the SHARED main checkout (the one non-worktree writer), then the lease moves to awaiting-review.
apps/sdlc/lib/model/entities/task/ops/close-commit.tsThe closure commit (status, completion_note, prs append); no post-mortem stub handling.
apps/sdlc/skills/task-work/SKILL.mdSteps 5b/10 narrate the start-commit and PR-record flows.

start_task.ts keeps only the lease transition (claimed → working) and the feature-branch fetch/reset — no main commit. append_pr_url.ts is deleted; the PR is recorded via lease task transition awaiting-review --pr-number only (this also removes the last shared-checkout writer). close-commit appends the ## Post-mortem stub when absent, sharing start_task’s line-anchored H2 detector from a common home. task-work SKILL.md, its prose-contract overlays, and orchestrate’s marker regexes are updated in the same PR. Runs dispatched pre-cutover still write in-progress harmlessly — readers keep the fallback until stage 7.

  1. Strip the commitToMainViaWorktree call + stub append from start_task.ts; keep lease transition and branch reset; adjust its marker output.
  2. Delete append_pr_url.ts and its call site; record the PR number on the lease transition in Step 10.
  3. Move the post-mortem H2 detector to a shared module; append the stub idempotently in close-commit.ts.
  4. Rewrite task-work SKILL.md Steps 5b/10 (and Step 2/8 mentions) plus prose-contract overlays and orchestrate marker regexes.
  5. Land between orchestrator ticks; verify a pre-cutover- dispatched run still closes cleanly.
LocationKindChange
apps/sdlc/skills/task-work/start_task.tsmodifyLease-only start; no main commit.
apps/sdlc/skills/task-work/append_pr_url.tsdeletePR binding lives on the lease.
apps/sdlc/lib/model/entities/task/ops/close-commit.tsmodifyIdempotent post-mortem stub append.
apps/sdlc/skills/task-work/SKILL.mdmodifySteps 5b/10 rewired; markers updated.
apps/sdlc/skills/orchestrate/SKILL.mdmodifyMarker regexes for the new start/PR flow.
  • AC-1: A full task-work run lands zero commits on main between promotion and closure.
  • AC-2: in-progress is never written to any task file by the new flow.
  • AC-3: The PR number is readable from the lease (lease inspect) after Step 10.
  • AC-4: A run started under the old flow (frontmatter in-progress, stub already present) closes cleanly with no duplicate stub.

T-2T0R-probe-state-inflight-lease-aware, T-YQY2-task-next-lease-exclusion, T-S27R-ensure-ready-plane-rework


← Back to Tasks