pumuki 6.3.13 → 6.3.14

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 (49) hide show
  1. package/README.md +95 -7
  2. package/VERSION +1 -1
  3. package/bin/pumuki-mcp-enterprise.js +5 -0
  4. package/bin/pumuki-pre-write.js +11 -0
  5. package/docs/API_REFERENCE.md +2 -1
  6. package/docs/INSTALLATION.md +101 -54
  7. package/docs/MCP_SERVERS.md +167 -74
  8. package/docs/PUMUKI_FULL_VALIDATION_CHECKLIST.md +46 -45
  9. package/docs/PUMUKI_OPENSPEC_SDD_ROADMAP.md +55 -0
  10. package/docs/README.md +5 -0
  11. package/docs/REFRACTOR_PROGRESS.md +102 -3
  12. package/docs/USAGE.md +115 -8
  13. package/docs/validation/README.md +2 -0
  14. package/docs/validation/phase12-go-no-go-report.md +73 -0
  15. package/docs/validation/post-phase12-next-lot-decision.md +75 -0
  16. package/integrations/config/skillsRuleSet.ts +53 -6
  17. package/integrations/evidence/buildEvidence.ts +42 -3
  18. package/integrations/evidence/generateEvidence.test.ts +59 -0
  19. package/integrations/evidence/readEvidence.test.ts +61 -0
  20. package/integrations/evidence/schema.test.ts +81 -0
  21. package/integrations/evidence/schema.ts +11 -0
  22. package/integrations/evidence/writeEvidence.test.ts +18 -0
  23. package/integrations/evidence/writeEvidence.ts +11 -0
  24. package/integrations/git/resolveGitRefs.ts +2 -2
  25. package/integrations/git/runPlatformGate.ts +64 -0
  26. package/integrations/git/runPlatformGateEvidence.ts +13 -0
  27. package/integrations/git/stageRunners.ts +10 -1
  28. package/integrations/lifecycle/artifacts.ts +57 -4
  29. package/integrations/lifecycle/cli.ts +248 -12
  30. package/integrations/lifecycle/constants.ts +1 -0
  31. package/integrations/lifecycle/gitService.ts +1 -0
  32. package/integrations/lifecycle/install.ts +24 -1
  33. package/integrations/lifecycle/openSpecBootstrap.ts +190 -0
  34. package/integrations/lifecycle/state.ts +57 -0
  35. package/integrations/lifecycle/uninstall.ts +3 -1
  36. package/integrations/lifecycle/update.ts +11 -0
  37. package/integrations/mcp/enterpriseServer.cli.ts +12 -0
  38. package/integrations/mcp/enterpriseServer.ts +762 -0
  39. package/integrations/mcp/index.ts +1 -0
  40. package/integrations/sdd/index.ts +11 -0
  41. package/integrations/sdd/openSpecCli.ts +180 -0
  42. package/integrations/sdd/policy.ts +190 -0
  43. package/integrations/sdd/sessionStore.ts +152 -0
  44. package/integrations/sdd/types.ts +69 -0
  45. package/package.json +10 -4
  46. package/scripts/framework-menu-runner-path-lib.ts +10 -3
  47. package/scripts/framework-menu.ts +86 -5
  48. package/scripts/package-install-smoke-gate-lib.ts +6 -1
  49. package/scripts/package-install-smoke-lifecycle-lib.ts +3 -0
@@ -1,114 +1,207 @@
1
1
  # MCP Servers (v2.x)
2
2
 
3
- This repository currently exposes a single active MCP-oriented server implementation:
3
+ Pumuki expone dos servidores MCP HTTP opcionales:
4
4
 
5
- - **Evidence Context Server** (read-only)
5
+ - `pumuki-mcp-evidence`: API read-only para `.ai_evidence.json`.
6
+ - `pumuki-mcp-enterprise`: superficie enterprise consolidada (resources + tools) con guardrails fail-safe.
6
7
 
7
- ## Evidence Context Server
8
+ El enforcement de gates (`pre-commit`, `pre-push`, `ci`) no depende de MCP.
8
9
 
9
- ### Source files
10
+ ## Arranque rápido
11
+
12
+ ### Desde el repositorio framework
13
+
14
+ ```bash
15
+ npm run mcp:evidence
16
+ npm run mcp:enterprise
17
+ ```
18
+
19
+ ### Desde un repositorio consumidor
20
+
21
+ ```bash
22
+ npx --yes pumuki-mcp-evidence
23
+ npx --yes pumuki-mcp-enterprise
24
+ ```
25
+
26
+ ## 1) Evidence Context Server (`pumuki-mcp-evidence`)
27
+
28
+ ### Implementación
10
29
 
11
30
  - `integrations/mcp/evidenceContextServer.ts`
12
31
  - `integrations/mcp/evidenceContextServer.cli.ts`
13
- - `integrations/mcp/index.ts`
14
32
 
15
33
  ### Purpose
16
34
 
17
- Expose deterministic evidence (`.ai_evidence.json`) to external agents without allowing writes.
35
+ Exponer evidencia v2.1 de forma determinista y solo lectura.
18
36
 
19
- ### Contract
37
+ ### Configuración runtime
20
38
 
21
- - Serves evidence only when file exists and `version === "2.1"`.
22
- - Returns deterministic JSON payload from local repo root.
39
+ - Host default: `127.0.0.1`
40
+ - Port default: `7341`
41
+ - Route default: `/ai-evidence`
23
42
 
24
- ### Default runtime
43
+ Variables de entorno:
25
44
 
26
- - Host: `127.0.0.1`
27
- - Port: `7341`
28
- - Route: `/ai-evidence`
45
+ - `PUMUKI_EVIDENCE_HOST`
46
+ - `PUMUKI_EVIDENCE_PORT`
47
+ - `PUMUKI_EVIDENCE_ROUTE`
29
48
 
30
49
  ### Endpoints
31
50
 
32
51
  - `GET /health`
33
- - `200 { "status": "ok" }`
34
52
  - `GET /status`
35
- - `200` with evidence health summary and `context_api` filter/pagination capabilities (including `present`, `valid`, `version`, `stage`, `outcome`, `has_findings`, `tracked_platforms_count`, `detected_platforms_count`, `non_detected_platforms_count`, `suppressed_findings_count`, `suppressed_replacement_rule_platform_pairs_ratio_pct`, `suppressed_non_replacement_rule_platform_pairs_ratio_pct`, and related suppression facets)
36
- - `GET /ai-evidence`
37
- - `200` with evidence payload when valid
38
- - `404` when missing or invalid
39
- - `GET /ai-evidence/summary`
40
- - `200` with compact deterministic summary (including `snapshot.has_findings`, `snapshot.findings_files_count`, `snapshot.findings_rules_count`, `snapshot.findings_with_lines_count`, `snapshot.findings_without_lines_count`, `snapshot.severity_counts`, `snapshot.findings_by_platform`, `snapshot.highest_severity`, `snapshot.blocking_findings_count`, `ledger_count`, `ledger_files_count`, `ledger_rules_count`, `ledger_by_platform`, `rulesets_count`, `rulesets_platforms_count`, `rulesets_bundles_count`, `rulesets_hashes_count`, `rulesets_by_platform`, `rulesets_fingerprint`, `platform_confidence_counts`, `suppressed_findings_count`, `suppressed_replacement_rules_count`, `suppressed_platforms_count`, `suppressed_files_count`, `suppressed_rules_count`, `tracked_platforms_count`, `detected_platforms_count`, `non_detected_platforms_count`, `suppressed_replacement_rule_platform_pairs_ratio_pct`, `suppressed_non_replacement_rule_platform_pairs_ratio_pct`)
41
- - `404` when missing or invalid
42
- - `GET /ai-evidence/snapshot`
43
- - `200` with deterministic snapshot + findings
44
- - `404` when missing or invalid
45
- - `GET /ai-evidence/findings`
46
- - `200` with deterministic findings list
47
- - supports `?severity=...&ruleId=...&platform=...`
48
- - supports `?limit=...&offset=...` for deterministic pagination
49
- - applies deterministic `maxLimit=100` bound
50
- - paginated responses include `pagination.has_more`
51
- - `404` when missing or invalid
52
- - `GET /ai-evidence/rulesets`
53
- - `200` with deterministic sorted rulesets
54
- - supports `?platform=...&bundle=...` for deterministic filtered slices
55
- - supports `?limit=...&offset=...` for deterministic pagination (`maxLimit=100`)
56
- - paginated responses include `pagination.has_more`
57
- - `404` when missing or invalid
58
- - `GET /ai-evidence/platforms`
59
- - `200` with detected platforms only
60
- - supports `?detectedOnly=false` for full platform state
61
- - supports `?confidence=HIGH|MEDIUM|LOW` for deterministic filtered slices
62
- - supports `?limit=...&offset=...` for deterministic pagination (`maxLimit=100`)
63
- - paginated responses include `pagination.has_more`
64
- - `404` when missing or invalid
65
- - `GET /ai-evidence/ledger`
66
- - `200` with deterministic sorted open-ledger entries
67
- - supports `?lastSeenAfter=...&lastSeenBefore=...` for deterministic time-window slices
68
- - supports `?limit=...&offset=...` for deterministic pagination (`maxLimit=100`)
69
- - paginated responses include `pagination.has_more`
70
- - `404` when missing or invalid
71
-
72
- ### Run locally
53
+ - `GET /<route>` (default: `/ai-evidence`)
54
+ - `GET /<route>/summary`
55
+ - `GET /<route>/snapshot`
56
+ - `GET /<route>/findings`
57
+ - `GET /<route>/rulesets`
58
+ - `GET /<route>/platforms`
59
+ - `GET /<route>/ledger`
73
60
 
74
- ```bash
75
- npm run mcp:evidence
76
- ```
61
+ Comportamiento:
77
62
 
78
- Or directly:
63
+ - Si falta evidencia o no cumple `version = "2.1"`, los endpoints de evidencia devuelven `404`.
64
+ - `findings`, `rulesets`, `platforms` y `ledger` soportan filtrado/paginación deterministas.
79
65
 
80
- ```bash
81
- npx tsx integrations/mcp/evidenceContextServer.cli.ts
66
+ ## 2) Enterprise MCP Server (`pumuki-mcp-enterprise`)
67
+
68
+ ### Implementación
69
+
70
+ - `integrations/mcp/enterpriseServer.ts`
71
+ - `integrations/mcp/enterpriseServer.cli.ts`
72
+
73
+ ### Purpose
74
+
75
+ Expose enterprise operational state for the active repository:
76
+
77
+ - estado de evidencia,
78
+ - estado gitflow,
79
+ - estado lifecycle,
80
+ - estado SDD/OpenSpec,
81
+ - toolset legacy-style en modo seguro.
82
+
83
+ ### Configuración runtime
84
+
85
+ - Host default: `127.0.0.1`
86
+ - Port default: `7391`
87
+
88
+ Variables de entorno:
89
+
90
+ - `PUMUKI_ENTERPRISE_MCP_HOST`
91
+ - `PUMUKI_ENTERPRISE_MCP_PORT`
92
+
93
+ ### Endpoints
94
+
95
+ - `GET /health`
96
+ - `GET /status`
97
+ - `GET /resources`
98
+ - `GET /resource?uri=<resource-uri>`
99
+ - `GET /tools`
100
+ - `POST /tool`
101
+
102
+ `GET /status` devuelve:
103
+
104
+ - `capabilities.resources`
105
+ - `capabilities.tools`
106
+ - `capabilities.mode = "baseline"`
107
+ - `lifecycle` (o `null` si no aplica)
108
+ - `sdd` (o `null` si no aplica)
109
+ - `evidence` (status payload)
110
+
111
+ ### Catálogo de resources
112
+
113
+ - `evidence://status`
114
+ - `gitflow://state`
115
+ - `context://active`
116
+ - `sdd://status`
117
+ - `sdd://active-change`
118
+
119
+ `GET /resource` responde:
120
+
121
+ ```json
122
+ {
123
+ "uri": "sdd://status",
124
+ "payload": {}
125
+ }
82
126
  ```
83
127
 
84
- ### Environment variables
128
+ URI no soportada devuelve `404`.
85
129
 
86
- - `PUMUKI_EVIDENCE_HOST`
87
- - `PUMUKI_EVIDENCE_PORT`
88
- - `PUMUKI_EVIDENCE_ROUTE`
130
+ ### Catálogo de tools
89
131
 
90
- Example:
132
+ - `ai_gate_check`
133
+ - `check_sdd_status`
134
+ - `validate_and_fix`
135
+ - `sync_branches`
136
+ - `cleanup_stale_branches`
91
137
 
92
- ```bash
93
- PUMUKI_EVIDENCE_PORT=7342 npm run mcp:evidence
138
+ `GET /tools` incluye metadatos por tool (`name`, `description`, `mutating`, `safeByDefault`).
139
+
140
+ `POST /tool` acepta:
141
+
142
+ ```json
143
+ {
144
+ "name": "sync_branches",
145
+ "dryRun": false,
146
+ "args": {
147
+ "stage": "PRE_PUSH"
148
+ }
149
+ }
150
+ ```
151
+
152
+ `POST /tool` responde siempre con envelope estable:
153
+
154
+ ```json
155
+ {
156
+ "tool": "sync_branches",
157
+ "dryRun": true,
158
+ "executed": false,
159
+ "success": true,
160
+ "warnings": [],
161
+ "result": {}
162
+ }
94
163
  ```
95
164
 
96
- ## Testing
165
+ ### Guardrails enterprise (baseline fail-safe)
166
+
167
+ - Tools mutating (`validate_and_fix`, `sync_branches`, `cleanup_stale_branches`) fuerzan `dryRun=true` aunque se solicite `dryRun=false`.
168
+ - Tools críticos (`validate_and_fix`, `sync_branches`, `cleanup_stale_branches`) pasan por guardia SDD/session.
169
+ - Si SDD bloquea, `/tool` devuelve `success=false`, `executed=false` y `result.guard.decision`.
170
+ - Errores de ejecución se manejan fail-safe (`success=false`, sin mutaciones).
171
+
172
+ Códigos SDD frecuentes en bloqueo:
97
173
 
98
- Server behavior is covered in:
174
+ - `OPENSPEC_MISSING`
175
+ - `OPENSPEC_PROJECT_MISSING`
176
+ - `SDD_SESSION_MISSING`
177
+ - `SDD_SESSION_INVALID`
178
+ - `SDD_CHANGE_MISSING`
179
+ - `SDD_CHANGE_ARCHIVED`
180
+ - `SDD_VALIDATION_FAILED`
181
+ - `SDD_VALIDATION_ERROR`
99
182
 
100
- - `integrations/mcp/__tests__/evidenceContextServer.test.ts`
183
+ ## Comportamiento HTTP
101
184
 
102
- Run:
185
+ - Endpoint desconocido: `404`
186
+ - Método no permitido: `405`
187
+ - JSON inválido en `POST /tool`: `400`
188
+ - Body inválido en `POST /tool`: `400`
189
+
190
+ ## Validación
191
+
192
+ Suites MCP:
193
+
194
+ - `integrations/mcp/__tests__/evidenceContextServer-*.test.ts`
195
+ - `integrations/mcp/__tests__/enterpriseServer.test.ts`
196
+
197
+ Comando:
103
198
 
104
199
  ```bash
105
200
  npm run test:mcp
106
201
  ```
107
202
 
108
- ## Scope note
109
-
110
- Legacy MCP references (older automation/watcher services) are not part of the active v2.x documentation surface.
111
-
112
- Consumption pattern reference:
203
+ ## Referencias
113
204
 
205
+ - `docs/MCP_EVIDENCE_CONTEXT_SERVER.md`
114
206
  - `docs/MCP_AGENT_CONTEXT_CONSUMPTION.md`
207
+ - `docs/evidence-v2.1.md`
@@ -14,6 +14,7 @@ Checklist maestro para validar el ciclo completo de Pumuki de forma secuencial a
14
14
  - Cerrar una tarea cada vez.
15
15
  - Guardar evidencia de cada tarea (salida de comandos + resultado esperado).
16
16
  - Cualquier warning/error detectado durante la ejecución debe corregirse de inmediato antes de continuar.
17
+ - Todas las pruebas de validación de runtime se ejecutan únicamente en `pumuki-mock-consumer` (no en el repo de framework `ast-intelligence-hooks`).
17
18
 
18
19
  ## Orden de ejecución recomendado
19
20
 
@@ -53,13 +54,13 @@ Checklist maestro para validar el ciclo completo de Pumuki de forma secuencial a
53
54
 
54
55
  ### 3) Lifecycle de Pumuki
55
56
 
56
- - 🚧 3.1 Ejecutar y validar `npx pumuki doctor` tras instalación en baseline limpia.
57
- - 3.2 Ejecutar y validar `npx pumuki status` tras instalación.
58
- - 3.3 Validar `npx pumuki update --latest` (idempotencia y salud de hooks).
59
- - 3.4 Validar `npx pumuki uninstall --purge-artifacts` (solo hooks + artifacts gestionados).
57
+ - 3.1 Ejecutar y validar `npx pumuki doctor` tras instalación en baseline limpia.
58
+ - 3.2 Ejecutar y validar `npx pumuki status` tras instalación.
59
+ - 3.3 Validar `npx pumuki update --latest` (idempotencia y salud de hooks).
60
+ - 3.4 Validar `npx pumuki uninstall --purge-artifacts` (solo hooks + artifacts gestionados).
60
61
  - ✅ 3.5 Validar `npx --yes pumuki remove` (limpieza total de rastro Pumuki sin tocar terceros).
61
62
  - ✅ 3.6 Validar idempotencia lifecycle (ciclo install/remove repetido).
62
- - 3.7 Validar guardrail: install/update falla si hay `node_modules` tracked.
63
+ - 3.7 Validar guardrail: install/update falla si hay `node_modules` tracked.
63
64
 
64
65
  ### 4) Stage gates runtime
65
66
 
@@ -67,65 +68,65 @@ Checklist maestro para validar el ciclo completo de Pumuki de forma secuencial a
67
68
  - ✅ 4.2 `pumuki-pre-push` evalúa `upstream..HEAD`.
68
69
  - ✅ 4.3 `pumuki-ci` evalúa `baseRef..HEAD` (`GITHUB_BASE_REF` o fallback).
69
70
  - ✅ 4.4 Exit codes deterministas (`0` allow, `1` block).
70
- - 4.5 Consistencia entre ejecución directa de binarios y ejecución vía hooks.
71
+ - 4.5 Consistencia entre ejecución directa de binarios y ejecución vía hooks.
71
72
 
72
73
  ### 5) Detección multi-plataforma y evaluación combinada
73
74
 
74
- - 5.1 Cobertura iOS (`*.swift`) en repos mixtos.
75
- - 5.2 Cobertura backend (`apps/backend/**/*.ts`) en repos mixtos.
76
- - 5.3 Cobertura frontend (`apps/frontend|apps/web`) en repos mixtos.
77
- - 5.4 Cobertura android (`*.kt`, `*.kts`) en repos mixtos.
78
- - 5.5 Commits/rangos multi-plataforma cargan rulesets combinados y salida combinada.
79
- - 5.6 No hay falsos positivos de plataforma fuera de selectores.
75
+ - 5.1 Cobertura iOS (`*.swift`) en repos mixtos.
76
+ - 5.2 Cobertura backend (`apps/backend/**/*.ts`) en repos mixtos.
77
+ - 5.3 Cobertura frontend (`apps/frontend|apps/web`) en repos mixtos.
78
+ - 5.4 Cobertura android (`*.kt`, `*.kts`) en repos mixtos.
79
+ - 5.5 Commits/rangos multi-plataforma cargan rulesets combinados y salida combinada.
80
+ - 5.6 No hay falsos positivos de plataforma fuera de selectores.
80
81
 
81
82
  ### 6) Rulesets, políticas y overrides
82
83
 
83
- - 6.1 Verificar carga de baseline packs:
84
+ - 6.1 Verificar carga de baseline packs:
84
85
  - `iosEnterpriseRuleSet`
85
86
  - `backendRuleSet`
86
87
  - `frontendRuleSet`
87
88
  - `androidRuleSet`
88
- - 6.2 Verificar políticas por stage:
89
+ - 6.2 Verificar políticas por stage:
89
90
  - PRE_COMMIT: block `CRITICAL`, warn `ERROR`
90
91
  - PRE_PUSH: block `ERROR`, warn `WARN`
91
92
  - CI: block `ERROR`, warn `WARN`
92
- - 6.3 Verificar aplicación de overrides de proyecto.
93
- - 6.4 Verificar enforcement de locked rules sin override explícito permitido.
93
+ - 6.3 Verificar aplicación de overrides de proyecto.
94
+ - 6.4 Verificar enforcement de locked rules sin override explícito permitido.
94
95
 
95
96
  ### 7) Contrato de evidencia v2.1
96
97
 
97
- - 7.1 Se genera `.ai_evidence.json` en cada stage.
98
- - 7.2 Campos de esquema válidos (`version`, `snapshot`, `ledger`).
99
- - 7.3 Evidencia incluye plataformas activas y rulesets cargados.
100
- - 7.4 Orden determinista entre ejecuciones equivalentes.
101
- - 7.5 Suppressions/ledger se mantienen estables y machine-readable.
98
+ - 7.1 Se genera `.ai_evidence.json` en cada stage.
99
+ - 7.2 Campos de esquema válidos (`version`, `snapshot`, `ledger`).
100
+ - 7.3 Evidencia incluye plataformas activas y rulesets cargados.
101
+ - 7.4 Orden determinista entre ejecuciones equivalentes.
102
+ - 7.5 Suppressions/ledger se mantienen estables y machine-readable.
102
103
 
103
104
  ### 8) MCP evidence context server
104
105
 
105
- - 8.1 Arrancar `pumuki-mcp-evidence` desde contexto de repositorio consumidor.
106
- - 8.2 Validar endpoints/facetas MCP con payload shape válido.
107
- - 8.3 Validar lectura determinista del último `.ai_evidence.json`.
108
- - 8.4 Validar comportamiento cuando falta/corrompe evidencia.
106
+ - 8.1 Arrancar `pumuki-mcp-evidence` desde contexto de repositorio consumidor.
107
+ - 8.2 Validar endpoints/facetas MCP con payload shape válido.
108
+ - 8.3 Validar lectura determinista del último `.ai_evidence.json`.
109
+ - 8.4 Validar comportamiento cuando falta/corrompe evidencia.
109
110
 
110
111
  ### 9) UX operativa (framework menu)
111
112
 
112
- - 9.1 `npm run framework:menu` abre y ejecuta acciones esperadas.
113
- - 9.2 Acciones mapeadas a lifecycle/gates producen salidas esperadas.
114
- - 9.3 Acciones de reportes generan archivos en rutas esperadas.
113
+ - 9.1 `npx pumuki-framework` (en repositorio consumidor) abre y ejecuta acciones esperadas.
114
+ - 9.2 Acciones mapeadas a lifecycle/gates producen salidas esperadas.
115
+ - 9.3 Acciones de reportes generan archivos en rutas esperadas.
115
116
 
116
117
  ### 10) Suites deterministas y validaciones
117
118
 
118
119
  - ✅ 10.1 `npm run typecheck` pasa.
119
- - 10.2 `npm run test` pasa.
120
- - 10.3 `npm run test:deterministic` pasa.
121
- - 10.4 `npm run test:heuristics` pasa.
122
- - 10.5 `npm run test:mcp` pasa.
123
- - 10.6 `npm run test:stage-gates` pasa.
124
- - 10.7 `npm run validation:package-manifest` pasa.
125
- - 10.8 `npm run validation:lifecycle-smoke` pasa.
126
- - 10.9 `npm run validation:package-smoke` pasa.
127
- - 10.10 `npm run validation:package-smoke:minimal` pasa.
128
- - 10.11 `npm run validation:docs-hygiene` pasa.
120
+ - 10.2 `npm run test` pasa.
121
+ - 10.3 `npm run test:deterministic` pasa.
122
+ - 10.4 `npm run test:heuristics` pasa.
123
+ - 10.5 `npm run test:mcp` pasa.
124
+ - 10.6 `npm run test:stage-gates` pasa.
125
+ - 10.7 `npm run validation:package-manifest` pasa.
126
+ - 10.8 `npm run validation:lifecycle-smoke` pasa.
127
+ - 10.9 `npm run validation:package-smoke` pasa.
128
+ - 10.10 `npm run validation:package-smoke:minimal` pasa.
129
+ - 10.11 `npm run validation:docs-hygiene` pasa.
129
130
 
130
131
  ### 11) Mock consumer: ciclo funcional completo
131
132
 
@@ -133,18 +134,18 @@ Checklist maestro para validar el ciclo completo de Pumuki de forma secuencial a
133
134
  - ✅ 11.2 Escenario violations: pre-commit/pre-push/ci => `1` esperado.
134
135
  - ✅ 11.3 Escenario mixed: comportamiento determinista combinado.
135
136
  - ✅ 11.4 Cleanup lifecycle tras cada escenario deja baseline limpio.
136
- - 11.5 Repetir matriz completa para confirmar repetibilidad exacta.
137
+ - 11.5 Repetir matriz completa para confirmar repetibilidad exacta.
137
138
 
138
139
  ### 12) Fallos, recuperación y cierre de release
139
140
 
140
- - 12.1 PRE_PUSH sin upstream: guía clara y fallo seguro.
141
- - 12.2 CI sin `GITHUB_BASE_REF`: fallback correcto.
142
- - 12.3 Hook drift: `doctor` detecta y `install/update` restaura.
143
- - 12.4 Mismatch parcial lifecycle: detectado y recuperable.
144
- - 12.5 README/USAGE/INSTALLATION alineados con runtime actual.
141
+ - 12.1 PRE_PUSH sin upstream: guía clara y fallo seguro.
142
+ - 12.2 CI sin `GITHUB_BASE_REF`: fallback correcto.
143
+ - 12.3 Hook drift: `doctor` detecta y `install/update` restaura.
144
+ - 12.4 Mismatch parcial lifecycle: detectado y recuperable.
145
+ - 12.5 README/USAGE/INSTALLATION alineados con runtime actual.
145
146
  - ✅ 12.6 CHANGELOG incluye cambios visibles para usuario.
146
147
  - ✅ 12.7 Release probada en mock desde npm (no ruta local).
147
- - 12.8 Informe final go/no-go con enlaces a artifacts y logs.
148
+ - 12.8 Informe final go/no-go con enlaces a artifacts y logs.
148
149
 
149
150
  ## Criterio de salida
150
151
 
@@ -0,0 +1,55 @@
1
+ # PUMUKI + OpenSpec SDD Roadmap
2
+
3
+ ## Leyenda
4
+ - ✅ Completada
5
+ - 🚧 En construcción
6
+ - ⏳ Pendiente
7
+
8
+ ## Fase 1 — Núcleo SDD
9
+ - ✅ Implementar módulo `integrations/sdd/` (cliente OpenSpec + policy + sesión SDD).
10
+ - ✅ Añadir comandos `pumuki sdd status|session|validate`.
11
+ - ✅ Definir contrato de salida JSON para decisiones SDD.
12
+ - ✅ Añadir persistencia de sesión SDD por repositorio.
13
+
14
+ ## Fase 2 — Enforcement en Gates
15
+ - ✅ Integrar SDD gate en `PRE_COMMIT`.
16
+ - ✅ Integrar SDD gate en `PRE_PUSH`.
17
+ - ✅ Integrar SDD gate en `CI`.
18
+ - ✅ Integrar enforcement ligero en `pre-write`.
19
+ - ✅ Añadir bypass de emergencia auditado (`PUMUKI_SDD_BYPASS=1`).
20
+
21
+ ## Fase 3 — Lifecycle y Auto-Bootstrap OpenSpec
22
+ - ✅ Extender `pumuki install` para auto-bootstrap OpenSpec.
23
+ - ✅ Extender `pumuki update` para compat/migración OpenSpec.
24
+ - ✅ Extender `pumuki uninstall/remove` para limpieza segura de artefactos gestionados.
25
+ - ✅ Añadir matriz de compatibilidad de versión mínima OpenSpec.
26
+
27
+ ## Fase 4 — MCP Enterprise (Legacy válido + guardrails)
28
+ - ✅ Crear `pumuki-mcp-enterprise`.
29
+ - ✅ Exponer recursos `evidence://status`, `gitflow://state`, `context://active`, `sdd://status`, `sdd://active-change`.
30
+ - ✅ Exponer tools legacy-style con seguridad (`ai_gate_check`, `check_sdd_status`, `validate_and_fix`, `sync_branches`, `cleanup_stale_branches`).
31
+ - ✅ Enforzar gate/session para tools críticas.
32
+ - ✅ Aplicar `dry-run` por defecto en operaciones sensibles.
33
+
34
+ ## Fase 5 — Evidencia, Telemetría y Contratos
35
+ - ✅ Añadir `sdd_metrics` en `.ai_evidence.json`.
36
+ - ✅ Añadir findings `source: "sdd-policy"` en bloqueos SDD.
37
+ - ✅ Garantizar orden determinista de payload/evidencia.
38
+ - ✅ Añadir tests de contrato de esquema SDD + evidencia.
39
+
40
+ ## Fase 6 — QA Técnica en Pumuki
41
+ - ✅ Añadir tests unitarios `integrations/sdd/*`.
42
+ - ✅ Añadir tests unitarios/integración `integrations/mcp-enterprise/*`.
43
+ - ✅ Reforzar tests lifecycle (install/update/remove) con OpenSpec bootstrap.
44
+ - ✅ Revalidar `test:deterministic` + nuevas suites.
45
+
46
+ ## Fase 7 — Documentación y Release
47
+ - ✅ Actualizar `README.md` para SDD obligatorio con OpenSpec.
48
+ - ✅ Actualizar `docs/USAGE.md` (flujo diario y comandos SDD).
49
+ - ✅ Actualizar `docs/INSTALLATION.md` (bootstrap + compat).
50
+ - ✅ Actualizar `docs/MCP_SERVERS.md` (MCP enterprise).
51
+ - ✅ Actualizar `CHANGELOG.md` y preparar release.
52
+
53
+ ## Fase 8 — Cierre Operativo
54
+ - 🚧 Ejecutar checklist final de aceptación enterprise.
55
+ - ⏳ Cerrar fase con evidencia de no regresión.
package/docs/README.md CHANGED
@@ -55,6 +55,8 @@ Language baseline: active repository documentation is maintained in English.
55
55
  - `validation/mock-consumer-integration-runbook.md`
56
56
  - `validation/github-support-ticket-template-startup-failure.md`
57
57
  - `validation/skills-rollout-consumer-repositories.md`
58
+ - `validation/phase12-go-no-go-report.md`
59
+ - `validation/post-phase12-next-lot-decision.md`
58
60
  - `validation/archive/README.md`: historical validation reports.
59
61
 
60
62
  ## Vendored Codex Skills
@@ -75,6 +77,8 @@ Language baseline: active repository documentation is maintained in English.
75
77
  - `RELEASE_NOTES.md`: v2.x release notes and rollout checkpoints.
76
78
  - `TODO.md`: active operational work tracking.
77
79
  - `REFRACTOR_PROGRESS.md`: linear phase-by-phase status (done/in-progress/pending).
80
+ - `PUMUKI_FULL_VALIDATION_CHECKLIST.md`: sequential full validation matrix for enterprise readiness.
81
+ - `PUMUKI_OPENSPEC_SDD_ROADMAP.md`: phased rollout roadmap for OpenSpec+SDD integration.
78
82
 
79
83
  ## Root-Level Pointers
80
84
 
@@ -83,3 +87,4 @@ Language baseline: active repository documentation is maintained in English.
83
87
  - `CHANGELOG.md` (repository root) tracks top-level package changes for the active baseline.
84
88
  - `AGENTS.md` (repository root) defines repository execution constraints for coding agents.
85
89
  - `CLAUDE.md` (repository root) provides a concise agent profile aligned with repository policies.
90
+ - `PUMUKI.md` (repository root) is the framework-facing manual entrypoint.