Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildGraph ¶
func BuildGraph() (*specs.DependencyGraph, error)
BuildGraph builds the complete dependency graph from all specs under .canary/specs/ in the working directory. It is exported so callers outside this package can reuse it without reconstructing the spec-walk logic.
func BuildGraphIn ¶ added in v0.3.3
func BuildGraphIn(root string) (*specs.DependencyGraph, error)
BuildGraphIn is BuildGraph for an explicit root.
The MCP server answers for the tree it was started on, not for whatever directory the process happens to be in, so it needs to name that tree rather than rely on the working directory.
Two failure modes were previously silent (C5-03), and both are now loud:
- A spec directory whose name carries no valid requirement id (per reqIDFromSpecDir) is an error, not a skip -- a directory under .canary/specs/ that doesn't parse into a real id is either a naming bug or a typo, and either way the graph built without it would be silently incomplete.
- A spec.md that exists but fails to parse (specs.ParseDependenciesFromFile returning an error -- currently only an unreadable file, since the dependency parser itself never errors on malformed syntax) is also an error, not a skip.
A spec directory with NO spec.md at all stays a skip: that shape is ordinary scaffolding (a reserved id with no spec written yet), not a parse failure.
Every error encountered during the walk is collected rather than returned immediately, so one bad spec directory doesn't hide problems in the rest of the tree; the walk still returns nil, err when done.
func CreateDepsCommand ¶
CreateDepsCommand creates the parent deps command
Types ¶
This section is empty.