ShrubberyDocs
Sign in

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

  1. Lead promotes a Draft Shrubbery to Pending_Handshake (or the Inbox API mints one directly). The row appears in the Knight's Accord with objective, deadline, source excerpt, and source badge.
  2. Knight opens /accord. Rows render newest-first; each carries an Accept and a Refuse affordance.
  3. Knight accepts — Pending_HandshakeActive. The row disappears from the Accord and surfaces on the Garden (and on the Knight Dossier counters). Audit event: handshake_accepted.
  4. Knight refuses — Pending_HandshakeRefused. The row disappears from the Accord; counts toward Ghost Rate; audit event: handshake_refused.
  5. Lead Renegotiates an existing Active row — that row reverts to Pending_Handshake and 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 cancelled audit 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.

Last updated: 17 May 2026