buddy-agent-harness 1.1.0 → 1.2.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 (37) 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/CHANGELOG.md +19 -0
  5. package/dist/cli.mjs +86 -9
  6. package/dist/index.d.mts +10 -3
  7. package/dist/index.d.mts.map +1 -1
  8. package/dist/index.mjs +92 -8
  9. package/dist/index.mjs.map +1 -1
  10. package/dist/skill-scripts/doctor.mjs +27 -27
  11. package/dist/skill-scripts/init.mjs +27 -27
  12. package/dist/skill-scripts/mcp.mjs +27 -27
  13. package/llms.txt +6 -5
  14. package/package.json +2 -1
  15. package/plugin.json +1 -1
  16. package/skills/doctor-buddy-agent-harness/README.md +1 -1
  17. package/skills/doctor-buddy-agent-harness/SKILL.md +9 -2
  18. package/skills/doctor-buddy-agent-harness/references/worktrees.md +17 -0
  19. package/skills/doctor-buddy-agent-harness/scripts/doctor.mjs +27 -27
  20. package/skills/enhance/SKILL.md +18 -10
  21. package/skills/enhance/references/agent-worktrees.md +59 -0
  22. package/skills/enhance/references/references-as-links.history.md +9 -0
  23. package/skills/enhance/references/references-as-links.md +76 -0
  24. package/skills/enhance/scripts/doctor.mjs +27 -27
  25. package/skills/init-buddy-agent-harness/SKILL.md +8 -5
  26. package/skills/init-buddy-agent-harness/references/agent-worktrees.md +59 -0
  27. package/skills/init-buddy-agent-harness/scripts/doctor.mjs +27 -27
  28. package/skills/init-buddy-agent-harness/scripts/init.mjs +27 -27
  29. package/skills/repair/README.md +2 -2
  30. package/skills/repair/SKILL.md +3 -3
  31. package/skills/repair/scripts/doctor.mjs +27 -27
  32. package/skills/repair/scripts/mcp.mjs +27 -27
  33. package/src/diagnose-bridges/doctor-guidance.ts +66 -1
  34. package/src/diagnose-bridges/doctor.command.ts +2 -0
  35. package/src/diagnose-bridges/git-bridge-state.ts +5 -0
  36. package/src/diagnose-worktrees/diagnose-worktrees.ts +69 -0
  37. package/src/index.ts +1 -0
package/llms.txt CHANGED
@@ -39,10 +39,10 @@ Documentation site: [One canonical agent configuration](https://repobuddy.github
39
39
  ## Skills
40
40
 
41
41
  - [Skills](https://repobuddy.github.io/buddy-agent-harness/skills/): The skills the plugin ships, init, doctor, enhance and repair, the reference skill it brings with it, and when to run the CLI instead.
42
- - [`doctor-buddy-agent-harness`](https://repobuddy.github.io/buddy-agent-harness/skills/doctor-buddy-agent-harness/): Use this skill when a repository loads no project skills, when skills are missing after a clone, when a harness appears to be ignoring AGENTS.md, or when checking whether the agent configuration bridges into .claude/skills and the other harness files still resolve.
43
- - [`enhance`](https://repobuddy.github.io/buddy-agent-harness/skills/enhance/): Use this skill when a repository already has an AGENTS.md and you want to add guidance it is missing, or to refresh a vetted section it carries in an outdated form — offering each one at a time and writing only what the user approves. Runs on its own or straight after init.
44
- - [`init-buddy-agent-harness`](https://repobuddy.github.io/buddy-agent-harness/skills/init-buddy-agent-harness/): Use this skill when initializing, adopting, or migrating a repository's agent configuration to the open AGENTS.md and Agent Skills standards, so one canonical source works across Claude Code, Codex, Cursor, Copilot CLI, and other agent harnesses.
45
- - [`repair`](https://repobuddy.github.io/buddy-agent-harness/skills/repair/): Use this skill when a repository's agent configuration is present but wrong or outdated — a retired harness name, a git-ignored bridge, an AGENTS.local.md nothing reads, a skill a harness refuses to load, or an MCP server that differs between the golden set and a harness, on the side that is plainly ahead. Runs doctor to find them, then offers each correction with its before and after and writes only what is approved.
42
+ - [`doctor-buddy-agent-harness`](https://repobuddy.github.io/buddy-agent-harness/skills/doctor-buddy-agent-harness/): Checks whether a repository's agent configuration bridges into .claude/skills and the other harness files still resolve — when a repository loads no project skills, when skills are missing after a clone, or when a harness appears to be ignoring AGENTS.md.
43
+ - [`enhance`](https://repobuddy.github.io/buddy-agent-harness/skills/enhance/): Adds guidance missing from a repository's existing AGENTS.md, or refreshes a vetted section it carries in an outdated form — offering each one at a time and writing only what the user approves. Runs on its own or straight after init.
44
+ - [`init-buddy-agent-harness`](https://repobuddy.github.io/buddy-agent-harness/skills/init-buddy-agent-harness/): Initializes, adopts, or migrates a repository's agent configuration to the open AGENTS.md and Agent Skills standards, so one canonical source works across Claude Code, Codex, Cursor, Copilot CLI, and other agent harnesses.
45
+ - [`repair`](https://repobuddy.github.io/buddy-agent-harness/skills/repair/): Repairs a repository's agent configuration when it is present but wrong or outdated — a retired harness name, a git-ignored bridge, an AGENTS.local.md nothing reads, a skill a harness refuses to load, or an MCP server that differs between the golden set and a harness, on the side that is plainly ahead. Runs doctor to find them, then offers each correction with its before and after and writes only what is approved.
46
46
 
47
47
  ## Getting started
48
48
 
@@ -51,6 +51,7 @@ Documentation site: [One canonical agent configuration](https://repobuddy.github
51
51
 
52
52
  ## Agent configuration
53
53
 
54
+ - [Agent Worktrees](https://repobuddy.github.io/buddy-agent-harness/agent-configuration/agent-worktrees/): Where Claude Code puts the git worktrees it creates for agents, why that breaks linters and git status, and the two settings a repository needs.
54
55
  - [Agent Configuration Best Practices](https://repobuddy.github.io/buddy-agent-harness/agent-configuration/best-practices/): Practices that apply across AGENTS.md, skills, and harness bridges, starting with the cost of every file an agent has to go and open.
55
56
  - [Harness Differences](https://repobuddy.github.io/buddy-agent-harness/agent-configuration/harness-differences/): Which agent harnesses read canonical configuration directly, and which need a bridge.
56
57
  - [Claude Code](https://repobuddy.github.io/buddy-agent-harness/agent-configuration/harnesses/claude-code/): Claude Code needs a skills projection, and reads AGENTS.md itself unless a CLAUDE.md beside it suppresses it.
@@ -87,7 +88,7 @@ Documentation site: [One canonical agent configuration](https://repobuddy.github
87
88
  - [Library: `diagnose-bridges/diagnose-global-instructions.ts`](https://repobuddy.github.io/buddy-agent-harness/library/doctor/): exports `diagnoseGlobalInstructions`, type `GlobalInstructionKind`, type `GlobalInstructionReport`, type `GlobalInstructionStatus`.
88
89
  - [Library: `diagnose-bridges/diagnose-instructions.ts`](https://repobuddy.github.io/buddy-agent-harness/library/doctor/): exports `diagnoseInstructions`, type `InstructionKind`, type `InstructionReport`, type `InstructionStatus`.
89
90
  - [Library: `diagnose-bridges/doctor.command.ts`](https://repobuddy.github.io/buddy-agent-harness/library/doctor/): exports `buildDoctorReport`, `doctorCommand`, type `DoctorReference`, type `DoctorReport`.
90
- - [Library: `diagnose-bridges/doctor-guidance.ts`](https://repobuddy.github.io/buddy-agent-harness/library/doctor/): exports `bridgeRepairs`, `doctorRepairs`, `doctorSkill`, `globalInstructionRepairs`, `instructionRepairs`, `renderDoctorSkill`, type `BridgeProblem`, type `ConfigurationFault`, type `ConfigurationProblem`, type `DoctorProblem`, type `GlobalInstructionProblem`, type `InstructionProblem`, type `McpProblem`, type `Repair`.
91
+ - [Library: `diagnose-bridges/doctor-guidance.ts`](https://repobuddy.github.io/buddy-agent-harness/library/doctor/): exports `bridgeRepairs`, `doctorRepairs`, `doctorSkill`, `globalInstructionRepairs`, `instructionRepairs`, `renderDoctorSkill`, type `BridgeProblem`, type `ConfigurationFault`, type `ConfigurationProblem`, type `DoctorProblem`, type `GlobalInstructionProblem`, type `InstructionProblem`, type `McpProblem`, type `Repair`, type `WorktreeProblem`.
91
92
  - [Library: `diagnose-bridges/git-bridge-state.ts`](https://repobuddy.github.io/buddy-agent-harness/library/doctor/): exports type `DivergenceDirection`.
92
93
  - [Library: `diagnose-mcp/diagnose-mcp.ts`](https://repobuddy.github.io/buddy-agent-harness/library/mcp/): exports `diagnoseMcp`, type `DiagnoseMcpOptions`.
93
94
  - [Library: `diagnose-mcp/mcp-baseline.ts`](https://repobuddy.github.io/buddy-agent-harness/library/mcp/): exports type `McpDirection`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Initialize standards-based agent configuration across agent harnesses",
5
5
  "keywords": [
6
6
  "repobuddy",
@@ -37,6 +37,7 @@
37
37
  "!**/*.{test,spec}.ts",
38
38
  "!**/*.test-helper.ts",
39
39
  "skills",
40
+ "!skills/*/evals",
40
41
  "plugin.json",
41
42
  "llms.txt",
42
43
  ".claude-plugin",
package/plugin.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "buddy-agent-harness",
4
- "version": "1.1.0",
4
+ "version": "1.2.0",
5
5
  "description": "Initialize standards-based agent configuration across agent harnesses",
6
6
  "author": {
7
7
  "name": "repobuddy"
@@ -7,7 +7,7 @@ Report whether the harness skill bridges in a repository still resolve into `.ag
7
7
  `init` points every harness that cannot read `.agents/skills` at that directory, normally with a directory-level symlink. `doctor` re-checks each of those bridges after the fact and names the repair for whatever it finds. The command names an `init` invocation for a person at a shell; the skill hands the same repair to the `init-buddy-agent-harness` skill, because rebuilding a bridge can move skills a user wrote.
8
8
 
9
9
  ```sh
10
- npx -y buddy-agent-harness@1.1.0 doctor
10
+ npx -y buddy-agent-harness@1.2.0 doctor
11
11
  ```
12
12
 
13
13
  ## Why it exists
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: doctor-buddy-agent-harness
3
- description: Use this skill when a repository loads no project skills, when skills are missing after a clone, when a harness appears to be ignoring AGENTS.md, or when checking whether the agent configuration bridges into .claude/skills and the other harness files still resolve.
3
+ description: Checks whether a repository's agent configuration bridges into .claude/skills and the other harness files still resolve — when a repository loads no project skills, when skills are missing after a clone, or when a harness appears to be ignoring AGENTS.md.
4
4
  ---
5
5
 
6
6
  <!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
@@ -17,7 +17,7 @@ Diagnose it:
17
17
  node scripts/doctor.mjs
18
18
  ```
19
19
 
20
- That path is relative to this skill's own directory: `scripts/doctor.mjs` is a self-contained bundle built from this package's source and shipped inside the skill folder through the npm package, so it runs against the current working directory with nothing downloaded and no `node_modules` needed. Fall back to `npx -y buddy-agent-harness@1.1.0 doctor` when `scripts/doctor.mjs` is missing or cannot be run — the case for a skill installed from git rather than from the npm package, which does not carry the bundle.
20
+ That path is relative to this skill's own directory: `scripts/doctor.mjs` is a self-contained bundle built from this package's source and shipped inside the skill folder through the npm package, so it runs against the current working directory with nothing downloaded and no `node_modules` needed. Fall back to `npx -y buddy-agent-harness@1.2.0 doctor` when `scripts/doctor.mjs` is missing or cannot be run — the case for a skill installed from git rather than from the npm package, which does not carry the bundle.
21
21
 
22
22
  The command is read-only. It never repairs anything, so it is safe to run at any point, including from a session-start hook.
23
23
 
@@ -56,6 +56,7 @@ Every `problem` name routes to exactly one page. Load the page for the finding i
56
56
  | `references/configuration.md` | a finding about the configuration around the bridges rather than a bridge |
57
57
  | `references/mcp.md` | any finding whose path is an MCP locator — **always** before acting on a credential finding |
58
58
  | `references/nonstandard.md` | a finding about configuration only one harness can read |
59
+ | `references/worktrees.md` | a finding about the agent worktrees Claude Code creates under `.claude/worktrees/` |
59
60
  | `references/harnesses/<name>.md` | the paths and files one named harness uses |
60
61
 
61
62
  ## Rules
@@ -66,3 +67,9 @@ Every `problem` name routes to exactly one page. Load the page for the finding i
66
67
  - Never repeat a value from a file an `mcp-literal-secret` or `mcp-committed-secret` finding points at. The report withheld it on purpose, and quoting it back puts it in the transcript anyway.
67
68
  - Never write outside the repository. A `globalInstructions` repair is a step for the user to take in their own home directory; hand it over exactly as reported.
68
69
  - Write instructions in `AGENTS.md`, never in `CLAUDE.md`. Content written there reaches one harness, drifts from the canonical file, and — because Claude Code prefers it — takes `AGENTS.md` out of that harness's context entirely.
70
+
71
+ ## Done when
72
+
73
+ - **C1.** The reply names each problem the report found and its cause, or, when the report found none, says the configuration is healthy and calls for no change.
74
+ - **C2.** No bridge, skill, or instruction file changed: no `init` ran, and nothing was written to `CLAUDE.md`.
75
+ - **C3.** The reply repeats no value that a secret finding withheld.
@@ -0,0 +1,17 @@
1
+ <!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
2
+
3
+ # Agent worktree findings
4
+
5
+ Claude Code runs a session started with `--worktree`, and a subagent isolated in a worktree, in a git worktree under `.claude/worktrees/<name>/` inside the repository. That place is by design, and no setting moves it. These findings are what a repository needs so the worktrees there do no harm. `doctor` checks them only where a `.claude` directory exists.
6
+
7
+ | Finding | What it means | Repair |
8
+ | --- | --- | --- |
9
+ | `worktrees-untracked` | .claude/worktrees/ is not git-ignored, so every agent worktree Claude Code creates there shows up as untracked in git status | run `/buddy-agent-harness:init-buddy-agent-harness` (pnpm install: `pnpm-buddy-agent-harness-init-buddy-agent-harness`) or `/buddy-agent-harness:enhance` (pnpm install: `pnpm-buddy-agent-harness-enhance`), which offers the .gitignore line |
10
+ | `worktrees-scanned` | this config does not exclude .claude/worktrees, so the tool walks into each agent worktree, a whole checkout with its own config, and Biome stops on the nested root configuration | run `/buddy-agent-harness:init-buddy-agent-harness` (pnpm install: `pnpm-buddy-agent-harness-init-buddy-agent-harness`) or `/buddy-agent-harness:enhance` (pnpm install: `pnpm-buddy-agent-harness-enhance`), which offers the exclusion |
11
+ | `worktree-base-unset` | worktree.baseRef is unset, so agent worktrees branch from the default branch rather than the current HEAD — work on a feature branch starts without its commits | run `/buddy-agent-harness:init-buddy-agent-harness` (pnpm install: `pnpm-buddy-agent-harness-init-buddy-agent-harness`) or `/buddy-agent-harness:enhance` (pnpm install: `pnpm-buddy-agent-harness-enhance`), which explains the trade-off and offers the setting |
12
+
13
+ None of these is a fault in a file the owner wrote, and none is a `repair` correction. Each is an offer the `init-buddy-agent-harness` and `enhance` skills make, one at a time, and write only on approval.
14
+
15
+ `worktree-base-unset` is a choice, not an error. The default branch suits agents given unrelated tasks; `"head"` suits agents asked to build on the branch in front of them. Put the trade-off to the owner, and report an explicit `"fresh"` as their answer rather than as a finding — `doctor` already does.
16
+
17
+ `worktrees-scanned` is checked for Biome only, the one tool with a confirmed failure. A repository whose ESLint, Prettier, knip, or TypeScript configuration walks the tree can hit the same thing; the skills look for those when they make the offer.