@tacuchi/agent-workflow-cli 15.2.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 (39) hide show
  1. package/package.json +1 -1
  2. package/skills/w/README.md +14 -14
  3. package/skills/w/SKILL.md +94 -82
  4. package/skills/w/artifacts/artifacts-core/TASKS.md +1 -1
  5. package/skills/w/artifacts/artifacts-research/CONCLUSIONS.md +1 -1
  6. package/skills/w/commands/README.md +22 -22
  7. package/skills/w/commands/export-diagrams.md +9 -9
  8. package/skills/w/commands/export-manuals.md +9 -9
  9. package/skills/w/commands/export-reports.md +9 -9
  10. package/skills/w/commands/export-scripts.md +9 -9
  11. package/skills/w/commands/fix-git.md +12 -12
  12. package/skills/w/commands/plan-exec.md +19 -19
  13. package/skills/w/commands/plan-new.md +18 -18
  14. package/skills/w/commands/plan-refine.md +22 -22
  15. package/skills/w/commands/quick.md +16 -16
  16. package/skills/w/commands/spec-new.md +35 -34
  17. package/skills/w/commands/spec-refine.md +16 -16
  18. package/skills/w/commands/status.md +18 -16
  19. package/skills/w/commands/workspace-init.md +14 -14
  20. package/skills/w/exports/README.md +5 -5
  21. package/skills/w/exports/export-diagrams/SKILL.md +58 -58
  22. package/skills/w/exports/export-manuals/SKILL.md +61 -61
  23. package/skills/w/exports/export-reports/SKILL.md +51 -51
  24. package/skills/w/exports/export-scripts/SKILL.md +60 -60
  25. package/skills/w/harness/SKILL.md +48 -47
  26. package/skills/w/loops/CHASSIS.md +101 -98
  27. package/skills/w/loops/CODE-POLICIES.md +21 -21
  28. package/skills/w/loops/README.md +30 -29
  29. package/skills/w/loops/plan-exec-loop/SKILL.md +77 -77
  30. package/skills/w/loops/plan-new-loop/SKILL.md +80 -80
  31. package/skills/w/loops/plan-refine-loop/SKILL.md +62 -62
  32. package/skills/w/loops/quick-loop/SKILL.md +79 -79
  33. package/skills/w/loops/spec-refine-loop/SKILL.md +93 -94
  34. package/skills/w/roles/README.md +2 -2
  35. package/skills/w/roles/diagrams/SKILL.md +50 -47
  36. package/skills/w/roles/git/SKILL.md +58 -58
  37. package/skills/w/roles/research/SKILL.md +65 -62
  38. package/skills/w/roles/sql/SKILL.md +59 -55
  39. package/skills/w/roles/ui-spec/SKILL.md +60 -74
@@ -1,175 +1,174 @@
1
1
  ---
2
2
  name: spec-refine-loop
3
3
  description: >-
4
- Refina un spec borrador (docs/specs/NNN-spec-<slug>.md) editándolo IN PLACE
5
- hasta dejarlo sin ambigüedad. Heir del chasis (loops/CHASSIS.md). Deltas:
6
- gap taxonomy de spec, analyze gate, sección ## UI spec vía la capacidad
7
- ui-design, y agrega Refinement decisions + Q&A traceability — la marca de
8
- refinado que plan-new detecta. Lo arranca /w:spec-refine (o la escalación
9
- en vivo desde quick-loop); reanudable vía CHECKPOINT y re-corrible a
10
- demanda. Invocar para refinar/desambiguar una especificación antes de
11
- planificar.
4
+ Refines a draft spec (docs/specs/NNN-spec-<slug>.md) by editing it IN PLACE
5
+ until it is unambiguous. Heir of the chassis (loops/CHASSIS.md). Deltas:
6
+ spec gap taxonomy, analyze gate, ## UI spec section via the ui-design
7
+ capability, and adds Refinement decisions + Q&A traceability — the refined
8
+ mark plan-new detects. Started by /w:spec-refine (or the live escalation
9
+ from quick-loop); resumable via CHECKPOINT and re-runnable on demand.
10
+ Invoke to refine/disambiguate a specification before planning.
12
11
  ---
13
12
 
14
13
  # spec-refine-loop
15
14
 
16
- > **Heir** del chasis comúnaquí **solo** los deltas de SPEC. El motor no se repite.
15
+ > **Heir** of the common chassis — **only** the SPEC deltas live here. The engine is never repeated.
17
16
 
18
17
  ## Inherits
19
18
 
20
- Leé **[`../CHASSIS.md`](../CHASSIS.md)** — el **motor completo** del loop — **siempre antes** de estos deltas. *(Si `../` no resuelve: `CHASSIS.md` junto a este archivoregla global de layout, chasis § Resolución de referencias.)*
19
+ Read **[`../CHASSIS.md`](../CHASSIS.md)** — the loop's **full engine** — **always before** these deltas. *(If `../` does not resolve: `CHASSIS.md` next to this file — global layout rule, chassis § Reference resolution.)*
21
20
 
22
21
  ## Flow
23
22
  SPEC
24
23
 
25
24
  ## Layer
26
- 2 — la IA lo corre entero (gap-driven). El usuario no conduce el ciclo; solo responde preguntas de contenido y dirige el ciclo de vida por el control `flow`.
25
+ 2 — the AI runs it end to end (gap-driven). The user does not drive the cycle; they only answer content questions and steer the lifecycle via the `flow` control.
27
26
 
28
27
  ## Started by
29
- `/w:spec-refine` — **reanudable**. Detecta el estado previo (vía CHECKPOINT) y arranca según corresponda (ver *Compact / resume — claves SPEC*).
28
+ `/w:spec-refine` — **resumable**. Detects prior state (via CHECKPOINT) and starts accordingly (see *Compact / resume — SPEC keys*).
30
29
 
31
- También lo arranca la **escalación en vivo desde `quick-loop`** (gate de entrada o mid-loop — ver [`../quick-loop/SKILL.md`](../quick-loop/SKILL.md) § *Delta QUICK*): quick materializa el borrador (procedimiento de `spec-new`) y **carga este loop** sobre ese spec — misma semántica que si el usuario hubiera corrido `/w:spec-refine`.
30
+ It is also started by the **live escalation from `quick-loop`** (entry gate or mid-loop — see [`../quick-loop/SKILL.md`](../quick-loop/SKILL.md) § *QUICK delta*): quick materializes the draft (`spec-new` procedure) and **loads this loop** over that spec — same semantics as if the user had run `/w:spec-refine`.
32
31
 
33
32
  ## Reads
34
- - `docs/specs/NNN-spec*.md` (glob — localiza el spec por número, también captura el legacy `NNN-spec.md`), **o** la ruta exacta pasada en el argumento del comando. **Siempre el spec mismo**: este loop lo edita in place, no hay un archivo "refined" aparte.
33
+ - `docs/specs/NNN-spec*.md` (glob — locates the spec by number; also catches the legacy `NNN-spec.md`), **or** the exact path passed as the command argument. **Always the spec itself**: this loop edits it in place; there is no separate "refined" file.
35
34
 
36
35
  ## Writes
37
- Actualiza `docs/specs/NNN-spec-<slug>.md` **in place** (cuando el usuario elige `Guardar especificación refinada`): completa secciones y **agrega** `## Refinement decisions` + `## Q&A traceability`, cerrando `Open questions` a medida que se resuelven. Como sobrescribe un doc existente, **con confirmación** del usuario.
36
+ Updates `docs/specs/NNN-spec-<slug>.md` **in place** (when the user picks `Guardar especificación refinada`): completes sections and **adds** `## Refinement decisions` + `## Q&A traceability`, closing `Open questions` as they get resolved. Since it overwrites an existing doc, it asks the user's **confirmation**.
38
37
 
39
- > **Invariante de boundary:** este loop escribe **solo** en `docs/specs`. Nunca gradúa/exporta otros artefactos a `docs/` — eso es trabajo de `export-*`, aparte (chasis § *docs/ boundary*).
38
+ > **Boundary invariant:** this loop writes **only** into `docs/specs`. It never graduates/exports other artifacts to `docs/` — that is separate `export-*` work (chassis § *docs/ boundary*).
40
39
 
41
- ## Internal sessions — instancia SPEC
40
+ ## Internal sessions — SPEC instance
42
41
 
43
- Doctrina completa en el chasis (§ *Internal sessions* + *Numeración*). La instancia de este loop:
42
+ Full doctrine in the chassis (§ *Internal sessions* + *Numbering*). This loop's instance:
44
43
 
45
44
  | Session | When | Artifacts | Role |
46
45
  |---|---|---|---|
47
- | **refine session** `NNN-<slug>-spec-refine/` | al arrancar el loop (o se reanuda) | `SESSION.md` · `CHECKPOINT.md` (· `BACKLOG.md` solo si difiere) | Dueña del run. Type = `refine`; descriptor `<slug>-spec-refine` (el `<slug>` sale del spec de entrada). |
46
+ | **refine session** `NNN-<slug>-spec-refine/` | when the loop starts (or resumes) | `SESSION.md` · `CHECKPOINT.md` (· `BACKLOG.md` only if something is deferred) | Owns the run. Type = `refine`; descriptor `<slug>-spec-refine` (the `<slug>` comes from the input spec). |
48
47
 
49
- > **Origin por escalación:** si el run nace de la escalación en vivo de `quick-loop`, el `## Origin` de la session registra "escalado desde `/w:quick`" + la session quick de origen si existe (sus `DECISION`/`SCRIPTS.sql` son contexto referenciableno se migran).
48
+ > **Origin on escalation:** when the run is born from quick-loop's live escalation, the session's `## Origin` records "escalated from `/w:quick`" + the origin quick session if it exists (its `DECISION`/`SCRIPTS.sql` are referenceable contextnever migrated).
50
49
 
51
- > **Compat (legacy):** workspaces viejos pueden tener `NNN-spec.md` / `NNN-spec-refined.md` y sessions `*-research-*` aparteson históricos y se dejan tal cual. El glob `NNN-spec*.md` igual encuentra el spec base, y re-correr spec-refine lo edita in place de ahí en adelante.
50
+ > **Compat (legacy):** old workspaces may hold `NNN-spec.md` / `NNN-spec-refined.md` and separate `*-research-*` sessionshistorical, left as-is. The `NNN-spec*.md` glob still finds the base spec, and re-running spec-refine edits it in place from then on.
52
51
 
53
52
  ## Composes
54
53
 
55
- El gap **UI sin especificar** (cuando el requerimiento involucra UI; ver *Gap taxonomy*) se resuelve **componiendo** la capacidad **`ui-design`** (default built-in `ui-spec`; rebindeable vía `.workflow/skills.toml`): autora el UI spec nativamente (estructura, vocabulario, formato Markdown). Es un tercer modo de resolución de gap (junto a *research* y *humano*): el loop aporta la iteración/Q&A que el viejo servicio no tenía (design-system, tema, variantes, desambiguación) **vía la misma structured-choice**, y lo integra como sección `## UI spec` del spec.
54
+ The **UI unspecified** gap (when the requirement involves UI; see *Gap taxonomy*) is resolved by **composing** the **`ui-design`** capability (built-in default `ui-spec`; rebindable via `.workflow/skills.toml`): it authors the UI spec natively (structure, vocabulary, Markdown format). It is a third gap-resolution mode (next to *research* and *human*): the loop contributes iteration/Q&A (design system, theme, variants, disambiguation) **via the same structured-choice**, and integrates the result as the spec's `## UI spec` section.
56
55
 
57
- > **Dos niveles de la misma capacidad:** aquí (SPEC) produce `## UI spec` — el *qué* de la UI, grano grueso; en PLAN, los loops de plan producen **design SPECs por pantalla** derivados de esa sección (ver [`SPEC.md`](../../artifacts/artifacts-design/SPEC.md)).
56
+ > **Two levels of the same capability:** here (SPEC) it produces `## UI spec` — the UI's *what*, coarse grain; in PLAN the plan loops produce **per-screen design SPECs** derived from that section (see [`SPEC.md`](../../artifacts/artifacts-design/SPEC.md)).
58
57
 
59
- Otras capacidades transversales que el motor usa siempre: `research` (research **inline** — chasis § *Research*), `sql` (regla BD en research — chasis). Todas se resuelven por config; `off` → el loop sigue sin la capacidad y, si era necesaria, lo dice o pregunta. La **prosa del spec** sigue las convenciones de redacción **ambientes** (el host auto-aplica una skill de writing instalada si está presente), no un rol compuesto.
58
+ Other transversal capabilities the engine always uses: `research` (**inline** — chassis § *Research*), `sql` (DB rule inside research — chassis). All resolved by config; `off` → the loop continues without the capability and, if it was needed, says so or asks. The spec's **prose** follows the **ambient** writing conventions (the host auto-applies an installed writing skill if present), not a composed role.
60
59
 
61
- > **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).
60
+ > **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).
62
61
 
63
- ## Deliverable schema (el spec, editado in place)
62
+ ## Deliverable schema (the spec, edited in place)
64
63
 
65
- El spec se completa **in place**: mismas secciones del borrador **completadas** + dos nuevas que se **agregan** (`Refinement decisions`, `Q&A traceability`). NO se crea un archivo aparte.
64
+ The spec is completed **in place**: the draft's sections get **completed** + two new ones are **added** (`Refinement decisions`, `Q&A traceability`). NO separate file is created.
66
65
 
67
66
  ```markdown
68
67
  # Spec NNN — <slug>
69
68
 
70
- > Refinado in place por spec-refine-loop
69
+ > Refined in place by spec-refine-loop
71
70
 
72
- ## Origin (opt. — se conserva del borrador)
73
- ## Requirement (afinado, sin ambigüedad)
74
- ## Context (completo)
75
- ## Scope (In / Out claros)
76
- ## Acceptance criteria (testables, - [ ]; estilo EARS / Given-When-Then recomendado)
77
- ## Assumptions (declarados)
71
+ ## Origin (opt. — preserved from the draft)
72
+ ## Requirement (sharpened, unambiguous)
73
+ ## Context (complete)
74
+ ## Scope (clear In / Out)
75
+ ## Acceptance criteria (testable, - [ ]; EARS / Given-When-Then style recommended)
76
+ ## Assumptions (declared)
78
77
 
79
- ## UI spec (opt. — si involucra UI; vía capacidad ui-design / skill ui-spec)
80
- Descripción estructurada en Markdown (pantallasregiones/componentes). Ver [`ui-spec`](../../roles/ui-spec/SKILL.md).
78
+ ## UI spec (opt. — if UI is involved; via the ui-design capability / ui-spec skill)
79
+ Structured Markdown description (screensregions/components). See [`ui-spec`](../../roles/ui-spec/SKILL.md).
81
80
 
82
- ## Refinement decisions ← NEW (se AGREGA)
83
- Qué se definió al refinar y por qué. Incluye lo resuelto vía research inline
84
- (con referencia a las CONCLUSIONS de la session).
81
+ ## Refinement decisions ← NEW (ADDED)
82
+ What was defined while refining and why. Includes what inline research
83
+ resolved (with a reference to the session's CONCLUSIONS).
85
84
 
86
- ## Q&A traceability ← NEW (se AGREGA)
87
- Cada duda preguntada al humano + la respuesta elegida.
85
+ ## Q&A traceability ← NEW (ADDED)
86
+ Every doubt asked to the human + the chosen answer.
88
87
 
89
- ## Open questions (idealmente "None"; lo que quede se difiere)
88
+ ## Open questions (ideally "None"; whatever remains is deferred)
90
89
  ```
91
90
 
92
- > **Marca de refinado (contrato con PLAN):** la presencia de `## Refinement decisions` + `## Q&A traceability` distingue un spec refinado de un borrador — plan-new lo detecta así, NO por el nombre del archivo; sin esas 2 secciones plan-new hace soft-suggest de spec-refine.
91
+ > **Refined mark (contract with PLAN):** the presence of `## Refinement decisions` + `## Q&A traceability` distinguishes a refined spec from a draft — plan-new detects it this way, NOT by filename; without those 2 sections plan-new soft-suggests spec-refine.
93
92
 
94
- > **Acceptance criteria = criterios testables estáticos** (el "qué"): plan-exec los valida pero el avance se trackea en el PLAN (sus Tasks), no marcando estos `- [ ]` en el spec; el spec no muta por ejecución, solo por re-refine.
93
+ > **Acceptance criteria = static testable criteria** (the "what"): plan-exec validates them, but progress is tracked in the PLAN (its Tasks), never by ticking these `- [ ]` in the spec; the spec never mutates by execution, only by a re-refine.
95
94
 
96
95
  ## Gap taxonomy (= weak sections of the schema)
97
96
 
98
- `detect_gaps(work)` busca estas señales; cada una tiene un resolutor:
97
+ `detect_gaps(work)` looks for these signals; each has a resolver:
99
98
 
100
99
  | Gap | Signal | Resolved by |
101
100
  |---|---|---|
102
- | Requirement vago | el qué/por qué ambiguo | **humano** |
103
- | Context incompleto | sistemas/componentes sin identificar | **research** |
104
- | Scope borroso | falta `Out`, o In/Out se solapan | **humano** |
105
- | Criterios no testables | acceptance no verificable | **humano** (derivar + confirmar) |
106
- | Open questions abiertas | dudas explícitas | según naturaleza |
107
- | Supuestos ocultos | el spec asume cosas no dichas | **research** valida / **humano** confirma |
108
- | Contradicción interna | secciones que se contradicen | **humano** |
109
- | UI sin especificar *(si aplica)* | el requerimiento involucra UI pero falta `## UI spec` | **capacidad `ui-design`** |
101
+ | Vague requirement | the what/why is ambiguous | **human** |
102
+ | Incomplete context | systems/components unidentified | **research** |
103
+ | Blurry scope | `Out` missing, or In/Out overlap | **human** |
104
+ | Untestable criteria | acceptance not verifiable | **human** (derive + confirm) |
105
+ | Open questions pending | explicit doubts | by nature |
106
+ | Hidden assumptions | the spec assumes unstated things | **research** validates / **human** confirms |
107
+ | Internal contradiction | sections contradict each other | **human** |
108
+ | UI unspecified *(if it applies)* | the requirement involves UI but `## UI spec` is missing | **`ui-design` capability** |
110
109
 
111
110
  ## Sequence
112
111
 
113
112
  ```
114
113
  spec-refine-loop(spec):
115
- input = glob(NNN-spec*.md) | argumento (ruta) # siempre el spec mismo (in place)
116
- refine_session = create_or_resume("<slug>-spec-refine") # <slug> del spec de entrada; CLI antepone NNN global; resume localiza por descriptor/origin
117
- seed SESSION.Success criteria = acceptance criteria + checklist del analyze gate # verification-first: ANTES de iterar
118
- work = read(input) (+ aplicar avance del checkpoint si reanuda)
119
- attempts = {} # anti-relanzamiento por gap
114
+ input = glob(NNN-spec*.md) | argument (path) # always the spec itself (in place)
115
+ refine_session = create_or_resume("<slug>-spec-refine") # <slug> from the input spec; CLI prepends global NNN; resume locates by descriptor/origin
116
+ seed SESSION.Success criteria = acceptance criteria + analyze-gate checklist # verification-first: BEFORE iterating
117
+ work = read(input) (+ apply checkpoint progress if resuming)
118
+ attempts = {} # anti re-fire per gap
120
119
  repeat:
121
- gaps = detect_gaps(work) menos los gaps "agotados"
120
+ gaps = detect_gaps(work) minus the "exhausted" gaps
122
121
  if gaps == ∅: break
123
122
  batch = top ≤3 gaps ; pending_human = []
124
- seed CHECKPOINT.Pending/Next = batch (refine_session) # ANTES: sembrar intención (artifact-first)
125
- para cada gap en batch:
126
- si gap = UI (requerimiento con UI, falta ## UI spec):
127
- componer ui-design → autora ## UI spec # design-system/tema vía structured-choice (cuenta en el batch)
123
+ seed CHECKPOINT.Pending/Next = batch (refine_session) # BEFORE: seed the intent (artifact-first)
124
+ for each gap in batch:
125
+ if gap = UI (requirement involves UI, ## UI spec missing):
126
+ compose ui-design → author ## UI spec # design-system/theme via structured-choice (counts in the batch)
128
127
  work = integrate(work, ui) # → ## UI spec
129
- si no, si factual(gap) y attempts[gap] < MAX:
130
- si requiere BD y >1 MCP sin default → encolar "elección MCP" en pending_human
131
- res = research_inline(gap) # en la session actual: ANALYSIS-FILE → CONCLUSIONS (+SCRIPTS.sql read-only)
132
- si res.concluyente: work = integrate(work, res) # → Refinement decisions
133
- si no: attempts[gap]++ ; si attempts[gap] >= MAX → pending_human.push(gap)
134
- si no:
128
+ else if factual(gap) and attempts[gap] < MAX:
129
+ if it needs DB and >1 MCP without default → queue "MCP choice" in pending_human
130
+ res = research_inline(gap) # in the current session: ANALYSIS-FILE → CONCLUSIONS (+read-only SCRIPTS.sql)
131
+ if res.conclusive: work = integrate(work, res) # → Refinement decisions
132
+ else: attempts[gap]++ ; if attempts[gap] >= MAX → pending_human.push(gap)
133
+ else:
135
134
  pending_human.push(gap)
136
- update CHECKPOINT (refine_session) # DESPUÉS: Pending→Completed, en cada límite de gap (chasis § ciclo artifact-first)
137
- si pending_human no vacío:
138
- ans = structured_choice(contenido: pending_human (≤3), flow: [Compactar, Cerrar])
135
+ update CHECKPOINT (refine_session) # AFTER: Pending→Completed, at every gap boundary (chassis § artifact-first cycle)
136
+ if pending_human not empty:
137
+ ans = structured_choice(content: pending_human (≤3), flow: [Compactar, Cerrar])
139
138
  switch(flow):
140
- Compactar → write CHECKPOINT (refine_session) ; compactar(arnés) ; continue
139
+ Compactar → write CHECKPOINT (refine_session) ; compact(harness) ; continue
141
140
  Cerrar → goto finalize
142
141
  work = integrate(work, ans) # → Q&A traceability / Open questions
143
- # sin gaps materiales → analyze gate = Success criteria en verde (read-only) antes de ofrecer Guardar:
144
- issues = analyze(work) # criterios trazan al Requirement · sin contradicciones · Scope coherente · Open questions cerradas/diferidas
145
- si issues: gaps += issues ; continue # los hallazgos vuelven al loop como gaps
146
- ans = structured_choice(contenido: [Guardar refinada, Preguntar algo más],
142
+ # no material gaps → analyze gate = Success criteria green (read-only) before offering Guardar:
143
+ issues = analyze(work) # criteria trace to the Requirement · no contradictions · coherent Scope · Open questions closed/deferred
144
+ if issues: gaps += issues ; continue # findings come back into the loop as gaps
145
+ ans = structured_choice(content: [Guardar refinada, Preguntar algo más],
147
146
  flow: [Compactar, Cerrar])
148
- Guardar → edit_in_place_with_confirm(spec) # completa secciones + inserta UI spec/Refinement decisions/Q&A ; goto finalize
147
+ Guardar → edit_in_place_with_confirm(spec) # completes sections + inserts UI spec/Refinement decisions/Q&A ; goto finalize
149
148
  Preguntar algo más → continue
150
- flow Compactar/Cerrar → manejar igual
149
+ flow Compactar/Cerrar → handle the same way
151
150
  finalize:
152
- write CHECKPOINT (refine_session) # persiste siempre
153
- si hay diferidos/followup → write/update BACKLOG (motivo + Open questions diferidas)
154
- cerrar refine_session ; reportar
151
+ write CHECKPOINT (refine_session) # always persisted
152
+ if deferred/follow-ups exist → write/update BACKLOG (reason + deferred Open questions)
153
+ close refine_session ; report
155
154
  ```
156
155
 
157
- ## Compact / resume — claves SPEC
156
+ ## Compact / resume — SPEC keys
158
157
 
159
- Mecanismo completo (3 casos, `Compactar`, re-run on demand con `--reopen`) en el chasis (§ *Compact / resume*). Claves SPEC:
158
+ Full mechanism (3 cases, `Compactar`, re-run on demand with `--reopen`) in the chassis (§ *Compact / resume*). SPEC keys:
160
159
 
161
- - La **marca de trabajo previo** es la presencia de `## Refinement decisions` + `## Q&A traceability` en el spec (la *marca de refinado*, ver *Deliverable schema*).
162
- - El re-refine on demand es **operación de primera clase** mientras el flujo siga en SPEC (nuevos requerimientos, cambios de scope, tras re-leer el spec): lee siempre el **spec mismo**, re-refinamiento incremental; al `Guardar`, edita in place con confirmación.
160
+ - The **prior-work mark** is the presence of `## Refinement decisions` + `## Q&A traceability` in the spec (the *refined mark*, see *Deliverable schema*).
161
+ - Re-refining on demand is a **first-class operation** while the flow stays in SPEC (new requirements, scope changes, after re-reading the spec): it always reads the **spec itself**, incremental re-refinement; on `Guardar`, edits in place with confirmation.
163
162
 
164
163
  ## Convergence / exit
165
164
 
166
- - **Sin gaps materiales** → **analyze gate** (read-only) = **`Success criteria` en verde** (*verification-first*; la instancia SPEC del convergence gate del chasis): cada acceptance criterion traza al `Requirement`, sin contradicciones internas, `Scope` In/Out coherente, `Open questions` cerradas o explícitamente diferidas. Lo que falle **vuelve como gap**; si pasaofrece `Guardar especificación refinada`.
167
- - `Guardar` → `edit_in_place_with_confirm(spec)` y `finalize`.
168
- - `Cerrar` → `finalize` del chasis (persiste siempre `CHECKPOINT`; `BACKLOG` **solo si** hay diferidosacá: motivo de cierre + `Open questions` diferidas).
165
+ - **No material gaps** → **analyze gate** (read-only) = **`Success criteria` green** (*verification-first*; the SPEC instance of the chassis convergence gate): every acceptance criterion traces to the `Requirement`, no internal contradictions, coherent `Scope` In/Out, `Open questions` closed or explicitly deferred. Whatever fails **comes back as a gap**; if it passes offer `Guardar especificación refinada`.
166
+ - `Guardar` → `edit_in_place_with_confirm(spec)` and `finalize`.
167
+ - `Cerrar` → the chassis `finalize` (always persists `CHECKPOINT`; `BACKLOG` **only if** something is deferred here: close reason + deferred `Open questions`).
169
168
 
170
- ## Integration (dónde aterriza cada resolución)
169
+ ## Integration (where each resolution lands)
171
170
 
172
- - Resuelto vía **research inline** → `## Refinement decisions` del spec (+ ref a las `CONCLUSIONS` de la session).
173
- - Resuelto vía **humano** → `## Q&A traceability` del spec.
174
- - Resuelto vía **capacidad `ui-design`** (gap UI) → sección `## UI spec` del spec.
175
- - **Research inconclusa o sin resolver** → `## Open questions` del spec (diferido) + `BACKLOG.md` de la refine session (solo si queda algo diferido).
171
+ - Resolved via **inline research** → the spec's `## Refinement decisions` (+ ref to the session's `CONCLUSIONS`).
172
+ - Resolved via **human** → the spec's `## Q&A traceability`.
173
+ - Resolved via the **`ui-design` capability** (UI gap) → the spec's `## UI spec` section.
174
+ - **Inconclusive or unresolved research** → the spec's `## Open questions` (deferred) + the refine session's `BACKLOG.md` (only if something is deferred).
@@ -23,9 +23,9 @@ All 6 roles, their built-in defaults, their tier, and which loops/exports compos
23
23
  - `must` — core to almost every session; built-in always active unless explicitly `off`.
24
24
  - `should` — loaded on-demand; active by default but lower priority to override.
25
25
 
26
- > **Convenciones ambientes (no roles).** Los estándares de código, testing, redacción **y la creación de herramientas** (`creating-tools`, escribe `docs/tools`) **no son roles** del workflow ni se bindean: son **skills standalone que el host auto-descubre por su `description`** y aplica cuando son relevantes. El workflow es **indiferente** (no las lee ni las busca). Familias útiles viven en plugins del marketplace (`dev-conventions`, `tool-builder`), pero el workflow **no depende** de ellos.
26
+ > **Ambient conventions (not roles).** Code, testing and writing standards **and tool authoring** (`creating-tools`, which writes `docs/tools`) are **not workflow roles** and are never bound: they are **standalone skills the host auto-discovers by `description`** and applies when relevant. The workflow is **indifferent** (it neither reads nor looks for them). Useful families live in marketplace plugins (`dev-conventions`, `tool-builder`), but the workflow does **not depend** on them.
27
27
  >
28
- > **La revisión de cierre tampoco es un rol** (decisión deliberadase evaluó y descartó un rol `conventions`/`rules`/`review`): el **gate de revisión de cierre** de `plan-exec-loop`/`quick-loop` (pre-commit) es un **paso del loop**; el loop crea el **momento** y las convenciones ambientes instaladas lo llenan. Un rol que "señale las skills del marketplace" re-acoplaría lo que esta extracción desacopló.
28
+ > **The closing review is not a role either** (deliberate decisiona `conventions`/`rules`/`review` role was evaluated and discarded): the pre-commit **closing review gate** of `plan-exec-loop`/`quick-loop` is a **loop step**; the loop creates the **moment** and the installed ambient conventions fill it. A role that "points at the marketplace skills" would re-couple what this extraction decoupled.
29
29
 
30
30
  ---
31
31
 
@@ -1,49 +1,51 @@
1
1
  ---
2
2
  name: diagrams
3
3
  description: >
4
- Autoría de diagramas de arquitectura y sistema con notación C4 (Context, Container,
5
- Component): Mermaid C4 nativo (default) o Structurizr DSL. Compuesta por export-diagrams
6
- para producir el contenido de docs/diagrams/. Selecciona el motor según el flag `--engine`
7
- del export (Mermaid default; `c4`/Structurizr DSL opt-in). Incluye link mermaid.ink por
8
- cada bloque Mermaid para preview sin renderer local.
4
+ Architecture and system diagram authoring with C4 notation (Context, Container,
5
+ Component): native Mermaid C4 (default) or Structurizr DSL. Composed by export-diagrams
6
+ to produce the content of docs/diagrams/. Selects the engine from the export's
7
+ `--engine` flag (Mermaid default; `c4`/Structurizr DSL opt-in). Includes a mermaid.ink
8
+ link per Mermaid block for preview without a local renderer.
9
9
  ---
10
10
 
11
11
  # diagrams — Diagram authoring capability
12
12
 
13
13
  ## Role
14
14
 
15
- `diagrams` — implementación built-in por defecto. Rebindeable a otra skill (de tercero o `off`) en `.workflow/skills.toml`.
15
+ `diagrams` — built-in default implementation. Rebindable to another skill (third-party or `off`) in `.workflow/skills.toml`.
16
16
 
17
17
  ## Purpose
18
18
 
19
- Autorar diagramas de arquitectura con notación C4 (Levels 1-3) usando el motor que el export configure vía `--engine`. Produce source renderizable (Mermaid / DSL) — **no renderiza visualmente**; el render lo hace el lector con sus herramientas. Cubre el motor por defecto (Mermaid C4 nativo, embebido) y el opt-in `c4` (Structurizr DSL, C4 formal).
19
+ Author architecture diagrams with C4 notation (Levels 1-3) using the engine the export configures via `--engine`. It produces renderable source (Mermaid / DSL) — **it does not render visually**; the reader renders with their tools. Covers the default engine (native embedded Mermaid C4) and the opt-in `c4` (Structurizr DSL, formal C4).
20
20
 
21
21
  ## Composed by
22
22
 
23
- | Export | Cuándo la compone |
23
+ | Export | When it composes it |
24
24
  |---|---|
25
- | `export-diagrams` | para generar el contenido de `docs/diagrams/NNN-*/` |
25
+ | `export-diagrams` | to generate the content of `docs/diagrams/NNN-*/` |
26
26
 
27
- Cualquier loop puede componerla también si necesita producir un diagrama inline durante ejecución (raro; el caso primario es `export-diagrams`).
27
+ Any loop may also compose it to produce an inline diagram during execution (rare; the primary case is `export-diagrams`).
28
28
 
29
29
  ## Knowledge
30
30
 
31
31
  ### Engine matrix
32
32
 
33
- El export elige el motor con `--engine mermaid|c4` (default `mermaid`):
33
+ The export picks the engine with `--engine mermaid|c4` (default `mermaid`):
34
34
 
35
- | `--engine` | Motor | Archivos producidos | Cuándo elegirlo |
35
+ | `--engine` | Engine | Files produced | When to pick it |
36
36
  |---|---|---|---|
37
- | `mermaid` (default) | Mermaid C4 nativo | solo `.md` con bloques Mermaid | Render embebido sin DSL separado; GitHub/GitLab lo renderizan inline |
38
- | `c4` | Structurizr DSL | `workspace.dsl` + Mermaid auxiliar embebido en `.md` | Dossier técnico formal; tooling externo (structurizr.com, structurizr-lite) |
37
+ | `mermaid` (default) | Native Mermaid C4 | only `.md` with Mermaid blocks | Embedded render, no separate DSL; GitHub/GitLab render it inline |
38
+ | `c4` | Structurizr DSL | `workspace.dsl` + auxiliary Mermaid embedded in `.md` | Formal technical dossier; external tooling (structurizr.com, structurizr-lite) |
39
39
 
40
- **Regla canónica**: `export-diagrams` usa **Mermaid** por defecto (`--engine mermaid`) — render embebido sin tooling externo. `--engine c4` produce Structurizr DSL (C4 formal, separa modelo de vistas) para el dossier técnico.
40
+ **Canonical rule**: `export-diagrams` uses **Mermaid** by default (`--engine mermaid`) — embedded render, no external tooling. `--engine c4` produces Structurizr DSL (formal C4, separates model from views) for the technical dossier.
41
41
 
42
42
  ### C4 model — levels
43
43
 
44
+ Diagram titles/labels are user-facing content → author them in the user's language (Spanish in the templates below).
45
+
44
46
  #### Level 1: Context (C4Context)
45
47
 
46
- El sistema como caja única + actores + sistemas vecinos. Perspectiva de negocio.
48
+ The system as a single box + actors + neighbor systems. Business perspective.
47
49
 
48
50
  ```mermaid
49
51
  C4Context
@@ -57,7 +59,7 @@ C4Context
57
59
 
58
60
  #### Level 2: Container (C4Container)
59
61
 
60
- Aplicaciones, servicios, data stores que componen el sistema. Una fuente declarada en `WORKSPACE` = un contenedor.
62
+ Applications, services, data stores composing the system. One source declared in `WORKSPACE` = one container.
61
63
 
62
64
  ```mermaid
63
65
  C4Container
@@ -76,7 +78,7 @@ C4Container
76
78
 
77
79
  #### Level 3: Component (C4Component)
78
80
 
79
- Módulos internos relevantes de un contenedor. Solo para contenedores con complejidad interna suficiente. Un diagrama por contenedor; el resto se omite.
81
+ Relevant internal modules of one container. Only for containers with enough internal complexity. One diagram per container; the rest are omitted.
80
82
 
81
83
  ```mermaid
82
84
  C4Component
@@ -88,7 +90,7 @@ C4Component
88
90
  Rel(compA, compB, "<interaccion>")
89
91
  ```
90
92
 
91
- Si ningún contenedor justifica C4 Component → omitir la sección con nota inline `_(Sin contenedores con complejidad interna suficiente para C4 Component.)_`.
93
+ If no container justifies C4 Component → omit the section with the inline note `_(Sin contenedores con complejidad interna suficiente para C4 Component.)_`.
92
94
 
93
95
  ### Structurizr DSL template
94
96
 
@@ -126,7 +128,7 @@ workspace "<PRODUCTO>" "<descripcion>" {
126
128
  autoLayout
127
129
  }
128
130
 
129
- // Una vista por contenedor con C4 Component relevante:
131
+ // One view per container with relevant C4 Component:
130
132
  component svcA "SvcA-Components" {
131
133
  include *
132
134
  autoLayout
@@ -137,11 +139,11 @@ workspace "<PRODUCTO>" "<descripcion>" {
137
139
  }
138
140
  ```
139
141
 
140
- Render online gratuito: [structurizr.com/dsl](https://structurizr.com/dsl) o structurizr-lite (Docker).
142
+ Free online render: [structurizr.com/dsl](https://structurizr.com/dsl) or structurizr-lite (Docker).
141
143
 
142
- ### PlantUML C4-stdlib template (motor extra, fuera del contrato actual)
144
+ ### PlantUML C4-stdlib template (extra engine, outside the current contract)
143
145
 
144
- > El contrato vigente de `export-diagrams` expone solo `--engine mermaid|c4` (no produce `.puml`). Esta plantilla queda como **referencia** para un export rebindeado/custom que quiera emitir PlantUML.
146
+ > The current `export-diagrams` contract exposes only `--engine mermaid|c4` (it produces no `.puml`). This template remains as a **reference** for a rebound/custom export that wants to emit PlantUML.
145
147
 
146
148
  ```plantuml
147
149
  @startuml arquitectura
@@ -163,11 +165,11 @@ SHOW_LEGEND()
163
165
  @enduml
164
166
  ```
165
167
 
166
- Render: [plantuml.com](https://plantuml.com) o `plantuml.jar` local.
168
+ Render: [plantuml.com](https://plantuml.com) or a local `plantuml.jar`.
167
169
 
168
- ### Mermaid auxiliar (bajo `--engine c4`)
170
+ ### Auxiliary Mermaid (under `--engine c4`)
169
171
 
170
- Cuando `--engine c4`, el archivo `.md` incluye también un bloque Mermaid derivado del DSL como **fallback offline** (lectores sin acceso a structurizr.com/dsl pueden leerlo directamente):
172
+ With `--engine c4`, the `.md` file also includes a Mermaid block derived from the DSL as an **offline fallback** (readers without access to structurizr.com/dsl can read it directly):
171
173
 
172
174
  ```
173
175
  ```mermaid
@@ -175,14 +177,14 @@ C4Context
175
177
  title ...
176
178
  ```
177
179
 
178
- > Ver diagrama renderizado: <https://mermaid.ink/img/BASE64>
180
+ > See the rendered diagram: <https://mermaid.ink/img/BASE64>
179
181
  ```
180
182
 
181
- El `BASE64` es el código Mermaid plano codificado en base64 URL-safe (RFC 4648 §5; alfabeto `A-Z a-z 0-9 - _`). **Cada bloque Mermaid lleva su propio link** inmediatamente después del fence de cierre.
183
+ `BASE64` is the plain Mermaid code encoded as URL-safe base64 (RFC 4648 §5; alphabet `A-Z a-z 0-9 - _`). **Every Mermaid block carries its own link** immediately after the closing fence.
182
184
 
183
185
  ### Sequence diagrams (opt-in)
184
186
 
185
- Para flujos críticos de integración (no C4 estructural), un `sequenceDiagram` Mermaid complementa el C4 Container:
187
+ For critical integration flows (not structural C4), a Mermaid `sequenceDiagram` complements the C4 Container:
186
188
 
187
189
  ```mermaid
188
190
  sequenceDiagram
@@ -195,11 +197,11 @@ sequenceDiagram
195
197
  SvcA-->>Dev: 201 Created
196
198
  ```
197
199
 
198
- Solo si aporta claridad real — no agregar sequence diagrams por defecto.
200
+ Only when it adds real clarity never add sequence diagrams by default.
199
201
 
200
- ### Entity-Relationship (modelo de datos)
202
+ ### Entity-Relationship (data model)
201
203
 
202
- Cuando `export-diagrams` incluye `--scope data` y hay MCP configurado:
204
+ When `export-diagrams` includes `--scope data` and an MCP is configured:
203
205
 
204
206
  ```mermaid
205
207
  erDiagram
@@ -215,35 +217,36 @@ erDiagram
215
217
  }
216
218
  ```
217
219
 
218
- MCP read-only: `\d <tabla>` + `SELECT count(*)` para magnitud (aplicar cost guard: ver skill `research` o `sql`).
220
+ Read-only MCP: `\d <table>` + `SELECT count(*)` for magnitude (apply the cost guard: see the `research` or `sql` skill).
219
221
 
220
222
  ### Output file structure
221
223
 
222
224
  ```
223
225
  docs/diagrams/NNN-export-diagrams-YYYY-MM-DD/
224
- ├── README.md # índice + how-to-read + motores usados
225
- ├── diagrams.md # documento principal con C4 + Mermaid (+ links mermaid.ink)
226
- └── workspace.dsl # solo con --engine c4 (Structurizr)
226
+ ├── README.md # index + how-to-read + engines used
227
+ ├── diagrams.md # main document with C4 + Mermaid (+ mermaid.ink links)
228
+ └── workspace.dsl # only with --engine c4 (Structurizr)
227
229
  ```
228
230
 
229
231
  ### Render rules
230
232
 
231
- 1. Sin cota de palabras completitud > concisión para documentación técnica.
232
- 2. Diagrama principal (al menos C4Context + C4Container) es obligatorio; sin ellos el output no es válido.
233
- 3. C4Component solo si el contenedor lo justifica.
234
- 4. Sequence y erDiagram son opcionales; solo si aportan claridad real.
235
- 5. Cada bloque `mermaid` lleva el link `mermaid.ink` como blockquote inline.
236
- 6. Placeholders `{{PLACEHOLDER}}` siempre reemplazadosnunca dejar marcadores sin rellenar.
233
+ 1. No word capcompleteness > concision for technical documentation.
234
+ 2. The main diagram (at least C4Context + C4Container) is mandatory; without them the output is not valid.
235
+ 3. C4Component only when the container justifies it.
236
+ 4. Sequence and erDiagram are optional; only when they add real clarity.
237
+ 5. Every `mermaid` block carries the `mermaid.ink` link as an inline blockquote.
238
+ 6. `{{PLACEHOLDER}}` placeholders always replaced never leave unfilled markers.
237
239
 
238
240
  ## Output
239
241
 
240
- Produce en `docs/diagrams/NNN-export-diagrams-YYYY-MM-DD/`:
242
+ Produces under `docs/diagrams/NNN-export-diagrams-YYYY-MM-DD/`:
243
+
241
244
  - `README.md`
242
- - `diagrams.md` (siempre)
243
- - `workspace.dsl` (si `--engine c4`)
245
+ - `diagrams.md` (always)
246
+ - `workspace.dsl` (with `--engine c4`)
244
247
 
245
- Escribe solo `docs/diagrams/` (invariant #1 y #2: solo `export-*` gradua a `docs/`; esta skill la compone `export-diagrams`).
248
+ Writes only `docs/diagrams/` (invariants #1 and #2: only `export-*` graduates to `docs/`; this skill is composed by `export-diagrams`).
246
249
 
247
250
  ## Source
248
251
 
249
- Reciclado de `agent-workflow/exports/export-arq/` del bundle viejo (v1.3.0). Se conserva: el modelo C4 Levels 1-3, las plantillas DSL/PUML, la regla de link `mermaid.ink` por bloque Mermaid, la estructura de output, el cost guard para MCP. Se moderniza al contrato vigente de `export-diagrams`: **Mermaid por defecto** (antes Structurizr), motor elegido por `--engine mermaid|c4` (lo recibe el export que compone esta skill); PlantUML queda como apéndice de referencia, fuera del contrato actual. Se descarta: la lógica de lectura de AW-PROJECT legacy y los comandos CLI `agent-workflow next-number`/`history-data`/etc. (detalles de implementación del CLI, no de la skill).
252
+ Rationale and history: design (`docs/referencias/workflow-roles/diagrams.md`).