iterate

iterate is a command for coding agents from Rubiss-Projects/spec-kit-ralph. It costs 20 tokens per session (2,452 once invoked), scanned A, original, MIT.

A single work cycle in a Ralph loop that completes at most one user story from a tasks.md file and records the progress in a commit.

In plain words
What is it for?
Use it to run prerequisite checks, complete validated tasks for one story, update the task list, and commit the resulting work.
Why use it?
It keeps changes small and reviewable, while allowing unfinished work to continue in later cycles instead of mixing multiple stories together.

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/rubiss-projects/spec-kit-ralph/iterate
Clone the repo
git clone --depth 1 https://github.com/Rubiss-Projects/spec-kit-ralph

Wrote 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.

agentmods badge for iterate

README.md
[![agentmods](https://agentmods.dev/badge/commands/rubiss-projects/spec-kit-ralph/iterate.svg)](https://agentmods.dev/commands/rubiss-projects/spec-kit-ralph/iterate)
Your own site
<a href="https://agentmods.dev/commands/rubiss-projects/spec-kit-ralph/iterate"><img src="https://agentmods.dev/badge/commands/rubiss-projects/spec-kit-ralph/iterate.svg" alt="Measured on agentmods" height="20"></a>
Per session 20 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,452 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.00020 $0.02452
Opus 5 $0.00010 $0.01226
Sonnet 5 $0.00004 $0.00490
Haiku 4.5 $0.00002 $0.00245

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

Security

Grade A, and why

iterate 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 5d 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.

commands/iterate.md · 176 lines

How it starts

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

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Scope Constraint

CRITICAL: Complete AT MOST ONE user story in this iteration.

  • If you cannot complete an entire user story, complete and commit as many of its tasks as you can validate this iteration
  • Partial progress is committed as a coordinated work unit each iteration; the remaining tasks in the same story are handled in subsequent iterations
  • A completed task may add follow-up tasks to tasks.md; this is valid only when at least one previously-open task is also marked [x] in the same coordinated commit
  • DO NOT start a second user story even if you have time remaining
  • This prevents context rot and keeps changes reviewable

Outline

  1. Setup: Run the prerequisite check script from repo root and parse FEATURE_DIR and AVAILABLE_DOCS list. All paths must be absolute. For single quotes in args like "I'm Groot", use escape syntax appropriate to your shell.

    .specify/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks
    
    .specify/scripts/powershell/check-prerequisites.ps1 -Json -RequireTasks -IncludeTasks
    
  2. Read context first:

    • Read FEATURE_DIR/ralph-memory.md FIRST -- it is the primary durable source for codebase patterns, decisions, gotchas, reusable commands, failed approaches, and the current handoff
    • Read FEATURE_DIR/tasks.md -- understand task structure and identify next incomplete user story
    • Read FEATURE_DIR/plan.md for tech stack, architecture, and file structure
    • IF EXISTS: Read FEATURE_DIR/data-model.md for entities and relationships
    • IF EXISTS: Read FEATURE_DIR/contracts/ for API specifications
    • IF EXISTS: Read FEATURE_DIR/research.md for technical decisions and constraints
    • IF EXISTS: Read only the recent relevant entries in FEATURE_DIR/progress.md for optional audit context; never use it as the primary memory bridge

Read the full file on GitHub · 176 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. 5d ago First seen · 176 lines · 20 tokens per session scan A 4d4893bc76af

Subscribe to this mod's changes

iterate is a command published in the GitHub repository Rubiss-Projects/spec-kit-ralph (24 stars, last pushed 12d ago), licensed MIT. It adds 20 tokens to every session and 2,452 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-30.