plan

A planning command that turns a software request into small tasks ordered by their dependencies. Each task includes conditions for acceptance and ways to check the result.

In plain words
What is it for?
Use it to read a project specification, map how parts depend on one another, save a plan and task list, and optionally prepare tasks for filing as GitHub issues.
Why use it?
It makes large or unclear work easier to review before coding begins. It also prevents tasks from being done in an order that blocks later work.

Command

Install

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.

agentmods
npx agentmods add commands/askwigconsulting/cohort/plan
Clone the repo
git clone --depth 1 https://github.com/askwigconsulting/cohort
Per session 15 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 768 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00015 $0.00768
Opus 5 $0.00008 $0.00384
Sonnet 5 $0.00003 $0.00154
Haiku 4.5 $0.00002 $0.00077

Measured 2d ago against content hash cfec6d1f8b2b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

plan 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 2d 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.

canonical/commands/plan.md · 70 lines

What it actually says

Invoke the agent-skills:planning-and-task-breakdown skill.

Read the existing spec (SPEC.md or equivalent) and the relevant codebase sections. Then:

  1. Enter plan mode — read only, no code changes
  2. Identify the dependency graph between components
  3. Slice work vertically (one complete path per task, not horizontal layers)
  4. Write tasks with acceptance criteria and verification steps
  5. Add checkpoints between phases
  6. Present the plan for human review
  7. Offer to file the tasks as GitHub issues — opt-in, see below

Save the plan to tasks/plan.md and task list to tasks/todo.md.

Filing tasks as GitHub issues (opt-in)

After the human reviews the plan, ask: "File these N tasks as GitHub issues?" Nothing is filed without an explicit "yes" — a reviewed plan is not consent to file.

Resolve the target repo first (gh repo view --json nameWithOwner, or parse git remote get-url origin). If the remote state is ambiguous (no origin, or multiple candidate remotes), ask the user which repo to target — never guess. Then check .cohort/cohort.toml for a [tracker] table (see below). The confirmation prompt must echo the resolved target repo, and — only if [tracker] is present and valid — the board owner/number, before anything is created.

gh hygiene (binding):

  • Every issue body is written to a temp file first and passed with gh issue create --body-file <tempfile> — plan text is never composed into an inline --body string or any other shell string.
  • Titles are quoted as a single argument.
  • The target repo is always explicit: gh issue create --repo <owner>/<name> ... — never rely on gh's inference from an ambiguous multi-remote checkout.

Issue body convention — a convention, not a reference to Cohort's own .github/ISSUE_TEMPLATE/ (consumer repos won't have it). If the target repo has its own issue templates, prefer those instead:

## Summary
<one paragraph>

## Acceptance criteria (Done when)
- ...

## Design notes
<anything that doesn't fit above>

Cross-reference dependency order and a parent/epic issue in the body when one exists (e.g. "Depends on #N", "Part of #M — see the plan for full context").

Optional board add. If .cohort/cohort.toml has a [tracker] table with project_owner and project_number, add each filed issue to that project board (gh project item-add <project_number> --owner <project_owner> --url <issue-url>). Validate first, fail closed: project_number must parse as an integer and project_owner must match a strict GitHub login/org pattern (^[A-Za-z0-9][A-Za-z0-9-]{0,38}$). If either check fails, skip the board add and warn why. If the [tracker] table is absent entirely, silently skip the board add — it is simply not configured, not an error.

Graceful degradation. If gh is missing, or gh auth status reports not authenticated, skip issue creation entirely and print the issues as markdown instead, so the plan is still usable.

Changes

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.

  1. 2d ago First seen · 70 lines · 15 tokens per session scan A cfec6d1f8b2b

Subscribe to this mod's changes

plan is a command published in the GitHub repository askwigconsulting/cohort (2 stars, last pushed 25d ago), licensed MIT. It adds 15 tokens to every session and 768 once invoked, about $0.0001 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-31.