- Add AGENTS.md with agent specifications - Add MIYABI.md with project overview - Add README.github.md for GitHub display - Add .miyabi/ configuration directory 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
2.6 KiB
2.6 KiB
Repository Guidelines
Project Structure & Module Organization
- Rust workspace lives under
crates/:miyabi-cli(CLI entry),miyabi-tui(UI), andmiyabi-core(shared logic, config, sessions). Shared workspace config inCargo.toml. - TypeScript side sits in
src/withindex.tsas the entry point; Vitest specs live intests/. Build artifacts output todist/. - Supporting assets:
.claude/agent configs,docs/for design notes,.miyabi/for local runtime data, and.github/for CI workflows.
Build, Test, and Development Commands
- Rust:
cargo build --workspace --release(release build),cargo test --all(unit/integration),cargo clippy --all-targets -- -D warnings(lint),cargo fmt --all(format). - TypeScript:
npm run dev(tsx watch),npm run build(tsc emit todist/),npm run typecheck(tsc no emit),npm run lint(eslint per.eslintrc.json),npm test(vitest). - Install toolchains:
npm installfor JS deps; Rust uses stable 1.75+ per workspace metadata.
Coding Style & Naming Conventions
- Rust: run
cargo fmtbefore commits; clippy must be clean with-D warnings. Modules/files usesnake_case, types/traitsPascalCase, constantsSCREAMING_SNAKE_CASE. Preferanyhow::Resultandthiserrorfor errors; avoidunwrapin non-test code. - TypeScript: strict mode on; avoid
any(warned), silence unused via_prefix. Follow ESLint rules and keep imports sorted logically. Prefer async/await over callbacks.
Testing Guidelines
- Rust tests colocated in each crate (
mod testsblocks ortests/directories); write integration tests when touching cross-crate behavior. Runcargo test --allbefore PRs. - TypeScript tests follow
*.test.tsintests/; structure withdescribe/itand keep fast. Aim to cover error paths and CLI flags.
Commit & Pull Request Guidelines
- Use Conventional Commits (
feat:,fix:,refactor:,docs:,test:,chore:). Keep subject under ~72 chars; include scope when helpful (feat(tui): add diff renderer). - PRs should describe the change, linked issue, and test evidence (
cargo test --all,npm test, etc.). Add screenshots or terminal recordings for TUI changes when relevant. Keep diffs focused; separate refactors from feature work.
Environment & Configuration
- Environment defaults from
.env.example; typical variables:GITHUB_TOKEN,ANTHROPIC_API_KEY,REPOSITORY, optionalRUST_LOG/RUST_BACKTRACEfor debugging. - Local config/state lives in
~/.miyabi/and.miyabi/(do not commit secrets). Review.miyabi.ymlfor runtime behavior before modifying agent workflows.