Repository navigation
Conversation
…ue resolver
A self-contained example workflow that resolves a single GitHub or Linear
issue end-to-end through a deterministic, gate-driven pipeline. Reads the
issue, plans adversarially, implements with TDD, runs lint/CI/E2E gates,
audits the work, and opens a PR — with three human-approval gates along
the way.
Run:
bun codex-workflow run examples/multi-agent-workflow/workflow.js \
--config examples/codex-workflow.config.ts \
--args '{"tracker":"gh","issueId":123}'
Files:
- workflow.js (~250 lines): 10 phases + 3 gates, using the same
meta/agent/parallel/pipeline/phase/args primitives as hello.js and
complex-chain.js. Original code — no structure derived from the
reverse-engineered deep-research.js / code-review.js research notes.
- README.md: phase table, when-to-use, subagent inventory.
- SETUP.md: first-time setup (Bun, codex-workflow, pi-coding-agent,
MiniMax provider block). Documents the env:envVar resolution order.
- ORCA.md: end-to-end Orca Tasks UI flow (single-issue + parallel
multi-issue), HITL gate dual-mode (Orca gate UI vs TUI chat fallback),
monitoring commands, common errors.
- setup.sh: idempotent bash installer that checks for required tools,
installs what is missing, prompts for MINIMAX_API_KEY, persists
LINEAR_API_KEY, and validates the workflow parses + dry-runs.
- agents/: seven vendored subagents in codex-workflow-compatible
markdown (4 reused from the four-lens pattern — arch/product/sec/test,
2 planning-specific — scope/dod-coverage, 1 dedicated auditor).
Pairs with an ADR-0182-blessed IssueTrackerPort in agentskit-os; the
workflow consumes the port via the new @agentskit/os-issue-tracker
package (separate PR against AgentsKit-io/agentskit-os).
Validated locally:
node dist/cli.js validate examples/multi-agent-workflow/workflow.js
→ ✓ valid workflow: multi-agent-workflow (10 phases detected)
node dist/cli.js doctor → ✓ Bun runtime (1.4.0), others as expected.
Note: this PR deliberately does NOT touch
examples/codex-workflow.config.ts (vendor-neutral). MiniMax is documented
in SETUP.md; users add the provider block to their own config.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(examples): add multi-agent-workflow — deterministic 10-phase issue resolver
A self-contained example workflow that resolves a single GitHub or Linear
issue end-to-end through a deterministic, gate-driven pipeline. Reads the
issue, plans adversarially, implements with TDD, runs lint/CI/E2E gates,
audits the work, and opens a PR — with three human-approval gates along
the way.
Run:
bun codex-workflow run examples/multi-agent-workflow/workflow.js \ --config examples/codex-workflow.config.ts \ --args '{"tracker":"gh","issueId":123}'What's in this PR
workflow.js(~250 lines): 10 phases + 3 gates, using the samemeta/agent/parallel/pipeline/phase/argsprimitives ashello.jsandcomplex-chain.js. Original code — no structure derived from the reverse-engineereddeep-research.js/code-review.jsresearch notes.README.md: phase table, when-to-use, subagent inventory.SETUP.md: first-time setup (Bun, codex-workflow, pi-coding-agent, MiniMax provider block). Documents the env:envVar resolution order.ORCA.md: end-to-end Orca Tasks UI flow (single-issue + parallel multi-issue), HITL gate dual-mode (Orca gate UI vs TUI chat fallback), monitoring commands, common errors.setup.sh: idempotent bash installer that checks for required tools, installs what is missing, prompts forMINIMAX_API_KEY, persistsLINEAR_API_KEY, and validates the workflow parses + dry-runs.agents/: seven vendored subagents in codex-workflow-compatible markdown (4 reused from the four-lens pattern —arch/product/sec/test, 2 planning-specific —scope/dod-coverage, 1 dedicated auditor).The 10 phases
rgi-lens-scope+rgi-lens-dod-coveragergi-lens-arch+rgi-lens-productpnpm check:*)multi-agent-auditor(dedicated)Pairs with the agentskit-os monorepo
The workflow consumes an
IssueTrackerPortper ADR-0182 in theAgentsKit-io/agentskit-osmonorepo. The port + GitHub (ghCLI) + Linear (GraphQL) + in-memory adapters ship in a new package@agentskit/os-issue-tracker(separate PR). This example references that contract — when the monorepo PR lands first, the workflow's tracker calls land against the new port; when this PR lands first, the workflow ships withgh issue viewcalls directly via its inline Agent 1.A MiniMax provider (HTTP, OpenAI-compatible via
https://api.minimax.io/v1) is wired in the consumer monorepo (os-coding-agents+os-runtime-agentskit+os-coreenum +os-headlessintegration-setup). This PR is vendor-neutral: it does NOT touchexamples/codex-workflow.config.ts(a separate change if MiniMax is blessed upstream).Validated locally
Note on
npm testnpm testhangs in this repo on a pre-existing test (tests/deep-research-compat.test.tsthat boots the in-process viewer). It is not caused by this PR — the example itself parses and validates cleanly. The maintainer may want to investigate the hang separately; CI (npm ci && npm run typecheck && npm test) will surface this if it pre-existed onmain.Risk for reviewers
examples/multi-agent-workflow/) is new — all 7 other examples live flat. I'm proposing this because the workflow ships with 7 subagent files + 4 docs + workflow.js + setup.sh, which would clutter a flat layout. Happy to split if the maintainer prefers flat per-example.codex-workflowalready provides (meta/agent/parallel/pipeline/phase/log/args/budget). The MiniMax provider is documented inSETUP.mdand wired by the user, not by this PR.