Expand description
§Module: turn_scope
TurnScope manifest — phase 2 of the operation-scoped drift model
(#op-scoped-drift-2, tasks/agent-doc/plan-operation-scoped-drift.md).
§Spec
- An
Addressnames an addressable location in the document: a component occurrence, optionally narrowed to a specific node key. Anode_keyofNoneis a whole-component address. - A
TurnScopeis the operation manifest for the current turn: thedrivernode it is answering, theread_setit depends on, and thewrite_setit will mutate. It is emitted at turn start from preflightprompt_targets. TurnScope::for_driverbuilds the canonical scope: read{driver, exchange tail}; write{exchange append, driver strike, backlog, status, review, done/archive, gitlink, editor writeback}. The driver also appears in the write set because the turn strikes the queue item it consumes.
§Agentic Contracts
- The manifest is the substrate the phase-3 affectedness classifier reads; phase 2 only emits it. It never blocks a cycle.
- When no driver node resolves (a non-queue prompt),
driverisNoneand the sets cover only the output components every turn touches.
Structs§
- Address
- An addressable location in the document.
- Classified
Op - One classified operation in a cycle’s affectedness summary.
- Cycle
Affectedness - Aggregate affectedness of a cycle’s operations against the turn scope.
- Turn
Scope - The operation manifest for the current turn.
Enums§
- Affectedness
Class - The effect class an incoming operation has on the current turn
(
#op-scoped-drift-3). Mirrors the 5-class taxonomy in the plan.
Constants§
- COMPONENT_
BACKLOG - COMPONENT_
DONE - COMPONENT_
DONE_ ARCHIVE - COMPONENT_
EDITOR_ WRITEBACK - COMPONENT_
EXCHANGE - COMPONENT_
GITLINK - COMPONENT_
QUEUE - COMPONENT_
REVIEW - COMPONENT_
STATUS - MANAGED_
CONFLICT_ COMPONENTS - All managed surfaces that can participate in conflict classification.
- MANAGED_
OUTPUT_ COMPONENTS - Managed output surfaces a turn may mutate.
Functions§
- classify_
cycle - Classify every op in a cycle against the turn scope, routing the coarse all-drift-is-affecting assumption into the 5-class taxonomy. Independent and provenance-spoofed ops do not affect the turn.
- classify_
op - Classify a single operation against the current turn scope.
- op_
address - The component-occurrence-narrowed address of a durable op.