diff --git a/CHANGELOG.md b/CHANGELOG.md index f498fd9..dbbbff2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The project follows Semantic Versioning after the first release. ### Changed +- Contextual Orchestrator edit-proposal requests now use `mode: "auto"`, leaving model/provider choice, workflow depth, verification, fallback, and known-price optimization to the orchestration plane instead of fixing the consumer to one model call. - Hourly development now routes an open same-repository pull request into an RCA-driven exact-head remediation session, verifies candidate actions against live review and Check evidence, publishes only a normal fast-forward repair diff --git a/docs/adr/0008-adaptive-contextual-orchestrator-default.md b/docs/adr/0008-adaptive-contextual-orchestrator-default.md new file mode 100644 index 0000000..ba625f8 --- /dev/null +++ b/docs/adr/0008-adaptive-contextual-orchestrator-default.md @@ -0,0 +1,26 @@ +# ADR-0008: Adaptive contextual-orchestrator mode is the proposal default + +- Status: Accepted +- Date: 2026-08-16 + +## Context + +DiagramWeave's adapter sent an OpenAI-compatible request without an explicit orchestration policy. The gateway currently defaults an omitted mode to adaptive behavior, but the consumer contract did not make that requirement reviewable or regression-safe. A consumer-selected single-model route would also prevent the orchestration plane from allocating additional test-time compute when a difficult proposal requires verification. + +## Decision + +Every edit-proposal request includes `mode: "auto"`. + +The orchestration plane owns model and provider selection, workflow depth, verification, fallback, and known-price optimization. Quality sufficiency is the first constraint; cost is minimized among execution paths that satisfy it. Unknown price metadata is not interpreted as zero cost. + +DiagramWeave continues to own the source-first prompt, revision binding, strict JSON extraction, scope validation, and Core proposal validation. Explicit route or conduct modes are reserved for controlled ablation or a documented operational override and are not adapter defaults. + +## Consequences + +Simple proposals may still use one worker when the adaptive policy finds that sufficient. Harder proposals may use deeper orchestration without changing the DiagramWeave API. The adapter remains provider-neutral and sends no tool authority. + +## References + +Omidvar, H., & Akhlaghi, V. (2026). *A communication-theoretic framework for LLM agents: Cost-aware adaptive reliability* [Preprint]. arXiv. https://doi.org/10.48550/arXiv.2605.09121 + +Tang, Y., Cetin, E., Xu, J., Sun, Q., Nielsen, S., Richard, V., Goda, H., Tymchenko, I., Nguyen, N., Lee, H., Ashiga, M., Kotyan, S., Kuroki, S., & Clanuwat, T. (2026). *Sakana Fugu technical report* [Technical report]. arXiv. https://doi.org/10.48550/arXiv.2606.21228 diff --git a/packages/contextual-orchestrator/src/client.js b/packages/contextual-orchestrator/src/client.js index e5aad75..6da47f8 100644 --- a/packages/contextual-orchestrator/src/client.js +++ b/packages/contextual-orchestrator/src/client.js @@ -383,6 +383,7 @@ export function createContextualOrchestratorClient(options) { headers, body: JSON.stringify({ model: normalized.model, + mode: 'auto', messages, temperature: 0, stream: false, diff --git a/packages/contextual-orchestrator/test/client.test.js b/packages/contextual-orchestrator/test/client.test.js index ffd0d60..7eca67c 100644 --- a/packages/contextual-orchestrator/test/client.test.js +++ b/packages/contextual-orchestrator/test/client.test.js @@ -201,6 +201,7 @@ test('client sends a bounded OpenAI-compatible request and validates the proposa assert.equal(observedOptions.headers['content-type'], 'application/json'); assert.equal(observedOptions.headers.authorization, 'Bearer operator_secret'); assert.equal(body.model, 'contextual-orchestrator'); + assert.equal(body.mode, 'auto'); assert.equal(body.temperature, 0); assert.equal(body.stream, false); assert.equal(body.messages.length, 2);