Documentation
¶
Overview ¶
Package contextgraph builds a directed knowledge graph that links tasks, their dependency edges, associated file artifacts, KB entries, task annotations, and git commits into a single queryable structure.
Supported output formats:
- json — {nodes:[{id,type,label}], edges:[{from,to,rel}]}
- dot — Graphviz DOT digraph (pipe through dot -Tpng etc.)
- mermaid — Mermaid flowchart TD wrapped in a fenced code block
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderDOT ¶
RenderDOT produces a Graphviz DOT digraph.
Node shapes and fill colours by type:
- task → box, colour by status (green/yellow/red/grey)
- artifact → note shape, light blue
- kb → ellipse, lavender
- annotation → plaintext box, light yellow
- commit → hexagon, light orange
func RenderJSON ¶
RenderJSON serialises the graph as indented JSON.
func RenderMermaid ¶
RenderMermaid produces a Mermaid flowchart (TD direction).
Types ¶
type Node ¶
type Node struct {
ID string `json:"id"`
Type NodeType `json:"type"`
Label string `json:"label"`
// Extra is format-specific metadata (not included in JSON output but used for rendering).
Status string `json:"status,omitempty"` // for task nodes: pending/in_progress/done/failed/skipped
}
Node is a single vertex in the context graph.
Click to show internal directories.
Click to hide internal directories.