Task hygiene (ACTIVE-TASKS.md)
This document describes tactical hygiene for rows in ACTIVE-TASKS.md — separate from goal stewardship (state/goals/), which is the strategic layer. See GOAL-STEWARDSHIP-OPERATOR.md for goals.
With activeTask.ledger: facts, the file is a projection from SQLite facts; see ACTIVE-TASKS-PROJECTION.md for timestamps, sections, filters, and the operator flow (active-tasks render, reconcile).
What it does
-
Heartbeat escalation — When
activeTask.taskHygiene.heartbeatEscalationis notfalseand the last user message matches a heartbeat pattern (same sources as goal stewardship: built-in defaults andgoalStewardship.heartbeatPatterns), the plugin prepends a short<task-hygiene>block after the usual active-task summary and optional stale warnings. The block reminds the agent to reconcile the file (complete work, update Next, verify subagents) before replying withHEARTBEAT_OK(or equivalent). -
Optional “consider a goal” hint — Set
activeTask.taskHygiene.suggestGoalAfterTaskAgeDaysto a positive number. On heartbeat turns, tasks whoseUpdatedtimestamp is older than that many days are listed as long-running, with a pointer toactive_task_propose_goaland thengoal_register. Default is0(off). This does not create goals automatically. -
Size cap —
activeTask.taskHygiene.heartbeatNudgeMaxChars(default 2500, minimum 200 in the config parser) limits the hygiene block length.
Configuration (plugin memory config)
"activeTask": {
"enabled": true,
"filePath": "ACTIVE-TASKS.md",
"taskHygiene": {
"heartbeatEscalation": true,
"suggestGoalAfterTaskAgeDays": 0,
"heartbeatNudgeMaxChars": 2500
}
}
Heartbeat pattern matching always uses goalStewardship heartbeat settings (patterns and compilation). If you customize patterns, both goal stewardship prepends and task hygiene use the same matchers.
Agent tool: active_task_propose_goal
Parameters: task_label (string) — matches an active row label (exact match first, then case-insensitive).
Behavior: Reads ACTIVE-TASKS.md at the configured path (resolved from OPENCLAW_WORKSPACE), finds the task, and returns a draft JSON payload suitable for goal_register (label, description, acceptance_criteria). Refine with the user and respect goal_register confirmation policy (confirmed: true) when configured.
Requires activeTask.enabled. The tool is registered with the plugin regardless of goalStewardship.enabled; registering a goal still requires goal stewardship to be on and within global limits.
Operations
- CLI:
openclaw hybrid-mem active-tasks reconcile— keeps subagent bookkeeping honest before you trustACTIVE-TASKS.mdfor heartbeats or audits. - Goals mirror: When
goalStewardship.heartbeatRefreshActiveTaskis on, heartbeat also refreshes the## Active Goalsmirror inACTIVE-TASKS.md(do not edit that section by hand).
Related docs
- GOAL-STEWARDSHIP-DESIGN.md — goals vs tactical tasks
- GOAL-STEWARDSHIP-OPERATOR.md — enabling goals and CLI