Skip to content

feat(sysgraph): add SysGraph typed envelope (kr0ki roadmap box 2) - #27

Merged
elasticdotventures merged 1 commit into
mainfrom
feat/sysgraph-box2-container
Sep 17, 2026
Merged

elasticdotventures merged 1 commit into
mainfrom
feat/sysgraph-box2-container

Conversation

@elasticdotventures

Copy link
Copy Markdown
Member

Summary

  • Implements docs/TODO.md box 2 from the PromptExecution/kr0ki five-box pipeline: "Graph container type — a typed envelope holding UFO-stereotyped nodes + Vec<OntologicalEdge>."
  • New sysgraph module: OntologicalNode (id + UfoStereotype + optional label) and SysGraph (Vec<OntologicalNode> + Vec<ontology::OntologicalEdge>), plus push_node/push_edge/node() lookup and a dangling_edges() caller-invoked integrity check (no referential integrity enforced at construction, since a producer may build nodes/edges in either order or from independent passes).
  • Follows kr0ki's DESIGN-NOTE-typed-model-layer.md §2.6 (a typed envelope is acceptable at this layer, serde JSON, round-trip tested — same bar as systhread-core's PositionedGraph) and §2.8 (no SchemaVersion field).

This unblocks kr0ki box 3 (the Kubernetes recognizer) and box 1 (the Rust-source front-end), both of which need a graph container to emit OntologicalEdges into.

Test plan

  • 5 new unit tests (round-trip through JSON, node lookup, dangling-edge detection, empty-graph edge case) — all passing
  • cargo fmt --check clean
  • cargo clippy --lib -- -D warnings clean
  • Full existing suite still green (244 tests, 0 failures)
  • Human review — no version bump / tag included in this PR; versioning decision (alongside the already-unreleased pipeline_* additions on main) is left to the maintainer

Adds the box-2 typed graph container kr0ki's docs/TODO.md has called for
since the semantic-graph layer (iso_ir -> ontology -> sysml_model) landed:
a SysGraph snapshot of UFO-stereotyped OntologicalNodes plus the existing
ontology::OntologicalEdges between them, ready for a box-3 pattern
recognizer to produce and a viewpoint-lowering pass to consume.

Follows DESIGN-NOTE-typed-model-layer.md #2.6 (a typed envelope is fine at
this layer; serde JSON, round-trip tested) and #2.8 (no SchemaVersion
field). Includes a dangling_edges() caller-invoked integrity check since
nodes/edges may be pushed by independent passes with no enforced ordering.

5 new tests, cargo fmt clean, clippy -D warnings clean, full suite
(244 tests) still green.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@elasticdotventures
elasticdotventures merged commit fa17ca8 into main Sep 17, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant