Skip to content

docs: consolidate session work-unit vocabulary - #35218

Merged
kitlangton merged 3 commits into
v2from
session-vocabulary
Jul 3, 2026
Merged

kitlangton merged 3 commits into
v2from
session-vocabulary

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

Consolidates the vocabulary for V2 session work units into CONTEXT.md as the single glossary, retires "provider turn" from living prose, and fixes one mislabeled trace span.

The ratified language

  • Step — one logical LLM call: pre-flight (checkpoint prep, input promotion, request build, compaction check) → provider stream → tool settlement. Replaces "provider turn". A step's durable record covers only the model-visible span (first assistant output → tool settlement); pre-flight leaves no record, and one step settles at most one record.
  • Physical Attempt — one actual provider request on the wire in service of a step. Usually 1:1; overflow-triggered compaction recovery gives one step two attempts. Abandoned attempts settle nothing durable.
  • Execution — one session-scoped coordinator busy period (first wake → idle); settles exactly once. Process-local, not durable.
  • Assistant Turn — a reserved name for the not-yet-modeled unit containing all steps from prompt promotion until the assistant yields the floor. Deliberately not reified: steers extend it (interjections, hence the step-allowance reset), queued prompts wait for it to end, and nothing durable needs it yet.
  • Settlement — the uniform terminal-transition verb at every level; step and tool settlement are durable, drain and execution settlement are coordinator-observed.
  • Avoid: "provider turn", bare "turn" for a single call.

Containment: Execution ⊃ Session Drain ⊃ assistant-turn span (reserved) ⊃ Step ⊃ Physical Attempts + Tool Calls.

Changes

  • CONTEXT.md — Provider Turn → Step, Safe Provider-Turn Boundary → Safe Step Boundary; new entries for Physical Attempt, Execution, Assistant Turn (reservation), Settlement; Relationships gains the containment chain and step-record span rule.
  • specs/v2/{session,todo,tools}.md — prose sweep to step vocabulary (sentence-level rewording, not sed). schema-changelog.md is frozen history and untouched.
  • AGENTS.md — V2 Session Core sweep plus one naming-rule sentence for code authors.
  • fix(core) — runTurnAttempt was traced as SessionRunner.runTurn; span now matches the function. (Code identifier renames like runTurn → runStep are deferred to a follow-up refactor.)
  • docs(core) — comment on the continuation loop documenting the three continuation conditions (unseen local tool results; provider-error veto; pending steers).

Verification

  • Prettier clean; oxlint clean on the touched TS file; bun typecheck passes from packages/core.
  • rg -i "provider.turn" across CONTEXT.md, AGENTS.md, and specs/v2 (excluding schema-changelog.md) matches only the two intentional avoid-term mentions.

@kitlangton
kitlangton force-pushed the session-vocabulary branch from c7d735a to b03ba21 Compare July 3, 2026 18:33
@kitlangton
kitlangton changed the base branch from dev to v2 July 3, 2026 18:34
@kitlangton
kitlangton merged commit ca861fd into v2 Jul 3, 2026
4 checks passed
@kitlangton
kitlangton deleted the session-vocabulary branch July 3, 2026 18:49
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant