Project Loop
by @sebclawops
Run approved long-running project work from file-backed state, continue through self-clearable tasks, pause cleanly at real gates, and recover across sessions.
clawhub install project-loop๐ About This Skill
name: project-loop description: Run approved long-running project work from file-backed state, continue through self-clearable tasks, pause cleanly at real gates, and recover across sessions.
Project Loop
Use for approved multi-step work that must survive resets, compaction, interruption, approval gates, and stalled execution.
Do not use for trivial one-turn work, open-ended autonomy, or projects without a clear owner.
Core Rules
state.json > manifest.md > validation.md > handoff.md > memory > chatowner_agent in state.json executes project tasksstate.json against actual reality before executingRequired Project Files
Project path:
agents//projects//
Required:
README.md
manifest.md
state.json
validation.md
Optional:
handoff.md
notes.md
artifacts/
logs/
state.json Minimum Fields
project_idowner_agentstatusphasecurrent_task_idlast_checkpointnext_actionblocked_reasonawaiting_approvalapproval_itemsretry_countmax_retrieslast_session_noteresume_instructionsinterruptedactive_loopRecommended additions:
approved_objectivescope_guardrailstask_queue_snapshotcompleted_tasksblocked_tasksdeferred_tasksartifactsvalidation_statuslast_errorlast_error_atbudget_hintsresume_historywatchdogSession Start and Resume
Read in this order:
1. state.json
2. manifest.md
3. validation.md
4. handoff.md if present
5. only then memory or chat if still needed
Never start by asking โwhat were we doing?โ if project files exist.
On resume:
status, phase, current_task_id, next_action, resume_instructionsState Machine
States:
DraftReadyRunningValidatingAwaitingApprovalBlockedPausedDoneAbandonedAllowed transitions:
Draft -> Ready
Ready -> Running
Running -> Validating
Validating -> Running
Validating -> Done
Running -> AwaitingApproval
Validating -> AwaitingApproval
Running -> Blocked
Validating -> Blocked
Running -> Paused
AwaitingApproval -> Running
Blocked -> Running
Paused -> Running
Any state -> Abandoned
Rules:
Draft -> Ready only when objective, scope, manifest, and validation existReady -> Running only when the next chunk is sized and eligibleRunning -> Validating only after outputs are recordedValidating -> Running only after pass and a next task is eligibleValidating -> Done only when required tasks are complete and final checks passRunning/Validating -> AwaitingApproval for true human-cleared boundariesRunning/Validating -> Blocked when a blocker cannot be self-cleared within retry rulesRunning -> Paused only for interruption, manual pause, or no eligible taskExecution Rules
A chunk is too large if it:
Progress Rules
state.json, manifest.md, validation.md, or handoff.md alone does not count as execution progress unless the current task is explicitly documentation-onlyValidation Rules
No task is complete until validation passes and the result is recorded.
Validation may include:
Validation records should capture:
If validation fails:
BlockedApproval and Pause Rules
Self-clearable work may continue if it stays in scope.
Human-cleared work includes:
When a true approval gate is reached:
status to AwaitingApprovalapproval_itemsDo not pause at routine internal chunk boundaries. Pause only for:
Interruption and Recovery
If interrupted by unrelated work:
state.json immediatelyinterrupted=trueactive_loop=falsestatus=Paused unless already AwaitingApproval or BlockedWhen updating state.json, use a full-file write by default, not a partial edit. state.json changes frequently and exact-match edit operations are brittle on high-churn files. Use partial edit only if you have just read the current file and the change is truly small, stable, and low-risk.
If state.json cannot be updated:
If a task may have partially executed:
If state is missing or inconsistent:
Watchdog Rules
Cron is a watchdog only, never the main workflow engine.
Done or Abandoned, remove the watchdogWatchdog may:
RunningPausedWatchdog must not:
Recommended cap:
Operating Sequence
1. Read state.json
2. Read manifest.md
3. Read validation.md
4. Read handoff.md if present
5. Verify current state against actual reality
6. Check whether the target output already exists
7. Pick one eligible chunk
8. Apply chunk sizing rules
9. Execute
10. Validate
11. Update state.json
12. Continue if self-clearable, otherwise pause or escalate cleanly