mirror of
https://github.com/openai/codex.git
synced 2026-09-16 12:13:30 +00:00
4.2 KiB
4.2 KiB
Codex Orchestration Framework: Plan & Open Questions
This document collects the high‑level architecture, planned features, and unresolved design decisions for the proposed codex-agents orchestration framework.
1. Architecture & Core Components
-
XDG‑compliant configuration & state
- Repo‑local overrides:
<repo>/.codex-agent/config.toml - User‑wide config:
$XDG_CONFIG_HOME/codex-agents/config.toml - Global task registry:
$XDG_DATA_HOME/codex-agents/tasks.json
- Repo‑local overrides:
-
CLI & optional TUI
codex-agent init→ bootstrap repo (copy prompts, create directories)codex-agent status [--tui]→ show global and per‑repo task/merge statuscodex-agent config→ inspect or edit effective configcodex-agent agents→ view per‑agent instruction overrides
-
Task management (
codex-agent task)add,list,edit,worktree add|remove,validate,review,complete- Interactive AI Q&A flow for
task addto auto‑populate slug, goal, dependencies, and stub file
-
Worktree hydration
- OS‑aware reflink: macOS
cp -cRp, Linuxcp --reflink=auto, fallback torsync - COW setup via
git worktree add --no-checkout+ hydration step
- OS‑aware reflink: macOS
-
Merge & Conflict Resolver (
codex-agent merge)merge check→ dry‑run merge in temp worktreemerge resolve→ AI‑driven conflict resolution or explicit bail-outmerge rebase→ manual rebase entrypoint
-
Code Validator (
codex-agent task validate|review)- Run linters/tests, then invoke Validator agent prompt
- Enforce configurable policies (doc coverage, style rules, test thresholds)
-
Project Manager (
codex-agent manager)- Wave planning, parallel launch commands, live monitoring of worktrees
2. Phased Roadmap
| Phase | Deliverables |
|---|---|
| 1 | XDG config + global tasks.json + basic `task list |
| 2 | Merge check & conflict-resolver prompt + `merge check |
| 3 | Validator agent integration + `task validate |
| 4 | Project Manager planning & launching (`manager plan |
| 5 | Interactive task add QA loop + per-agent instruction overrides |
| 6 | TUI mode for status + live dashboard |
| 7 | Polishing docs, tests, packaging, and PyPI release |
3. Open Questions & Design Decisions
-
Global registry schema
- What additional fields should
tasks.jsontrack? (e.g. priority, owner, labels)
- What additional fields should
-
Config file format & schema
- TOML vs YAML vs JSON for
config.toml? - Which policy keys to expose for Validator and Resolver agents?
- TOML vs YAML vs JSON for
-
Per‑agent instruction overrides
- How to structure override files (
validator.toml,conflict-resolver.toml, etc.)? - Should we fallback to AGENTS‑style instruction files in the repo root if present?
- How to structure override files (
-
CLI command names & flags
- Confirm subcommand verbs (
merge resolvevstask rebase,task validatevstask lint) - Standardize flags for interactive vs non‑interactive modes
- Confirm subcommand verbs (
-
Conflict Resolver scope
- Auto‑resolve only trivial hunks, or attempt full rebase‑based AI resolution?
- How and when can the agent “give up” and hand control back to the user?
-
Validator policies & auto‑fix
- Default policy values (max line length, doc coverage %)
- Should
--auto-fixlet the agent rewrite code, or only report issues?
-
Interactive Task Creation
- Best UX for prompting the user: CLI Q&A loop vs opening an editor with agent instructions?
- How to capture dependencies and inject them into the new task stub?
-
Session restore UX
- Always on for
codex session <UUID>, or opt‑in via flag? - How to surface restore failures or drift in transcript format?
- Always on for
-
TUI implementation
- Framework choice (curses, Rich, Textual)
- Auto‑refresh interval and keybindings for actions (open worktree, resolve, validate)
-
Packaging & distribution
- Final PyPI package name (
codex-agentsvsai-orchestrator) - Versioning strategy and backwards‑compatibility guarantees
This plan will evolve as we answer these questions and move through the roadmap phases.