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>
1.8 KiB
1.8 KiB
Phase 7: CLI(dtp コマンド)
依存: Phase 6 GREEN 承認ゲート: 全サブコマンドが動作 +
dtp run-e2eが GREEN
タスク
src/main.rsに clap ベースの CLI を実装(Cargo.toml にclap = { version = "4", features = ["derive"] }追加)- サブコマンド一覧:
dtp register --issue <N> --title <T> [--deps <id,...>] [--mode github-pr|manual|external-op] dtp dag # DAG 可視化(テキスト) dtp dispatchable # 実行可能タスク一覧 dtp impact <task-id> --risk <L|M|H|C> --symbols <N> [--approve] dtp assign <task-id> --agent <A> --node <N> --files <F,...> dtp heartbeat <task-id> dtp branch <task-id> <branch-name> dtp pr <task-id> <pr-number> dtp verify-merge <task-id> # GitHub API 経由 dtp confirm-done <task-id> dtp status [task-id] # JSON or human-readable dtp locks # ロック一覧 dtp unlock <task-id> --reason <R> --operator <O> dtp events [task-id] # event log 表示 dtp rebuild-snapshot # event log から snapshot 再構築 dtp run-e2e # 内蔵 E2E テスト(Phase 8 統合テスト) --format jsonオプション: 全コマンドで JSON 出力対応(rust-ai-pipeline の Phase1OutputFormat パターン)- 終了コード: 0=成功, 1=GATE拒否, 2=入力不正(rust-ai-pipeline の EXIT_* パターン)
- テスト: register → status で task が存在する
- テスト: 不正入力(issue=0)→ 終了コード 2
承認ゲート
cargo build成功dtp register --issue 1 --title testが動作するdtp statusが JSON を返す
リトライ条件
- clap の derive マクロでコンパイルエラー → features を確認