Repository navigation
Description
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
Type
Projects
- StatusShow more project fieldsIn progress
Activity
paullizer commentedon Jul 14, 2026
Phase 1 implementation checkpoint
Work has started on
feature/orchestration-foundation-phase-1, based directly onDevelopment.Completed
0.250.058release note.Validation
git diff --check: clean.Known next phases
No commit or pull request has been created yet.
paullizer commentedon Jul 14, 2026
Final Phase 1 review hardening
An independent review and payload audit were completed after the initial checkpoint. The branch now also:
simpleimageproposal guidance, while keeping chart/analytical requests out of image generation.document_action.document_idsas the authoritative submitted snapshot when present.Final focused validation is now 15/15 orchestration scenarios plus 3/3 image proposal scenarios. Compilation, editor diagnostics, route policy contracts, streaming SSE metadata, scoped broken-access-control scanning, and
git diff --checkare clean.paullizer commentedon Jul 14, 2026
Phase 2 implementation checkpoint
Phase 2 is implemented in PR #1023, targeting
feature/orchestration.Completed
0.250.059.Validation
Phase boundary
Phase 2 establishes and persists the contract. Existing conversation, document, workspace, web/research, source-review, selected-image, agent, and action outputs remain on their current paths until the Phase 3 and Phase 4 adapters populate the ledger. Finalizer prompt injection waits for populated normalized evidence so an empty planned ledger cannot compete with existing context.
Refs #1023
paullizer commentedon Jul 14, 2026
Phase 3 is implemented in PR #1028: #1028
What changed:
Validation:
Phase 4 remains responsible for normalizing selected agent and action executor outputs beneath the central finalizer.
paullizer commentedon Jul 14, 2026
Phase 4 implementation checkpoint
Phase 4 is implemented in PR #1030: #1030
Completed
evidence_collectiontask and response contract for selected agents and document actions.not_found,not_available, failure, and authorization states into the shared ledger.simpleimageproposal before evidence collection completes.0.250.061.Validation
Phase boundary
Phase 4 ends with normalized executor evidence and a deterministic status handoff. Phase 5 remains responsible for the separate central synthesis call that turns the completed ledger into evidence-backed image proposals and later output types.
Refs #1021
paullizer commentedon Jul 15, 2026
Phase 5 central synthesis is implemented in #1032.
What changed:
0.250.062.Validation:
SIMPLECHAT_PLAYWRIGHT_CHAT_URLis not configured.Remaining scope: Analyze/Compare central-finalizer integration and resilient scheduling/retry/cancellation/durable resume remain later-phase work.
paullizer commentedon Jul 15, 2026
Phase 6 implementation checkpoint
Phase 6 is implemented in PR #1034: #1034
Completed
OrchestrationRunexecution graph shared by direct and coordinated turns.0.250.063.Validation
Remaining boundaries
Refs #1021
paullizer commentedon Jul 15, 2026
Phase 7 implementation checkpoint
Phase 7 is implemented in PR #1035: #1035
Completed
Validation
Remaining boundaries
Refs #1021
paullizer commentedon Jul 15, 2026
Phase 8A capability discovery planning checkpoint
The private orchestration roadmap now includes a Phase 8A plan for governed capability discovery and turn-scoped user choice.
Diagnosis
Agreed capability semantics
selected: required attempt for the submitted turn.unselected: still discoverable and eligible for recommendation or policy-governed read-only use.approved: planner-proposed capability accepted for this turn.declined: prohibited for this turn and not proposed repeatedly.unavailable,unauthorized, orpolicy_blocked: never offered or executed.An inactive toolbar control is therefore not equivalent to a user denial.
Phase 8A scope
awaiting_user_choicecheckpoint, end the current stream, and resume through an authenticated, idempotent decision request.For a current Virginia/Fairfax property-rules request, the intended UX is one choice: faster official Web Search, recommended Deep Research, or continue with a clearly limited model-only answer.
Phase boundary
Phase 8A proves discovery and choice with built-in chat tools first. Phase 8B will add governed recommendation of unselected agents on the same inventory, proposal, decision, authorization, and resume contracts. Raw agent instructions, secrets, and inaccessible catalog entries must not enter planner context.
Planning validation
Refs #1021
paullizer commentedon Jul 15, 2026
Source-status guidance follow-up
PR #1036 implements the post-Phase 7 response cleanup: #1036
0.250.065.Validation:
Refs #1021
8 remaining items
paullizer commentedon Jul 16, 2026
Phase 10A hardening complete: live planner contract aligned
Controlled shadow evaluation exposed a production schema/validator mismatch before Phase 10B activation. The provider schema described requirement, candidate, capability, and evidence IDs too generically, while the server validator correctly required bounded aliases and exact authorized inventory values.
Hardening implementation
feature/orchestration-phase-10a-planner-contract-hardening86378b8a83cda63f7e6c3be0bb09eb4099048df70.250.071docs/explanation/fixes/PHASE_10A_PLANNER_SCHEMA_ALIGNMENT_FIX.mdChanges:
response_format.temperatureis unsupported.Validation
Deterministic combined gate:
Controlled
gpt-5.6-terragate:artifacts/phase10a_controlled_shadow_report.json0afbeebf616ae3b114edd8d66bf02784The controlled Phase 10A preconditions are now acceptable. Phase 10B should begin only after this hardening branch is committed, reviewed, and merged into
feature/orchestration; its revised implementation version should be0.250.072.Refs #1021
paullizer commentedon Jul 16, 2026
Phase 10A hardening PR opened
159e1ce93b06800d977ab276d4a61067e9843d11feature/orchestration-phase-10a-planner-contract-hardeningfeature/orchestration0.250.071The PR contains the strict live-schema alignment, selected/input-ready governance fixes, 600-token planner budget, source-bound non-executing 19-scenario controlled gate, accepted 57/57 evidence report, tests, feature/fix documentation, and release notes.
Validation remains:
gpt-5.6-terra: 57/57, 100% strict schema, zero failures/leakage/prohibited execution surfaces, p50 1.67s and p95 2.65sGitHub currently reports the PR mergeable; CLA passed and branch-flow is queued. Phase 10B should start only after PR #1044 merges, from the new integration baseline at version
0.250.072.Refs #1021
Harden model planner shadow contract
paullizer commentedon Jul 16, 2026
Phase 10A hardening merged; Phase 10B ready
PR #1044 is merged into
feature/orchestration.3b2b2b9dc46d0e00248338296fb58d5c8c365418159e1ce93b06800d977ab276d4a61067e9843d110.250.0710.250.072feature/orchestration-phase-10b-governed-additive-plan-activationfeature/orchestrationThe Phase 10B branch name remains unused locally, on
origin, and on the fork. The private execution plan and durable repository handoff now use the merged hardening baseline and accepted 57/57 controlled-shadow evidence. The obsolete86378b8a/0.250.070handoff must not be used.Phase 10B may now begin with conservative activation: high-confidence validated proposals only, selected mandates preserved, deterministic conflict precedence, server-authored options/bundles, existing durable choice/resume lifecycle, exact decision/resume/execution reauthorization, and current-turn-only external queries.
clarifyremains observational until Phase 10C.Refs #1021
paullizer commentedon Jul 17, 2026
Phase 10B governed additive plan activation is implemented locally and ready for commit/PR.
feature/orchestration-phase-10b-governed-additive-plan-activation3b2b2b9dc46d0e00248338296fb58d5c8c3654180.250.072Implemented:
assistmode while retainingoffas default andshadowfor evaluation.clarifyremains observational and prior-turn external-query context remains deferred to Phase 10C.Validation:
./.venv/Scripts/python.exe scripts/run_phase9_orchestration_quality_gates.pygit diff --checkare clean.Refs #1021
paullizer commentedon Jul 17, 2026
Phase 10B PR submitted: #1046
d3dfa712bae28d9887b7d5574f689169c3193f5ffeature/orchestrationPR: #1046
paullizer commentedon Jul 17, 2026
Phase 10B activation follow-up applied to PR #1046.
Root cause of the reported tool-blind response: the environment had
chat_capability_planner_mode=off, so the planner LLM was never called. A 5-second planner timeout could also fall through to the base answer model during transient latency.Changes:
assist, 10-second timeout, 600 completion tokens.assistand a bounded 10-second planner deadline.offandshadowcontrols remain available; all approval, authorization, and deterministic conflict gates remain unchanged.Evidence:
public_archive_three_yearreal planner probe returned strict-schemaproposein 3.536 seconds.deep_research; alternative:web_search.06eabd97PR: #1046
paullizer commentedon Jul 17, 2026
Planner Admin UX enhancement pushed to PR #1046.
56b872811a794507663dee83a9057b51be74a3200.250.073PR: #1046
paullizer commentedon Jul 17, 2026
Phase 10B capability-choice UX checkpoint (
d46e1f90, version0.250.074, PR #1046): equal-width plan cards now replace the badge-heavy actions, with a corner Recommended ribbon, concise descriptions, time/cost summaries, and an Includes checklist for server-authored multi-capability plans. One click still submits only one persistedoption_idand immediately resumes; the browser cannot compose arbitrary capability bundles.Validation: real desktop/mobile Playwright
6 passed; cumulative orchestration gate296 passed, 3 skipped; full BAC/XSS, syntax, diagnostics, local-asset, and whitespace checks passed. PR remains mergeable with branch-flow and CLA passing.paullizer commentedon Jul 17, 2026
Phase 10B compact choice-state checkpoint (
dd763318, version0.250.075, PR #1046): after a capability decision is saved, the expanded selection UI now condenses immediately to one selected-plan row showing included capabilities and Saved/Running/Completed state. Resume and Retry remain available compactly when needed; decision failures leave the original choices visible.Validated with the real desktop/mobile module:
6 passed, completed height below 100px and below 40% of the expanded chooser. Cumulative gate:296 passed, 3 skipped; BAC/XSS, syntax, diagnostics, asset/sink, and whitespace checks passed. PR remains mergeable.paullizer commentedon Jul 17, 2026
Phase 10B is merged through PR #1046 into
feature/orchestrationat1aefa44b799659854c8e94a5c1c5c91f0f25bbb0, application version0.250.075. Final cumulative validation was296 passed, 3 skipped, with full-gate BAC/XSS, syntax, diagnostics, local-asset/sink, and whitespace checks passing.Phase 10C is ready for planning from that exact merged baseline. Recommended branch:
feature/orchestration-phase-10c-contextual-goals-clarification; implementation version:0.250.076; PR base remainsfeature/orchestration. The first checkpoint is an acceptance-matrix refresh and explicit security review for bounded prior-user-turn egress plus the durable clarification lifecycle. Existing server-authored option IDs, exact source-turn reauthorization, provenance, current-turn-only fallback, and the prohibition on assistant/tool/workspace text in external queries remain mandatory.paullizer commentedon Jul 18, 2026
Phase 10C contextual goals and structured clarification is implemented in draft PR #1049 from commit
b9443d24.What changed:
0.250.076.Validation:
PR: #1049
paullizer commentedon Jul 20, 2026
Planner-first Phase 10C follow-up is complete in PR #1049, commit
ed5294cf.direct,propose, orclarify; deterministic requirement heuristics no longer suggest or auto-activate capabilities in Assist.0.250.077.Validation: exact selected-model non-executing probe returned a valid Deep Research proposal with Web Search alternative in 4.017 seconds; cumulative gate 352 passed / 11 skipped; BAC 17 files passed; XSS 19 files passed; JavaScript syntax and diagnostics passed.
paullizer commentedon Aug 6, 2026
Post-10C orchestration architecture checkpoint
Completed an end-to-end review of the orchestration roadmap beyond the merged Phase 10C baseline (
0.250.077). The local private planning set now extends the architecture through output planning, user control, model routing, workflow tasks, governed memory/context, integration journeys, and consequential actions.Key decisions:
prefer,avoid,require,explicit_only,ask_first,forbid, andautomatic_when_useful.deliverable_intentandmaterialized_deliverable_plan; prompt markers and character thresholds become hints/fallbacks rather than primary product behavior.New/refined roadmap slices:
Validation of the private planning docs:
This checkpoint updates planning only. It does not claim Phases 11A-19 are implemented, does not change application code/version, and creates no tracked worktree changes because the planning folder is intentionally private/ignored.
Refs #1021. Related generated-output work: #1071.
docs: reference issue microsoft#1332 in release notes and fix documen…