bucle

bucle is a command for Claude Code from doncheli/don-cheli-sdd. It costs 13 tokens per session (523 once invoked), scanned A, original, Apache-2.0.

A command that repeatedly executes unfinished user stories from a product requirements document, checking each story and recording the result after every iteration.

In plain words
What is it for?
Use it to run a Don Cheli PRD, select pending stories, execute them in fresh contexts, verify acceptance criteria, and update project progress.
Why use it?
It automates routine story-by-story work while limiting retries and skipping stories that remain blocked.

Command for Claude Code

Part of the don-cheli-sdd plugin — 28 skills, 115 commands, 1 agent 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 commands/doncheli/don-cheli-sdd/bucle
Clone the repo
git clone --depth 1 https://github.com/doncheli/don-cheli-sdd

Made for: Claude Code.

Or install don-cheli-sdd, the plugin that ships this one along with the rest of its 28 skills, 115 commands, 1 agent.

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 bucle

README.md
[![agentmods](https://agentmods.dev/badge/commands/doncheli/don-cheli-sdd/bucle.svg)](https://agentmods.dev/commands/doncheli/don-cheli-sdd/bucle)
Your own site
<a href="https://agentmods.dev/commands/doncheli/don-cheli-sdd/bucle"><img src="https://agentmods.dev/badge/commands/doncheli/don-cheli-sdd/bucle.svg" alt="Measured on agentmods" height="20"></a>
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 523 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.00013 $0.00523
Opus 5 $0.00006 $0.00262
Sonnet 5 $0.00003 $0.00105
Haiku 4.5 $0.00001 $0.00052

Measured yesterday against content hash 00bd98f13678, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bucle 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 yesterday.

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.

scripts/.claude/commands/bucle.md · 75 lines

What it actually says

/bucle

Objetivo

Lanzar el bucle autónomo que ejecuta las historias de usuario una por una hasta completar o agotar iteraciones.

Uso

/bucle [max_iteraciones]
  • max_iteraciones: Número máximo de iteraciones (default: 10)

Prerrequisitos

  • Archivo .dc/sesion/prd.json existente
  • Al menos una historia con pasa: false

Comportamiento

  1. Verificar que prd.json existe
  2. Contar historias restantes
  3. Lanzar el script bucle.sh
  4. Para cada iteración:
    • Seleccionar historia prioritaria no completada
    • Ejecutar en contexto fresco (aislado)
    • Verificar criterios de aceptación
    • Actualizar prd.json
    • Registrar en progreso.md
  5. Terminar cuando:
    • Todas las historias pasan → COMPLETO
    • Máximo iteraciones alcanzado → fallo
    • Historia bloqueada 2 veces → saltar y continuar

Output

=== Bucle Don Cheli Iniciado ===
Historias: 5 pendientes, 0 completadas
Máximo iteraciones: 10

--- Iteración 1/10 ---
Historia: HU-001 [P1] Estructura de archivos
Estado: PASÓ ✅

--- Iteración 2/10 ---
Historia: HU-002 [P2] Comando historias-generar
Estado: PASÓ ✅

...

=== COMPLETO ===
Las 5 historias pasaron en 5 iteraciones.
Ver progreso: .dc/progreso.md

Gestión de Errores

Situación Comportamiento
prd.json faltante Error + sugerir /historias-generar
Sin historias pendientes Mensaje "Nada que hacer"
Historia falla 1x Reintentar en siguiente iteración
Historia falla 2x Saltar + registrar
Máximo iteraciones Salir con mensaje

Contexto Fresco

Cada historia se ejecuta en su propio contexto aislado. El agente NO acumula confusión de sesiones anteriores. Investigaciones muestran que las respuestas de LLM degradan notablemente en contextos largos. Contexto fresco = agente más inteligente.

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. yesterday First seen · 75 lines · 13 tokens per session scan A 00bd98f13678

Subscribe to this mod's changes

bucle is a command published in the GitHub repository doncheli/don-cheli-sdd (57 stars, last pushed 25d ago), licensed Apache-2.0. It adds 13 tokens to every session and 523 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-09-03.