pumuki 6.3.113 → 6.3.115
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.
- package/CHANGELOG.md +52 -5
- package/README.md +4 -2
- package/VERSION +1 -1
- package/core/facts/detectors/typescript/index.test.ts +0 -229
- package/core/facts/detectors/typescript/index.ts +0 -278
- package/core/facts/extractHeuristicFacts.ts +0 -4
- package/core/rules/presets/heuristics/typescript.test.ts +1 -21
- package/core/rules/presets/heuristics/typescript.ts +0 -72
- package/docs/README.md +13 -9
- package/docs/codex-skills/backend-enterprise-rules.md +3 -3
- package/docs/operations/RELEASE_NOTES.md +41 -4
- package/docs/product/API_REFERENCE.md +1 -1
- package/docs/product/HOW_IT_WORKS.md +6 -0
- package/docs/product/INSTALLATION.md +1 -1
- package/docs/product/USAGE.md +42 -5
- package/docs/tracking/plan-curso-pumuki-stack-my-architecture.md +100 -44
- package/docs/validation/README.md +6 -3
- package/integrations/config/skillsDetectorRegistry.ts +0 -24
- package/integrations/config/skillsMarkdownRules.ts +0 -57
- package/integrations/evidence/buildEvidence.ts +0 -24
- package/integrations/evidence/repoState.ts +9 -7
- package/integrations/evidence/schema.ts +0 -18
- package/integrations/evidence/writeEvidence.ts +0 -24
- package/integrations/gate/evaluateAiGate.ts +8 -251
- package/integrations/gate/remediationCatalog.ts +0 -8
- package/integrations/git/GitService.ts +44 -5
- package/integrations/git/aiGateRepoPolicyFindings.ts +86 -17
- package/integrations/git/runPlatformGate.ts +1 -9
- package/integrations/git/runPlatformGateFacts.ts +19 -1
- package/integrations/git/runPlatformGateOutput.ts +41 -42
- package/integrations/lifecycle/adapter.templates.json +1 -0
- package/integrations/lifecycle/adapter.ts +0 -24
- package/integrations/lifecycle/audit.ts +101 -0
- package/integrations/lifecycle/cli.ts +120 -99
- package/integrations/lifecycle/cliSdd.ts +4 -26
- package/integrations/lifecycle/doctor.ts +40 -102
- package/integrations/lifecycle/index.ts +2 -0
- package/integrations/lifecycle/install.ts +0 -21
- package/integrations/lifecycle/packageInfo.ts +1 -118
- package/integrations/lifecycle/state.ts +1 -8
- package/integrations/lifecycle/status.ts +40 -59
- package/integrations/lifecycle/watch.ts +1 -1
- package/integrations/mcp/aiGateCheck.ts +10 -194
- package/integrations/mcp/autoExecuteAiStart.ts +116 -92
- package/integrations/mcp/enterpriseServer.ts +7 -23
- package/integrations/mcp/enterpriseStdioServer.cli.ts +4 -31
- package/integrations/mcp/preFlightCheck.ts +5 -67
- package/integrations/platform/detectPlatforms.ts +37 -0
- package/integrations/sdd/policy.ts +28 -20
- package/package.json +1 -1
- package/scripts/check-tracking-single-active.sh +1 -1
- package/scripts/consumer-menu-matrix-baseline-report-lib.ts +13 -38
- package/scripts/consumer-postinstall-resolve-args.cjs +44 -0
- package/scripts/consumer-postinstall.cjs +76 -21
- package/scripts/framework-menu-advanced-view-lib.ts +0 -49
- package/scripts/framework-menu-consumer-actions-lib.ts +28 -4
- package/scripts/framework-menu-consumer-preflight-hints.ts +5 -2
- package/scripts/framework-menu-consumer-preflight-render.ts +0 -10
- package/scripts/framework-menu-consumer-preflight-run.ts +0 -23
- package/scripts/framework-menu-consumer-preflight-types.ts +0 -12
- package/scripts/framework-menu-consumer-runtime-actions.ts +87 -17
- package/scripts/framework-menu-consumer-runtime-audit.ts +36 -2
- package/scripts/framework-menu-consumer-runtime-evidence-classic.ts +140 -0
- package/scripts/framework-menu-consumer-runtime-lib.ts +2 -38
- package/scripts/framework-menu-consumer-runtime-menu.ts +4 -31
- package/scripts/framework-menu-consumer-runtime-types.ts +3 -5
- package/scripts/framework-menu-evidence-summary-lib.ts +1 -0
- package/scripts/framework-menu-evidence-summary-read.ts +57 -5
- package/scripts/framework-menu-evidence-summary-severity.ts +3 -1
- package/scripts/framework-menu-evidence-summary-types.ts +7 -0
- package/scripts/framework-menu-gate-lib.ts +9 -0
- package/scripts/framework-menu-layout-data.ts +5 -0
- package/scripts/framework-menu-matrix-baseline-lib.ts +15 -14
- package/scripts/framework-menu-matrix-canary-lib.ts +22 -1
- package/scripts/framework-menu-matrix-evidence-lib.ts +1 -0
- package/scripts/framework-menu-matrix-evidence-types.ts +13 -1
- package/scripts/framework-menu-matrix-runner-lib.ts +35 -0
- package/scripts/framework-menu-system-notifications-cause.ts +0 -3
- package/scripts/framework-menu-system-notifications-macos-swift-source.ts +24 -204
- package/scripts/framework-menu-system-notifications-macos.ts +4 -0
- package/scripts/framework-menu-system-notifications-payloads-blocked.ts +1 -1
- package/scripts/framework-menu-system-notifications-text.ts +1 -7
- package/scripts/framework-menu.ts +3 -24
- package/scripts/package-install-smoke-consumer-git-repo-lib.ts +1 -10
- package/scripts/package-install-smoke-consumer-npm-lib.ts +9 -46
- package/scripts/pumuki-full-surface-smoke-lib.ts +37 -0
- package/scripts/pumuki-full-surface-smoke.ts +346 -0
- package/scripts/pumuki-smoke-installed-wrapper.cjs +31 -0
- package/integrations/evidence/trackingContract.ts +0 -17
- package/integrations/gate/governanceActionCatalog.ts +0 -275
- package/integrations/lifecycle/bootstrapManifest.ts +0 -248
- package/integrations/lifecycle/cliGovernanceConsole.ts +0 -69
- package/integrations/lifecycle/governanceNextAction.ts +0 -171
- package/integrations/lifecycle/governanceObservationSnapshot.ts +0 -369
- package/integrations/lifecycle/trackingState.ts +0 -403
- package/integrations/mcp/alignedPlatformGate.ts +0 -232
- package/integrations/mcp/readMcpPrePushStdin.ts +0 -7
- package/scripts/build-ruralgo-s1-evidence-pack.ts +0 -85
- package/scripts/ruralgo-s1-evidence-pack-lib.ts +0 -200
|
@@ -401,10 +401,6 @@ const astDetectorRegistry: ReadonlyArray<ASTDetectorRegistryEntry> = [
|
|
|
401
401
|
{ detect: TS.hasSetTimeoutStringCallback, ruleId: 'heuristics.ts.set-timeout-string.ast', code: 'HEURISTICS_SET_TIMEOUT_STRING_AST', message: 'AST heuristic detected setTimeout with a string callback.' },
|
|
402
402
|
{ detect: TS.hasSetIntervalStringCallback, ruleId: 'heuristics.ts.set-interval-string.ast', code: 'HEURISTICS_SET_INTERVAL_STRING_AST', message: 'AST heuristic detected setInterval with a string callback.' },
|
|
403
403
|
{ detect: TS.hasAsyncPromiseExecutor, ruleId: 'heuristics.ts.new-promise-async.ast', code: 'HEURISTICS_NEW_PROMISE_ASYNC_AST', message: 'AST heuristic detected async Promise executor usage.' },
|
|
404
|
-
{ detect: TS.hasMagicNumberLiteral, locateLines: TS.findMagicNumberLiteralLines, ruleId: 'heuristics.ts.magic-number.ast', code: 'HEURISTICS_MAGIC_NUMBER_AST', message: 'AST heuristic detected magic number usage.' },
|
|
405
|
-
{ detect: TS.hasProductionMockArtifactUsage, locateLines: TS.findProductionMockArtifactUsageLines, ruleId: 'heuristics.ts.production-mock-artifact.ast', code: 'HEURISTICS_PRODUCTION_MOCK_ARTIFACT_AST', message: 'AST heuristic detected test doubles imported or required in production backend code.' },
|
|
406
|
-
{ detect: TS.hasAnemicDomainModel, locateLines: TS.findAnemicDomainModelLines, ruleId: 'heuristics.ts.anemic-domain-model.ast', code: 'HEURISTICS_ANEMIC_DOMAIN_MODEL_AST', message: 'AST heuristic detected an anemic domain model.' },
|
|
407
|
-
{ detect: TS.hasControllerBusinessLogic, locateLines: TS.findControllerBusinessLogicLines, ruleId: 'heuristics.ts.controller-business-logic.ast', code: 'HEURISTICS_CONTROLLER_BUSINESS_LOGIC_AST', message: 'AST heuristic detected business logic inside a controller.' },
|
|
408
404
|
{ detect: TS.hasWithStatement, ruleId: 'heuristics.ts.with-statement.ast', code: 'HEURISTICS_WITH_STATEMENT_AST', message: 'AST heuristic detected with-statement usage.' },
|
|
409
405
|
{ detect: TS.hasDeleteOperator, ruleId: 'heuristics.ts.delete-operator.ast', code: 'HEURISTICS_DELETE_OPERATOR_AST', message: 'AST heuristic detected delete-operator usage.' },
|
|
410
406
|
{ detect: TS.hasDebuggerStatement, ruleId: 'heuristics.ts.debugger.ast', code: 'HEURISTICS_DEBUGGER_AST', message: 'AST heuristic detected debugger statement usage.' },
|
|
@@ -3,7 +3,7 @@ import test from 'node:test';
|
|
|
3
3
|
import { typescriptRules } from './typescript';
|
|
4
4
|
|
|
5
5
|
test('typescriptRules define reglas heurísticas locked para plataforma generic', () => {
|
|
6
|
-
assert.equal(typescriptRules.length,
|
|
6
|
+
assert.equal(typescriptRules.length, 19);
|
|
7
7
|
|
|
8
8
|
const ids = typescriptRules.map((rule) => rule.id);
|
|
9
9
|
assert.deepEqual(ids, [
|
|
@@ -16,10 +16,6 @@ test('typescriptRules define reglas heurísticas locked para plataforma generic'
|
|
|
16
16
|
'heuristics.ts.set-timeout-string.ast',
|
|
17
17
|
'heuristics.ts.set-interval-string.ast',
|
|
18
18
|
'heuristics.ts.new-promise-async.ast',
|
|
19
|
-
'heuristics.ts.magic-number.ast',
|
|
20
|
-
'heuristics.ts.production-mock-artifact.ast',
|
|
21
|
-
'heuristics.ts.anemic-domain-model.ast',
|
|
22
|
-
'heuristics.ts.controller-business-logic.ast',
|
|
23
19
|
'heuristics.ts.with-statement.ast',
|
|
24
20
|
'heuristics.ts.delete-operator.ast',
|
|
25
21
|
'heuristics.ts.debugger.ast',
|
|
@@ -37,22 +33,6 @@ test('typescriptRules define reglas heurísticas locked para plataforma generic'
|
|
|
37
33
|
byId.get('heuristics.ts.empty-catch.ast')?.then.code,
|
|
38
34
|
'HEURISTICS_EMPTY_CATCH_AST'
|
|
39
35
|
);
|
|
40
|
-
assert.equal(
|
|
41
|
-
byId.get('heuristics.ts.magic-number.ast')?.then.code,
|
|
42
|
-
'HEURISTICS_MAGIC_NUMBER_AST'
|
|
43
|
-
);
|
|
44
|
-
assert.equal(
|
|
45
|
-
byId.get('heuristics.ts.production-mock-artifact.ast')?.then.code,
|
|
46
|
-
'HEURISTICS_PRODUCTION_MOCK_ARTIFACT_AST'
|
|
47
|
-
);
|
|
48
|
-
assert.equal(
|
|
49
|
-
byId.get('heuristics.ts.anemic-domain-model.ast')?.then.code,
|
|
50
|
-
'HEURISTICS_ANEMIC_DOMAIN_MODEL_AST'
|
|
51
|
-
);
|
|
52
|
-
assert.equal(
|
|
53
|
-
byId.get('heuristics.ts.controller-business-logic.ast')?.then.code,
|
|
54
|
-
'HEURISTICS_CONTROLLER_BUSINESS_LOGIC_AST'
|
|
55
|
-
);
|
|
56
36
|
assert.equal(
|
|
57
37
|
byId.get('heuristics.ts.debugger.ast')?.then.code,
|
|
58
38
|
'HEURISTICS_DEBUGGER_AST'
|
|
@@ -163,78 +163,6 @@ export const typescriptRules: RuleSet = [
|
|
|
163
163
|
code: 'HEURISTICS_NEW_PROMISE_ASYNC_AST',
|
|
164
164
|
},
|
|
165
165
|
},
|
|
166
|
-
{
|
|
167
|
-
id: 'heuristics.ts.magic-number.ast',
|
|
168
|
-
description: 'Detects repeated magic number usage in TypeScript/TSX production files.',
|
|
169
|
-
severity: 'WARN',
|
|
170
|
-
platform: 'generic',
|
|
171
|
-
locked: true,
|
|
172
|
-
when: {
|
|
173
|
-
kind: 'Heuristic',
|
|
174
|
-
where: {
|
|
175
|
-
ruleId: 'heuristics.ts.magic-number.ast',
|
|
176
|
-
},
|
|
177
|
-
},
|
|
178
|
-
then: {
|
|
179
|
-
kind: 'Finding',
|
|
180
|
-
message: 'AST heuristic detected magic number usage.',
|
|
181
|
-
code: 'HEURISTICS_MAGIC_NUMBER_AST',
|
|
182
|
-
},
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
id: 'heuristics.ts.production-mock-artifact.ast',
|
|
186
|
-
description: 'Detects imports or requires of mocks/fakes/spies/stubs in TypeScript/TSX runtime code.',
|
|
187
|
-
severity: 'WARN',
|
|
188
|
-
platform: 'generic',
|
|
189
|
-
locked: true,
|
|
190
|
-
when: {
|
|
191
|
-
kind: 'Heuristic',
|
|
192
|
-
where: {
|
|
193
|
-
ruleId: 'heuristics.ts.production-mock-artifact.ast',
|
|
194
|
-
},
|
|
195
|
-
},
|
|
196
|
-
then: {
|
|
197
|
-
kind: 'Finding',
|
|
198
|
-
message: 'AST heuristic detected test doubles imported or required in production backend code.',
|
|
199
|
-
code: 'HEURISTICS_PRODUCTION_MOCK_ARTIFACT_AST',
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
id: 'heuristics.ts.anemic-domain-model.ast',
|
|
204
|
-
description: 'Detects domain classes with only constructor/getters/setters and no behavior.',
|
|
205
|
-
severity: 'WARN',
|
|
206
|
-
platform: 'generic',
|
|
207
|
-
locked: true,
|
|
208
|
-
when: {
|
|
209
|
-
kind: 'Heuristic',
|
|
210
|
-
where: {
|
|
211
|
-
ruleId: 'heuristics.ts.anemic-domain-model.ast',
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
then: {
|
|
215
|
-
kind: 'Finding',
|
|
216
|
-
message: 'AST heuristic detected an anemic domain model.',
|
|
217
|
-
code: 'HEURISTICS_ANEMIC_DOMAIN_MODEL_AST',
|
|
218
|
-
},
|
|
219
|
-
},
|
|
220
|
-
{
|
|
221
|
-
id: 'heuristics.ts.controller-business-logic.ast',
|
|
222
|
-
description: 'Detects controller handlers with branching or business flow in TypeScript backend code.',
|
|
223
|
-
severity: 'WARN',
|
|
224
|
-
platform: 'generic',
|
|
225
|
-
locked: true,
|
|
226
|
-
when: {
|
|
227
|
-
kind: 'Heuristic',
|
|
228
|
-
where: {
|
|
229
|
-
ruleId: 'heuristics.ts.controller-business-logic.ast',
|
|
230
|
-
},
|
|
231
|
-
},
|
|
232
|
-
then: {
|
|
233
|
-
kind: 'Finding',
|
|
234
|
-
message: 'AST heuristic detected business logic inside a controller.',
|
|
235
|
-
code: 'HEURISTICS_CONTROLLER_BUSINESS_LOGIC_AST',
|
|
236
|
-
},
|
|
237
|
-
},
|
|
238
166
|
{
|
|
239
167
|
id: 'heuristics.ts.with-statement.ast',
|
|
240
168
|
description: 'Detects with-statement usage in TypeScript/TSX production files.',
|
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
|
-
- `
|
|
40
|
-
- Quiero
|
|
41
|
-
-
|
|
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
|
-
-
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
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
|
|
|
@@ -250,13 +250,13 @@ const { data } = await supabase
|
|
|
250
250
|
|
|
251
251
|
### Anti-patterns a EVITAR:
|
|
252
252
|
❌ **God classes** - Servicios con >500 líneas
|
|
253
|
+
❌ **Anemic domain models** - Entidades solo con getters/setters
|
|
253
254
|
❌ **Magic numbers** - Usar constantes con nombres descriptivos
|
|
254
|
-
❌ **Mocks en producción** - Usar fakes/spies de test; en runtime productivo, solo adaptadores y datos reales
|
|
255
|
-
❌ **Anemic domain models** - Entidades con comportamiento, no solo getters/setters
|
|
256
|
-
❌ **Lógica en controllers** - Mover lógica de negocio a casos de uso/servicios
|
|
257
255
|
❌ **Callback hell** - Usar async/await
|
|
258
256
|
❌ **Hardcoded values** - Config en variables de entorno
|
|
257
|
+
❌ **Mocks en producción** - Solo datos reales
|
|
259
258
|
❌ **try-catch silenciosos** - Siempre loggear o propagar (AST: common.error.empty_catch)
|
|
259
|
+
❌ **Lógica en controllers** - Mover a servicios/use cases
|
|
260
260
|
|
|
261
261
|
### Principio fundamental:
|
|
262
262
|
✅ **"Measure twice, cut once"** - Planificar arquitectura, dependencias y flujo de datos antes de implementar. Analizar impacto en BD, caché y performance.
|
|
@@ -6,11 +6,48 @@ 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-
|
|
9
|
+
### 2026-04-24 (v6.3.115)
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
- **
|
|
13
|
-
-
|
|
11
|
+
- **`issues` canónicos también para `WARN`:** `status` y `doctor` ya no dejan `issues=[]` cuando la evidencia operativa real está en atención (`WARN`) pero aún no bloquea el gate.
|
|
12
|
+
- **Cierre útil de `PUMUKI-INC-084` en la línea publicada:** el consumer puede automatizar tanto estados `BLOCK` como `WARN` sin recombinar `attention_codes` y `human_summary_preview` por su cuenta.
|
|
13
|
+
- **`postinstall` vuelve a ser instalable en consumers reales:** la release evita el ciclo en `repoState` que rompía `npm install pumuki@6.3.114`.
|
|
14
|
+
- **Rollout recomendado:** publicar `pumuki@6.3.115`, repin inmediato en `RuralGo` y revalidar `status --json` / `doctor --json` comprobando que la evidencia `WARN` ya aparece dentro de `issues`.
|
|
15
|
+
|
|
16
|
+
### 2026-04-22 (v6.3.108)
|
|
17
|
+
|
|
18
|
+
- **MCP enterprise visible desde la baseline publicada:** la línea `main` deja de exigir opt-in adicional para exponer `ai_gate_check`, `pre_flight_check` y `auto_execute_ai_start` en el catálogo enterprise.
|
|
19
|
+
- **Menos gap entre governance y flujo real del editor/agente:** cuando `status`/`doctor` ya están bloqueando, el consumer pasa a ver antes la misma capa MCP que materializa el enforcement perceptible de `PRE_WRITE`.
|
|
20
|
+
- **Rollout recomendado:** publicar `pumuki@6.3.108`, repin inmediato en `RuralGo` y revalidar `status`, `doctor` y el arranque MCP/agentic sobre un repo con `PUMUKI-INC-079` reportada.
|
|
21
|
+
|
|
22
|
+
### 2026-04-22 (v6.3.107)
|
|
23
|
+
|
|
24
|
+
- **Sesión SDD expirada sin semántica ambigua:** la línea publicada deja de diagnosticar sesiones vencidas como `active=true` con `valid=false`; ahora las proyecta como inactivas y mantiene la señal de expiración con `remainingSeconds=0`.
|
|
25
|
+
- **Refresh reproducible de sesiones caducadas:** si el `changeId` sigue siendo válido, `session --refresh` vuelve a servir para recuperar la sesión sin exigir un `session --open` innecesario.
|
|
26
|
+
- **Rollout recomendado:** publicar `pumuki@6.3.107`, repin inmediato en `RuralGo` y revalidar `sdd validate --stage=PRE_WRITE --json` comprobando que `status.session.active=false`, `valid=false` y que la remediación siga permitiendo refresh sobre el mismo `changeId`.
|
|
27
|
+
|
|
28
|
+
### 2026-04-22 (v6.3.106)
|
|
29
|
+
|
|
30
|
+
- **Cierre útil del literal residual en RuralGo:** `sdd validate --stage=PRE_WRITE --json` ya no recomienda activar SDD con `pumuki@latest`; devuelve el mismo runtime versionado que está diagnosticando.
|
|
31
|
+
- **Guía de sesión SDD alineada:** `session --refresh` y `session --open` quedan versionados para evitar drift en repos consumidores.
|
|
32
|
+
- **Rollout recomendado:** publicar `pumuki@6.3.106`, repin inmediato en `RuralGo` y revalidar `sdd validate --stage=PRE_WRITE --json` comprobando `activation_command` fijo a `6.3.106`.
|
|
33
|
+
|
|
34
|
+
### 2026-04-22 (v6.3.105)
|
|
35
|
+
|
|
36
|
+
- **Remediación reproducible en la línea publicada:** las rutas bloqueantes de `PRE_WRITE` dejan de sugerir `pumuki@latest` y fijan la versión efectiva del runtime al construir `next_action.command`.
|
|
37
|
+
- **Cobertura MCP alineada:** `auto_execute_ai_start` devuelve las mismas remediaciones versionadas que `sdd validate` para evidence invalid/stale, `active_rule_ids` vacío y policy reconcile estricto.
|
|
38
|
+
- **Rollout recomendado:** publicar `pumuki@6.3.105`, repin inmediato en `RuralGo` y revalidar el command contract de `PRE_WRITE` en `sdd validate`, `auto_execute_ai_start` y hooks reales.
|
|
39
|
+
|
|
40
|
+
### 2026-04-22 (v6.3.104)
|
|
41
|
+
|
|
42
|
+
- **RuralGo hub-aware diagnostics:** `TRACKING_CANONICAL_IN_PROGRESS_INVALID` pasa a enriquecer su mensaje usando `docs/RURALGO_SEGUIMIENTO.md` cuando ese hub es el board canónico del consumer.
|
|
43
|
+
- **Compatibilidad con tablas del hub:** el parser reconoce filas `| 🚧 | TASK_ID |` y las devuelve como entradas activas accionables.
|
|
44
|
+
- **Rollout recomendado:** publicar `pumuki@6.3.104`, repin inmediato en `RuralGo` y revalidar `status` / `doctor` / `pumuki-pre-write` con doble fila `🚧` temporal en el hub canónico.
|
|
45
|
+
|
|
46
|
+
### 2026-04-22 (v6.3.103)
|
|
47
|
+
|
|
48
|
+
- **Tracking canónico accionable:** `status`, `doctor` y el gate repo-policy enriquecen `TRACKING_CANONICAL_IN_PROGRESS_INVALID` con referencias a las entradas activas detectadas en el board del consumer.
|
|
49
|
+
- **PRE_WRITE menos ambiguo:** cuando un warning de higiene de worktree convive con un bloqueo duro, el runtime imprime `warning-summary` separado del `block-summary`.
|
|
50
|
+
- **Rollout recomendado:** publicar `pumuki@6.3.103`, repin inmediato en `RuralGo` y revalidar `status` / `doctor` / `git commit` sobre un board con varias filas `🚧 reported activo`.
|
|
14
51
|
|
|
15
52
|
### 2026-04-22 (v6.3.102)
|
|
16
53
|
|
|
@@ -174,7 +174,7 @@ Interpretation contract:
|
|
|
174
174
|
- `consumerInstalled`: version installed in the consumer repository.
|
|
175
175
|
- `lifecycleInstalled`: version recorded in managed lifecycle metadata.
|
|
176
176
|
- `driftWarning`: compact human-readable explanation when those values diverge.
|
|
177
|
-
- `alignmentCommand`: exact remediation command to align dependency and lifecycle state with the current runtime version.
|
|
177
|
+
- `alignmentCommand`: exact remediation command to align dependency and lifecycle state with the current runtime version.
|
|
178
178
|
- `pathExecutionHazard`: boolean flag raised when the repo root contains the platform `PATH` delimiter and `npx/npm exec` can fail to resolve `pumuki`.
|
|
179
179
|
- `pathExecutionWarning`: compact warning explaining why `PATH` resolution is unsafe in that repo.
|
|
180
180
|
- `pathExecutionWorkaroundCommand`: safe local-node entrypoint to use when `pathExecutionHazard=true`.
|
|
@@ -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
|
|
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
|
|
package/docs/product/USAGE.md
CHANGED
|
@@ -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
|
|
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
|
|
253
|
-
Blocked notifications
|
|
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
|
|
|
@@ -403,7 +439,7 @@ How to read it:
|
|
|
403
439
|
- `lifecycleInstalled`: version persisted in managed lifecycle state.
|
|
404
440
|
- `source`: source chosen to compute `effective`.
|
|
405
441
|
- `driftWarning`: compact explanation when those values diverge.
|
|
406
|
-
- `alignmentCommand`: exact command to align consumer dependency and lifecycle state with the current runtime.
|
|
442
|
+
- `alignmentCommand`: exact command to align consumer dependency and lifecycle state with the current runtime.
|
|
407
443
|
- `pathExecutionHazard`: tells you whether the repo root itself can break `PATH`-based execution.
|
|
408
444
|
- `pathExecutionWarning`: compact explanation of that hazard.
|
|
409
445
|
- `pathExecutionWorkaroundCommand`: safe local-node entrypoint to use when `PATH` execution is unsafe.
|
|
@@ -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:
|
|
@@ -1,29 +1,25 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Diseño pedagógico y seguimiento — Curso Pumuki (Stack My Architecture)
|
|
2
2
|
|
|
3
|
-
|
|
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
4
|
|
|
5
|
-
|
|
5
|
+
No sustituye el espejo de producto en [`plan-activo-de-trabajo.md`](./plan-activo-de-trabajo.md).
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
## Leyenda operativa
|
|
8
|
+
|
|
9
|
+
- ✅ Entregado en repo curso + coherente con USAGE/INSTALLATION
|
|
10
|
+
- 🚧 Única tarea activa (máx. 1)
|
|
9
11
|
- ⏳ Pendiente
|
|
10
12
|
- ⛔ Bloqueado
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
---
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
- Actualizar estados al cerrar fases o al desbloquear dependencias.
|
|
16
|
-
- Repos objetivo: `stack-my-architecture-pumuki` (curso), `stack-my-architecture-hub` (publicación), enlaces en `stack-my-architecture-governance` y `stack-my-architecture-SDD`.
|
|
17
|
-
- Producto de referencia: repo `ast-intelligence-hooks` (paquete npm `pumuki`). Documentación canónica: `README.md`, `docs/product/USAGE.md`, `docs/product/INSTALLATION.md`.
|
|
16
|
+
## 1. Para quién es y qué problema resuelve
|
|
18
17
|
|
|
19
|
-
|
|
18
|
+
**Quién:** desarrollador o tech lead que debe **vivir** con hooks, CI y (a veces) agentes; no auditor de slides.
|
|
20
19
|
|
|
21
|
-
|
|
22
|
-
- **`courseId` propuesto:** `stack-my-architecture-pumuki` (alinear con hub y progress sync).
|
|
23
|
-
- **Versión mínima `pumuki` (MVP):** `>= 6.3.71` (ajustar al publicar el curso si hay release posterior).
|
|
24
|
-
- **Lab de práctica:** variante o fork de **GovernanceKit** (Governance) o **HelpdeskSDD** (SDD); documentado en `00-preparacion/02-lab-governancekit-helpdesksdd.md` del repo del curso.
|
|
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.
|
|
25
21
|
|
|
26
|
-
|
|
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.
|
|
27
23
|
|
|
28
24
|
- **Cierre local y release gate:** `build-hub.sh --mode strict` + smoke runtime en verde.
|
|
29
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).
|
|
@@ -32,31 +28,91 @@ Iniciativa formativa: quinto curso del ecosistema Stack My Architecture. **No**
|
|
|
32
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).
|
|
33
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).
|
|
34
30
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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/
|
|
18
|
-
|
|
19
|
-
|
|
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.
|
|
@@ -174,30 +174,6 @@ const registryByRuleId: Record<string, SkillsDetectorBinding> = {
|
|
|
174
174
|
'skills.backend.no-god-classes': heuristicDetector('typescript.god-class', [
|
|
175
175
|
'heuristics.ts.god-class-large-class.ast',
|
|
176
176
|
]),
|
|
177
|
-
'skills.backend.guideline.backend.callback-hell-usar-async-await': heuristicDetector(
|
|
178
|
-
'typescript.new-promise-async',
|
|
179
|
-
['heuristics.ts.new-promise-async.ast']
|
|
180
|
-
),
|
|
181
|
-
'skills.backend.guideline.backend.try-catch-silenciosos-siempre-loggear-o-propagar':
|
|
182
|
-
heuristicDetector('typescript.empty-catch', ['heuristics.ts.empty-catch.ast']),
|
|
183
|
-
'skills.backend.guideline.backend.hardcoded-values-config-en-variables-de-entorno':
|
|
184
|
-
heuristicDetector('typescript.hardcoded-secret-token', [
|
|
185
|
-
'heuristics.ts.hardcoded-secret-token.ast',
|
|
186
|
-
]),
|
|
187
|
-
'skills.backend.guideline.backend.magic-numbers-usar-constantes-con-nombres-descriptivos':
|
|
188
|
-
heuristicDetector('typescript.magic-number', ['heuristics.ts.magic-number.ast']),
|
|
189
|
-
'skills.backend.guideline.backend.mocks-en-produccion-usar-fakes-spies-de-test':
|
|
190
|
-
heuristicDetector('typescript.production-mock-artifact', [
|
|
191
|
-
'heuristics.ts.production-mock-artifact.ast',
|
|
192
|
-
]),
|
|
193
|
-
'skills.backend.guideline.backend.anemic-domain-models-entidades-con-comportamiento':
|
|
194
|
-
heuristicDetector('typescript.anemic-domain-model', [
|
|
195
|
-
'heuristics.ts.anemic-domain-model.ast',
|
|
196
|
-
]),
|
|
197
|
-
'skills.backend.guideline.backend.logica-en-controllers-mover-logica-de-negocio-a-casos-de-uso-servicios':
|
|
198
|
-
heuristicDetector('typescript.controller-business-logic', [
|
|
199
|
-
'heuristics.ts.controller-business-logic.ast',
|
|
200
|
-
]),
|
|
201
177
|
'skills.frontend.no-empty-catch': heuristicDetector('typescript.empty-catch', [
|
|
202
178
|
'heuristics.ts.empty-catch.ast',
|
|
203
179
|
]),
|