Skip to content

feat(provider): surface dual-host role delegation + qe-court routing awareness#38

Merged
pacphi merged 2 commits into
mainfrom
feat/provider-dual-host-qe-court-ux
Jul 20, 2026
Merged

feat(provider): surface dual-host role delegation + qe-court routing awareness#38
pacphi merged 2 commits into
mainfrom
feat/provider-dual-host-qe-court-ux

Conversation

@pacphi

@pacphi pacphi commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Summary

Closes #36. ak x provider already wires ruflo's dual-host env flags and agentic-qe's fallback chain, but had zero awareness of capability one layer up — this PR surfaces it without reimplementing any of it.

  • Phase 1 — guidance tips (role-delegation pointer to claude-flow-codex dual run --template ..., judge-vendor-bias note) printed once both hosts are enabled, in both pick and status.
  • Phase 2 — the interactive aqe-fallback prompt now suggests a claude-code:...; openai:... chain when codex is among the chosen hosts (codex's models route through the openai provider type).
  • Phase A/B/C (same-day issue amendment, qe-court/ADR-124, agentic-qe >= 3.13.0):
    • A: cross-sell tip when both hosts are enabled and aqe is new enough.
    • B: read-only routing table + invariant pass/fail in status.
    • C: opt-in [y/N] write of routing defaults in pick, validated against the same vendor-diversity / writer-is-never-juror invariants qe-court's own referee.ts enforces (ported into new src/lib/qeCourt.mjs). Only ever defaults an existing .claude/skills/qe-court/config.json — never creates one, and only ever touches the routing key.
  • Phase 3 (per-agent-type provider override) — spiked, not built. Read agent-router-config.d.ts / overlay-schema.d.ts / config-store.js off the installed agentic-qe@3.13.0 package directly: the override mechanism in agent-router-config.ts is 100% programmatic (in-memory Maps, no file I/O), and the BMAD-002 .claude/agent-overrides/*.yaml schema — while a real, stable on-disk surface — has no provider/model field at all (it's content/behavior-only). Closing as "not exposed yet upstream" per the issue's own stated fallback; will re-open if that changes.

Test plan

  • pnpm run check (typecheck + lint + markdown lint + build + full test suite) — clean, 169/169 tests pass
  • New unit tests: bothHostsEnabled/suggestedFallbackFor (providers.test.mjs), vendorOf/panelFromRouting/validatePanel/readQeCourtConfig (qeCourt.test.mjs, porting qe-court's own referee.js test cases)
  • New CLI-spawn smoke test (provider-cli.test.mjs): ak x provider status prints the tips once both hosts are enabled, and withholds them with only one host — run in an isolated XDG_CONFIG_HOME/HOME sandbox so it never touches the real machine's kit.json
  • Manually verified ak status on this repo shows no leftover corrupt-lock language (unrelated regression check, confirms nothing here touched that path)

🤖 Generated with Claude Code

…awareness

Closes the UX gap from issue #36: ak x provider wires ruflo's dual-host env
and aqe's fallback chain, but had no awareness of capability one layer up.

- Phase 1: guidance tips (role-delegation pointer, judge-vendor-bias note)
  printed once both hosts are enabled, in both `pick` and `status`.
- Phase 2: the interactive aqe-fallback prompt now suggests a
  claude-code+openai chain when codex is among the chosen hosts.
- Phase A/B/C: qe-court (ADR-124, aqe >= 3.13.0) cross-sell tip, read-only
  routing-table + invariant status in `status`, and an opt-in write of
  routing defaults in `pick` — validated against the same vendor-diversity/
  writer-is-never-juror invariants qe-court's own referee.ts enforces,
  ported into the new src/lib/qeCourt.mjs.
- Phase 3 (per-agent-type provider override) was spiked, not built: neither
  agent-router-config.ts's override mechanism nor the BMAD-002
  .claude/agent-overrides/*.yaml schema exposes a stable on-disk
  provider/model field today — closing as "not exposed yet upstream" per
  the issue's own stated fallback.
…XDG_CONFIG_HOME)

src/lib/paths.mjs's configBase() reads APPDATA on win32, not
XDG_CONFIG_HOME — so the Windows CI runners were reading (empty) real
machine state instead of the test's sandboxed kit.json, and the
dual-host-enabled assertion failed. Also point USERPROFILE at the sandbox
since that's what Windows os.homedir() reads instead of HOME.
@pacphi
pacphi merged commit 4b10dc5 into main Jul 20, 2026
11 checks passed
@pacphi
pacphi deleted the feat/provider-dual-host-qe-court-ux branch July 20, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Surface ruflo dual-mode role delegation + agentic-qe agent-type routing in ak's provider UX

1 participant