4.7 KiB
Context Strategy
1. Default Strategy
The main orchestrator should not process the full source in one context.
Use:
main session -> source registration and orchestration
whole-source gestalt reviewer -> full-source high-context structure review
worker thread -> bounded range processing
file handoff -> durable cross-session state
The whole-source gestalt reviewer is a real sub-session participant, not the main session. It exists to preserve the overall shape of coherent long discussions before range workers begin.
For sources that may approach high context pressure, including future drafts around 200k characters, the main session should register the path, size, round boundaries, and source map first. It should not load the whole source merely to decide the structure. If a single high-context Step 0 participant cannot safely handle the source, use macro-range Step 0 passes and record the exception.
2. Whole-Source Gestalt Alignment Rule
For discussion drafts that fit inside a high-context participant, run a whole-source gestalt alignment pass before segmentation.
The pass must judge:
- whether the source is coherent, mixed, or fragmented
- the global topic portrait
- the main structural layers
- core tensions and governing questions
- model-evolution lines
- likely parent/child/tool/case/action-layer distinctions
- risks that chunk-first workers may flatten into false peer topics
Step 0 is an alignment loop. Its output must be inspected by the user before downstream automation treats it as binding structure. User corrections should be recorded and either folded into another Step 0 pass or captured as an explicit human-correction record.
Step 0 should use a persistent Codex Thread by default. A one-shot agent result is useful only as a reference analysis artifact, but it is not a valid formal Step 0 alignment record unless the same agent can be resumed and the agent_id plus follow-up method are recorded.
Mode selection after Step 0:
coherent -> structure-first mode; workers receive the confirmed global portrait as a lens.
mixed -> macro-topic mode; split into macro-topics and run Step 0 per macro-topic when needed.
fragmented -> flat-discovery mode; workers do not receive a strong hierarchy lens.
If the source is too large for one gestalt pass, record the exception and use a small number of macro-range gestalt passes before worker segmentation.
3. Range Order
1. H1 rounds: R01, R02, R03
2. H2 sections when a round is too large
3. source block batches when a section is too large
4. Worker Input
Each worker gets:
- thread-start packet
- participant invocation packet
- exact source range
- source_primary_language and output_language_policy
- confirmed whole-source gestalt summary, macro-topic split plan, or recorded exception
- output path
- forbidden actions
- return packet template
In structure-first mode, workers should use the gestalt summary as orientation. They may challenge it with local evidence, but they must explicitly mark the challenge and cite the source range.
In flat-discovery mode, workers should remain minimally biased and extract local topics without forcing a global hierarchy.
For topic-doc material extraction, workers should receive:
- confirmed topic graph
- assigned topic node or topic group
- routed source block ids
- source excerpts or exact source ranges
- required material-unit output schema
- distortion guardrails from Step 0 and human confirmation
5. Worker Output
Each worker writes:
- participant output file
- execution or returned-output record
- thread-return packet
- unresolved issue list, if needed
6. Main Session Reading Rule
The main session reads worker summaries and indexes first. It reads source excerpts only for verification or repair.
The main session may read the user-confirmed whole-source gestalt output because it is a participant result with a record. It must not replace that result with its own informal full-source judgment.
The main session must also verify language readiness before presenting a human confirmation artifact. If the source is primarily Chinese, the Step 0, Gate 3, Gate 6, audit, and downstream human-review artifacts should be primarily Chinese. Technical identifiers, file paths, table keys, and protocol field names may remain English.
The main session must not be the primary extractor for topic-doc material units when the workflow requires a CCPE Skill / worker participant. Main-session extraction, routing, or topic-doc drafting may be kept only as simulation-only or reference material, and must be excluded from formal synthesis.
7. Continuation Rule
Create a continuation handoff after each major pass or before any expected context pressure.