Files
harmony/docs/diagrams/score-ref-cycle.svg
Jean-Gabriel Gill-Couture b63de408f1
All checks were successful
Run Check Script / check (pull_request) Successful in 1m55s
docs: Add code samples and diagrams to score ref docs
2026-07-15 18:33:41 -04:00

42 lines
2.8 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" width="1100" height="380" viewBox="0 0 1100 380" role="img" aria-labelledby="title desc">
<title id="title">Two Scores exchange typed Refs in a cyclic relationship</title>
<desc id="desc">BrokerScore passes BrokerRef to AuthScore. AuthScore passes AuthRef to BrokerScore. Both Refs come from desired state before either Score runs.</desc>
<defs>
<marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto">
<path d="M0 0 10 5 0 10z" fill="#0f766e"/>
</marker>
<style>
.sans { font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.mono { font-family: "JetBrains Mono", Consolas, monospace; }
</style>
</defs>
<rect width="1100" height="380" fill="#ffffff"/>
<g class="sans">
<text x="40" y="52" fill="#0f172a" font-size="30" font-weight="750">A cycle is the same pattern twice</text>
<text x="40" y="80" fill="#64748b" font-size="17">Both Refs come from desired state before either Score runs.</text>
<rect x="40" y="108" width="1020" height="220" rx="16" fill="#f8fafc" stroke="#cbd5e1" stroke-width="1.5"/>
<text x="70" y="140" fill="#64748b" font-size="12" font-weight="750" letter-spacing="1.3">COMPOSED FUNCTIONALITY</text>
<rect x="85" y="178" width="260" height="100" rx="12" fill="#172554"/>
<text x="110" y="208" fill="#bfdbfe" font-size="12" font-weight="750" letter-spacing="1.4">SCORE</text>
<text x="110" y="242" fill="#ffffff" font-size="22" font-weight="700" class="mono">BrokerScore</text>
<text x="110" y="265" fill="#bfdbfe" font-size="14">owns the broker</text>
<path d="M345 204H755" fill="none" stroke="#0f766e" stroke-width="2.5" marker-end="url(#arrow)"/>
<rect x="440" y="181" width="220" height="46" rx="23" fill="#f0fdfa" stroke="#0f766e"/>
<text x="550" y="210" text-anchor="middle" fill="#115e59" font-size="15" font-weight="650" class="mono">BrokerRef</text>
<path d="M755 252H345" fill="none" stroke="#0f766e" stroke-width="2.5" marker-end="url(#arrow)"/>
<rect x="440" y="229" width="220" height="46" rx="23" fill="#f0fdfa" stroke="#0f766e"/>
<text x="550" y="258" text-anchor="middle" fill="#115e59" font-size="15" font-weight="650" class="mono">AuthRef</text>
<rect x="755" y="178" width="260" height="100" rx="12" fill="#172554"/>
<text x="780" y="208" fill="#bfdbfe" font-size="12" font-weight="750" letter-spacing="1.4">SCORE</text>
<text x="780" y="242" fill="#ffffff" font-size="22" font-weight="700" class="mono">AuthScore</text>
<text x="780" y="265" fill="#bfdbfe" font-size="14">owns authentication</text>
<text x="40" y="360" fill="#64748b" font-size="14">The cycle describes desired relationships; it does not require a graph scheduler.</text>
</g>
</svg>