buddy-agent-harness 0.2.0 → 0.3.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.2.0",
4
- "description": "Initialize standards-based agent configuration across coding-agent harnesses",
3
+ "version": "0.3.1",
4
+ "description": "Initialize standards-based agent configuration across agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.2.0",
4
- "description": "Initialize standards-based agent configuration across coding-agent harnesses",
3
+ "version": "0.3.1",
4
+ "description": "Initialize standards-based agent configuration across agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
7
7
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.2.0",
4
- "description": "Initialize standards-based agent configuration across coding-agent harnesses",
3
+ "version": "0.3.1",
4
+ "description": "Initialize standards-based agent configuration across agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
7
7
  },
package/README.md CHANGED
@@ -5,25 +5,29 @@
5
5
  [![npm](https://img.shields.io/npm/v/buddy-agent-harness)](https://www.npmjs.com/package/buddy-agent-harness)
6
6
  [![License](https://img.shields.io/npm/l/buddy-agent-harness)](LICENSE)
7
7
 
8
- An agent plugin and CLI for initializing or updating a consumer repository's standards-based agent configuration across coding-agent harnesses.
8
+ An agent plugin and CLI for initializing or updating a consumer repository's standards-based agent configuration across agent harnesses.
9
9
 
10
10
  ## Install the plugin
11
11
 
12
- In Claude Code, add the marketplace and install the plugin and its `init` skill:
12
+ In Claude Code, add the [cyberplace](https://github.com/cyberuni/cyberplace) marketplace and install the plugin and its `init` skill:
13
13
 
14
14
  ```text
15
- /plugin marketplace add repobuddy/buddy-agent-harness
16
- /plugin install buddy-agent-harness@repobuddy
15
+ /plugin marketplace add cyberuni/cyberplace
16
+ /plugin install buddy-agent-harness@cyberplace
17
17
  ```
18
18
 
19
19
  ## CLI
20
20
 
21
- Run the CLI without a global installation:
21
+ `init` runs behind the `init` skill, which sorts the configuration you already wrote before the command links anything. Install the package alongside `repobuddy` to mount both commands on `buddy`, as `buddy agent-harness doctor` and `buddy agent-harness init`.
22
+
23
+ The repository root's `AGENTS.md` and `.agents/` tree are canonical: `.agents/AGENTS.md` holds shared behavior, `.agents/skills/**/SKILL.md` holds capabilities, and separately named files hold tool settings. The active harness is enabled by default; explicit user preferences add others. The command preserves user-authored configuration and projects only supported mappings; it records nothing on disk.
24
+
25
+ `init` takes `--root`, `--copy`, `--force`, and `--format`; `--help` lists them.
26
+
27
+ `doctor` is the read-only counterpart, and the one command worth running without any of the above. It reports whether the bridges `init` created still resolve after a clone — the common failure being a Windows checkout with `core.symlinks=false`, where git writes a committed symlink out as a regular file and the harness silently loads no skills:
22
28
 
23
29
  ```sh
24
- npx -y buddy-agent-harness init
30
+ npx -y buddy-agent-harness doctor
25
31
  ```
26
32
 
27
- The repository root's `AGENTS.md` and `.agents/` tree are canonical: `.agents/AGENTS.md` holds shared behavior, `.agents/skills/**/SKILL.md` holds capabilities, and separately named files hold tool settings. The active harness is enabled by default; explicit user preferences add others. The command preserves user-authored configuration and projects only supported mappings; it records nothing on disk.
28
-
29
- Use `buddy-agent-harness init --help` to see `--root`, `--copy`, `--force`, and `--format`.
33
+ It never repairs anything and always exits `0`; each finding names the `init` command that fixes it.
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.mts","names":[],"sources":["../src/cli.ts"],"mappings":";iBAGsB,QAAQ"}
1
+ {"version":3,"file":"cli.d.mts","names":[],"sources":["../src/cli.ts"],"mappings":";iBAIsB,QAAQ"}
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { r as initCommand } from "./init.command-wxC4cgUc.mjs";
1
+ import { a as doctorCommand, r as initCommand } from "./init.command-BN_w5DRZ.mjs";
2
2
  import { cli } from "clibuilder";
3
3
  //#region src/cli.ts
4
4
  async function main() {
@@ -8,7 +8,7 @@ async function main() {
8
8
  description: "Initialize agent harness skill compatibility in consumer repositories."
9
9
  });
10
10
  try {
11
- await app.command(initCommand).parse(process.argv);
11
+ await app.command(initCommand).command(doctorCommand).parse(process.argv);
12
12
  } catch (error) {
13
13
  process.stdout.write(`error: ${error instanceof Error ? error.message : "Invalid command."}\n`);
14
14
  process.exitCode = 2;
package/dist/cli.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { cli } from 'clibuilder'\nimport { initCommand } from './initialize-harnesses/init.command.ts'\n\nexport async function main(): Promise<void> {\n\tconst app = cli({\n\t\tname: 'buddy-agent-harness',\n\t\tversion: '0.1.0',\n\t\tdescription: 'Initialize agent harness skill compatibility in consumer repositories.',\n\t})\n\ttry {\n\t\tawait app.command(initCommand).parse(process.argv)\n\t} catch (error) {\n\t\tprocess.stdout.write(`error: ${error instanceof Error ? error.message : 'Invalid command.'}\\n`)\n\t\tprocess.exitCode = 2\n\t}\n}\n"],"mappings":";;;AAGA,eAAsB,OAAsB;CAC3C,MAAM,MAAM,IAAI;EACf,MAAM;EACN,SAAS;EACT,aAAa;CACd,CAAC;CACD,IAAI;EACH,MAAM,IAAI,QAAQ,WAAW,CAAC,CAAC,MAAM,QAAQ,IAAI;CAClD,SAAS,OAAO;EACf,QAAQ,OAAO,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,mBAAmB,GAAG;EAC9F,QAAQ,WAAW;CACpB;AACD"}
1
+ {"version":3,"file":"cli.mjs","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import { cli } from 'clibuilder'\nimport { doctorCommand } from './diagnose-bridges/doctor.command.ts'\nimport { initCommand } from './initialize-harnesses/init.command.ts'\n\nexport async function main(): Promise<void> {\n\tconst app = cli({\n\t\tname: 'buddy-agent-harness',\n\t\tversion: '0.1.0',\n\t\tdescription: 'Initialize agent harness skill compatibility in consumer repositories.',\n\t})\n\ttry {\n\t\tawait app.command(initCommand).command(doctorCommand).parse(process.argv)\n\t} catch (error) {\n\t\tprocess.stdout.write(`error: ${error instanceof Error ? error.message : 'Invalid command.'}\\n`)\n\t\tprocess.exitCode = 2\n\t}\n}\n"],"mappings":";;;AAIA,eAAsB,OAAsB;CAC3C,MAAM,MAAM,IAAI;EACf,MAAM;EACN,SAAS;EACT,aAAa;CACd,CAAC;CACD,IAAI;EACH,MAAM,IAAI,QAAQ,WAAW,CAAC,CAAC,QAAQ,aAAa,CAAC,CAAC,MAAM,QAAQ,IAAI;CACzE,SAAS,OAAO;EACf,QAAQ,OAAO,MAAM,UAAU,iBAAiB,QAAQ,MAAM,UAAU,mBAAmB,GAAG;EAC9F,QAAQ,WAAW;CACpB;AACD"}
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { cli } from "clibuilder";
1
+ import { cli as cli$1 } from "clibuilder";
2
2
  //#region src/harness-registry/harness-registry.d.ts
3
3
  type HarnessName = "claude-code" | "cursor" | "codex" | "copilot-cli" | "gemini-cli" | "devin-desktop" | "windsurf";
4
4
  /**
@@ -24,9 +24,86 @@ type Harness = {
24
24
  */
25
25
  declare const harnessRegistry: readonly Harness[];
26
26
  //#endregion
27
+ //#region src/diagnose-bridges/git-bridge-state.d.ts
28
+ /** Which side of a diverged bridge moved since the last commit where the two agreed. */
29
+ type DivergenceDirection = "bridge" | "canonical" | "both" | "unknown";
30
+ //#endregion
31
+ //#region src/diagnose-bridges/diagnose-bridges.d.ts
32
+ type BridgeKind = "symlink" | "copy" | "file" | "none";
33
+ type BridgeStatus = "ok" | "missing" | "degraded" | "stale" | "diverged";
34
+ type BridgeReport = {
35
+ harness: HarnessName;
36
+ /** Repository-relative, as the harness registry declares it. */
37
+ path: string;
38
+ kind: BridgeKind;
39
+ status: BridgeStatus;
40
+ };
41
+ type BridgeFinding = {
42
+ path: string;
43
+ detail: string;
44
+ /** The command that repairs this finding, already carrying the bridge path. */
45
+ repair: string;
46
+ };
47
+ type DivergenceReport = {
48
+ path: string;
49
+ direction: DivergenceDirection;
50
+ };
51
+ type DiagnoseOptions = {
52
+ root: string;
53
+ harnesses?: HarnessName[];
54
+ /** How to name this tool in the repair commands. */
55
+ cli: string;
56
+ };
57
+ type DiagnoseResult = {
58
+ bridges: BridgeReport[];
59
+ divergence: DivergenceReport[];
60
+ findings: BridgeFinding[];
61
+ };
62
+ /**
63
+ * Reports whether every bridge `init` would create for this repository still resolves into
64
+ * `.agents/skills`. Read-only: nothing is created, moved, or repaired, so the caller decides what
65
+ * to run from the repair each finding carries.
66
+ */
67
+ declare function diagnoseBridges({ root, harnesses: preferred, cli }: DiagnoseOptions): DiagnoseResult;
68
+ //#endregion
69
+ //#region src/diagnose-bridges/doctor.command.d.ts
70
+ declare const doctorCommand: cli$1.Command;
71
+ //#endregion
72
+ //#region src/diagnose-bridges/doctor-guidance.d.ts
73
+ /**
74
+ * The one place `doctor`'s guidance is written. The command reads `detail` and `repair` to fill its
75
+ * `findings` and `help` sections; `skills/doctor/SKILL.md` is generated from the same table by
76
+ * `scripts/generate-doctor-skill.ts`, so the shipped skill cannot drift from what the command says.
77
+ */
78
+ /** Every way a bridge can fail, in the order `doctor` reports them. */
79
+ type BridgeProblem = "no-canonical" | "missing" | "degraded" | "stale" | "diverged-bridge" | "diverged-canonical" | "diverged-both" | "diverged-unknown" | "unpinned-copy";
80
+ type Repair = {
81
+ problem: BridgeProblem;
82
+ /** What `doctor` prints in the `findings` row for this problem. */
83
+ detail: string;
84
+ /**
85
+ * The command that fixes it, for `doctor`'s own output. `path` is the repository-relative bridge
86
+ * path; `cli` is how to invoke this tool.
87
+ */
88
+ repair(path: string, cli: string): string;
89
+ /**
90
+ * What the shipped skill tells an agent to do instead. A repair that rebuilds a bridge delegates
91
+ * to the `init` skill rather than calling the `init` command, because rebuilding can move
92
+ * user-authored skills and that judgment is the `init` skill's, not `doctor`'s.
93
+ */
94
+ skillRepair(path: string): string;
95
+ };
96
+ declare const doctorRepairs: readonly Repair[];
97
+ declare const doctorSkill: {
98
+ readonly name: "doctor";
99
+ readonly description: "Use this skill when a repository loads no project skills, when skills are missing after a clone, or when checking whether the agent configuration bridges into .claude/skills and the other harness directories still resolve.";
100
+ };
101
+ /** The shipped `doctor` skill, rendered from the same table the command prints. */
102
+ declare function renderDoctorSkill(): string;
103
+ //#endregion
27
104
  //#region src/initialize-harnesses/init.command.d.ts
28
- declare const initCommand: cli.Command;
29
- declare const harnessCommand: cli.Command;
105
+ declare const initCommand: cli$1.Command;
106
+ declare const harnessCommand: cli$1.Command;
30
107
  declare function activate({ addCommand }: {
31
108
  addCommand(command: typeof harnessCommand): void;
32
109
  }): void;
@@ -53,5 +130,5 @@ type InitializeResult = {
53
130
  };
54
131
  declare function initializeHarnesses({ root, harnesses: preferred, copy, force }: InitializeOptions): InitializeResult;
55
132
  //#endregion
56
- export { type HarnessName, type InitializeOptions, type InitializeResult, activate, harnessCommand, harnessRegistry, initCommand, initializeHarnesses };
133
+ export { type BridgeFinding, type BridgeKind, type BridgeProblem, type BridgeReport, type BridgeStatus, type DiagnoseOptions, type DiagnoseResult, type DivergenceDirection, type DivergenceReport, type HarnessName, type InitializeOptions, type InitializeResult, type Repair, activate, diagnoseBridges, doctorCommand, doctorRepairs, doctorSkill, harnessCommand, harnessRegistry, initCommand, initializeHarnesses, renderDoctorSkill };
57
134
  //# sourceMappingURL=index.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/harness-registry/harness-registry.ts","../src/initialize-harnesses/init.command.ts","../src/initialize-harnesses/initialize-harnesses.ts"],"mappings":";;KAGY;;;;;KAaA;EACX,MAAM;EACN;EACA;;EAEA,aAAa;;;;;;;;;;;;cAaD,0BAA0B;;;cCxB1B,aAAa,IAAI;cAyDjB,gBAAgB,IAAI;iBAMjB,WAAW;EAAgB,WAAW,gBAAgB;;;;KCrE1D;EACX;EACA,YAAY;EACZ;EACA;;KAEW;EACX;EACA,WAAW;EACX,QAAQ;EACR,QAAQ;;EAER;IAAc,MAAM;IAAa,YAAY;;EAC7C;EACA;;iBAGe,sBACf,MACA,WAAW,WACX,MACA,SACE,oBAAoB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/harness-registry/harness-registry.ts","../src/diagnose-bridges/git-bridge-state.ts","../src/diagnose-bridges/diagnose-bridges.ts","../src/diagnose-bridges/doctor.command.ts","../src/diagnose-bridges/doctor-guidance.ts","../src/initialize-harnesses/init.command.ts","../src/initialize-harnesses/initialize-harnesses.ts"],"mappings":";;KAGY;;;;;KAaA;EACX,MAAM;EACN;EACA;;EAEA,aAAa;;;;;;;;;;;;cAaD,0BAA0B;;;;KC7B3B;;;KCEA;KACA;KAEA;EACX,SAAS;;EAET;EACA,MAAM;EACN,QAAQ;;KAGG;EACX;EACA;;EAEA;;KAGW;EACX;EACA,WAAW;;KAGA;EACX;EACA,YAAY;;EAEZ;;KAGW;EACX,SAAS;EACT,YAAY;EACZ,UAAU;;;;;;;iBA8EK,kBAAkB,MAAM,WAAW,WAAgB,OAAO,kBAAkB;;;cC7E/E,eAAe,MAAI;;;;;;;;;KClCpB;KAWA;EACX,SAAS;;EAET;;;;;EAKA,OAAO,cAAc;;;;;;EAMrB,YAAY;;cASA,wBAAwB;cAmExB;WACZ;WACA;;;iBASe;;;cChHH,aAAa,MAAI;cA0DjB,gBAAgB,MAAI;iBAMjB,WAAW;EAAgB,WAAW,gBAAgB;;;;KCnE1D;EACX;EACA,YAAY;EACZ;EACA;;KAEW;EACX;EACA,WAAW;EACX,QAAQ;EACR,QAAQ;;EAER;IAAc,MAAM;IAAa,YAAY;;EAC7C;EACA;;iBAGe,sBACf,MACA,WAAW,WACX,MACA,SACE,oBAAoB"}
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as harnessRegistry, i as initializeHarnesses, n as harnessCommand, r as initCommand, t as activate } from "./init.command-wxC4cgUc.mjs";
2
- export { activate, harnessCommand, harnessRegistry, initCommand, initializeHarnesses };
1
+ import { a as doctorCommand, c as doctorSkill, i as initializeHarnesses, l as renderDoctorSkill, n as harnessCommand, o as diagnoseBridges, r as initCommand, s as doctorRepairs, t as activate, u as harnessRegistry } from "./init.command-BN_w5DRZ.mjs";
2
+ export { activate, diagnoseBridges, doctorCommand, doctorRepairs, doctorSkill, harnessCommand, harnessRegistry, initCommand, initializeHarnesses, renderDoctorSkill };