Skip to content

feat: add se-trace context-graph (RFC-0004) - #6

Merged
emmanuel-a-otchere merged 1 commit into
mainfrom
vibe/rfc0004-context-graph-tools-472642
Nov 2, 2026
Merged

emmanuel-a-otchere merged 1 commit into
mainfrom
vibe/rfc0004-context-graph-tools-472642

Conversation

@emmanuel-a-otchere

Copy link
Copy Markdown
Contributor

Summary

  • New src/context-graph.ts: renders a COTS's Context + Evidence parts as a Context Graph (Mermaid + self-contained HTML).
  • New se-trace context-graph <file> [-o dir] subcommand writing <base>.context-graph.mermaid and <base>.context-graph.html.
  • Nodes: context parameters, constraints, sources, claims, decisions, model-generated evidence. Typed edges per the RFC-0004 vocabulary floor: set-by, constrains, contextualises, supports, contradicts.
  • Model-generated evidence items (RFC-0002) render with a distinct class so recursive chains are visible in the graph.
  • No COTS schema change; derived entirely from existing context, inputs, evidence fields.

Verification

  • npm run build passes (tsc clean).
  • npm test: 15/15 pass, including 6 new context-graph tests (parameter nodes, set-by/contextualises/constrains edges, model-generated marking, HTML output, CLI end-to-end).
  • Smoke: node dist/cli/se-trace.js context-graph examples/legal-summarization.cots.json -o /tmp/cg-demo emits both files.

Implements RFC-0004 (Source-Engineering/source-engineering-governance#7, draft).

Co-authored-by: emmanuel-a-otchere <emmanuel-a-otchere@users.noreply.github.com>
@emmanuel-a-otchere
emmanuel-a-otchere merged commit 4c29996 into main Nov 2, 2026
1 check 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.

2 participants