// Directive log — append-only ledger + the consequence diff (propose-approve) function DirectivesScreen() { const DS = window.CommiTeaDesignSystem_20e63b; const { Card, Button, Badge, Icon } = DS; const d = window.CT_DATA.directives; const [pending, setPending] = React.useState(d.pending); const [entries, setEntries] = React.useState(d.entries); const resolve = (status) => { setEntries((e) => [{ seq: pending.seq, who: pending.who, when: pending.when, what: pending.what, why: 'pilot demo on the 14th', status, consequence: status === 'applied' ? '#78 +5d · Beta 80% Mar 5–14' : 'withdrawn before apply', }, ...e]); setPending(null); }; const toneColor = { ok: 'var(--ok)', warn: 'var(--warn)', info: 'var(--info)', danger: 'var(--danger)' }; const statusBadge = { applied: { tone: 'ok', label: 'applied' }, withdrawn: { tone: 'neutral', label: 'withdrawn' }, superseded: { tone: 'info', label: 'superseded' }, }; return (

Directives

append-only · JSONL in pm-state · who, when, what, why

{pending ? ( }>

{pending.who} · {pending.when}
“{pending.what}”

{pending.diff.map((r) => (
{r.change} {r.from} {r.to}
))}

Cheap, as consequences go. Shall I make it so?

) : (
Nothing awaits your word. Directives are given in chat; consequences appear here first.
)}
{entries.map((e, i) => { const sb = statusBadge[e.status]; return (
#00{e.seq}
{e.who.split(' ').map((w) => w[0]).join('')} {e.who} {e.when} {e.why ? · why: {e.why} : null} {sb.label}

“{e.what}”

{e.consequence}

); })}

Entries are never edited. Corrections are new entries — the ledger remembers everything, politely.

); } Object.assign(window, { DirectivesScreen });