@xera-ai/cli 0.10.0 → 0.11.1

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/index.js CHANGED
@@ -529,7 +529,7 @@ import {
529
529
  writeFileSync as writeFileSync3
530
530
  } from "fs";
531
531
  import { createRequire as createRequire2 } from "module";
532
- import { join as join4 } from "path";
532
+ import { dirname as dirname2, join as join4 } from "path";
533
533
  import * as p2 from "@clack/prompts";
534
534
  import pc3 from "picocolors";
535
535
  var require3 = createRequire2(import.meta.url);
@@ -558,6 +558,7 @@ async function initUpdateCommand(_opts) {
558
558
  pkg.scripts["xera:graph-backfill"] = "xera-internal graph-backfill";
559
559
  pkg.scripts["xera:graph-enrich"] = "xera-internal graph-enrich";
560
560
  pkg.scripts["xera:graph-render"] = "xera-internal graph-render";
561
+ pkg.scripts["xera:coverage-prepare"] = "xera-internal coverage-prepare";
561
562
  pkg.scripts["xera:impact-prepare"] = "xera-internal impact-prepare";
562
563
  pkg.scripts["xera:heal-prepare"] = "xera-internal heal-prepare";
563
564
  pkg.scripts["xera:disputes"] = "xera-internal disputes";
@@ -574,19 +575,27 @@ async function initUpdateCommand(_opts) {
574
575
  }
575
576
  const skillsSrc = require3.resolve("@xera-ai/skills/package.json");
576
577
  const newSkillsDir = join4(skillsSrc, "..");
577
- const localSkillsDir = join4(cwd, ".claude/skills");
578
+ const targetDirs = [join4(cwd, ".claude/skills"), join4(cwd, ".claude/commands")];
578
579
  for (const name of readdirSync2(newSkillsDir)) {
579
580
  if (!name.endsWith(".md"))
580
581
  continue;
581
582
  const newContent = readFileSync4(join4(newSkillsDir, name), "utf8");
582
- const localPath = join4(localSkillsDir, name);
583
- if (!existsSync4(localPath)) {
584
- writeFileSync3(localPath, newContent);
583
+ const localStates = targetDirs.map((dir) => {
584
+ const path = join4(dir, name);
585
+ if (!existsSync4(path))
586
+ return { path, state: "missing" };
587
+ const content = readFileSync4(path, "utf8");
588
+ return { path, state: content === newContent ? "same" : "diff" };
589
+ });
590
+ if (localStates.every((s) => s.state === "missing")) {
591
+ for (const { path } of localStates) {
592
+ mkdirSync2(dirname2(path), { recursive: true });
593
+ writeFileSync3(path, newContent);
594
+ }
585
595
  p2.log.info(`+ ${name}`);
586
596
  continue;
587
597
  }
588
- const localContent = readFileSync4(localPath, "utf8");
589
- if (localContent === newContent) {
598
+ if (localStates.every((s) => s.state === "same")) {
590
599
  p2.log.info(`= ${name}`);
591
600
  continue;
592
601
  }
@@ -598,7 +607,10 @@ async function initUpdateCommand(_opts) {
598
607
  ]
599
608
  });
600
609
  if (choice === "overwrite") {
601
- writeFileSync3(localPath, newContent);
610
+ for (const { path } of localStates) {
611
+ mkdirSync2(dirname2(path), { recursive: true });
612
+ writeFileSync3(path, newContent);
613
+ }
602
614
  p2.log.success(`overwrote ${name}`);
603
615
  } else {
604
616
  p2.log.warn(`kept local ${name}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xera-ai/cli",
3
- "version": "0.10.0",
3
+ "version": "0.11.1",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "xera": "./bin/xera"
@@ -15,8 +15,8 @@
15
15
  "typecheck": "tsc --noEmit"
16
16
  },
17
17
  "dependencies": {
18
- "@xera-ai/core": "^0.10.0",
19
- "@xera-ai/skills": "^0.10.0",
18
+ "@xera-ai/core": "^0.11.1",
19
+ "@xera-ai/skills": "^0.11.1",
20
20
  "@clack/prompts": "1.4.0",
21
21
  "cac": "7.0.0",
22
22
  "picocolors": "1.1.1"
@@ -22,4 +22,11 @@ export default defineConfig({
22
22
  },
23
23
  },
24
24
  },
25
+ // Coverage gap report (v0.8.0+). Run `/xera-coverage` to see UNCOVERED /
26
+ // STALE areas and AC gaps. See docs/CONFIGURATION.md for `criticalAreas`.
27
+ coverage: {
28
+ staleAfterDays: 30,
29
+ criticalAreas: [],
30
+ autoSnapshotOnCoverage: true,
31
+ },
25
32
  });
@@ -34,4 +34,11 @@ export default defineConfig({
34
34
  },
35
35
  },
36
36
  },
37
+ // Coverage gap report (v0.8.0+). Run `/xera-coverage` to see UNCOVERED /
38
+ // STALE areas and AC gaps. See docs/CONFIGURATION.md for `criticalAreas`.
39
+ coverage: {
40
+ staleAfterDays: 30,
41
+ criticalAreas: [],
42
+ autoSnapshotOnCoverage: true,
43
+ },
37
44
  });
@@ -1,5 +1,5 @@
1
1
  # Auto-publish xera graph viewer on every PR.
2
- # Generated by `xera init` (v0.6.3+).
2
+ # Generated by `xera init` (v0.6.3+, Coverage tab added in v0.8.1).
3
3
  name: xera graph viewer
4
4
  on:
5
5
  pull_request:
@@ -18,8 +18,11 @@ jobs:
18
18
  - name: Build graph snapshot
19
19
  run: bun run xera:graph-snapshot
20
20
  continue-on-error: true
21
- - name: Render viewer
22
- run: bun run xera:graph-render --out graph.html
21
+ - name: Build coverage report (v0.8.0+)
22
+ run: bun run xera:coverage-prepare --no-emit-event
23
+ continue-on-error: true
24
+ - name: Render viewer with Coverage tab
25
+ run: bun run xera:graph-render --include-coverage --out graph.html
23
26
  continue-on-error: true
24
27
  - name: Upload artifact
25
28
  uses: actions/upload-artifact@v4
@@ -31,4 +31,12 @@ export default defineConfig({
31
31
  {{/if}}
32
32
  },
33
33
  adapters: ['web'],
34
+ // Coverage gap report (v0.8.0+). Run `/xera-coverage` to see UNCOVERED /
35
+ // STALE areas and AC gaps. Marking areas as critical doubles their risk
36
+ // weight so business-critical paths surface even on low ticket activity.
37
+ coverage: {
38
+ staleAfterDays: 30,
39
+ criticalAreas: [],
40
+ autoSnapshotOnCoverage: true,
41
+ },
34
42
  });