@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,5 +1,5 @@
1
1
  ---
2
- description: Inicia o retoma el loop de refinamiento de una especificación (spec-refine-loop). Input: docs/specs/NNN-spec-<slug>.md (borradorde spec-new, a mano, o materializado por la escalación de quick). Actualiza docs/specs/NNN-spec-<slug>.md in place.
2
+ description: Starts or resumes the specification refinement loop (spec-refine-loop). Input: docs/specs/NNN-spec-<slug>.md (a draft from spec-new, hand-written, or materialized by the quick escalation). Updates docs/specs/NNN-spec-<slug>.md in place.
3
3
  argument-hint: <docs/specs/NNN-spec-<slug>.md>
4
4
  allowed-tools:
5
5
  [
@@ -10,33 +10,33 @@ allowed-tools:
10
10
  ]
11
11
  ---
12
12
 
13
- # spec-refine — trampolín al loop de refinamiento
13
+ # spec-refine — trampoline to the refinement loop
14
14
 
15
- Este comando no refina el spec él mismo: delega al loop `spec-refine-loop` (Layer 2), que es quien itera, cierra gaps y produce el spec refinado.
15
+ This command does not refine the spec itself: it delegates to `spec-refine-loop` (Layer 2), which iterates, closes gaps and produces the refined spec.
16
16
 
17
- ## Ejecutar el loop
17
+ ## Run the loop
18
18
 
19
- `spec-refine-loop` **no** es una skill invocable por nombrees el manual de operación de este comando (un doc hermano del bundle). **Cargalo y ejecutalo de punta a punta**:
19
+ `spec-refine-loop` is **not** a skill invocable by nameit is this command's operating manual (a sibling doc in the bundle). **Load it and execute it end to end**:
20
20
 
21
- 1. **Leé** `../loops/spec-refine-loop/SKILL.md` (dentro de la skill `w` instaladap. ej. `~/.claude/skills/w/loops/…`).
22
- 2. **Seguí** sus instrucciones tomando `$ARGUMENTS` como input: detecta estado/resume, corre el motor gap-driven, crea y maneja sessions, converge y reporta.
21
+ 1. **Read** `../loops/spec-refine-loop/SKILL.md` (inside the installed `w` skille.g. `~/.claude/skills/w/loops/…`).
22
+ 2. **Follow** its instructions taking `$ARGUMENTS` as input: it detects state/resume, runs the gap-driven engine, creates and manages sessions, converges and reports.
23
23
 
24
- > No intentes `Skill: spec-refine-loop` — no está registrada como skill. El comando **es** la entrada; el loop es su cuerpo.
24
+ > Do not try `Skill: spec-refine-loop` — it is not registered as a skill. The command **is** the entry; the loop is its body.
25
25
 
26
- ## Resolución de estado (resumable)
26
+ ## State resolution (resumable)
27
27
 
28
- El skill detecta el estado previo antes de arrancar, **keyando off el `CHECKPOINT`** (no la existencia de un archivo "refined"):
28
+ The skill detects prior state before starting, **keying off the `CHECKPOINT`** (never the existence of a "refined" file):
29
29
 
30
- 1. Busca la sesión de refinamiento del spec en `.workflow/sessions/` y su `CHECKPOINT.md`.
31
- 2. **En curso** (existe CHECKPOINT) → continúa desde el avance previo (gaps resueltos, Q&A).
32
- 3. **Sin avance** (sin CHECKPOINT y el spec **no** tiene `## Refinement decisions`/`## Q&A traceability`) → arranca desde cero leyendo el spec (`NNN-spec*.md`).
33
- 4. **Ya refinado / re-refine a demanda** (sin CHECKPOINT abierto pero el spec **ya tiene** `## Refinement decisions`/`## Q&A traceability`) → **soportado de primera clase**: mientras el flujo siga en SPEC podés re-correr este comando sobre el mismo spec **las veces que haga falta** (nuevos requerimientos, cambios de scope, re-lectura). El loop hace `create_or_resume` — localiza la refine session existente (aunque esté cerrada) y la **reabre** en vez de duplicarlay re-refina leyendo el **spec mismo**; al `Guardar`, edita in place con confirmación.
30
+ 1. Find the spec's refinement session under `.workflow/sessions/` and its `CHECKPOINT.md`.
31
+ 2. **In progress** (a CHECKPOINT exists) → continue from the recorded progress (resolved gaps, Q&A).
32
+ 3. **No progress** (no CHECKPOINT and the spec does **not** have `## Refinement decisions`/`## Q&A traceability`) → start from zero reading the spec (`NNN-spec*.md`).
33
+ 4. **Already refined / re-refine on demand** (no open CHECKPOINT but the spec **already has** the 2 sections) → **first-class operation**: while the flow stays in SPEC you can re-run this command over the same spec **as many times as needed** (new requirements, scope changes, re-reads). The loop does `create_or_resume` — it locates the existing refine session (even closed) and **reopens** it instead of duplicatingand re-refines reading the **spec itself**; on `Guardar`, edits in place with confirmation.
34
34
 
35
- > **Compat (legacy):** el glob `NNN-spec*.md` también captura specs viejos `NNN-spec.md` / `NNN-spec-refined.md`. Re-correr spec-refine los edita in place de ahí en adelante.
35
+ > **Compat (legacy):** the `NNN-spec*.md` glob also catches old `NNN-spec.md` / `NNN-spec-refined.md` specs. Re-running spec-refine edits them in place from then on.
36
36
 
37
37
  ## Plan mode
38
38
 
39
- El skill resuelve el estado y describe las acciones que ejecutaría el loop (gaps que cerraría, preguntas que haría), sin arrancar la iteración.
39
+ The skill resolves the state and describes the actions the loop would run (gaps it would close, questions it would ask), without starting the iteration.
40
40
 
41
41
  ## Resources
42
42
 
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Dashboard read-only del workspace — qué se hizo / qué falta / qué se descartó, con fechas en español (hace 2 días, ayer en la mañana). Se apoya en `aw status`. Comando transversal (no es un flow); no escribe nada.
3
- argument-hint: (sin argumentos)
2
+ description: Read-only workspace dashboard what got done / what is missing / what was discarded, with dates humanized in the user's language. Backed by `aw status`. Transversal command (not a flow); writes nothing.
3
+ argument-hint: (no arguments)
4
4
  allowed-tools:
5
5
  [
6
6
  "Bash",
@@ -8,22 +8,22 @@ allowed-tools:
8
8
  ]
9
9
  ---
10
10
 
11
- # status — estado del workspace (read-only)
11
+ # status — workspace state (read-only)
12
12
 
13
- Muestra, simple y directo, el estado del workspace agrupado en **Hecho / Falta / Descartó**. Single-pass, read-only: no abre loop, no crea sesiones, no escribe en `docs/` ni en `.workflow/`. Comando **transversal** (no pertenece a ningún flow).
13
+ Shows, simple and direct, the workspace state grouped as **Done / Missing / Discarded**. Single-pass, read-only: no loop, no sessions, writes nothing in `docs/` or `.workflow/`. **Transversal** command (belongs to no flow).
14
14
 
15
- ## Ejecutar
15
+ ## Run
16
16
 
17
- 1. Corré `aw status` (devuelve JSON; se apoya en `status-service`).
18
- 2. Renderizá un resumen legible a partir del JSON — **no** muestres el JSON crudo. Usá el campo `relative` tal cual (ya viene humanizado en español). Encabezá con `workspace.name`.
19
- 3. Agrupá en tres bloques:
20
- - **▸ HECHO** — specs con `refined: true`; plans con su progreso (`tasks_done`/`tasks_total`, `progress_pct`); sesiones `closed`.
21
- - **▸ FALTA**sesiones `active`; plans con tareas pendientes (`tasks_total − tasks_done`); specs con `open_questions > 0`.
22
- - **▸ DESCARTÓ**cada item de `discarded[]` (`kind: deferred` = diferido en BACKLOG; `kind: excluded` = excluido en CHECKPOINT), con su `text`.
23
- 4. Cada línea termina con su fecha relativa tras ` · ` (ej. `· ayer en la mañana`). Si una sección queda vacía, mostrá `— (nada)`. No inventes datos que no estén en el JSON.
24
- 5. Si `workspace.initialized` es `false` y todo está vacíodecí "No es un workspace de agent-workflow (no hay `.workflow/`)" y sugerí `/w:workspace-init`.
17
+ 1. Run `aw status` (returns JSON; backed by `status-service`).
18
+ 2. Render a readable summary from the JSON — do **not** show the raw JSON. Use the `relative` field verbatim (it comes pre-humanized in the user's language — Spanish). Head it with `workspace.name`.
19
+ 3. Group into three blocks (the dashboard is user-facing → render it in the user's language; the canonical Spanish labels below):
20
+ - `▸ HECHO` — specs with `refined: true`; plans with their progress (`tasks_done`/`tasks_total`, `progress_pct`); `closed` sessions.
21
+ - `▸ FALTA` — `active` sessions; plans with pending tasks (`tasks_total − tasks_done`); specs with `open_questions > 0`.
22
+ - `▸ DESCARTÓ`every item in `discarded[]` (`kind: deferred` = deferred in BACKLOG; `kind: excluded` = excluded in CHECKPOINT), with its `text`.
23
+ 4. Every line ends with its relative date after ` · ` (e.g. `· ayer en la mañana`). An empty section shows `— (nada)`. Never invent data not present in the JSON.
24
+ 5. If `workspace.initialized` is `false` and everything is emptysay the folder is not an agent-workflow workspace (no `.workflow/`) and suggest `/w:workspace-init`.
25
25
 
26
- Formato sugerido (texto plano):
26
+ Suggested format (plain text; user-facing labels in Spanish):
27
27
 
28
28
  ```
29
29
  Workspace: <name>
@@ -43,8 +43,10 @@ Workspace: <name>
43
43
  ```
44
44
 
45
45
  ## Plan mode
46
- Igual que en ejecución: corré `aw status` (read-only) y mostrá el resumen. No hay cambios que aplicar.
46
+
47
+ Same as execution: run `aw status` (read-only) and show the summary. There are no changes to apply.
47
48
 
48
49
  ## Resources
49
- - CLI: `aw status` (servicio `status-service`; fechas vía `humanize-es`)
50
+
51
+ - CLI: `aw status` (service `status-service`; dates via `humanize-es`)
50
52
  - Design reference: `docs/referencias/workflow-skills/status.md`
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Convierte la carpeta actual en un workspace de agent-workflow (scaffolding .workflow/ + docs/ + WORKSPACE block + skills.toml). Reemplaza hub-init + project-init — sin distinción project/hub. Correr una vez antes de cualquier flujo; idempotente.
3
- argument-hint: --source alias:path[:rama] [--proyecto <nombre>] [--main-branch <rama>] [--dry-run]
2
+ description: Turns the current folder into an agent-workflow workspace (scaffolding .workflow/ + docs/ + WORKSPACE block + skills.toml). Replaces hub-init + project-init — no project/hub distinction. Run once before any flow; idempotent.
3
+ argument-hint: --source alias:path[:branch] [--proyecto <name>] [--main-branch <branch>] [--dry-run]
4
4
  allowed-tools:
5
5
  [
6
6
  "Bash",
@@ -10,30 +10,30 @@ allowed-tools:
10
10
  ]
11
11
  ---
12
12
 
13
- # workspace-init — bootstrap del workspace
13
+ # workspace-init — workspace bootstrap
14
14
 
15
- Corre `aw workspace-init` para convertir la carpeta actual en un workspace de agent-workflow. Un workspace tiene **1+ fuentes** (repos); "standalone" = una sola fuente. No hay modos project/hub — el modelo es unificado.
15
+ Runs `aw workspace-init` to turn the current folder into an agent-workflow workspace. A workspace has **1+ sources** (repos); "standalone" = a single source. There are no project/hub modes the model is unified.
16
16
 
17
17
  ```bash
18
- aw workspace-init --source alias:path[:rama] [--proyecto <nombre>] [--main-branch <rama>] [--dry-run]
18
+ aw workspace-init --source alias:path[:branch] [--proyecto <name>] [--main-branch <branch>] [--dry-run]
19
19
  ```
20
20
 
21
- ## Pasos interactivos
21
+ ## Interactive steps
22
22
 
23
- 1. **Detectar/confirmar fuentes** — el CLI detecta la/s ruta/s de repo; el usuario confirma aliases, paths y ramas. Se acepta `--source` múltiple.
24
- 2. **Elegir skills por defecto** — se presenta el catálogo de capacidades (roles) disponibles. Para cada rol: `built-in default`, override a skill de tercero (`skills.sh`), o `off`. Resultado escrito en `.workflow/skills.toml`. La cascada de config es: `built-in → ~/.workflow/skills.toml (global) → .workflow/skills.toml (workspace)`.
25
- 3. **Escribir scaffolding** — crea `.workflow/sessions/`, `docs/` con su taxonomía (`specs/`, `plans/`, `scripts/`, `manuals/`, `diagrams/`, `reports/`), el bloque `WORKSPACE` en `CLAUDE.md`/`AGENTS.md` (fuentes + metadatos), y `.workflow/skills.toml`.
26
- 4. **Multi-fuente** — si hay ≥2 fuentes, configura visibilidad multi-root (settings.local.json + config, gitignored) y reconcilia fuentes.
23
+ 1. **Detect/confirm sources** — the CLI detects the repo path(s); the user confirms aliases, paths and branches. Multiple `--source` accepted.
24
+ 2. **Pick default skills** — the catalog of available capabilities (roles) is presented. Per role: `built-in default`, override to a third-party skill (`skills.sh`), or `off`. The result is written to `.workflow/skills.toml`. Config cascade: `built-in → ~/.workflow/skills.toml (global) → .workflow/skills.toml (workspace)`.
25
+ 3. **Write the scaffolding** — creates `.workflow/sessions/`, `docs/` with its taxonomy (`specs/`, `plans/`, `scripts/`, `manuals/`, `diagrams/`, `reports/`), the `WORKSPACE` block in CLAUDE.md/AGENTS.md (sources + metadata), and `.workflow/skills.toml`.
26
+ 4. **Multi-source** — with ≥2 sources, configures multi-root visibility (settings.local.json + config, gitignored) and reconciles sources.
27
27
 
28
- Al terminar, el usuario puede correr `/w:spec-new`, `/w:plan-new` o `/w:quick` directamente.
28
+ When done, the user can run `/w:spec-new`, `/w:plan-new` or `/w:quick` directly.
29
29
 
30
- **Idempotente**: re-ejecutar reconcilia (no duplica entradas ni sobrescribe configuración manual).
30
+ **Idempotent**: re-running reconciles (no duplicate entries, no overwriting manual configuration).
31
31
 
32
32
  ## Plan mode
33
33
 
34
- Resuelve las fuentes y describe el scaffolding que crearía, sin escribir archivos. Muestra qué crearía en `.workflow/` y `docs/`, y qué escribiría en `CLAUDE.md`.
34
+ Resolves the sources and describes the scaffolding it would create, without writing files. Shows what it would create under `.workflow/` and `docs/`, and what it would write into CLAUDE.md.
35
35
 
36
36
  ## Resources
37
37
 
38
38
  - Design reference: `docs/referencias/workflow-commands/workspace-init.md`
39
- - Skills config: `docs/referencias/workflow-roles/` (capacidades/roles disponibles y cascada de binding)
39
+ - Skills config: `docs/referencias/workflow-roles/` (available capabilities/roles and the binding cascade)
@@ -25,9 +25,9 @@
25
25
  | Export | Composes | Reads (artifacts / sessions + corpus) | Writes (its ONLY category) |
26
26
  |---|---|---|---|
27
27
  | [`export-scripts`](export-scripts/SKILL.md) | `sql` | type-B `SCRIPTS.sql` (DDL/DML migrations) across N sessions + standalone `docs/scripts/*.sql` | `docs/scripts/NNN-export-scripts-<date>/` (numbered forwards + `00-ROLLBACK.sql`) |
28
- | [`export-manuals`](export-manuals/SKILL.md) | — (prosa: convenciones ambientes) | sessions + `DECISION` + plan-doc (`Solution`, `Final behavior`, `Validations`) + touched code | `docs/manuals/` |
28
+ | [`export-manuals`](export-manuals/SKILL.md) | — (prose: ambient conventions) | sessions + `DECISION` + plan-doc (`Solution`, `Final behavior`, `Validations`) + touched code | `docs/manuals/` |
29
29
  | [`export-diagrams`](export-diagrams/SKILL.md) | `diagrams` | source code of the sources + plan-doc (`AS-IS` / `TO-BE`, `Impacted`) | `docs/diagrams/` (C4 / mermaid) |
30
- | [`export-reports`](export-reports/SKILL.md) | — (prosa: convenciones ambientes) | corpus of sessions (spec, `CONCLUSIONS`, `DECISION`) + plan-doc state + `docs/` | `docs/reports/` (executive / functional report) |
30
+ | [`export-reports`](export-reports/SKILL.md) | — (prose: ambient conventions) | corpus of sessions (spec, `CONCLUSIONS`, `DECISION`) + plan-doc state + `docs/` | `docs/reports/` (executive / functional report) |
31
31
 
32
32
  > **Composition over ownership:** an export that owns a derived artifact does **not** own its authoring logic — it **composes a capability role** from [`../roles/`](../roles/) (resolved through `.workflow/skills.toml`): `export-scripts` composes `sql`; `export-diagrams` composes `diagrams`. Swapping the implementation is a one-line config change; it never touches the export. `export-manuals` and `export-reports` produce **prose**, which follows **ambient writing conventions** (the host auto-applies an installed writing skill if present) — they do **not** compose or bind a `writing` role.
33
33
 
@@ -36,7 +36,7 @@
36
36
  1. **Layer 1, explicit** — the **user** invokes them (`/w:export-<cat>`). **Never** automatic (no loop fires them).
37
37
  2. **Single-pass, read-only over sessions** — they read artifacts/sessions and `docs/`, **synthesize**, and write **only** their own `docs/<category>/` folder. They do **not** mutate sessions and do **not** open/close loops.
38
38
  3. **Cross-session** — they consolidate **N** sessions + the `docs/` corpus (dedup, roadmap, continuous numbering).
39
- 4. **No loop, no internal sessions** — options come from **args** (no *structured-choice* de ciclo de vida capacidad del arnés; ver [`../harness/SKILL.md`](../harness/SKILL.md)).
39
+ 4. **No loop, no internal sessions** — options come from **args** (no lifecycle *structured-choice*; harness capabilitysee [`../harness/SKILL.md`](../harness/SKILL.md)).
40
40
  5. **Git-safe** — they **never** commit, merge, push, `--amend`, or `--no-verify`. The output is a written document the user reviews and commits when ready.
41
41
  6. **DB scripts-only** — `export-scripts` ships migration SCRIPTS as a bundle; it **never executes** DDL/DML (a human/DBA applies them).
42
42
 
@@ -83,6 +83,6 @@ Exports read the corpus through the CLI — **never hard-coded paths**:
83
83
  | Export | File | Category | Composes |
84
84
  |---|---|---|---|
85
85
  | `export-scripts` | [`export-scripts/SKILL.md`](export-scripts/SKILL.md) | `docs/scripts` | `sql` |
86
- | `export-manuals` | [`export-manuals/SKILL.md`](export-manuals/SKILL.md) | `docs/manuals` | — (prosa: convenciones ambientes) |
86
+ | `export-manuals` | [`export-manuals/SKILL.md`](export-manuals/SKILL.md) | `docs/manuals` | — (prose: ambient conventions) |
87
87
  | `export-diagrams` | [`export-diagrams/SKILL.md`](export-diagrams/SKILL.md) | `docs/diagrams` | `diagrams` |
88
- | `export-reports` | [`export-reports/SKILL.md`](export-reports/SKILL.md) | `docs/reports` | — (prosa: convenciones ambientes) |
88
+ | `export-reports` | [`export-reports/SKILL.md`](export-reports/SKILL.md) | `docs/reports` | — (prose: ambient conventions) |
@@ -1,125 +1,125 @@
1
1
  ---
2
2
  name: export-diagrams
3
- description: "Genera diagramas de arquitectura y flujos del workspace en `docs/diagrams/` consolidando el código de las fuentes + el plan-doc (`Current state (AS-IS)` / `Target state (TO-BE)`, `Impacted`) de N sesiones. Produce contexto, contenedores, componentes, integraciones y modelo de datos (si MCP read-only disponible). Default `mermaid` (renderiza en GitHub, link `mermaid.ink` para preview); `c4`/structurizr opt-in vía `--engine`. Output en `docs/diagrams/NNN-export-diagrams-YYYY-MM-DD/` (o `.md`). Read-only/reporte: emite solo el source del diagrama (el render visual lo hace el lector); no commitea ni muta nada; MCP solo lecturas. Compone la capacidad `diagrams`. Úsalo para 'diagrama del sistema', 'C4 del workspace', 'mapa de arquitectura/flujos'. Invocado por el usuario vía `/w:export-diagrams`."
3
+ description: "Generates the workspace's architecture and flow diagrams in `docs/diagrams/` consolidating the sources' code + the plan-doc (`Current state (AS-IS)` / `Target state (TO-BE)`, `Impacted`) of N sessions. Produces context, containers, components, integrations and data model (when read-only MCP is available). Default `mermaid` (renders on GitHub, `mermaid.ink` link for preview); `c4`/structurizr opt-in via `--engine`. Output in `docs/diagrams/NNN-export-diagrams-YYYY-MM-DD/` (or `.md`). Read-only/report: emits only the diagram source (the reader renders it); never commits nor mutates anything; MCP reads only. Composes the `diagrams` capability. Use for 'system diagram', 'workspace C4', 'architecture/flow map'. User-invoked via `/w:export-diagrams`."
4
4
  ---
5
5
 
6
- # export-diagrams — Diagramas de arquitectura y flujos desde código + plan-doc
6
+ # export-diagrams — architecture and flow diagrams from code + plan-doc
7
7
 
8
- Genera un dossier de diagramas (**arquitectura y flujos**) del workspace, agregando la estructura de las fuentes y el delta de las sesiones. **Read-only / reporte** — emite solo el **source** del diagrama (Mermaid / DSL); el render visual lo hace el lector. No commitea, no muta nada; MCP solo lecturas.
8
+ Generates a diagram dossier (**architecture and flows**) of the workspace, aggregating the sources' structure and the sessions' delta. **Read-only / report** — it emits only the diagram **source** (Mermaid / DSL); the reader renders it. It never commits, never mutates anything; MCP reads only.
9
9
 
10
- > Familia `export-*` (la única vía artefacto→`docs/`). Recicla el espíritu del viejo `export-arq` (C4, niveles contexto/contenedores/componentes, integraciones, modelo de datos), reubicado a `docs/diagrams` y modernizado: default `mermaid` (en vez de structurizr), sin modos project/hub, y la generación la aporta la capacidad `diagrams` (no una skill propia). Diseño: `docs/referencias/workflow-exports/export-diagrams.md`.
10
+ > `export-*` family (the only artifact→`docs/` path). Design: `docs/referencias/workflow-exports/export-diagrams.md`.
11
11
 
12
12
  ## Category
13
13
 
14
- `docs/diagrams` — **única** carpeta `docs/` que este export escribe.
14
+ `docs/diagrams` — the **only** `docs/` folder this export writes.
15
15
 
16
16
  ## Composes
17
17
 
18
- Capacidad **`diagrams`** (built-in default `diagrams`), resuelta vía `.workflow/skills.toml`. Aporta el motor de render (Mermaid C4 nativo / Structurizr DSL), los niveles C1–C4 y la convención del link de preview. Este export **no** posee esa lógica: la compone. Rebindeable u `off` por config.
18
+ The **`diagrams`** capability (built-in default `diagrams`), resolved via `.workflow/skills.toml`. It contributes the render engine (native Mermaid C4 / Structurizr DSL), the C1–C4 levels and the preview-link convention. This export does **not** own that logic: it composes it. Rebindable or `off` by config.
19
19
 
20
20
  ## When to use
21
21
 
22
- - "Diagrama del sistema", "C4 del workspace", "mapa de arquitectura".
23
- - "Diagrama de flujo" entre componentes / integraciones tocadas.
24
- - Onboarding técnico; antes de cambios estructurales (validar arquitectura vigente); auditoría técnica.
22
+ - "System diagram", "workspace C4", "architecture map".
23
+ - "Flow diagram" across touched components / integrations.
24
+ - Technical onboarding; before structural changes (validate the current architecture); technical audit.
25
25
 
26
26
  ## What it does
27
27
 
28
- 1. Inspecciona el código de las fuentes del workspace (estructura, wiring, integraciones, tecnologías).
29
- 2. Lee de las sesiones el plan-doc: `Current state (AS-IS)` / `Target state (TO-BE)` y `Impacted` (qué cambió y dónde).
30
- 3. (Opcional) Si MCP read-only está disponible y se pide modelo de datos: consulta esquemas BD (solo lectura).
31
- 4. Resuelve el motor (`--engine`) y consolida la arquitectura/flujos tocados por las N sesiones.
32
- 5. Renderiza los diagramas (compone `diagrams`): contexto, contenedores, componentes, integraciones, modelo de datos (si aplica).
33
- 6. Escribe el dossier en `docs/diagrams/NNN-export-diagrams-YYYY-MM-DD/` con un `README.md` (índice + cómo leer).
28
+ 1. Inspects the workspace sources' code (structure, wiring, integrations, technologies).
29
+ 2. Reads the plan-doc from the sessions: `Current state (AS-IS)` / `Target state (TO-BE)` and `Impacted` (what changed and where).
30
+ 3. (Optional) With read-only MCP available and a data-model request: queries DB schemas (reads only).
31
+ 4. Resolves the engine (`--engine`) and consolidates the architecture/flows touched by the N sessions.
32
+ 5. Renders the diagrams (composes `diagrams`): context, containers, components, integrations, data model (when it applies).
33
+ 6. Writes the dossier to `docs/diagrams/NNN-export-diagrams-YYYY-MM-DD/` with a `README.md` (index + how to read).
34
34
 
35
35
  ## What it does NOT do
36
36
 
37
- - Ejecutar commits, merges, push, ni SQL.
38
- - Mutar sesiones, el plan-doc ni el código (solo lectura). MCP **solo** lecturas read-only (nunca DML/DDL).
39
- - Escribir cualquier carpeta `docs/` que no sea `docs/diagrams/` (invariante: una categoría).
40
- - **Renderizar visualmente** el diagrama: emite solo el source (Mermaid / DSL); el render lo hace el lector con sus herramientas (o el link `mermaid.ink`).
41
- - Validar que las integraciones funcionen (eso es del doctor) ni inventar componentes ausentes.
42
- - Sobrescribir dossiers previos (siempre next-number).
37
+ - Run commits, merges, push, or SQL.
38
+ - Mutate sessions, the plan-doc or the code (read-only). MCP **reads only** (never DML/DDL).
39
+ - Write any `docs/` folder other than `docs/diagrams/` (invariant: one category).
40
+ - **Visually render** the diagram: it emits only the source (Mermaid / DSL); the reader renders with their tools (or the `mermaid.ink` link).
41
+ - Validate that the integrations work (that is doctor work) or invent absent components.
42
+ - Overwrite previous dossiers (always next-number).
43
43
 
44
44
  ## Read-only sandbox
45
45
 
46
- En plan mode **describe**, no escribe: el motor resuelto, los niveles/secciones que aparecerían (resueltos por args), las fuentes a inspeccionar + integraciones detectadas, ysi se pide modelo de datos las queries MCP propuestas con su costo estimado. **No** ejecuta `Write`, ni mutaciones MCP, ni `aw next-number` con efecto.
46
+ In plan mode it **describes**, never writes: the resolved engine, the levels/sections that would appear (resolved by args), the sources to inspect + detected integrations, andwith a data-model requestthe proposed MCP queries with their estimated cost. It does **not** run `Write`, MCP mutations, or effectful `aw next-number`.
47
47
 
48
48
  ## Inputs
49
49
 
50
- **CLI `agent-workflow` (alias `aw`)** — no leer paths hardcodeados:
50
+ **`agent-workflow` CLI (alias `aw`)** — never read hardcoded paths:
51
51
 
52
- - `aw sessions` / `aw release-data [--since sessionNNN] [--source <alias>]` — enumera el corpus (insumo del delta AS-IS/TO-BE).
53
- - `aw session-artifacts --code <NNN> --dump objetivo` — ubica la sesión y su referencia al plan-doc; `AS-IS`/`TO-BE`/`Impacted` se leen del plan-doc por su path.
54
- - `aw next-number docs/diagrams` — numeración determinística (la resolución de la carpeta destino la maneja el CLI).
52
+ - `aw sessions` / `aw release-data [--since sessionNNN] [--source <alias>]` — enumerates the corpus (input for the AS-IS/TO-BE delta).
53
+ - `aw session-artifacts --code <NNN> --dump objetivo` — locates the session and its plan-doc reference; `AS-IS`/`TO-BE`/`Impacted` are read from the plan-doc by its path.
54
+ - `aw next-number docs/diagrams` — deterministic numbering (the CLI handles destination-folder resolution).
55
55
 
56
- **Filesystem / código**:
56
+ **Filesystem / code**:
57
57
 
58
- - Código de las fuentes declaradas (estructura, wiring, manifests de tecnología).
59
- - `docs/diagrams/` existentes (para complementar / no colisionar).
58
+ - The declared sources' code (structure, wiring, technology manifests).
59
+ - Existing `docs/diagrams/` (to complement / avoid collisions).
60
60
 
61
- **MCP read-only** (opcional, solo si se pide modelo de datos y está configurado): `\d <tabla>`, `SELECT count(*)`, relaciones FK para el `erDiagram`. Con cost guard.
61
+ **Read-only MCP** (optional, only with a data-model request and configuration): `\d <table>`, `SELECT count(*)`, FK relations for the `erDiagram`. With the cost guard.
62
62
 
63
- **Args** (sin *structured-choice* de ciclo de vida capacidad del arnés; ver [`../../harness/SKILL.md`](../../harness/SKILL.md)):
63
+ **Args** (no lifecycle *structured-choice*; harness capabilitysee [`../../harness/SKILL.md`](../../harness/SKILL.md)):
64
64
 
65
65
  ```
66
66
  /w:export-diagrams [--sessions NNN[,NNN]] [--since sessionNNN] [--source <alias>]
67
67
  [--engine mermaid|c4] [--scope c4|integrations|data|todo] [--dry-run]
68
68
  ```
69
69
 
70
- | Flag | Comportamiento |
70
+ | Flag | Behavior |
71
71
  |---|---|
72
- | `--sessions NNN[,NNN]` | Filtro discreto por código (precede a `--since`); afecta el delta AS-IS/TO-BE |
73
- | `--since sessionNNN` | Solo sesiones posteriores a NNN (exclusivo: la propia NNN no entra; usá `--sessions` para incluirla) |
74
- | `--source <alias>` | Limita a una fuente (workspace multi-fuente) |
75
- | `--engine mermaid\|c4` | Default `mermaid` (render en GitHub); `c4` = Structurizr DSL opt-in |
76
- | `--scope` | Qué secciones aparecen: `c4` (contexto/contenedores/componentes), `integrations`, `data` (solo si MCP), `todo` (default) |
77
- | `--dry-run` | Reporte propositivo sin escribir archivos |
72
+ | `--sessions NNN[,NNN]` | Discrete filter by code (takes precedence over `--since`); affects the AS-IS/TO-BE delta |
73
+ | `--since sessionNNN` | Only sessions after NNN (exclusive: NNN itself is out; use `--sessions` to include it) |
74
+ | `--source <alias>` | Limits to one source (multi-source workspace) |
75
+ | `--engine mermaid\|c4` | Default `mermaid` (renders on GitHub); `c4` = opt-in Structurizr DSL |
76
+ | `--scope` | Which sections appear: `c4` (context/containers/components), `integrations`, `data` (only with MCP), `todo` (default: all) |
77
+ | `--dry-run` | Propositional report, no files written |
78
78
 
79
- Sin args: `--engine mermaid --scope todo`. El **snapshot** del sistema es siempre el último estado conocido; `--since`/`--sessions` modulan el énfasis del delta (qué se tocó), no el snapshot base. *(Si algún flag exacto difiere en el CLI runtime, ajustar al contrato real de `aw`.)*
79
+ No args: `--engine mermaid --scope todo`. The system **snapshot** is always the last known state; `--since`/`--sessions` modulate the delta emphasis (what was touched), not the base snapshot.
80
80
 
81
81
  ## Flow
82
82
 
83
- ### Paso 1 — Resolver contexto y corpus
83
+ ### Step 1 — Resolve context and corpus
84
84
 
85
- `aw sessions` / `release-data` aplicando `--sessions`/`--since`/`--source`. La resolución de la carpeta destino la maneja el CLI.
85
+ `aw sessions` / `release-data` applying `--sessions`/`--since`/`--source`. The CLI handles destination-folder resolution.
86
86
 
87
- ### Paso 2 — Inspeccionar las fuentes
87
+ ### Step 2 — Inspect the sources
88
88
 
89
- Por cada fuente: estructura básica, componentes internos (módulos, servicios, comandos, hooks, MCP configurado), tecnologías por manifest (`package.json`, `pom.xml`, …), integraciones externas.
89
+ Per source: basic structure, internal components (modules, services, commands, hooks, configured MCP), technologies per manifest (`package.json`, `pom.xml`, …), external integrations.
90
90
 
91
- ### Paso 3 — Leer el delta del corpus
91
+ ### Step 3 — Read the corpus delta
92
92
 
93
- Por sesión filtrada (`aw session-artifacts --code <NNN> --dump objetivo`): seguir la referencia al plan-doc y leer `Current state (AS-IS)` / `Target state (TO-BE)` e `Impacted`. Sirve para resaltar lo que cambió sobre el snapshot vigente.
93
+ Per filtered session (`aw session-artifacts --code <NNN> --dump objetivo`): follow the plan-doc reference and read `Current state (AS-IS)` / `Target state (TO-BE)` and `Impacted`. Used to highlight what changed over the current snapshot.
94
94
 
95
- ### Paso 4 — Inspeccionar MCP (opcional)
95
+ ### Step 4 — Inspect MCP (optional)
96
96
 
97
- Si `--scope` incluye `data` y hay MCP read-only: `\d <tabla>`, `count(*)`, relaciones FK (con cost guard). Si no disponible omitir la sección "Modelo de datos" con nota inline.
97
+ If `--scope` includes `data` and read-only MCP exists: `\d <table>`, `count(*)`, FK relations (with the cost guard). Not availableomit the "Data model" section with an inline note.
98
98
 
99
- ### Paso 5 — Renderizar (compone `diagrams`)
99
+ ### Step 5 — Render (composes `diagrams`)
100
100
 
101
- Según `--engine`: `mermaid` → bloques Mermaid C4 nativos (`C4Context`/`C4Container`/`C4Component`) y `flowchart` para flujos; `c4` → `workspace.dsl` Structurizr aparte + Mermaid auxiliar embebido para lectura offline. Por cada bloque ```` ```mermaid ````, agregar inmediatamente después del fence de cierre un blockquote con el link de preview: `> Ver diagrama renderizado: <https://mermaid.ink/img/BASE64>` (base64 URL-safe del código plano). No aplica a `workspace.dsl`.
101
+ Per `--engine`: `mermaid` → native Mermaid C4 blocks (`C4Context`/`C4Container`/`C4Component`) and `flowchart` for flows; `c4` → a separate Structurizr `workspace.dsl` + auxiliary embedded Mermaid for offline reading. For every ```` ```mermaid ```` block, add immediately after the closing fence a blockquote with the preview link: `> Ver diagrama renderizado: <https://mermaid.ink/img/BASE64>` (URL-safe base64 of the plain code). Not applicable to `workspace.dsl`.
102
102
 
103
- ### Paso 6 — Escribir o reportar
103
+ ### Step 6 — Write or report
104
104
 
105
- Si `--dry-run`: imprimir el reporte; no escribir. Si no: `aw next-number docs/diagrams` + escribir el dossier. **NUNCA commitear**. Resumen al usuario: motor, secciones presentes/omitidas (p.ej. Datos omitido si no MCP) y ruta.
105
+ With `--dry-run`: print the report; write nothing. Otherwise: `aw next-number docs/diagrams` + write the dossier. **NEVER commit**. Summary to the user: engine, present/omitted sections (e.g. Data omitted without MCP) and the path.
106
106
 
107
107
  ## Output location
108
108
 
109
109
  ```
110
110
  docs/diagrams/NNN-export-diagrams-YYYY-MM-DD/
111
- ├── README.md # índice + cómo leer + counts
112
- ├── diagrams.md # documento principal con Mermaid embebido (+ links mermaid.ink)
113
- └── workspace.dsl # solo con --engine c4 (Structurizr)
111
+ ├── README.md # index + how to read + counts
112
+ ├── diagrams.md # main document with embedded Mermaid (+ mermaid.ink links)
113
+ └── workspace.dsl # only with --engine c4 (Structurizr)
114
114
  ```
115
115
 
116
116
  ## Re-run
117
117
 
118
- Idempotente funcional: cada invocación toma el siguiente `NNN`; no sobrescribe dossiers previos. Para regenerar: borrar el directorio y re-invocar.
118
+ Functionally idempotent: each invocation takes the next `NNN`; it never overwrites previous dossiers. To regenerate: delete the directory and re-invoke.
119
119
 
120
120
  ## Resources
121
121
 
122
- - Design: `docs/referencias/workflow-exports/export-diagrams.md` · familia: [`../README.md`](../README.md).
123
- - Capacidad compuesta: `diagrams` (built-in default; ver `docs/referencias/workflow-roles/`).
124
- - Insumo: plan-doc `AS-IS`/`TO-BE`/`Impacted` (ver `docs/plans`).
122
+ - Design: `docs/referencias/workflow-exports/export-diagrams.md` · family: [`../README.md`](../README.md).
123
+ - Composed capability: `diagrams` (built-in default; see `docs/referencias/workflow-roles/`).
124
+ - Input: plan-doc `AS-IS`/`TO-BE`/`Impacted` (see `docs/plans`).
125
125
  - Siblings: [`../export-scripts/SKILL.md`](../export-scripts/SKILL.md) · [`../export-manuals/SKILL.md`](../export-manuals/SKILL.md) · [`../export-reports/SKILL.md`](../export-reports/SKILL.md).