specatlas 0.1.11 → 0.1.13
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 +38 -2
- package/package.json +2 -2
- package/workflow/phases/plan.md +1 -0
package/dist/bin.js
CHANGED
|
@@ -8867,7 +8867,37 @@ function renderMarkdown(markdown2, opts = {}) {
|
|
|
8867
8867
|
quote.push((lines[i] ?? "").replace(/^>\s?/, ""));
|
|
8868
8868
|
i += 1;
|
|
8869
8869
|
}
|
|
8870
|
-
|
|
8870
|
+
const joined = quote.join(" ");
|
|
8871
|
+
const labelRe = /(?:^|\s)([\p{L}][\p{L}\s/()-]{1,32}):\s/gu;
|
|
8872
|
+
const hits = [];
|
|
8873
|
+
let hitMatch;
|
|
8874
|
+
while ((hitMatch = labelRe.exec(joined)) !== null) {
|
|
8875
|
+
if (hitMatch[1].trim().split(/\s+/).length > 4) continue;
|
|
8876
|
+
hits.push({ start: hitMatch.index, end: hitMatch.index + hitMatch[0].length, label: hitMatch[1] });
|
|
8877
|
+
}
|
|
8878
|
+
const chips = [];
|
|
8879
|
+
const prose = [];
|
|
8880
|
+
let cursor = 0;
|
|
8881
|
+
for (let h = 0; h < hits.length; h += 1) {
|
|
8882
|
+
const hit = hits[h];
|
|
8883
|
+
const before = joined.slice(cursor, hit.start).replace(/[\s·]+$/u, "").trim();
|
|
8884
|
+
if (before) prose.push(before);
|
|
8885
|
+
const valueEnd = h + 1 < hits.length ? hits[h + 1].start : joined.length;
|
|
8886
|
+
let value = joined.slice(hit.end, valueEnd).replace(/[\s·]+$/u, "").trim();
|
|
8887
|
+
const sentenceBreak = /[·.]\s+(?=[\p{Lu}][\p{L}]+(?:\s+[\p{L}]+){3,})/u.exec(value);
|
|
8888
|
+
if (sentenceBreak) {
|
|
8889
|
+
const note = value.slice(sentenceBreak.index + 1).trim();
|
|
8890
|
+
if (note) prose.push(note);
|
|
8891
|
+
value = value.slice(0, sentenceBreak.index + 1);
|
|
8892
|
+
}
|
|
8893
|
+
chips.push(`<span class="meta-chip"><b>${inlineMarkdown(hit.label)}:</b> ${inlineMarkdown(value)}</span>`);
|
|
8894
|
+
cursor = valueEnd;
|
|
8895
|
+
}
|
|
8896
|
+
const tail = joined.slice(cursor).replace(/^[\s·]+/u, "").trim();
|
|
8897
|
+
if (tail) prose.push(tail);
|
|
8898
|
+
const chipLine = chips.length > 0 ? `<div class="meta-line">${chips.join("")}</div>` : "";
|
|
8899
|
+
const proseHtml = prose.length > 0 ? `<p>${inlineMarkdown(prose.join(" \xB7 "))}</p>` : "";
|
|
8900
|
+
out.push(`<blockquote>${chipLine}${proseHtml}</blockquote>`);
|
|
8871
8901
|
continue;
|
|
8872
8902
|
}
|
|
8873
8903
|
if (/^\|/.test(line) && /^\|[\s:|-]+\|$/.test(lines[i + 1] ?? "")) {
|
|
@@ -8889,7 +8919,13 @@ function renderMarkdown(markdown2, opts = {}) {
|
|
|
8889
8919
|
const items = [];
|
|
8890
8920
|
while (i < lines.length && /^\s*-\s+\[[ xX]\]\s+/.test(lines[i] ?? "")) {
|
|
8891
8921
|
const match = /^\s*-\s+\[([ xX])\]\s+(.*)$/.exec(lines[i] ?? "");
|
|
8892
|
-
|
|
8922
|
+
const done = match?.[1]?.toLowerCase() === "x";
|
|
8923
|
+
const segments = (match?.[2] ?? "").split(" \xB7 ");
|
|
8924
|
+
const title = segments.shift() ?? "";
|
|
8925
|
+
const meta = segments.length > 0 ? `<div class="task-meta">${segments.map((segment) => `<span class="meta-chip">${inlineMarkdown(segment)}</span>`).join("")}</div>` : "";
|
|
8926
|
+
items.push(
|
|
8927
|
+
`<li class="task-item${done ? " done" : ""}"><span class="task-box">${done ? "\u2611" : "\u2610"}</span> <span class="task-title">${inlineMarkdown(title)}</span>${meta}</li>`
|
|
8928
|
+
);
|
|
8893
8929
|
i += 1;
|
|
8894
8930
|
}
|
|
8895
8931
|
out.push(`<ul class="checklist">${items.join("")}</ul>`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specatlas",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.13",
|
|
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.
|
|
43
|
+
"@specatlas/core": "0.1.10"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"typecheck": "tsc --noEmit",
|
package/workflow/phases/plan.md
CHANGED
|
@@ -28,6 +28,7 @@ El contenido se escribe en **{{LANGUAGE_NAME}}**. El plan es interno: puede (y d
|
|
|
28
28
|
1. Lee `.sdd/changes/{{SLUG}}/spec.md`, `.sdd/constitution.md`, `.sdd/profiles/detected.yaml`, `.sdd/profiles/custom/*` y el código real que vayas a tocar (anclas AS-IS: existe / no existe / blast radius).
|
|
29
29
|
2. Escribe `plan.md` con las secciones canónicas:
|
|
30
30
|
1. Contexto AS-IS · 2. Enfoque técnico (con alternativas descartadas) · 3. **Diagramas** · 4. Diseño por capa/módulos · 5. Matriz de trazabilidad (REQ → tareas) · 6. Matriz de paridad AS-IS → TO-BE (solo refactors sustitutivos) · 7. Tareas (referencia) · 8. Riesgos y mitigaciones · 9. Rollback · 10. Dependencias y supuestos.
|
|
31
|
+
- **Encabezado**: antes de la sección 1, una cita con los metadatos **una clave por línea** — **Cambio**, **Carril**, **Dominio**, **Spec aprobada** y **Contrato visual** (si existe) — y una última línea: «Los artefactos aprobados no se editan: este plan y `tasks.md` son los únicos artefactos que produce esta fase.»
|
|
31
32
|
3. En `## 3. Diagramas` incluye los diagramas mermaid que el cambio necesite: `erDiagram` si toca datos, `sequenceDiagram` si hay integración/API/jobs, `flowchart` si hay proceso o validaciones, `stateDiagram-v2` si hay estados, `classDiagram` si el dominio no es trivial, diagrama de arquitectura si hay módulos nuevos.
|
|
32
33
|
4. Escribe `tasks.md` con la gramática canónica (separador ` · `):
|
|
33
34
|
- `## Bloque N — Título` y `- [ ] T<N>.<seq> Acción · Archivos: ruta · Cubre: REQ-…-S1 · Depende de: T<N>.<seq> · Reversión: cómo revertir`
|