Files
sandcage/config-layers.svg
T
2026-05-23 17:11:31 +02:00

70 lines
3.8 KiB
XML

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 360" width="800" height="360">
<style>
text { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; }
.title { font-size: 15px; font-weight: 600; fill: #24292f; }
.layer-label { font-size: 13px; font-weight: 600; fill: #ffffff; }
.layer-desc { font-size: 11px; fill: #ffffff; opacity: 0.9; }
.side-label { font-size: 11px; fill: #57606a; }
.side-detail { font-size: 10px; fill: #8b949e; }
.arrow-text { font-size: 11px; fill: #57606a; font-weight: 500; }
</style>
<defs>
<linearGradient id="grad1" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="#c9d1d9"/>
<stop offset="100%" stop-color="#b1bac4"/>
</linearGradient>
<linearGradient id="grad2" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="#8b949e"/>
<stop offset="100%" stop-color="#6e7681"/>
</linearGradient>
<linearGradient id="grad3" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="#D4A574"/>
<stop offset="100%" stop-color="#c0895a"/>
</linearGradient>
<linearGradient id="grad4" x1="0" y1="0" x2="1" y2="0">
<stop offset="0%" stop-color="#8a5c2a"/>
<stop offset="100%" stop-color="#6b4720"/>
</linearGradient>
<marker id="arr" markerWidth="8" markerHeight="6" refX="4" refY="3" orient="auto">
<polygon points="0 0, 8 3, 0 6" fill="#8b949e"/>
</marker>
</defs>
<!-- Title -->
<text class="title" x="400" y="30" text-anchor="middle">Configuration Layering</text>
<!-- Priority arrow on the left -->
<line x1="70" y1="60" x2="70" y2="310" stroke="#8b949e" stroke-width="1.5" marker-end="url(#arr)"/>
<text class="arrow-text" x="66" y="190" text-anchor="middle" transform="rotate(-90, 66, 190)">Higher priority overrides</text>
<!-- Layer 1 - Compiled Defaults (bottom, lightest) -->
<rect x="120" y="250" width="540" height="56" rx="6" fill="url(#grad1)"/>
<text class="layer-label" x="390" y="275" text-anchor="middle" fill="#24292f">Compiled Defaults</text>
<text class="layer-desc" x="390" y="293" text-anchor="middle" fill="#57606a">Built into the sandcage binary</text>
<text class="side-label" x="680" y="275">Base values</text>
<text class="side-detail" x="680" y="291">always present</text>
<!-- Layer 2 - Global Config -->
<rect x="140" y="185" width="540" height="56" rx="6" fill="url(#grad2)"/>
<text class="layer-label" x="410" y="210" text-anchor="middle">Global Config</text>
<text class="layer-desc" x="410" y="228" text-anchor="middle">~/.sandcage/config.toml</text>
<text class="side-label" x="700" y="210">User-wide</text>
<text class="side-detail" x="700" y="226">SSH, shell, mounts</text>
<!-- Layer 3 - Project Config -->
<rect x="160" y="120" width="540" height="56" rx="6" fill="url(#grad3)"/>
<text class="layer-label" x="430" y="145" text-anchor="middle">Project Config</text>
<text class="layer-desc" x="430" y="163" text-anchor="middle">.sandcage.yml</text>
<text class="side-label" x="720" y="145">Per-project</text>
<text class="side-detail" x="720" y="161">packages, toolchains, env</text>
<!-- Layer 4 - CLI Flags (top, darkest) -->
<rect x="180" y="55" width="540" height="56" rx="6" fill="url(#grad4)"/>
<text class="layer-label" x="450" y="80" text-anchor="middle">CLI Flags</text>
<text class="layer-desc" x="450" y="98" text-anchor="middle">sandcage claude -p ~/project -- --resume</text>
<text class="side-label" x="740" y="80">Per-invocation</text>
<text class="side-detail" x="740" y="96">highest priority</text>
<!-- Bottom note -->
<text x="400" y="340" text-anchor="middle" font-size="11" fill="#8b949e" font-family="-apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif">Each layer overrides the one below it. Only set what you need — sensible defaults handle the rest.</text>
</svg>