Skip to content

Introduce turn-level orchestration across chat capabilities #1021

Description

@paullizer

Summary

Introduce a turn-level orchestration layer that coordinates SimpleChat's selected and available chat capabilities, gathers relevant evidence, executes bounded multi-step plans, and synthesizes one coherent final response. Grounded image generation will be the first end-to-end proving scenario, not the core abstraction.

User Value

Today, chat capabilities can execute along separate paths without reliably influencing the final response. Users need selected agents, documents, search modes, prior citations, conversation context, actions, and generated artifacts to participate in one intentional workflow that completes the requested outcome without unsupported claims.

Proposed Behavior

  • Snapshot the user message, selected chat controls, relevant compacted history, prior citation/artifact lineage, authorization context, and available governed capabilities for each submitted turn.
  • Create a lightweight plan for every turn; simple requests use a direct one-step plan without an extra planning model call.
  • Treat selected capabilities and sources as required attempts unless they are impossible or unauthorized, and report skips or failures.
  • Allow governed read-only capabilities to run automatically when needed; require approval for side effects, sensitive/consequential access, or budget overflow.
  • Execute bounded plans with status, dependencies, cancellation, partial failure, and dynamic read-only replanning within the original goal and budget.
  • Normalize results into a provenance-aware ledger that preserves conflicts, missing evidence, citations, and source lineage.
  • Use a central finalizer to combine executor outputs into the final answer or artifact plan.
  • Show concise progress and persist compact plan, status, provenance, and evidence metadata.

Acceptance Criteria

  • Every submitted turn has an immutable orchestration context and either a direct or coordinated plan.
  • Selected controls are represented as required attempts for that turn, while authorized read-only discovery follows governance and budget policy.
  • Relevant conversation history, prior citations, cited source documents, selected documents, agents/actions, search modes, and other chat capabilities can contribute to execution and final synthesis.
  • Plans support dependencies, bounded adaptive replanning, cancellation, explicit failure states, and clearly partial outcomes.
  • A central finalizer receives normalized outputs and provenance from all executed steps.
  • Conflicting or missing evidence is surfaced rather than silently merged or invented.
  • Risky, consequential, write, or over-budget steps require user approval.
  • Grounded image generation passes as the first end-to-end orchestration scenario without making the core contracts image-specific.
  • Functional and security tests cover direct, selected-source, auto-discovery, partial-failure, authorization, and synthesis behavior.

Notes

The implementation should be phased and reuse the existing chat route, agents/actions, workspace and selected-document search, web/deep research, source review, conversation citations, progress UI, artifact persistence, and cancellation mechanisms. Early planning should be deterministic where possible and avoid adding latency to simple turns.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions