colin run, Colin doesn’t blindly recompile everything. It analyzes your project’s dependency graph, detects what has changed since the last run, and compiles only the affected documents.
This incremental approach keeps compilation fast. Small changes to your context rebuild quickly, while unchanged documents and their cached LLM results remain untouched.
Change Detection
Colin determines if a document needs recompilation by checking two conditions: whether the source file changed, and whether any of its dependencies changed.Source Hashing
Each document’s source file is hashed using SHA-256. Colin stores this hash in the manifest:Dependency Checking
Even if a document’s source hasn’t changed, it may need recompilation because something it depends on changed. Colin tracks which refs each document evaluated during its last compilation:context/company or context/products recompiles during the current run, skills/support-agent must also recompile to incorporate the updated content.
Dependency Propagation
Changes propagate downstream through the dependency graph. Colin builds this graph by parsingref() calls from your templates before compilation begins.
Consider a project with these dependencies:
sources/linear.md changes:
- Colin detects the source hash changed
- It finds downstream dependents:
context/project-health.md - It continues traversing:
skills/status-agent.mddepends oncontext/project-health.md - All three documents are marked for recompilation
Shared Dependencies
Documents can share dependencies. When the shared document changes, all dependents recompile:context/company.md changes, both products/overview.md and team/roster.md recompile, which then triggers skills/onboarding.md to recompile as well.
LLM Caching
LLM calls are expensive in both time and cost. Colin caches their results based on input hashes.Automatic Cache Keys
Without an explicit ID, Colin generates a cache key from the call’s input:- The input content (the ref’s compiled output)
- The operation type (
extract) - The parameters (the prompt string)
Manual Cache Keys
With an explicit ID, the cache key is stable across prompt changes:complaints
You can refine the prompt wording without invalidating the cache. The LLM receives both the new input and its previous output, allowing it to maintain consistency when inputs are similar.
Cache Storage
LLM call results live in the manifest alongside document metadata:auto: followed by a hash. Manual keys use the ID directly.
The Manifest
Themanifest.json file in your output/ directory tracks all compilation state. It records:
- Document metadata (source hashes, output hashes, timestamps)
- Dependency edges (which refs each document evaluated)
- LLM call cache (inputs, outputs, costs)
- Compilation timestamps
Manifest Location
The manifest writes tooutput/manifest.json by default. If you override the output directory with --output, the manifest goes there instead.
No Cache
Sometimes you want fresh results regardless of what changed. The--no-cache flag discards the manifest and recompiles everything:
- You want new LLM outputs even though inputs haven’t changed
- External context (not tracked by Colin) has changed
- You suspect the cache is stale or corrupted
Cleaning
Thecolin clean command removes the entire output/ directory, including the manifest:
colin run behaves like a fresh project with no history. All documents compile and all LLM calls execute.
Use cleaning when you want a complete reset, such as before archiving compiled outputs or when troubleshooting unexpected behavior.