Skip to content
Draft
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions docs/adr/0008-adaptive-contextual-orchestrator-default.md
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions packages/contextual-orchestrator/src/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ export function createContextualOrchestratorClient(options) {
headers,
body: JSON.stringify({
model: normalized.model,
mode: 'auto',
messages,
temperature: 0,
stream: false,
Expand Down
1 change: 1 addition & 0 deletions packages/contextual-orchestrator/test/client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Loading