@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
@@ -19,36 +19,36 @@ description: >-
19
19
 
20
20
  ## Purpose
21
21
 
22
- Autorar cambios de base de datos como **scripts SQL versionados**, nunca ejecutándolos. Cubre dos modos:
22
+ Author database changes as **versioned SQL scripts**, never executing them. Two modes:
23
23
 
24
- - **Read-only** (consulta): leer schema/datos via MCP para entender el dominio (research, planning).
25
- - **Write-to-script** (cambio): toda mutación de BD se escribe a `SCRIPTS.sql` de la sesión; la **aplica el usuario**, no la IA.
24
+ - **Read-only** (query): read schema/data via MCP to understand the domain (research, planning).
25
+ - **Write-to-script** (change): every DB mutation is written to the session's `SCRIPTS.sql`; the **user applies it**, never the AI.
26
26
 
27
27
  ## Composed by
28
28
 
29
- - **research** — leer schema via MCP read-only para entender el dominio.
30
- - **`plan-exec-loop`** — cada cambio SQL se appendea a `SCRIPTS.sql` durante la ejecución.
31
- - **`quick-loop`** — igual, para el atajo liviano.
32
- - **`export-scripts`** — consolida los `SCRIPTS.sql` de N sesiones en el bundle `docs/scripts/NNN-export-scripts-YYYY-MM-DD/` y deriva el rollback.
29
+ - **research** — read schema via read-only MCP to understand the domain.
30
+ - **`plan-exec-loop`** — every SQL change is appended to `SCRIPTS.sql` during execution.
31
+ - **`quick-loop`** — same, for the lightweight shortcut.
32
+ - **`export-scripts`** — consolidates N sessions' `SCRIPTS.sql` into the `docs/scripts/NNN-export-scripts-YYYY-MM-DD/` bundle and derives the rollback.
33
33
 
34
34
  ## Knowledge
35
35
 
36
- ### Regla ceronunca ejecutar SQL (invariante 4)
36
+ ### Rule zeronever execute SQL (invariant 4)
37
37
 
38
- La IA **nunca ejecuta DML/DDL** contra ninguna BD, por ningún canal (MCP, `psql`, `Bash`, driver de app). Las migraciones quedan en `SCRIPTS.sql` y las **aplica el usuario**. Si aparece la tentación de "verificar aplicando", rehusar y pedir al usuario que ejecute.
38
+ The AI **never executes DML/DDL** against any DB, through any channel (MCP, `psql`, `Bash`, an app driver). Migrations stay in `SCRIPTS.sql` and the **user applies them**. If the temptation "verify by applying" appears, refuse and ask the user to run it.
39
39
 
40
- - **Lecturas read-only via MCP**: `SELECT`, inspección de schema, conteos — OK. Sin `INSERT/UPDATE/DELETE/CREATE/ALTER/DROP/TRUNCATE`.
41
- - Los MCP de BD (cert/prod) son **READONLY** por contrato.
42
- - Excepción única, que NO relaja la regla: si el usuario pide explícitamente "ejecutalo vos contra cert", aún así confirmar por bloque y no asumir autorización ampliada.
40
+ - **Read-only reads via MCP**: `SELECT`, schema inspection, counts — OK. No `INSERT/UPDATE/DELETE/CREATE/ALTER/DROP/TRUNCATE`.
41
+ - The DB MCPs (cert/prod) are **READONLY** by contract.
42
+ - Single exception, which does NOT relax the rule: if the user explicitly asks "run it yourself against cert", still confirm per block and never assume broadened authorization.
43
43
 
44
- ### Staging — archivo único `SCRIPTS.sql` por sesión
44
+ ### Staging — a single `SCRIPTS.sql` per session
45
45
 
46
46
  ```
47
47
  .workflow/sessions/<folder>/
48
- └── SCRIPTS.sql (consolidado de TODAS las sentencias de la sesión)
48
+ └── SCRIPTS.sql (consolidated: ALL of the session's statements)
49
49
  ```
50
50
 
51
- Cada sentencia se **appendea** con un par de markers en comentarios:
51
+ Every statement is **appended** with a pair of comment markers:
52
52
 
53
53
  ```sql
54
54
  -- @category: 01-ddl-tablas
@@ -58,60 +58,64 @@ CREATE TABLE IF NOT EXISTS esq_credito.tb_usuarios (
58
58
  );
59
59
  ```
60
60
 
61
- - `@category` clasifica (4 valores canónicos, abajo).
62
- - `@stmt` da el slug determinístico `NN-verbo-objetivo`; `export-scripts` deriva el filename al separar.
63
- - Orden dentro del archivo = orden cronológico de append. El orden de ejecución final por categoría (01→02→03→04) lo resuelve `export-scripts`, no este paso.
64
- - `BEGIN;` global al inicio del archivo, `COMMIT;` al final. Cada sentencia individual **no** trae su propio BEGIN/COMMIT.
65
- - **Sin** `.rollback.sql` per archivo durante exec — el rollback se genera al exportar.
61
+ - `@category` classifies (4 canonical values, below).
62
+ - `@stmt` gives the deterministic slug `NN-verb-target`; `export-scripts` derives the filename when splitting.
63
+ - Order inside the file = chronological append order. The final per-category execution order (01→02→03→04) is resolved by `export-scripts`, not here.
64
+ - A global `BEGIN;` at the top of the file, `COMMIT;` at the end. Individual statements carry **no** BEGIN/COMMIT of their own.
65
+ - **No** per-file `.rollback.sql` during exec — the rollback is generated on export.
66
66
 
67
- ### Las 4 categorías (`@category`)
67
+ ### The 4 categories (`@category`)
68
68
 
69
- | Marker | Patrones de detección |
69
+ | Marker | Detection patterns |
70
70
  |---|---|
71
71
  | `01-ddl-tablas` | `CREATE/DROP/ALTER TABLE`, `CREATE INDEX`, `CREATE SEQUENCE` |
72
72
  | `02-ddl-funciones` | `CREATE [OR REPLACE] FUNCTION/PROCEDURE`, `DROP FUNCTION/PROCEDURE` |
73
- | `03-migracion` | `UPDATE`, `INSERT ... SELECT`, `DELETE` sobre datos existentes, transformaciones de columnas |
74
- | `04-inserts` | `INSERT INTO ... VALUES`, seeds de catálogos, datos de configuración inicial |
73
+ | `03-migracion` | `UPDATE`, `INSERT ... SELECT`, `DELETE` over existing data, column transformations |
74
+ | `04-inserts` | `INSERT INTO ... VALUES`, catalog seeds, initial configuration data |
75
75
 
76
- **Orden de ejecución obligatorio**: 01 → 02 → 03 → 04. El `SCRIPTS.sql` puede mezclar categorías cronológicamente; `export-scripts` ordena el bundle final.
76
+ **Mandatory execution order**: 01 → 02 → 03 → 04. `SCRIPTS.sql` may mix categories chronologically; `export-scripts` orders the final bundle.
77
77
 
78
- ### Estilo SQL
78
+ ### SQL style
79
+
80
+ - **Canonical 4-line header**, between two equal-sign lines (delivered scripts are user-facing → field values in the user's language):
79
81
 
80
- - **Header canónico de 4 líneas**, entre dos líneas de iguales:
81
82
  ```sql
82
83
  -- ============================================================================
83
84
  -- Script: NNN-tipo-objetivo.sql
84
85
  -- Sesion: sNNN
85
- -- Objeto: <qué hace, 1-2 líneas>
86
- -- Alcance: <filtros y boundaries del cambio, 1 línea>
86
+ -- Objeto: <what it does, 1-2 lines>
87
+ -- Alcance: <filters and boundaries of the change, 1 line>
87
88
  -- ============================================================================
88
89
  ```
89
- Solo 4 campos. Autor/Fecha/notas largas NO van en el header (si hacen falta, bloque libre debajo). Si el motor no es Postgres, indicarlo en `Objeto:`.
90
- - **Idempotencia**: `CREATE TABLE IF NOT EXISTS`, `DROP ... IF EXISTS`, `CREATE OR REPLACE`, `ON CONFLICT`.
91
- - **Schema explícito** siempre (`esq_credito.tb_x`, nunca `public.`).
92
- - **CTEs sobre DO/LOOP**: una transformación = `WITH ... AS` encadenadas + un `INSERT/UPDATE/DELETE` final. Evitar `DO $$ ... LOOP ... END $$` cuando el resultado se logra declarativamente (más fácil de auditar y revertir). Excepción: descubrimiento dinámico de objetos (FKs/columnas/constraints) — documentar el motivo en `Objeto:`.
93
- - **Queries parametrizadas** siempre (nunca concatenar strings) en cualquier SQL que termine en código de app.
94
- - Nunca crear `fn_*`/`sp_*` para reusar lógica exclusiva de un script; usar CTE o inline.
95
- - **Separadores entre secciones** (solo si hay 2+ secciones):
90
+
91
+ Only 4 fields. Author/Date/long notes do NOT go in the header (a free block below, if needed). If the engine is not Postgres, state it in `Objeto:`.
92
+ - **Idempotency**: `CREATE TABLE IF NOT EXISTS`, `DROP ... IF EXISTS`, `CREATE OR REPLACE`, `ON CONFLICT`.
93
+ - **Explicit schema** always (`esq_credito.tb_x`, never `public.`).
94
+ - **CTEs over DO/LOOP**: one transformation = chained `WITH ... AS` + one final `INSERT/UPDATE/DELETE`. Avoid `DO $$ ... LOOP ... END $$` when the result is achievable declaratively (easier to audit and revert). Exception: dynamic object discovery (FKs/columns/constraints) document the reason in `Objeto:`.
95
+ - **Parametrized queries** always (never string concatenation) in any SQL that ends up in app code.
96
+ - Never create `fn_*`/`sp_*` to reuse logic exclusive to one script; use a CTE or inline.
97
+ - **Section separators** (only with 2+ sections):
98
+
96
99
  ```sql
97
100
  -- ----------------------------------------------------------------------------
98
- -- N. Descripción corta de qué hace este bloque.
101
+ -- N. Short description of what this block does.
99
102
  -- ----------------------------------------------------------------------------
100
103
  ```
101
- Cajas dobles (`====`) solo para el header.
102
104
 
103
- ### Proceso de mantenimiento del `SCRIPTS.sql`
105
+ Double boxes (`====`) only for the header.
106
+
107
+ ### `SCRIPTS.sql` maintenance process
104
108
 
105
- 1. **Detectar la categoría** del cambio (tabla de markers).
106
- 2. **Verificar idempotencia** del statement.
107
- 3. **Append** con par de markers (`@category` + `@stmt`).
108
- 4. **Style check** — header canónico, CTEs sobre DO/LOOP, schema explícito.
109
- 5. **No** renumerar ni mover (solo hay un `SCRIPTS.sql`).
110
- 6. **No** generar `.rollback.sql` durante exec.
109
+ 1. **Detect the category** of the change (markers table).
110
+ 2. **Verify idempotency** of the statement.
111
+ 3. **Append** with the marker pair (`@category` + `@stmt`).
112
+ 4. **Style check** — canonical header, CTEs over DO/LOOP, explicit schema.
113
+ 5. **Never** renumber or move (there is a single `SCRIPTS.sql`).
114
+ 6. **Never** generate `.rollback.sql` during exec.
111
115
 
112
- ### Rollback (lo genera `export-scripts`, no este paso)
116
+ ### Rollback (generated by `export-scripts`, not here)
113
117
 
114
- `export-scripts` lee los forwards ya consolidados y genera **un único** `00-ROLLBACK.sql` al root del bundle, en orden inverso. Conocer las estrategias para escribir forwards reversibles:
118
+ `export-scripts` reads the consolidated forwards and generates **a single** `00-ROLLBACK.sql` at the bundle root, in reverse order. Know the strategies to write reversible forwards:
115
119
 
116
120
  | Forward | Rollback |
117
121
  |---|---|
@@ -119,19 +123,19 @@ CREATE TABLE IF NOT EXISTS esq_credito.tb_usuarios (
119
123
  | `ALTER TABLE tb_x ADD COLUMN col` | `ALTER TABLE tb_x DROP COLUMN IF EXISTS col;` |
120
124
  | `CREATE INDEX idx_...` | `DROP INDEX IF EXISTS idx_...;` |
121
125
  | `CREATE SEQUENCE seq_...` | `DROP SEQUENCE IF EXISTS seq_...;` |
122
- | `CREATE OR REPLACE FUNCTION fn_x(...)` | `DROP FUNCTION IF EXISTS fn_x(<firma>);` |
123
- | `UPDATE/DELETE` con backup en `esq_audit.tb_bkp_*` | `UPDATE … FROM esq_audit.tb_bkp_…` |
124
- | `INSERT INTO tb_x VALUES (...)` | `DELETE FROM tb_x WHERE <clave natural / rango>;` (nunca DELETE sin WHERE) |
126
+ | `CREATE OR REPLACE FUNCTION fn_x(...)` | `DROP FUNCTION IF EXISTS fn_x(<signature>);` |
127
+ | `UPDATE/DELETE` with a backup in `esq_audit.tb_bkp_*` | `UPDATE … FROM esq_audit.tb_bkp_…` |
128
+ | `INSERT INTO tb_x VALUES (...)` | `DELETE FROM tb_x WHERE <natural key / range>;` (never DELETE without WHERE) |
125
129
 
126
- **Irreversiblesbloque "Fase 5" manual** (fuera de la transacción, una línea por caso): `TRUNCATE`, `DROP COLUMN`/`DROP TABLE` sin backup, `ALTER COLUMN TYPE` con pérdida, `DROP ... CASCADE`, `DELETE/UPDATE` sin respaldo en `esq_audit`. Para que un cambio destructivo sea reversible, escribir el backup en el mismo forward (`esq_audit.tb_bkp_<tabla>_sNNN`).
130
+ **Irreversiblemanual "Fase 5" block** (outside the transaction, one line per case): `TRUNCATE`, `DROP COLUMN`/`DROP TABLE` without backup, lossy `ALTER COLUMN TYPE`, `DROP ... CASCADE`, `DELETE/UPDATE` without a backup in `esq_audit`. To make a destructive change reversible, write the backup in the same forward (`esq_audit.tb_bkp_<table>_sNNN`).
127
131
 
128
132
  ## Output
129
133
 
130
- - Durante loops: sentencias appendeadas a `.workflow/sessions/<folder>/SCRIPTS.sql` (artefacto de sesión, no `docs/`).
131
- - Vía `export-scripts`: bundle `docs/scripts/NNN-export-scripts-YYYY-MM-DD/` — `00-ROLLBACK.sql` + `01-<CATEGORIA>.sql` … (numeración continua, sin gaps por categoría vacía) + `README.md`. Orden canónico de categorías: `DDL-TABLES → DDL-FUNCTIONS → DML → INSERTS`.
134
+ - During loops: statements appended to `.workflow/sessions/<folder>/SCRIPTS.sql` (session artifact, never `docs/`).
135
+ - Via `export-scripts`: the `docs/scripts/NNN-export-scripts-YYYY-MM-DD/` bundle — `00-ROLLBACK.sql` + `01-<CATEGORY>.sql` … (continuous numbering, no gaps for empty categories) + `README.md`. Canonical category order: `DDL-TABLES → DDL-FUNCTIONS → DML → INSERTS`.
132
136
 
133
- Nunca escribe a `docs/` desde un loop (invariante 1: solo `export-*` exporta). Nunca ejecuta nada contra una BD (invariante 4).
137
+ It never writes `docs/` from a loop (invariant 1: only `export-*` exports). It never executes anything against a DB (invariant 4).
134
138
 
135
139
  ## Source
136
140
 
137
- Reglas autocontenidas (sin dependencia de skills externas). Racional e historia: diseño (`docs/referencias/workflow-roles/sql.md`).
141
+ Self-contained rules (no dependency on external skills). Rationale and history: design (`docs/referencias/workflow-roles/sql.md`).
@@ -10,7 +10,7 @@ description: >-
10
10
  in PLAN (`plan-new-loop`/`plan-refine-loop`) it authors per-screen **design
11
11
  SPECs** (`NNN-SPEC-<SLUG>.md`) as session artifacts. Use when a loop is refining
12
12
  a spec or building/refining a plan that involves screens, forms, dashboards,
13
- modals or any UI surface. Recycled from the `ui-spec-generator` service.
13
+ modals or any UI surface.
14
14
  ---
15
15
 
16
16
  # ui-spec — UI spec authoring
@@ -21,81 +21,81 @@ description: >-
21
21
 
22
22
  ## Purpose
23
23
 
24
- Dado un requerimiento de UI, autorar una **descripción estructurada en Markdown** de las pantallas y sus componentesdescriptiva (qué hay y para qué) y estructurada (regionescomponentes, con vocabulario consistente), agnóstica de framework. **Reemplaza** al servicio single-shot `ui-spec-generator`: ahora la IA la autora **nativamente**, guiada por esta skill. No hay endpoint que llamar; el saber del servicio vive aquí. **Salida en un solo formato: Markdown** (sin representación JSON paralela).
24
+ Given a UI requirement, author a **structured Markdown description** of the screens and their componentsdescriptive (what exists and what for) and structured (regionscomponents, consistent vocabulary), framework-agnostic. The AI authors it **natively**, guided by this skill; there is no endpoint to call. **Single output format: Markdown** (no parallel JSON representation).
25
25
 
26
26
  ## Composed by
27
27
 
28
- Dos niveles, misma capacidad:
28
+ Two levels, same capability:
29
29
 
30
- - **`spec-refine-loop`** (ver `../../loops/spec-refine-loop/SKILL.md`) — al resolver el gap **UI sin especificar** (cuando el requerimiento involucra UI): autora la sección `## UI spec` **del spec** (el *qué* de la UI, pantallas a grano grueso).
31
- - **`plan-new-loop` · `plan-refine-loop`** (ver `../../loops/plan-new-loop/SKILL.md` § *Delta 4*) — al resolver el gap **UI sin design SPEC** (cuando el **plan incluye UI**): autora **design SPECs** por pantalla (`NNN-SPEC-<SLUG>.md`) como **artefactos de la sesión de PLAN** (ver `../../artifacts/artifacts-design/SPEC.md`); derivan de `## UI spec` si existe.
30
+ - **`spec-refine-loop`** (see `../../loops/spec-refine-loop/SKILL.md`) — resolving the **UI unspecified** gap (when the requirement involves UI): authors the spec's `## UI spec` section (the UI's *what*, coarse-grain screens).
31
+ - **`plan-new-loop` · `plan-refine-loop`** (see `../../loops/plan-new-loop/SKILL.md` § *Delta 4*) — resolving the **UI without design SPEC** gap (when the **plan includes UI**): authors per-screen **design SPECs** (`NNN-SPEC-<SLUG>.md`) as **PLAN session artifacts** (see `../../artifacts/artifacts-design/SPEC.md`); they derive from `## UI spec` when it exists.
32
32
 
33
- En ambos, el loop aporta lo que el servicio viejo no tenía:
33
+ In both, the composing loop contributes:
34
34
 
35
- - **Pregunta al humano** (design-system, tema, ambigüedades de pantalla) vía *structured-choice* (regla canónica: `../../loops/CHASSIS.md` § *Structured-choice*; binding por arnés: `../../harness/SKILL.md`).
36
- - **Itera** gap-driven hasta converger.
37
- - Ofrece **variantes** y **cura** el resultado.
35
+ - **Asking the human** (design system, theme, screen ambiguities) via *structured-choice* (canonical rule: `../../loops/CHASSIS.md` § *Structured-choice*; per-harness binding: `../../harness/SKILL.md`).
36
+ - **Gap-driven iteration** until convergence.
37
+ - Offering **variants** and **curating** the result.
38
38
 
39
- Cualquier loop podría componerla; los casos primarios son SPEC y PLAN. En SPEC, la descripción aterriza como sección del documento spec (`docs/specs/NNN-spec-<slug>.md`) — el spec sigue siendo un documento (invariante 3). En PLAN aterriza como **design SPECs** (artefactos de sesión) — que **no** son el requirement-spec: son el detalle de diseño por pantalla, de proceso.
39
+ Any loop could compose it; the primary cases are SPEC and PLAN. In SPEC the description lands as a section of the spec document (`docs/specs/NNN-spec-<slug>.md`) — the spec remains a document (invariant 3). In PLAN it lands as **design SPECs** (session artifacts) — which are **not** the requirement-spec: they are the per-screen design detail, process-facing.
40
40
 
41
41
  ## Knowledge
42
42
 
43
- ### Estructura conceptual (universal, recursiva)
43
+ ### Conceptual structure (universal, recursive)
44
44
 
45
- Una **pantalla** tiene: `nombre`, `tipo` (propósito semántico: auth, dashboard, form, list, detail, error, …), `plataforma` (web por default, mobile, …), `descripción` opcional, y **o bien regiones** (pantalla compleja) **o bien componentes** directos (pantalla simple) — **no ambos**.
45
+ A **screen** has: `name`, `type` (semantic purpose: auth, dashboard, form, list, detail, error, …), `platform` (web by default, mobile, …), optional `description`, and **either regions** (complex screen) **or** direct **components** (simple screen) — **never both**.
46
46
 
47
- - Una **región** agrupa componentes y tiene un `type`.
48
- - Un **componente** tiene un `kind`, y opcionalmente `role`, `label` y `children` (anidables, recursivos).
47
+ - A **region** groups components and has a `type`.
48
+ - A **component** has a `kind`, and optionally `role`, `label` and `children` (nestable, recursive).
49
49
 
50
- Es un modelo conceptual para guiar la autoría; **no se serializa a JSON** — la única salida es el render Markdown (ver Output).
50
+ It is a conceptual model to guide authoring; **it is never serialized to JSON** — the only output is the Markdown render (see Output).
51
51
 
52
- - `type` (región) ∈ `header · main · footer · sidebar · filters · summary`
53
- - `kind` (componente) por categoría:
54
- - **Contenedores**: `card · panel · modal`
55
- - **Datos**: `table · list · grid`
56
- - **Visualización**: `chart · metric · badge · image`
57
- - **Entrada**: `textInput · select · checkbox · datePicker · toggle`
58
- - **Acciones**: `button · link · actionGroup`
59
- - **Navegación**: `navBar · tabs · breadcrumb`
52
+ - `type` (region) ∈ `header · main · footer · sidebar · filters · summary`
53
+ - `kind` (component) by category:
54
+ - **Containers**: `card · panel · modal`
55
+ - **Data**: `table · list · grid`
56
+ - **Visualization**: `chart · metric · badge · image`
57
+ - **Input**: `textInput · select · checkbox · datePicker · toggle`
58
+ - **Actions**: `button · link · actionGroup`
59
+ - **Navigation**: `navBar · tabs · breadcrumb`
60
60
  - **Feedback**: `alert · progress`
61
61
 
62
62
  ### Rules
63
63
 
64
- 1. **Conciso** — solo lo esencial. Nada de relleno ni componentes especulativos.
65
- 2. Pantalla simple (login, recuperar contraseña, error) → `components` directo, **sin** `regions`.
66
- 3. Pantalla compleja (dashboard, mantenimiento CRUD) → `regions` para organizar.
67
- 4. `role` es **opcional** — solo si aporta claridad (`role:"logo"`, `role:"primary"`).
68
- 5. Límites: **≤100 componentes**, **≤5 niveles** de anidación.
69
- 6. Una sola pantalla por bloque `#`; si el requerimiento son varias pantallas, se listan una tras otra (cada una con su `#`).
64
+ 1. **Concise** — only the essential. No filler, no speculative components.
65
+ 2. Simple screen (login, password recovery, error) → direct `components`, **no** `regions`.
66
+ 3. Complex screen (dashboard, CRUD maintenance) → `regions` to organize.
67
+ 4. `role` is **optional** — only when it adds clarity (`role:"logo"`, `role:"primary"`).
68
+ 5. Limits: **≤100 components**, **≤5 nesting levels**.
69
+ 6. One screen per `#` block; a multi-screen requirement lists them one after another (each with its own `#`).
70
70
 
71
- ### Design options (las pregunta el loop al humano)
71
+ ### Design options (the loop asks the human)
72
72
 
73
- Estas opciones **guían contenido/labels**; la estructura de la pantalla es **agnóstica** de design-system y NO las lleva como parte del modelo. Se **anotan en el spec** (encabezado de la sección):
73
+ These options **guide content/labels**; the screen structure is design-system **agnostic** and does NOT carry them in the model. They are **annotated in the spec** (section header):
74
74
 
75
75
  - **Design system**: `material3 · bootstrap5 · tailwind3 · antDesign · chakraUI · custom`.
76
- - **Tema**: `light · dark · auto`.
77
- - **Idioma**: `es · en · …` (afecta los `label`).
78
- - **Densidad** (opcional): `compact · comfortable · spacious`.
79
- - **maxWidth** (opcional): pixeles, 320–3840 (anotación de layout).
76
+ - **Theme**: `light · dark · auto`.
77
+ - **Language**: `es · en · …` (affects the `label`s — user-facing content follows the user's language).
78
+ - **Density** (optional): `compact · comfortable · spacious`.
79
+ - **maxWidth** (optional): pixels, 320–3840 (layout annotation).
80
80
 
81
81
  ### Variants
82
82
 
83
- Cuando el requerimiento admite más de un layout razonable (ej. tabla vs. grid de cards; tabs vs. acordeón), ofrecer **2-3 variantes** como pantallas Markdown alternativas y pedir al humano que elija. Una sola variante se cura y queda; las descartadas no se persisten.
83
+ When the requirement admits more than one reasonable layout (e.g. table vs. card grid; tabs vs. accordion), offer **2-3 variants** as alternative Markdown screens and ask the human to pick. The chosen variant is curated and stays; discarded ones are not persisted.
84
84
 
85
85
  ### Disambiguation
86
86
 
87
- Antes de autorar, resolver ambigüedades con *structured-choice* (lo dispara el loop; ver `../../harness/SKILL.md`):
87
+ Before authoring, resolve ambiguities via *structured-choice* (the loop triggers it):
88
88
 
89
- - Pantalla simple o compleja (¿necesita `regions`?).
90
- - Qué acciones primarias/secundarias existen.
91
- - Qué datos muestra (tabla, métricas, ambos).
92
- - Si hay estados (loading, empty, error) que el spec deba enumerar.
89
+ - Simple or complex screen (does it need `regions`?).
90
+ - Which primary/secondary actions exist.
91
+ - What data it shows (table, metrics, both).
92
+ - Whether there are states (loading, empty, error) the spec must enumerate.
93
93
 
94
- Si el humano no responde, asumir el caso más simple coherente con la descripción y anotar el supuesto.
94
+ If the human does not answer, assume the simplest case coherent with the description and note the assumption.
95
95
 
96
- ### Examples (few-shot)
96
+ ### Examples (few-shot; labels in the user's language)
97
97
 
98
- **Simple (sin regiones)** — "Recuperar Contraseña" (auth, web):
98
+ **Simple (no regions)** — `Recuperar Contraseña` (auth, web):
99
99
 
100
100
  ```markdown
101
101
  # Recuperar Contraseña
@@ -108,7 +108,7 @@ Si el humano no responde, asumir el caso más simple coherente con la descripci
108
108
  - **Volver al login** (link)
109
109
  ```
110
110
 
111
- **Complejo (con regiones)** — "Dashboard" (web):
111
+ **Complex (with regions)** — "Dashboard" (web):
112
112
 
113
113
  ```markdown
114
114
  # Dashboard
@@ -122,40 +122,26 @@ Si el humano no responde, asumir el caso más simple coherente con la descripci
122
122
  - **Registros** (table)
123
123
  ```
124
124
 
125
- ## Output — dos aterrizajes, un solo formato (Markdown)
125
+ ## Output — two landing zones, one format (Markdown)
126
126
 
127
- **Salida en un solo formato: Markdown.** La escribe el loop (no esta skill por sola). El **render es el mismo** en ambos niveles; cambia dónde aterriza, según el loop que compone:
127
+ **Single output format: Markdown.** The loop writes it (never this skill on its own). The **render is identical** at both levels; what changes is where it lands, per the composing loop:
128
128
 
129
- | Loop que compone | Aterriza en | Grano |
129
+ | Composing loop | Lands in | Grain |
130
130
  |---|---|---|
131
- | `spec-refine-loop` | sección `## UI spec` **del spec** (`docs/specs/NNN-spec-<slug>.md`) — documento, in place | todas las pantallas del requerimiento, grano grueso |
132
- | `plan-new-loop` · `plan-refine-loop` | **design SPECs** `NNN-SPEC-<SLUG>.md` — artefactos en la **sesión de PLAN** (uno **por pantalla**, con encabezado de traza; ver `../../artifacts/artifacts-design/SPEC.md`) | una pantalla por archivo, detalle ejecutable |
131
+ | `spec-refine-loop` | the spec's `## UI spec` section (`docs/specs/NNN-spec-<slug>.md`) — document, in place | all the requirement's screens, coarse grain |
132
+ | `plan-new-loop` · `plan-refine-loop` | **design SPECs** `NNN-SPEC-<SLUG>.md` — artifacts in the **PLAN session** (one **per screen**, with a trace header; see `../../artifacts/artifacts-design/SPEC.md`) | one screen per file, executable detail |
133
133
 
134
- Encabezar la sección (o el encabezado de traza del SPEC) con las opciones de diseño elegidas (design system, tema, idioma) en una línea. Luego el render Markdown, con estas reglas exactas (recicladas del `MarkdownFormatter`):
134
+ Head the section (or the SPEC's trace header) with the chosen design options (design system, theme, language) in one line. Then the Markdown render, with these exact rules:
135
135
 
136
- - `# {nombre}`
137
- - `**Tipo**: {tipo} | **Plataforma**: {plataforma}`
138
- - `descripción` como párrafo aparte (solo si existe).
139
- - Con regiones: un `## {Type capitalizado}` por región (capitalizar la primera letra del `type`).
140
- - Sin regiones: un único `## Componentes`.
141
- - Cada componente: `- **{label || role || kind}**`, seguido de ` ({kind})` **solo si** había `label` o `role`.
142
- - `children` indentados **2 espacios por nivel**.
143
- - Si hay varias pantallas, se listan una tras otra (cada una con su `#`).
144
-
145
- Ejemplo de render para el dashboard de arriba:
146
-
147
- ```markdown
148
- # Dashboard
149
- **Tipo**: dashboard | **Plataforma**: web
150
-
151
- ## Summary
152
- - **Total** (metric)
153
- - **Pendientes** (metric)
154
-
155
- ## Main
156
- - **Registros** (table)
157
- ```
136
+ - `# {name}`
137
+ - `**Tipo**: {type} | **Plataforma**: {platform}`
138
+ - `description` as a separate paragraph (only if present).
139
+ - With regions: one `## {Capitalized type}` per region (capitalize the `type`'s first letter).
140
+ - Without regions: a single `## Componentes`.
141
+ - Each component: `- **{label || role || kind}**`, followed by ` ({kind})` **only if** there was a `label` or `role`.
142
+ - `children` indented **2 spaces per level**.
143
+ - Multiple screens are listed one after another (each with its own `#`).
158
144
 
159
145
  ## Source
160
146
 
161
- Reciclada de `ui-spec-generator` (Spring Boot/Kotlin). Se **conservan**: el prompt de sistema (vocabulario, kinds, reglas), la estructura conceptual pantalla/región/componente, los pocos-shot (ahora en Markdown), el enum de design systems, los constraints (theme/density/maxWidth) y las reglas exactas del `MarkdownFormatter` (su render era exactamente este). Se **descarta**: la **serialización JSON `Screen`** (segunda representación, ahora innecesaria), el transporte HTTP, OpenRouter/Gemini y el modo single-shot — los reemplaza la iteración del `spec-refine-loop`. El endpoint del servicio deja de usarse. También absorbe los principios UX de la vieja skill `standards/frontend-design/` cuando el spec describe mantenimientos CRUD (formularios, listados, modales, navegación, feedback).
147
+ Rationale and history: design (`docs/referencias/workflow-roles/ui-spec.md`).