# AGENTS.md This file provides guidance to Kilo when working with code in the zesdex repository. ## Best Practice Conventions Zesdex follows Kana Engineering Best Practices: 1. **Clean Architecture** — Strict domain/application/infrastructure/presentation layering. - Domain has ZERO framework dependencies. - Application depends only on domain. - Infrastructure implements domain traits. - DTOs cross layer boundaries, NOT entities. 2. **Clean Code** — Functions under ~40 lines, one level of abstraction per function, descriptive names, no flag arguments, no commented-out code. 3. **Documentation** — Every pub fn, struct, enum, and trait needs a doc comment (///) explaining what, flow, why, and return value. 4. **Commit Convention** — Conventional Commits in Bahasa Indonesia: `feat(scope):`, `fix(scope):`, `chore:`, `docs:`. 5. **Error Handling** — `anyhow::Result` and `anyhow::bail!` throughout. Log with `tracing` (never stderr). 6. **Testing** — `#[cfg(test)] mod tests` blocks inline in production files. Tests are F.I.R.S.T. (Fast, Independent, Repeatable, Self-validating, Timely). 7. **No Compiler Bypasses** — Never use `#[allow(...)]`, `#[expect(...)]`, or `#[allow(dead_code)]`. Fix the underlying code. 8. **Boy Scout Rule** — Leave every module cleaner than you found it. ## Available Agents - `@rust-engineer` — Rust clean architecture specialist (subagent). - `@code-reviewer` — Code review specialist (subagent). ## Available Commands - `/check` — Run cargo check, clippy, and tests. - `/audit` — Code quality audit against clean-architecture best practices. - `/doc` — Generate or update doc comments.