1.7 KiB
1.7 KiB
Agent Fleet - Codex Working Instructions
Project Overview
Agent Fleet Platform: a multi-agent orchestration system built with Rust + axum.
- Forgejo (Issue/PR) = task source of truth
- Matrix = real-time ChatOps
- Orchestrator = single binary (Rust + zigbuild)
Code Style
- Rust 2024 edition
- Use
thiserrorfor error types - Use
serdefor serialization - All DB operations go through
EventStoremethods (never exposeconndirectly outside EventStore) Arc<Mutex<EventStore>>is the shared state pattern- axum handlers use
State<Arc<Mutex<EventStore>>>or custom AppState
Architecture
src/core/- business logic (models, event_store, state_machine, task_queue, timeout, retry)src/api/- axum HTTP handlerssrc/integrations/- Forgejo API client, Matrix botsrc/adapters/- Agent adapter interface + concrete implementationssrc/config.rs- TOML config loading
Current State
- Core data models, event store, state machine, task queue, timeout checker, retry policy are implemented
- API handlers in
main.rsare stubs returning "TODO" - Need to implement: Agent Registry API, Receipt API, Forgejo webhook handler, Matrix bot, Agent adapters
Key Files
openspec/changes/agent-fleet-platform/specs/- per-capability specs with WHEN/THEN scenariosopenspec/changes/agent-fleet-platform/design.md- architecture decisionsopenspec/changes/agent-fleet-platform/tasks.md- implementation checklist
Forgejo Config
- URL: https://git.0x08.org
- Token: see .env.local (not in git)
- Webhook secret: TBD
Important
- Always run
cargo checkafter changes - Always run
cargo testafter adding tests - Do not modify files in
openspec/directory - Keep changes small and focused