docs: Add project documentation and Miyabi config

- 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>
This commit is contained in:
Shunsuke Hayashi 2025-11-22 22:23:43 +09:00
parent 25d358f96e
commit 2db321f184
7 changed files with 154 additions and 0 deletions

66
.miyabi/README.md Normal file
View file

@ -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 <session-id>
# 削除
miyabi sessions -d <session-id>
```
## 使い方
```bash
# TUI起動
miyabi
# バージョン情報
miyabi version
# ヘルプ
miyabi --help
```

29
.miyabi/config.toml Normal file
View file

@ -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

View file

@ -0,0 +1,15 @@
# Code Review Prompt
以下のコードをレビューしてください:
## チェックポイント
- コードの品質と可読性
- エラーハンドリング
- パフォーマンス
- セキュリティ
- テストカバレッジ
## 出力形式
1. 問題点(重要度順)
2. 改善提案
3. 良い点

View file

@ -0,0 +1,15 @@
# Issue Template
## Description
[問題や機能の説明]
## Requirements
- [ ] 要件1
- [ ] 要件2
## Acceptance Criteria
- [ ] 完了条件1
- [ ] 完了条件2
## Technical Notes
[技術的な注意点]

27
AGENTS.md Normal file
View file

@ -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.

BIN
MIYABI.md Normal file

Binary file not shown.

2
README.github.md Normal file
View file

@ -0,0 +1,2 @@
# miyabi-cli-standalone
Autonomous development powered by Agentic OS