Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 2.4 KB

AGENTS.md

File metadata and controls

24 lines (15 loc) · 2.4 KB

Repository Guidelines

Project Structure & Module Organization

src/main.rs is the entrypoint and decides whether to bootstrap a tmux session or run the in-session TUI with --inside <session>. Core logic lives in src/: app.rs orchestrates phases and logging, tmux.rs manages panes and session control, ui.rs renders Ratatui widgets, input.rs handles keyboard and mouse events, and phase.rs defines workflow state. Build output goes to target/; transient collaboration files are written under /tmp/ma_*. There is no dedicated tests/ or assets/ directory yet.

Build, Test, and Development Commands

cargo run starts the app locally.

cargo run -- --inside <session> runs the UI inside an existing tmux session for debugging.

cargo build compiles the binary.

cargo test compiles and runs tests; at the moment it mainly acts as a compile check and currently reports 0 tests.

cargo fmt applies standard Rust formatting. cargo fmt --check currently fails on tracked source files, so format changes before submitting if you touch those areas.

Coding Style & Naming Conventions

Follow Rust 2024 conventions and rustfmt defaults: 4-space indentation, trailing commas where formatter output expects them, and grouped imports. Use snake_case for modules, files, and functions, and CamelCase for structs and enums. Prefer explicit error propagation with anyhow::Result and Context. Keep terminal-facing copy consistent with the existing Chinese prompts unless you are intentionally standardizing a full flow.

Testing Guidelines

Add focused unit tests beside the relevant module with #[cfg(test)] for state transitions and input handling. Put end-to-end or CLI-oriented coverage in tests/ when tmux orchestration needs integration coverage. Name tests after behavior, for example dispatch_moves_to_waiting_phase. For manual checks, verify tmux, codex, and claude are available on PATH, then exercise one full dispatch, review, and summary cycle.

Commit & Pull Request Guidelines

Recent history uses Conventional Commit prefixes such as docs: and chore:. Follow type: imperative summary, for example feat: add summary completion state. Keep commits scoped to one behavior change. Pull requests should explain the user-visible workflow impact, link related issues when available, and include terminal screenshots or short recordings for TUI layout or interaction changes.