Skip to content

T-5LP4-retire-stamp-and-start-commits

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

D-S30G migration step 3, first half: the two highest-traffic execution-state commits on main — the ensure-ready pass stamp and the task-work start commit — stop being written. The lease becomes the only record of in-flight state: the pass memo lands on the lease payload (home added by T-HTN8), lease acquisition IS the start, and resume detection reads the lease phase instead of main-HEAD stamp heuristics. The fail-downshift path (semantic: the spec needs work) is untouched.

LocationRole today
apps/sdlc/skills/task-ensure-ready/ensure_ready_mutate.ts#passEditsPass mutation: drops definition_gap, sets readiness_verified_at
apps/sdlc/skills/task-ensure-ready/ensure_ready_mutate.ts#mainThe --commit-on main branch commits the pass stamp to origin/main via commitToMainViaWorktree
apps/sdlc/skills/task-ensure-ready/SKILL.mdDocuments the stamp, the --commit/--commit-on pass shapes, and the two-line ENSURE-READY-OK: + readiness_verified_at: marker block
apps/sdlc/skills/task-work/start_task.ts#startTaskCommits status: in-progress (+ last_reviewed, ## Post-mortem stub) to origin/main via commitToMainViaWorktree, then CAS-transitions the lease claimed→working via transitionLease and resets the task branch onto origin/main
apps/sdlc/skills/task-work/SKILL.mdSteps 5a/5b document the stamp-then-start commit pair; Step 2’s resume detection keys on the main-HEAD verify-stamp subject
apps/sdlc/lib/model/entities/task/ops/probe-state.tsresume_candidate is a six-way AND including readiness_verified_at non-null and main_head_is_verify_stamp (literal subject from verifyStampSubject)
apps/sdlc/lib/model/entities/task/ops/_probe_core.ts#mainHeadSubjectReads main’s HEAD subject for the stamp comparison
apps/sdlc/lib/model/entities/task/ops/close-commit.tsTerminal close commit; already clears readiness_verified_at; no Post-mortem stub handling

Ensure-ready’s pass verdict is a marker plus a lease memo — no frontmatter write, no commit (when a definition_gap is present from a prior fail, pass still clears it; that is a semantic edit and keeps its commit). Task-work’s start is the lease transition plus branch reset — no main commit; the ## Post-mortem stub appends at close time instead. Resume detection reads the lease: worktree + branch exist, lease phase claimed or working, no open PR.

  1. ensure_ready_mutate.ts: in pass mode, stop setting readiness_verified_at (passEdits shrinks to the definition_gap removal). When the frontmatter has no definition_gap, the pass path performs no file mutation and no commit at all — marker only. The --commit-on main pass branch writes the memo instead: invoke sdlc lease task transition with --readiness-verified-at (and --touchpoints-verified-at when the touchpoint slice resolved clean), preserving the current phase. Fail mode is untouched.
  2. task-ensure-ready/SKILL.md: pass flow re-documented — marker block becomes ENSURE-READY-OK: <basename> plus the memo destination; drop the stamp line; Step 3b’s frontmatter-only precondition notes it now applies only to the residual definition_gap-clearing commit.
  3. start_task.ts: remove the commitToMainViaWorktree start-commit block and its planStartMutation/startCommitDue machinery; keep the lease claimed→working transition, the branch verification + reset, and the STARTED: marker. The status stays open/ready in frontmatter for the task’s whole in-flight life.
  4. close-commit.ts: append the ## Post-mortem stub during the close mutation when the body lacks that section (the stub start_task used to plant), so the close-out post-mortem flow keeps its anchor.
  5. probe-state.ts / _probe_core.ts: add a nullable lease_phase field (read via the lease library against the configured authority; null when unavailable). Recompute resume_candidate as: task_status === "open/ready" AND worktree_exists AND branch_exists AND lease_phase in {claimed, working} AND open_pr_number === null. Remove main_head_is_verify_stamp and the readiness_verified_at conjunct from the gate; keep both fields in the output for one transition period, marked legacy in their descriptions.
  6. task-work/SKILL.md: Step 5 collapses to a single 5 (gate + lease transition, no stamp/start commits); Step 2’s resume-detection prose replaces the stamp heuristics (including the pre-2026-05-28 legacy branch-stamp fallback) with the lease-phase rule.
LocationKindChange
apps/sdlc/skills/task-ensure-ready/ensure_ready_mutate.tsmodifyPass mode: no stamp, no-op without definition_gap; --commit-on main pass writes lease memo via transition op
apps/sdlc/skills/task-ensure-ready/SKILL.mdmodifyPass-flow and marker-block re-documentation
apps/sdlc/skills/task-work/start_task.tsmodifyDrop the start-commit block; keep lease transition, branch reset, STARTED: marker
apps/sdlc/skills/task-work/SKILL.mdmodifySteps 2/5 rewritten: lease-phase resume rule, no stamp/start commits
apps/sdlc/lib/model/entities/task/ops/probe-state.tsmodifylease_phase field; resume_candidate recomputed from lease phase
apps/sdlc/lib/model/entities/task/ops/_probe_core.tsmodifyLease-phase reader helper; mainHeadSubject demoted to legacy output support
apps/sdlc/lib/model/entities/task/ops/close-commit.tsmodifyAppend ## Post-mortem stub when absent during close mutation
  • AC-1: ensure-ready pass on a clean task (no definition_gap) makes no commit and leaves the file byte-identical; the marker still emits.
  • AC-2: ensure-ready pass via the task-work path records readiness_verified_at on the lease payload (observable via lease inspect) and writes nothing to the task file.
  • AC-3: after start_task.ts runs, origin/main has no new commit for the task and its frontmatter status is still open/ready, while the lease phase is working.
  • AC-4: sdlc task probe-state output carries lease_phase, and resume_candidate is true for the stalled shape (worktree + branch + lease claimed/working + no PR) without any verify-stamp commit on main.
  • AC-5: a close via sdlc task close-commit on a body lacking ## Post-mortem lands the stub in the terminal commit.
  • AC-6: the fail-downshift path still commits planning/needs-definition + definition_gap exactly as before.
  • The prs[] mid-flight append retirement (T-IVEJ).
  • Schema removal of readiness_verified_at / touchpoints_verified_at / in-progress values (D-S30G step 5 — after this soaks).
  • Reader migration beyond probe-state (dashboard and orchestrate already read the lease authority).
  • T-HTN8 — the lease memo fields must exist first (frontmatter depends_on carries this).
  • D-S30G should be flipped to open/accepted before this lands (its migration step 1); it merged as open/proposed.

T-HTN8


← Back to Tasks