Skip to content

fix(providers): install codex dual-mode adapter + provider-list corrections - #22

Merged
pacphi merged 6 commits into
mainfrom
fix/codex-adapter-prerequisite
Jul 15, 2026
Merged

pacphi merged 6 commits into
mainfrom
fix/codex-adapter-prerequisite

Conversation

@pacphi

@pacphi pacphi commented Jul 15, 2026 •

Copy link
Copy Markdown
Owner

Summary

Started as a fix for the ruflo init --dual failed warning from ak x provider pick, and grew into a cleanup of codex dual-mode support plus a full static-quality CI pipeline. Every provider/tooling claim is grounded in the installed ruflo/agentic-qe source, not assumptions. The published package stays zero-runtime-dependency throughout — all new tooling is devDependencies + CI only.

Commits & deliverables

Commit Type Deliverable
ff9fd98 fix Install @claude-flow/codex before ruflo init --dual. Dual-init aborts when the adapter (a separate npm global from the codex CLI) is missing. Now treated as a managed prerequisite, installed only when codex is opted-in in kit.json AND the codex CLI is detected. Decision logic in a pure codexAdapterAction() for hermetic tests.
a2e5692 docs Surface aqe billing categories in the interactive prompt, status, and --help via one shared AQE_BILLING_HINT, plus a PROVIDERS.md paragraph. Explains why claude-code is the only subscription option (codex/gemini OAuth live on the host axis, not as aqe provider types).
1267a02 fix Add missing onnx provider type. aqe's ALL_PROVIDER_TYPES has 10 entries incl. onnx (local, $0); ak listed 9 and wrongly rejected --aqe-provider onnx. Added, folded into the local billing category, with a drift-guard test.
7101bbd ci Full static-quality toolchain (see below).
c47713a chore .gitignore consistency for codex. Ignore the generated .agents/ dir + .codex/ overrides (mirroring .claude/); drop the redundant lines ruflo init --dual auto-appended.
5916f22 docs Track a lean, accurate AGENTS.md. The generated 172-line boilerplate had false facts (TypeScript/DDD, nonexistent scripts, a Co-Authored-By trailer violating the project rule, swarm numbers contradicting CLAUDE.md). Replaced with a short mirror of CLAUDE.md; kept out of the published tarball.

CI + tooling detail (7101bbd)

Scripts (package.json): typecheck (tsc --checkJs + @types/node), lint / lint:fix (eslint flat), lint:md / lint:md:fix (markdownlint-cli2), lint:links (+ offline :internal, lychee), build (packaging + CLI-load validation), audit / audit:fix, outdated / upgrade (pnpm, compatible), and an umbrella check.

Scoped ignores — eslint / markdownlint / lychee all skip vendored ruflo/aqe trees (.claude, .agentic-qe, .agents) and docs/archive; the emitted statusline template keeps its var/ANSI idioms via a narrow eslint override.

Where each gate runs:

Gate PR (ci.yml) Nightly (nightly.yml)
test matrix (3 OS × 3 node) ✅ zero-install, fast —
typecheck / lint / md / build / audit (quality job) ✅ only job installing devDeps —
internal / relative links (links job) ✅ offline, deterministic —
external links — ✅ (network + rate-limits make them flaky per-PR)

Bugs the new gates caught & fixed: an undocumented pkgRoot option (selfDrift JSDoc, 3 tsc errors), a bin command-table type gap, a let→const, a dead assignment in heal.mjs, and untagged code fences in PROVIDERS.md.

Test plan

  • pnpm run check (typecheck + lint + md + build + test): green
  • 66 unit tests + 20 statusline, all passing
  • Link check: 20 OK, 0 errors; pnpm audit: 0 vulnerabilities; pnpm outdated: all current
  • CI: all 11 jobs green (9× test matrix, quality, links)

Grounding

  • ruflo ADR-034 optional backends (ENABLE_CODEX / dual-mode) + @claude-flow/codex adapter error path
  • agentic-qe ALL_PROVIDER_TYPES (dist/shared/llm/router/types.js), onnx local classification (config-store.js, interfaces.d.ts), ADR-123 billing modes
  • codex login / codex login --with-api-key (subscription vs key — host axis, not an aqe provider type)

🤖 Generated with Claude Code

pacphi added 6 commits July 15, 2026 06:59
…--dual

ruflo init --dual aborts with 'The @claude-flow/codex package is not
installed' when the dual-mode adapter (a separate npm global from the codex
CLI) is missing. ak detected the codex CLI and ran dual-init but never
installed the adapter, so setup/pick surfaced a bare 'ruflo init --dual
failed' warning and ak sync never healed it.

Treat @claude-flow/codex as a managed prerequisite of dual-mode: install it
before dual-init, guarded so it only runs when the codex host is opted-in
AND the codex CLI is actually detected. Absent CLI or already-installed
adapter are no-ops. Decision logic factored into pure codexAdapterAction()
for hermetic tests.
… docs

The aqe provider list mixes subscription, local, and metered-API providers
with no visual cue which is which — the costly-if-wrong ambiguity being
claude-code ($0 subscription) vs claude (metered key). Add one shared
AQE_BILLING_HINT line to the interactive prompt, status output, and per-command
help, and a docs paragraph explaining why claude-code is the only subscription
option (codex/gemini OAuth live on the host axis, not as aqe provider types).
Grounded in agentic-qe ALL_PROVIDER_TYPES + codex login modes.
aqe's ALL_PROVIDER_TYPES (dist/shared/llm/router/types.js) exposes 10 provider
types including onnx (a local, $0 on-device runtime, default model phi-4), but
ak listed only 9 — so ak wrongly rejected --aqe-provider onnx as unknown even
though aqe accepts it. Add onnx, fold it into the local ($0) billing category
alongside ollama across help/status/docs/README, and add a drift-guard test
pinning AQE_PROVIDER_TYPES to aqe's set.
Adds a full static-quality toolchain (devDependencies only — the published
package stays zero-runtime-dependency) plus scripts and CI wiring:

package.json scripts: typecheck (tsc --checkJs + @types/node), lint / lint:fix
(eslint flat config), lint:md / lint:md:fix (markdownlint-cli2), lint:links
(+ :internal offline variant, lychee), build (packaging + load validation),
audit / audit:fix, outdated / upgrade (pnpm), and an umbrella 'check'.

Configs scope every linter to OUR code: eslint/markdownlint/lychee all ignore
vendored ruflo/aqe trees (.claude, .agentic-qe, .agents) and docs/archive. The
emitted statusline template keeps its var/ANSI idioms via a narrow eslint
override; MD060 (cosmetic table-pipe alignment) disabled.

CI (ci.yml): existing zero-install test matrix (3 OS x 3 node) unchanged; new
'quality' job (typecheck/lint/lint:md/build/audit, the only job that installs
devDeps) and internal 'links' job (offline, deterministic). External link
checking moved to nightly (network + rate-limits make it flaky per-PR).

Fixes surfaced by the new gates:
- selfDrift(): JSDoc @PARAM documenting the pkgRoot option (3 tsc errors)
- bin command table: @type annotation for the porcelain/plumbing union
- setup.mjs let->const, heal.mjs drop unused assignment (eslint)
- PROVIDERS.md code-fence languages + table reflow (markdownlint)

All gates green locally: typecheck, eslint, markdownlint, build (27 files),
66+20 tests, links (20 OK), audit (0 vulns).
…t dupes

ruflo init --dual writes codex-side artifacts. Mirror the existing claude
convention (.claude/ ignored, CLAUDE.md tracked): ignore the generated .agents/
dir and .codex/ local overrides under the dogfooding-artifacts section. Also
remove the redundant lines dual-init auto-appended (.claude-flow/data|logs are
covered by .claude-flow/; .env/.env.local/.env.*.local by .env + .env.*).
ruflo init --dual generated a 172-line AGENTS.md of stock boilerplate with facts
that are false for this repo (TypeScript/DDD tech stack, npm run build/dev scripts
that don't exist, a Co-Authored-By trailer that violates the project rule, swarm
numbers contradicting CLAUDE.md). Replace it with a short, accurate file mirroring
CLAUDE.md: correct swarm config, real pnpm commands, the no-trailer rule, and a
pointer to machine-wide guidance. Codex reads AGENTS.md the way Claude Code reads
CLAUDE.md. Add it to the markdownlint globs + link-check inputs; it stays out of
the published tarball (dev-facing, like CLAUDE.md).
@pacphi
pacphi merged commit f5051c7 into main Jul 15, 2026
11 checks passed
@pacphi
pacphi deleted the fix/codex-adapter-prerequisite branch July 15, 2026 14:42
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.

1 participant