US-005: Typed task packet format with TaskScope enum

- Add TaskScope enum with Workspace, Module, SingleFile, Custom variants
- Update TaskPacket struct with scope_path and worktree fields
- Add validation for scope-specific requirements
- Fix tests in task_packet.rs, task_registry.rs, and tools/src/lib.rs
- Export TaskScope from runtime crate

Closes US-005 (Phase 4)
This commit is contained in:
Yeachan-Heo
2026-04-16 09:28:42 +00:00
parent 77fb62a9f1
commit 1d5748f71f
3 changed files with 71 additions and 14 deletions

View File

@@ -9554,9 +9554,12 @@ printf 'pwsh:%s' "$1"
#[test]
fn run_task_packet_creates_packet_backed_task() {
use runtime::task_packet::TaskScope;
let result = run_task_packet(TaskPacket {
objective: "Ship packetized runtime task".to_string(),
scope: "runtime/task system".to_string(),
scope: TaskScope::Module,
scope_path: Some("runtime/task system".to_string()),
worktree: Some("/tmp/wt-packet".to_string()),
repo: "claw-code-parity".to_string(),
branch_policy: "origin/main only".to_string(),
acceptance_tests: vec![