ref('other-doc'), the project provider fetches the compiled output of that document while establishing a dependency edge. This is the foundation of Colin’s dependency system—every internal reference flows through the project provider.
The project provider is always registered automatically. No configuration is needed.
URI Format
Project URIs use theproject:// scheme followed by the document path:
| Shorthand | Full URI |
|---|---|
greeting | project://greeting.md |
sources/data | project://sources/data.md |
reports/2024/q1 | project://reports/2024/q1.md |
models/ directory. A file at models/context/analysis.md becomes ref('context/analysis').
Using ref()
Theref() function fetches a document’s compiled output:
models/product-brief.md
company and products/overview compile first. The .content property contains each document’s full compiled output.
Return Value
Theref() function returns a RefResult object with the following properties:
| Property | Type | Description |
|---|---|---|
content | str | The compiled document output |
name | str | Document name from frontmatter (or filename) |
description | str | None | Description from frontmatter |
uri | str | The full project://... URI |
updated | datetime | When the document was last compiled |
template | str | Raw source template before compilation |
source | object | None | Original domain object (for provider resources) |
models/index.md
String Conversion
Using aRefResult directly in a string context returns a placeholder, not the content:
Ref('project://company.md')
Always use .content to get the actual content:
Dependency Tracking
Everyref() call creates a dependency edge in Colin’s compilation graph. These edges determine:
- Compilation order - Referenced documents compile before their dependents
- Change propagation - When a document changes, dependents recompile
- Lineage tracking - The manifest records the full dependency graph
company.md changes, Colin recompiles all three. If only sales-deck.md changes, only it recompiles.
Dependencies appear in the manifest:
Combining with Filters
Transform referenced content using filters:models/summary.md
extract() filter passes the RefResult through an LLM with your prompt. Since RefResult carries metadata, the LLM sees the document name and description alongside its content.
Build complex analyses by combining multiple refs:
models/comparison.md
Compiled Outputs
References point to compiled outputs, not source files. When you reference a document:- Colin compiles the source document (if needed)
- The compiled output is stored in
output/ ref()reads from the compiled output
ref('data') returns the result of compiling models/data.md, including any template expansions, LLM calls, and nested references that document performed.
Path Resolution
Document paths strip themodels/ prefix. Given this project structure:
models/: