---
name: queue-review-2b6fc9074e58
description: >
  Review and resolve entries in `doc/app/decisions_queue.md` — the deferred
  decisions queue introduced in v5.29.0. Lists pending entries from one or
  many projects, lets the user confirm / adjust / revert each, and moves
  resolved ones to the historical section. Use when the user says
  "queue review", "review queue", "revisar cola", "resolver pendientes",
  or wants to batch-process decisions accumulated by the autopilot in
  `equilibrado` / `agresivo` modes when `autopilot.queue_enabled=true`.
context: direct
allowed-tools: Read, Write, Edit, Bash(pwd), Bash(ls:*)
---

# /queue review — Resolver decisiones diferidas

Procesa la cola en `doc/app/decisions_queue.md`. La cola solo se llena cuando el proyecto tiene `specbox.autopilot.queue_enabled = true` (off por default en v5.29.0). Cuando está apagada, las decisiones diferibles se preguntan síncronamente como en v5.28.

## Uso

```
/queue review                       # Lista pendientes en este proyecto
/queue review --recent N            # Solo las N más recientes pendientes
/queue review --feature signup-flow # Filtrar por feature
/queue review --resolve dq-XXX      # Resolver una entrada específica
/queue review --all-projects        # Reservado para multi-proyecto (PR-15+)
```

---

## MCP remoto: enviar la cola

El servidor alojado (`mcp.specbox.build`) no lee ni escribe tu repositorio (UC-8604). Con él,
cada llamada a estas tools lleva **`files_content`**: los ficheros que lee, como `{ruta relativa:
contenido}` (léelos con `Read`; los que no existan, no los mandes). Después aplica la respuesta en
el repositorio:

- `files_changed` → escribe cada fichero con ese contenido completo (`Write`).
- `files_deleted` → bórralos.
- `files_appended` → añade ese texto al final del fichero, sin sobrescribir lo que tiene.
- `files_requested` → ficheros que la tool buscó y no mandaste: si existen, repite la llamada
  añadiéndolos.

Si la respuesta es `APP_DOCS_CONTENT_REQUIRED` o `CLIENT_CONTENT_REQUIRED`, faltó el contenido. Con
el MCP local (`stdio`) basta `project_path` y nada de esto hace falta.

Aquí el fichero es uno: `doc/app/decisions_queue.md`. Cada `resolve_queue_entry` devuelve la cola
nueva en `files_changed`: escríbela y manda **esa** versión en la llamada siguiente (en un batch,
encadena las resoluciones sobre el contenido actualizado).

---

## Paso 1 — Listar la cola

Llama:

```
list_decisions_queue(project_path=".")
# MCP remoto: list_decisions_queue(files_content={"doc/app/decisions_queue.md": <contenido>})
```

Si retorna `exists=false`, informa "La cola no se ha creado aún. Las decisiones diferibles solo se acumulan cuando `autopilot.queue_enabled=true`." y termina.

Si retorna `pending_count=0`, informa "Sin decisiones pendientes." y termina.

Si hay pendientes, formatea la salida así:

```
🔄 Decisiones pendientes (N):

[1] dq-XXXX-abcd-veg
    feature: signup-flow
    decision_key: veg_preview
    Generado: hace 2 horas
    Default aplicado: Per-ICP arquetipo Startup (score=0.82)
    Bloquea: marcar UC-003 como ACCEPTED
    Evidencia: doc/veg/signup-flow/preview.md
    Acción: [c]onfirmar  [a]djust  [r]everter  [s]kip

[2] ...
```

Pide al usuario que elija qué quiere hacer (uno por uno o batch).

---

## Paso 2 — Resolver entradas

Cuando el usuario decide:

| Acción | Lógica |
|--------|--------|
| **Confirmar** | El default tentativo era correcto. Llama `resolve_queue_entry(engine_id, resolution="confirmed: <texto opcional>")`. |
| **Ajustar** | Pregunta el nuevo valor, aplica el cambio en el artefacto referenciado por `evidence`, y resuelve con `resolution="adjusted: <descripción>"`. |
| **Revertir** | El default fue incorrecto. Pregunta qué hacer (rehacer paso síncrono, abortar feature, etc.) y resuelve con `resolution="reverted: <razón>"`. |
| **Skip** | No hacer nada — la entrada queda pendiente. |

Si el usuario quiere batch-resolver con un patrón ("aprobar todos los veg_preview con score >0.85"):

1. Filtra `pendientes` por `decision_key` y/o por contenido en `default_applied`.
2. Aplica el `resolve_queue_entry` para cada match.
3. Reporta cuántas resolvió en batch.

---

## Paso 3 — Output final

```
✅ Resueltas en esta sesión: N
   doc/app/decisions_queue.md actualizado (M pendientes restantes)

UCs desbloqueados (si los hay): UC-003, UC-007
```

Los UCs se desbloquean automáticamente cuando todas sus entradas pendientes se resuelven (esto lo gestiona el sync layer de PR-12+).

---

## Inviolables

La cola **nunca** acepta:

- `destructive_action`
- `image_cost_over_budget`
- `branch_to_main_push`
- `definition_quality_gate`
- `feature_problem_definition`
- `feedback_field_classification`

Estos siempre se preguntan síncronamente. Si el usuario invoca `/queue review` y ve uno de estos en la cola, es un bug — reportar para revisar el flujo del skill que lo encoló indebidamente.

---

## Auto-resolve

Si una entrada tiene más de `autopilot.queue_auto_resolve_days` días (default 7), se auto-resuelve manteniendo el default tentativo. Esto evita que la cola se acumule indefinidamente. La auto-resolución queda registrada con `auto_resolved=true` para auditabilidad.

`/queue review` puede mostrar warnings sobre entradas que están a punto de auto-resolverse.

---

## Reglas

- Nunca borrar entradas resueltas — son histórico de decisiones del proyecto.
- Editar `decisions_queue.md` a mano está OK (es una zona `manual` del usuario), pero el formato lo gestiona el parser; un fichero con marcadores rotos hace que `list_decisions_queue` retorne errores.
- Después de resolver, mostrar al usuario el comando equivalente para que pueda automatizar:
  ```
  resolve_queue_entry(engine_id="dq-XXX", resolution="confirmed: looks good")
  ```


---
Source attribution: EmbedBuild
Original project: https://github.com/EmbedBuild/specbox-engine/blob/0d7a27c30d728b068215b9486667272160ed0d4e/.claude/skills/queue-review/SKILL.md
License: Apache-2.0
License information: https://www.apache.org/licenses/LICENSE-2.0
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

Business Source License 1.1

Parameters

Licensor:             Jesus Perez Sanchez (Embed Build)
Licensed Work:        SpecBox Engine v5.11.0
                      Copyright (c) 2026 Jesus Perez Sanchez
Additional Use Grant: You may use the Licensed Work for non-production
                      purposes, including personal evaluation, academic
                      research, educational use, and contributing
                      modifications back to the Licensed Work.
                      Production use is permitted only in projects
                      developed jointly with Embed Build under a
                      separate written agreement.
Change Date:          2030-03-26
Change License:       Apache License, Version 2.0

License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
"Business Source License" is a trademark of MariaDB Corporation Ab.

-----------------------------------------------------------------------------

Terms

The Licensor hereby grants you the right to copy, modify, create derivative
works, redistribute, and make non-production use of the Licensed Work. The
Licensor may make an Additional Use Grant, above, permitting limited
production use.

Effective on the Change Date, or the fourth anniversary of the first publicly
available distribution of a specific version of the Licensed Work under this
License, whichever comes first, the Licensor hereby grants you rights under
the terms of the Change License, and the rights granted in the paragraph
above terminate.

If your use of the Licensed Work does not comply with the requirements
currently in effect as described in this License, you must purchase a
commercial license from the Licensor, its affiliated entities, or authorized
resellers, or you must refrain from using the Licensed Work.

All copies of the original and modified Licensed Work, and derivative works
of the Licensed Work, are subject to this License. This License applies
separately for each version of the Licensed Work and the Change Date may vary
for each version of the Licensed Work released by Licensor.

You must conspicuously display this License on each original or modified copy
of the Licensed Work. If you receive the Licensed Work in original or
modified form from a third party, the terms and conditions set forth in this
License apply to your use of that work.

Any use of the Licensed Work in violation of this License will automatically
terminate your rights under this License for the current and all other
versions of the Licensed Work.

This License does not grant you any right in any trademark or logo of
Licensor or its affiliates (provided that you may use a trademark or logo of
Licensor as expressly required by this License).

TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
TITLE.

MariaDB hereby grants you permission to use this License's text to license
your works, and to refer to it using the trademark "Business Source License",
as long as you comply with the Covenants of Licensor below.

Covenants of Licensor

In consideration of the right to use this License's text and the "Business
Source License" name and trademark, Licensor covenants to MariaDB, and to all
other recipients of the licensed work to be provided by Licensor:

1. To specify as the Change License the GPL Version 2.0 or any later version,
   or a license that is compatible with GPL Version 2.0 or a later version,
   where "compatible" means that software provided under the Change License can
   be included in a program with software provided under GPL Version 2.0 or a
   later version. Licensor may specify additional Change Licenses without
   limitation.

2. To either: (a) specify an additional grant of rights to use that does not
   impose any additional restriction on the right granted in this License, as
   the Additional Use Grant; or (b) insert the text "None".

3. To specify a Change Date.

4. Not to modify this License in any other way.



# Mega AI Hub resource metadata

Creator / publisher: EmbedBuild
Original project: https://github.com/EmbedBuild/specbox-engine/blob/0d7a27c30d728b068215b9486667272160ed0d4e/.claude/skills/queue-review/SKILL.md
Attribution basis: Source repository record

Fields of work: Product Management, Project & Program Management, Sales
Roles: Product Manager, Project Manager, Sales Development Rep (SDR)
Specialties: Specialty not specified
Tools: Doc/App/Decisions_Queue.Md
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 33943f5067cbaa3fceafb264e35f22de6832b16b1e6fc1630010e9f38fe8b451
