mvp-ai's picture
|
download
raw
2.49 kB
# Context Budget And Agent Lifecycle
The harness reduces hallucination by treating context as a scarce resource.
Agents do not inherit the whole conversation. They receive a bounded slice,
produce an artifact, write a compact summary, and then their working context is
discarded.
## Loading Rule
Each role may load only:
- the active phase or step guide;
- the active role card;
- the relevant constitution file for the current phase;
- `project-profile.json`;
- the current manifest task slice, when in Module 2;
- prior role summaries from `.harness/context-ledger.json` when explicitly
needed for handoff.
Do not load the full constitution, full chat history, all role cards, or all
phase guides unless auditing or editing the harness itself.
## Budgets
Use these as hard limits for role handoffs:
- research track output: 200 words;
- debate role output: compact JSON or 200 words;
- judge output per dimension: 300 words plus `must_fix`;
- review summary per dimension: 200 words;
- Module 2 task summary: 200 words;
- agent input summary in the ledger: 800 characters;
- agent output summary in the ledger: 1200 characters.
If a role needs more room, it must write a separate artifact and put only the
artifact path plus a compact summary in the ledger.
## Lifecycle
For every spawned or simulated role:
1. Create a bounded prompt from current artifacts only.
2. Run exactly one role for exactly one phase, dimension, or task slice.
3. Save the role's real output artifact.
4. Record the run with `scripts/record_agent_result.py`.
5. Use only the compact ledger summary for later phases.
6. Close the sub-agent when a real Codex sub-agent was used.
```text
spawn/load -> bounded work -> artifact -> compact ledger -> close/discard
```
## Handoff Rule
No role output crosses a phase boundary except through:
- a required phase artifact such as `research-brief.md`, `debate-output.json`,
`review-summary.md`, `spec.md`, or `execution-manifest.json`;
- `.harness/context-ledger.json`, which contains compact summaries and artifact
paths only.
If a later role needs raw detail, it opens the named artifact directly. It must
not depend on hidden memory from a previous agent.
## Failure Rule
If an artifact is too large to fit the budget, split it by phase, dimension,
task, or file ownership. Record each slice separately.
```text
No compact ledger entry, no reliable handoff.
No bounded prompt, no sub-agent launch.
No artifact path, no cross-phase evidence.
```

Xet Storage Details

Size:
2.49 kB
·
Xet hash:
af8db60ec9993051cc92495c2e5915c66b667b1a2bd7f10631d23010b15cdf5a

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.