2.6 KiB
Knowledge Vault Context Management Policy
1. Purpose
Long discussion files can exceed a single model context and degrade judgment quality. Knowledge Vault workflows must process long sources through file-based ranges, worker threads, and continuation handoffs.
2. Main Rule
The main session must not load or reason over an entire long source document when the task can be split by source range.
The main session is responsible for:
- source registration
- output directory creation
- invocation packet creation
- worker dispatch
- returned-output collection
- cross-range consistency checks
- user confirmation gates
Worker sessions are responsible for:
- one H1 round
- one source block batch
- one bounded participant task
- one explicit output contract
3. Default Split Strategy
Use this sequence:
1. Split by Markdown H1 round.
2. If a round is too large, split by H2 section.
3. If a section is still too large, split by source block batch.
4. Assign stable range ids such as R01, R04-S02, or R04-B001-B030.
4. Thread Strategy
Use worker threads when a processing pass needs to read large source ranges or preserve participant focus.
Each worker thread should receive a thread-start packet and return a thread-return packet.
Run-specific packet paths:
handoff/thread-start-packets/
handoff/thread-return-packets/
Worker outputs must be written to files before the main session synthesizes them.
5. Continuation Handoff
Create a continuation handoff when any condition is met:
- a major pass is complete
- several large source ranges have been read
- a participant boundary changes
- the run is blocked waiting for external output
- a user confirmation gate is reached
- context pressure may affect judgment quality
- the next session must continue without relying on chat history
Recommended path:
handoff/continuation/{date}-{stage}.md
6. What The Main Session May Read
The main session may read:
- source-map
- topic-map
- routing-log indexes
- worker return summaries
- audit summaries
- unresolved issue lists
- bounded excerpts needed to verify a claim
The main session should avoid repeatedly loading:
- full original source
- all worker outputs at once
- all topic documents at once
- all external returned outputs at once
7. Quality Gate
Before starting a large pass, the run must define:
- input range
- output path
- expected record file
- acceptance check
- continuation point
If these are missing, pause and create the missing run-control files first.