buddy-agent-harness 0.1.0 → 0.3.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.
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Initialize standards-based agent configuration across coding-agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
7
7
  },
8
+ "homepage": "https://github.com/repobuddy/buddy-agent-harness",
8
9
  "repository": "https://github.com/repobuddy/buddy-agent-harness",
9
10
  "license": "MIT",
10
11
  "keywords": ["agent", "skills", "harness", "claude-code", "codex"],
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Initialize standards-based agent configuration across coding-agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
7
7
  },
8
+ "homepage": "https://github.com/repobuddy/buddy-agent-harness",
8
9
  "repository": "https://github.com/repobuddy/buddy-agent-harness",
9
10
  "license": "MIT",
10
11
  "keywords": ["agent", "skills", "harness", "claude-code", "codex"],
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "Initialize standards-based agent configuration across coding-agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
7
7
  },
8
+ "homepage": "https://github.com/repobuddy/buddy-agent-harness",
8
9
  "repository": "https://github.com/repobuddy/buddy-agent-harness",
9
10
  "license": "MIT",
10
11
  "keywords": ["agent", "skills", "harness", "claude-code", "codex"],
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2022 Homa Wong (unional) (homawong@gmail.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -9,29 +9,25 @@ An agent plugin and CLI for initializing or updating a consumer repository's sta
9
9
 
10
10
  ## Install the plugin
11
11
 
12
- Install the portable plugin and its `init` skill with `npx skills`:
12
+ In Claude Code, add the [cyberplace](https://github.com/cyberuni/cyberplace) marketplace and install the plugin and its `init` skill:
13
13
 
14
- ```sh
15
- npx skills add repobuddy/buddy-agent-harness --plugin
14
+ ```text
15
+ /plugin marketplace add cyberuni/cyberplace
16
+ /plugin install buddy-agent-harness@cyberplace
16
17
  ```
17
18
 
18
- In Claude Code, add the marketplace and install the plugin:
19
+ ## CLI
19
20
 
20
- ```text
21
- /plugin marketplace add repobuddy/buddy-agent-harness
22
- /plugin install buddy-agent-harness@repobuddy
23
- ```
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`.
24
22
 
25
- Other agent clients can install the same repository through their plugin marketplace or use the `npx skills` command above.
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.
26
24
 
27
- ## CLI
25
+ `init` takes `--root`, `--copy`, `--force`, and `--format`; `--help` lists them.
28
26
 
29
- After the npm package is published, run the CLI without a global installation:
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:
30
28
 
31
29
  ```sh
32
- npx -y buddy-agent-harness init
30
+ npx -y buddy-agent-harness doctor
33
31
  ```
34
32
 
35
- 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.
36
-
37
- 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.
File without changes
@@ -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 };