Task Ledger
by @gejiliang
Durable workflow layer for OpenClaw long-running work. Use when tasks are multi-stage, recoverable, parallelized across sub-agents/ACP, use background exec o...
clawhub install task-ledgerπ About This Skill
name: task-ledger description: Durable workflow layer for OpenClaw long-running work. Use when tasks are multi-stage, recoverable, parallelized across sub-agents/ACP, use background exec or cron, have external side effects, or need auditable outputs and resumable execution. metadata: { "openclaw": { "emoji": "π§Ύ", "requires": { "bins": ["python3", "bash"] } } }
task-ledger
Use Task Ledger to turn long-running agent work into durable task objects instead of relying on fragile chat context.
Task Ledger is a workflow layer on top of OpenClaw execution primitives. It does not replace ACP, sub-agents, exec, cron, or skills. It gives them a durable task structure:
tasks/logs/outputs/Trigger
Use this skill when any of these are true:
execsessions_spawncronDo not use this skill for every tiny action. It is meant for work where losing state or execution structure would be costly.
What this skill provides
This package includes:
tasks/logs/outputs/Bundled files live next to this skill under toolkit/.
First-use bootstrap
If the current workspace does not already contain the toolkit, copy these bundled assets into the workspace root:
toolkit/scripts/* β /scripts/ toolkit/task-templates/* β /task-templates/ toolkit/tasks/README.md β /tasks/README.md Always create the runtime directories if missing:
tasks/logs/outputs/Do not overwrite user-modified files silently unless explicitly asked. Prefer copying only missing files and then report what was installed.
Operating protocol
1. Confirm the plan with the user before execution.
2. Create the task skeleton first.
3. Choose explicit stages that match reality.
4. Record execution references (process.sessionId, subtask.sessionKey, cron.jobId) when they exist.
5. Link parent/child tasks and dependencies when the work is larger than a single task object.
6. If work is parallelized, prefer one parent task plus one child task per worker.
7. Check readiness before starting dependent tasks; use start-if-ready when appropriate.
8. Update the task file after every completed stage.
9. On recovery, read the resume summary and verify real state first.
10. If reality and the checkpoint disagree, correct the checkpoint before continuing.
11. Continue only the unfinished work.
12. Prefer short user-facing summaries and keep long reports on file when appropriate.
13. Export or summarize task state in a human-friendly form when needed.
14. Proactively notify on completion.
15. If execution was interrupted and later resumed/reconnected, proactively notify that too.
Parallel task pattern
For multi-agent or multi-sub-agent work:
Avoid treating one task JSON file as a shared concurrent write target. Task trees are safer than shared state.
Core commands
Create a task skeleton:
./scripts/new-task.sh [goal] [executionMode] [stagesCsv] [priority] [owner]
Useful helpers:
./scripts/list-open-tasks.py
python3 ./scripts/task-ls-tree.py
python3 ./scripts/task-ready.py [--json]
python3 ./scripts/task-start-if-ready.py [nextAction]
python3 ./scripts/task-graph-export.py [--format markdown|dot|json] [--open-only]
./scripts/show-task.py
./scripts/task-events.py [limit] [--type ] [--json]
./scripts/update-task.py ...
./scripts/task-advance.py [nextAction]
./scripts/task-bind-process.py [pid] [--state ]
./scripts/task-bind-subtask.py [--agent-id ]
./scripts/task-bind-cron.py [--schedule ] [--next-run-at ]
./scripts/task-verify.py ...
./scripts/task-resume-summary.py [--json|--markdown]
./scripts/task-export.py [--format markdown|json|short] [--write-report]
./scripts/close-task.py [summary]
./scripts/task-doctor.py [taskId] [--strict] [--json]
Specialized templates
Use bundled examples for common risky workflows:
restart-openclaw-gateway.example.jsondeploy-service.example.jsonsync-feishu-doc.example.jsonPractical rule
Task files are not truth. They are cached descriptions of truth. Reality wins.