Dependencies & Ordering
Source nodes can depend on other source nodes. The resolver uses these dependencies to determine hydration order — ensuring upstream data is available before downstream sources execute.
Declaring dependencies
Use depends_on in the source frontmatter:
source:
transport: mcp
server: jira
tools: [jira_get_sprint_issues]
depends_on:
- contextnest://sources/project-config
Topological ordering
The resolver sorts source nodes in topological order based on their dependency graph:
project-config → current-sprint-tickets → sprint-risk-analysis
At each step, the agent has the upstream results available in its session context when it reads the downstream source's instructions.
Cycle detection
Circular dependencies are forbidden. If the dependency graph contains a cycle, validation fails with a Rule 15 error:
Circular dependency detected: A → B → C → A
Body-level references
Dependencies can also be expressed in the markdown body:
Before fetching sprint tickets, ensure you have the project
configuration from [Project Config](contextnest://sources/project-config).
Both the frontmatter depends_on and body references should point to the same targets. If they diverge, validation flags the inconsistency.
Related pages
- Writing Source NodesThe markdown body of a source node is an instruction set for agents. Write it as a clear, step-by-step runbook.
- PromptOwl DocumentationWelcome to the documentation for PromptOwl and Context Nest — the open protocol and hosted platform for giving AI agents structured, versioned, governed…
- Add DocumentsThis creates nodes/api-design.md from a frontmatter template as version 1, and regenerates the index. Tags accept a comma- or space-separated list; you…
- Addressing OverviewContext Nest uses the contextnest:// URI scheme to address documents, sections, tags, and folders within a vault.
- Authentication & API KeysContextNest Community distinguishes two kinds of key, and it is worth keeping them straight: