buddy-agent-harness 0.15.0 → 0.17.0

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 (34) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/.cursor-plugin/plugin.json +1 -1
  4. package/dist/cli.mjs +203 -52
  5. package/dist/index.d.mts +35 -4
  6. package/dist/index.d.mts.map +1 -1
  7. package/dist/index.mjs +159 -8
  8. package/dist/index.mjs.map +1 -1
  9. package/dist/skill-scripts/doctor.mjs +18 -6
  10. package/dist/skill-scripts/init.mjs +18 -6
  11. package/dist/skill-scripts/mcp.mjs +18 -6
  12. package/dist/skill-scripts/reference.mjs +18 -6
  13. package/llms.txt +27 -26
  14. package/package.json +1 -1
  15. package/plugin.json +1 -1
  16. package/skills/doctor-buddy-agent-harness/SKILL.md +1 -1
  17. package/skills/doctor-buddy-agent-harness/scripts/doctor.mjs +18 -6
  18. package/skills/enhance/SKILL.md +3 -3
  19. package/skills/enhance/references/session-scope.history.md +9 -0
  20. package/skills/enhance/references/session-scope.md +75 -0
  21. package/skills/init-buddy-agent-harness/SKILL.md +1 -1
  22. package/skills/init-buddy-agent-harness/scripts/doctor.mjs +18 -6
  23. package/skills/init-buddy-agent-harness/scripts/init.mjs +18 -6
  24. package/skills/reference/SKILL.md +5 -3
  25. package/skills/reference/references/create.md +15 -4
  26. package/skills/reference/scripts/reference.mjs +18 -6
  27. package/skills/repair/SKILL.md +1 -1
  28. package/skills/repair/scripts/doctor.mjs +18 -6
  29. package/skills/repair/scripts/mcp.mjs +18 -6
  30. package/src/governance-overrides/governance-overrides.ts +32 -4
  31. package/src/governance-overrides/governance.command.ts +3 -0
  32. package/src/references/create-reference.ts +57 -0
  33. package/src/references/reference-document.ts +7 -1
  34. package/src/references/reference.command.ts +132 -10
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "Initialize standards-based agent configuration across agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "Initialize standards-based agent configuration across agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "Initialize standards-based agent configuration across agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
package/dist/cli.mjs CHANGED
@@ -26942,6 +26942,11 @@ function stripMergeComments(body) {
26942
26942
  const inFence = fenceTracker();
26943
26943
  return body.split("\n").filter((line) => inFence(line) || !mergeCommentPattern.test(line)).join("\n");
26944
26944
  }
26945
+ /** Each heading with a single `#` outside a code fence, as written. */
26946
+ function titleHeadings(body) {
26947
+ const inFence = fenceTracker();
26948
+ return body.split("\n").filter((line) => !inFence(line) && headingPattern.exec(line)?.[1] === "#");
26949
+ }
26945
26950
  function sectionKey(title) {
26946
26951
  return title.trim().replace(/\s+/g, " ").toLowerCase();
26947
26952
  }
@@ -27367,6 +27372,7 @@ function searchReferences(query, layers, options = {}) {
27367
27372
  }
27368
27373
  //#endregion
27369
27374
  //#region src/governance-overrides/governance-overrides.ts
27375
+ /** @deprecated Use `managedReferencesDir`. Removed in the next major version. */
27370
27376
  function managedGovernancesDir(platform, programData) {
27371
27377
  if (platform === "darwin") return "/Library/Application Support/BuddyAgentHarness/governances";
27372
27378
  if (platform === "win32") return join(programData || "C:\\ProgramData", "BuddyAgentHarness", "governances");
@@ -27375,6 +27381,8 @@ function managedGovernancesDir(platform, programData) {
27375
27381
  /**
27376
27382
  * Still read below the layer above, so a machine already using it keeps working; reported as
27377
27383
  * deprecated so an admin knows to move it.
27384
+ *
27385
+ * @deprecated Use `managedReferencesDir`. Removed in the next major version.
27378
27386
  */
27379
27387
  function deprecatedManagedGovernancesDir(platform, programData) {
27380
27388
  if (platform === "darwin") return "/Library/Application Support/UniPlugin/governances";
@@ -27400,6 +27408,7 @@ function packageGovernancesDir(from = fileURLToPath(import.meta.url)) {
27400
27408
  dir = parent;
27401
27409
  }
27402
27410
  }
27411
+ /** @deprecated Use `referenceLayers`. Removed in the next major version. */
27403
27412
  function governanceLayers({ root, home, platform, programData }) {
27404
27413
  return [
27405
27414
  {
@@ -27427,6 +27436,8 @@ function governanceLayers({ root, home, platform, programData }) {
27427
27436
  /**
27428
27437
  * Filters by scope rather than slicing the list, so a layer added later can't quietly become an
27429
27438
  * override by position.
27439
+ *
27440
+ * @deprecated Use `referenceLayers`. Removed in the next major version.
27430
27441
  */
27431
27442
  function overrideLayers(layers) {
27432
27443
  return layers.filter((layer) => layer.scope !== "package");
@@ -27435,6 +27446,8 @@ const namePattern = /^[a-z0-9]+(?:[-.][a-z0-9]+)*$/i;
27435
27446
  /**
27436
27447
  * Rejects rather than sanitizes — silently answering a different question is how untrusted input
27437
27448
  * reads a file outside the layer.
27449
+ *
27450
+ * @deprecated Use `parseReferenceName`. Removed in the next major version.
27438
27451
  */
27439
27452
  function parseGovernanceName(value) {
27440
27453
  if (value.endsWith(".md")) throw new Error(`"${value}" names a file. Ask for the governance by name, without the .md extension.`);
@@ -27456,7 +27469,11 @@ function documentNames(dir) {
27456
27469
  return [];
27457
27470
  }
27458
27471
  }
27459
- /** The first layer that holds the name wins; the rest are not read. */
27472
+ /**
27473
+ * The first layer that holds the name wins; the rest are not read.
27474
+ *
27475
+ * @deprecated Use `resolveReference`. Removed in the next major version.
27476
+ */
27460
27477
  function resolveGovernance(name, layers) {
27461
27478
  for (const { scope, dir } of layers) {
27462
27479
  const path = join(dir, `${name}.md`);
@@ -27469,7 +27486,11 @@ function resolveGovernance(name, layers) {
27469
27486
  };
27470
27487
  }
27471
27488
  }
27472
- /** Every name any layer holds, each reported at the layer that would win, sorted by name. */
27489
+ /**
27490
+ * Every name any layer holds, each reported at the layer that would win, sorted by name.
27491
+ *
27492
+ * @deprecated Use `listReferences`. Removed in the next major version.
27493
+ */
27473
27494
  function listGovernances(layers) {
27474
27495
  const found = /* @__PURE__ */ new Map();
27475
27496
  for (const { scope, dir } of layers) for (const name of documentNames(dir)) if (!found.has(name)) found.set(name, {
@@ -28355,6 +28376,7 @@ const overridesOnlyOption = {
28355
28376
  description: "Resolve only the project, user, and machine-wide layers. Never returns a governance this package ships, and exits non-zero when no layer has one.",
28356
28377
  type: optionalType(booleanType())
28357
28378
  };
28379
+ /** @deprecated Use `referenceCommand`. Removed in the next major version. */
28358
28380
  const governanceCommand = command({
28359
28381
  name: "governance",
28360
28382
  description: "Deprecated: use `reference`. Read the governance documents the project, user, and machine-wide override layers hold. Read-only.",
@@ -28438,6 +28460,54 @@ const governanceCommand = command({
28438
28460
  })]
28439
28461
  });
28440
28462
  //#endregion
28463
+ //#region src/references/create-reference.ts
28464
+ /** No `#` title: `merge-sections` matches by heading path, so a title would hold every section under it. */
28465
+ const defaultTemplate = `---
28466
+ description: What this reference covers, and when an agent should read it.
28467
+ tags: [topic]
28468
+ ---
28469
+
28470
+ ## Overview
28471
+
28472
+ Write the guidance here. Give each topic its own top-level \`##\` section.
28473
+ `;
28474
+ function readTemplate(path) {
28475
+ if (path === void 0) return parseTemplate(defaultTemplate, "the default template");
28476
+ let content;
28477
+ try {
28478
+ content = readFileSync(path, "utf8");
28479
+ } catch (error) {
28480
+ throw new Error(`cannot read the template ${path}: ${error.message}`);
28481
+ }
28482
+ return parseTemplate(content, `the template ${path}`);
28483
+ }
28484
+ function parseTemplate(content, label) {
28485
+ let mapping = true;
28486
+ const { metadata, body } = parseDocument(content, () => {
28487
+ mapping = false;
28488
+ });
28489
+ if (!mapping) throw new Error(`${label} has frontmatter that is not a YAML mapping.`);
28490
+ return {
28491
+ content,
28492
+ metadata,
28493
+ body
28494
+ };
28495
+ }
28496
+ /** Adds one line and changes nothing else, so the result still reads as the template it came from. */
28497
+ function withMergeSections(content) {
28498
+ const match = frontmatterPattern.exec(content);
28499
+ if (!match) return `---\nmerge: merge-sections\n---\n\n${content}`;
28500
+ const open = match[0].indexOf("\n") + 1;
28501
+ const newline = match[0][open - 2] === "\r" ? "\r\n" : "\n";
28502
+ const end = open + match[1].length;
28503
+ return `${content.slice(0, end)}${newline}merge: merge-sections${content.slice(end)}`;
28504
+ }
28505
+ function templateWarnings({ metadata, body }) {
28506
+ const warnings = titleHeadings(body).map((heading) => `"${heading.trim()}" is a heading with one hash; merge-sections matches by heading path, so an override would replace or duplicate the whole document. Use top-level ## sections.`);
28507
+ if (typeof metadata["description"] !== "string" || !metadata["description"].trim()) warnings.push("the reference has no `description` in its frontmatter; `list` and `search` show it blank.");
28508
+ return warnings;
28509
+ }
28510
+ //#endregion
28441
28511
  //#region src/references/reference.command.ts
28442
28512
  const rootOption = {
28443
28513
  description: "Directory the project tier is read from, and each folder above it up to the repository root. Defaults to the current directory.",
@@ -28456,6 +28526,12 @@ function fail(error, fallback) {
28456
28526
  process.stderr.write(`error: ${error instanceof Error ? error.message : fallback}\n`);
28457
28527
  return exitCodes.error;
28458
28528
  }
28529
+ function traceOf(resolved, home) {
28530
+ return resolved.trace.map(({ description: _, ...step }) => ({
28531
+ ...step,
28532
+ path: collapseHome(home, step.path)
28533
+ }));
28534
+ }
28459
28535
  function showEntry(resolved, home, suggestions, trace) {
28460
28536
  const entry = {
28461
28537
  name: resolved.name,
@@ -28477,10 +28553,7 @@ function showEntry(resolved, home, suggestions, trace) {
28477
28553
  if (resolved.status === "missing") entry.suggestions = suggestions;
28478
28554
  if (resolved.status === "ambiguous") entry.plugins = resolved.plugins;
28479
28555
  entry.warnings = resolved.warnings;
28480
- if (trace) entry.trace = resolved.trace.map(({ description: _, ...step }) => ({
28481
- ...step,
28482
- path: collapseHome(home, step.path)
28483
- }));
28556
+ if (trace) entry.trace = traceOf(resolved, home);
28484
28557
  return entry;
28485
28558
  }
28486
28559
  function missReason(entry) {
@@ -28634,78 +28707,156 @@ function callerStatus(resolved) {
28634
28707
  if (resolved.status === "missing") return "used";
28635
28708
  return resolved.status === "ambiguous" ? "not read — the name is ambiguous" : "shadowed";
28636
28709
  }
28710
+ const referenceWhereCommand = command({
28711
+ name: "where",
28712
+ description: "List the project and user files an override of a reference can be written to, highest precedence first, with the copy each overrides and who it applies to.",
28713
+ arguments: [{
28714
+ name: "name",
28715
+ description: "Reference name, without the `.md` extension; `<plugin>/<name>` picks one plugin.",
28716
+ type: stringType()
28717
+ }],
28718
+ options: {
28719
+ root: rootOption,
28720
+ caller: {
28721
+ description: "Folder of the skill that loads the reference, so its own copy is reported as the reference skill's Load mode reads it.",
28722
+ type: optionalType(stringType())
28723
+ },
28724
+ format: listFormatOption
28725
+ },
28726
+ async run(args) {
28727
+ try {
28728
+ const format = parseFormat(args.format);
28729
+ const name = parseReferenceName(args.name);
28730
+ const home = homedir();
28731
+ const layers = await layersFor(args, home);
28732
+ const root = resolve(args.root ?? process.cwd());
28733
+ const display = (path) => collapseHome(home, path);
28734
+ const resolved = resolveReference(name, layers, { display });
28735
+ const traced = layersFor$2(name, layers);
28736
+ const slots = [];
28737
+ for (const [index, step] of resolved.trace.entries()) {
28738
+ const layer = traced[index];
28739
+ const scope = slotScopes[step.tier];
28740
+ if (!scope || (layer.status || step.tier === "plugin") && !step.found) continue;
28741
+ const path = step.found ? step.path : join(layer.dir, `${name.name}.md`);
28742
+ slots.push({
28743
+ layer: step.tier === "plugin" ? `plugin ${step.plugin}` : step.tier,
28744
+ path: step.tier === "project" ? relative(root, path) : display(path),
28745
+ status: slotStatus(step.outcome),
28746
+ scope
28747
+ });
28748
+ }
28749
+ const copy = args.caller === void 0 ? void 0 : callerCopy(resolve(args.caller), name.name);
28750
+ if (copy) slots.push({
28751
+ layer: "caller",
28752
+ path: display(copy),
28753
+ status: callerStatus(resolved),
28754
+ scope: callerScope
28755
+ });
28756
+ const report = {
28757
+ name: name.name,
28758
+ root: display(root),
28759
+ slots,
28760
+ merge: mergeNote
28761
+ };
28762
+ if (resolved.status === "ambiguous") report.plugins = resolved.plugins;
28763
+ if (resolved.warnings.length) report.warnings = resolved.warnings;
28764
+ writeResult(report, format);
28765
+ if (resolved.status !== "ambiguous") return exitCodes.success;
28766
+ process.stderr.write(`error: ${missReason({
28767
+ name: name.raw,
28768
+ status: "ambiguous",
28769
+ plugins: resolved.plugins,
28770
+ warnings: []
28771
+ })}\n`);
28772
+ return exitCodes.error;
28773
+ } catch (error) {
28774
+ return fail(error, "Reference placement lookup failed.");
28775
+ }
28776
+ }
28777
+ });
28778
+ function parseScope(value) {
28779
+ if (value !== "project" && value !== "user") throw new Error("--scope must be project or user.");
28780
+ return value;
28781
+ }
28637
28782
  const referenceCommand = command({
28638
28783
  name: "reference",
28639
- description: "Read on-demand reference documents by name, layered across the managed, project, user, and plugin tiers. Read-only.",
28784
+ description: "Read on-demand reference documents by name, layered across the managed, project, user, and plugin tiers, and start a new one in the project or user tier.",
28640
28785
  commands: [
28641
28786
  referenceShowCommand,
28642
28787
  referenceListCommand,
28643
28788
  referenceSearchCommand,
28789
+ referenceWhereCommand,
28644
28790
  command({
28645
- name: "where",
28646
- description: "List the project and user files an override of a reference can be written to, highest precedence first, with the copy each overrides and who it applies to.",
28791
+ name: "create",
28792
+ description: "Start a new reference in the project or user tier from a template, marked merge-sections when it overrides a copy below. Never overwrites.",
28647
28793
  arguments: [{
28648
28794
  name: "name",
28649
- description: "Reference name, without the `.md` extension; `<plugin>/<name>` picks one plugin.",
28795
+ description: "Reference name, without the `.md` extension.",
28650
28796
  type: stringType()
28651
28797
  }],
28652
28798
  options: {
28653
28799
  root: rootOption,
28654
- caller: {
28655
- description: "Folder of the skill that loads the reference, so its own copy is reported as the reference skill's Load mode reads it.",
28800
+ template: {
28801
+ description: "File whose text is written as it is, frontmatter included. Defaults to a built-in template of top-level `##` sections with no `#` title.",
28656
28802
  type: optionalType(stringType())
28657
28803
  },
28658
- format: listFormatOption
28804
+ scope: {
28805
+ description: "Tier to write: project (default), `.agents/references/` at the root, or user, `~/.agents/references/`.",
28806
+ type: optionalType(stringType()),
28807
+ default: "project"
28808
+ },
28809
+ "dry-run": {
28810
+ description: "Print the target path and the exact content, and write nothing.",
28811
+ type: optionalType(booleanType())
28812
+ },
28813
+ format: {
28814
+ description: "Output format: text (default) writes the path, then the content or the trace; toon and json return an object.",
28815
+ type: optionalType(stringType()),
28816
+ default: "text"
28817
+ }
28659
28818
  },
28660
28819
  async run(args) {
28661
28820
  try {
28662
28821
  const format = parseFormat(args.format);
28663
28822
  const name = parseReferenceName(args.name);
28823
+ if (name.plugin !== void 0) throw new Error(`an override is written under the bare name, which every tier resolves; ask for "${name.name}".`);
28824
+ const scope = parseScope(args.scope);
28825
+ const template = readTemplate(args.template === void 0 ? void 0 : resolve(args.template));
28664
28826
  const home = homedir();
28665
- const layers = await layersFor(args, home);
28666
- const root = resolve(args.root ?? process.cwd());
28827
+ const dir = scope === "project" ? projectReferencesDir(resolve(args.root ?? process.cwd())) : join(home, ".agents", "references");
28828
+ const target = join(dir, `${name.name}.md`);
28667
28829
  const display = (path) => collapseHome(home, path);
28668
- const resolved = resolveReference(name, layers, { display });
28669
- const traced = layersFor$2(name, layers);
28670
- const slots = [];
28671
- for (const [index, step] of resolved.trace.entries()) {
28672
- const layer = traced[index];
28673
- const scope = slotScopes[step.tier];
28674
- if (!scope || (layer.status || step.tier === "plugin") && !step.found) continue;
28675
- const path = step.found ? step.path : join(layer.dir, `${name.name}.md`);
28676
- slots.push({
28677
- layer: step.tier === "plugin" ? `plugin ${step.plugin}` : step.tier,
28678
- path: step.tier === "project" ? relative(root, path) : display(path),
28679
- status: slotStatus(step.outcome),
28680
- scope
28681
- });
28682
- }
28683
- const copy = args.caller === void 0 ? void 0 : callerCopy(resolve(args.caller), name.name);
28684
- if (copy) slots.push({
28685
- layer: "caller",
28686
- path: display(copy),
28687
- status: callerStatus(resolved),
28688
- scope: callerScope
28689
- });
28830
+ const layers = await layersFor(args, home);
28831
+ const { trace } = resolveReference(name, layers, { display });
28832
+ const at = layers.findIndex((layer) => layer.dir === dir);
28833
+ if (trace[at]?.found) throw new Error(`${display(trace[at].path)} already holds "${name.name}"; change it with the reference skill's Update mode.`);
28834
+ const shadow = trace.slice(0, at).find((step) => step.found && step.merge === "first-wins");
28835
+ if (shadow) throw new Error(`the ${shadow.tier} copy ${display(shadow.path)} is first-wins, so nothing would read a new ${scope} file; change that copy instead.`);
28836
+ const content = trace.slice(at + 1).some((step) => step.found) && template.metadata["merge"] === void 0 ? withMergeSections(template.content) : template.content;
28837
+ const warnings = templateWarnings(template);
28690
28838
  const report = {
28691
28839
  name: name.name,
28692
- root: display(root),
28693
- slots,
28694
- merge: mergeNote
28840
+ scope,
28841
+ path: display(target),
28842
+ dryRun: Boolean(args["dry-run"]),
28843
+ content,
28844
+ warnings
28695
28845
  };
28696
- if (resolved.status === "ambiguous") report.plugins = resolved.plugins;
28697
- if (resolved.warnings.length) report.warnings = resolved.warnings;
28698
- writeResult(report, format);
28699
- if (resolved.status !== "ambiguous") return exitCodes.success;
28700
- process.stderr.write(`error: ${missReason({
28701
- name: name.raw,
28702
- status: "ambiguous",
28703
- plugins: resolved.plugins,
28704
- warnings: []
28705
- })}\n`);
28706
- return exitCodes.error;
28846
+ if (!report.dryRun) {
28847
+ mkdirSync(dir, { recursive: true });
28848
+ writeFileSync(target, content, { flag: "wx" });
28849
+ report.trace = traceOf(resolveReference(name, layers, { display }), home);
28850
+ }
28851
+ if (format !== "text") writeResult(report, format);
28852
+ else {
28853
+ for (const warning of warnings) process.stderr.write(`warning: ${warning}\n`);
28854
+ if (report.trace) process.stdout.write(`${report.path}\n\n${renderText({ trace: report.trace })}\n`);
28855
+ else writeDocument(`${report.path}\n\n${content}`);
28856
+ }
28857
+ return exitCodes.success;
28707
28858
  } catch (error) {
28708
- return fail(error, "Reference placement lookup failed.");
28859
+ return fail(error, "Reference creation failed.");
28709
28860
  }
28710
28861
  }
28711
28862
  })
package/dist/index.d.mts CHANGED
@@ -487,22 +487,34 @@ export declare const goldenSetPath = ".agents/buddy-agent-harness/mcp.toml";
487
487
  /**
488
488
  * Order here is search order. `package` is the only member that isn't an override —
489
489
  * `--overrides-only` promises never to return it.
490
+ *
491
+ * @deprecated Use `ReferenceTier`. Removed in the next major version.
490
492
  */
491
493
  type GovernanceScope = "project" | "user" | "managed" | "managed-deprecated" | "package";
494
+ /** @deprecated Use `ReferenceLayer`. Removed in the next major version. */
492
495
  type GovernanceLayer = {
493
496
  scope: GovernanceScope;
494
497
  dir: string;
495
498
  };
496
- /** A governance located but not read: what `list` reports. */
499
+ /**
500
+ * A governance located but not read: what `list` reports.
501
+ *
502
+ * @deprecated Use `ReferenceRow`. Removed in the next major version.
503
+ */
497
504
  type GovernanceEntry = {
498
505
  name: string;
499
506
  scope: GovernanceScope;
500
507
  path: string;
501
508
  };
502
- /** A governance located and read: what `show` reports. */
509
+ /**
510
+ * A governance located and read: what `show` reports.
511
+ *
512
+ * @deprecated Use `ResolvedReference`. Removed in the next major version.
513
+ */
503
514
  type GovernanceDocument = GovernanceEntry & {
504
515
  content: string;
505
516
  };
517
+ /** @deprecated Use `ReferenceLayerOptions`. Removed in the next major version. */
506
518
  type LayerOptions = {
507
519
  root: string;
508
520
  home: string;
@@ -510,29 +522,46 @@ type LayerOptions = {
510
522
  /** `%ProgramData%`, read only on Windows. */
511
523
  programData?: string | undefined;
512
524
  };
525
+ /** @deprecated Use `managedReferencesDir`. Removed in the next major version. */
513
526
  export declare function managedGovernancesDir(platform: NodeJS.Platform, programData?: string | undefined): string;
514
527
  /**
515
528
  * Still read below the layer above, so a machine already using it keeps working; reported as
516
529
  * deprecated so an admin knows to move it.
530
+ *
531
+ * @deprecated Use `managedReferencesDir`. Removed in the next major version.
517
532
  */
518
533
  export declare function deprecatedManagedGovernancesDir(platform: NodeJS.Platform, programData?: string | undefined): string;
534
+ /** @deprecated Use `referenceLayers`. Removed in the next major version. */
519
535
  export declare function governanceLayers({ root, home, platform, programData }: LayerOptions): GovernanceLayer[];
520
536
  /**
521
537
  * Filters by scope rather than slicing the list, so a layer added later can't quietly become an
522
538
  * override by position.
539
+ *
540
+ * @deprecated Use `referenceLayers`. Removed in the next major version.
523
541
  */
524
542
  export declare function overrideLayers(layers: readonly GovernanceLayer[]): GovernanceLayer[];
525
543
  /**
526
544
  * Rejects rather than sanitizes — silently answering a different question is how untrusted input
527
545
  * reads a file outside the layer.
546
+ *
547
+ * @deprecated Use `parseReferenceName`. Removed in the next major version.
528
548
  */
529
549
  export declare function parseGovernanceName(value: string): string;
530
- /** The first layer that holds the name wins; the rest are not read. */
550
+ /**
551
+ * The first layer that holds the name wins; the rest are not read.
552
+ *
553
+ * @deprecated Use `resolveReference`. Removed in the next major version.
554
+ */
531
555
  export declare function resolveGovernance(name: string, layers: readonly GovernanceLayer[]): GovernanceDocument | undefined;
532
- /** Every name any layer holds, each reported at the layer that would win, sorted by name. */
556
+ /**
557
+ * Every name any layer holds, each reported at the layer that would win, sorted by name.
558
+ *
559
+ * @deprecated Use `listReferences`. Removed in the next major version.
560
+ */
533
561
  export declare function listGovernances(layers: readonly GovernanceLayer[]): GovernanceEntry[];
534
562
  //#endregion
535
563
  //#region src/governance-overrides/governance.command.d.ts
564
+ /** @deprecated Use `ReferenceListReport`. Removed in the next major version. */
536
565
  type GovernanceListReport = {
537
566
  /**
538
567
  * `status` is always a string, not optional — an optional key would drop this array out of
@@ -550,12 +579,14 @@ type GovernanceListReport = {
550
579
  path: string;
551
580
  }[] | string;
552
581
  };
582
+ /** @deprecated Use `ReferenceShowEntry`. Removed in the next major version. */
553
583
  type GovernanceShowReport = {
554
584
  name: string;
555
585
  scope: GovernanceScope;
556
586
  path: string;
557
587
  content: string;
558
588
  };
589
+ /** @deprecated Use `referenceCommand`. Removed in the next major version. */
559
590
  export declare const governanceCommand: cli$1.Command;
560
591
  //#endregion
561
592
  //#region src/initialize-harnesses/init.command.d.ts
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/cli.ts","../src/harness-registry/instruction-bridge.ts","../src/diagnose-mcp/mcp-model.ts","../src/mcp-dialects/mcp-dialects.ts","../src/harness-registry/mcp-config.ts","../src/harness-registry/nonstandard-artifact.ts","../src/harness-registry/harness-registry.ts","../src/diagnose-bridges/diagnose-instructions.ts","../src/diagnose-bridges/locator.ts","../src/diagnose-bridges/doctor-guidance.ts","../src/diagnose-bridges/git-bridge-state.ts","../src/diagnose-bridges/diagnose-bridges.ts","../src/diagnose-configuration/diagnose-configuration.ts","../src/references/reference-layers.ts","../src/references/reference-document.ts","../src/references/resolve-reference.ts","../src/references/reference-catalog.ts","../src/diagnose-bridges/doctor.command.ts","../src/diagnose-mcp/diagnose-mcp.ts","../src/diagnose-mcp/mcp-baseline.ts","../src/diagnose-mcp/mcp-sources.ts","../src/governance-overrides/governance-overrides.ts","../src/governance-overrides/governance.command.ts","../src/initialize-harnesses/init.command.ts","../src/skill-projection/skill-projection.ts","../src/initialize-harnesses/initialize-harnesses.ts","../src/mcp-inventory/mcp-inventory.ts","../src/references/reference.command.ts"],"mappings":";;;;;;;wBA0CsB,IAAI,iBAAiB;;;;;;;KCtC/B;;EAEX;;EAEA;;EAEA;;;;KCTW;;KAGA;EACX,YAAY;EACZ;EACA;EACA,MAAM,SAAS;EACf;EACA,UAAU,SAAS;EACnB;EACA;EACA;EACA;;;cAIY;KAaD,mBAAmB;;;KC5BnB;;;KCIA;;EAEX;;EAEA;EACA;;EAEA,SAAS;;EAET;;;;;;;;;KCXW;KAeA;;EAEX;;EAEA;EACA,MAAM;;;;KClBK;;KAiBA;;KAGA;;EAEX;;EAEA;;;;;EAKA,oBAAoB;;EAEpB;;EAEA,YAAY;;EAEZ,uBAAuB;;KAGZ;EACX,MAAM;;EAEN,SAAS;;;;;EAKT,OAAO;;EAEP,aAAa;;;;;;qBAuBD,0BAA0B;;;;KCpE3B;;;;;KAKA;KAEA;EACX,SAAS;;EAET;EACA,MAAM;EACN,QAAQ;;;;;;wBA8EO,qBAC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;wBAUrE,gBAAgB,iBAAiB,oBAAoB;;;KCnHzD;;;;;EAKX;IAAU,OAAO;IAAiB;IAAc;;;EAEhD;IAAe;IAAc,OAAO;IAAiB;;;KAG1C;EACX;EACA,OAAO;EACP;EACA;;qBAuHY,mBAAmB,MAAI;;;qBCzIvB,aAAa,MAAI;qBAoDjB,gBAAgB,MAAI;wBAMjB,WAAW;EAAgB,WAAW,gBAAgB;;;;;;;;KChB1D;;;KC7CA;EACX;EACA,YAAY;EACZ;EACA,QAAQ;;KAEG;EACX;EACA,WAAW;EACX,QAAQ;EACR,QAAQ;;;;;EAKR,SAAS;;EAET;IAAc,MAAM;IAAa,YAAY;;EAC7C;;;;;;EAMA;EACA;;wBAGe,sBACf,MACA,WAAW,WACX,MACA,SACE,oBAAoB;;;;;;;KCzBX,iBAAiB;;KA6DjB;EACX,SAAS;EACT,OAAO;;EAEP;;EAEA;EACA,WAAW;;EAEX;;EAEA;;EAEA;EACA;;EAEA;;KAGW;;EAEX;;EAEA;;;;;EAKA,MAAM,SAAS;;EAEf,WAAW,OAAO;;;;;;;wBAuMH,eAAe,SAAS,wBAAwB;;;;KCxRpD;EACX;EACA,QAAQ;EACR,OAAO;EACP;EACA;EACA;EACA,WAAW;EACX;EACA,SAAS;EACT;EACA;EACA;EACA,QAAQ,KAAK;;KAGF;EACX;IAAU,MAAM;IAAe;IAAgB;IAAc;;;EAE7D,YAAY;EACZ;;KAsBW;EAA0B;EAAe,YAAY;;qBAoSpD,kBAAkB,MAAI"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/cli.ts","../src/harness-registry/instruction-bridge.ts","../src/diagnose-mcp/mcp-model.ts","../src/mcp-dialects/mcp-dialects.ts","../src/harness-registry/mcp-config.ts","../src/harness-registry/nonstandard-artifact.ts","../src/harness-registry/harness-registry.ts","../src/diagnose-bridges/diagnose-instructions.ts","../src/diagnose-bridges/locator.ts","../src/diagnose-bridges/doctor-guidance.ts","../src/diagnose-bridges/git-bridge-state.ts","../src/diagnose-bridges/diagnose-bridges.ts","../src/diagnose-configuration/diagnose-configuration.ts","../src/references/reference-layers.ts","../src/references/reference-document.ts","../src/references/resolve-reference.ts","../src/references/reference-catalog.ts","../src/diagnose-bridges/doctor.command.ts","../src/diagnose-mcp/diagnose-mcp.ts","../src/diagnose-mcp/mcp-baseline.ts","../src/diagnose-mcp/mcp-sources.ts","../src/governance-overrides/governance-overrides.ts","../src/governance-overrides/governance.command.ts","../src/initialize-harnesses/init.command.ts","../src/skill-projection/skill-projection.ts","../src/initialize-harnesses/initialize-harnesses.ts","../src/mcp-inventory/mcp-inventory.ts","../src/references/reference.command.ts"],"mappings":";;;;;;;wBA0CsB,IAAI,iBAAiB;;;;;;;KCtC/B;;EAEX;;EAEA;;EAEA;;;;KCTW;;KAGA;EACX,YAAY;EACZ;EACA;EACA,MAAM,SAAS;EACf;EACA,UAAU,SAAS;EACnB;EACA;EACA;EACA;;;cAIY;KAaD,mBAAmB;;;KC5BnB;;;KCIA;;EAEX;;EAEA;EACA;;EAEA,SAAS;;EAET;;;;;;;;;KCXW;KAeA;;EAEX;;EAEA;EACA,MAAM;;;;KClBK;;KAiBA;;KAGA;;EAEX;;EAEA;;;;;EAKA,oBAAoB;;EAEpB;;EAEA,YAAY;;EAEZ,uBAAuB;;KAGZ;EACX,MAAM;;EAEN,SAAS;;;;;EAKT,OAAO;;EAEP,aAAa;;;;;;qBAuBD,0BAA0B;;;;KCpE3B;;;;;KAKA;KAEA;EACX,SAAS;;EAET;EACA,MAAM;EACN,QAAQ;;;;;;wBA8EO,qBACf,cACA,oBAAoB,WACpB;EACI,cAAc;EAAqB,UAAU;;;;;;;;KCpGtC;EAAa;EAAc;;;;;;KAM3B;;EAEX;;EAEA;;EAEA;;EAEA,WAAW;;;;;;;;;KCLA;;;;;KAeA;;;;;KAMA;;;;;KAgBA;;KAQA;;KASA,gBAAgB,gBAAgB,qBAAqB,qBAAqB,aAAa;;KAGvF,uBAAuB;KAEvB;;EAEX;;EAEA;;K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