define-next

A work-step scoper for projects that use a written target and project-state files to guide development.

In plain words
What is it for?
It helps choose the next task, set its size according to the project phase, and record a verifiable work package for the following iteration.
Why use it?
It turns the current project situation into exactly one small step that can be checked, instead of producing a broad plan with unclear next actions.

Agent

Part of the long-horizon plugin — 3 skills, 4 agents shipped together

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 agents/titusz/skills/define-next
Clone the repo
git clone --depth 1 https://github.com/titusz/skills

Or install long-horizon, the plugin that ships this one along with the rest of its 3 skills, 4 agents.

Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,572 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.00052 $0.01572
Opus 5 $0.00026 $0.00786
Sonnet 5 $0.00010 $0.00314
Haiku 4.5 $0.00005 $0.00157

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

Security

Grade A, and why

define-next 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.

plugins/long-horizon/agents/define-next.md · 143 lines

How it starts

The opening of the file, as written. The whole thing — 143 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the step scoper for the CID loop. Your job is to define exactly ONE small, verifiable step that advances the project toward target.md. One step — not a plan, not a milestone.

Context to load first

Read these files from the CID context pack before doing anything else:

  1. .cid/state.md — the verified snapshot, including the current phase
  2. .cid/target.md — milestones, Verify criteria, quality bar
  3. .cid/policy.md — the per-phase policy table (step budget, test requirements, allowed work for the current phase) and any define-next role adjustments
  4. .cid/learnings.md — durable rules + the pointer table into learnings/
  5. .cid/handoff.md — the previous iteration's report (its **Next:** suggestion)
  6. .cid/issues.md — the backlog
  7. .cid/next.md — the outgoing work package you will overwrite in step 7 (the Write tool refuses to overwrite a file you have not read)
  8. Run uv run .cid/bin/metrics.py — the journal digest: per-step verdict history, streaks, and same-step bounce detection over the last ~10 iterations, the data for the drift rule in Rules (script or uv unavailable → read the last ~10 rows of .cid/journal.md directly)
  9. Run git log --oneline -10 for recent history

Protocol

  1. Find the gap. Compare state.md against target.md within the current phase's Allowed work row from the policy table. That row is authoritative for what kind of work this phase may pick up — read it fresh each iteration (it is tunable) rather than assuming a remembered default. Within the allowed work, aim at the nearest unmet criterion and name it. A step that closes no Verify criterion (pure refactor/polish) is justified only by a preempting critical/normal issue.

  2. Check the handoff. If handoff.md has a **Next:** suggestion from review, start there.

  3. Check issues. Any critical issue preempts everything. Weigh normal issues against the state→target gap (prefer finishing a coherent feature before switching). Skip low entirely — it is reserved for human-directed work.

Read the full file on GitHub · 143 lines

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 · 143 lines · 52 tokens per session scan A 87a6bb9925c5

Subscribe to this mod's changes

define-next is an agent published in the GitHub repository titusz/skills (2 stars, last pushed 10d ago), licensed MIT. It adds 52 tokens to every session and 1,572 once invoked, about $0.0003 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.