Skip to content

Latest commit

 

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kr0ki

The b00tyverse cut-node between Kroki and b00t/systhread.

kr0ki is the rendering + CDN-cached-artifact service layer for SysML/KerML diagrams in the b00t ecosystem. It is deliberately one node in the graph — the boundary where an abstract, validated model (owned upstream by systhread / ufo-types) becomes a concrete, cached, referenceable picture (Mermaid / PlantUML / GraphViz / D2 / SVG, served from kr0ki.b00t.promptexecution.com).

It does not own the model. It does not re-implement diagram grammars. It wraps an existing multi-format renderer (kroki-mcp, vendored) and an existing isometric renderer (systhread-core's layout.rs/render.rs), and adds the one thing neither has: a caching, cross-referencing service surface.

Status: foundational. The decision-independent render loop (P0 — FR2 + FR5) is built and merged. The SysML-model path (FR1/FR3/FR4) has started: its client — a generic OMG Systems Modeling API REST client — is in crates/kr0ki-sysmlv2-client (D3 resolved 2026-09-05); the typed adapter above it, and anything that emits SysML v2 text, stays blocked on D1/D6. Read docs/PRD-KR0KI-001-foundational.md first, then docs/PLAN-KR0KI-002.md for the model path and docs/DESIGN-NOTE-typed-model-layer.md for the reviewed (not yet approved) shape of the deferred typed layer.

Orientation for agents

Thing Where Why it matters here
b00t SysML v2 spine epic (closed) elasticdotventures/_b00t_#1177 The upstream model/validation layer kr0ki renders from. P0–P3 shipped.
ufo-types v0.11.0 PromptExecution/ufo-types iso_ir::{Node,Edge}, stereotype::UfoStereotype, sysml::validate_sysml_v2, mbse. kr0ki's input vocabulary.
Live P1 prototype elasticdotventures/_b00t_b00t-cli/src/dispatch_sysml.rs Working Rust type → iso_ir → SysML v2 / Mermaid / Rhai. The pattern kr0ki's adapter follows.
systhread-core fungible-farm/nem-poweragent-labrust/systhread-core Owns iso_ir/layout/render/sysml_gen. Its isometric render.rs becomes a kr0ki input format.
systhread v2 SysML/KerML viz scope nem-poweragent-lab#53 (merged) Defines the typed-model → views contract kr0ki renders. Names cim-gridy as first consumer.
kroki-b00t (comic engine) PromptExecution/infrastructure#217 A downstream consumer, disconnected as its own leaf — the comic team renders kr0ki SVGs to make jokes about b00t. Not part of kr0ki's core.
Dependency-posture decisions (OPEN) ledgrrr#202, ledgrrr#203 extend-vs-wrap-vs-re-export sysml-derive; whether holon-viz becomes a real dep. kr0ki defers to these — does not pre-empt them.
Generic Kroki datum elasticdotventures/_b00t__b00t_/kroki.mcp.toml The existing b00t MCP datum wrapping public/self-hosted Kroki. kr0ki supersedes it as the service, keeps it as the client.
KerML anchor elasticdotventures/_b00t__b00t_/types/b00tyverse.kerm The canonical KerML the whole thread serializes/reasons over.
Vendored renderer vendor/kroki-mcpPromptExecution/kroki-mcp b00tyverse fork of utain/kroki-mcp (MIT, Go), pinned at 08765f64.
SysML-v2 tooling survey PromptExecution/ledgrrrdocs/sysml-v2-tooling-survey.md Decided infra (holon-viz, ufo-types, wrap-vs-build for LSP/MCP). Read before proposing new tooling.

Layout

kr0ki/
├── README.md
├── crates/
│   ├── kr0ki-core/               ← P0 render loop (RenderService = cache + RenderBackend)
│   ├── kr0ki-server/             ← P0 axum service
│   └── kr0ki-sysmlv2-client/     ← generic OMG "Systems Modeling API" REST client (SysML-model path)
├── docs/
│   ├── PRD-KR0KI-001-foundational.md    ← the requirements document
│   ├── DESIGN-NOTE-typed-model-layer.md ← reviewed shape of the deferred SysML-v2 typed layer (pre-D1/D6)
│   ├── PLAN-KR0KI-002.md                ← the SysML-model ingestion path (5-box pipeline; client path unblocked 2026-09-05)
│   ├── PATTERNS-kubernetes.md           ← first pattern recognizer (UFO bridge + 25 canonical relations + KubeDiagrams prior art)
│   ├── EVAL-flexo.md                    ← Flexo MMS / flexo-mms-sysmlv2 evaluation (primary API target)
│   ├── EVAL-syson.md                    ← Eclipse SysON evaluation (reference oracle, not a competitor)
│   ├── EVAL-kubediagrams.md             ← KubeDiagrams for k8s/IaC rendering — backend (leaf) vs recognizer prior art vs oracle
│   ├── VOCABULARY.md                    ← D6 resolution — OMG SysML v2 spec terms verbatim; "projection" banned
│   └── CONFORMANCE.md                   ← SysML-v2-Release conformance harness (phase 1)
└── vendor/
    └── kroki-mcp/                       ← submodule, PromptExecution/kroki-mcp @ 08765f64

SysML-model path (in progress)

crates/kr0ki-sysmlv2-client is the first increment of the SysML-model ingestion path. It is a server-agnostic async REST client for the OMG Systems Modeling API and Services PSM — it works against Flexo flexo-mms-sysmlv2, the OMG Java pilot Systems-Modeling/SysML-v2-API-Services, Open-MBEE/OpenSysML, and Eclipse SysON's /api/rest/. It is not Flexo-coupled. It reads projects / branches / tags / commits / elements / relationships / roots and produces a content-hashed ModelSnapshot — the model-side cache key for PRD FR5, since no target server exposes its own content hash.

This is possible now because the operator resolved decision D3 on 2026-09-05: kr0ki consumes an upstream OMG-API model server; it does not host the model.

ModelSnapshot feeds the SysML-v2 source arm of a five-box ingestion pipeline (source → canonical UFO-typed semantic graph → pattern recognizers → SysML v2 viewpoints → kr0ki renderer adapters). kr0ki MUST NOT infer architecture from diagram syntax or raw iso_ir strings — the UFO semantic graph (owned by ufo-types, a follow-up PR in flight) is the pivot. FR1/FR4 are therefore blocked on that layer plus a pattern recognizer (Kubernetes first); the typed adapter and any SysML-v2 text emit stay blocked on D1/D6. See docs/PLAN-KR0KI-002.md and docs/PATTERNS-kubernetes.md.

P0 — the render loop (built 2026-09-05)

The decision-independent slice of PRD-KR0KI-001 (FR2 + FR5) is implemented and tested: raw Kroki-family diagram text → rendered SVG, with a content-addressed cache. Nothing here depends on ufo-types / systhread-core / holon-viz — the SysML-model ingestion path (FR1/FR3/FR4) stays blocked on §5 decisions D1–D6.

crates/
├── kr0ki-core/    RenderService = cache in front of a RenderBackend
│   ├── format.rs  DiagramFormat — the 8 companion-free Kroki formats only (NFR3)
│   ├── cache.rs   cache_key() = SHA256(domain ‖ 0x1f-delimited fields) ; FsCache (atomic writes)
│   └── render.rs  HttpKrokiBackend — POST {base}/{slug}/{output}
└── kr0ki-server/  axum service
    GET  /health           {"status":"ok",...}
    GET  /formats          supported slugs
    POST /render/{format}  body = diagram source → SVG  (X-Kr0ki-Cache: hit|miss, X-Kr0ki-Key)
    GET  /cache/{key}      previously rendered artifact by content hash

Verified: cargo test --workspace (17 pass) · cargo clippy -- -D warnings clean · live render against https://kroki.io (miss → SVG → byte-identical cache hit) · running server smoke-tested end to end.

Not in P0: caller auth (FR7 — bind to localhost / trusted proxy only), CDN tier (FR5's real target = D5), the vendored kroki-mcp (direct HTTP is enough for raw text), PNG/PDF output, and the entire SysML-model path.

just test          # unit + in-process HTTP
just kroki-up      # local SECURE-mode Kroki on :8000
just run 127.0.0.1:8787 http://localhost:8000

About

kr0ki — the b00tyverse cut-node between Kroki and b00t/systhread: SysML/KerML diagram rendering + CDN-cached artifact service (kr0ki.b00t.promptexecution.com)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages