@ccgrapher/core
v0.4.0
Published
Spec schema, validation and longest-path layer assignment for agent-workflow graphs.
Maintainers
Readme
@ccgrapher/core
Spec schema, validation and layer assignment for agent-workflow graphs.
import { parseSpec, buildGraph, rankGraph } from "@ccgrapher/core";
import { loadGraph } from "@ccgrapher/core/node"; // filesystem helpers
const graph = buildGraph(parseSpec(yaml));
const { rank, layers, layerCount } = rankGraph(graph);Ranks are assigned by longest path, so two nodes with no dependency between them
land on the same layer. layerCount is the critical path, and it is what the
linter reports — the layout package never gets a say in it.
The main entry is bundler-safe. Anything touching the filesystem lives at
@ccgrapher/core/node, which is what lets the same parser run in a browser.
