Context budgeting
What you'll do
Use the case-file context budget to bound what reaches a runner. The local assembler records what was included, omitted, and excluded — agents can see the boundary instead of guessing.
Omissions are visible by design.
When docs are omitted, the assembler adds an open assumption so the next agent sees the case file is incomplete.
Build with the default budget
craik case build task_review_docs
Set a smaller or larger approximate token budget:
craik case build task_review_docs --max-tokens 12000
What the assembler records
max_tokens
estimated_tokens
docs_included
adrs_included
docs_omitted
docs_excluded
discovery_rules
evidence_count
assumption_count
Default discovery exclusions
Craik applies repository discovery defaults before budgeting.
Generated, dependency, build, cache, and archive-heavy paths are
excluded by default so a case file does not spend context on paths
such as node_modules/, docs/build/, or docs/archive/.
Project rules
Persist project-level discovery rules at registration time:
craik project add /path/to/repo \
--discovery-exclude "docs/generated/**" \
--discovery-include "docs/archive/current-release/**"
Per-build overrides
Apply one-off user overrides when building a case file:
craik case build task_review_docs \
--discovery-exclude "docs/drafts/**" \
--discovery-include "docs/archive/current-release/**"
Include rules
Restore matching paths even when a default exclude would normally skip them.
Exclude rules
Add to the default exclusions.
Excluded paths are reported in context_budget.docs_excluded with the
matching rule so an agent can see what was skipped and why.
Conservative path-based estimator.
The current estimator is intentionally conservative and path-based. Later case-assembly work will replace it with content-aware budgeting as repo, memory, GitHub, and handoff adapters mature.