--- name: delegation-diagram description: >- Delegation diagram, after Keyhive's certflow diagrams: where each party's authority came from, what it reaches, and what a revocation takes with it — use when asked for a certflow or delegation diagram; when a design delegates or attenuates authority through chains (facets of facets, caretakers, invitations, certificate capabilities, UCANs); when someone asks "who can reach what?", "where did Bob get that?", or "what breaks if we revoke this?"; when an interactive page should trace reach on hover or revoke on click. Not for a snapshot of who holds what (that's wiring-diagram), nor for the order of messages (sequence-diagram-actor-sim). --- # Delegation diagram A wiring diagram shows who holds what now. It doesn't say how they got it, so it can't answer the questions a review of delegation asks: **where did this authority come from, what does it reach, and what goes when it's revoked?** Keyhive's certflow diagrams answer them by drawing the grant itself as a thing, with two kinds of line. ## Two kinds of line - Parties are balls. Each grant is a box labelled with the access it gives over its subject: `read: doc`, `relay: inbox`, `deposit: purse`. - **Solid lines say who delegated to whom:** granter → grant → grantee. - **Dashed lines say where the authority comes from:** subject → grant → grant, down the chain, skipping the parties in between. A grant made from another grant has a dashed line from it; follow the dashes up and you reach the subject. Keeping the two apart is the point: a party can pass along a grant it holds, but the dashes show it can't widen it. A grant whose dashed line doesn't lead to its subject is either a bug in the design or a bug in the drawing. Dashed means provenance here. In a wiring diagram it means a weak reference, so don't mix the two notations in one picture. ## Live references, not only certificates Certflow is for certificate capabilities: signed delegations that hold up while the issuer is offline. In an ocap system, the same picture works for live references: - A grant is an attenuating object: a facet, a caretaker's forwarder, a store's `readOnly()`, a definition's endowment. - To delegate is to send that object in a message, and the solid line cites the call that sent it. - The dashed line is what the object forwards to or closes over, and it cites the maker that built it. As in wiring-diagram, every line cites the code (`file:line`). If you can't cite where a grant came from, it gets no line. ## Reach is computed, not drawn Keep the scene as data (parties, grants with `granter`, `grantee`, `subject`, `access`, and revocations) and draw it from that data. A party's reach is the closure over what it holds and what those grants lead to. Compute it; never mark it by hand. Then the page can't claim a reach the data doesn't support. - **Hover a party to trace its reach:** highlight what it reaches and fade the rest. Hover Mallory, who holds whatever is most likely to leak, and her caption should match what lights up. - **Revoke on click:** a revocation is a diamond held by the revoker, with a solid red line that ends in ✕ instead of an arrowhead, and red dashes back to where the revoker's authority comes from. Recompute reach. What depended on the revoked grant fades, unless another route still backs it. Fading, rather than deleting, keeps the change visible. - **Build in sequence:** a snapshot can't show order, so step through the grants one at a time, as wiring-diagram's step-through does: Prev/Next, arrow keys, and `#sN` deep links. - Also take `#reach=bob` and `#revoke=g3` in the URL, so a link, or a headless screenshot, shows a highlighted state without a mouse. ## Works in one colour Every distinction is carried by shape and line style: ball versus box, solid versus dashed, arrowhead versus ✕, diamond. Colour may reinforce them but never carry them alone. The page should still read printed in black, and to someone who can't tell red from green. ## Render and check Render with headless Chromium, as in wiring-diagram, once plain, then once per interesting `#reach=` and `#revoke=` state. Look at each screenshot. Check that: - each solid line cites a call, and each dashed line cites a maker; - the dashes from every grant lead to its subject; - each party's computed reach is what its job needs, and Mallory's caption matches hers; - revoking each grant fades exactly what the design says it should; - `` tells the same story in prose: who delegated what to whom, and from what. ## Sources - [07 · Certflow Diagrams](https://www.inkandswitch.com/keyhive/notebook/07/) (Ink & Switch, Keyhive lab notebook, 2026-10-31): the notation, and hover, click-to-revoke, and drag-to-delegate on live diagrams. - [Keyhive notebook 01](https://www.inkandswitch.com/keyhive/notebook/01/): the Granovetter diagram that certflow adapts. - [wiring-diagram](../wiring-diagram/SKILL.md): the snapshot companion, with the drawing helpers and the headless render recipe. - [caretaker](../caretaker/SKILL.md): revocable access as a forwarder plus a revoker, the usual live-reference grant.