Commit graph

149 commits

Author SHA1 Message Date
林 駿甫 (Shunsuke Hayashi)
a965bd3b62 [追加] verify_merge + escape hatch (force_unlock, manual_complete) 2026-04-10 08:11:29 +09:00
林 駿甫 (Shunsuke Hayashi)
e6ec2cab8d [整備] IP保護強化: .gitattributes + Copilot学習除外 + シークレットスキャン
- DTP 核心コードに linguist-generated 属性(GitHub コード検索除外)
- project_memory/ も検索除外
- .env は gitignore 済み
- シークレットファイルのコミットなし確認済み

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:59:38 +09:00
林 駿甫 (Shunsuke Hayashi)
54c4d01701 [文書] 知的財産保護方針: クローズド + BSL 1.1 + 公開禁止
- npm / crates.io 公開禁止
- GitHub は Private のまま維持
- Sprint 5 の公開タスクを廃止
- エージェントへの外部送信禁止指示

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:57:56 +09:00
林 駿甫 (Shunsuke Hayashi)
59be218b20 [整備] ライセンスを MIT → BSL 1.1 に変更
Licensor: 合同会社みやび (Miyabi G.K.)
非商用・教育目的のみ無料。商用利用は別途ライセンス。
4年後に Apache 2.0 に自動移行。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:50:40 +09:00
林 駿甫 (Shunsuke Hayashi)
fc6be84853 [文書] エッジケース設計決定書 (#64, #68, #69, #70)
- #64: ブランチ戦略(ブランチは切る、ワークツリーは不要)
- #68: マルチマシン分断(単一マシン前提、CAS で衝突検出)
- #69: ロック外ファイル(attach_context で事前通知)
- #70: merge 変更検知(post-commit hook + 通知)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:44:58 +09:00
林 駿甫 (Shunsuke Hayashi)
0588d41799 [追加] Web ダッシュボード: miyabi gate serve (#63) 2026-04-10 07:42:21 +09:00
林 駿甫 (Shunsuke Hayashi)
70cd906776 [追加] ドリーミング: event log → 学び抽出 (#59) 2026-04-10 07:29:03 +09:00
林 駿甫 (Shunsuke Hayashi)
36eec31fa1 [追加] 完了通知スクリプト: gate-notify.sh (#71)
scripts/gate-notify.sh:
  VOICEBOX 音声通知
  後続タスクの自動 dispatch 表示
  Bus に complete 自動通知
  skill-bus に record-run 自動記録

イベント: registered, assigned, merged, gate_rejected, error

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:17:57 +09:00
林 駿甫 (Shunsuke Hayashi)
f936605794 [追加] Bus ドッキング: gate-bus-bridge.sh + post-commit 統合 (#61)
scripts/gate-bus-bridge.sh:
  register: miyabi gate register 後に Bus に auto enqueue
  complete: miyabi gate merge 後に Bus に auto complete
  sync: tasks.json の pending タスクを Bus に一括 enqueue

post-commit hook に Bus bridge を統合:
  merge/完了コミットを検出 → Bus に complete 自動通知

Bus stats: 51 → 53 (sync テストで 2件 enqueue 成功)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:15:46 +09:00
林 駿甫 (Shunsuke Hayashi)
69867124f3 [追加] miyabi gni ask: 自然言語で GNI に質問できる CLI ラッパー (#72)
質問例:
  miyabi-gni-ask "このリポの構造を教えて"
  miyabi-gni-ask "protocol.rs は何に依存してる?"
  miyabi-gni-ask "テストはいくつある?"
  miyabi-gni-ask "ロックの状態を教えて"
  miyabi-gni-ask "gate.rs の関数一覧"

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:12:51 +09:00
林 駿甫 (Shunsuke Hayashi)
7a4f72d44c [整備] Bus データパスをシンボリックリンクで統合 (#65)
skills/prompt-request-bus → HAYASHI_SHUNSUKE/skills/prompt-request-bus
queue.jsonl (51件), dag-state.jsonl (11件), active-locks.jsonl (0件) に接続

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:07:34 +09:00
林 駿甫 (Shunsuke Hayashi)
553eed3b5d [追加] Git hooks: pre-commit ロック検証 + post-commit Issue 自動更新 (#66)
scripts/pre-commit-lock-check.sh:
  - コミット前にファイルロックを検証
  - POLARIS_AGENT_ID 環境変数でエージェント識別
  - ロック保持者以外の変更を exit 1 で拒否

scripts/post-commit-issue-update.sh:
  - コミットメッセージから #N を抽出
  - gh issue comment で自動更新
  - cargo test 結果も添付
  - バックグラウンド実行(コミットをブロックしない)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 07:04:07 +09:00
林 駿甫 (Shunsuke Hayashi)
ec1d25887e [文書] Playbook v4: ビジョン全38要素をカバーする完全版
v3 から追加:
  Sprint 3: 記憶アタッチメント (#58) + ドリーミング (#59) + Web ダッシュボード (#63)
  Sprint 4: シータサイクル (#60) + Obsidian (#62)
  Sprint 2: Bus データパス統合 (#65) + ブランチ戦略 (#64)

新規 Issue:
  #64: 並列Codexブランチ戦略 (worktree + PR)
  #65: Bus データパス統合

ビジョン達成度推移:
  現在 32% → Sprint1後 38% → Sprint2後 47% → Sprint3後 72% → Sprint4後 93%

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:54:20 +09:00
林 駿甫 (Shunsuke Hayashi)
a1febb67eb [修正] GATE 0+5: Issue=0 拒否 + ブランチ名バリデーション (#52, #53) 2026-04-10 06:51:39 +09:00
林 駿甫 (Shunsuke Hayashi)
58c8bf71e1 [修正] exit code: GATE拒否=1, 入力エラー=2 に統一 (#56, #57) 2026-04-10 06:48:55 +09:00
林 駿甫 (Shunsuke Hayashi)
ca1c734bc8 [文書] Sprint 3 に Web + TUI ダッシュボードを追加
3.6 Web ダッシュボード(人間用):
  miyabi gate serve (localhost:4848)
  DAG ノードグラフ、ファイルロック、タスク状態を可視化
  自動リロード、スマホ対応

3.7 TUI ダッシュボード(エージェント用、Sprint 4 以降):
  miyabi-tui に DTP タブ追加

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:40:10 +09:00
林 駿甫 (Shunsuke Hayashi)
1f9fb248cf [文書] Phase C 修正計画 + GitHub Issue 6件起票 + ラベル設定
検証で発見した GATE の甘い部分 6 件:
  #52: Issue=0 で登録拒否されない
  #53: ブランチ名バリデーションがない
  #54: HIGH risk で承認なしに assign できる
  #55: merge 後にロックが解放されない
  #56: 不正 SHA の exit code が 2 だが 1 が正しい
  #57: 依存未解決の assign が exit 0

ラベル: dtp, gate-fix, phase-c を作成・付与
autorun/sprint-1-today/FIXES.md に修正計画を記載

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:36:57 +09:00
林 駿甫 (Shunsuke Hayashi)
6cc892347b [追加] v1.0-dtp-beta リリース + Codex CLI 設定
- GitHub Release: v1.0-dtp-beta (prerelease)
- バイナリ: ~/bin/miyabi-gate にインストール
- .codex/instructions.md に miyabi gate CLI の使い方を追記
- Codex / Claude Code どちらからも使用可能

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:30:30 +09:00
林 駿甫 (Shunsuke Hayashi)
437b959ac3 [改善] clippy 警告 7件を解消 2026-04-10 06:28:46 +09:00
林 駿甫 (Shunsuke Hayashi)
cc2c6a90f4 [追加] Sprint 1-4 アクションプラン + miyabi gate CLI スキル
autorun/:
  sprint-1-today/TASKS.md + GATE.md: verify_merge + escape hatch + E2E テスト
  sprint-2-this-week/TASKS.md: OpenClaw ドッキング (hooks/sync/サブエージェント)
  sprint-3-next-week/TASKS.md: 運用基盤 (Heartbeat/Telegram/VOICEBOX/Maestro)
  sprint-4-this-month/TASKS.md: 品質ゲート多層化 (rust-ai-pipeline/proptest/mutants)

skills/miyabi-gate-cli/SKILL.md:
  全11サブコマンドの使い方
  Claude Code / Codex / OpenClaw からの呼び出し方法
  exit code (0/1/2) とエージェントの対処方法
  GATE フロー図

~/.claude/skills/miyabi-gate-cli → シンボリックリンク設定

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:28:15 +09:00
林 駿甫 (Shunsuke Hayashi)
15b7c98ac2 [文書] Polaris ビジョン文書 — 分散エージェント実行・記憶モデル設計
林駿甫の構想を読者が末尾まで読めば設計と運用の全体像を把握できるレベルで言語化。

3原則:
  1. 記憶はアタッチメント(全部覚えさせない、ピンポイントで差し込む)
  2. ジグ環境(手順+環境=再現性。誰がやっても同じ結果)
  3. 二層SSOT(GitHub=事実の正、リポ=文脈の正、tasks.json=実行台帳)

仕組み:
  - GATE チェーン(9つの検証関数、LLM の揺らぎを JSON で封じる)
  - ファイルロック(lease+heartbeat、競合防止)
  - DAG(依存関係の強制、飛ばせない)
  - 記憶のライフサイクル(当日メモ→振り返り→昇格)

ジグ仮説:
  十分に閉じた手順と観測可能なジグが揃えば、
  その環境内では手順通りに実行可能な状態に近づける。
  人格と記憶は別。ノウハウを与えられたら誰でもできるはず。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:24:02 +09:00
林 駿甫 (Shunsuke Hayashi)
89d2ab3c12 [文書] DTP Playbook v3 完全版 — Sprint 1〜5 の全タスク網羅
Sprint 1 (今日): clippy修正 + Phase C + GNI確認
Sprint 2 (今週): OpenClawドッキング (JSON標準化/hooks/memory sync/サブエージェント)
Sprint 3 (来週): 運用基盤 (Heartbeat/git自動同期/Telegram/VOICEBOX/Maestro)
Sprint 4 (今月): 品質ゲート多層化 (rust-ai-pipeline/proptest/cargo-mutants)
Sprint 5 (来月): 移行+公開 (TS→Rust/OpenClawプラグイン/npm配布)

各Sprint: DAG依存/承認ゲート/ロールバックポイント定義済み

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:21:31 +09:00
林 駿甫 (Shunsuke Hayashi)
4336e348b7 [文書] DTP 実装後ロードマップ (NEXT-STEPS.md)
直近: clippy修正 + Phase C (GitHub Evidence + E2E)
短期: OpenClawドッキング + Maestro登録 + npm CLI統合
中期: Heartbeatデーモン + tasks.json自動同期 + Telegram通知
長期: rust-ai-pipeline多層品質ゲート + miyabi-private移行 + OpenClaw公開

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 06:19:31 +09:00
林 駿甫 (Shunsuke Hayashi)
273c416344 feat: [日本語] DTP Phase B CLI 追加 2026-04-10 06:17:01 +09:00
林 駿甫 (Shunsuke Hayashi)
986d907e5b feat: [日本語] DTP Phase A 基盤追加 2026-04-10 01:35:17 +09:00
林 駿甫 (Shunsuke Hayashi)
1bfc0f9643 [文書] OpenClaw ドッキングプラン — DTP × OpenClaw 統合設計
5つのドッキングポイントを特定:
1. exec-approvals ↔ gate.rs(承認ゲート)
2. hooks ↔ protocol.rs(イベント通知)
3. sessions-spawn ↔ orchestration.rs(サブエージェント起動)
4. memory ↔ store.rs(tasks.json 同期)
5. routing ↔ dag.rs(DAG レベル振り分け)

改善項目 8件:
  #1-5: miyabi-cli-standalone 側(Phase A/B で対応可能)
  #6-8: OpenClaw 側(Phase C 以降)

GNI で OpenClaw Gateway/CLI/Sessions/Memory/Hooks/Routing/Agents を
全て横断分析した結果に基づく。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 01:22:29 +09:00
林 駿甫 (Shunsuke Hayashi)
286cf5664a [整備] tasks.json を v2 (3 Phase) に更新 + Phase A ロック
- tasks.json: v1 (8 Phase) → v2 (3 Phase: A/B/C)
- Phase A: implementing, codex-a@macbook-pro にロック
- file_locks: gate.rs, lock.rs, protocol.rs, store.rs → phase-a
- Phase B/C: pending(Phase A 完了待ち)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 01:19:43 +09:00
林 駿甫 (Shunsuke Hayashi)
39a5180b8e [文書] DTP Playbook v2: 8 Phase → 3 Phase に圧縮
miyabi-core 既存資産(7,654行)を最大活用する方針に転換。
v1 の 1,780行新規 → v2 の 1,000行新規(既存 DAG/GitHub/承認/並列を流用)。
推定時間: 1〜1.5時間 → 25〜35分。

Phase A: gate.rs + lock.rs + store.rs + protocol.rs(4ファイル新規)
Phase B: CLI サブコマンド追加(既存 main.rs に追加)
Phase C: GitHub Evidence + E2E テスト

Codex Round 2 レビュー 3件も保存。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 01:15:24 +09:00
林 駿甫 (Shunsuke Hayashi)
146fcafc5e [追加] DTP (Deterministic Task Protocol) 設計文書・指示書を移植
deterministic-task-protocol リポから miyabi-cli-standalone に統合:
- docs/dtp/: PLAYBOOK, PLAN, UML, GIT-RULES, Codex レビュー 3件
- autorun/: Phase 0-8 の TASKS/ASSIGNMENT/GATE + INDEX/HANDOFF/ROLLBACK
- project_memory/tasks.json: 全9 Phase の DAG SSOT
- skills/: polaris-ops, rust-llm-pitfalls
- .codex/instructions.md: Codex 設定

実装は miyabi-core に gate.rs, lock.rs, protocol.rs, store.rs を追加する方針。
既存の dag.rs, github.rs, approval.rs 等は変更不要。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 01:07:32 +09:00
林 駿甫 (Shunsuke Hayashi)
2d500c3654 feat(ci): add Copilot full automation pipeline
- copilot-assign.yml: GraphQL agentAssignment
- ai-review.yml: Claude Opus auto-review
- auto-merge.yml: CI + APPROVE squash merge
- decompose.yml: Issue decomposition + sub-issues

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-29 21:48:22 +09:00
林 駿甫 (Shunsuke Hayashi)
dfdd52ec1d feat(collab): add miyabi collab subcommand for Collaborator canvas control
Add `miyabi collab` subcommand (Phase 3 of Miyabi canvas integration):
  miyabi collab list [--json] [--type TYPE] [--count]
  miyabi collab add <type> [--file PATH] [--pos x,y] [--size w,h] [--idempotent]
  miyabi collab rm <tile_id>
  miyabi collab move <tile_id> --pos x,y
  miyabi collab resize <tile_id> --size w,h
  miyabi collab viewport [--pan x,y] [--zoom 1.0]
  miyabi collab status

Delegates to ~/.local/bin/collab (collab CLI v0.2.0+).
Error handling includes installation hint on binary not found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-28 10:06:15 +09:00
Shunsuke Hayashi
0e37360f8b feat: add OpenClaw integration module to miyabi-core
- Add openclaw.rs module for cluster communication
- Expand CLI with OpenClaw-related commands (264 lines)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 06:35:05 +09:00
Shunsuke Hayashi
6d5b55ad74 fix: TUIウィジェットの表示を修正
- diff表示の修正
- historyリストの修正
- markdown表示の修正

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-21 05:08:11 +09:00
Shunsuke Hayashi
aa2651465f docs: Add comprehensive user manual in Japanese
Create detailed USER_MANUAL.md covering:
- Installation and setup
- Basic usage and commands
- TUI mode with keybindings
- Agent mode with examples
- Session management
- Configuration options
- Project rules (.miyabirules)
- Troubleshooting guide

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 01:55:38 +09:00
Shunsuke Hayashi
86cd2a122d docs: Add 60-second setup and troubleshooting to README
- Add prominent quick start section at the top
- Add comprehensive troubleshooting section
- Cover common issues: API key, terminal errors, build errors
- Include debug mode instructions and help resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 01:51:38 +09:00
Shunsuke Hayashi
c3c3400bb2 fix: Resolve clippy warnings in dag.rs and workflow.rs
- Replace ok_or_else with ok_or for non-lazy error construction
- Derive Default for StepCondition and FailurePolicy enums
- Allow clippy::only_used_in_recursion for visit_step method

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 01:46:46 +09:00
Shunsuke Hayashi
22672b2d65 test(config): Add comprehensive config module tests
Add 16 new tests for configuration functionality:
- Path/directory helpers (default_path, default_dir)
- API key retrieval methods
- Sub-config defaults (ApiConfig, UiConfig, SessionConfig, ToolConfig)
- Save/load operations and roundtrip
- Edge cases (invalid TOML, empty file, nested dirs)
- Debug and Clone trait implementations

Total miyabi-core tests: 387 (was 371)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 01:33:43 +09:00
Shunsuke Hayashi
810eb43128 test(retry): Add comprehensive retry module tests
Add 12 new tests for retry functionality:
- RetryConfig constructors (new, aggressive, conservative)
- calculate_delay exponential backoff and capping
- retry_with_backoff behavior (exhaustion, zero attempts, success/error)
- Config traits (Clone, Debug)

Total miyabi-core tests: 371 (was 359)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 01:04:05 +09:00
Shunsuke Hayashi
671b04e4f8 test(hooks): Add comprehensive hooks module tests
- Add 24 new tests for HookEvent, HookAction, Hook, HookContext
- Test HookManager registration, enable/disable, get_hooks
- Test HooksConfig save/load
- Test hook execution with Log, Notify actions
- Test conditional hook execution
- Test variable expansion in hook messages

Core tests: 359 passed (+24 new)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:56:37 +09:00
Shunsuke Hayashi
2b27a4a667 test(rules): Add comprehensive rules module tests
- Add 23 new tests for Rule, AgentPreferences, MiyabiRules
- Test validation logic (version, name, suggestion, severity)
- Test file matching and pattern matching
- Test RulesLoader file discovery and loading
- Test serialization and error handling

Core tests: 335 passed (+23 new)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:54:50 +09:00
Shunsuke Hayashi
f740f07c23 test: Add comprehensive cache and error_policy tests
Cache tests (18 new):
- Test CacheEntry creation and expiration
- Test TTLCache insert, remove, clear, stats
- Test custom TTL, concurrent access
- Test LLMCacheKey and ApiCacheKey creation
- Test cache factories and serialization

Error policy tests (18 new):
- Test FallbackStrategy variants and defaults
- Test CircuitState equality
- Test CircuitBreaker default, reset, counters
- Test circuit transitions and thresholds

Core tests: 312 passed (52 new this phase)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:45:42 +09:00
Shunsuke Hayashi
c84c9d6c25 test(mcp): Add comprehensive MCP integration tests
- Add 16 new tests for MCP server configuration, request/response handling
- Test McpServerConfig defaults and serialization
- Test McpConfig save/load and multiple servers
- Test McpRequest with params, McpResponse success/error
- Test McpError with data, McpTool deserialization
- Test McpManager creation and state checking

Core tests: 276 passed (16 new)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:43:16 +09:00
Shunsuke Hayashi
7738f10965 feat(streaming): Add real-time streaming support for Agent
- Add StreamingAgent with run_stream() and run_with_callback() methods
- Add AgentStreamEvent enum with 11 event types (Started, TextChunk, ToolDetected, etc.)
- Add StreamProcessor for handling API streaming events
- Add StreamingConfig for buffer_size and emit_chunks settings
- Add 10 comprehensive unit tests

Core tests: 260 passed

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:40:03 +09:00
Shunsuke Hayashi
2ccf8267ac feat(orchestration): Add multi-agent orchestration module
- ParallelConfig for concurrency, timeout, fail-fast settings
- Orchestrator for parallel and sequential agent execution
- OrchestratorTask for task definition with optional system prompts
- ParallelResult with success tracking and metrics
- TaskResult for individual execution results

Features:
- Semaphore-based concurrency control
- Timeout per task execution
- Success rate and total token tracking
- Helper function for quick orchestrator creation

Total: 752 tests passing (9 new orchestration tests)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:34:44 +09:00
Shunsuke Hayashi
f6215765b3 test(session): Add comprehensive session tests
- Test session creation with custom ID
- Test system prompt builder pattern
- Test tags management
- Test preview truncation and empty preview
- Test storage default directory
- Test storage exists/load/delete operations
- Test metadata conversion and preview
- Test timestamp updates

Total: 23 session tests (13 new)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:31:37 +09:00
Shunsuke Hayashi
364dfd9da3 test: Add comprehensive Workflow and DAG tests
Workflow tests (14 new tests):
- Test StepCondition, RetryConfig, FailurePolicy defaults
- Test StepStatus and WorkflowStatus equality
- Test WorkflowContext with variables and results
- Test StepResult and WorkflowResult creation
- Test Workflow with output variables
- Test step and failure policy variants

DAG tests (23 new tests):
- Test TaskId creation and display
- Test Task with priority and estimated time
- Test TaskNode operations (add/remove dependencies)
- Test TaskLevel creation and management
- Test TaskGraph operations (count, parallelism, levels)
- Test TaskGraphBuilder with priority
- Test DAGError variants
- Test complex parallel graphs

Total: 730 tests passing (228 core, 498 TUI, 4 CLI)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:28:39 +09:00
Shunsuke Hayashi
5cfd656dbc test(agent): Add comprehensive agent integration tests
- Add approval_integration_tests module with 10 tests
- Add executor_registry_tests module with 5 tests
- Add agent_event_tests module with 2 tests
- Test ApprovalCallback implementations (AutoApproveAll, RejectHighRisk)
- Test ChannelApprover async communication
- Test RiskLevel ordering and approval requirements
- Test ExecutorRegistry tool registration and risk levels

Total: 17 new tests, all passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:24:40 +09:00
Shunsuke Hayashi
6ac4d539d4 feat(dag): Add DAG-based task graph for parallel execution
- Add TaskGraph with topological sort using Kahn's algorithm
- Add TaskLevel for grouping independent tasks for parallel execution
- Add TaskGraphBuilder for fluent API construction
- Support dependency tracking and cycle detection
- Include 7 comprehensive tests

Ported and simplified from miyabi-private/miyabi-dag.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:20:16 +09:00
Shunsuke Hayashi
5935dae7dd feat(agent): Add approval callback system for tool execution
- Add ApprovalCallback trait with ApprovalDecision (Approved, Rejected, ModifyInput)
- Implement AutoApproveAll, RejectHighRisk, and ChannelApprover callbacks
- Integrate approval callback into Agent execution loop
- Support interactive approval via channel-based communication
- Include comprehensive tests for all approval scenarios

All 167 tests passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:16:55 +09:00
Shunsuke Hayashi
57820166f9 feat: Add MCP and GitHub Tools integration to ExecutorRegistry
MCP Integration:
- Add McpToolExecutor for executing MCP server tools
- Add register_mcp_tools method to ExecutorRegistry
- Dynamic tool registration from MCP servers
- Async mutex for thread-safe MCP manager access

GitHub Tools Integration:
- Add register_github_tools method to ExecutorRegistry
- Register 7 GitHub tools with appropriate risk levels:
  - Low: ListIssues, GetIssue, ListPullRequests
  - Medium: CreateIssue, AddComment, AddLabels, CreatePullRequest

All 662 tests passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 00:04:05 +09:00