Files
kandev/docs/diagrams/configuration.html
2026-09-03 23:12:45 +00:00

83 lines
7.5 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kandev configuration precedence</title>
<link href="https://fonts.googleapis.com/css2?family=Figtree:wght@400;500;600;700&family=Instrument+Serif:ital@0;1&family=Geist:wght@400;500;600&family=Geist+Mono:wght@400;500;600&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; }
:root { --paper:#0d0d10; --paper-2:#111114; --ink:#fff; --muted:#a1a1a1; --soft:#737373; --rule:rgba(255,255,255,.12); --accent:#6468f0; --accent-tint:rgba(100,104,240,.16); --sans:'Figtree','Geist',system-ui,sans-serif; --serif:'Instrument Serif',serif; --mono:'Geist Mono',ui-monospace,monospace; }
body { margin:0; min-height:100vh; padding:32px 24px 40px; color:var(--ink); background:var(--paper); font-family:var(--sans); }
.frame { width:min(100%,1040px); margin:0 auto; }
.eyebrow { margin:0 0 8px; color:var(--soft); font:500 10px/1.4 var(--mono); letter-spacing:.18em; text-transform:uppercase; }
h1 { margin:0 0 8px; color:var(--ink); font:400 clamp(28px,4vw,36px)/1.1 var(--serif); letter-spacing:-.02em; }
.lede { max-width:70ch; margin:0 0 24px; color:var(--muted); font-size:14px; line-height:1.5; }
svg { display:block; width:100%; height:auto; }
</style>
</head>
<body>
<main class="frame">
<p class="eyebrow">Layer stack · Kandev · doc-inline · balanced</p>
<h1>Startup configuration has one clear precedence</h1>
<p class="lede">Kandev resolves embedded defaults, the first existing configuration file, and environment variables at process start; web settings follow a separate persistent lifecycle.</p>
<svg viewBox="0 0 1040 560" xmlns="http://www.w3.org/2000/svg" role="img" aria-labelledby="configuration-title configuration-desc">
<title id="configuration-title">Startup configuration has one clear precedence</title>
<desc id="configuration-desc">A layer stack shows embedded profile defaults, the first existing config.yaml, environment variables as the final startup override, and the resulting backend process. Persistent web settings are shown separately in the database-backed product surface.</desc>
<defs>
<marker id="configuration-arrow" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#a1a1a1"/></marker>
<marker id="configuration-arrow-accent" markerWidth="8" markerHeight="6" refX="7" refY="3" orient="auto"><polygon points="0 0, 8 3, 0 6" fill="#6468f0"/></marker>
</defs>
<rect width="1040" height="560" fill="#0d0d10"/>
<!-- The left stack is the startup contract. -->
<text x="64" y="64" fill="#737373" font-size="8" font-family="'Geist Mono',monospace" letter-spacing="0.14em">STARTUP SOURCES</text>
<line x1="48" y1="420" x2="48" y2="96" stroke="#a1a1a1" stroke-width="1.2" marker-end="url(#configuration-arrow)"/>
<rect x="12" y="224" width="64" height="14" rx="2" fill="#0d0d10"/>
<text x="44" y="234" text-anchor="middle" fill="#a1a1a1" font-size="8" font-family="'Geist Mono',monospace" letter-spacing="0.05em">LATER WINS</text>
<rect x="80" y="96" width="600" height="64" rx="6" fill="#111114" stroke="#404040" stroke-width="1"/>
<text x="104" y="122" fill="#737373" font-size="8" font-family="'Geist Mono',monospace" letter-spacing="0.12em">L1</text>
<text x="160" y="128" fill="#ffffff" font-size="16" font-weight="600" font-family="'Figtree','Geist',sans-serif">Embedded defaults</text>
<text x="160" y="146" fill="#737373" font-size="9" font-family="'Geist Mono',monospace">production profile · built-in fallback</text>
<rect x="80" y="176" width="600" height="64" rx="6" fill="#111114" stroke="#404040" stroke-width="1"/>
<text x="104" y="202" fill="#737373" font-size="8" font-family="'Geist Mono',monospace" letter-spacing="0.12em">L2</text>
<text x="160" y="208" fill="#ffffff" font-size="16" font-weight="600" font-family="'Figtree','Geist',sans-serif">First existing config.yaml</text>
<text x="160" y="226" fill="#737373" font-size="9" font-family="'Geist Mono',monospace">cwd → home → /etc/kandev · no merge</text>
<rect x="80" y="256" width="600" height="64" rx="6" fill="rgba(100,104,240,0.16)" stroke="#6468f0" stroke-width="1.2"/>
<text x="104" y="282" fill="#6468f0" font-size="8" font-family="'Geist Mono',monospace" letter-spacing="0.12em">L3</text>
<text x="160" y="288" fill="#ffffff" font-size="16" font-weight="600" font-family="'Figtree','Geist',sans-serif">Environment variables</text>
<text x="160" y="306" fill="#a1a1a1" font-size="9" font-family="'Geist Mono',monospace">deployment values · secrets · final override</text>
<rect x="80" y="336" width="600" height="64" rx="6" fill="#111114" stroke="#404040" stroke-width="1"/>
<text x="104" y="362" fill="#737373" font-size="8" font-family="'Geist Mono',monospace" letter-spacing="0.12em">OUT</text>
<text x="160" y="368" fill="#ffffff" font-size="16" font-weight="600" font-family="'Figtree','Geist',sans-serif">Backend starts</text>
<text x="160" y="386" fill="#737373" font-size="9" font-family="'Geist Mono',monospace">read once · restart after changes</text>
<!-- Product settings are deliberately a separate surface. -->
<rect x="752" y="144" width="232" height="208" rx="8" fill="#111114" stroke="rgba(255,255,255,0.12)" stroke-width="1" stroke-dasharray="4,4"/>
<rect x="768" y="148" width="152" height="14" rx="2" fill="#0d0d10"/>
<text x="844" y="158" text-anchor="middle" fill="#737373" font-size="8" font-family="'Geist Mono',monospace" letter-spacing="0.14em">PERSISTENT PRODUCT SURFACE</text>
<rect x="784" y="192" width="168" height="72" rx="6" fill="#111114" stroke="#404040" stroke-width="1"/>
<rect x="792" y="200" width="56" height="12" rx="2" fill="transparent" stroke="rgba(255,255,255,0.28)" stroke-width="0.8"/>
<text x="820" y="209" text-anchor="middle" fill="#a1a1a1" font-size="7" font-family="'Geist Mono',monospace" letter-spacing="0.08em">WEB UI</text>
<text x="868" y="232" text-anchor="middle" fill="#ffffff" font-size="14" font-weight="600" font-family="'Figtree','Geist',sans-serif">Settings</text>
<text x="868" y="250" text-anchor="middle" fill="#737373" font-size="9" font-family="'Geist Mono',monospace">agents · executors · workflows</text>
<path d="M868 264 V296" fill="none" stroke="#a1a1a1" stroke-width="1.2" marker-end="url(#configuration-arrow)"/>
<rect x="852" y="272" width="64" height="12" rx="2" fill="#0d0d10"/>
<text x="884" y="281" text-anchor="middle" fill="#a1a1a1" font-size="8" font-family="'Geist Mono',monospace" letter-spacing="0.06em">SAVE</text>
<rect x="784" y="296" width="168" height="40" rx="6" fill="#111114" stroke="#404040" stroke-width="1"/>
<text x="868" y="320" text-anchor="middle" fill="#ffffff" font-size="13" font-weight="600" font-family="'Figtree','Geist',sans-serif">Database</text>
<line x1="80" y1="456" x2="984" y2="456" stroke="rgba(255,255,255,0.12)" stroke-width="0.8"/>
<line x1="96" y1="484" x2="128" y2="484" stroke="#6468f0" stroke-width="1.4" marker-end="url(#configuration-arrow-accent)"/>
<text x="144" y="488" fill="#6468f0" font-size="9" font-family="'Geist Mono',monospace" letter-spacing="0.06em">STARTUP PRECEDENCE</text>
<text x="400" y="488" fill="#737373" font-size="9" font-family="'Geist Mono',monospace" letter-spacing="0.06em">WEB SETTINGS ARE STORED SEPARATELY</text>
</svg>
</main>
</body>
</html>