kogral/docs/diagrams/core-concepts.svg
2026-01-23 16:11:07 +00:00

149 lines
8.0 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<svg width="1000" height="600" xmlns="http://www.w3.org/2000/svg">
<defs>
<style>
.node-box { fill: #e3f2fd; stroke: #1976d2; stroke-width: 2; }
.note-node { fill: #fff9c4; stroke: #f57f17; stroke-width: 2; }
.decision-node { fill: #ffccbc; stroke: #e64a19; stroke-width: 2; }
.guideline-node { fill: #c8e6c9; stroke: #388e3c; stroke-width: 2; }
.pattern-node { fill: #d1c4e9; stroke: #512da8; stroke-width: 2; }
.journal-node { fill: #b2dfdb; stroke: #00796b; stroke-width: 2; }
.execution-node { fill: #ffccbc; stroke: #d84315; stroke-width: 2; }
.text { font-family: Arial, sans-serif; font-size: 13px; fill: #333; }
.title { font-family: Arial, sans-serif; font-size: 16px; font-weight: bold; fill: #333; }
.small-text { font-family: Arial, sans-serif; font-size: 11px; fill: #666; }
.edge { stroke: #666; stroke-width: 2; fill: none; marker-end: url(#arrowhead); }
.edge-label { font-family: Arial, sans-serif; font-size: 11px; fill: #666; font-style: italic; }
</style>
<marker id="arrowhead" markerWidth="8" markerHeight="8" refX="7" refY="3" orient="auto">
<polygon points="0 0, 8 3, 0 6" fill="#666" />
</marker>
</defs>
<!-- Title -->
<text x="500" y="30" class="title" text-anchor="middle" font-size="22">Knowledge Base: Node Types & Relationships</text>
<!-- Node Types Legend -->
<rect x="20" y="60" width="300" height="520" fill="#f5f5f5" stroke="#999" stroke-width="1" rx="8"/>
<text x="170" y="85" class="title" text-anchor="middle">Node Types</text>
<!-- Note -->
<rect x="40" y="100" width="260" height="65" class="note-node" rx="6"/>
<text x="170" y="120" class="text" text-anchor="middle" font-weight="bold">Note</text>
<text x="50" y="138" class="small-text">General knowledge, observations</text>
<text x="50" y="153" class="small-text">Fields: title, content, tags</text>
<!-- Decision -->
<rect x="40" y="175" width="260" height="65" class="decision-node" rx="6"/>
<text x="170" y="195" class="text" text-anchor="middle" font-weight="bold">Decision (ADR)</text>
<text x="50" y="213" class="small-text">Architectural decisions</text>
<text x="50" y="228" class="small-text">Fields: context, decision, consequences, status</text>
<!-- Guideline -->
<rect x="40" y="250" width="260" height="65" class="guideline-node" rx="6"/>
<text x="170" y="270" class="text" text-anchor="middle" font-weight="bold">Guideline</text>
<text x="50" y="288" class="small-text">Code standards, practices</text>
<text x="50" y="303" class="small-text">Fields: language, category, rules, examples</text>
<!-- Pattern -->
<rect x="40" y="325" width="260" height="65" class="pattern-node" rx="6"/>
<text x="170" y="345" class="text" text-anchor="middle" font-weight="bold">Pattern</text>
<text x="50" y="363" class="small-text">Reusable solutions</text>
<text x="50" y="378" class="small-text">Fields: problem, solution, context, forces</text>
<!-- Journal -->
<rect x="40" y="400" width="260" height="65" class="journal-node" rx="6"/>
<text x="170" y="420" class="text" text-anchor="middle" font-weight="bold">Journal</text>
<text x="50" y="438" class="small-text">Daily notes (auto-dated)</text>
<text x="50" y="453" class="small-text">Fields: date, content, highlights</text>
<!-- Execution -->
<rect x="40" y="475" width="260" height="65" class="execution-node" rx="6"/>
<text x="170" y="495" class="text" text-anchor="middle" font-weight="bold">Execution</text>
<text x="50" y="513" class="small-text">Agent task records (from Vapora KG)</text>
<text x="50" y="528" class="small-text">Fields: task_type, agent, outcome, duration</text>
<!-- Relationships Section -->
<rect x="350" y="60" width="630" height="520" fill="#fafafa" stroke="#999" stroke-width="1" rx="8"/>
<text x="665" y="85" class="title" text-anchor="middle">Relationship Types (Edges)</text>
<!-- Example nodes for relationships -->
<rect x="380" y="120" width="120" height="50" class="note-node" rx="4"/>
<text x="440" y="150" class="text" text-anchor="middle">Error Handling</text>
<text x="440" y="163" class="small-text" text-anchor="middle">(Note)</text>
<rect x="580" y="120" width="120" height="50" class="note-node" rx="4"/>
<text x="640" y="150" class="text" text-anchor="middle">Logging Best</text>
<text x="640" y="163" class="small-text" text-anchor="middle">Practices (Note)</text>
<rect x="820" y="120" width="140" height="50" class="guideline-node" rx="4"/>
<text x="890" y="150" class="text" text-anchor="middle">Rust Error</text>
<text x="890" y="163" class="small-text" text-anchor="middle">Guidelines (Guideline)</text>
<!-- relates_to -->
<path d="M 500 145 L 580 145" class="edge"/>
<text x="540" y="140" class="edge-label">relates_to</text>
<!-- Second row -->
<rect x="380" y="220" width="120" height="50" class="pattern-node" rx="4"/>
<text x="440" y="250" class="text" text-anchor="middle">Result Pattern</text>
<text x="440" y="263" class="small-text" text-anchor="middle">(Pattern)</text>
<rect x="820" y="220" width="140" height="50" class="guideline-node" rx="4"/>
<text x="890" y="250" class="text" text-anchor="middle">Error Handling</text>
<text x="890" y="263" class="small-text" text-anchor="middle">Rules (Guideline)</text>
<!-- depends_on -->
<path d="M 500 245 L 750 245 L 750 230 L 820 230" class="edge"/>
<text x="620" y="240" class="edge-label">depends_on</text>
<!-- Third row -->
<rect x="380" y="320" width="120" height="50" class="execution-node" rx="4"/>
<text x="440" y="350" class="text" text-anchor="middle">Task: Fix Bug</text>
<text x="440" y="363" class="small-text" text-anchor="middle">(Execution)</text>
<rect x="820" y="320" width="140" height="50" class="pattern-node" rx="4"/>
<text x="890" y="350" class="text" text-anchor="middle">Debugging</text>
<text x="890" y="363" class="small-text" text-anchor="middle">Pattern (Pattern)</text>
<!-- implements -->
<path d="M 500 345 L 750 345 L 750 340 L 820 340" class="edge"/>
<text x="620" y="340" class="edge-label">implements</text>
<!-- Fourth row -->
<rect x="380" y="420" width="120" height="50" class="guideline-node" rx="4"/>
<text x="440" y="450" class="text" text-anchor="middle">Project Rules</text>
<text x="440" y="463" class="small-text" text-anchor="middle">(Guideline)</text>
<rect x="820" y="420" width="140" height="50" class="guideline-node" rx="4"/>
<text x="890" y="450" class="text" text-anchor="middle">Base Rust</text>
<text x="890" y="463" class="small-text" text-anchor="middle">Guidelines (Guideline)</text>
<!-- extends -->
<path d="M 500 445 L 750 445 L 750 440 L 820 440" class="edge"/>
<text x="620" y="440" class="edge-label">extends</text>
<!-- Fifth row -->
<rect x="380" y="510" width="120" height="50" class="decision-node" rx="4"/>
<text x="440" y="540" class="text" text-anchor="middle">ADR-002</text>
<text x="440" y="553" class="small-text" text-anchor="middle">(Decision)</text>
<rect x="820" y="510" width="140" height="50" class="decision-node" rx="4"/>
<text x="890" y="540" class="text" text-anchor="middle">ADR-001</text>
<text x="890" y="553" class="small-text" text-anchor="middle">(Decision)</text>
<!-- supersedes -->
<path d="M 500 535 L 750 535 L 750 530 L 820 530" class="edge"/>
<text x="620" y="530" class="edge-label">supersedes</text>
<!-- Legend box for edge types -->
<rect x="580" y="460" width="180" height="110" fill="white" stroke="#999" stroke-width="1" rx="4"/>
<text x="670" y="480" class="text" text-anchor="middle" font-weight="bold">Edge Types</text>
<text x="590" y="500" class="small-text">• relates_to - Conceptual link</text>
<text x="590" y="516" class="small-text">• depends_on - Required prerequisite</text>
<text x="590" y="532" class="small-text">• implements - Concrete realization</text>
<text x="590" y="548" class="small-text">• extends - Inherits + overrides</text>
<text x="590" y="564" class="small-text">• supersedes - Replaces older version</text>
</svg>