HiveMind AI is a local-first orchestrator for coordinating multiple coding agents through deterministic runtime state, file-based artifacts, and explicit review loops.
Current operating model:
- Codex: design and review
- Claude Code: implementation and fix
- Orchestrator: state, validation, transitions, locks, and audit trail
- Human: initializes runs and resolves blocked decisions
The repository is currently used in a manual human-in-the-loop workflow, while the codebase moves toward more autonomous orchestration.
- coordinate multiple AI workers without relying on hidden conversational memory
- make artifacts the source of truth
- preserve deterministic phase transitions
- validate outputs before advancing the workflow
- keep an audit trail through files, logs, tests, and git checkpoints
Key directories and files:
orchestrator/: Python runtime packagetests/: test suite.ai-loop/: live coordination workspaceorchestrator_runtime_spec.md: runtime contract and artifact/state schemadocument.md: usage guide for the current workflow
Inside .ai-loop/:
input/: requirements, human queue, and prompt packagesartifacts/current/: active design, implementation, and review artifactsartifacts/history/: reserved for archived snapshotsstate/: workflow state and lock fileslogs/: audit log
- Windows environment with
py - Python 3.10+
pytestavailable throughpy -m pytest
Run tests:
py -m pytest -qRun the CLI:
py -m orchestrator --helpCommon commands:
py -m orchestrator status
py -m orchestrator validate
py -m orchestrator check-transition
py -m orchestrator run
py -m orchestrator init --requirement .ai-loop/input/requirement.md --forceOr from Git Bash:
bash runBy default, run invokes:
codex exec -fordesigningandreviewingclaude -pforimplementingandfixing
If your local CLI uses different arguments, override them with:
$env:HIVEMIND_CODEX_COMMAND = 'codex exec --cwd {cwd} {prompt_path}'
$env:HIVEMIND_CLAUDE_COMMAND = 'claude -p'Available placeholders inside these command templates:
{prompt_path}{cwd}{phase}{run_id}{iteration}{phase_attempt}{agent}
- Define the requirement in
.ai-loop/input/requirement.md. - Initialize or inspect run state in
.ai-loop/state/workflow_state.json. - Run
bash runto generate the prompt package and invoke the responsible agent. - Codex produces
design.md. - Claude implements code and updates
implementation_report.md. - Codex reviews and updates
review.mdandreview.json. - Claude fixes review findings until the review result becomes
PASS.
Important rule:
- If implementation requires a design change, Claude should propose it in
design_amendments.mdinstead of directly editingdesign.md.
The runtime already includes:
- workflow state models and persistence
- lock management
- artifact parsing and validation
- transition logic
- CLI commands
- test coverage for the reviewed behaviors
- See
document.mdfor the practical operator guide. - See
orchestrator_runtime_spec.mdfor the detailed runtime contract.