import type { ReactNode } from 'react'; export type Status = 'proposed' | 'approved' | 'done'; const STATUS_STYLE: Record = { proposed: { label: 'Proposed', bg: 'var(--wf-accent-soft)', fg: 'var(--wf-accent)', bd: 'var(--wf-accent)' }, approved: { label: 'Approved', bg: 'var(--wf-ok-soft)', fg: 'var(--wf-ok)', bd: 'var(--wf-ok)' }, done: { label: 'Done', bg: 'var(--wf-card)', fg: 'var(--wf-muted)', bd: 'var(--wf-line)' }, }; /** * Document header — title, status badge, one-line objective, and meta row. * Put this first in every plan/recap. */ export function Meta({ title, status = 'proposed', objective, date, tags = [], children, }: { title: string; status?: Status; objective?: ReactNode; date?: string; tags?: string[]; children?: ReactNode; }) { const s = STATUS_STYLE[status]; return (
{s.label} {date && {date}} {tags.map((t) => {t})}

{title}

{objective &&

{objective}

} {children}
); }