pumuki 6.3.71 → 6.3.72

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 (33) hide show
  1. package/AGENTS.md +269 -0
  2. package/CHANGELOG.md +666 -0
  3. package/README.md +32 -0
  4. package/docs/README.md +7 -2
  5. package/docs/operations/RELEASE_NOTES.md +7 -0
  6. package/docs/product/USAGE.md +15 -2
  7. package/docs/tracking/plan-curso-pumuki-stack-my-architecture.md +111 -0
  8. package/integrations/git/GitService.ts +25 -0
  9. package/integrations/git/runPlatformGateFacts.ts +7 -0
  10. package/integrations/mcp/preFlightCheck.ts +2 -1
  11. package/integrations/sdd/openSpecCli.ts +12 -3
  12. package/package.json +4 -1
  13. package/scripts/consumer-menu-matrix-baseline-report-lib.ts +13 -38
  14. package/scripts/framework-menu-consumer-actions-lib.ts +28 -4
  15. package/scripts/framework-menu-consumer-preflight-hints.ts +5 -2
  16. package/scripts/framework-menu-consumer-runtime-actions.ts +86 -6
  17. package/scripts/framework-menu-consumer-runtime-audit.ts +36 -2
  18. package/scripts/framework-menu-consumer-runtime-evidence-classic.ts +140 -0
  19. package/scripts/framework-menu-consumer-runtime-lib.ts +2 -0
  20. package/scripts/framework-menu-consumer-runtime-types.ts +3 -1
  21. package/scripts/framework-menu-evidence-summary-lib.ts +1 -0
  22. package/scripts/framework-menu-evidence-summary-read.ts +57 -5
  23. package/scripts/framework-menu-evidence-summary-severity.ts +3 -1
  24. package/scripts/framework-menu-evidence-summary-types.ts +7 -0
  25. package/scripts/framework-menu-gate-lib.ts +9 -0
  26. package/scripts/framework-menu-layout-data.ts +5 -0
  27. package/scripts/framework-menu-matrix-baseline-lib.ts +15 -14
  28. package/scripts/framework-menu-matrix-canary-lib.ts +22 -1
  29. package/scripts/framework-menu-matrix-evidence-lib.ts +1 -0
  30. package/scripts/framework-menu-matrix-evidence-types.ts +13 -1
  31. package/scripts/framework-menu-matrix-runner-lib.ts +35 -0
  32. package/scripts/framework-menu-system-notifications-macos.ts +4 -0
  33. package/scripts/framework-menu.ts +3 -0
package/README.md CHANGED
@@ -12,6 +12,12 @@ Pumuki gives engineering teams one deterministic execution model across local de
12
12
 
13
13
  `Facts -> Rules -> Gate -> .ai_evidence.json (v2.1)`
14
14
 
15
+ ## Qué NO es Pumuki
16
+
17
+ - **No** es el producto de negocio de tu repositorio (la app, el marketplace, el servicio que entregas a usuarios): es **gobernanza y contrato de entrega** sobre el código.
18
+ - **No** sustituye tests de dominio, contratos de API ni E2E: el gate ayuda a **cumplir políticas y evidencias**; la calidad funcional la define tu equipo con pruebas y criterios de aceptación.
19
+ - **No** garantiza por sí solo “un producto excelente”: sin reglas de equipo, revisión humana y criterios claros, solo obtienes **cumplimiento de lo que configuraste**.
20
+
15
21
  ## Who This README Is For
16
22
 
17
23
  | Profile | Use this path first |
@@ -20,6 +26,32 @@ Pumuki gives engineering teams one deterministic execution model across local de
20
26
  | Framework maintainers (this repo) | [Framework Maintainer Flow](#framework-maintainer-flow-this-repo) |
21
27
  | Platform/architecture owners | [Enterprise Operations Baseline](#enterprise-operations-baseline) |
22
28
 
29
+ ## Rutas de adopción
30
+
31
+ Elige un perfil y profundiza en los enlaces; **no** repite aquí reglas largas (skills, GitFlow, políticas) — están en `AGENTS.md` y en la documentación enlazada.
32
+
33
+ | Perfil | Qué instalar / arrancar | Stages habituales | Opcional típico |
34
+ |--------|-------------------------|-------------------|-----------------|
35
+ | **Mínimo** | `npm install --save-exact pumuki` (en repos Git el `postinstall` puede ejecutar `pumuki install` para hooks y lifecycle). | Hooks Git: **PRE_COMMIT**, **PRE_PUSH**; cadena **PRE_WRITE** cuando el hook lo encadena (según versión y config). | Evidencia [`.ai_evidence.json` v2.1](docs/mcp/ai-evidence-v2.1-contract.md); reglas core embebidas. |
36
+ | **Estándar** | Lo anterior + flujo **OpenSpec/SDD** bajo `openspec/` según tu política. | Lo anterior + validación SDD por stage (`pumuki sdd validate --stage=…`). | Sesiones SDD, cambios versionados bajo `openspec/changes/`. |
37
+ | **Enterprise completo** | `pumuki bootstrap --enterprise` (o equivalente documentado) + `skills.lock.json` / reglas custom / [policy-as-code](docs/product/CONFIGURATION.md) donde aplique. | Lo anterior + **CI** (`pumuki-ci`) y comprobaciones de alineación (`doctor`, parity). | [Skills / MCP](docs/mcp/mcp-servers-overview.md), `pumuki doctor --parity`, notificaciones, [hard mode](docs/product/CONFIGURATION.md). |
38
+
39
+ Referencias canónicas (profundizar aquí): [Instalación](docs/product/INSTALLATION.md), [Uso y gates](docs/product/USAGE.md), [Configuración](docs/product/CONFIGURATION.md), [AGENTS.md](AGENTS.md) (contrato agentes/skills/GitFlow en repos que lo adopten), [índice de documentación](docs/README.md).
40
+
41
+ Formación opcional (curso **Pumuki** dentro del hub *Stack My Architecture*): [https://stack-my-architecture-hub.vercel.app/pumuki/](https://stack-my-architecture-hub.vercel.app/pumuki/) · seguimiento de la iniciativa en [docs/tracking/plan-curso-pumuki-stack-my-architecture.md](docs/tracking/plan-curso-pumuki-stack-my-architecture.md).
42
+
43
+ ## Comandos esenciales
44
+
45
+ Cinco entradas que cubren el 80 % del día a día en un consumidor; el detalle está en los enlaces.
46
+
47
+ 1. **`npx pumuki doctor --json`** — Versión efectiva, drift, lifecycle, parity y avisos (p. ej. `pathExecutionHazard`). Detalle: [API_REFERENCE](docs/product/API_REFERENCE.md), [USAGE](docs/product/USAGE.md).
48
+ 2. **`npx pumuki status --json`** — Estado resumido del menú/lifecycle y alineación de versión. Detalle: [USAGE](docs/product/USAGE.md).
49
+ 3. **`npx pumuki install`** (o deja que el `postinstall` lo ejecute en Git) — Hooks y lifecycle en el repo. Detalle: [INSTALLATION](docs/product/INSTALLATION.md).
50
+ 4. **Gates locales** — `npx pumuki-pre-write`, `npx pumuki-pre-commit` (y `pumuki-pre-push` cuando toque push). Detalle: [USAGE](docs/product/USAGE.md), [Troubleshooting (USAGE)](docs/product/USAGE.md#troubleshooting).
51
+ 5. **SDD por stage (enterprise)** — `npx pumuki sdd validate --stage=PRE_COMMIT` (u otro stage). Detalle: [USAGE](docs/product/USAGE.md), [INSTALLATION](docs/product/INSTALLATION.md#troubleshooting) si falla el bootstrap.
52
+
53
+ Si algo bloquea o el mensaje no es claro: [Troubleshooting](#troubleshooting) (más abajo en este README), [USAGE § Troubleshooting](docs/product/USAGE.md#troubleshooting) y [GitHub Issues](https://github.com/SwiftEnProfundidad/ast-intelligence-hooks/issues).
54
+
23
55
  ## 5-Minute Quick Start (Consumer)
24
56
 
25
57
  Prerequisites:
package/docs/README.md CHANGED
@@ -4,6 +4,8 @@ Mapa corto y humano de la documentación oficial de Pumuki.
4
4
 
5
5
  ## Si buscas algo concreto
6
6
 
7
+ - Quiero límites del producto, perfil de adopción y comandos mínimos (sin leer todo el README largo):
8
+ - `README.md` (secciones **Qué NO es Pumuki**, **Rutas de adopción**, **Comandos esenciales**)
7
9
  - Quiero instalar y arrancar Pumuki en un repo consumidor:
8
10
  - `README.md`
9
11
  - `docs/product/INSTALLATION.md`
@@ -35,6 +37,8 @@ Mapa corto y humano de la documentación oficial de Pumuki.
35
37
 
36
38
  - Quiero saber en qué estamos ahora:
37
39
  - `docs/tracking/plan-activo-de-trabajo.md`
40
+ - Quiero el seguimiento del curso Stack My Architecture (Pumuki), iniciativa formativa aparte del espejo operativo:
41
+ - `docs/tracking/plan-curso-pumuki-stack-my-architecture.md`
38
42
 
39
43
  ## Estructura oficial
40
44
 
@@ -62,8 +66,9 @@ Mapa corto y humano de la documentación oficial de Pumuki.
62
66
 
63
67
  - `docs/tracking/`
64
68
  - Seguimiento permitido y solo el imprescindible.
65
- - Unica fuente de verdad: `docs/tracking/plan-activo-de-trabajo.md`
66
- - Regla hard: solo puede existir una tarea `🚧` en el plan activo.
69
+ - Espejo operativo de producto y consumidores: `docs/tracking/plan-activo-de-trabajo.md` (unica fuente de verdad para ese ambito).
70
+ - Curso Pumuki (Stack My Architecture): diseño pedagógico + seguimiento de entrega en `docs/tracking/plan-curso-pumuki-stack-my-architecture.md` (no sustituye al plan activo).
71
+ - Regla hard: solo puede existir una tarea `🚧` en cada documento de seguimiento que lo use.
67
72
 
68
73
  ## Fuera de `docs/`
69
74
 
@@ -6,6 +6,13 @@ This file keeps only the operational highlights and rollout notes that matter wh
6
6
 
7
7
  ## 2026-04 (CLI stability and macOS notifications)
8
8
 
9
+ ### 2026-04-11 (v6.3.72)
10
+
11
+ - **Tarball npm**: `package.json` → `files` incluye `AGENTS.md`, `CHANGELOG.md` y `docs/tracking/plan-curso-pumuki-stack-my-architecture.md` para lectura canónica vía npm / jsDelivr sin depender solo del repo Git.
12
+ - **`gate.blocked` (macOS)**: banner de Notification Center **y** modal por defecto (evita cero notificaciones si el modal no llega a mostrarse desde un hook); dedupe opcional: `PUMUKI_MACOS_GATE_BLOCKED_BANNER_DEDUPE=1`.
13
+ - **Menú / matriz consumer**: opciones motor `11–14`, matriz baseline alineada, vista classic opcional, etc. (ver `CHANGELOG.md`).
14
+ - **Rollout**: `pumuki@6.3.72`; `pumuki doctor --json` + repin en consumidores (p. ej. RuralGO).
15
+
9
16
  ### 2026-04-06 (v6.3.71)
10
17
 
11
18
  - **Evidencia v2.1**: bloque `operational_hints` (`requires_second_pass`, resumen operativo, desglose por severidad de reglas). Alineado con PRE_COMMIT solo-docs + evidencia trackeada (INC-069) cuando no se re-stagea el JSON automáticamente.
@@ -14,6 +14,11 @@ Production operations baseline (SLA/SLO, incident response and alerting):
14
14
  Visual walkthrough for menu Option 1 captures:
15
15
  - `docs/operations/framework-menu-consumer-walkthrough.md`
16
16
 
17
+ Stack My Architecture (optional training hub; includes the dedicated Pumuki course):
18
+
19
+ - Public static site: `https://stack-my-architecture-hub.vercel.app/pumuki/`
20
+ - Initiative tracking in this repo: `docs/tracking/plan-curso-pumuki-stack-my-architecture.md`
21
+
17
22
  ## Prerequisites
18
23
 
19
24
  - Node.js `>=18`
@@ -72,6 +77,8 @@ Platform activation:
72
77
 
73
78
  Pumuki enforces OpenSpec policy/session before allowing normal gate execution.
74
79
 
80
+ OpenSpec CLI resolution is **repo-local only**: Pumuki runs `openspec` from **`node_modules/.bin`** in the repository under check. A binary named `openspec` elsewhere on your **`PATH`** (global install, another tool) is **not** used. Add **`@fission-ai/openspec`** to the consumer project (for example via `pumuki install` / `bootstrap`) so laptops and CI behave the same; otherwise you may see **`OPENSPEC_MISSING`** even when `openspec --version` succeeds in an interactive shell.
81
+
75
82
  Minimal daily flow:
76
83
 
77
84
  ```bash
@@ -123,7 +130,10 @@ Use `A` to switch to `Advanced` mode (full options), and `C` to return to `Consu
123
130
  Advanced mode options include short inline contextual help.
124
131
  Consumer mode is now a minimal read-only shell:
125
132
 
126
- - `1/2/3/4` are the canonical read-only gate flows
133
+ - `1/2/3/4` are the canonical gate flows with **consumer preflight** before evaluation (labels state scope and PRE_COMMIT vs PRE_PUSH).
134
+ - `11/12/13/14` run the **engine** with **no preflight**: staged only, unstaged only (index→working tree + untracked), full working tree under **PRE_COMMIT**, or **all tracked files** (full repo). They write `.ai_evidence.json` on **PRE_COMMIT** engine runs like other menu audits.
135
+ - After each successful evidence read, the menu prints a **second panel** (“Classic evidence view”) with **ANSI-colored** enterprise/legacy severity counts, optional **platform** rows from `snapshot.platforms`, and a longer ranked violation list. Disable with `PUMUKI_MENU_VINTAGE_REPORT=0`.
136
+ - Options **2** and **4** (PRE_PUSH): if outcome is **PASS** or **WARN**, a short hint explains that a **tracked** `.ai_evidence.json` may **not** be rewritten on disk; use `PUMUKI_PRE_PUSH_ALWAYS_WRITE_TRACKED_EVIDENCE=1` for local debugging.
127
137
  - `8` exports the same evidence snapshot in markdown form
128
138
  - `5/6/7/9` remain available only as `Legacy Read-Only Diagnostics`
129
139
 
@@ -242,7 +252,7 @@ Stage mapping:
242
252
  If a scope is empty, the menu prints an explicit operational hint (`Scope vacío`), so `PASS` with zero findings is distinguishable from a clean repository scan.
243
253
 
244
254
  System notifications (macOS) can be enabled from advanced menu option `31` (persisted in `.pumuki/system-notifications.json`).
245
- On non-macOS platforms, the same payloads are written to **stderr** by default (visible in the terminal) because there is no native banner API. Set `PUMUKI_DISABLE_STDERR_NOTIFICATIONS=1` to silence that path (delivery reports `unsupported-platform` on those OSes). On macOS, set `PUMUKI_NOTIFICATION_STDERR_MIRROR=1` to duplicate **any** notification payload to stderr in addition to the system notification. For **`gate.blocked`** specifically, stderr mirroring is **on by default** when the macOS path reports success (so a failed push/commit still prints a `[pumuki]` block in the terminal even if the banner does not appear); disable only that default with `PUMUKI_DISABLE_GATE_BLOCKED_STDERR_MIRROR=1`. The **blocked modal** (Swift floating / AppleScript) with **Desactivar / Silenciar 30 min / Mantener activas** is **on by default** whenever notifications are enabled and `blockedDialogEnabled` is omitted in `.pumuki/system-notifications.json`. Turn it off with `"blockedDialogEnabled": false` or `PUMUKI_MACOS_BLOCKED_DIALOG=0`. Ensure the terminal app is allowed to show notifications in **System Settings → Notifications**.
255
+ On non-macOS platforms, the same payloads are written to **stderr** by default (visible in the terminal) because there is no native banner API. Set `PUMUKI_DISABLE_STDERR_NOTIFICATIONS=1` to silence that path (delivery reports `unsupported-platform` on those OSes). On macOS, set `PUMUKI_NOTIFICATION_STDERR_MIRROR=1` to duplicate **any** notification payload to stderr in addition to the system notification. For **`gate.blocked`** specifically, stderr mirroring is **on by default** when the macOS path reports success (so a failed push/commit still prints a `[pumuki]` block in the terminal even if the banner does not appear); disable only that default with `PUMUKI_DISABLE_GATE_BLOCKED_STDERR_MIRROR=1`. The **blocked modal** (Swift floating / AppleScript) with **Desactivar / Silenciar 30 min / Mantener activas** is **on by default** whenever notifications are enabled and `blockedDialogEnabled` is omitted in `.pumuki/system-notifications.json`. Turn it off with `"blockedDialogEnabled": false` or `PUMUKI_MACOS_BLOCKED_DIALOG=0`. **`gate.blocked`** now emits **both** the Notification Center banner (`osascript`) **and** the interactive modal by default, so consumers (e.g. hooks in other repos) still get a visible banner if the modal cannot attach to a GUI session. To restore the previous “modal only” behaviour and suppress the duplicate banner, set `PUMUKI_MACOS_GATE_BLOCKED_BANNER_DEDUPE=1`. If you see **no** notifications at all: confirm `PUMUKI_DISABLE_SYSTEM_NOTIFICATIONS` is unset, delete or fix `.pumuki/system-notifications.json` (absent file defaults to enabled), and ensure the terminal app is allowed to show notifications in **System Settings → Notifications**.
246
256
  Blocked notifications now use a native Swift floating modal (bottom-right) by default, with AppleScript fallback.
247
257
  Override mode with `PUMUKI_MACOS_BLOCKED_DIALOG_MODE=auto|swift-floating|applescript`.
248
258
  Custom skills import is available in advanced menu option `33` (writes `/.pumuki/custom-rules.json`).
@@ -565,6 +575,7 @@ npx --yes tsx@4.21.0 scripts/reconcile-consumer-backlog-issues.ts \
565
575
 
566
576
  OpenSpec integration behavior:
567
577
  - `pumuki bootstrap --enterprise --agent=<name>` orquesta `install + adapter wiring + doctor --deep` en un solo paso.
578
+ - SDD/OpenSpec enforcement invokes the CLI only from **`{repo}/node_modules/.bin/openspec`** (no fallback to a generic `openspec` on `PATH`).
568
579
  - `pumuki install` auto-bootstraps OpenSpec (`@fission-ai/openspec`) when missing/incompatible and scaffolds `openspec/` project baseline when absent.
569
580
  - `pumuki install --with-mcp` adds adapter/MCP wiring bootstrap and prints MCP health summary on completion.
570
581
  - `pumuki update --latest` migrates legacy `openspec` package to `@fission-ai/openspec` before hook reinstall.
@@ -806,6 +817,8 @@ npx --yes pumuki sdd status
806
817
  npx --yes pumuki sdd validate --stage=PRE_COMMIT
807
818
  ```
808
819
 
820
+ If the gate reports **`OPENSPEC_MISSING`** but `openspec --version` works in the terminal, you are likely using a **global** OpenSpec install. Pumuki does not use that path; install the package in the repo (`npm install`, `pumuki install`, or `pumuki bootstrap`) so `node_modules/.bin/openspec` exists.
821
+
809
822
  Open or refresh session if needed:
810
823
 
811
824
  ```bash
@@ -0,0 +1,111 @@
1
+ # Diseño pedagógico y seguimiento — Curso Pumuki (Stack My Architecture)
2
+
3
+ Este documento define **qué debe aprender una persona**, **en qué orden**, **cómo se comprueba** y **qué confusiones hay que romper**. El seguimiento de repos y build va **al final**; no sustituye el diseño.
4
+
5
+ No sustituye el espejo de producto en [`plan-activo-de-trabajo.md`](./plan-activo-de-trabajo.md).
6
+
7
+ ## Leyenda operativa
8
+
9
+ - ✅ Entregado en repo curso + coherente con USAGE/INSTALLATION
10
+ - 🚧 Única tarea activa (máx. 1)
11
+ - ⏳ Pendiente
12
+ - ⛔ Bloqueado
13
+
14
+ ---
15
+
16
+ ## 1. Para quién es y qué problema resuelve
17
+
18
+ **Quién:** desarrollador o tech lead que debe **vivir** con hooks, CI y (a veces) agentes; no auditor de slides.
19
+
20
+ **Problema:** en la práctica mezcla *SDD*, *gate*, *MCP*, *evidencia* y *menú*; cuando algo bloquea no sabe **qué capa** falló ni **qué comando** la inspecciona.
21
+
22
+ **Éxito del curso:** tras cerrarlo, en un repo real puede (1) nombrar el **stage** y el **scope** de un fallo, (2) leer **`.ai_evidence.json`** y relacionarlo con stderr, (3) distinguir **enforcement** (hooks/CI) de **lectura/agente** (MCP), (4) ejecutar el **flujo SDD mínimo** sin confundirlo con “arreglar reglas”, (5) instalar, actualizar o **retirar** Pumuki sin dejar hooks huérfanos.
23
+
24
+ Si eso no se cumple, el curso falla aunque el HTML sea bonito.
25
+
26
+ ---
27
+
28
+ ## 2. Modelo mental único (todo el curso orbita aquí)
29
+
30
+ Una sola frase que el alumno debe poder repetir:
31
+
32
+ **Hechos del diff/código → reglas efectivas → decisión del gate por stage → registro en evidencia v2.1.**
33
+
34
+ Todo lo demás (menú, MCP, notificaciones, `doctor`) es **acceso** a ese mismo pipeline o **comodidad**; no es un segundo producto.
35
+
36
+ ---
37
+
38
+ ## 3. Confusiones que el material debe desmontar de forma explícita
39
+
40
+ Cada unidad del curso debe tener al menos un párrafo “**no confundas**” o un mini escenario:
41
+
42
+ | Confusión típica | Verdad operativa |
43
+ |------------------|------------------|
44
+ | “Sin MCP no hay Pumuki” | Los **hooks y CI** son el enforcement; MCP es **opcional** para IDE/agente. |
45
+ | “SDD es lo mismo que el gate” | SDD/OpenSpec gobierna el **cambio**; el gate evalúa **código + política + evidencia** en un **scope** concreto. |
46
+ | “`openspec` en el PATH basta” | Pumuki usa OpenSpec **repo-local** (`node_modules/.bin`). |
47
+ | “PRE_COMMIT limpio ⇒ push seguro” | **PRE_PUSH** mira otro **scope** (`upstream..HEAD`). |
48
+ | “El menú es la fuente de verdad” | El menú **orquesta** diagnósticos; la fuente de verdad es **policy + stage + evidencia**. |
49
+ | “Borrar el paquete limpia el repo” | `npm uninstall pumuki` **no** quita hooks/lifecycle; hace falta **`pumuki remove`** / flujo documentado. |
50
+
51
+ Si el Markdown del curso no nombra estas líneas, el plan pedagógico sigue vacío aunque haya tablas de check.
52
+
53
+ ---
54
+
55
+ ## 4. Secuencia didáctica (orden de primera lectura)
56
+
57
+ El repo del curso incluye la **columna vertebral en prosa** `00-preparacion/03-recorrido-cero-a-cien-pumuki.md` (0→100 % sin saltos) y el **proyecto guiado** `02-modulos/13-proyecto-guiado-de-la-a-la-z.md` (fases A–M con criterios de hecho). Esta tabla U0–U10 sigue siendo el contrato de **outcomes**; esas piezas son el **relato** y el **laboratorio** que los materializan.
58
+
59
+ El **mapa completo** (`00-mapa-completo-del-producto.md`) es **referencia** para quien ya perdió el hilo; la **primera pasada** debe seguir esta secuencia para no cargar conceptos antes de tiempo.
60
+
61
+ | Orden | Unidad | Objetivo observable (el alumno demuestra…) | Actividad mínima en lab | Criterio de dominio |
62
+ |-------|--------|---------------------------------------------|-------------------------|----------------------|
63
+ | U0 | Preparación + versión + lab | Que existe documentación canónica y un repo donde ensayar | Abrir USAGE e INSTALLATION; fijar versión mínima `pumuki` | Explica en una frase dónde miente un “funciona en mi máquina” sin `doctor` |
64
+ | U1 | Contrato + stages + cobertura | Qué pregunta **cada** stage y qué es `unevaluated_rule_ids` | Un `pre-commit` / `pre-push` y leer evidencia | Predice scope antes de ejecutar y acierta al comparar con JSON |
65
+ | U2 | Instalación y primer verde | Postinstall, `bootstrap` vs `install`, `pathExecutionHazard` | `doctor --json` antes/después de un cambio reversible | Usa `alignmentCommand` o workaround sin improvisar |
66
+ | U3 | Ciclo de vida completo | Diferencia `npm uninstall`, `pumuki uninstall`, `pumuki remove`, `update --latest` | Simular retirada en rama de prueba | Lista qué queda en disco tras cada comando |
67
+ | U4 | Evidencia | Dónde se escribe, cuándo **no** se reescribe (PRE_PUSH trackeado), restage PRE_COMMIT | Diff de `.ai_evidence.json` entre stages | Explica un caso “hook modificó archivo” sin pánico |
68
+ | U5 | Menú interactivo | Consumer vs Advanced; 1–4/8/9; matrix; variables UI | Correr `pumuki-framework` y una opción de cada familia | Enlaza opción de menú con **stage** y **scope** equivalentes |
69
+ | U6 | MCP | Evidence vs enterprise; HTTP vs stdio; recibo PRE_WRITE | Levantar o inspeccionar config en `.pumuki/adapter.json` | Explica por qué el gate puede pasar con MCP caído |
70
+ | U7 | SDD/OpenSpec | Flujo diario: `sdd status`, `session`, `validate`; catálogo de códigos | Abrir sesión de cambio y validar un stage | Clasifica un JSON de bloqueo en “falta OpenSpec” vs “falta sesión” |
71
+ | U8 | Notificaciones y watch | macOS vs stderr; `system-notifications.json`; anti-spam de `watch` | Una sesión `watch --once` o documentada | Elige variable correcta para silenciar o espejar |
72
+ | U9 | Perfiles, Governance, monorepo | Cuándo bajar de enterprise; prefijos de scope; parity | (Según perfil del equipo) | Justifica un perfil sin autoboicot |
73
+ | U10 | Cierre | Checklist operativa propia del equipo | Checklist escrita a partir del curso | Puede enseñar el modelo mental §2 a otra persona en 3 minutos |
74
+
75
+ **Regla:** ninguna fila U1–U10 puede considerarse “hecha” solo con un enlace a USAGE; debe existir **narrativa + comando + actividad + criterio** en el Markdown del curso.
76
+
77
+ ---
78
+
79
+ ## 5. Qué el curso no debe intentar (límites)
80
+
81
+ - Sustituir el curso **SDD** (OpenSpec, Kanban del cambio) ni el **Governance** (AGENTS, cultura): solo **enganchar** Pumuki a ellos.
82
+ - Sustituir tests de producto, revisión humana ni criterios de negocio.
83
+ - Prometer “cero lectura de USAGE”: USAGE sigue siendo norma; el curso debe **enseñar** lo mismo con **menor fricción**, no duplicar mal.
84
+
85
+ ---
86
+
87
+ ## 6. Estado de entrega en el repo (operativo, subordinado al §4)
88
+
89
+ | Unidad §4 | Estado en `stack-my-architecture-pumuki` |
90
+ |-----------|-------------------------------------------|
91
+ | U0–U2 | ✅ Base + módulo 2; ciclo de vida **completo** en **08** |
92
+ | U3 | ✅ `02-modulos/08-ciclo-de-vida-install-uninstall-actualizacion.md` |
93
+ | U4 | ✅ `02-modulos/09-evidencia-por-stage-y-ai-evidence-json.md` |
94
+ | U5 | ✅ `02-modulos/10-menu-interactivo-matrix-y-preflight.md` |
95
+ | U6 | ✅ `02-modulos/11-mcp-enforcement-vs-lectura-agente.md` |
96
+ | U7 | ✅ Módulo **04** ampliado (§4.6–4.8 + criterio dominio) |
97
+ | U8 | ✅ `02-modulos/12-notificaciones-macos-stderr-y-watch.md` |
98
+ | U9–U10 | ✅ Revisar checklist **07** frente a criterios §4 en próxima iteración |
99
+
100
+ | Task | Estado |
101
+ |------|--------|
102
+ | Implementar U3–U8 en `.md` + `FILE_ORDER` + validación | ✅ |
103
+ | CHANGELOG curso + rebuild HTML + sync hub local | ✅ (incl. CSS lectura **0.3.1**) |
104
+ | Push hub + deploy Vercel (ver curso en prod) | 🚧 |
105
+
106
+ ---
107
+
108
+ ## 7. Auditoría técnica (no confundir con evaluación del alumno)
109
+
110
+ - `python3 scripts/validate-course-structure.py` y `check-links.py` en repo curso.
111
+ - Publicación hub según tu script; URL `/pumuki/` 200.
@@ -9,6 +9,7 @@ export { parseNameStatus } from './gitDiffUtils';
9
9
  export interface IGitService {
10
10
  runGit(args: ReadonlyArray<string>, cwd?: string): string;
11
11
  getStagedFacts(extensions: ReadonlyArray<string>): ReadonlyArray<Fact>;
12
+ getUnstagedFacts(extensions: ReadonlyArray<string>): ReadonlyArray<Fact>;
12
13
  getRepoFacts(extensions: ReadonlyArray<string>): ReadonlyArray<Fact>;
13
14
  getRepoAndStagedFacts(extensions: ReadonlyArray<string>): ReadonlyArray<Fact>;
14
15
  getStagedAndUnstagedFacts(extensions: ReadonlyArray<string>): ReadonlyArray<Fact>;
@@ -44,6 +45,30 @@ export class GitService implements IGitService {
44
45
  );
45
46
  }
46
47
 
48
+ getUnstagedFacts(extensions: ReadonlyArray<string>): ReadonlyArray<Fact> {
49
+ const nameStatus = this.runGit(['diff', '--name-status']);
50
+ const changes = parseNameStatus(nameStatus).filter((change) =>
51
+ hasAllowedExtension(change.path, extensions)
52
+ );
53
+ const untrackedPaths = this.runGit(['ls-files', '--others', '--exclude-standard'])
54
+ .split('\n')
55
+ .map((line) => line.trim())
56
+ .filter((line) => line.length > 0)
57
+ .filter((path) => hasAllowedExtension(path, extensions));
58
+ const unstagedPaths = new Set(changes.map((change) => change.path));
59
+ const untrackedChanges = untrackedPaths
60
+ .filter((path) => !unstagedPaths.has(path))
61
+ .map((path) => ({
62
+ path,
63
+ changeType: 'added' as const,
64
+ }));
65
+ const mergedChanges = [...changes, ...untrackedChanges];
66
+ const repoRoot = this.resolveRepoRoot();
67
+ return buildFactsFromChanges(mergedChanges, 'git:unstaged', (filePath) =>
68
+ this.readWorkingTreeFile(repoRoot, filePath)
69
+ );
70
+ }
71
+
47
72
  getRepoFacts(extensions: ReadonlyArray<string>): ReadonlyArray<Fact> {
48
73
  const trackedFiles = this.runGit(['ls-files'])
49
74
  .split('\n')
@@ -19,6 +19,10 @@ export type GateScope =
19
19
  kind: 'workingTree';
20
20
  extensions?: string[];
21
21
  }
22
+ | {
23
+ kind: 'unstaged';
24
+ extensions?: string[];
25
+ }
22
26
  | {
23
27
  kind: 'range';
24
28
  fromRef: string;
@@ -66,6 +70,9 @@ export const resolveFactsForGateScope = async (params: {
66
70
  if (params.scope.kind === 'workingTree') {
67
71
  return params.git.getStagedAndUnstagedFacts(extensions);
68
72
  }
73
+ if (params.scope.kind === 'unstaged') {
74
+ return params.git.getUnstagedFacts(extensions);
75
+ }
69
76
 
70
77
  return getFactsForCommitRange({
71
78
  fromRef: params.scope.fromRef,
@@ -4,7 +4,8 @@ import { resolveLearningContextExperimentalFeature } from '../policy/experimenta
4
4
  import { readSddLearningContext, type SddLearningContext } from '../sdd/learningInsights';
5
5
 
6
6
  const ACTIONABLE_HINTS_BY_CODE: Readonly<Record<string, string>> = {
7
- EVIDENCE_MISSING: 'Ejecuta una auditoría (1/2/3/4) para regenerar .ai_evidence.json.',
7
+ EVIDENCE_MISSING:
8
+ 'Ejecuta una auditoría (1/2/3/4 u opciones de motor 11–14) para regenerar .ai_evidence.json.',
8
9
  EVIDENCE_INVALID: 'Regenera .ai_evidence.json desde una opción de auditoría.',
9
10
  EVIDENCE_INTEGRITY_MISSING: 'Refresca evidencia para regenerar metadatos de integridad.',
10
11
  EVIDENCE_ACTIVE_RULE_IDS_EMPTY_FOR_CODE_CHANGES:
@@ -17,20 +17,29 @@ type OpenSpecCommandResult = {
17
17
  stderr: string;
18
18
  };
19
19
 
20
- const resolveOpenSpecBinary = (repoRoot: string): string => {
20
+ const resolveOpenSpecBinary = (repoRoot: string): string | undefined => {
21
21
  const binaryName = process.platform === 'win32' ? 'openspec.cmd' : 'openspec';
22
22
  const localBinaryPath = join(repoRoot, 'node_modules', '.bin', binaryName);
23
23
  if (existsSync(localBinaryPath)) {
24
24
  return localBinaryPath;
25
25
  }
26
- return 'openspec';
26
+ return undefined;
27
27
  };
28
28
 
29
29
  const runOpenSpecCommand = (
30
30
  args: ReadonlyArray<string>,
31
31
  cwd: string
32
32
  ): OpenSpecCommandResult => {
33
- const result = runSpawnSync(resolveOpenSpecBinary(cwd), [...args], {
33
+ const binary = resolveOpenSpecBinary(cwd);
34
+ if (!binary) {
35
+ return {
36
+ exitCode: 127,
37
+ stdout: '',
38
+ stderr:
39
+ 'OpenSpec CLI not found under repo node_modules/.bin (add @fission-ai/openspec to this repository).',
40
+ };
41
+ }
42
+ const result = runSpawnSync(binary, [...args], {
34
43
  cwd,
35
44
  encoding: 'utf8',
36
45
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pumuki",
3
- "version": "6.3.71",
3
+ "version": "6.3.72",
4
4
  "description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -259,10 +259,13 @@
259
259
  "docs/product/*.md",
260
260
  "docs/rule-packs/*.md",
261
261
  "docs/validation/*.md",
262
+ "docs/tracking/plan-curso-pumuki-stack-my-architecture.md",
262
263
  "assets/**/*",
263
264
  "vendor/skills/**/*",
264
265
  "index.js",
265
266
  "README.md",
267
+ "AGENTS.md",
268
+ "CHANGELOG.md",
266
269
  "LICENSE",
267
270
  "VERSION",
268
271
  "tsconfig.json",
@@ -4,10 +4,11 @@ import type {
4
4
  ConsumerMenuMatrixReport,
5
5
  MatrixOptionId,
6
6
  } from './framework-menu-matrix-baseline-lib';
7
+ import { MATRIX_MENU_OPTION_IDS } from './framework-menu-matrix-evidence-lib';
7
8
  import type { DoctorDeepCheckLayer, LifecycleDoctorReport } from '../integrations/lifecycle/doctor';
8
9
  import type { LifecycleStatus } from '../integrations/lifecycle/status';
9
10
 
10
- const OPTION_IDS: ReadonlyArray<MatrixOptionId> = ['1', '2', '3', '4', '9'];
11
+ const OPTION_IDS: ReadonlyArray<MatrixOptionId> = [...MATRIX_MENU_OPTION_IDS];
11
12
  const DOCTOR_LAYERS: ReadonlyArray<DoctorDeepCheckLayer> = [
12
13
  'core',
13
14
  'operational',
@@ -51,45 +52,19 @@ export type ConsumerMenuMatrixBaselineSnapshot = {
51
52
  };
52
53
  };
53
54
 
55
+ const UNKNOWN_OPTION_REPORT = {
56
+ stage: 'UNKNOWN',
57
+ outcome: 'UNKNOWN',
58
+ filesScanned: 0,
59
+ totalViolations: 0,
60
+ diagnosis: 'unknown' as const,
61
+ };
62
+
54
63
  const buildEmptyRound = (): ConsumerMenuMatrixReport => {
55
64
  return {
56
- byOption: {
57
- '1': {
58
- stage: 'UNKNOWN',
59
- outcome: 'UNKNOWN',
60
- filesScanned: 0,
61
- totalViolations: 0,
62
- diagnosis: 'unknown',
63
- },
64
- '2': {
65
- stage: 'UNKNOWN',
66
- outcome: 'UNKNOWN',
67
- filesScanned: 0,
68
- totalViolations: 0,
69
- diagnosis: 'unknown',
70
- },
71
- '3': {
72
- stage: 'UNKNOWN',
73
- outcome: 'UNKNOWN',
74
- filesScanned: 0,
75
- totalViolations: 0,
76
- diagnosis: 'unknown',
77
- },
78
- '4': {
79
- stage: 'UNKNOWN',
80
- outcome: 'UNKNOWN',
81
- filesScanned: 0,
82
- totalViolations: 0,
83
- diagnosis: 'unknown',
84
- },
85
- '9': {
86
- stage: 'UNKNOWN',
87
- outcome: 'UNKNOWN',
88
- filesScanned: 0,
89
- totalViolations: 0,
90
- diagnosis: 'unknown',
91
- },
92
- },
65
+ byOption: Object.fromEntries(
66
+ MATRIX_MENU_OPTION_IDS.map((id) => [id, { ...UNKNOWN_OPTION_REPORT }])
67
+ ) as ConsumerMenuMatrixReport['byOption'],
93
68
  };
94
69
  };
95
70
 
@@ -9,6 +9,10 @@ export type ConsumerLegacyMenuContext = {
9
9
  runStrictRepoAndStaged: () => Promise<void>;
10
10
  runStrictStagedOnly: () => Promise<void>;
11
11
  runStandardCriticalHigh: () => Promise<void>;
12
+ runEngineStagedNoPreflight: () => Promise<void>;
13
+ runEngineUnstagedNoPreflight: () => Promise<void>;
14
+ runEngineStagedAndUnstagedNoPreflight: () => Promise<void>;
15
+ runEngineFullRepoNoPreflight: () => Promise<void>;
12
16
  runPatternChecks: () => Promise<void>;
13
17
  runEslintAudit: () => Promise<void>;
14
18
  runAstIntelligence: () => Promise<void>;
@@ -22,24 +26,44 @@ export const createConsumerLegacyMenuActions = (
22
26
  return [
23
27
  {
24
28
  id: '1',
25
- label: 'Read-only full audit (repo analysis · PRE_COMMIT)',
29
+ label: 'Consumer preflight + gate: ALL tracked files (PRE_COMMIT · writes evidence)',
26
30
  execute: params.runFullAudit,
27
31
  },
28
32
  {
29
33
  id: '2',
30
- label: 'Read-only strict REPO+STAGING (CI/CD · PRE_PUSH)',
34
+ label: 'Consumer preflight + gate: REPO+index contract (PRE_PUSH · disk skip risk if evidence tracked)',
31
35
  execute: params.runStrictRepoAndStaged,
32
36
  },
33
37
  {
34
38
  id: '3',
35
- label: 'Read-only strict STAGING only (dev · PRE_COMMIT)',
39
+ label: 'Consumer preflight + gate: STAGED only (PRE_COMMIT)',
36
40
  execute: params.runStrictStagedOnly,
37
41
  },
38
42
  {
39
43
  id: '4',
40
- label: 'Read-only audit of STAGED+UNSTAGED working tree (PRE_PUSH policy)',
44
+ label: 'Consumer preflight + gate: working tree (PRE_PUSH policy · disk skip risk if evidence tracked)',
41
45
  execute: params.runStandardCriticalHigh,
42
46
  },
47
+ {
48
+ id: '11',
49
+ label: 'Engine audit · STAGED only (no preflight · PRE_COMMIT)',
50
+ execute: params.runEngineStagedNoPreflight,
51
+ },
52
+ {
53
+ id: '12',
54
+ label: 'Engine audit · UNSTAGED only (no preflight · PRE_COMMIT)',
55
+ execute: params.runEngineUnstagedNoPreflight,
56
+ },
57
+ {
58
+ id: '13',
59
+ label: 'Engine audit · STAGED + UNSTAGED (no preflight · PRE_COMMIT)',
60
+ execute: params.runEngineStagedAndUnstagedNoPreflight,
61
+ },
62
+ {
63
+ id: '14',
64
+ label: 'Engine audit · FULL tracked repo (no preflight · PRE_COMMIT)',
65
+ execute: params.runEngineFullRepoNoPreflight,
66
+ },
43
67
  {
44
68
  id: '5',
45
69
  label: 'Legacy read-only pattern checks snapshot',
@@ -7,7 +7,8 @@ import type {
7
7
  } from './framework-menu-consumer-preflight-types';
8
8
 
9
9
  export const ACTIONABLE_HINTS_BY_CODE: Readonly<Record<string, string>> = {
10
- EVIDENCE_MISSING: 'ejecuta una auditoría (1/2/3/4) para regenerar .ai_evidence.json.',
10
+ EVIDENCE_MISSING:
11
+ 'ejecuta una auditoría (1/2/3/4 o motor 11–14) para regenerar .ai_evidence.json.',
11
12
  EVIDENCE_INVALID: 'regenera .ai_evidence.json desde una opción de auditoría.',
12
13
  EVIDENCE_STALE: 'refresca evidencia antes de continuar con commit/push.',
13
14
  EVIDENCE_TIMESTAMP_INVALID: 'regenera evidencia para obtener un timestamp válido.',
@@ -54,7 +55,9 @@ export const buildConsumerPreflightHints = (
54
55
  const actionableHintsByCode = resolveActionableHintsByCode(dependencies);
55
56
 
56
57
  if (hasViolationCode(violations, 'EVIDENCE_MISSING')) {
57
- hints.push('Evidence missing: ejecuta una auditoría (1/2/3/4) para regenerar .ai_evidence.json.');
58
+ hints.push(
59
+ 'Evidence missing: ejecuta una auditoría (1/2/3/4 o motor 11–14) para regenerar .ai_evidence.json.'
60
+ );
58
61
  handledCodes.add('EVIDENCE_MISSING');
59
62
  }
60
63
  if (hasViolationCode(violations, 'EVIDENCE_INVALID')) {