Add daily TODO.md stale review automation (CUST-WP-0056)
All checks were successful
CI Smoke / host-smoke (push) Successful in 1s
CI Smoke / container-smoke (push) Successful in 10s

Schedule 08:30 Berlin daily scan for TODO.md unchanged 6+ days;
emit review tasks and promote durable work to workplans.
This commit is contained in:
codex 2026-07-08 13:19:06 +02:00
parent 43012620b1
commit 5af495edf4
2 changed files with 109 additions and 0 deletions

View file

@ -0,0 +1,53 @@
---
id: "b8e4f1a2-3c6d-4e9f-a1b2-7d8e9f0a1b2c"
name: "Daily TODO.md Stale Review"
type: activity-definition
version: "1.0"
enabled: true
owner: custodian
governance: custodian
status: active
created: "2026-07-08"
trigger:
type: cron
cron_expression: "30 8 * * *"
timezone: Europe/Berlin
misfire_policy: skip
context_sources:
- type: state-hub
query: todo_md_staleness
required: true
params:
stale_days: 6
bind_to: context.todo_staleness
report_sinks:
- type: state-hub-progress
event_type: todo_md_stale_review
author: activity-core
---
# Daily TODO.md Stale Review
Runs daily at 08:30 Europe/Berlin (after WSJF triage at 07:20). Scans
registered workstation repos for `TODO.md` files that have not changed in
6+ days and emits a review task per stale repo.
Policy: TODO.md is a pragmatic interruption buffer only. Stale files should
be reviewed — archive done items, delete noise, or promote durable work into
a workplan via ADR-001.
```rule
id: flag-stale-todo-md
for_each: context.todo_staleness.repos
bind_as: repo
condition: 'context.repo.age_days >= 6'
action:
task_template: 'Review stale TODO.md — {context.repo.repo_slug}'
description: >-
TODO.md unchanged for {context.repo.age_days} days (mtime {context.repo.mtime}).
Review open items: archive done work, delete noise, or promote valuable
topics to a workplan file and run statehub fix-consistency.
target_repo: context.repo.repo_slug
priority: low
labels: ["todo-md", "stale-review", "automated"]
```

View file

@ -0,0 +1,56 @@
---
id: CUST-WP-0056
type: workplan
title: "Daily TODO.md Stale Review via activity-core"
domain: custodian
repo: the-custodian
status: finished
owner: codex
topic_slug: custodian
created: "2026-07-08"
updated: "2026-07-08"
---
# CUST-WP-0056 — Daily TODO.md Stale Review via activity-core
## Goal
Automate daily review of workstation `TODO.md` files that have not changed in
6+ days. TODO.md is a pragmatic interruption buffer; stale files should be
reviewed and durable items promoted to workplans (ADR-001).
## State Hub scan endpoint
```task
id: CUST-WP-0056-T01
status: done
priority: high
```
- `GET /repos/todo-md-staleness?stale_days=6` on State Hub
- Scans active registered repos with accessible `local_path`
- Returns repos whose `TODO.md` mtime is older than the threshold
## activity-core resolver and schedule
```task
id: CUST-WP-0056-T02
status: done
priority: high
```
- Resolver query `todo_md_staleness` in activity-core `state_hub.py`
- ActivityDefinition `daily-todo-md-stale-review.md` — cron `30 8 * * *` Berlin
- Emits one review task per stale repo; progress event `todo_md_stale_review`
## Retire STATUS.md pattern
```task
id: CUST-WP-0056-T03
status: done
priority: medium
```
- Confirmed no `STATE.md` files across workstation repos
- Removed erroneous `STATUS.md` from net-kingdom; `SCOPE.md` remains canonical
- README orientation points to SCOPE.md only