From 2db321f18481124f2b53329743ddf790a9c92601 Mon Sep 17 00:00:00 2001 From: Shunsuke Hayashi Date: Sat, 22 Nov 2025 22:23:43 +0900 Subject: [PATCH] docs: Add project documentation and Miyabi config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- .miyabi/README.md | 66 +++++++++++++++++++++++++++++++++ .miyabi/config.toml | 29 +++++++++++++++ .miyabi/prompts/code-review.md | 15 ++++++++ .miyabi/templates/issue.md | 15 ++++++++ AGENTS.md | 27 ++++++++++++++ MIYABI.md | Bin 0 -> 1849 bytes README.github.md | 2 + 7 files changed, 154 insertions(+) create mode 100644 .miyabi/README.md create mode 100644 .miyabi/config.toml create mode 100644 .miyabi/prompts/code-review.md create mode 100644 .miyabi/templates/issue.md create mode 100644 AGENTS.md create mode 100644 MIYABI.md create mode 100644 README.github.md diff --git a/.miyabi/README.md b/.miyabi/README.md new file mode 100644 index 0000000..9e26f91 --- /dev/null +++ b/.miyabi/README.md @@ -0,0 +1,66 @@ +# .miyabi Directory + +Miyabi CLI設定ディレクトリ + +## 構造 + +``` +.miyabi/ +├── agents/ +│ └── specs/ # Agent仕様定義 +├── commands/ # カスタムコマンド +├── prompts/ # 再利用可能プロンプト +├── templates/ # テンプレート +├── sessions/ # 保存されたセッション +└── config.toml # 設定ファイル +``` + +## 設定ファイル + +`config.toml` で設定をカスタマイズ: + +```toml +[api] +model = "claude-sonnet-4-20250514" +max_tokens = 8192 + +[ui] +theme = "tokyo-night" +vim_mode = false + +[session] +auto_save = true + +[tools] +enable_bash = true +``` + +## カスタムコマンド + +`commands/` 配下に `*.md` ファイルを作成してカスタムコマンドを定義。 + +## セッション管理 + +```bash +# セッション一覧 +miyabi sessions + +# Markdownエクスポート +miyabi sessions -m + +# 削除 +miyabi sessions -d +``` + +## 使い方 + +```bash +# TUI起動 +miyabi + +# バージョン情報 +miyabi version + +# ヘルプ +miyabi --help +``` diff --git a/.miyabi/config.toml b/.miyabi/config.toml new file mode 100644 index 0000000..64c718c --- /dev/null +++ b/.miyabi/config.toml @@ -0,0 +1,29 @@ +# Miyabi CLI Configuration + +[api] +# Anthropic API key (or set ANTHROPIC_API_KEY env var) +# api_key = "your-api-key-here" +model = "claude-sonnet-4-20250514" +max_tokens = 8192 +timeout_secs = 120 +max_retries = 3 + +[ui] +show_sidebar = false +show_status_bar = true +show_breadcrumb = true +theme = "tokyo-night" +vim_mode = false +show_line_numbers = true + +[session] +auto_save = true +auto_save_interval = 30 +max_sessions = 100 + +[tools] +enable_bash = true +enable_file_tools = true +enable_search_tools = true +auto_approve_low_risk = false +bash_timeout = 120 diff --git a/.miyabi/prompts/code-review.md b/.miyabi/prompts/code-review.md new file mode 100644 index 0000000..f3328ce --- /dev/null +++ b/.miyabi/prompts/code-review.md @@ -0,0 +1,15 @@ +# Code Review Prompt + +以下のコードをレビューしてください: + +## チェックポイント +- コードの品質と可読性 +- エラーハンドリング +- パフォーマンス +- セキュリティ +- テストカバレッジ + +## 出力形式 +1. 問題点(重要度順) +2. 改善提案 +3. 良い点 diff --git a/.miyabi/templates/issue.md b/.miyabi/templates/issue.md new file mode 100644 index 0000000..98a7319 --- /dev/null +++ b/.miyabi/templates/issue.md @@ -0,0 +1,15 @@ +# Issue Template + +## Description +[問題や機能の説明] + +## Requirements +- [ ] 要件1 +- [ ] 要件2 + +## Acceptance Criteria +- [ ] 完了条件1 +- [ ] 完了条件2 + +## Technical Notes +[技術的な注意点] diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..1bf44f3 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,27 @@ +# Repository Guidelines + +## Project Structure & Module Organization +- Rust workspace lives under `crates/`: `miyabi-cli` (CLI entry), `miyabi-tui` (UI), and `miyabi-core` (shared logic, config, sessions). Shared workspace config in `Cargo.toml`. +- TypeScript side sits in `src/` with `index.ts` as the entry point; Vitest specs live in `tests/`. Build artifacts output to `dist/`. +- 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 to `dist/`), `npm run typecheck` (tsc no emit), `npm run lint` (eslint per `.eslintrc.json`), `npm test` (vitest). +- Install toolchains: `npm install` for JS deps; Rust uses stable 1.75+ per workspace metadata. + +## Coding Style & Naming Conventions +- Rust: run `cargo fmt` before commits; clippy must be clean with `-D warnings`. Modules/files use `snake_case`, types/traits `PascalCase`, constants `SCREAMING_SNAKE_CASE`. Prefer `anyhow::Result` and `thiserror` for errors; avoid `unwrap` in 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 tests` blocks or `tests/` directories); write integration tests when touching cross-crate behavior. Run `cargo test --all` before PRs. +- TypeScript tests follow `*.test.ts` in `tests/`; structure with `describe/it` and 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`, optional `RUST_LOG`/`RUST_BACKTRACE` for debugging. +- Local config/state lives in `~/.miyabi/` and `.miyabi/` (do not commit secrets). Review `.miyabi.yml` for runtime behavior before modifying agent workflows. diff --git a/MIYABI.md b/MIYABI.md new file mode 100644 index 0000000000000000000000000000000000000000..f38ce3aeffa4ad52392f2f42976a356915ae4a33 GIT binary patch literal 1849 zcmah~&rcjx9H%|l_|AGUJ-qB*F#2`@sj;S*z!uwWSs?9VN{|e*vk!J;X5Kh63&jvg zHR-{|e*h1rWD|;nfZ+fe4%J}lQe%Q?R(dG5HE9UD^fVWv1Nwb$ek`#j?q&9UKi}`? zz3-3rd2yUkr{tW9Q$1;ft`u$O&`4==F;8)4fBNXrUGMSz`apVlzclAo5Q@j~XEzXP z#IO^chEuSZsVcY;S2+53@RoGLcqknP1amvJZ@slWcWm&aV37{_CyuiNY22KpmaZDI zh6ikF;k4mUYgAU~>xkgm=Jy|EWNSRnCXEC4yPCTK#&V_RJ$6?P%DZkEmLI74oh5I( zh> zAvkBwm;J>4eDgRlv}Ll20$*!ao9LDY~0>*_HFL5SibuNI^drR69t>HQ%E}O zc8CrR_}1nb!6g zf|^M|%{uTqt!LX18Y)7lQ=mHKp#V-XVyI&UCx#|eUE-twjLI6HnxP=2VI&tFCfV`? z2OX=(F^4hD9!AuVa~hTS2!>dYSzHW#qv!Ox$t(wV_GT|$>FZCYB#;#8a`#|IY>E{v zGES#rDDcUo2RpmcQl{^GcTY!{pg$Tf_;g;AvVE7kd#`rH_+Z4sesVEc+w&@mo1j$F zc*(=lxcVWUM$<(6!Vh5GTw?%!y1C)4pLoiBu&)+ij0A*R-){vAjCsQ)1%|GhVx5(9 zu&6G0i{(>a{CyE@Tp@R!ug@=6e!`*yx+DUY}sR{d&K@?3*V*V4iMBLNkD6^=5 z<9Ky$zx3;V4V?sE?jc87D`F#^jvRaq65K#eWb(UUGHajDR_W5v1tae{KVla5Wy2FowOtJ2hY3+Q3|pn zDNHvRe-q-EekCBjaUzk3T7K)3#<=~D9^NZg0