--- id: "6fca51fa-387a-4fd0-bc4e-d62c29eb859a" name: "Daily State Hub WSJF Triage" type: activity-definition version: "1.0" enabled: false owner: custodian governance: custodian status: draft created: "2026-05-17" trigger: type: cron cron_expression: "20 7 * * *" timezone: Europe/Berlin misfire_policy: skip context_sources: - type: static bind_to: context.prompt_path config: value: /home/worsch/the-custodian/runtime/prompts/daily_statehub_wsgi_triage.md - type: state-hub query: state_summary bind_to: context.state_summary - type: state-hub query: next_steps bind_to: context.next_steps - type: state-hub query: workplan_index params: refresh: false bind_to: context.workplan_index - type: state-hub query: hub_inbox params: to_agent: hub unread_only: true bind_to: context.hub_inbox --- # ActivityDefinition: Daily State Hub WSJF Triage ## Purpose This definition is the activity-core handoff point for `CUST-WP-0044 - Daily State Hub WSJF Triage`. The daily triage loop reviews State Hub, scores open workplans and next tasks with the WSJF rubric, and leaves a short recommendation report plus a State Hub progress event. It should reduce loose ends and open work without automatically editing canonical workplans. ## Runner Status This definition is intentionally `enabled: false`. Current active runner: - Codex app automation: `daily-state-hub-wsjf-triage` - Prompt source: `/home/worsch/the-custodian/runtime/prompts/daily_statehub_wsgi_triage.md` Durable target runner: - activity-core Temporal schedule using this ActivityDefinition Enable this definition only after activity-core has a reviewed action path for running a Custodian agent/report instruction and writing the resulting working memory note/progress event. Until then, activity-core is the target substrate and the Codex automation is the active runner. Do not run both at the same time. ## Trigger Daily at 07:20 Europe/Berlin, with `misfire_policy: skip`. This mirrors the current Codex automation schedule and avoids catch-up bursts after downtime. ## Context Sources The definition reuses State Hub read-model endpoints instead of introducing a parallel priority database: - `state_summary`: headline counts, open workstreams, blockers, progress, derived next steps, and domain summaries - `next_steps`: State Hub's existing derived next-action hints - `workplan_index`: file-backed workplan mapping and needs-review labels - `hub_inbox`: unread hub coordination messages - `prompt_path`: the canonical triage prompt in the Custodian runtime The State Hub context resolver in activity-core may need to expose these query names before this definition is enabled. That resolver is the right integration point; do not add bespoke HTTP fetch logic to this repo's workplan files. ## Output Contract The run should produce: - a dated working-memory note under `/home/worsch/the-custodian/memory/working/` - a State Hub progress event with `event_type: daily_triage` - no direct workplan/canon edits - no task status changes unless a later human request explicitly asks for an apply step ## Review Gates Daily triage may recommend but must not execute: - external publication - money or legal commitments - secret or credential changes - security posture changes without an explicit approval path - canon promotion ## Notes This file lives in `the-custodian/activity-definitions/` because the automation policy belongs to the Custodian domain. activity-core can ingest domain-owned definition directories through `ACTIVITY_DEFINITION_DIRS`.