specatlas 0.1.4 → 0.1.6

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/dist/bin.js CHANGED
@@ -9914,7 +9914,7 @@ function deriveState(input) {
9914
9914
  blockedBy.push(`evidencia ${scenariosEvidenced}/${deltaScenarios.length}`);
9915
9915
  return { state: "built", blockedBy, nextAction: next(`satlas verify ${change.slug}`, "Registrar evidencia por escenario"), progress };
9916
9916
  }
9917
- if (lane === "full" && cfg.gates.review.mode === "blocking" && !change.verify) {
9917
+ if (lane === "full" && cfg.gates.review.mode === "blocking" && !change.reviewPath) {
9918
9918
  blockedBy.push("review pendiente");
9919
9919
  return { state: "verified", blockedBy, nextAction: next(`/satlas.review ${change.slug}`, "Revisi\xF3n de c\xF3digo", true), progress };
9920
9920
  }
@@ -10102,8 +10102,8 @@ async function loadSpecs(sddDir) {
10102
10102
  }
10103
10103
  return out;
10104
10104
  }
10105
- async function loadChange(root, slug) {
10106
- const dir = path4.join(root, SDD_DIR, "changes", slug);
10105
+ async function loadChange(root, slug, relDir) {
10106
+ const dir = path4.join(root, SDD_DIR, "changes", relDir ?? slug);
10107
10107
  const diagnostics = [];
10108
10108
  const change = { slug, dir, diagnostics };
10109
10109
  const metaFile = path4.join(dir, "meta.yaml");
@@ -10125,6 +10125,8 @@ async function loadChange(root, slug) {
10125
10125
  }
10126
10126
  const planFile = path4.join(dir, "plan.md");
10127
10127
  if (await exists(planFile)) change.planPath = planFile;
10128
+ const reviewFile = path4.join(dir, "review.md");
10129
+ if (await exists(reviewFile)) change.reviewPath = reviewFile;
10128
10130
  const tasksFile = path4.join(dir, "tasks.md");
10129
10131
  const tasksRaw = await readTextIfExists(tasksFile);
10130
10132
  if (tasksRaw !== void 0) {
@@ -10165,7 +10167,14 @@ async function loadWorkspace(root) {
10165
10167
  changes.push(change);
10166
10168
  diagnostics.push(...change.diagnostics);
10167
10169
  }
10168
- return { workspace: { root, sddDir, specs, changes, diagnostics }, config };
10170
+ const archived = [];
10171
+ const archivedDir = path4.join(sddDir, "changes", "archive");
10172
+ if (await isDirectory(archivedDir)) {
10173
+ for (const entry of await listDirs(archivedDir)) {
10174
+ archived.push(await loadChange(root, entry.replace(/^\d{4}-\d{2}-/, ""), path4.join("archive", entry)));
10175
+ }
10176
+ }
10177
+ return { workspace: { root, sddDir, specs, changes, archived, diagnostics }, config };
10169
10178
  }
10170
10179
  async function ensureSddDirs(sddDir) {
10171
10180
  const created = [];
@@ -13443,9 +13452,9 @@ async function runArchive(ctx) {
13443
13452
  diagnostics: [
13444
13453
  {
13445
13454
  code: "ATLAS-ARCHIVE-001",
13446
- severity: "error",
13447
- message: `Archivar "${slug}" pliega los deltas en la spec viva y mueve el cambio al hist\xF3rico.`,
13448
- suggestion: "Revisa con `satlas archive <slug> --dry-run` y confirma con `--yes`"
13455
+ severity: "warning",
13456
+ message: `Confirmaci\xF3n requerida: archivar "${slug}" pliega sus deltas en la spec viva y mueve el cambio al hist\xF3rico.`,
13457
+ suggestion: `Revisa primero con \`satlas archive ${slug} --dry-run\` y confirma con \`satlas archive ${slug} --yes\``
13449
13458
  }
13450
13459
  ]
13451
13460
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specatlas",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
4
4
  "description": "SpecAtlas: kernel determinista de Spec-Driven Development (CLI)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "devDependencies": {
42
42
  "@specatlas/adapters": "0.1.1",
43
- "@specatlas/core": "0.1.2"
43
+ "@specatlas/core": "0.1.4"
44
44
  },
45
45
  "scripts": {
46
46
  "typecheck": "tsc --noEmit",
@@ -26,14 +26,14 @@ El contenido se escribe en **{{LANGUAGE_NAME}}**.
26
26
 
27
27
  1. Lee `.sdd/constitution.md`, `.sdd/glossary.md` y las specs vivas de `.sdd/specs/**/spec.md` que toquen el dominio.
28
28
  2. Si hay código existente relacionado, inspecciónalo solo para entender el comportamiento actual (AS-IS); no lo describas con tecnología en la spec.
29
- 3. Si falta información de negocio, **pregunta** (máximo 5 preguntas concretas) antes de escribir. No inventes reglas.
29
+ 3. Si falta información de negocio, **pregunta** (máximo 5 preguntas concretas) antes de escribir: incluye la **historia de usuario** («como <rol>, quiero <acción>, para <beneficio>») cuando no esté clara. No inventes reglas.
30
30
  4. Redacta el delta con las secciones canónicas:
31
31
  - `## Requisitos agregados` (`ADDED`), `## Requisitos modificados` (`MODIFIED`), `## Requisitos eliminados` (`REMOVED`), `## Requisitos renombrados` (`RENAMED`).
32
32
  - Cada requisito: `### Requisito: REQ-<DOMINIO>-NNN — Título` (ids inmutables), prosa de negocio, reglas `- Regla BR-<DOMINIO>-NNN: ...` y escenarios `#### Escenario: REQ-<DOMINIO>-NNN-S1 — Título` con `- **CUANDO** ...` / `- **ENTONCES** ...`.
33
33
  - Incluye siempre escenarios de error, vacío, sin permiso y límites.
34
34
  - `MODIFIED` copia el bloque **completo** del requisito tal como está en la spec viva y lo edita.
35
35
  - `REMOVED` declara `- Motivo:` y `- Migración:`.
36
- 5. Completa `.sdd/changes/{{SLUG}}/proposal.md` en lenguaje de negocio (sin tecnología y sin dejar los textos entre paréntesis de la plantilla): **Por qué** (problema u oportunidad), **Qué cambia** (alcance funcional), **Fuera de alcance** (lo que no se hará) y **Cómo se mide el éxito** (indicadores observables).
36
+ 5. Completa `.sdd/changes/{{SLUG}}/proposal.md` en lenguaje de negocio (sin tecnología y sin dejar los textos entre paréntesis de la plantilla): **Por qué** (problema u oportunidad, con la historia de usuario), **Qué cambia** (alcance funcional), **Fuera de alcance** (lo que no se hará) y **Cómo se mide el éxito** (indicadores observables).
37
37
  6. Verifica con el CLI y corrige hasta que no haya errores:
38
38
 
39
39
  ```