the-custodian/workplans/CUST-WP-0009-human-interventions.md
codex 66be5cb72f
All checks were successful
CI Smoke / host-smoke (push) Successful in 0s
CI Smoke / container-smoke (push) Successful in 4s
Close workplan loose ends: relink stale hub IDs, normalize statuses.
- Archived CUST-WP-0054/0057/0058: replace stale state_hub IDs with the
  live hub records (matched by task title and status), clearing 13 C-03 failures.
- CUST-WP-0054-T09/T10: record cancel in the file, matching the hub state
  at plan closeout.
- Eleven finished workplans: non-canonical 'completed' -> 'finished'.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-22 11:32:48 +02:00

2.4 KiB

id type title domain status owner topic_slug state_hub_workstream_id created updated
CUST-WP-0009 workplan Human Interventions Flag infotech finished custodian the-custodian dd7db29a-fece-488a-a501-cadc860b2f50 2026-03-03 2026-03-03

CUST-WP-0009 — Human Interventions Flag

Purpose

Tasks in the state-hub can represent work for agents (custodian) or for humans (Bernd). Currently there is no way to distinguish these at query time. Adding a needs_human flag lets agents tag tasks they cannot complete themselves, surfaces them in a dedicated dashboard page, and lets Bernd work through all his action items in one place.

Scope

  • needs_human boolean + intervention_note text on the tasks table
  • API filter GET /tasks/?needs_human=true
  • 3 MCP tools: flag_for_human, clear_human_flag, list_human_interventions
  • Dashboard: new "Interventions" top-level page with amber-bordered cards and "Mark done" button

Files Changed

File Change
state-hub/migrations/versions/b4c5d6e7f8a9_add_needs_human.py New migration
state-hub/api/models/task.py Added needs_human, intervention_note fields
state-hub/api/schemas/task.py Added fields + validators to Create/Update/Read
state-hub/api/routers/tasks.py Added needs_human filter param
state-hub/mcp_server/server.py Added 3 new tools
state-hub/mcp_server/TOOLS.md Documented 3 new tools
state-hub/dashboard/src/interventions.md New dashboard page
state-hub/dashboard/observablehq.config.js Added nav entry

Tasks

Step 1: Run migration

id: CUST-WP-0009-T1
title: Run Alembic migration b4c5d6e7f8a9
status: done
priority: high
state_hub_task_id: "a2d5561f-9c1e-40c2-9259-c3d3cc9761b0"

Step 2: Verify API

id: CUST-WP-0009-T2
title: Verify API validator and filter work
status: done
priority: medium
state_hub_task_id: "6b739018-c3bc-4e7c-aa28-9ca1a64406f1"

Step 3: Verify dashboard

id: CUST-WP-0009-T3
title: Verify Interventions dashboard page loads
status: done
priority: medium
state_hub_task_id: "e474259d-c5ff-4c60-86c7-9585c0d0797f"

Design Notes

  • intervention_note required when needs_human=True (API validator raises 422)
  • Mirrors the blocking_reason pattern for blocked tasks
  • Dashboard "Mark done" button PATCHes {status: "done", needs_human: false}
  • MCP clear_human_flag is the agent-side equivalent (used after human completes the action)