- Created solid.md to document the SOLID principles for clean code practices. - Created tdd.md to outline Test Driven Development principles and practices. - Added kana-rust-backend-best-practice.md as a reference guide for building a Rust backend using Axum and SeaORM. - Established push-flow-convention.md to enforce pre-commit and pre-push hooks with versioning rules. - Introduced AGENTS.md to provide guidance on best practices and available commands for Kilo. - Configured kilo.json to include new skills and agents for enhanced functionality. - Added lefthook.yml for managing git hooks to ensure code quality and adherence to conventions.
1.6 KiB
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:
-
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.
-
Clean Code — Functions under ~40 lines, one level of abstraction per function, descriptive names, no flag arguments, no commented-out code.
-
Documentation — Every pub fn, struct, enum, and trait needs a doc comment (///) explaining what, flow, why, and return value.
-
Commit Convention — Conventional Commits in Bahasa Indonesia:
feat(scope):,fix(scope):,chore:,docs:. -
Error Handling —
anyhow::Resultandanyhow::bail!throughout. Log withtracing(never stderr). -
Testing —
#[cfg(test)] mod testsblocks inline in production files. Tests are F.I.R.S.T. (Fast, Independent, Repeatable, Self-validating, Timely). -
No Compiler Bypasses — Never use
#[allow(...)],#[expect(...)], or#[allow(dead_code)]. Fix the underlying code. -
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.