P0 — stop the bleeding: - prevent premature complete_task(success) when goal involves reachability - validate run targets: block host-only commands (qm/pct/pvesh) on LXC/VM - bump MCP client timeout 30s→120s to stop 'context deadline exceeded' P1 — fix the plan system: - add replaced_reason column to session_plan_steps (migration 030) - track WHY steps are replaced (wrong_diagnosis/scope_change/superseded/etc) - force fresh propose_plan on session resume (reopenSession marks old plan) P2 — cognitive guardrails: - SOUL.md scope-gate rule: ask before chasing unrelated subsystems - auto-upsert knowledge entry on every session close P3 — observability (all were empty/NULL): - populate agent_activity.token_count from LLM usage (was always NULL) - populate nomos_plan_executions linking executions to sessions - write plan_completion_rate metric on task close P4 — learning loop (all were empty/NULL): - auto-classify every run call → classifications table (was 0 rows) - auto-feedback on session close (was 0 rows)
9 lines
449 B
SQL
9 lines
449 B
SQL
-- 030_plan_step_replaced_reason.up.sql
|
|
-- Add replaced_reason to session_plan_steps so the agent must explain why
|
|
-- a step was replaced (wrong_diagnosis, scope_change, blocked, superseded,
|
|
-- operator_override) rather than silently replacing entire plans. The column
|
|
-- is also set by bulk-replace operations (proposePlan, setGoal, reopenSession)
|
|
-- for auditability.
|
|
|
|
ALTER TABLE session_plan_steps ADD COLUMN IF NOT EXISTS replaced_reason TEXT;
|