specatlas 0.1.1 → 0.1.3

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
@@ -9681,7 +9681,7 @@ function checkTrace(input) {
9681
9681
  }
9682
9682
  }
9683
9683
  for (const sc of deltaScenarios) {
9684
- if (!coversExpanded.has(sc)) {
9684
+ if (taskById.size > 0 && !coversExpanded.has(sc)) {
9685
9685
  findings.push(
9686
9686
  diag("TRACE-002", "error", `El escenario ${sc} no est\xE1 cubierto por ninguna tarea`, {
9687
9687
  path: change.tasks?.path ?? change.delta?.path,
@@ -12781,6 +12781,7 @@ import path20 from "path";
12781
12781
 
12782
12782
  // ../adapters/dist/index.js
12783
12783
  import path18 from "path";
12784
+ import { stringify as stringifyYaml5 } from "yaml";
12784
12785
  import path22 from "path";
12785
12786
  async function loadWorkflow(workflowDir) {
12786
12787
  const phasesDir = path18.join(workflowDir, "phases");
@@ -12834,6 +12835,15 @@ var NO_SUBSTITUTION_NOTE = "<!-- Si al invocar indicaste un slug, \xFAsalo; si n
12834
12835
  function vars(language, slugToken, commandPrefix) {
12835
12836
  return { SLUG: slugToken, LANGUAGE: language, LANGUAGE_NAME: LANGUAGE_NAMES[language], SDD_DIR: ".sdd", COMMAND_PREFIX: commandPrefix };
12836
12837
  }
12838
+ function frontmatter(data, body) {
12839
+ const yaml2 = stringifyYaml5(data, { lineWidth: 0 }).trimEnd();
12840
+ return `---
12841
+ ${yaml2}
12842
+ ---
12843
+
12844
+ ${body}
12845
+ `;
12846
+ }
12837
12847
  function renderFor(ctx, phase, slugToken) {
12838
12848
  return renderPhase(phase.body, ctx.sources.snippets, vars(ctx.language, slugToken, ctx.commandPrefix));
12839
12849
  }
@@ -12862,23 +12872,12 @@ function compileOpencode(ctx) {
12862
12872
  files.push({
12863
12873
  target: "opencode",
12864
12874
  path: `.opencode/command/satlas-${phase.id}.md`,
12865
- content: `---
12866
- description: ${phase.description}
12867
- ---
12868
-
12869
- ${commandBody}
12870
- `
12875
+ content: frontmatter({ description: phase.description }, commandBody)
12871
12876
  });
12872
12877
  files.push({
12873
12878
  target: "opencode",
12874
12879
  path: `.opencode/skills/satlas-${phase.id}/SKILL.md`,
12875
- content: `---
12876
- name: satlas-${phase.id}
12877
- description: ${phase.description}
12878
- ---
12879
-
12880
- ${skillBody}
12881
- `
12880
+ content: frontmatter({ name: `satlas-${phase.id}`, description: phase.description }, skillBody)
12882
12881
  });
12883
12882
  }
12884
12883
  return files;
@@ -12891,23 +12890,12 @@ function compileClaudeCode(ctx) {
12891
12890
  files.push({
12892
12891
  target: "claude-code",
12893
12892
  path: `.claude/commands/satlas/${phase.id}.md`,
12894
- content: `---
12895
- description: ${phase.description}
12896
- ---
12897
-
12898
- ${commandBody}
12899
- `
12893
+ content: frontmatter({ description: phase.description }, commandBody)
12900
12894
  });
12901
12895
  files.push({
12902
12896
  target: "claude-code",
12903
12897
  path: `.claude/skills/satlas-${phase.id}/SKILL.md`,
12904
- content: `---
12905
- name: satlas-${phase.id}
12906
- description: ${phase.description}
12907
- ---
12908
-
12909
- ${skillBody}
12910
- `
12898
+ content: frontmatter({ name: `satlas-${phase.id}`, description: phase.description }, skillBody)
12911
12899
  });
12912
12900
  }
12913
12901
  return files;
@@ -12919,14 +12907,7 @@ function compileCursor(ctx) {
12919
12907
  files.push({
12920
12908
  target: "cursor",
12921
12909
  path: `.cursor/skills/satlas-${phase.id}/SKILL.md`,
12922
- content: `---
12923
- name: satlas-${phase.id}
12924
- description: ${phase.description}
12925
- disable-model-invocation: true
12926
- ---
12927
-
12928
- ${body}
12929
- `
12910
+ content: frontmatter({ name: `satlas-${phase.id}`, description: phase.description, "disable-model-invocation": true }, body)
12930
12911
  });
12931
12912
  files.push({
12932
12913
  target: "cursor",
@@ -12946,16 +12927,9 @@ function compileCopilot(ctx) {
12946
12927
  files.push({
12947
12928
  target: "copilot",
12948
12929
  path: `.github/prompts/satlas-${phase.id}.prompt.md`,
12949
- content: `---
12950
- description: ${phase.description}
12951
- name: satlas-${phase.id}
12952
- agent: agent
12953
- ---
12930
+ content: frontmatter({ description: phase.description, name: `satlas-${phase.id}`, agent: "agent" }, `${NO_SUBSTITUTION_NOTE}
12954
12931
 
12955
- ${NO_SUBSTITUTION_NOTE}
12956
-
12957
- ${body}
12958
- `
12932
+ ${body}`)
12959
12933
  });
12960
12934
  }
12961
12935
  files.push({ target: "copilot", path: ".github/copilot-instructions.md", content: agentsBlock(ctx, "copilot") });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specatlas",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "SpecAtlas: kernel determinista de Spec-Driven Development (CLI)",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -39,8 +39,8 @@
39
39
  "zod": "^3.24.1"
40
40
  },
41
41
  "devDependencies": {
42
- "@specatlas/adapters": "0.1.0",
43
- "@specatlas/core": "0.1.0"
42
+ "@specatlas/adapters": "0.1.1",
43
+ "@specatlas/core": "0.1.1"
44
44
  },
45
45
  "scripts": {
46
46
  "typecheck": "tsc --noEmit",
@@ -7,6 +7,7 @@ description: >-
7
7
  requires: []
8
8
  produces:
9
9
  - changes/<slug>/spec.md
10
+ - changes/<slug>/proposal.md
10
11
  arguments: true
11
12
  agent:
12
13
  mode: primary
@@ -32,20 +33,22 @@ El contenido se escribe en **{{LANGUAGE_NAME}}**.
32
33
  - Incluye siempre escenarios de error, vacío, sin permiso y límites.
33
34
  - `MODIFIED` copia el bloque **completo** del requisito tal como está en la spec viva y lo edita.
34
35
  - `REMOVED` declara `- Motivo:` y `- Migración:`.
35
- 5. Verifica con el CLI y corrige hasta que no haya errores:
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).
37
+ 6. Verifica con el CLI y corrige hasta que no haya errores:
36
38
 
37
39
  ```
38
40
  satlas validate --change {{SLUG}}
39
41
  ```
40
42
 
41
- 6. Reporta: número de requisitos y escenarios, supuestos, y las preguntas que quedaron abiertas.
43
+ 7. Reporta: número de requisitos y escenarios, supuestos, y las preguntas que quedaron abiertas.
42
44
 
43
45
  ## Prohibido
44
46
 
45
47
  - Nombres de tablas, campos, endpoints, clases, archivos, frameworks o librerías.
46
48
  - Adjetivos vagos ("rápido", "fácil", "varios", "robusto") sin un valor medible.
47
49
  - Renumerar ids existentes o reescribir un requisito aprobado sin pasar por `MODIFIED`/`REMOVED`.
50
+ - Dejar `proposal.md` con la plantilla sin completar.
48
51
 
49
52
  ## Salida
50
53
 
51
- `changes/{{SLUG}}/spec.md` validado, más un resumen para el usuario y la indicación de que la spec debe aprobarse (`satlas approve`) antes de planificar.
54
+ `changes/{{SLUG}}/spec.md` validado y `changes/{{SLUG}}/proposal.md` completo, más un resumen para el usuario y la indicación de que la spec debe aprobarse (`satlas approve`) antes de planificar.