Originally created by: lodar
Implements 5dive goal add "<outcome>" per the DIVE-978 design: a planner agent (via loop spawn --wait --schema) decomposes an outcome into a validated task graph (tasks + task_deps + leaf acceptance/verify/verifier) under a project, which the fleet executes via the existing heartbeat + loops.
Reuse-first: orchestrates existing primitives (project / task add / task block). New code = glue + the safety spine.
Guardrails (all enforced locally, never trusted from the planner):
--max-tasks cap + dep-DAG --depth-cap — reject, never silent-truncate (names the overflow)risk=low task whose text hits the T2 category floor is rejected, reusing cmd_task_need's _gate_tier2_floor_hit classifier--checkpoint count OR any T2 task; --yes waives only the count, never a T2--dry-run renders + creates nothing; cycle / unknown-dep / unresolvable-assignee rejectionDegrades without soft-dep siblings DIVE-979/980/981: role:<x> resolves via the org chart when unambiguous; dry-run renders a plain list. --plan=<json> is the test seam + the approve->materialize path.
Tests: 13 new unit tests (tests/goal_add_unit.sh) cover schema-reject, cycle, cap, depth, tier-lowering, dry-run-creates-nothing, below-threshold materialize, exactly-one-gate, T2-gates-over-yes. Full suite 14/14 green. Bundle rebuilt, FIVE_VERSION 0.6.18.
Not on the agent-create path, so the VM smoke test is not required.
Closes DIVE-984.
Tickets: #163
Tickets: #312
Tickets: #343
Tickets: #37
Tickets: #731
Tickets: #881
Ticket changed by: lodar