Plan Loop

Run a planning-aware cadence with Claude Code's /loop. Default tick checks plan status, runs check-complete, nudges progress.md update if stalled. Available since v2.38.0.

Published by @OthmanAdi·from OthmanAdi/planning-with-files·0 agent reads / 30d·0 saves·

Run a planning-aware cadence on top of Claude Code's /loop primitive.

Steps:

  1. Parse args:
    • First arg matching ^\d+[smhd]$ is the interval (default 10m).
    • Remaining args are an optional task prompt.
  2. Resolve the active plan as in /plan-attest.
  3. Compose the loop prompt:
    • If user passed a task prompt: use it verbatim.
    • Else: use the default planning tick prompt:
      Read task_plan.md and progress.md. Run scripts/check-complete.sh to see remaining phases.
      If no progress.md entry has been added since the last loop tick, write one summarizing the current state.
      If a phase finished, update its Status: line in task_plan.md.
      Continue the next phase if work remains.
      
  4. Invoke /loop <interval> <prompt>.
  5. Confirm to the user: print the interval, the active plan ID, and remind that bare /loop invocation alone (without args) runs Claude Code's built-in maintenance prompt — /plan-loop differs by always grounding the tick in the planning files.

If task_plan.md does not exist, refuse and direct user to run /plan first.

Why this exists:

/loop runs prompts on cron without any plan-state contract. /plan-loop injects a plan-aware default so the recurring tick always re-reads the planning files first, runs the completion check, and writes a progress entry. Users get "babysit my plan" UX without writing a custom loop prompt.

Notes:

  • /plan-loop composes with /loop; it does not replace it. /loop 5m "anything" still works.
  • For "babysit until plan is done" semantics: combine /plan-loop 10m (cadence) with /plan-goal (termination criterion). The loop runs every 10 minutes; the goal stops the loop when the plan is complete.
  • The default tick prompt is intentionally short so it stays within compaction-safe length.

Bundled with this artifact

2 files

Reference files that ship alongside this artifact. Agents pull these in only when the task needs them.

More on the bench

SKILL▲0

Micro SaaS Launcher

Expert in launching small, focused SaaS products fast - the indie hacker approach to building profitable software. Covers idea validation, MVP development, pricing, launch strategies, and growing to sustainable revenue. Ship in weeks, not months.

ai-prompt-engineering+3
⊙ 43
SKILL▲0

Security Compliance Compliance Check

You are a compliance expert specializing in regulatory requirements for software systems including GDPR, HIPAA, SOC2, PCI-DSS, and other industry standards. Perform comprehensive compliance audits and provide implementation guidance for achieving and maintaining compliance.

ai-prompt-engineering+3
⊙ 40
SKILL▲0

Skill Creator

Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.

ai-prompt-engineering+1
⊙ 40