AST skeletons and context budgets
An AST skeleton is a structure-preserving summary of source. It keeps the shape needed for reasoning while avoiding a copy of private source. Socraticode adds the questions and evidence used to resolve an invariant. Both are data contracts: they do not execute embedded commands, install dependencies, or publish context.
Deterministic allocation
The context budget is divided into five partitions:
| Partition | Share | Example at 128,000 tokens |
|---|---|---|
| Rules | 10% | 12,800 |
| Memories | 15% | 19,200 |
| AST Skeletons | 35% | 44,800 |
| Active Files | 30% | 38,400 |
| Tools | 10% | 12,800 |
| Total | 100% | 128,000 |
The Rust service accepts a positive integer context_ceiling_tokens at
POST /v1/context/budget. Integer allocation uses deterministic
largest-remainder rounding and preserves the requested total exactly. Invalid
JSON, missing or zero ceilings, non-integer values, and unknown fields return
structured HTTP 400 errors.
This allocation is a planning contract, not proof that any provider, tool, or remote context store is available. Local documentation builds remain self-contained.