OthmanAdi/planning-with-files is a planning system that stores an AI coding agent's task plan, findings, and progress in project files so the work can be recovered after context resets, crashes, or compaction. It is for long-running coding tasks across many agent tools, including Claude Code, Codex CLI, and Cursor. The catalogue entries are the project's commands, hooks, skills, plugin, and instruction for maintaining those planning files.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/OthmanAdi/planning-with-filesWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/othmanadi/planning-with-files/plan-goal)<a href="https://agentmods.dev/commands/othmanadi/planning-with-files/plan-goal"><img src="https://agentmods.dev/badge/commands/othmanadi/planning-with-files/plan-goal.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00043 | $0.00424 |
| Opus 5 | $0.00022 | $0.00212 |
| Sonnet 5 | $0.00009 | $0.00085 |
| Haiku 4.5 | $0.00004 | $0.00042 |
Grade A, and why
plan-goal scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
Bridge the active plan to Claude Code's /goal primitive.
Steps:
- Resolve the active plan: prefer
${PLAN_ID}env var, then.planning/.active_plan, then newest.planning/<dir>/, then legacy./task_plan.md. - Read the resolved
task_plan.md. - Derive a goal condition from the plan content:
- Default: "all phases in task_plan.md report Status: complete and check-complete.sh reports ALL PHASES COMPLETE"
- If user passed an argument: use that as an additional clause (e.g.,
/plan-goal until all tests pass)
- Issue Claude Code's
/goal <condition>with the derived text. - Confirm to the user: print the goal condition + the active plan ID + remind that
/goal clearcancels.
If task_plan.md does not exist, refuse and direct user to run /plan first.
Why this exists:
/goal runs the agent until a small fast model confirms the condition is met. It evaluates the transcript only, not files. By deriving the condition from the plan file, this command turns the file-based plan into a measurable termination criterion for /goal, so the loop terminates when the plan is actually done, not when the conversation looks done.
Notes:
/plan-goaldoes not replace/goal. It composes with it. Users can still run/goal "any text"directly.- The derived condition stays under the 4000-char limit
/goalenforces by quoting only phase headers + acceptance criteria, not full task body. - Combine with
/plan-loopfor a "babysit until done" workflow:/plan-loopcadence +/plan-goaltermination.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 7d ago First seen · 30 lines · 43 tokens per session scan A e148eefe8c82
plan-goal is a command published in the GitHub repository OthmanAdi/planning-with-files (26,649 stars, last pushed yesterday), licensed MIT. It adds 43 tokens to every session and 424 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
valuation-methods
Valuation methods analysis — multiples, DCF inputs, PEG integration, valuation assumption extraction.
design-form
Design a form with the fewest fields that works, clear labels, and errors that help.
enum-udp
UDP scan + service follow-up — top ports first, full sweep only when justified.
review
Submit a story for verification (In Progress → In Review, no PR yet).
standup
Alias of /board — the async sprint snapshot.
wp-cleanup
Find and clean up unused PHP code, Composer dependencies, imports, and dead code in WordPress projects.