specatlas 0.1.28 → 0.1.29

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 (2) hide show
  1. package/dist/bin.js +37 -2
  2. package/package.json +2 -2
package/dist/bin.js CHANGED
@@ -10443,12 +10443,43 @@ function parseLivingFix(content, file) {
10443
10443
  date: typeof data["date"] === "string" ? data["date"] : "",
10444
10444
  result: typeof data["result"] === "string" ? data["result"] : "pass",
10445
10445
  covers: coversOf(data["covers"]),
10446
- content: fm.body.trimStart()
10446
+ content: fm.body.trimStart(),
10447
+ source: "living"
10447
10448
  };
10448
10449
  if (typeof data["domain"] === "string") fix.domain = data["domain"];
10449
10450
  if (typeof data["title"] === "string") fix.title = data["title"];
10450
10451
  return fix;
10451
10452
  }
10453
+ async function archivedFixes(root, known) {
10454
+ const archiveDir = path4.join(root, ".sdd", "changes", "archive");
10455
+ const fixes = [];
10456
+ for (const entry of await listDirs(archiveDir)) {
10457
+ const dir = path4.join(archiveDir, entry);
10458
+ const fixFile = path4.join(dir, "fix.md");
10459
+ const fixRaw = await readTextIfExists(fixFile);
10460
+ if (fixRaw === void 0) continue;
10461
+ const metaFile = path4.join(dir, "meta.yaml");
10462
+ const metaRaw = await readTextIfExists(metaFile);
10463
+ const meta = metaRaw !== void 0 ? parseChangeMeta(metaRaw, metaFile).meta : void 0;
10464
+ if (meta?.lane !== "fix") continue;
10465
+ const slug = entry.replace(/^\d{4}-\d{2}-/, "");
10466
+ if (known.has(slug)) continue;
10467
+ const evidence = parseVerifyFile(fixRaw, fixFile).evidence;
10468
+ const fix = {
10469
+ slug,
10470
+ file: fixFile,
10471
+ date: /^(\d{4}-\d{2})/.exec(entry)?.[1] ?? "",
10472
+ result: evidence.some((e) => e.result === "pass") ? "pass" : evidence.length > 0 ? "fail" : "pending",
10473
+ covers: parseFixCovers(fixRaw),
10474
+ content: parseFrontmatter(fixRaw, fixFile).body.trimStart(),
10475
+ source: "archive"
10476
+ };
10477
+ if (meta.domain !== void 0) fix.domain = meta.domain;
10478
+ if (meta.title !== void 0) fix.title = meta.title;
10479
+ fixes.push(fix);
10480
+ }
10481
+ return fixes;
10482
+ }
10452
10483
  async function loadLivingFixes(root) {
10453
10484
  const dir = path4.join(root, LIVING_FIXES_DIR);
10454
10485
  const entries = (await listDir(dir)).filter((entry) => entry.toLowerCase().endsWith(".md")).sort();
@@ -10459,6 +10490,7 @@ async function loadLivingFixes(root) {
10459
10490
  if (content === void 0) continue;
10460
10491
  fixes.push(parseLivingFix(content, file));
10461
10492
  }
10493
+ fixes.push(...await archivedFixes(root, new Set(fixes.map((fix) => fix.slug))));
10462
10494
  return fixes.sort((a, b) => b.date.localeCompare(a.date) || b.slug.localeCompare(a.slug));
10463
10495
  }
10464
10496
  async function writeLivingFix(root, input) {
@@ -14979,6 +15011,7 @@ async function runAtlasFixes(_args, host) {
14979
15011
  slug: fix.slug,
14980
15012
  date: fix.date,
14981
15013
  result: fix.result,
15014
+ source: fix.source,
14982
15015
  domain: fix.domain,
14983
15016
  title: fix.title,
14984
15017
  covers: fix.covers,
@@ -15702,7 +15735,8 @@ async function runStatus(ctx) {
15702
15735
  lines.push(" (se llenan al archivar un fix)");
15703
15736
  } else {
15704
15737
  for (const fix of fixes) {
15705
- lines.push(` ${fix.date || "\u2014"} ${(fix.domain ?? "\u2014").padEnd(10)} ${fix.slug} \u2014 ${fix.result}`);
15738
+ const origin = fix.source === "archive" ? " (hist\xF3rico)" : "";
15739
+ lines.push(` ${fix.date || "\u2014"} ${(fix.domain ?? "\u2014").padEnd(10)} ${fix.slug} \u2014 ${fix.result}${origin}`);
15706
15740
  }
15707
15741
  }
15708
15742
  const diagnostics = [...workspace.diagnostics, ...advisory.diagnostics];
@@ -15717,6 +15751,7 @@ async function runStatus(ctx) {
15717
15751
  slug: fix.slug,
15718
15752
  date: fix.date,
15719
15753
  result: fix.result,
15754
+ source: fix.source,
15720
15755
  ...fix.domain !== void 0 ? { domain: fix.domain } : {},
15721
15756
  covers: fix.covers
15722
15757
  })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "specatlas",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
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.25"
43
+ "@specatlas/core": "0.1.26"
44
44
  },
45
45
  "scripts": {
46
46
  "typecheck": "tsc --noEmit",