Accord Lifecycle
Overview
The Accord is the Knight-facing portal at /accord. It lists every Shrubbery currently in Pending_Handshake where the Knight is the assignee — including Renegotiated rows that were previously Active. The Accord is the only surface from which a Knight can perform a Handshake; once a row leaves Pending_Handshake, it leaves the Accord.
Actors
- Knight — the sole consumer of the Accord. The route is the Knight's daily reliability surface.
- Lead — sends rows into the Accord (via promote-from-Draft, Inbox webhook, or Renegotiation) but never sees the Knight's Accord view directly.
- Inngest cron — fires Nudges against stale rows still sitting in the Accord past the configured threshold.
Flow
- Lead promotes a
DraftShrubbery toPending_Handshake(or the Inbox API mints one directly). The row appears in the Knight's Accord with objective, deadline, source excerpt, and source badge. - Knight opens
/accord. Rows render newest-first; each carries an Accept and a Refuse affordance. - Knight accepts —
Pending_Handshake→Active. The row disappears from the Accord and surfaces on the Garden (and on the Knight Dossier counters). Audit event:handshake_accepted. - Knight refuses —
Pending_Handshake→Refused. The row disappears from the Accord; counts toward Ghost Rate; audit event:handshake_refused. - Lead Renegotiates an existing
Activerow — that row reverts toPending_Handshakeand reappears in the Accord with a "Renegotiated" indicator showing what changed.
Edge cases
- Stale handshake — Inngest fires a Nudge against the recipient channel (email, Teams, Google Chat). The Accord row does not move; only the Nudge timestamp surfaces.
- Knight has no Pending rows — the Accord renders an empty state pointing at the Garden for completed work. No queue, no inbox metaphor.
- Renegotiation diff — the indicator surfaces the deadline change and a redline on objective wording. The Knight's Handshake is required again; the original Handshake event stays in the Audit Trail.
- Lead cancels a Pending Shrubbery — Lead-side delete on the Detail Sheet emits a
cancelledaudit event; the row vanishes from the Knight's Accord between fetches. No notification is sent; cancellations are silent in v1. - Race: Knight opens Accord at the same moment the Lead Renegotiates — the page re-fetches on focus, so the next interaction reflects the new wording. If the Knight already submitted Accept on the stale view, the DB rejects with a stale-version conflict and the UI refreshes.
Related concepts
Last updated: 17 May 2026