From a8cfa735f3c00ff720456b5ead1660a0661611c2 Mon Sep 17 00:00:00 2001 From: tegwick Date: Sun, 17 May 2026 22:39:06 +0200 Subject: [PATCH] Add daily State Hub WSJF triage workplan --- ...CUST-WP-0044-daily-statehub-wsjf-triage.md | 281 ++++++++++++++++++ 1 file changed, 281 insertions(+) create mode 100644 workplans/CUST-WP-0044-daily-statehub-wsjf-triage.md diff --git a/workplans/CUST-WP-0044-daily-statehub-wsjf-triage.md b/workplans/CUST-WP-0044-daily-statehub-wsjf-triage.md new file mode 100644 index 0000000..847e44d --- /dev/null +++ b/workplans/CUST-WP-0044-daily-statehub-wsjf-triage.md @@ -0,0 +1,281 @@ +--- +id: CUST-WP-0044 +type: workplan +title: "Daily State Hub WSJF Triage" +domain: custodian +repo: the-custodian +status: active +owner: custodian +topic_slug: custodian +planning_priority: high +planning_order: 44 +created: "2026-05-17" +updated: "2026-05-17" +state_hub_workstream_id: "99993845-be6a-401d-be98-f8107014abed" +--- + +# CUST-WP-0044 - Daily State Hub WSJF Triage + +## Goal + +Create a daily Custodian operating loop that reviews the State Hub situation, +identifies loose ends, and recommends which open workplans or tasks should be +worked next, revisited, parked, split, or closed. + +The daily output should be a short, reviewable prioritization report with WSJF +scores for the most relevant open workplans and next tasks. It should reduce +coordination drag without silently changing canonical workplan files or +promoting work into execution without human or agent review. + +## Context + +As of 2026-05-17, the State Hub snapshot shows: + +- 24 active workstreams and 2 blocked workstreams +- 184 todo tasks, 5 in-progress tasks, and 5 blocked tasks +- 5 open decisions +- several large active workplans with low completion ratios + +The system is now good at preserving work, but that also makes it easy to +accumulate half-open threads. A daily triage loop gives the Custodian a small, +repeatable way to turn State Hub from a passive ledger into an active focus +surface. + +## Scope + +In scope: + +- Daily State Hub situation review using the local brief, State Hub API, and + MCP tools when available. +- WSJF assessment for open workplans and representative next tasks. +- Detection of loose-end patterns: stale active plans, large unstarted plans, + blocked work, open decisions, dependency-cleared work, zero-task workstreams, + and inconsistent file-backed state. +- A daily recommendation artifact that separates: + - work to do next + - workplans that need review before execution + - cleanup or closure candidates + - blocked items requiring human or cross-agent attention +- A progress event summarizing each daily review. + +Out of scope: + +- Directly editing `canon/`. +- Automatically committing, archiving, closing, or reprioritizing workplans + without a review gate. +- Solving the canonical workplan state model; that belongs to `CUST-WP-0042`. +- Replacing human judgment for money, legal, security, or external-reputation + decisions. + +## Daily Review Contract + +Each daily run should collect: + +- `.custodian-brief.md` from `the-custodian` +- State Hub summary via `get_state_summary()` or `GET /state/summary` +- hub inbox via `get_messages(to_agent="hub", unread_only=True)` or + `GET /messages/?to_agent=hub&unread_only=true` +- open workstreams, open tasks, blocked tasks, blocking decisions, next-step + hints, workplan index, and repo goal guidance +- relevant git status and consistency state for repos whose workplans are + likely to be touched + +Each daily run should produce: + +- a dated working-memory note under `memory/working/` +- a progress event in State Hub +- a compact top-priority table of no more than 10 workplans/tasks +- explicit "revisit" recommendations for stale, blocked, oversized, or + ambiguous workplans +- explicit "do not act yet" notes for items that require human approval + +## WSJF Rubric + +Use a 1-5 scale for each numerator factor and denominator factor. + +| Factor | Meaning | +|--------|---------| +| Strategic value | Alignment with current Custodian, State Hub, Railiance, or dependency-chain goals. | +| Time criticality | Whether waiting increases operational risk, blocks other work, or lets context decay. | +| Risk reduction | How much the work reduces security, reliability, data-loss, coordination, or governance risk. | +| Opportunity enablement | How much the work unlocks other active workstreams or reduces future agent friction. | +| Job size | Estimated effort and uncertainty; 1 is small/clear, 5 is large/uncertain. | + +Formula: + +```text +WSJF = (strategic_value + time_criticality + risk_reduction + opportunity_enablement) / job_size +``` + +Tiebreakers: + +- Prefer items that close or unblock multiple existing tasks. +- Prefer finishing nearly complete high-value work over starting new large work. +- Prefer safety, backup, identity, secrets, and deployment foundation work when + downstream plans depend on them. +- Prefer explicit revisit/parking over leaving stale plans in `active`. + +## Tasks + +### T01 - Define Daily Triage Prompt And Output Template + +```task +id: CUST-WP-0044-T01 +status: todo +priority: high +state_hub_task_id: "cb450d56-b606-4c89-9e6e-64e139d6ac6b" +``` + +Write the daily review prompt and a concise Markdown output template. + +The template should include: + +- State Hub headline counts +- inbox and blocker summary +- WSJF-ranked workplan/task table +- loose-end findings +- revisit/park/close recommendations +- proposed next actions for the next Custodian session +- guardrails for items that need human approval + +Done when a future agent can run the daily review from the template without +guessing what to inspect or how to structure the result. + +### T02 - Implement Daily Review Automation + +```task +id: CUST-WP-0044-T02 +status: todo +priority: high +depends_on: [CUST-WP-0044-T01] +state_hub_task_id: "078c547b-82e0-4ae9-a29c-7bab930924da" +``` + +Create or configure the daily run so the Custodian performs the review once per +day. + +The automation should: + +- run against `/home/worsch/the-custodian` and inspect `/home/worsch/state-hub` + when available +- tolerate State Hub API or MCP downtime by falling back to + `.custodian-brief.md` +- avoid making file changes unless the run is explicitly asked to apply a + recommendation +- record a progress event when the State Hub API is reachable + +Done when a daily run can complete unattended and leave a useful report. + +### T03 - Add WSJF Scoring Procedure + +```task +id: CUST-WP-0044-T03 +status: todo +priority: high +depends_on: [CUST-WP-0044-T01] +state_hub_task_id: "85fb98ba-3716-4524-88d2-6340a3674d0a" +``` + +Define the scoring procedure for open workplans and next tasks. + +The procedure should explain how to estimate: + +- strategic value +- time criticality +- risk reduction +- opportunity enablement +- job size + +It should also define how to flag confidence as high, medium, or low when the +available evidence is incomplete. + +Done when daily reports can explain why a high-ranked item is high-ranked, +without pretending the score is more precise than the evidence supports. + +### T04 - Detect Loose-End And Revisit Candidates + +```task +id: CUST-WP-0044-T04 +status: todo +priority: high +state_hub_task_id: "14b3be2c-fe9e-464e-8db5-ec1b293f5829" +``` + +Add daily checks for work that should be revisited before more execution starts. + +Signals include: + +- active workplans with no recent progress +- large active workplans with many todo tasks and no in-progress task +- blocked workplans whose dependencies are now resolved or misclassified +- workstreams with zero parsed tasks +- high-priority workplans with stale `updated` metadata +- tasks still open after their parent workstream appears effectively complete +- workplans whose file-backed state differs from State Hub state + +Done when the daily report names concrete revisit candidates and the reason +each candidate needs attention. + +### T05 - Define Recommendation Actions And Review Gates + +```task +id: CUST-WP-0044-T05 +status: todo +priority: medium +depends_on: [CUST-WP-0044-T03, CUST-WP-0044-T04] +state_hub_task_id: "0b2d01e4-8c64-4b2f-bb51-502f6c1af975" +``` + +Define the action vocabulary for daily recommendations. + +Allowed recommendation actions: + +- `work-next` +- `revisit` +- `split` +- `park` +- `close-out` +- `needs-human` +- `needs-cross-agent` +- `needs-consistency-sync` + +For each action, document when it is safe for an agent to proceed and when a +human review gate is required. + +Done when the daily loop can recommend action without accidentally crossing +governance boundaries. + +### T06 - First Three Daily Runs And Calibration + +```task +id: CUST-WP-0044-T06 +status: todo +priority: medium +depends_on: [CUST-WP-0044-T02, CUST-WP-0044-T03, CUST-WP-0044-T04, CUST-WP-0044-T05] +state_hub_task_id: "46c48fde-bb5f-4fe5-98cc-9cf788c98fc5" +``` + +Run the daily loop for three consecutive days and compare the recommendations +against actual follow-up work. + +Calibrate: + +- scoring weights +- job-size estimates +- maximum number of recommendations +- treatment of stale but intentionally parked work +- whether daily notes are too verbose or too thin + +Done when the daily review is useful enough to continue as a standing +Custodian habit. + +## Acceptance Criteria + +- The Custodian has a daily review path for the State Hub situation. +- The daily report ranks open workplans and next tasks with a transparent WSJF + assessment. +- Loose ends are surfaced as explicit revisit, park, split, or close-out + recommendations. +- Daily runs leave progress events so future sessions can see the review. +- No canonical workplan or canon changes happen without the appropriate review + gate.