Close-Out Triage

Honest agents often tell you exactly what they left undone in the final paragraph of a completion message: "Merged and passing — note that the flag is still off in production and refunds aren't covered yet." Then the job closes, the status board turns green, and a week later the missing step bites you because nobody owned it.

Close-Out Triage turns every unfinished caveat into a first-class Leftover item that must be explicitly classified before a job is allowed to close: required (keeps the job open until fixed), deferred (spawns an assigned follow-up job), optional (recorded nice-to-have that nobody owes), or dropped (permitted only by the requester or a standing policy). Reach for it whenever jobs can end partly finished and missing loose ends hurt the requester later.

Group Verification and completion
Also known as Follow-up issues, Punch list
Core rule Never close a job until every leftover has an outcome and no required item stays open
Defines records Leftover item

Why honest caveats in prose change nothing

Real work — across engineering, research reports, migrations, and operations — almost always finishes with edges: a feature flag still off, a regional data pull still missing, a legacy format left untouched, or an extra cleanup idea noticed along the way. When a worker mentions those caveats honestly in a closing summary, everyone feels informed, the job is marked closed, and the ticket disappears from view.

The failure isn't dishonesty — it's that a sentence in a message starts no work. Once a job closes, no assignee owns turning on the production switch, no follow-up job tracks the deferred edge case, and nobody recorded whether narrowing the scope was even authorized.

Close-Out Triage prevents silent loose ends with three structural rules enforced by the hub:

  1. Explicit leftover declaration is mandatory. A worker's final report must declare what was added, left_out, weakened, or put_off as structured records — or explicitly state an empty list so silence is never mistaken for a clean finish.
  2. Every leftover receives one of four binding outcomes. The lead agent sorts each item into required, deferred, optional, or dropped — with drops allowed only by the requester or under an explicit standing policy.
  3. The Hub's close check guards every closure path. No job may close while leftovers are undeclared, any item remains unsorted, or any required item lacks a confirmation timestamp.

Why require an explicit list even when nothing was left undone? Because storing leftovers_listed_at on the job separates a worker who checked and confirmed zero leftovers from a job that tried to close without ever asking what remained.

Caveats buried in prose Worker writes honest report "Done — still switched off in prod" Job closes without triage Caveat stays trapped in chat history Status board reads Finished Nobody owns the unfinished step Missed work breaks live users A sentence in chat starts no work Close-Out Triage Final report lists leftovers Structured items; Lead sorts each one required Keeps job open deferred Creates new job optional Recorded, unowed dropped Policy or Requester Hub closes job only when settled Zero unsorted or open required items
Unstructured caveats disappear the instant a job closes. Close-Out Triage forces every leftover into an explicit outcome and blocks closure until required items are resolved.

Architecture and participants

Close-Out Triage inserts one computed Close check into the hub's job closure transition. Workers and checkers record structured Leftover item rows, the lead agent sorts each item against the requester's goal, and the hub enforces drop policies, atomically creates assigned follow-up jobs for deferred items, and freezes all leftover records once the job closes.

Worker & Checker List leftover items Lead agent Triages & asks close Requester Drop policies & rulings Hub — durable leftovers, drop policies & computed close check Job leftovers_listed_at Leftover item kind · outcome · resolved Policy Permitted drop scope Computed Close check (enforced on every close path) leftovers listed · every item sorted · zero open required items Closed job (items frozen) Only after Close check returns ok Follow-up job (assigned) Created atomically for deferred items
The hub computes the close check from the job's leftovers_listed_at timestamp and all attached Leftover item rows. Deferred items spawn assigned follow-up jobs atomically; dropped items verify requester or policy authority.
Worker
Declares every gap, shortcut, addition, or postponed piece as a separate Leftover item (or explicitly records an empty list) when reporting finished, and resolves any item sorted as required.
Checker
Adds a Leftover item whenever independent inspection surfaces an unstated gap or weakened requirement that the worker omitted.
Lead agent
Judges each item against the request spec, assigns one of the four outcomes, names an assignee for each deferred follow-up job, and asks the hub to close the job once all required work is resolved.
Requester
Authors standing Policy rules specifying what the lead agent may drop, decides uncovered drops when asked, and reviews triaged outcomes at their next check-in.
Hub
Stores items, verifies drop authority, creates follow-up jobs atomically on deferred, refuses closure whenever the close check fails, and freezes items once closed.

Execution flow

Toggle between the normal path — where four declared leftovers are cleanly sorted across all four outcomes without interrupting the requester — and the refusal path — where the hub blocks an early close and rejects an unauthorized drop until the requester weighs in.

Requester Hub Lead agent Worker A Worker B 1. Final report + 4 leftover items 2. Store items; ask Lead to triage 3. Sort item 1 as required 4. Keep job open; return item 1 5. Defer item 2 -> Worker B 6. Create & assign follow-up job 7. Item 3 optional; drop 4 (policy) 8. Finish item 1 -> resolved_at set 9. Request close -> Close check passes 10. Next check-in shows all 4 outcomes

Item 1 (required) keeps the job open until Worker A finishes it; item 2 (deferred) creates a real job for Worker B; item 3 (optional) is logged unowed; item 4 (dropped) cites a standing policy. The requester is never interrupted.

Concrete examples

Close-Out Triage applies to any multi-step deliverable — board decks, compliance filings, data migrations, or software changes — where partial finishes and side discoveries are part of normal execution.

Example 1 — Quarterly board report preparation

No code or unit tests
Leftover report
Worker A finishes the Q3 board deck and declares four structured leftover items: (1) Churn slide still contains placeholder numbers (left_out); (2) European regional breakdown needs a separate finance export (put_off); (3) A custom cover graphic would improve polish (put_off); (4) Legacy product-line appendix was omitted (left_out).
Triage outcomes
(1) required — keeps the board-deck job open until real churn metrics land; (2) deferred — spawns an assigned follow-up job for the finance analyst agent; (3) optional — logged without blocking delivery; (4) dropped — authorized under the requester's standing policy retiring legacy product reporting.
Result
The deck cannot accidentally ship with placeholder numbers, the regional pull gets a named owner, and the requester never has to chase a footnote in a chat log.

Example 2 — Payment webhook duplicate check

Payments & rollout
Leftover report
Worker A merges the duplicate-webhook guard and lists four leftovers: (1) Still switched off in production (left_out); (2) Refunds not covered yet (put_off); (3) A chart of caught duplicates would help (put_off); (4) Version 1 webhook handler untouched (left_out).
Triage outcomes
(1) required — request asks to protect real customers, so job stays open until Worker A enables the flag in production; (2) deferred — hub creates a follow-up job assigned to Worker B; (3) optional — recorded, nobody owes it; (4) dropped — permitted under the requester's standing policy shutting off version 1 webhooks in December.
Result
The hub blocks closure with required_items_open until the production switch is enabled and confirmed, preventing duplicate charges the following week.

What this pattern is NOT — Atomic single-step lookups

Negative example
Scenario
Running a single quick lookup ("What is our current webhook timeout setting?") or recording caveats in a tracker that never enforces job closure.
Why skip it
An atomic lookup is either completely answered or not — its leftover list is always empty. And if nothing enforces the close check in code, a leftover table just becomes the closing paragraph under another name.

When to use and when to skip

Use Close-Out Triage when

  • Workers report their own completion and someone other than the closer suffers if a caveat gets forgotten.
  • Jobs routinely finish with scoped deferrals, feature switches, edge-case exclusions, or newly discovered follow-ups.
  • The hub owns the job record and can refuse closure in code until the close check passes.
  • You want clear authority boundaries so agents cannot silently narrow what the requester asked for.

Skip it when

  • The task is atomic and binary (either wholly done or not done), leaving nothing meaningful to triage.
  • The coordination layer cannot intercept job closure, making the leftover list purely advisory.
  • Every discovered follow-up automatically becomes a blocking job without optional or dropped outlets — flooding the backlog with noise.
  • Workers are penalized for reporting leftovers, incentivizing them to hide unfinished work instead.

Data model and hub invariants

Close-Out Triage defines one table — leftover_items — referencing jobs (whose leftovers_listed_at field comes from Durable Job), parties, and policies. The close check itself is computed on every close attempt and never stored as a separate flag.

Party PK id Leftover item PK id FK job_id FK reported_by_id kind text reported_at outcome? FK decided_by_id? decided_at? FK policy_id? reason? FK follow_up_job_id? resolved_at? Job (closing) PK id leftovers_listed? Policy PK id Job (follow-up) PK id 1 n 1? n 1 n 1? n 1? 1?
Each Leftover item belongs to one closing Job and is reported by one Party. Sorting fills decision fields together, linking a Policy on agent drops or an assigned follow-up Job on deferrals.

Table: leftover_items

Column Postgres type Nullability Notes
id uuid NOT NULL, PK Unique leftover item identifier.
job_id uuid NOT NULL, FK References jobs(id); permanent for the item's whole life.
reported_by_id uuid NOT NULL, FK References parties(id); usually the worker, checker, or hub.
kind text NOT NULL CHECK (kind IN ('added', 'left_out', 'weakened', 'put_off')).
text text NOT NULL One concrete sentence stating what is still owed.
reported_at timestamptz NOT NULL Defaults to now().
outcome text NULLABLE CHECK (outcome IN ('required', 'deferred', 'optional', 'dropped')); NULL until triaged.
decided_by_id uuid NULLABLE, FK References parties(id); set together with outcome.
decided_at timestamptz NULLABLE Timestamp when triaged; set together with outcome.
policy_id uuid NULLABLE, FK References policies(id); set only when an agent drops under standing policy.
reason text NULLABLE Rationale sentence; mandatory non-blank when outcome = 'dropped'.
follow_up_job_id uuid NULLABLE, FK References jobs(id); required & created atomically when outcome = 'deferred'.
resolved_at timestamptz NULLABLE Confirmation timestamp for required items; NULL for all other outcomes.

Six hub invariants

  1. 01
    Decision fields are filled or empty together Database constraint

    A CHECK constraint enforces (outcome IS NULL) = (decided_by_id IS NULL) AND (outcome IS NULL) = (decided_at IS NULL), preventing partially triaged rows.

  2. 02
    Outcome-specific links and drop reasons are schema-bound Database constraint

    CHECK constraints require (outcome = 'deferred') = (follow_up_job_id IS NOT NULL), resolved_at IS NULL OR outcome = 'required', policy_id IS NULL OR outcome = 'dropped', and a non-blank reason whenever outcome = 'dropped'.

  3. 03
    Deferred items spawn an assigned follow-up job atomically Hub guard

    triage_item with outcome = "deferred" rejects with follow_up_job_required unless an assigned follow_up_job_id is created and linked in the same transaction.

  4. 04
    Drops require a reason and requester or policy authority Hub guard

    triage_item with outcome = "dropped" fails with drop_reason_required on blank reasons and no_policy_allows_drop when an agent tries to drop an item without a covering policy_id.

  5. 05
    Resolved items and closed jobs are frozen Hub guard

    triage_item rejects edits to already-resolved items with item_already_resolved, and every mutating call rejects closed jobs with job_already_closed.

  6. 06
    Every close path passes through the close check Hub guard

    close_job blocks closure with leftovers_not_listed when leftovers_listed_at is NULL, unsorted_items when any item has outcome == null, and required_items_open while any required item lacks resolved_at.

Reference implementation

The same minimal hub guards in Lean, TypeScript, Python, and Elixir. Put the close check inside the single transition function that closes a job so direct closes, merge-triggered closes, and automated checks all obey the exact same gate.

-- Hub guards for Close-Out Triage (every close path runs the close check)
import Std.Data.HashMap
open Std

inductive LeftoverKind where
  | added | leftOut | weakened | putOff
  deriving Repr, BEq, DecidableEq

inductive Outcome where
  | required | deferred | optional | dropped
  deriving Repr, BEq, DecidableEq

inductive HubError where
  | unknownJob | unknownItem | jobAlreadyClosed | itemAlreadyResolved
  | dropReasonRequired | noPolicyAllowsDrop | followUpJobRequired
  | itemNotRequired | leftoversNotListed | unsortedItems | requiredItemsOpen
  deriving Repr, BEq

-- Timestamps are ISO 8601 strings, passed in by the caller.
structure LeftoverItem where
  id : String
  jobId : String
  reportedById : String
  kind : LeftoverKind
  text : String
  outcome : Option Outcome := none
  decidedById : Option String := none
  decidedAt : Option String := none
  policyId : Option String := none
  reason : Option String := none
  followUpJobId : Option String := none
  resolvedAt : Option String := none
  deriving Repr

structure TriageDecision where
  decidedById : String
  decidedAt : String
  policyId : Option String := none
  reason : Option String := none
  followUpJobId : Option String := none
  deriving Repr

structure Job where
  id : String
  requesterId : String
  leftoversListedAt : Option String := none
  closed : Bool := false
  deriving Repr

structure CloseOutHub where
  jobs : HashMap String Job := {}
  items : HashMap String LeftoverItem := {}

namespace CloseOutHub

-- `m[k]?` gives an Option; `.elim (throw e) pure` turns a missing entry into an error.
def mustGetJob (hub : CloseOutHub) (jobId : String) : Except HubError Job :=
  hub.jobs[jobId]? |>.elim (throw .unknownJob) pure

def mustGetItem (hub : CloseOutHub) (itemId : String) : Except HubError LeftoverItem :=
  hub.items[itemId]? |>.elim (throw .unknownItem) pure

def submitLeftovers (hub : CloseOutHub) (jobId : String) (newItems : List LeftoverItem)
    (listedAt : String) : Except HubError CloseOutHub := do
  let job ← hub.mustGetJob jobId
  if job.closed then throw .jobAlreadyClosed
  let items := newItems.foldl (fun acc item => acc.insert item.id item) hub.items
  let jobs := hub.jobs.insert jobId { job with leftoversListedAt := some listedAt }
  return { jobs, items }

def validateOutcome (job : Job) (outcome : Outcome) (d : TriageDecision) :
    Except HubError Unit := do
  match outcome with
  | .dropped =>
    if d.reason.all (·.all Char.isWhitespace) then throw .dropReasonRequired
    if d.decidedById != job.requesterId && d.policyId.isNone then throw .noPolicyAllowsDrop
  | .deferred =>
    if d.followUpJobId.isNone then throw .followUpJobRequired
  | .required | .optional => pure ()

def triageItem (hub : CloseOutHub) (itemId : String) (outcome : Outcome)
    (decision : TriageDecision) : Except HubError (LeftoverItem × CloseOutHub) := do
  let item ← hub.mustGetItem itemId
  let job ← hub.mustGetJob item.jobId
  if job.closed then throw .jobAlreadyClosed
  if item.resolvedAt.isSome then throw .itemAlreadyResolved
  validateOutcome job outcome decision
  let updated := { item with
    outcome := some outcome,
    decidedById := some decision.decidedById,
    decidedAt := some decision.decidedAt,
    policyId := if outcome == .dropped then decision.policyId else none,
    reason := decision.reason,
    followUpJobId := if outcome == .deferred then decision.followUpJobId else none }
  return (updated, { hub with items := hub.items.insert itemId updated })

def resolveRequiredItem (hub : CloseOutHub) (itemId : String) (resolvedAt : String) :
    Except HubError (LeftoverItem × CloseOutHub) := do
  let item ← hub.mustGetItem itemId
  let job ← hub.mustGetJob item.jobId
  if job.closed then throw .jobAlreadyClosed
  unless item.outcome == some .required do throw .itemNotRequired
  let resolved := { item with resolvedAt := some resolvedAt }
  return (resolved, { hub with items := hub.items.insert itemId resolved })

def closeJob (hub : CloseOutHub) (jobId : String) : Except HubError (Job × CloseOutHub) := do
  let job ← hub.mustGetJob jobId
  if job.closed then throw .jobAlreadyClosed
  if job.leftoversListedAt.isNone then throw .leftoversNotListed
  let jobItems := hub.items.values.filter (·.jobId == jobId)
  if jobItems.any (·.outcome.isNone) then throw .unsortedItems
  if jobItems.any (fun i => i.outcome == some .required && i.resolvedAt.isNone) then
    throw .requiredItemsOpen
  let closed := { job with closed := true }
  return (closed, { hub with jobs := hub.jobs.insert jobId closed })

end CloseOutHub

-- Once closed, a job can never be closed again (so close-out runs exactly once).
theorem closed_job_cannot_close_again (hub : CloseOutHub) (jobId : String) (job : Job)
    (h : hub.jobs[jobId]? = some job) (hc : job.closed = true) :
    hub.closeJob jobId = .error .jobAlreadyClosed := by
  simp [CloseOutHub.closeJob, CloseOutHub.mustGetJob, h, hc]; rfl

Triage and close-check trace

Walking Example 2 (webhook duplicate check) through these guards shows the hub rejecting premature closure, blocking an unauthorized drop, and keeping the job open until the production switch is resolved:

Execution trace: Example 2 (webhook duplicate check close-out)
1. hub.submitLeftovers(job_dedupe, [item_prod_switch, item_refunds, item_chart, item_v1], "2026-11-04T16:00Z")
   hub.closeJob(job_dedupe)
   -> error: unsorted_items (all 4 items still have outcome = null)

2. hub.triageItem(item_v1, "dropped", { decidedById: lead_1, reason: "v1 retires in Dec" })
   -> error: no_policy_allows_drop (Lead agent is not Requester and named no policy)

3. hub.triageItem(item_prod_switch, "required", { decidedById: lead_1 })
   hub.triageItem(item_refunds, "deferred", { decidedById: lead_1, followUpJobId: job_refunds_worker_b })
   hub.triageItem(item_chart, "optional", { decidedById: lead_1 })
   hub.triageItem(item_v1, "dropped", { decidedById: lead_1, policyId: policy_v1_sunset, reason: "v1 retires in Dec" })
   -> ok (all 4 items sorted; follow-up job created for Worker B)

4. hub.closeJob(job_dedupe)
   -> error: required_items_open (item_prod_switch has resolvedAt = null)

5. hub.resolveRequiredItem(item_prod_switch, "2026-11-04T17:15Z")
   hub.closeJob(job_dedupe)
   -> ok (job_dedupe closed; all leftover items frozen for audit)

Tradeoffs and practical guidance

Close-Out Triage trades a brief triage pass at the end of each job for zero silently dropped loose ends. Keep three practical tensions in balance:

  • Reward honesty, never penalize listed items: if workers are scored down for declaring leftovers, they will hide unfinished edges in vague wording and defeat the entire mechanism.
  • Guard against optional abuse: because optional needs no follow-up job and no drop policy, it is the cheapest bucket. Restrict optional so items that weaken or omit explicit Request Spec requirements can only be required, deferred, or dropped.
  • Avoid follow-up sprawl: if every minor idea becomes a deferred job, queues fill with unrequested chores. Use optional generously for genuine nice-to-haves and keep deferred for work the team actually intends to ship.

Practical implementation notes

  • Enforce on every close path: a job might close via a lead agent tool, a merge listener, or a UI button — funnel every path through one close_job guard so none bypasses triage.
  • Require atomic, actionable item wording: reject umbrella items like "some edge cases remain" that cannot be sorted into a single outcome; split them into one sentence per concrete thing still owed.
  • Place follow-up jobs intentionally: creating a deferred follow-up under the same parent request keeps the request open until it completes; if the requester wants the current request finished first, file the deferred item as its own independent request.
  • Remember what triage cannot catch: Close-Out Triage makes declared leftovers binding — pair it with independent checkers (Policy Gate) to surface gaps the worker didn't notice.

Known uses and related patterns

  • GitLab merge request threads: supports "All threads must be resolved" as a merge check alongside one-click "Create issue to resolve thread," converting unresolved review caveats into tracked follow-up work.
  • Claude Code TaskCompleted hook: runs a verification script whenever a task tries to close and can block completion while returning the exact unmet reasons back to the agent; Close-Out Triage adds durable per-item outcomes.
  • Scrum Definition of Done & Product Backlog: returns incomplete increments to the backlog as a whole; Close-Out Triage classifies each unfinished slice individually (required vs. deferred vs. optional vs. dropped).
  • Workflow Patterns — Implicit Termination (WCP-11): defines a process as complete only when no remaining work can still run; Close-Out Triage enforces this at job close by binding every remaining gap to an active job or an explicit disposition.
  • Volgenic: blocks automatic work-item closure when acceptance criteria remain unchecked at merge time, keeping incomplete items visibly open until resolved.

Related patterns

  • Evidence-Backed Completion — proves what was completed and verified, whereas Close-Out Triage accounts for everything left undone.
  • Policy Gate — decides from checker findings whether a step may proceed; gaps discovered by checkers feed directly into Leftover item rows.
  • Durable Job — defines jobs.leftovers_listed_at and ensures deferred follow-up jobs carry a durable assignee.
  • Delegation Policy — defines the standing policies that authorize a lead agent to drop specific classes of leftovers without escalating.
  • Decision Audit — records autonomous triage outcomes chosen by the lead agent so the requester can sample and audit them later.
  • Request Spec & Orchestrator-Workers — define the acceptance criteria that determine what is required and the Party records for reporters and deciders.