Last updated: 2026-06-30 (v37 audit overhaul)
helios-cli is a hard fork of the OpenAI Codex CLI (upstream severed 2026-06-30).
The codex-rs/ and codex-cli/ trees are retained as vendored reference material
and are excluded from the Cargo workspace (exclude = ["codex-rs", ...] in the
root Cargo.toml). They are not built, tested, or linted by CI. Do not add them back
to the workspace without an explicit decision record.
helios-cli/ Workspace root (resolver = "2")
├── crates/
│ ├── helios_config Centralised workspace config (types, defaults)
│ ├── harness_interfaces Core trait definitions shared across harness crates
│ ├── harness_schema Zod-equivalent: serde types for run manifests
│ ├── harness_spec FR/spec tracing and assertion helpers
│ ├── harness_utils Shared utilities (IO, error, path helpers)
│ ├── harness_queue Bounded async task queue
│ ├── harness_runner Task executor — drives a single harness run
│ ├── harness_orchestrator Multi-agent orchestration layer
│ ├── harness_scaling Concurrency / parallelism controls
│ ├── harness_cache Result caching (on-disk + in-memory)
│ ├── harness_checkpoint Mid-run state snapshots and resume
│ ├── harness_rollback Checkpoint-based rollback primitives
│ ├── harness_discoverer Spec / test discovery (file-system walker)
│ ├── harness_normalizer Input normalisation before dispatch
│ ├── harness_elicitation Interactive elicitation stubs (A2A / MCP)
│ ├── harness_teammates Agent team registry and comms
│ ├── harness_verify Post-run result verification
│ ├── harness_recorder KLA — CLI recording / screenshot tool (binary: kla)
│ ├── forge3_client HTTP client for the forge3 multi-agent daemon
│ ├── pheno-plugin Plugin trait and lifecycle manager
│ ├── plugin-arch Architectural plug-in registry
│ └── arch_test Architecture rule tests (dependency constraints)
│
├── codex-rs/ EXCLUDED — vendored Codex Rust workspace (read-only ref)
├── codex-cli/ EXCLUDED — vendored Codex Node CLI (read-only ref)
└── helios-rs/ EXCLUDED — vendored helios-rs workspace (read-only ref)
harness_interfaceshas no internal deps — it is the leaf all other crates may import.helios_configmay importharness_interfacesonly.- Utility crates (
harness_utils,harness_schema,harness_spec) may importharness_interfacesandhelios_config. - Feature crates import utility crates; never import peer feature crates directly —
use
harness_interfacestraits. harness_orchestratoris the only crate that may depend on multiple feature crates.arch_testenforces these rules viacargo_metadata+ cycle checks; CI runs it.
Each crate exposes a single pub use prelude block in src/lib.rs. External crates
import from the crate root, never from internal modules. Internal modules use
pub(crate) or pub(super) unless the item is part of the crate's public contract.
helios-cli is intentionally stateless between runs at the library level. Checkpoint
and rollback state is written to $HELIOS_DATA_DIR (default ~/.helios/) as
newline-delimited JSON files, one per run ID. No SQL migrations or embedded database.
If a daemon-style persistence model is needed in future, the decision belongs in an ADR.
- Async runtime:
tokio(fullfeature), one runtime per process. - Cross-task communication:
tokio::sync::mpscandSemaphore. Hand-rolled bounded queues (harness_queue) exist but must be migrated totokio::sync::mpsc(audit finding L4 — tracked indocs/adrs/). - Cancellation:
tokio_util::CancellationTokenis the standard (not ad-hocAtomicBool). - Lock ordering: document in code with
// Lock order: A < Bcomments when two mutexes are held simultaneously. No transitive lock cycles allowed.
Structured logging uses tracing + tracing-subscriber with EnvFilter (controlled
by RUST_LOG). The log bridge (tracing-log) forwards legacy log:: macros into the
same subscriber. OTel export and Prometheus metrics are not yet wired (audit finding L5).
The upstream codex-rs/ Cargo workspace is a separate root with its own lockfile.
Including it as a workspace member caused:
- Phantom dependency surface inflating audit scores.
- CI build failures when expected source crates were absent.
- Confusing
cargo test --workspaceoutput mixing upstream and helios tests.
Decision (2026-06-30): exclude and treat as non-buildable vendored reference material until a deliberate decision to fork specific crates is made and documented in an ADR.