@tacuchi/agent-workflow-cli 15.1.0 → 16.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/skills/w/README.md +14 -14
  3. package/skills/w/SKILL.md +96 -75
  4. package/skills/w/artifacts/README.md +6 -6
  5. package/skills/w/artifacts/artifacts-core/SESSION.md +1 -7
  6. package/skills/w/artifacts/artifacts-core/TASKS.md +1 -1
  7. package/skills/w/artifacts/artifacts-exec/TECHNICAL-NOTE.md +9 -54
  8. package/skills/w/artifacts/artifacts-research/CONCLUSIONS.md +1 -1
  9. package/skills/w/commands/README.md +22 -22
  10. package/skills/w/commands/export-diagrams.md +9 -9
  11. package/skills/w/commands/export-manuals.md +9 -9
  12. package/skills/w/commands/export-reports.md +9 -9
  13. package/skills/w/commands/export-scripts.md +9 -9
  14. package/skills/w/commands/fix-git.md +12 -12
  15. package/skills/w/commands/plan-exec.md +19 -19
  16. package/skills/w/commands/plan-new.md +18 -18
  17. package/skills/w/commands/plan-refine.md +22 -22
  18. package/skills/w/commands/quick.md +16 -16
  19. package/skills/w/commands/spec-new.md +35 -34
  20. package/skills/w/commands/spec-refine.md +16 -16
  21. package/skills/w/commands/status.md +18 -16
  22. package/skills/w/commands/workspace-init.md +14 -14
  23. package/skills/w/exports/README.md +5 -5
  24. package/skills/w/exports/export-diagrams/SKILL.md +58 -58
  25. package/skills/w/exports/export-manuals/SKILL.md +61 -61
  26. package/skills/w/exports/export-reports/SKILL.md +51 -51
  27. package/skills/w/exports/export-scripts/SKILL.md +60 -60
  28. package/skills/w/harness/SKILL.md +48 -47
  29. package/skills/w/loops/CHASSIS.md +104 -97
  30. package/skills/w/loops/CODE-POLICIES.md +21 -21
  31. package/skills/w/loops/README.md +30 -29
  32. package/skills/w/loops/plan-exec-loop/SKILL.md +77 -80
  33. package/skills/w/loops/plan-new-loop/SKILL.md +88 -58
  34. package/skills/w/loops/plan-refine-loop/SKILL.md +69 -45
  35. package/skills/w/loops/quick-loop/SKILL.md +79 -79
  36. package/skills/w/loops/spec-refine-loop/SKILL.md +93 -97
  37. package/skills/w/roles/README.md +2 -2
  38. package/skills/w/roles/diagrams/SKILL.md +50 -47
  39. package/skills/w/roles/git/SKILL.md +58 -58
  40. package/skills/w/roles/research/SKILL.md +65 -62
  41. package/skills/w/roles/sql/SKILL.md +59 -55
  42. package/skills/w/roles/ui-spec/SKILL.md +60 -74
@@ -1,123 +1,123 @@
1
1
  ---
2
2
  name: quick-loop
3
3
  description: >-
4
- El atajo liviano de agent-workflow: resuelve una tarea acotada (fix, ajuste
5
- chico) directamente desde el prompt, editando código con ceremonia mínima.
6
- Heir del chasis común de los loops (loops/CHASSIS.md motor gap-driven con
7
- las políticas de loops que editan código: git seguro, BD solo-scripts, gate
8
- de revisión de cierre proporcional, sin auto-export); sus deltas viven en
9
- el cuerpo: sin fases ni plan-doc (el prompt ES la tarea),
10
- session ligera única (<slug>-quick), un solo commit, gate de tamaño a la
11
- entrada y escalación EN VIVO a SPEC (handoff + spec-refine directo; a PLAN
12
- queda diferida) si el objetivo excede un quick o la tarea crece. NO toca
13
- docs/. Lo arranca /w:quick y es reanudable. Invocar para cambios pequeños y
14
- directos que no ameritan spec ni plan formal.
4
+ The agent-workflow lightweight shortcut: solves a scoped task (fix, small
5
+ tweak) straight from the prompt, with minimal ceremony and a single commit.
6
+ Heir of the chassis (loops/CHASSIS.md + CODE-POLICIES.md). Deltas: no
7
+ plan-doc (the prompt IS the task), single light session <slug>-quick, an
8
+ entry size gate and LIVE escalation to SPEC (to PLAN it stays deferred)
9
+ when the objective exceeds a quick or the task grows. Never touches docs/.
10
+ Started by /w:quick; resumable. Invoke for small, direct changes that do
11
+ not warrant a formal spec or plan.
15
12
  ---
16
13
 
17
14
  # quick-loop
18
15
 
19
- > **Heir** del chasis comúnaquí **solo** los deltas de QUICK. El motor vive en el chasis y las *Políticas de loops que editan código* (git · BD · gate proporcional) en `CODE-POLICIES.md` — no se repiten.
16
+ > **Heir** of the common chassis — **only** the QUICK deltas live here. The engine lives in the chassis and the *code-editing loop policies* in `CODE-POLICIES.md` — never repeated.
20
17
 
21
18
  ## Flow
22
19
  QUICK
23
20
 
24
21
  ## Layer
25
- 2 — la IA lo corre entero (loop mínimo).
22
+ 2 — the AI runs it end to end (minimal loop).
26
23
 
27
24
  ## Started by
28
- `/w:quick` — **reanudable** (mismo mecanismo de resume del chasis).
25
+ `/w:quick` — **resumable** (same chassis resume mechanism).
29
26
 
30
27
  ## Reads
31
- — (el prompt del usuario; no hay documento de entrada).
28
+ — (the user's prompt; there is no input document).
32
29
 
33
30
  ## Writes
34
- - **Deliverable según la tarea:** edita código en las fuentes (cambio mínimo) **o** produce un **análisis/diseño** acotado (deliverable no-código, vive en los artefactos de la session no en `docs/`).
35
- - Artefactos de la session en `.workflow/sessions/`.
36
- - **NO toca `docs/`** (sin doc, sin auto-export). Un análisis/diseño que amerite preservarse se promueve aparte (`export-*`) o se escala a SPEC/PLAN (SPEC: en vivo ver *Delta QUICK*).
31
+ - **Deliverable per task:** edits code in the sources (minimal change) **or** produces a scoped **analysis/design** (non-code deliverable, lives in the session artifactsnever in `docs/`).
32
+ - Session artifacts under `.workflow/sessions/`.
33
+ - **NEVER touches `docs/`** (no doc, no auto-export). An analysis/design worth preserving is promoted separately (`export-*`) or escalated to SPEC/PLAN (SPEC: livesee *QUICK delta*).
37
34
 
38
35
  ## Internal session
39
36
 
40
- - **SIEMPRE** crea una session ligera con descriptor `<slug>-quick` → `NNN-<slug>-quick` (Type = `quick`, ≈ `exec`): `SESSION` · `DECISION` · `SCRIPTS.sql` · `CHECKPOINT` (+ `BACKLOG` solo si difiere). Una sola session. La investigación es **inline** dentro de ella (`ANALYSIS-FILE`/`CONCLUSIONS` + `SCRIPTS.sql` read-only en su carpeta). El caller pasa solo el descriptor; el CLI antepone el `NNN` global y secuencial (ver chasis). **Excepción:** si el **gate de tamaño** de la entrada escala a SPEC, el run quick no llega a existir — no se crea session quick; la session es la del `spec-refine-loop`.
37
+ - **ALWAYS** creates a light session with descriptor `<slug>-quick` → `NNN-<slug>-quick` (Type = `quick`, ≈ `exec`): `SESSION` · `DECISION` · `SCRIPTS.sql` · `CHECKPOINT` (+ `BACKLOG` only if something is deferred). A single session. Research is **inline** inside it (`ANALYSIS-FILE`/`CONCLUSIONS` + read-only `SCRIPTS.sql` in its folder). The caller passes only the descriptor; the CLI prepends the global sequential `NNN` (see chassis). **Exception:** if the entry **size gate** escalates to SPEC, the quick run never comes to exist — no quick session is created; the session is the `spec-refine-loop` one.
41
38
 
42
39
  ## Inherits
43
40
 
44
- Leé **[`../CHASSIS.md`](../CHASSIS.md)** (instalación normal) **o** `CHASSIS.md` junto a este archivo (instalación aplanada) el motor completo del loop (objetivo persistente + verification-first, gap-driven, session única + research inline, structured-choice + control `flow`, compact/resume, artefactos como log vivo, numeración, convergence gate, docs/ boundary) — **y** **[`../CODE-POLICIES.md`](../CODE-POLICIES.md)** (o `CODE-POLICIES.md` junto a este archivo) las *Políticas de loops que editan código* (git seguro · BD solo-scripts · gate de revisión de cierre **proporcional**) **siempre antes** de estos deltas.
41
+ Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **and** **[`../CODE-POLICIES.md`](../CODE-POLICIES.md)** the *code-editing loop policies***always before** these deltas. *(If `../` does not resolve: same names next to this fileglobal layout rule, chassis § Reference resolution.)*
45
42
 
46
43
  ## Composes
47
44
 
48
- `git` · `sql` (regla BD) · `research` (inline). Resueltas por `.workflow/skills.toml`.
45
+ `git` · `sql` (DB rule) · `research` (inline). Resolved via `.workflow/skills.toml`.
49
46
 
50
- > **Convenciones ambientes (no roles):** estándares de código/testing/redacción y `creating-tools` son skills standalone que el host auto-descubre por su `description` — el workflow no las bindea ni depende de ellas. Doctrina completa: [../../roles/README.md](../../roles/README.md).
47
+ > **Ambient conventions (not roles):** code/testing/writing standards and `creating-tools` are standalone skills the host auto-discovers by `description` — the workflow neither binds nor depends on them. Full doctrine: [../../roles/README.md](../../roles/README.md).
51
48
 
52
- ## Delta QUICK — minimal ceremony
49
+ ## QUICK delta — minimal ceremony
53
50
 
54
- - **Sin fases, sin plan-doc**: el prompt **es** la tarea (una sola unidad). No hay roadmap.
55
- - **Verification-first proporcional** (ceremonia mínima): aun acá se **siembra el check antes**, del tamaño de la tarea. Código: un test (repro del bug → fix) o "build/lint/tests existentes siguen verdes" (chore). **Análisis/diseño**: una **rúbrica falsable corta**, *ratificada por el usuario* antes de perseguirla. Es el `SESSION.Success criteria` del run (ver [chasis § *Verification-first*](../CHASSIS.md)).
56
- - **Git y BD inline** (políticas completas en [`../CODE-POLICIES.md`](../CODE-POLICIES.md)): antes de editar, verificar rama esperada por fuente (`aw check-branch`); commit **propuesto** (aprobar antes) — nunca `push`/`--amend`/`--no-verify`. La IA **nunca ejecuta DML/DDL**: las migraciones se redactan en el `SCRIPTS.sql` de la session (consultas read-only sí, vía MCP).
57
- - **Una sola session**. **Un solo commit** propuesto al final (solo si hubo cambios de código), **tras el gate de revisión de cierre proporcional** ([`../CODE-POLICIES.md`](../CODE-POLICIES.md) § *Gate de revisión de cierre*): re-lectura del diff + convenciones ambientes; corregir o diferir; nada llega al commit sin revisar.
58
- - **Gate de tamaño a la ENTRADA** (antes de crear la session): al recibir el objetivo, evaluar si **excede un quick**. Dispara **solo con señales claras** (≥2 de: necesita arquitectura · ≥2 fuentes · varios entregables · feature/refactor grande · requisitos ambiguos que piden elicitación); borderline → **sigue en quick sin preguntar** (si después crece, lo cubre la escalación mid-loop). Un **resume** de una quick existente **no** re-dispara el gate. Si dispara → **structured-choice** (1 pregunta de contenido, recomendación primera + control `flow`; `Cerrar` acá = abortar, nada creado aún):
59
- - **Cambiar a SPEC** (recomendada) → **no se crea la session quick**: corre la *Transición en vivo a SPEC* (bullet siguiente).
60
- - **Seguir en quick**continúa normal (`create_or_resume` + loop).
61
- - **Recortar alcance**la IA propone la **sub-tarea que cabe** en un quick; el loop sigue con ella (`SESSION.Objective` = la sub-tarea; el prompt original queda en el `## Origin` de la session) y el resto se difiere al `BACKLOG` ("recortado en el gate — puede ameritar spec aparte, `/w:spec-new`").
62
- - **Anti-duplicado** (espíritu `create_or_resume`): si ya existe un spec cuyo `## Origin` referencia este mismo objetivo (o una session `*-spec-refine` equivalente), la recomendada pasa a ser **retomar ese spec** (semántica `/w:spec-refine`) — nunca materializar un segundo borrador.
63
- - **Transición en vivo a SPEC** (compartida por el gate y la escalación mid-loop): al aceptar, la línea de trabajo **deja de ser QUICK y pasa a ser flujo SPEC** el consentimiento explícito en la structured-choice **equivale a invocar el comando** del flujo destino (excepción consentida a la regla de continuidad; ver [`../../SKILL.md`](../../SKILL.md) § *Contexto operativo*). Ya **del lado SPEC**: (1) materializar el **borrador** siguiendo el procedimiento de [`../../commands/spec-new.md`](../../commands/spec-new.md) — o `commands/spec-new.md` dentro de la skill `w` instalada (instalación aplanada) — `aw next-number docs/specs`, slug, esquema, single-pass **SIN investigación**; `## Origin` = "escalado desde `/w:quick`" + el prompt original (+ la session quick de origen si existe); (2) **cargar y ejecutar** [`../spec-refine-loop/SKILL.md`](../spec-refine-loop/SKILL.md) — o `../w-spec-refine-loop/SKILL.md` (instalación aplanada, skill hermana) — sobre ese spec, mismo patrón "cargalo y ejecutalo" de los comandos trampolín. La session del run es la `NNN-<slug>-spec-refine` **normal** de ese loop (el CLI numera; su `## Origin` registra la escalación). El **invariante 2 queda intacto**: quick, mientras es quick, no escribe `docs/` — el borrador lo escribe el flujo SPEC, post-consentimiento.
64
- - **Escalación mid-loop + handoff**: si la tarea crece (mismas señales del gate) propone subir a **SPEC/PLAN** (structured-choice, recomendación primera). Si el usuario acepta:
65
- - el **código ya editado queda** en el working tree (no se revierte) **y se registra** en `CHECKPOINT` + `BACKLOG` ("cambios sin commitear en `<fuente>` — código a medias; decidir commit/descartar al retomar") — reusando **ambas** mitades del patrón "commit rechazado" ([`../CODE-POLICIES.md`](../CODE-POLICIES.md) § *Git seguro*: no revertir **y** registrar lo sin commitear). Crítico en la rama **SPEC**, que no retoma el working tree;
66
- - la session quick va a `finalize`, persistiendo `CHECKPOINT` + `BACKLOG` con el **puntero**: a **PLAN**, "escalado a `docs/plans/PPP` retomar ahí" (**diferido como hoy**: siembra + puntero, sin entrar en vivo); a **SPEC**, "escalado a `docs/specs/NNN`**continuado en vivo** (session `NNN-<slug>-spec-refine`)";
67
- - los artefactos (`DECISION`, `SCRIPTS.sql`) **quedan en la session quick** como contexto referenciable por la nueva session (no se migran);
68
- - **SPEC entra en vivo**: tras el `finalize`, corre la *Transición en vivo a SPEC* (borrador vía procedimiento spec-new **solo si no existe** spec para este objetivo; luego el loop). **Asimetría** intacta: escalar a **PLAN** puede **absorber** el avance (plan-exec retoma el working tree existente); escalar a **SPEC** **reinicia** el ciclo de diseño y trata el código a medias como **contexto/referencia**, no como trabajo ya ingerido.
51
+ - **No phases, no plan-doc**: the prompt **is** the task (a single unit). No roadmap.
52
+ - **Proportional verification-first** (minimal ceremony): even here the check is **seeded before**, sized to the task. Code: one test (bug repro → fix) or "existing build/lint/tests stay green" (chore). **Analysis/design**: a **short falsifiable rubric**, *ratified by the user* before pursuing it. It is the run's `SESSION.Success criteria` (see [chassis § *Verification-first*](../CHASSIS.md)).
53
+ - **Git and DB inline** (full policies in [`../CODE-POLICIES.md`](../CODE-POLICIES.md)): before editing, verify each source's expected branch (`aw check-branch`); **proposed** commit (approve first) — never `push`/`--amend`/`--no-verify`. The AI **never executes DML/DDL**: migrations are drafted into the session's `SCRIPTS.sql` (read-only queries do run, via MCP).
54
+ - **One session. One commit** proposed at the end (only if there were code changes), **after the proportional closing review gate** ([`../CODE-POLICIES.md`](../CODE-POLICIES.md) § *Closing review gate*): diff re-read + ambient conventions; fix or defer; nothing reaches the commit unreviewed.
55
+ - **Entry SIZE GATE** (before creating the session): on receiving the objective, evaluate whether it **exceeds a quick**. It fires **only on clear signals** (≥2 of: needs architecture · ≥2 sources · multiple deliverables · large feature/refactor · ambiguous requirements needing elicitation); borderline → **continue in quick without asking** (if it later grows, mid-loop escalation covers it). A **resume** of an existing quick does **not** re-fire the gate. If it fires → **structured-choice** (1 content question, recommendation first + `flow` control; `Cerrar` here = abort, nothing created yet):
56
+ - **`Cambiar a SPEC`** (recommended) → **no quick session is created**: run the *Live transition to SPEC* (next bullet).
57
+ - **`Seguir en quick`**continue normally (`create_or_resume` + loop).
58
+ - **`Recortar alcance`**the AI proposes the **sub-task that DOES fit** a quick; the loop continues with it (`SESSION.Objective` = the sub-task; the original prompt goes into the session's `## Origin`) and the rest is deferred to `BACKLOG` ("trimmed at the gate — may warrant its own spec, `/w:spec-new`").
59
+ - **Anti-duplicate** (the `create_or_resume` spirit): if a spec whose `## Origin` references this same objective already exists (or an equivalent `*-spec-refine` session), the recommended option becomes **resuming that spec** (`/w:spec-refine` semantics) — never a second draft.
60
+ - **Live transition to SPEC** (shared by the gate and mid-loop escalation). On acceptance, the work line **moves to the SPEC flow**: the explicit consent in the structured-choice **equals invoking the destination command** (*consented exception* rule 3 of the *Continuity rule*, [`../../SKILL.md`](../../SKILL.md) § *Operating context*). On the SPEC side:
61
+ 1. **Materialize the draft** via the [`../../commands/spec-new.md`](../../commands/spec-new.md) procedure: `aw next-number docs/specs`, slug, schema, single-pass **NO RESEARCH**. `## Origin` = "escalated from `/w:quick`" + the original prompt (+ the origin quick session if it exists).
62
+ 2. **Load and execute** [`../spec-refine-loop/SKILL.md`](../spec-refine-loop/SKILL.md) flattened: `../w-spec-refine-loop/SKILL.md` over that spec (trampoline pattern).
63
+ 3. The run's session is that loop's **normal** `NNN-<slug>-spec-refine` (the CLI numbers it; its `## Origin` records the escalation). **Invariant 2 intact**: quick, while it is quick, never writes `docs/`the draft is written by the SPEC flow, post-consent.
64
+ - **Mid-loop escalation + handoff**: if the task grows (same gate signals) propose moving up to **SPEC/PLAN** (structured-choice, recommendation first). If the user accepts:
65
+ 1. The **already-edited code stays** in the working tree (never reverted) and is **recorded** in `CHECKPOINT` + `BACKLOG`: "uncommitted changes in `<source>` decide commit/discard on resume" (the "rejected commit" pattern, [`../CODE-POLICIES.md`](../CODE-POLICIES.md) § *Safe git*).
66
+ 2. The quick session goes to `finalize` with the **pointer** in `BACKLOG`: to **PLAN** → "escalated to `docs/plans/PPP` — resume there" (**deferred** as today: seed + pointer, no live entry); to **SPEC** → "escalated to `docs/specs/NNN` — **continued live** (session `NNN-<slug>-spec-refine`)".
67
+ 3. The artifacts (`DECISION`, `SCRIPTS.sql`) **stay in the quick session** as referenceable context for the new session (never migrated).
68
+ 4. **SPEC enters live**: after `finalize`, run the *Live transition to SPEC* (draft **only if no spec exists** for this objective; then the loop). **Asymmetry** intact: PLAN can **absorb** the progress (plan-exec picks up the existing working tree); SPEC **restarts** the design cycle and treats the half-done code as context/reference, never as ingested work.
69
69
 
70
- ## Continuidad entre prompts (contexto operativo)
70
+ ## Continuity across prompts (operating context)
71
71
 
72
- `quick` es donde la **regla de continuidad** (ver [`../../SKILL.md`](../../SKILL.md) § *Contexto operativo*) se ve más claro. Dentro de un workspace:
72
+ `quick` is where the **continuity rule** ([`../../SKILL.md`](../../SKILL.md) § *Operating context*) shows most clearly. Inside a workspace:
73
73
 
74
- 1. `/w:quick "primer prompt"` (**comando**) → crea la session `NNN-<slug>-quick`, arranca el loop. Los scripts van a **su** `SCRIPTS.sql`.
75
- 2. `"segundo prompt"` (**sin comando**, trabajo relacionado) → **no** crea otra session: **continúa/reabre la más reciente** (la del paso 1) y agrega los nuevos scripts a **esa misma** `SCRIPTS.sql`.
76
- 3. `/w:quick "tercer prompt"` (**comando** otra vez) → **nueva** session, nuevo loop.
74
+ 1. `/w:quick "first prompt"` (**command**) → creates session `NNN-<slug>-quick`, starts the loop. Scripts go to **its** `SCRIPTS.sql`.
75
+ 2. `"second prompt"` (**no command**, related work) → does **not** create another session: **continues/reopens the most recent one** (from step 1) and appends the new scripts to **that same** `SCRIPTS.sql`.
76
+ 3. `/w:quick "third prompt"` (**command** again) → **new** session, new loop.
77
77
 
78
- > El **comando** señala "nueva línea de trabajo"; un **prompt pelado** es "sigo en la misma" → por default continúa/reabre la más reciente (la *última iniciada*). Si es claramente no-relacionado, ofrece elegir (`continuar NNN` | `trabajo nuevo`) o cae a la rama **sin flujo** (escribe en `docs/` por convención + numeración). Sin workspace → comportamiento **vanilla**.
78
+ > The **command** signals "new work line"; a **bare prompt** means "same line" → by default continue/reopen the most recent session (the *last started*). Clearly unrelated offer choosing (`continuar NNN` | `trabajo nuevo`) or fall to the **no-flow** branch (write into `docs/` by convention + numbering). No workspace → **vanilla** behavior.
79
79
 
80
80
  ## Sequence
81
81
 
82
82
  ```
83
83
  quick-loop(prompt):
84
- # GATE DE TAMAÑO ANTES de crear session; solo línea de trabajo nueva (un resume no lo re-dispara)
85
- si el objetivo excede un quick (≥2 señales clarasver Delta):
86
- si ya hay spec / session spec-refine de este objetivorecomendar RETOMAR (/w:spec-refine) # anti-duplicado
87
- structured_choice(contenido: [Cambiar a SPEC (recomendada), Seguir en quick, Recortar alcance],
88
- flow: [Compactar, Cerrar]) # Cerrar acá = abortar (nada creado aún)
89
- Cambiar a SPEC → transición en vivo (ver Delta): borrador (procedimiento spec-new) +
90
- cargar y ejecutar ../spec-refine-loop/SKILL.md → FIN (sin session quick)
91
- Recortar alcance → objetivo = la sub-tarea propuesta; el resto → BACKLOG al crear la session
92
- Seguir en quick → continuar
93
- s = create_or_resume("<slug>-quick") # CLI antepone NNN global; siempre session ligera
94
- seed SESSION.Objective = el prompt
95
- seed SESSION.Success criteria = check del deliverable # verification-first, ANTES: test(s) si código · rúbrica corta RATIFICADA si análisis/diseño
96
- seed CHECKPOINT.Pending/Next = la tarea (s) # ANTES: sembrar intención (artifact-first)
97
- trabajar la tarea (loop mínimo):
98
- si edita códigoverificar rama esperada por fuente (`aw check-branch`); si no pausar + resolver
99
- producir el deliverable: editar código (cambio mínimo) Ó autorar el análisis/diseño
100
- si consulta BD read-only → SCRIPTS.sql + ejecutar read-only
101
- si cambio BD (DDL/DML) → SCRIPTS.sql (artefacto session, NO ejecutar)
102
- si decisión no obvia → DECISION
103
- si duda/gap → research inline ó structured-choice # chasis
104
- si la tarea CRECEproponer escalar a SPEC/PLAN # structured-choice, recomendación primera
105
- acepta PLAN → handoff (avance queda; BACKLOG→plan sembrado retomar ahí) → goto finalize
106
- acepta SPEC → handoff (avance queda; BACKLOG→"continuado en vivo") → finalize →
107
- transición en vivo (ver Delta): borrador si falta + spec-refine-loop
108
- convergence gate: Success criteria en verde # tests verdes si código · rúbrica satisfecha si análisis/diseño
109
- si hubo cambios de código:
110
- gate de revisión de cierre (proporcional): # re-lectura del diff + convenciones ambientes instaladas
111
- hallazgoscorregir (re-validar) ó diferir justificado (BACKLOG)
112
- proponer commit (aprobar antes) # nunca push/amend/--no-verify; solo tras el gate
113
- structured_choice(contenido: [Cerrar tarea, Preguntar algo más], flow: [Compactar, Cerrar])
114
- finalize: CHECKPOINT (DESPUÉS: Pending→Completed) + BACKLOG (solo si queda algo diferido) + cerrar session + reportar
84
+ # SIZE GATE — BEFORE creating a session; new work lines only (a resume does not re-fire it)
85
+ if the objective exceeds a quick (≥2 clear signalssee delta):
86
+ if a spec / spec-refine session for this objective already exists recommend RESUMING it (/w:spec-refine) # anti-duplicate
87
+ structured_choice(content: [Cambiar a SPEC (recommended), Seguir en quick, Recortar alcance],
88
+ flow: [Compactar, Cerrar]) # Cerrar here = abort (nothing created yet)
89
+ Cambiar a SPEC → live transition (see delta): draft (spec-new procedure) +
90
+ load and execute ../spec-refine-loop/SKILL.md → END (no quick session)
91
+ Recortar alcance → objective = the proposed sub-task; the rest → BACKLOG when the session is created
92
+ Seguir en quick → continue
93
+ s = create_or_resume("<slug>-quick") # CLI prepends global NNN; always a light session
94
+ seed SESSION.Objective = the prompt
95
+ seed SESSION.Success criteria = the deliverable's check # verification-first, BEFORE: test(s) if code · short RATIFIED rubric if analysis/design
96
+ seed CHECKPOINT.Pending/Next = the task (s) # BEFORE: seed the intent (artifact-first)
97
+ work the task (minimal loop):
98
+ if it edits code verify each source's expected branch (`aw check-branch`); mismatchpause + resolve
99
+ produce the deliverable: edit code (minimal change) OR author the analysis/design
100
+ if read-only DB query → SCRIPTS.sql + execute read-only
101
+ if DB change (DDL/DML) → SCRIPTS.sql (session artifact, DO NOT execute)
102
+ if non-obvious decision → DECISION
103
+ if doubt/gap → inline research OR structured-choice # chassis
104
+ if the task GROWSpropose escalating to SPEC/PLAN # structured-choice, recommendation first
105
+ accepts PLAN → handoff (progress stays; BACKLOG→seeded plan — resume there, deferred) → goto finalize
106
+ accepts SPEC → handoff (progress stays; BACKLOG→"continued live") → finalize →
107
+ live transition (see delta): draft if missing + spec-refine-loop
108
+ convergence gate: Success criteria green # tests green if code · rubric satisfied if analysis/design
109
+ if there were code changes:
110
+ closing review gate (proportional): # diff re-read + installed ambient conventions
111
+ findingsfix (re-validate) OR defer justified (BACKLOG)
112
+ propose commit (approve first) # never push/amend/--no-verify; only after the gate
113
+ structured_choice(content: [Cerrar tarea, Preguntar algo más], flow: [Compactar, Cerrar])
114
+ finalize: CHECKPOINT (AFTER: Pending→Completed) + BACKLOG (only if something is deferred) + close session + report
115
115
  ```
116
116
 
117
117
  ## Convergence / exit
118
118
 
119
- - **Success criteria en verde** (proporcional) + gate de revisión de cierre pasado y commit propuesto si hubo código (o aprobado saltarlo) → `Cerrar`.
120
- - `Cerrar`/`Compactar` (control `flow`) → persiste `CHECKPOINT` + `BACKLOG` (reanudable).
121
- - **Sin export**: nada va a `docs/`. Si algo amerita preservarse se promueve aparte vía `export-*`, o se escala (a SPEC **en vivo** — la línea continúa en spec-refine ya como flujo SPEC; a PLAN **diferido**, sembrado + puntero).
119
+ - **Success criteria green** (proportional) + closing review gate passed and commit proposed if there was code (or skipping it approved) → `Cerrar`.
120
+ - `Cerrar`/`Compactar` (`flow` control) → persists `CHECKPOINT` + `BACKLOG` (resumable).
121
+ - **No export**: nothing goes to `docs/`. Anything worth preservingpromoted separately via `export-*`, or escalated (to SPEC **live** — the line continues in spec-refine already as SPEC flow; to PLAN **deferred**, seed + pointer).
122
122
 
123
- > El *convergence gate* de QUICK es **verification-first proporcional**: un `Success criteria` **corto** sembrado al inicio (no la *ausencia* de checklist, sino su versión mínima) — para código, "el cambio hace lo que pedía el prompt + tests/build verdes"; para análisis/diseño, una rúbrica corta ratificada. Mínima ceremonia por diseño, pero **siempre con el check declarado antes**.
123
+ > QUICK's *convergence gate* is **proportional verification-first**: a **short** `Success criteria` seeded at start (not the *absence* of a checklist its minimal version) — for code, "the change does what the prompt asked + tests/build green"; for analysis/design, a short ratified rubric. Minimal ceremony by design, but **always with the check declared first**.