sistema-multiagente-sdlc 1.2.1 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/README.md +52 -14
  3. package/migrations/1.3.0/up.mjs +14 -0
  4. package/migrations/1.4.0/README.md +8 -0
  5. package/migrations/1.4.0/up.mjs +14 -0
  6. package/package.json +1 -1
  7. package/schemas/sdlc.config.schema.json +1 -1
  8. package/scripts/validate-models-schema.mjs +25 -1
  9. package/src/cli.js +29 -3
  10. package/src/migrations.js +5 -1
  11. package/src/render.js +1 -1
  12. package/src/runtime.js +476 -0
  13. package/templates/.agents/skills/continua/SKILL.md +8 -0
  14. package/templates/.agents/skills/resume/SKILL.md +8 -0
  15. package/templates/.agents/skills/save/SKILL.md +8 -0
  16. package/templates/.claude/skills/continua/SKILL.md +18 -0
  17. package/templates/.claude/skills/resume/SKILL.md +18 -0
  18. package/templates/.claude/skills/save/SKILL.md +18 -0
  19. package/templates/.github/agents/analista-requisitos.agent.md +31 -0
  20. package/templates/.github/skills/continua/SKILL.md +18 -0
  21. package/templates/.github/skills/edge-case-hunter/SKILL.md +71 -0
  22. package/templates/.github/skills/resume/SKILL.md +18 -0
  23. package/templates/.github/skills/save/SKILL.md +18 -0
  24. package/templates/.sdlc/session.json +8 -0
  25. package/templates/.windsurf/skills/continua/SKILL.md +8 -0
  26. package/templates/.windsurf/skills/resume/SKILL.md +8 -0
  27. package/templates/.windsurf/skills/save/SKILL.md +8 -0
  28. package/templates/docs/agents/catalogo-comandos-proyecto.md +1 -1
  29. package/templates/manifest.yaml +30 -0
  30. package/templates/scripts/agent-skills.manifest.json +4 -0
  31. package/templates/scripts/continua.mjs +119 -0
  32. package/templates/scripts/continua.ps1 +11 -121
  33. package/templates/scripts/models.yaml +31 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # Changelog
2
2
 
3
+ ## [Unreleased]
4
+
5
+ _No hay cambios pendientes._
6
+
7
+ ## [1.4.0] — 2026-05-24
8
+
9
+ ### Added
10
+
11
+ - ADR `0004-codegraph-graphify-orden-canonico.md`: cierra la decisión pendiente de ADR 0002 y canoniza CodeGraph para estructura de código + Graphify para semántica documental/export Obsidian.
12
+ - Runtime Node multiagente como interfaz canónica: `sdlc session-start`, `resume`, `save`, `continua`, `memory-sync`, `validate-runtime` y `hooks install --post-merge-checkpoint`.
13
+ - `.sdlc/session.json` como estado generado de sesión para healthcheck y continuidad cross-IDE.
14
+ - Skills canónicas `resume`, `save` y `continua` bajo `.github/skills/` y mirrors para `.claude/`, `.agents/` y `.windsurf/`, todas apuntando al mismo CLI `sdlc`.
15
+ - `templates/scripts/continua.mjs` como implementación portable Node de continuidad; `continua.ps1` queda como wrapper Windows delgado.
16
+ - Migración `1.4.0` con marcador `.sdlc/migrations/1.4.0-applied.txt`.
17
+
18
+ ### Changed
19
+
20
+ - `sdlc doctor` y el runner de regresión validan la versión `1.4.0`.
21
+ - El manifest de skills gobernadas incluye `resume`, `save` y `continua`.
22
+ - La continuidad multiagente deja de depender de PowerShell como runtime primario; PowerShell queda para compatibilidad en Windows.
23
+
24
+ ### Tests
25
+
26
+ - Regresión extendida con smoke tests de `session-start`, `resume`, `save --no-mutate`, `continua`, `memory-sync --mode health`, `validate-runtime` y `hooks install`.
27
+
28
+ ## [1.3.0] — 2026-05-23
29
+
30
+ ### Added
31
+
32
+ - ADR `0002-codegraph-spike.md` (versión Propuesta inicial): aprobar evaluación de 7 días de [CodeGraph (colbymchenry)](https://github.com/colbymchenry/codegraph). Esta versión queda en el historial git; la versión vigente es la Aceptada del bloque "Changed" anterior.
33
+ - ADR `0003-per-phase-model-assignment.md`: extender `templates/scripts/models.yaml` con bloque opcional `phases:` para asignar modelos distintos a fases SDD (`sdd-explore`, `sdd-design`, `sdd-implement`, `sdd-review` o F0-F17). Reduce costo en exploración manteniendo precisión en F2-F3. Inspirado por el patrón `--profile-phase` de `gentle-ai`.
34
+ - `templates/scripts/models.yaml`: bloque `phases:` opt-in con defaults documentados (Haiku para `sdd-explore`, Opus para `sdd-design`, Sonnet para `sdd-implement`/`sdd-review`).
35
+ - Skill `edge-case-hunter`: checklist portable para revisar entradas límite, concurrencia, fallos parciales, dependencias, autorización y volumen antes de implementación.
36
+ - `analista-requisitos.agent.md`: protocolo de elicitación avanzada para historias ambiguas antes de pasar a diseño.
37
+
38
+ ### Changed
39
+
40
+ - ADR `0002-codegraph-spike.md` cambia de estado **Propuesta → Aceptada**. Se reemplaza la estrategia de "spike 7 días con benchmarks sintéticos obligatorios" por **"instalar y observar"**: la adopción es coexistencia con Graphify desde el día 1, sin slice dedicado, y la verificación del ahorro de tokens claimado por CodeGraph (94 % menos tool-calls según su README) se hará por observación natural durante varias sesiones reales. El ADR ahora documenta:
41
+ - Reglas concretas de coexistencia (Graphify-first para razonamiento humano y `enrich-us` 4.5; CodeGraph vía MCP para queries estructurales runtime).
42
+ - Triggers para abrir ADR 0004 (evidencia de ahorro real, cobertura de rutas framework, o costo operativo excesivo).
43
+ - Implementación operativa ya ejecutada en `FacturacionDian` con scope narrow (`apps/**/src` + `packages/**/src`, `.ts/.tsx`) para evitar el OOM del index default sobre un monorepo grande.
44
+ - Métricas del index inicial sobre `FacturacionDian`: 658 archivos, 7.954 nodes, 14.869 edges, 14.48 MB native SQLite.
45
+ - `scripts/validate-models-schema.mjs`: soporte para clave top-level `phases` opcional + verificación de shape `{ primary, fallback }` por fase. Bloque `phases:` declarado pero vacío produce error explícito.
46
+
47
+ ### Docs
48
+
49
+ - README: actualizada tabla `BMAD Comparison` con realidad V6 de BMAD-METHOD (module ecosystem BMM/BMB/TEA/BMGD/CIS, Skills Architecture, Sub-Agent inclusion, scale-adaptive, Discord community) y comparación side-by-side honesta. Datos tomados del README oficial v6 de `bmad-code-org/BMAD-METHOD`.
50
+ - README Roadmap v1.3.0: agregadas entradas `macos-latest` para `regression-install` matrix y bump de `actions/checkout@v5` + `actions/setup-node@v5` con `node-version: 24` antes del deprecation deadline de GitHub (Node 20 deprecated jun 2026, removed sep 2026).
51
+
3
52
  ## [1.2.1] — 2026-05-18
4
53
 
5
54
  ### UX fix — `init` sin `--target` usa cwd
package/README.md CHANGED
@@ -47,6 +47,28 @@ node ./bin/sdlc.js install --target ../legacy-project --mode legacy --project-na
47
47
  node ./bin/sdlc.js doctor --target ../legacy-project --json
48
48
  ```
49
49
 
50
+ ## Runtime Multiagente
51
+
52
+ Desde `1.4.0`, `sdlc` incluye comandos ejecutables para continuidad cross-IDE. El runtime primario es Node; los wrappers PowerShell solo existen para ergonomia Windows.
53
+
54
+ ```powershell
55
+ sdlc session-start --target . --json
56
+ sdlc resume --target . --markdown
57
+ sdlc save --target . --event manual --json
58
+ sdlc continua --target . --platform codex --json
59
+ sdlc memory-sync --target . --mode health --json
60
+ sdlc validate-runtime --target . --json
61
+ sdlc hooks install --target . --post-merge-checkpoint --json
62
+ ```
63
+
64
+ Reglas base:
65
+
66
+ - `session-start` crea `.sdlc/session.json` con healthcheck de Headroom, CodeGraph, Graphify, caveman, vault y slice actual.
67
+ - `resume` es solo lectura y recompone contexto en orden repo -> CodeGraph -> Graphify -> vault.
68
+ - `save` escribe checkpoints locales en el vault; no promueve GitHub Issues, OpenSpec ni PRs sin gate humano.
69
+ - `hooks install --post-merge-checkpoint` instala un hook local `post-merge` que ejecuta `sdlc save --event post-merge`.
70
+ - `memory-sync --mode nightly --apply` importa chats y exporta Graphify al vault; no crea checkpoints automaticos.
71
+
50
72
  ## Modes
51
73
 
52
74
  | Mode | Use when | Adds |
@@ -122,21 +144,35 @@ All external installs are opt-in. Scripts default to dry-run or local-only behav
122
144
 
123
145
  ## BMAD Comparison
124
146
 
125
- | Feature | BMAD-METHOD | SistemaMultiagente_SDLC |
147
+ Side-by-side de los dos frameworks. La intención no es competir sino aclarar dónde se solapan y dónde cada uno se especializa. Datos de BMAD tomados de su README oficial v6 (`bmad-code-org/BMAD-METHOD`, npm `bmad-method`).
148
+
149
+ | Feature | BMAD-METHOD v6 | SistemaMultiagente_SDLC v1.4.0 |
126
150
  | --- | --- | --- |
127
- | AI-driven agents | 12+ personas | 8 personas plus extensible roadmap |
128
- | Workflows | agile | SDD waterfall by slice, agile by release |
129
- | Scale-adaptive | yes | reserved for v1.3.0 |
130
- | Party mode | yes | roundtable opt-in planned for v1.3.0 |
131
- | Help CLI | bmad-help | `sdlc next` planned for v1.3.0 |
132
- | Modules/packs | yes | packs marketplace planned for v2.0.0 |
133
- | Governance validators | not core | 14 validators |
134
- | OpenSpec/SDD | not core | integrated |
135
- | Readiness L1/L2/L3 | not core | integrated |
136
- | Multi-agent lock | not core | TTL platform-context lock |
137
- | Brownfield-first | no | yes |
138
- | Migration system | not core | backup and rollback |
139
- | Sanitization validators | not core | no-personal-paths and template-sanitization |
151
+ | License | MIT | MIT |
152
+ | Runtime requisitos | Node ≥20.12, Python ≥3.10, `uv` | Node ≥18, PowerShell (pwsh/powershell), Git |
153
+ | Install command | `npx bmad-method install` (interactive) o `--yes --modules --tools` (CI) | `npx sistema-multiagente-sdlc init` (cwd default desde v1.2.1) |
154
+ | Scope principal | AI-driven agile development | AI-assisted SDLC con governance enterprise y SDD |
155
+ | Workflows | 34+ agile workflows (BMM core) | SDD waterfall por slice + agile por release (F0-F17 phases) |
156
+ | Scale-adaptive | sí, automático (bug → enterprise) | scale hint activo desde v1.3.0 |
157
+ | Agentes/personas | 12+ personas (PM, Architect, Dev, UX, …) | 8 personas activas + roadmap extensible |
158
+ | Party / collaboration mode | yes (multiple personas en sesión) | roundtable opt-in planned v1.3.0 |
159
+ | Help CLI / next-step coach | `bmad-help` skill | `sdlc doctor` (state checks); `sdlc next` planned v1.3.0 |
160
+ | Modules / ecosystem | BMM (core) + BMB (builder) + TEA (test architect) + BMGD (game dev) + CIS (creative) | mode-based (`greenfield` / `legacy`) + extensible packs planned v2.0.0 |
161
+ | Skills architecture | (V6 + Sub-Agent inclusion + Cross-Platform Agent Team) | skills mirroring across `.claude/`, `.agents/`, `.windsurf/` (`bootstrap-agent-skills.ps1`) |
162
+ | Custom agent/workflow builder | BMad Builder v1 | personas `.agent.md` + validators (`validate-agent-persona-schema`) |
163
+ | Dev Loop automation | en roadmap V6 | `phase-graph.yaml` + rework label-driven + lock TTL |
164
+ | Brownfield-first | no | sí (legacy mode con research obligatorio antes de proposal) |
165
+ | Governance validators | not core | 14 validators (config, personal-paths, template-sanitization, manifest-integrity, governance-precedence, …) |
166
+ | OpenSpec / SDD | not core | integrated (capacidades canónicas en `openspec/specs/`) |
167
+ | Readiness L1/L2/L3 + matriz NFR | not core | integrated (`business-production-readiness` spec) |
168
+ | Migration system + rollback | not core | backup automático + `sdlc upgrade --to-version` + `sdlc rollback --to <id>` |
169
+ | Multi-agent lock | not core | TTL `platform-context.json` lock |
170
+ | Sanitization de paths/templates | not core | `validate:no-personal-paths` + `validate:template-sanitization` |
171
+ | Provenance (SLSA) | n/d explícito | sí, SLSA v1 + signatures vía OIDC GitHub (workflow `publish.yml`) |
172
+ | Community | Discord abierto, YouTube, X | GitHub Issues + Discussions (Discord no necesario) |
173
+ | Trademark | BMad / BMAD-METHOD trademarks of BMad Code, LLC | sin restricción explícita más allá de MIT |
174
+
175
+ Lectura corta: BMAD lidera en agile breadth y community (12+ personas, 34+ workflows, 5 módulos, Discord activo, Skills Architecture V6). SistemaMultiagente_SDLC lidera en governance + brownfield + SDD + validators (14) + migration system + readiness L1/L2/L3 + sanitization. Ambos pueden coexistir: BMAD orquesta; SistemaMultiagente_SDLC orquesta **y verifica**.
140
176
 
141
177
  ## Roadmap
142
178
 
@@ -148,6 +184,8 @@ v1.3.0:
148
184
  - calibration extensions
149
185
  - roundtable opt-in
150
186
  - docs site
187
+ - regression-install matrix: agregar `macos-latest` (triple coverage ubuntu + windows + macos)
188
+ - bump `actions/checkout@v5` + `actions/setup-node@v5` con `node-version: 24`; deadline GitHub: Node 20 deprecated jun 2026, removed sep 2026
151
189
 
152
190
  v2.0.0:
153
191
 
@@ -0,0 +1,14 @@
1
+ export function up(files = {}) {
2
+ const extra = {
3
+ ".sdlc/migrations/1.3.0-applied.txt": "Migration 1.3.0 applied by SistemaMultiagente_SDLC.\ngenerated-by-sdlc\n"
4
+ };
5
+
6
+ const configPath = ".sdlc/config.json";
7
+ if (typeof files[configPath] === "string") {
8
+ const config = JSON.parse(files[configPath]);
9
+ config.frameworkVersion = "1.3.0";
10
+ extra[configPath] = `${JSON.stringify(config, null, 2)}\n`;
11
+ }
12
+
13
+ return extra;
14
+ }
@@ -0,0 +1,8 @@
1
+ # Migration 1.4.0
2
+
3
+ Adds the executable runtime layer for multi-agent continuity:
4
+
5
+ - Node-first `sdlc` runtime commands.
6
+ - Generated `.sdlc/session.json`.
7
+ - Cross-IDE `resume`, `save`, and `continua` skills.
8
+ - Thin PowerShell wrappers for Windows convenience.
@@ -0,0 +1,14 @@
1
+ export function up(files = {}) {
2
+ const extra = {
3
+ ".sdlc/migrations/1.4.0-applied.txt": "Migration 1.4.0 applied by SistemaMultiagente_SDLC.\ngenerated-by-sdlc\n"
4
+ };
5
+
6
+ const configPath = ".sdlc/config.json";
7
+ if (typeof files[configPath] === "string") {
8
+ const config = JSON.parse(files[configPath]);
9
+ config.frameworkVersion = "1.4.0";
10
+ extra[configPath] = `${JSON.stringify(config, null, 2)}\n`;
11
+ }
12
+
13
+ return extra;
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sistema-multiagente-sdlc",
3
- "version": "1.2.1",
3
+ "version": "1.4.0",
4
4
  "description": "Framework reusable para instalar un SDLC multiagente gobernado en repos greenfield o legacy.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,7 @@
21
21
  "type": "string",
22
22
  "enum": ["bug", "feature", "epic", "platform"],
23
23
  "default": "feature",
24
- "description": "Reserved for v1.3.0 adaptive scale. Not consumed in v1.2.0."
24
+ "description": "Scale hint used by v1.3.0+ for adaptive planning and agent routing."
25
25
  },
26
26
  "stack": {
27
27
  "type": "object",
@@ -25,7 +25,31 @@ for (const platform of ["claude_code", "codex", "copilot", "windsurf"]) {
25
25
  requirePattern(new RegExp(`^ ${platform}:\\s*\\n default:\\s*\\S+`, "m"), `platform ${platform} requires default`);
26
26
  }
27
27
 
28
- const allowedTopLevel = new Set(["version", "updated", "roles", "platforms", "fallbacks"]);
28
+ // Optional `phases:` block (v1.3.0+). When present, each phase entry must
29
+ // declare primary and fallback model identifiers, same shape as `roles`.
30
+ if (/^phases:\s*$/m.test(content)) {
31
+ const phasesBlockRegex = /^phases:\s*$([\s\S]*?)(?=^[A-Za-z0-9_-]+:|\Z)/m;
32
+ const phasesBlockMatch = phasesBlockRegex.exec(content);
33
+ if (phasesBlockMatch) {
34
+ const phasesBody = phasesBlockMatch[1];
35
+ const phaseEntryRegex = /^ ([A-Za-z0-9_-]+):\s*$/gm;
36
+ let phaseMatch;
37
+ let phasesFound = 0;
38
+ while ((phaseMatch = phaseEntryRegex.exec(phasesBody)) !== null) {
39
+ phasesFound += 1;
40
+ const phaseName = phaseMatch[1];
41
+ const phaseShape = new RegExp(`^ ${phaseName}:\\s*\\n primary:\\s*\\S+\\n fallback:\\s*\\S+`, "m");
42
+ if (!phaseShape.test(phasesBody)) {
43
+ errors.push(`phase ${phaseName} requires primary and fallback`);
44
+ }
45
+ }
46
+ if (phasesFound === 0) {
47
+ errors.push("phases block declared but contains no phase entries");
48
+ }
49
+ }
50
+ }
51
+
52
+ const allowedTopLevel = new Set(["version", "updated", "roles", "platforms", "phases", "fallbacks"]);
29
53
  for (const line of content.split("\n")) {
30
54
  const match = /^([A-Za-z0-9_-]+):/.exec(line);
31
55
  if (match && !allowedTopLevel.has(match[1])) {
package/src/cli.js CHANGED
@@ -17,6 +17,15 @@ import {
17
17
  } from "./file-utils.js";
18
18
  import { buildManagedFiles, defaultConfig, FRAMEWORK_VERSION, validateConfigShape } from "./render.js";
19
19
  import { applyMigrations, migrationsToRun, SUPPORTED_VERSIONS } from "./migrations.js";
20
+ import {
21
+ commandContinua,
22
+ commandHooks,
23
+ commandMemorySync,
24
+ commandResume,
25
+ commandSave,
26
+ commandSessionStart,
27
+ commandValidateRuntime
28
+ } from "./runtime.js";
20
29
 
21
30
  const EXIT_OK = 0;
22
31
  const EXIT_ERROR = 1;
@@ -44,7 +53,10 @@ function parseArgs(argv) {
44
53
  }
45
54
  positionals.push(token);
46
55
  }
47
- result.command = positionals[0] ?? "help";
56
+ result.positionals = positionals;
57
+ result.command = positionals[0] === "hooks" && positionals[1] === "install"
58
+ ? "hooks install"
59
+ : positionals[0] ?? "help";
48
60
  return result;
49
61
  }
50
62
 
@@ -392,7 +404,7 @@ function collectDoctorEnhancements(target, config) {
392
404
  }
393
405
 
394
406
  if (!config || !config.scale) {
395
- findings.push({ level: "error", code: "scale-missing", message: "config.scale is required in v1.2.0" });
407
+ findings.push({ level: "error", code: "scale-missing", message: "config.scale is required in v1.3.0" });
396
408
  } else {
397
409
  findings.push({ level: "info", code: "scale-present", message: `scale=${config.scale}` });
398
410
  }
@@ -622,7 +634,7 @@ function commandHelp() {
622
634
  exitCode: EXIT_OK,
623
635
  payload: {
624
636
  status: "ok",
625
- message: "Uso: sdlc <init|install|upgrade|rollback|doctor|diff|prune-backups|migrate-config> [--target <repo>] [--json]\nSi --target se omite, se usa el directorio actual (process.cwd())."
637
+ message: "Uso: sdlc <init|install|upgrade|rollback|doctor|diff|prune-backups|migrate-config|session-start|resume|save|continua|memory-sync|validate-runtime|hooks install> [--target <repo>] [--json]\nSi --target se omite, se usa el directorio actual (process.cwd())."
626
638
  }
627
639
  };
628
640
  }
@@ -645,6 +657,20 @@ export function run(argv) {
645
657
  return commandPruneBackups(parsed.options);
646
658
  case "migrate-config":
647
659
  return commandMigrateConfig(parsed.options);
660
+ case "session-start":
661
+ return commandSessionStart(parsed.options);
662
+ case "resume":
663
+ return commandResume(parsed.options);
664
+ case "save":
665
+ return commandSave(parsed.options);
666
+ case "continua":
667
+ return commandContinua(parsed.options);
668
+ case "memory-sync":
669
+ return commandMemorySync(parsed.options);
670
+ case "validate-runtime":
671
+ return commandValidateRuntime(parsed.options);
672
+ case "hooks install":
673
+ return commandHooks(parsed.options);
648
674
  case "help":
649
675
  default:
650
676
  return commandHelp();
package/src/migrations.js CHANGED
@@ -1,11 +1,15 @@
1
1
  import { up as up_1_0_1 } from "../migrations/1.0.1/up.mjs";
2
2
  import { up as up_1_1_0 } from "../migrations/1.1.0/up.mjs";
3
3
  import { up as up_1_2_0 } from "../migrations/1.2.0/up.mjs";
4
+ import { up as up_1_3_0 } from "../migrations/1.3.0/up.mjs";
5
+ import { up as up_1_4_0 } from "../migrations/1.4.0/up.mjs";
4
6
 
5
7
  const REGISTRY = [
6
8
  { version: "1.0.1", up: up_1_0_1 },
7
9
  { version: "1.1.0", up: up_1_1_0 },
8
- { version: "1.2.0", up: up_1_2_0 }
10
+ { version: "1.2.0", up: up_1_2_0 },
11
+ { version: "1.3.0", up: up_1_3_0 },
12
+ { version: "1.4.0", up: up_1_4_0 }
9
13
  ];
10
14
 
11
15
  function semverTuple(v) {
package/src/render.js CHANGED
@@ -2,7 +2,7 @@ import path from "node:path";
2
2
  import { renderTemplates } from "./template-loader.js";
3
3
  export { validateConfigShape } from "./config-validator.js";
4
4
 
5
- export const FRAMEWORK_VERSION = "1.2.0";
5
+ export const FRAMEWORK_VERSION = "1.4.0";
6
6
  export const SCHEMA_VERSION = 1;
7
7
  export const SUPPORTED_MODES = new Set(["greenfield", "legacy"]);
8
8