pumuki 6.3.97 → 6.3.99

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 (96) hide show
  1. package/AGENTS.md +269 -0
  2. package/CHANGELOG.md +697 -0
  3. package/README.md +4 -2
  4. package/VERSION +1 -1
  5. package/docs/README.md +13 -9
  6. package/docs/operations/RELEASE_NOTES.md +12 -76
  7. package/docs/product/HOW_IT_WORKS.md +6 -0
  8. package/docs/product/INSTALLATION.md +1 -1
  9. package/docs/product/USAGE.md +41 -4
  10. package/docs/tracking/plan-curso-pumuki-stack-my-architecture.md +118 -0
  11. package/docs/validation/README.md +6 -3
  12. package/integrations/config/skillsCustomRules.ts +18 -99
  13. package/integrations/evidence/buildEvidence.ts +0 -24
  14. package/integrations/evidence/repoState.ts +0 -3
  15. package/integrations/evidence/schema.ts +0 -18
  16. package/integrations/evidence/writeEvidence.ts +0 -24
  17. package/integrations/gate/evaluateAiGate.ts +15 -232
  18. package/integrations/gate/remediationCatalog.ts +0 -8
  19. package/integrations/git/GitService.ts +44 -5
  20. package/integrations/git/aiGateRepoPolicyFindings.ts +0 -4
  21. package/integrations/git/runPlatformGate.ts +1 -9
  22. package/integrations/git/runPlatformGateFacts.ts +19 -1
  23. package/integrations/git/runPlatformGateOutput.ts +27 -36
  24. package/integrations/lifecycle/adapter.templates.json +7 -13
  25. package/integrations/lifecycle/adapter.ts +0 -24
  26. package/integrations/lifecycle/artifacts.ts +1 -6
  27. package/integrations/lifecycle/audit.ts +101 -0
  28. package/integrations/lifecycle/cli.ts +110 -70
  29. package/integrations/lifecycle/cliSdd.ts +13 -8
  30. package/integrations/lifecycle/doctor.ts +16 -48
  31. package/integrations/lifecycle/hookManager.ts +0 -77
  32. package/integrations/lifecycle/index.ts +2 -0
  33. package/integrations/lifecycle/install.ts +0 -21
  34. package/integrations/lifecycle/npmService.ts +3 -155
  35. package/integrations/lifecycle/policyValidationSnapshot.ts +8 -2
  36. package/integrations/lifecycle/preWriteAutomation.ts +7 -77
  37. package/integrations/lifecycle/state.ts +1 -8
  38. package/integrations/lifecycle/status.ts +2 -29
  39. package/integrations/mcp/aiGateCheck.ts +26 -206
  40. package/integrations/mcp/autoExecuteAiStart.ts +87 -94
  41. package/integrations/mcp/enterpriseServer.ts +7 -23
  42. package/integrations/mcp/enterpriseStdioServer.cli.ts +4 -31
  43. package/integrations/mcp/preFlightCheck.ts +5 -51
  44. package/integrations/platform/detectPlatforms.ts +37 -0
  45. package/integrations/policy/experimentalFeatures.ts +1 -1
  46. package/integrations/sdd/evidenceScaffold.ts +2 -109
  47. package/package.json +10 -2
  48. package/scripts/check-tracking-single-active.sh +1 -1
  49. package/scripts/consumer-menu-matrix-baseline-report-lib.ts +13 -38
  50. package/scripts/consumer-postinstall-resolve-args.cjs +44 -0
  51. package/scripts/consumer-postinstall.cjs +76 -21
  52. package/scripts/framework-menu-advanced-view-lib.ts +0 -15
  53. package/scripts/framework-menu-consumer-actions-lib.ts +28 -4
  54. package/scripts/framework-menu-consumer-preflight-hints.ts +5 -2
  55. package/scripts/framework-menu-consumer-preflight-render.ts +0 -10
  56. package/scripts/framework-menu-consumer-preflight-run.ts +0 -23
  57. package/scripts/framework-menu-consumer-preflight-types.ts +0 -12
  58. package/scripts/framework-menu-consumer-runtime-actions.ts +87 -17
  59. package/scripts/framework-menu-consumer-runtime-audit.ts +36 -2
  60. package/scripts/framework-menu-consumer-runtime-evidence-classic.ts +140 -0
  61. package/scripts/framework-menu-consumer-runtime-lib.ts +2 -10
  62. package/scripts/framework-menu-consumer-runtime-menu.ts +4 -18
  63. package/scripts/framework-menu-consumer-runtime-types.ts +3 -3
  64. package/scripts/framework-menu-evidence-summary-lib.ts +1 -0
  65. package/scripts/framework-menu-evidence-summary-read.ts +57 -5
  66. package/scripts/framework-menu-evidence-summary-severity.ts +3 -1
  67. package/scripts/framework-menu-evidence-summary-types.ts +7 -0
  68. package/scripts/framework-menu-gate-lib.ts +9 -0
  69. package/scripts/framework-menu-layout-data.ts +5 -0
  70. package/scripts/framework-menu-matrix-baseline-lib.ts +15 -14
  71. package/scripts/framework-menu-matrix-canary-lib.ts +22 -1
  72. package/scripts/framework-menu-matrix-evidence-lib.ts +1 -0
  73. package/scripts/framework-menu-matrix-evidence-types.ts +13 -1
  74. package/scripts/framework-menu-matrix-runner-lib.ts +35 -0
  75. package/scripts/framework-menu-system-notifications-cause.ts +0 -24
  76. package/scripts/framework-menu-system-notifications-macos-swift-source.ts +24 -204
  77. package/scripts/framework-menu-system-notifications-macos.ts +4 -0
  78. package/scripts/framework-menu-system-notifications-payloads-blocked.ts +1 -1
  79. package/scripts/framework-menu-system-notifications-remediation.ts +13 -24
  80. package/scripts/framework-menu-system-notifications-text.ts +1 -7
  81. package/scripts/framework-menu.ts +3 -2
  82. package/scripts/package-install-smoke-consumer-git-repo-lib.ts +1 -10
  83. package/scripts/package-install-smoke-consumer-npm-lib.ts +9 -46
  84. package/scripts/pumuki-full-surface-smoke-lib.ts +37 -0
  85. package/scripts/pumuki-full-surface-smoke.ts +346 -0
  86. package/scripts/pumuki-smoke-installed-wrapper.cjs +31 -0
  87. package/integrations/evidence/trackingContract.ts +0 -150
  88. package/integrations/gate/governanceActionCatalog.ts +0 -275
  89. package/integrations/lifecycle/bootstrapManifest.ts +0 -248
  90. package/integrations/lifecycle/cliGovernanceConsole.ts +0 -69
  91. package/integrations/lifecycle/governanceNextAction.ts +0 -164
  92. package/integrations/lifecycle/governanceObservationSnapshot.ts +0 -613
  93. package/integrations/mcp/alignedPlatformGate.ts +0 -232
  94. package/integrations/mcp/readMcpPrePushStdin.ts +0 -7
  95. package/scripts/build-ruralgo-s1-evidence-pack.ts +0 -85
  96. package/scripts/ruralgo-s1-evidence-pack-lib.ts +0 -200
package/README.md CHANGED
@@ -32,7 +32,7 @@ Elige un perfil y profundiza en los enlaces; **no** repite aquí reglas largas (
32
32
 
33
33
  | Perfil | Qué instalar / arrancar | Stages habituales | Opcional típico |
34
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. |
35
+ | **Mínimo** | `npm install --save-exact pumuki` (en repos Git el `postinstall` ejecuta baseline `pumuki install`; `--with-mcp --agent=repo` es opt-in con `PUMUKI_POSTINSTALL_WITH_MCP=1` o `PUMUKI_POSTINSTALL_MCP_AGENT=repo`). | 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
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
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
38
 
@@ -50,6 +50,8 @@ Cinco entradas que cubren el 80 % del día a día en un consumidor; el detalle e
50
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
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
52
 
53
+ **Desarrollo en este repo (sin depender de GitHub Actions):** barra mínima antes de merge o publicar — `npm run -s validation:local-merge-bar` (`typecheck` + smoke de superficie CLI + `npm test`). Detalle del smoke: [docs/validation/README.md](docs/validation/README.md).
54
+
53
55
  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
56
 
55
57
  ## 5-Minute Quick Start (Consumer)
@@ -69,7 +71,7 @@ npx --yes pumuki status
69
71
  npx --yes pumuki doctor --json
70
72
  ```
71
73
 
72
- Desde **6.3.63**, `npm install` en la raíz de un repo **Git** dispara un `postinstall` que ejecuta **`pumuki install` solo** (hooks `pre-commit` / `pre-push`, lifecycle, evidencia cuando aplica). **Pumuki no depende de ningún IDE** para el baseline: no toca `.cursor/` ni otros ficheros de editor por defecto. Desde **6.3.68**, cada hook gestionado ejecuta **`pumuki-pre-write` antes** de `pumuki-pre-commit` / `pumuki-pre-push` (stage **PRE_WRITE** vía Git). Saltar solo PRE_WRITE en hooks: `PUMUKI_SKIP_CHAINED_PRE_WRITE=1`. Desde **6.3.69**, esos mismos hooks aplican también **git-flow en ramas protegidas** (`GITFLOW_PROTECTED_BRANCH`) e **higiene de worktree** (`PUMUKI_PREWRITE_WORKTREE_*` / códigos `EVIDENCE_PREWRITE_WORKTREE_*`) cuando la evidencia es válida; el **modal macOS** de bloqueo (Desactivar / Silenciar 30 min / Mantener activas) queda **activo por defecto** si las notificaciones están habilitadas (`"blockedDialogEnabled": false` o `PUMUKI_MACOS_BLOCKED_DIALOG=0` para apagarlo). Tras install, si no existía, aparece **`.pumuki/adapter.json`** con los comandos de hooks y **MCP stdio** para referencia o para clientes que los registren manualmente. Para generar también config de IDE: **`pumuki install --with-mcp --agent=cursor`** (u otro) o **`pumuki bootstrap --enterprise --agent=…`**. Desactivar el postinstall: `PUMUKI_SKIP_POSTINSTALL=1`. En CI suele saltarse solo (`CI=true`). En **6.3.64+**, las notificaciones del sistema en plataformas sin banner nativo se reflejan en **stderr** por defecto (`PUMUKI_DISABLE_STDERR_NOTIFICATIONS=1` para silenciarlas). En **6.3.69+**, un `gate.blocked` en macOS también deja una copia en **stderr** por defecto (`PUMUKI_DISABLE_GATE_BLOCKED_STDERR_MIRROR=1` para desactivar solo eso). Desde **6.3.70**, si **`.ai_evidence.json` está versionado** y **PRE_PUSH** no bloquea, ese archivo **no se reescribe** en el push (compatibilidad con **pre-commit** como hook de **pre-push**); para forzar escritura: `PUMUKI_PRE_PUSH_ALWAYS_WRITE_TRACKED_EVIDENCE=1`. Con modal de bloqueo activo, el panel interactivo prioriza foco/clics y se evita el banner duplicado.
74
+ Desde **6.3.63**, `npm install` en la raíz de un repo **Git** dispara un `postinstall` que ejecuta baseline **`pumuki install`** (hooks `pre-commit` / `pre-push`, lifecycle, merge de **`.pumuki/adapter.json`** con comandos MCP stdio, sin rutas de IDE salvo opt-in). El wiring MCP no va activado por defecto; para activarlo en postinstall usa `PUMUKI_POSTINSTALL_WITH_MCP=1` o `PUMUKI_POSTINSTALL_MCP_AGENT=repo/cursor/claude/codex`. **Pumuki no depende de ningún IDE** para el baseline. Opt-out del postinstall: `PUMUKI_SKIP_POSTINSTALL=1`. Ficheros de IDE en postinstall: `PUMUKI_POSTINSTALL_MCP_AGENT=cursor|claude|codex` o comando manual / `bootstrap`. Desde **6.3.68**, cada hook gestionado ejecuta **`pumuki-pre-write` antes** de `pumuki-pre-commit` / `pumuki-pre-push` (stage **PRE_WRITE** vía Git). Saltar solo PRE_WRITE en hooks: `PUMUKI_SKIP_CHAINED_PRE_WRITE=1`. Desde **6.3.69**, esos mismos hooks aplican también **git-flow en ramas protegidas** (`GITFLOW_PROTECTED_BRANCH`) e **higiene de worktree** (`PUMUKI_PREWRITE_WORKTREE_*` / códigos `EVIDENCE_PREWRITE_WORKTREE_*`) cuando la evidencia es válida; el **modal macOS** de bloqueo (Desactivar / Silenciar 30 min / Mantener activas) queda **activo por defecto** si las notificaciones están habilitadas (`"blockedDialogEnabled": false` o `PUMUKI_MACOS_BLOCKED_DIALOG=0` para apagarlo). Desactivar el postinstall: `PUMUKI_SKIP_POSTINSTALL=1`. En CI suele saltarse solo (`CI=true`). En **6.3.64+**, las notificaciones del sistema en plataformas sin banner nativo se reflejan en **stderr** por defecto (`PUMUKI_DISABLE_STDERR_NOTIFICATIONS=1` para silenciarlas). En **6.3.69+**, un `gate.blocked` en macOS también deja una copia en **stderr** por defecto (`PUMUKI_DISABLE_GATE_BLOCKED_STDERR_MIRROR=1` para desactivar solo eso). Desde **6.3.70**, si **`.ai_evidence.json` está versionado** y **PRE_PUSH** no bloquea, ese archivo **no se reescribe** en el push (compatibilidad con **pre-commit** como hook de **pre-push**); para forzar escritura: `PUMUKI_PRE_PUSH_ALWAYS_WRITE_TRACKED_EVIDENCE=1`. Con modal de bloqueo activo, el panel interactivo prioriza foco/clics y se evita el banner duplicado.
73
75
 
74
76
  Fallback (equivalent in pasos separados):
75
77
 
package/VERSION CHANGED
@@ -1 +1 @@
1
- v6.3.85
1
+ v6.3.99
package/docs/README.md CHANGED
@@ -4,6 +4,10 @@ Mapa corto y humano de la documentación oficial de Pumuki.
4
4
 
5
5
  ## Si buscas algo concreto
6
6
 
7
+ - Quiero la **intención de producto canónica** (qué debe cumplir Pumuki en cualquier repo, sin repetir manifiesto en cada sesión):
8
+ - `docs/product/USAGE.md` (sección **Product intent**)
9
+ - Quiero **auditar todo el árbol trackeado** desde CLI (no solo staged):
10
+ - `docs/product/USAGE.md` (sección **Full-repository audit**), comando `pumuki audit`
7
11
  - Quiero límites del producto, perfil de adopción y comandos mínimos (sin leer todo el README largo):
8
12
  - `README.md` (secciones **Qué NO es Pumuki**, **Rutas de adopción**, **Comandos esenciales**)
9
13
  - Quiero instalar y arrancar Pumuki en un repo consumidor:
@@ -34,13 +38,13 @@ Mapa corto y humano de la documentación oficial de Pumuki.
34
38
  - Quiero runbooks de validación:
35
39
  - `docs/validation/README.md`
36
40
  - `docs/validation/ios-avdlee-parity-matrix.md`
41
+ - Smoke de superficie CLI + hooks (`npm run smoke:pumuki-surface`, opcional consumidor / bins instalados: ver `docs/validation/README.md`)
42
+ - Barra local sin Actions: `npm run -s validation:local-merge-bar` (ver `docs/validation/README.md` § GitHub Actions y cuota)
37
43
 
38
44
  - Quiero saber en qué estamos ahora:
39
- - `PUMUKI-RESET-MASTER-PLAN.md` en la raíz del repo como artefacto operativo local y única fuente viva del tracking interno
40
- - Quiero contexto histórico o materiales de seguimiento retirados:
41
- - Referencia histórica: `docs/tracking/plan-activo-de-trabajo.md`
42
- - Quiero el seguimiento del curso Stack My Architecture (Pumuki), iniciativa formativa aparte del espejo operativo:
43
- - Curso Stack My Architecture: `docs/tracking/plan-curso-pumuki-stack-my-architecture.md`
45
+ - `docs/tracking/plan-activo-de-trabajo.md`
46
+ - Quiero el seguimiento del curso Stack My Architecture (Pumuki), iniciativa formativa aparte del espejo operativo:
47
+ - `docs/tracking/plan-curso-pumuki-stack-my-architecture.md`
44
48
 
45
49
  ## Estructura oficial
46
50
 
@@ -67,10 +71,10 @@ Mapa corto y humano de la documentación oficial de Pumuki.
67
71
  - Skills vendorizadas que el repo usa como contrato local.
68
72
 
69
73
  - `docs/tracking/`
70
- - Material histórico o formativo; no actúa como backlog vivo del producto.
71
- - Fuente viva del tracking interno: `PUMUKI-RESET-MASTER-PLAN.md` en la raíz del repo.
72
- - Documento retirado: `docs/tracking/plan-activo-de-trabajo.md`.
73
- - Material del curso: `docs/tracking/plan-curso-pumuki-stack-my-architecture.md`.
74
+ - Seguimiento permitido y solo el imprescindible.
75
+ - Espejo operativo de producto y consumidores: `docs/tracking/plan-activo-de-trabajo.md` (unica fuente de verdad para ese ambito).
76
+ - 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).
77
+ - Regla hard: solo puede existir una tarea `🚧` en cada documento de seguimiento que lo use.
74
78
 
75
79
  ## Fuera de `docs/`
76
80
 
@@ -1,40 +1,3 @@
1
- ## 2026-04-20 (v6.3.97)
2
- - **Adapter MCP enterprise activo por defecto**: `pumuki install` ya no genera un comando enterprise MCP que arranca en modo baseline. El `adapter.json` y las entradas MCP de IDE exportan ahora `PUMUKI_EXPERIMENTAL_MCP_ENTERPRISE=advisory`, de modo que el cliente ve `ai_gate_check`, `pre_flight_check` y `auto_execute_ai_start` sin intervención manual adicional.
3
- - **Rollout recomendado**: publicar `pumuki@6.3.97`, repin inmediato en `Flux_training` y verificar `tools/list` arrancando exactamente el comando de `.pumuki/adapter.json`; debe dejar de devolver solo `check_sdd_status`, `validate_and_fix`, `sync_branches` y `cleanup_stale_branches`.
4
-
5
- ## 2026-04-20 (v6.3.96)
6
- - **Diagnóstico explícito de skills faltantes**: `status`, `doctor` y el AI gate ya no degradan a señales genéricas cuando falta una skill requerida o su fuente es ilegible; ahora emiten `SKILLS_REQUIRED_SOURCE_MISSING` o `SKILLS_REQUIRED_SOURCE_UNREADABLE` con nombre de skill, ruta concreta y resolución accionable.
7
- - **Rollout recomendado**: publicar `pumuki@6.3.96`, repin inmediato en `Flux_training` y repetir la repro del repo sin `docs/codex-skills`, confirmando que `status --json` y `doctor --json` incluyen la ruta `docs/codex-skills/windsurf-rules-backend.md` en `skills_contract.source_diagnostics`.
8
-
9
- ## 2026-04-20 (v6.3.95)
10
- - **Enforcement operativo de trazabilidad contractual**: `pumuki sdd evidence` exige ahora `--traceability-markdown=<path>` cuando el repositorio declara en `AGENTS.md` la matriz mínima `ARCHIVO | SKILL | REGLA | EVIDENCIA | ESTADO`; el comando falla si falta la cabecera exacta o si no existe al menos una fila real.
11
- - **Rollout recomendado**: publicar `pumuki@6.3.95`, repin inmediato en `Flux_training` y repetir la doble repro de `pumuki sdd evidence`: sin `--traceability-markdown` debe bloquear, y con un markdown repo-local que contenga la matriz contractual debe pasar.
12
-
13
- ## 2026-04-20 (v6.3.94)
14
- - **Subtitle de bloqueo 100% en español**: la causa primaria visible de notificaciones ya traduce explícitamente los mensajes exactos de `console.log usage is not allowed in frontend code.` y `...backend code.` antes de construir el `subtitle`, evitando el último escape de copy inglés en bloqueos reales de frontend/backend.
15
- - **Rollout recomendado**: publicar `pumuki@6.3.94`, repin inmediato en `Flux_training` y repetir un rojo real de frontend con `PUMUKI_SKIP_CHAINED_PRE_WRITE=1 pnpm exec pumuki-pre-commit`, confirmando que el `subtitle` contiene `Se detectó uso de "console.log" en frontend.` y no la frase inglesa raw.
16
-
17
- ## 2026-04-20 (v6.3.93)
18
- - **Tracking terminal 100% en español**: las violaciones de repo policy `TRACKING_CANONICAL_SOURCE_CONFLICT`, `TRACKING_CANONICAL_FILE_MISSING` y `TRACKING_CANONICAL_IN_PROGRESS_INVALID` traducen ya la línea `[ERROR]` del gate en terminal, no solo el banner/modal.
19
- - **Rollout recomendado**: publicar `pumuki@6.3.93`, repin inmediato en `Flux_training` y repetir el bloqueo con doble `🚧` para confirmar que desaparece la frase inglesa `Tracking canonical file must contain exactly one in-progress task`.
20
-
21
- ## 2026-04-20 (v6.3.92)
22
- - **Purge real de uninstall**: `pumuki uninstall --purge-artifacts` elimina ya los artefactos bootstrap locales `.pumuki/adapter.json` y `.pumuki/bootstrap-manifest.json` cuando no están trackeados, en vez de dejar una instalación “medio desinstalada”.
23
- - **Rollout recomendado**: publicar `pumuki@6.3.92`, repin inmediato en `Flux_training` y repetir `install -> uninstall --purge-artifacts` comprobando `adapter=no` y `manifest=no` al final.
24
-
25
- ## 2026-04-20 (v6.3.91)
26
- - **Observabilidad de skills alineada**: `status --json` y `doctor --json` dejan visible `governanceObservation.skills_contract` cuando la evidencia y el lock efectivo de skills muestran un contrato activo; el lifecycle ya no aparenta `NOT_APPLICABLE` mientras el gate real bloquea violaciones frontend/backend.
27
- - **Rollout recomendado**: publicar `pumuki@6.3.91`, repin inmediato en `Flux_training` y repetir la repro con rojo frontend staged para confirmar `skills_contract.enforced=true`, `skills_contract.status=FAIL` y `attention_codes` con `SKILLS_CONTRACT_INCOMPLETE`.
28
-
29
- ## 2026-04-20 (v6.3.89)
30
- - **Aislamiento por worktree**: `pumuki install` detecta worktrees sin `core.hooksPath` explícito y fija un `core.hooksPath` local a `.pumuki/git-hooks`, evitando que los hooks gestionados se escriban en `.git/hooks` del checkout principal compartido.
31
- - **Rollback limpio**: `pumuki uninstall` retira ese `core.hooksPath` solo si fue creado por Pumuki para el worktree.
32
- - **Rollout recomendado**: publicar `pumuki@6.3.89`, repin inmediato en `Flux_training` y repetir la repro de worktree (`install`, `bootstrap-manifest`, `status --json`, checksums de hooks en checkout principal).
33
-
34
- ## 2026-04-20 (v6.3.87)
35
- - Cierra el segundo tramo de PUM-026: si PRE_WRITE solo arregla el receipt MCP y el gate pasa a verde, fuerza un refresh de paridad contra PRE_COMMIT antes del veredicto final.
36
- - Rollout recomendado: actualizar Flux_training y repetir la repro mínima de validate/pre-commit/.ai_evidence.
37
-
38
1
  # Release Notes (v2.x line)
39
2
 
40
3
  This file tracks the active deterministic framework line used in this repository.
@@ -43,46 +6,21 @@ This file keeps only the operational highlights and rollout notes that matter wh
43
6
 
44
7
  ## 2026-04 (CLI stability and macOS notifications)
45
8
 
46
- ### 2026-04-20 (v6.3.86)
47
-
48
- - **Paridad de gate real**: `pumuki sdd validate --stage=PRE_WRITE --json` deja de devolver verde falso cuando el hook real bloquearía por evidencia o findings staged; ahora fuerza refresh de evidencia incluso si el `aiGate` inicial llega en `ALLOWED`.
49
- - **Evidencia consistente**: el envelope final de `validate` usa el resultado refrescado y `.ai_evidence.json` queda en `BLOCK` cuando el rojo real del consumer persiste.
50
- - **Rollout recomendado**: publicar `pumuki@6.3.86`, repin inmediato en `Flux_training` y revalidar con un rojo frontend staged (`validate PRE_WRITE`, `pre-commit`, `.ai_evidence.json`, `status`, `doctor`).
9
+ ### 2026-04-22 (v6.3.99)
51
10
 
52
- ### 2026-04-20 (v6.3.85)
11
+ - **Hotfix de coerción temprana:** `PRE_WRITE` deja de parecer advisory cuando realmente está activado en `strict`, y el arranque agentic devuelve fallo real al bloquear.
12
+ - **Rollout recomendado:** publicar `pumuki@6.3.99` y repin inmediato en `RuralGo`, validando `pumuki:status`, `pumuki:doctor`, `pre-commit` y `pre-push` con el fix de `PUMUKI-INC-079`.
53
13
 
54
- - **Tracking con viñeta reconocido**: el enforcement ya cuenta correctamente `- [🚧] - tarea` como única tarea activa válida en el MD canónico, eliminando falsos `count=0` en consumers que usan ese formato.
55
- - **Causa visible en español**: los bloqueos de tracking `TRACKING_CANONICAL_SOURCE_CONFLICT` y `TRACKING_CANONICAL_IN_PROGRESS_INVALID` renderizan ya el texto final en español en banner y modal.
56
- - **Rollout recomendado**: publicar `pumuki@6.3.85`, repin en `R_GO` y `Flux_training`, y confirmar que el bloqueo residual ya no mezcla inglés y español ni falla por ignorar la fila `- [🚧] -`.
14
+ ### 2026-04-11 (v6.3.72)
57
15
 
58
- ### 2026-04-20 (v6.3.84)
59
-
60
- - **Tracking en español**: `TRACKING_CANONICAL_SOURCE_CONFLICT` y `TRACKING_CANONICAL_IN_PROGRESS_INVALID` ya renderizan una causa 100% en español en el banner y en el modal macOS.
61
- - **Rollout recomendado**: publicar `pumuki@6.3.84`, repin inmediato en los consumers donde el bloqueo de tracking sigue vivo y verificar que la notificación visible deja de mezclar inglés y español.
62
-
63
- ### 2026-04-20 (v6.3.83)
64
-
65
- - **Copy 100% en español**: `gate.blocked` ya no filtra `causeMessage` ni `remediation` en inglés cuando el código no está mapeado; el fallback visible para usuario final queda íntegramente en español.
66
- - **Botones validados en framework**: `Desactivar` y `Silenciar 30 min` se han revalidado extremo a extremo dentro del runtime de notificaciones; `Desactivar` bloquea emisiones posteriores y `Silenciar 30 min` reabre automáticamente al expirar la ventana.
67
- - **Rollout recomendado**: publicar `pumuki@6.3.83`, repin inmediato en consumers activos y comprobar en al menos un consumer real que el diálogo macOS deja de mostrar spaninglish y respeta las acciones del usuario.
68
-
69
- ### 2026-04-17 (v6.3.81)
70
-
71
- - **Causa 100% en español**: la notificación `gate.blocked` traduce explícitamente `EVIDENCE_GATE_BLOCKED` y también los mensajes legacy equivalentes, evitando el spanglish `Cause: Evidence AI gate status is BLOCKED.` en macOS.
72
- - **Rollout recomendado**: publicar `pumuki@6.3.81` y repin rápido `RuralGo -> SAAS -> Flux`, revalidando la notificación bloqueante y `status/doctor` en cada consumer.
73
-
74
- ### 2026-04-17 (v6.3.80)
75
-
76
- - **Tracking canónico**: la línea viva acepta el formato contractual `[🚧] - tarea` en el plan maestro y en tablas con backticks, tanto en el parser de tracking como en el guardrail shell de una sola task activa.
77
- - **Notificaciones bloqueantes**: copy y remediaciones de `gate.blocked` salen en español cuando el payload legacy llega en inglés; el banner macOS corta por palabra y conserva una solución breve y accionable.
78
- - **Rollout recomendado**: publicar `pumuki@6.3.80` y repin ordenado `RuralGo -> SAAS -> Flux`, revalidando después `pumuki status`, `pumuki doctor` y hooks Git en cada consumer.
79
-
80
- ### 2026-04-16 (v6.3.78)
81
-
82
- - **Slice S1 consolidada**: `status`, `doctor`, `PRE-FLIGHT CHECK`, menú `Consumer` y menú `Advanced` muestran el mismo bloque canónico de governance sin duplicar lógica de cálculo.
83
- - **Runtime del menú**: `Consumer` conserva `lastPreflight` y lo reutiliza en superficies derivadas para mantener paridad visible de `truth / next action / policy-as-code / experimentales`.
84
- - **Base de release correcta**: la publicación se prepara desde `release/6.3.78` recortada sobre `develop` ya alineado con la línea viva `release/6.3.77`.
85
- - **Rollout recomendado**: publicar `pumuki@6.3.78` y repin ordenado `RuralGo -> SAAS -> Flux`, validando después `pumuki status`, `pumuki doctor` y hooks Git en cada consumer.
16
+ - **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.
17
+ - **`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`.
18
+ - **Modal Swift**: `NSAlert.runModal()` en lugar de panel flotante para que los botones del diálogo respondan de forma fiable.
19
+ - **Postinstall consumer**: por defecto `pumuki install --with-mcp --agent=repo` y fusión conservadora en `.pumuki/adapter.json` (`json-merge`); opt-out `PUMUKI_POSTINSTALL_SKIP_MCP=1`.
20
+ - **Validación local**: `smoke:pumuki-surface` / `smoke:pumuki-surface-installed` y `validation:local-merge-bar` (sin depender de minutos de Actions). Detalle en `docs/validation/README.md`.
21
+ - **Tests en macOS:** `integrations/lifecycle/__tests__/cli.test.ts` evita notificaciones reales del sistema (`PUMUKI_DISABLE_SYSTEM_NOTIFICATIONS` en hooks) para que `npm test` / la barra local no queden colgados en PRE_WRITE strict.
22
+ - **Menú / matriz consumer**: opciones motor `11–14`, matriz baseline alineada, vista classic opcional, etc. (ver `CHANGELOG.md`).
23
+ - **Rollout**: `pumuki@6.3.72`; `npm publish` cuando el tarball incluya lo anterior; luego `pumuki doctor --json` + repin en consumidores (p. ej. RuralGO).
86
24
 
87
25
  ### 2026-04-06 (v6.3.71)
88
26
 
@@ -847,5 +785,3 @@ This file keeps only the operational highlights and rollout notes that matter wh
847
785
 
848
786
  - Legacy 5.3.4 migration/release notes were removed from active docs to avoid drift.
849
787
  - Historical commit trace remains available in Git history.
850
-
851
- - 6.3.88: PUM-027 cierra el caso MCP degradado; sin .pumuki/adapter.json el gate bloquea y ya no regenera mcp-ai-gate-receipt.
@@ -51,6 +51,12 @@ Pipeline:
51
51
 
52
52
  Policy source: `integrations/gate/stagePolicies.ts`.
53
53
 
54
+ ### `pumuki audit` (full tracked tree)
55
+
56
+ The lifecycle command **`pumuki audit`** runs `runPlatformGate` with **`GateScope` = `repo`**: facts come from **`git ls-files`** filtered by the default code extensions, using the working tree contents of those paths. It is **not** the same as the `PRE_COMMIT` hook, which uses **`staged`** scope only.
57
+
58
+ JSON output includes how many **untracked** paths would have matched those extensions (`untracked_matching_extensions_count`); they are still excluded from facts unless you use a different scope (for example consumer menu options that include unstaged paths).
59
+
54
60
  ## Main runtime components
55
61
 
56
62
  - `integrations/git/runPlatformGate.ts`
@@ -51,7 +51,7 @@ If both commands pass, the workspace is ready.
51
51
  npm install --save-exact pumuki
52
52
  ```
53
53
 
54
- The package `postinstall` runs **`pumuki install` only** (Git hooks + lifecycle wiring). Hooks chain **`pumuki-pre-write`** then **`pumuki-pre-commit`** / **`pumuki-pre-push`** (IDE-agnostic). When missing, **`.pumuki/adapter.json`** is created with hook + **MCP stdio** command lines (any MCP client can use them). It does **not** write IDE-specific files; use step 2 or `pumuki install --with-mcp --agent=<name>` for that.
54
+ The package `postinstall` runs baseline **`pumuki install`** by default (Git hooks + lifecycle wiring + **solo** **`.pumuki/adapter.json`**: hooks + **MCP stdio** command lines). MCP wiring is now opt-in: set `PUMUKI_POSTINSTALL_WITH_MCP=1` or `PUMUKI_POSTINSTALL_MCP_AGENT=repo|cursor|claude|codex` to add adapter/client wiring in postinstall. Eso es **agnóstico de IDE/CLI/extensión**: cualquier cliente MCP puede leer esas líneas o enlazarlas manualmente. En cada `npm install` que actualice `pumuki` (repin), el adapter se **fusiona** (`json-merge`) para no pisar claves propias del consumidor. Opt out del bloque MCP+wiring: `PUMUKI_POSTINSTALL_SKIP_MCP=1`. Ficheros propios de un IDE (p. ej. `.cursor/mcp.json`, `.claude/settings.json`): **`pumuki install --with-mcp --agent=cursor|claude|codex`** a mano o **`PUMUKI_POSTINSTALL_MCP_AGENT=cursor`** (u otro agente soportado) si quieres que el postinstall también los escriba.
55
55
 
56
56
  ### 2) Bootstrap managed lifecycle (recommended single command)
57
57
 
@@ -19,6 +19,25 @@ Stack My Architecture (optional training hub; includes the dedicated Pumuki cour
19
19
  - Public static site: `https://stack-my-architecture-hub.vercel.app/pumuki/`
20
20
  - Initiative tracking in this repo: `docs/tracking/plan-curso-pumuki-stack-my-architecture.md`
21
21
 
22
+ ## Product intent (canonical)
23
+
24
+ This section is the **single owner-authored contract** for what Pumuki must optimize for across consumers. Agents and contributors should treat it as **source of truth** for expectations so the product owner does not have to restate it in every session.
25
+
26
+ 1. **Repo-agnostic governance** — The same deterministic pipeline (`Facts → Rules → Gate → evidence`) must behave coherently in **any** Git consumer repository. Success is not measured by a specific downstream repo name.
27
+
28
+ 2. **Honest scope** — “What was audited” must always be explicit:
29
+ - Hook stages use **Git-defined scopes** (for example `PRE_COMMIT` is **staged** only; see the table [Gate stages and policies](#gate-stages-and-policies)).
30
+ - Full-tree style evaluation uses **tracked files** resolved via Git (`git ls-files`) with the configured extension set; **untracked** paths are out of scope unless a feature explicitly documents otherwise.
31
+ - Do not equate “pre-commit blocked me” with “the whole codebase was audited”.
32
+
33
+ 3. **Signal over noise** — Findings should reflect **real risk** for the active platforms in that repo. Heuristic multi-platform activation must not drown single-stack repos; set **`PUMUKI_PIN_PLATFORMS`** to a comma-separated subset (`ios`, `android`, `backend`, `frontend`) to restrict which detected platforms are kept for rule loading (unknown tokens are ignored).
34
+
35
+ 4. **Upgrade hygiene** — After bumping the `pumuki` package version, consumers that keep `.pumuki/policy-as-code.json` under version control must **refresh signatures** with `pumuki policy reconcile` (use `--apply` when appropriate). A `POLICY_AS_CODE_SIGNATURE_MISMATCH` from an **stale contract** is not the same class of problem as a code violation.
36
+
37
+ 5. **Product-shaped UX** — **`pumuki audit`** is the canonical CLI for “audit the tracked codebase in this repo” (see [Full-repository audit](#full-repository-audit-cli)). Hooks still use **staged** or **range** scopes per stage; do not confuse them.
38
+
39
+ If this section conflicts with a one-off chat instruction, **this section wins** unless the product owner explicitly updates it here.
40
+
22
41
  ## Prerequisites
23
42
 
24
43
  - Node.js `>=18`
@@ -43,6 +62,20 @@ npm ci
43
62
 
44
63
  Policy source: `integrations/gate/stagePolicies.ts`.
45
64
 
65
+ ## Full-repository audit (CLI)
66
+
67
+ Use **`pumuki audit`** when you want the gate to evaluate **all Git-tracked** source files under the default extension set (see `DEFAULT_FACT_FILE_EXTENSIONS` in `integrations/git/runPlatformGateFacts.ts`), not only the staged diff.
68
+
69
+ ```bash
70
+ pumuki audit [--stage=PRE_COMMIT|PRE_PUSH|CI] [--engine] [--json]
71
+ ```
72
+
73
+ - **`--stage`**: policy thresholds for that stage (default **`PRE_COMMIT`**). `PRE_WRITE` is not supported here. Aliases from SDD (`GREEN`, `REFACTOR`, `CLOSE`) work the same as for `pumuki sdd validate`.
74
+ - **`--engine`**: run with `audit_mode=engine` and AST heuristics widened (aligned with the consumer menu “engine” path). Default is **`gate`** (strict enforcement semantics).
75
+ - **`--json`**: machine-readable payload including `files_scanned`, `untracked_matching_extensions_count` (untracked paths that match the extension filter are **not** scanned), and `policy_reconcile_hint` for signature drift.
76
+
77
+ Platform noise control: set **`PUMUKI_PIN_PLATFORMS`** (comma-separated) before running, e.g. `export PUMUKI_PIN_PLATFORMS=frontend` in a TS-only UI repo.
78
+
46
79
  Coverage guardrail:
47
80
 
48
81
  - In `PRE_COMMIT`, `PRE_PUSH` and `CI`, Pumuki requires complete rule evaluation coverage.
@@ -130,7 +163,10 @@ Use `A` to switch to `Advanced` mode (full options), and `C` to return to `Consu
130
163
  Advanced mode options include short inline contextual help.
131
164
  Consumer mode is now a minimal read-only shell:
132
165
 
133
- - `1/2/3/4` are the canonical read-only gate flows
166
+ - `1/2/3/4` are the canonical gate flows with **consumer preflight** before evaluation (labels state scope and PRE_COMMIT vs PRE_PUSH).
167
+ - `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.
168
+ - 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`.
169
+ - 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.
134
170
  - `8` exports the same evidence snapshot in markdown form
135
171
  - `5/6/7/9` remain available only as `Legacy Read-Only Diagnostics`
136
172
 
@@ -249,9 +285,9 @@ Stage mapping:
249
285
  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.
250
286
 
251
287
  System notifications (macOS) can be enabled from advanced menu option `31` (persisted in `.pumuki/system-notifications.json`).
252
- 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**.
253
- Blocked notifications now use a native Swift floating modal (bottom-right) by default, with AppleScript fallback.
254
- Override mode with `PUMUKI_MACOS_BLOCKED_DIALOG_MODE=auto|swift-floating|applescript`.
288
+ 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 **`NSAlert`** modal dialog / 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**.
289
+ Blocked notifications use a **Swift-compiled helper** that shows an **`NSAlert`** (reliable button hit-testing) by default, with AppleScript fallback if `swift` fails.
290
+ Override mode with `PUMUKI_MACOS_BLOCKED_DIALOG_MODE=auto|swift-floating|applescript` (the `swift-floating` name is kept for compatibility; the Swift path is alert-based).
255
291
  Custom skills import is available in advanced menu option `33` (writes `/.pumuki/custom-rules.json`).
256
292
  Menu-driven audits apply SDD guardrails with the same strict semantics as stage runners (no bypass).
257
293
 
@@ -575,6 +611,7 @@ OpenSpec integration behavior:
575
611
  - SDD/OpenSpec enforcement invokes the CLI only from **`{repo}/node_modules/.bin/openspec`** (no fallback to a generic `openspec` on `PATH`).
576
612
  - `pumuki install` auto-bootstraps OpenSpec (`@fission-ai/openspec`) when missing/incompatible and scaffolds `openspec/` project baseline when absent.
577
613
  - `pumuki install --with-mcp` adds adapter/MCP wiring bootstrap and prints MCP health summary on completion.
614
+ - The **`pumuki` package `postinstall`** runs baseline `pumuki install` from the consumer root (hooks + **`.pumuki/adapter.json`** con comandos MCP stdio, **sin** rutas de IDE). MCP wiring is opt-in via `PUMUKI_POSTINSTALL_WITH_MCP=1` or `PUMUKI_POSTINSTALL_MCP_AGENT=repo|cursor|claude|codex`. Repins refrescan ese contrato de forma **independiente de Cursor/CLI/extensión**. Disable MCP wiring en postinstall: `PUMUKI_POSTINSTALL_SKIP_MCP=1`. Escribir también ficheros de IDE en postinstall: `PUMUKI_POSTINSTALL_MCP_AGENT=cursor|claude|codex` (ver `docs/product/INSTALLATION.md`).
578
615
  - `pumuki update --latest` migrates legacy `openspec` package to `@fission-ai/openspec` before hook reinstall.
579
616
 
580
617
  Safety rule:
@@ -0,0 +1,118 @@
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
+ - **Cierre local y release gate:** `build-hub.sh --mode strict` + smoke runtime en verde.
25
+ - **Origen en GitHub:** el repo **`stack-my-architecture-hub`** tiene en **`main`** la carpeta estática **`pumuki/`** y el pipeline `build-hub` que la genera (sincronizado con remoto; despliegue a producción con el workflow cuando toque).
26
+ - **Repo Pumuki (ramas):** la documentación del curso en este repositorio está integrada en **`develop`** (**PR #746**, merge `428f10d`). La rama **`main`** del producto va **muy por detrás** de `develop` (del orden de **~600** commits a fecha de integración del plan); promover `develop` → `main` es un **release de producto** aparte, no parte del cierre de este plan formativo.
27
+ - **GitHub Actions:** la org **no** dispone de cuota útil para Actions → el **Hub Production Release Gate** en CI **no** se usa como gate; publicación y comprobaciones **en local** con `./scripts/publish-architecture-stack.sh` en el repo del hub (Vercel CLI + mismos scripts).
28
+ - **Publicación Vercel:** deploy del proyecto `stack-my-architecture-hub` con verificación de rutas contra el alias **`https://stack-my-architecture-hub.vercel.app`** (incluye `/pumuki/` → 200). El script `publish-architecture-stack.sh` infiere la base desde `Aliased:` (o `SMA_PUBLISH_VERIFY_BASE_URL`) y escribe **`.runtime/publish-verify-base.url`** para alinear `post-deploy-checks.sh` con la URL verificada (localmente o cuando Actions vuelva a estar disponible).
29
+ - Si **`https://architecture-stack.vercel.app`** debe exponer el mismo árbol estático que el hub, sincroniza proyecto/CNAME según tu setup (nota emitida por el script al publicar).
30
+
31
+ Si eso no se cumple, el curso falla aunque el HTML sea bonito.
32
+
33
+ ---
34
+
35
+ ## 2. Modelo mental único (todo el curso orbita aquí)
36
+
37
+ Una sola frase que el alumno debe poder repetir:
38
+
39
+ **Hechos del diff/código → reglas efectivas → decisión del gate por stage → registro en evidencia v2.1.**
40
+
41
+ Todo lo demás (menú, MCP, notificaciones, `doctor`) es **acceso** a ese mismo pipeline o **comodidad**; no es un segundo producto.
42
+
43
+ ---
44
+
45
+ ## 3. Confusiones que el material debe desmontar de forma explícita
46
+
47
+ Cada unidad del curso debe tener al menos un párrafo “**no confundas**” o un mini escenario:
48
+
49
+ | Confusión típica | Verdad operativa |
50
+ |------------------|------------------|
51
+ | “Sin MCP no hay Pumuki” | Los **hooks y CI** son el enforcement; MCP es **opcional** para IDE/agente. |
52
+ | “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. |
53
+ | “`openspec` en el PATH basta” | Pumuki usa OpenSpec **repo-local** (`node_modules/.bin`). |
54
+ | “PRE_COMMIT limpio ⇒ push seguro” | **PRE_PUSH** mira otro **scope** (`upstream..HEAD`). |
55
+ | “El menú es la fuente de verdad” | El menú **orquesta** diagnósticos; la fuente de verdad es **policy + stage + evidencia**. |
56
+ | “Borrar el paquete limpia el repo” | `npm uninstall pumuki` **no** quita hooks/lifecycle; hace falta **`pumuki remove`** / flujo documentado. |
57
+
58
+ Si el Markdown del curso no nombra estas líneas, el plan pedagógico sigue vacío aunque haya tablas de check.
59
+
60
+ ---
61
+
62
+ ## 4. Secuencia didáctica (orden de primera lectura)
63
+
64
+ 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.
65
+
66
+ 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.
67
+
68
+ | Orden | Unidad | Objetivo observable (el alumno demuestra…) | Actividad mínima en lab | Criterio de dominio |
69
+ |-------|--------|---------------------------------------------|-------------------------|----------------------|
70
+ | 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` |
71
+ | 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 |
72
+ | 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 |
73
+ | 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 |
74
+ | 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 |
75
+ | 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 |
76
+ | 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 |
77
+ | 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” |
78
+ | 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 |
79
+ | U9 | Perfiles, Governance, monorepo | Cuándo bajar de enterprise; prefijos de scope; parity | (Según perfil del equipo) | Justifica un perfil sin autoboicot |
80
+ | 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 |
81
+
82
+ **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.
83
+
84
+ ---
85
+
86
+ ## 5. Qué el curso no debe intentar (límites)
87
+
88
+ - Sustituir el curso **SDD** (OpenSpec, Kanban del cambio) ni el **Governance** (AGENTS, cultura): solo **enganchar** Pumuki a ellos.
89
+ - Sustituir tests de producto, revisión humana ni criterios de negocio.
90
+ - Prometer “cero lectura de USAGE”: USAGE sigue siendo norma; el curso debe **enseñar** lo mismo con **menor fricción**, no duplicar mal.
91
+
92
+ ---
93
+
94
+ ## 6. Estado de entrega en el repo (operativo, subordinado al §4)
95
+
96
+ | Unidad §4 | Estado en `stack-my-architecture-pumuki` |
97
+ |-----------|-------------------------------------------|
98
+ | U0–U2 | ✅ Base + módulo 2; ciclo de vida **completo** en **08** |
99
+ | U3 | ✅ `02-modulos/08-ciclo-de-vida-install-uninstall-actualizacion.md` |
100
+ | U4 | ✅ `02-modulos/09-evidencia-por-stage-y-ai-evidence-json.md` |
101
+ | U5 | ✅ `02-modulos/10-menu-interactivo-matrix-y-preflight.md` |
102
+ | U6 | ✅ `02-modulos/11-mcp-enforcement-vs-lectura-agente.md` |
103
+ | U7 | ✅ Módulo **04** ampliado (§4.6–4.8 + criterio dominio) |
104
+ | U8 | ✅ `02-modulos/12-notificaciones-macos-stderr-y-watch.md` |
105
+ | U9–U10 | ✅ Revisar checklist **07** frente a criterios §4 en próxima iteración |
106
+
107
+ | Task | Estado |
108
+ |------|--------|
109
+ | Implementar U3–U8 en `.md` + `FILE_ORDER` + validación | ✅ |
110
+ | CHANGELOG curso + rebuild HTML + sync hub local | ✅ (incl. CSS lectura **0.3.1**) |
111
+ | Push hub + deploy Vercel (ver curso en prod) | 🚧 |
112
+
113
+ ---
114
+
115
+ ## 7. Auditoría técnica (no confundir con evaluación del alumno)
116
+
117
+ - `python3 scripts/validate-course-structure.py` y `check-links.py` en repo curso.
118
+ - Publicación hub según tu script; URL `/pumuki/` 200.
@@ -14,9 +14,11 @@ Este directorio contiene solo documentación estable de validación y runbooks o
14
14
 
15
15
  ## Estado de seguimiento
16
16
 
17
- - `docs/validation/` no gobierna backlog.
18
- - La única fuente viva del tracking interno es `PUMUKI-RESET-MASTER-PLAN.md` en la raíz del repo.
19
- - `docs/tracking/plan-activo-de-trabajo.md` queda retirado como espejo operativo y solo conserva valor histórico.
17
+ - Única fuente de seguimiento: `docs/tracking/plan-activo-de-trabajo.md`
18
+
19
+ ## GitHub Actions y cuota
20
+
21
+ Si la organización **no tiene minutos útiles** de Actions, los workflows bajo `.github/workflows/` **no bloquean** el flujo de merge ni sustituyen la evidencia: la barra operativa es **local** — comando único recomendado: **`npm run -s validation:local-merge-bar`** (`typecheck` + `validation:pumuki-surface-smoke` + `npm test`). Complementos habituales: hooks Pumuki, `validation:tracking-single-active`, etc. Alineado con `docs/tracking/plan-activo-de-trabajo.md`.
20
22
 
21
23
  ## Política de higiene
22
24
 
@@ -32,3 +34,4 @@ Este directorio contiene solo documentación estable de validación y runbooks o
32
34
  - Higiene hard del worktree propio: `npm run -s validation:self-worktree-hygiene`
33
35
  - Suite contractual enterprise: `npm run -s validation:contract-suite:enterprise`
34
36
  - Verificación de plan activo único + higiene hard del worktree propio: `npm run -s validation:tracking-single-active`
37
+ - **Smoke de superficie Pumuki** (~29 filas: CLI, `doctor`/`status`, `audit` (varios stages), `watch` (repo + staged), `loop`, `adapter` dry-run repo+codex, `analytics`, `policy` normal+`--strict`, `sdd status`+`validate` por stage, hooks): desde la raíz de **este** repo, `npm run -s smoke:pumuki-surface` (alias: `npm run -s validation:pumuki-surface-smoke`). Tests del resolver y del exit 2 sin `node_modules/pumuki`: `npx --yes tsx@4.21.0 --test scripts/__tests__/pumuki-full-surface-smoke-lib.test.ts scripts/__tests__/pumuki-full-surface-smoke-exit2.test.ts`. Opcional sobre un consumidor con **bins del tree pumuki** (gate en el cwd del consumidor): `PUMUKI_SMOKE_REPO_ROOT=/ruta/abs/al/consumer npm run -s smoke:pumuki-surface`. Para validar **exactamente lo instalado** en `node_modules/pumuki` del consumidor: `PUMUKI_SMOKE_REPO_ROOT=/ruta/abs/al/consumer PUMUKI_SMOKE_BIN_STRATEGY=installed npm run -s smoke:pumuki-surface`, o `PUMUKI_SMOKE_REPO_ROOT=/ruta/abs/al/consumer npm run -s smoke:pumuki-surface-installed`. Ver interpretación de exit codes al final del informe impreso.
@@ -49,15 +49,6 @@ export type CompiledImportedSkillsRulesResult = Omit<
49
49
  'outputPath'
50
50
  >;
51
51
 
52
- export type SkillImportSourceDiagnostic = {
53
- skillName: string;
54
- canonicalSkillName: string;
55
- sourcePath: string;
56
- sourceType: 'declared_path' | 'required_skill';
57
- issue: 'missing' | 'unreadable';
58
- resolution: string;
59
- };
60
-
61
52
  type VendorSkillManifestEntry = {
62
53
  name: string;
63
54
  file: string;
@@ -432,57 +423,22 @@ const loadVendorSkillsManifest = (
432
423
  return bySkillName;
433
424
  };
434
425
 
435
- const buildSkillImportResolution = (sourcePath: string): string => {
436
- const normalized = sourcePath.replace(/\\/g, '/');
437
- if (normalized.includes('/docs/codex-skills/') || normalized.startsWith('docs/codex-skills/')) {
438
- return `Restaura ${sourcePath} o ejecuta ./scripts/sync-codex-skills.sh para resincronizar las skills vendorizadas.`;
439
- }
440
- if (normalized.includes('/vendor/skills/') || normalized.startsWith('vendor/skills/')) {
441
- return `Restaura ${sourcePath} desde vendor/skills o resincroniza las dependencias del repositorio.`;
442
- }
443
- return `Corrige la ruta declarada o restaura ${sourcePath} para que la skill requerida vuelva a estar disponible.`;
444
- };
445
-
446
- const canReadSkillSourceFile = (sourcePath: string): boolean => {
447
- try {
448
- readFileSync(sourcePath, 'utf8');
449
- return true;
450
- } catch {
451
- return false;
452
- }
453
- };
454
-
455
- export const resolveSkillImportSourcesWithDiagnostics = (params: {
426
+ export const resolveSkillImportSources = (params: {
456
427
  repoRoot?: string;
457
428
  explicitSources?: ReadonlyArray<string>;
458
- }): { sourceFiles: string[]; diagnostics: SkillImportSourceDiagnostic[] } => {
429
+ }): string[] => {
459
430
  const repoRoot = params.repoRoot ?? process.cwd();
460
431
  const resolved = new Map<string, { path: string; priority: number }>();
461
432
  const vendoredManifest = loadVendorSkillsManifest(repoRoot);
462
- const diagnostics: SkillImportSourceDiagnostic[] = [];
463
-
464
- const registerDiagnostic = (
465
- rawPath: string,
466
- skillName: string,
467
- canonicalSkillName: string,
468
- sourceType: SkillImportSourceDiagnostic['sourceType'],
469
- issue: SkillImportSourceDiagnostic['issue'],
470
- ): void => {
433
+
434
+ const pushIfExists = (rawPath: string): void => {
471
435
  const normalized = normalizePath({
472
436
  repoRoot,
473
437
  path: rawPath,
474
438
  });
475
- diagnostics.push({
476
- skillName,
477
- canonicalSkillName,
478
- sourcePath: normalized,
479
- sourceType,
480
- issue,
481
- resolution: buildSkillImportResolution(normalized),
482
- });
483
- };
484
-
485
- const pushResolved = (normalized: string): void => {
439
+ if (!existsSync(normalized)) {
440
+ return;
441
+ }
486
442
  const skillKey = toCanonicalImportedSkillName(sourceSkillNameFromPath(normalized));
487
443
  const priority = isVendoredSkillMarkdownPath(normalized) ? 2 : 1;
488
444
  const current = resolved.get(skillKey);
@@ -495,36 +451,13 @@ export const resolveSkillImportSourcesWithDiagnostics = (params: {
495
451
  }
496
452
  };
497
453
 
498
- const registerSource = (
499
- rawPath: string,
500
- skillName: string,
501
- canonicalSkillName: string,
502
- sourceType: SkillImportSourceDiagnostic['sourceType'],
503
- ): void => {
504
- const normalized = normalizePath({
505
- repoRoot,
506
- path: rawPath,
507
- });
508
- if (!existsSync(normalized)) {
509
- registerDiagnostic(rawPath, skillName, canonicalSkillName, sourceType, 'missing');
510
- return;
511
- }
512
- if (!canReadSkillSourceFile(normalized)) {
513
- registerDiagnostic(rawPath, skillName, canonicalSkillName, sourceType, 'unreadable');
514
- return;
515
- }
516
- pushResolved(normalized);
517
- };
518
-
519
454
  if (params.explicitSources && params.explicitSources.length > 0) {
520
455
  for (const source of params.explicitSources) {
521
- const normalized = normalizePath({ repoRoot, path: source });
522
- registerSource(source, sourceSkillNameFromPath(normalized), toCanonicalImportedSkillName(sourceSkillNameFromPath(normalized)), 'declared_path');
456
+ pushIfExists(source);
523
457
  }
524
- return {
525
- sourceFiles: [...resolved.values()].map((item) => item.path).sort(),
526
- diagnostics,
527
- };
458
+ return [...resolved.values()]
459
+ .map((item) => item.path)
460
+ .sort();
528
461
  }
529
462
 
530
463
  for (const profileFile of ['AGENTS.md', 'SKILLS.md']) {
@@ -534,37 +467,23 @@ export const resolveSkillImportSourcesWithDiagnostics = (params: {
534
467
  }
535
468
  const content = readFileSync(profilePath, 'utf8');
536
469
  for (const candidate of extractSkillPathsFromText(content)) {
537
- const normalized = normalizePath({ repoRoot, path: candidate });
538
- const skillName = sourceSkillNameFromPath(normalized);
539
- registerSource(candidate, skillName, toCanonicalImportedSkillName(skillName), 'declared_path');
470
+ pushIfExists(candidate);
540
471
  }
541
472
  for (const requiredSkillName of extractRequiredSkillNamesFromText(content)) {
542
473
  const canonicalName = toCanonicalImportedSkillName(requiredSkillName);
543
474
  const manifestPath = vendoredManifest.get(canonicalName);
544
475
  if (manifestPath) {
545
- registerSource(manifestPath, requiredSkillName, canonicalName, 'required_skill');
476
+ pushIfExists(manifestPath);
546
477
  continue;
547
478
  }
548
- const canonicalVendoredPath = `vendor/skills/${canonicalName}/SKILL.md`;
549
- const requiredVendoredPath = `vendor/skills/${requiredSkillName}/SKILL.md`;
550
- const selectedPath = existsSync(normalizePath({ repoRoot, path: requiredVendoredPath }))
551
- ? requiredVendoredPath
552
- : canonicalVendoredPath;
553
- registerSource(selectedPath, requiredSkillName, canonicalName, 'required_skill');
479
+ pushIfExists(`vendor/skills/${requiredSkillName}/SKILL.md`);
480
+ pushIfExists(`vendor/skills/${canonicalName}/SKILL.md`);
554
481
  }
555
482
  }
556
483
 
557
- return {
558
- sourceFiles: [...resolved.values()].map((item) => item.path).sort(),
559
- diagnostics,
560
- };
561
- };
562
-
563
- export const resolveSkillImportSources = (params: {
564
- repoRoot?: string;
565
- explicitSources?: ReadonlyArray<string>;
566
- }): string[] => {
567
- return resolveSkillImportSourcesWithDiagnostics(params).sourceFiles;
484
+ return [...resolved.values()]
485
+ .map((item) => item.path)
486
+ .sort();
568
487
  };
569
488
 
570
489
  export const compileImportedSkillsRules = (params: {