buddy-agent-harness 0.5.0 → 0.7.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.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/bin/buddy-agent-harness.mjs +8 -3
- package/dist/cli-Bvnq8zOL.mjs +2122 -0
- package/dist/cli-Bvnq8zOL.mjs.map +1 -0
- package/dist/cli.d.mts +13 -2
- package/dist/cli.d.mts.map +1 -1
- package/dist/cli.mjs +2 -20
- package/dist/index.d.mts +491 -40
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +3 -2
- package/plugin.json +1 -1
- package/skills/doctor/SKILL.md +27 -23
- package/skills/doctor/references/bridges.md +23 -0
- package/skills/doctor/references/configuration.md +12 -0
- package/skills/doctor/references/harnesses/claude-code.md +39 -0
- package/skills/doctor/references/harnesses/codex.md +37 -0
- package/skills/doctor/references/harnesses/copilot-cli.md +39 -0
- package/skills/doctor/references/harnesses/cursor.md +40 -0
- package/skills/doctor/references/harnesses/devin-desktop.md +20 -0
- package/skills/doctor/references/harnesses/gemini-cli.md +38 -0
- package/skills/doctor/references/harnesses/windsurf.md +27 -0
- package/skills/doctor/references/instructions.md +14 -0
- package/skills/doctor/references/mcp.md +31 -0
- package/skills/doctor/references/nonstandard.md +27 -0
- package/skills/doctor/scripts/doctor.mjs +7 -3
- package/skills/enhance/SKILL.md +4 -0
- package/skills/init/README.md +1 -1
- package/skills/init/SKILL.md +24 -10
- package/skills/init/references/detection.md +5 -3
- package/skills/init/references/harnesses/claude-code.md +2 -0
- package/skills/init/references/harnesses/cursor.md +9 -2
- package/skills/init/references/harnesses/gemini-cli.md +6 -9
- package/skills/init/scripts/doctor.mjs +14 -0
- package/skills/init/scripts/init.mjs +7 -3
- package/skills/repair/README.md +21 -0
- package/skills/repair/SKILL.md +74 -0
- package/skills/repair/references/classes.md +49 -0
- package/skills/repair/scripts/doctor.mjs +14 -0
- package/src/cli.ts +40 -7
- package/src/command-output/command-output.ts +1 -4
- package/src/diagnose-bridges/agents-files.ts +34 -0
- package/src/diagnose-bridges/diagnose-bridges.ts +39 -21
- package/src/diagnose-bridges/diagnose-instructions.ts +145 -0
- package/src/diagnose-bridges/doctor-guidance.ts +683 -69
- package/src/diagnose-bridges/doctor.command.ts +63 -30
- package/src/diagnose-bridges/git-bridge-state.ts +30 -0
- package/src/diagnose-bridges/json-with-comments.ts +60 -0
- package/src/diagnose-bridges/locator.ts +36 -0
- package/src/diagnose-configuration/diagnose-configuration.ts +99 -0
- package/src/diagnose-mcp/diagnose-mcp.ts +135 -0
- package/src/diagnose-mcp/mcp-baseline.ts +122 -0
- package/src/diagnose-mcp/mcp-model.ts +88 -0
- package/src/diagnose-mcp/mcp-secrets.ts +101 -0
- package/src/diagnose-mcp/mcp-sources.ts +131 -0
- package/src/diagnose-nonstandard/diagnose-nonstandard.ts +109 -0
- package/src/harness-registry/harness-registry.ts +164 -14
- package/src/harness-registry/instruction-bridge.ts +31 -0
- package/src/harness-registry/mcp-config.ts +37 -0
- package/src/harness-registry/nonstandard-artifact.ts +39 -0
- package/src/index.ts +33 -4
- package/src/initialize-harnesses/init.command.ts +13 -18
- package/src/initialize-harnesses/initialize-harnesses.ts +7 -4
- package/src/is-record/is-record.ts +12 -0
- package/src/skill-projection/skill-projection.ts +104 -18
- package/dist/cli.mjs.map +0 -1
- package/dist/init.command-c0fBv15T.mjs +0 -714
- package/dist/init.command-c0fBv15T.mjs.map +0 -1
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": "0.
|
|
4
|
+
"version": "0.7.0",
|
|
5
5
|
"description": "Initialize standards-based agent configuration across agent harnesses",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "repobuddy"
|
package/skills/doctor/SKILL.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: doctor
|
|
3
|
-
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
|
|
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, CLAUDE.md, and the other harness files still resolve.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
7
7
|
|
|
8
8
|
# Harness Doctor
|
|
9
9
|
|
|
10
|
-
`.agents/skills`
|
|
10
|
+
A repository keeps one canonical configuration: `.agents/skills` for its skills and `AGENTS.md` for its instructions. Harnesses that cannot read those get bridges pointing at them: Claude Code needs both, and Gemini CLI needs the instruction bridge only — it reads `.agents/skills` itself. A bridge that stops resolving is silent: the harness finds nothing and loads zero project skills, with no warning anywhere. An instruction bridge fails the same way and costs more, because the harness then reads none of the repository's instructions at all.
|
|
11
11
|
|
|
12
12
|
Diagnose it:
|
|
13
13
|
|
|
@@ -15,44 +15,48 @@ Diagnose it:
|
|
|
15
15
|
node scripts/doctor.mjs
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
That path is relative to this skill's own directory. The launcher runs the CLI that shipped beside it against the current working directory, so nothing is downloaded. Fall back to `npx -y buddy-agent-harness@^0.
|
|
18
|
+
That path is relative to this skill's own directory. The launcher runs the CLI that shipped beside it against the current working directory, so nothing is downloaded. Fall back to `npx -y buddy-agent-harness@^0.7.0 doctor` when the launcher cannot be resolved or run, which is the case when the plugin was installed from git rather than npm and its dependencies were never installed.
|
|
19
19
|
|
|
20
20
|
The command is read-only. It never repairs anything, so it is safe to run at any point, including from a session-start hook.
|
|
21
21
|
|
|
22
22
|
## Reading the report
|
|
23
23
|
|
|
24
|
-
`bridges` lists every bridge `init` would create for this repository, each with a `status` of `ok`, `missing`, `degraded`, `stale`, or `diverged`.
|
|
24
|
+
`bridges` lists every skills bridge `init` would create for this repository, each with a `status` of `ok`, `missing`, `degraded`, `stale`, or `diverged`.
|
|
25
25
|
|
|
26
|
-
`
|
|
26
|
+
`instructions` lists every instruction bridge into `AGENTS.md`, with a `status` of `ok`, `missing`, `unbridged`, or `unreadable`. They are a separate section because nothing about them is shared: a different `kind`, a different status vocabulary, and a repair that is never a command.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
`findings` explains each problem and carries more than the two sections above: the configuration, MCP, and non-standard findings have no section of their own, because they are about files rather than about bridges. `help` carries each repair, one row per distinct repair, with two columns:
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
- `command` — a shell invocation that, run exactly as given, **completes** the repair.
|
|
31
|
+
- `instruction` — the same repair in the imperative, always present and complete on its own.
|
|
32
|
+
|
|
33
|
+
`command` is empty whenever no single invocation does the job, and that emptiness is the signal: act on `instruction` and do not assemble a command out of it. A runnable invocation quoted *inside* an `instruction` is not the repair either — `diverged-both` names `git diff --no-index` because the diff shows you what differs, not because running it reconciles anything. Apply the repair, then re-run `doctor`.
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
Nothing in `help` is wrapped. An earlier version prefixed every repair with `Run`, which read as an instruction to paste prose into a shell.
|
|
33
36
|
|
|
34
|
-
|
|
35
|
-
| --- | --- | --- |
|
|
36
|
-
| `no-canonical` | the canonical skill directory does not exist, so no bridge can resolve | run `/buddy-agent-harness:init`, which creates `.agents/skills` and the bridges |
|
|
37
|
-
| `missing` | no bridge at this path — the harness sees zero project skills | run `/buddy-agent-harness:init` |
|
|
38
|
-
| `degraded` | expected a directory but found a regular file — checkout without core.symlinks | run `/buddy-agent-harness:init --copy --force` |
|
|
39
|
-
| `stale` | symlink does not resolve to .agents/skills | run `/buddy-agent-harness:init --force` |
|
|
40
|
-
| `diverged-bridge` | only the bridge changed since the two last agreed — an agent wrote through the copy | replace .agents/skills with <path> to keep the newer edit, then run `/buddy-agent-harness:init --force` |
|
|
41
|
-
| `diverged-canonical` | only .agents/skills changed since the two last agreed — the copy is stale | run `/buddy-agent-harness:init --copy --force` |
|
|
42
|
-
| `diverged-both` | both sides changed since they last agreed — rebuilding would discard one of them | run `git diff --no-index .agents/skills <path>` and reconcile by hand |
|
|
43
|
-
| `diverged-unknown` | contents differ and no commit where they agreed was found — which side moved is unknown | run `git diff --no-index .agents/skills <path>` and reconcile by hand |
|
|
44
|
-
| `unpinned-copy` | tracked copy without the skip-worktree bit — the tree is dirty with content that must not be committed | run `git ls-files -z <path> \| xargs -0 git update-index --skip-worktree` |
|
|
37
|
+
Do not run an `init` command yourself. Rebuilding a skills bridge can move skills a user wrote, and rewriting an instruction file touches prose a person authored — both are the `init` skill's judgment, so hand the repair to `/buddy-agent-harness:init` instead. Every such repair carries an empty `command`: a skill invocation has no shell equivalent at all.
|
|
45
38
|
|
|
46
|
-
|
|
39
|
+
When every bridge resolves, `findings` says so outright rather than being empty.
|
|
40
|
+
|
|
41
|
+
The default output is TOON, which is what you parse. Add `--format text` when you need to show the same report to a person, or `--format json`.
|
|
47
42
|
|
|
48
|
-
##
|
|
43
|
+
## Where the detail is
|
|
49
44
|
|
|
50
|
-
|
|
45
|
+
Every `problem` name routes to exactly one page. Load the page for the finding in front of you and leave the rest unread — the tables are long, and reading four families to act on one is what this split exists to stop.
|
|
51
46
|
|
|
52
|
-
|
|
47
|
+
| Page | Load it for |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| `references/bridges.md` | any `bridges` row that is not `ok` |
|
|
50
|
+
| `references/instructions.md` | any `instructions` row that is not `ok` |
|
|
51
|
+
| `references/configuration.md` | a finding about the configuration around the bridges rather than a bridge |
|
|
52
|
+
| `references/mcp.md` | any finding whose path is an MCP locator — **always** before acting on a credential finding |
|
|
53
|
+
| `references/nonstandard.md` | a finding about configuration only one harness can read |
|
|
54
|
+
| `references/harnesses/<name>.md` | the paths and files one named harness uses |
|
|
53
55
|
|
|
54
56
|
## Rules
|
|
55
57
|
|
|
56
58
|
- Never repair a `diverged-both` or `diverged-unknown` bridge by re-running `init`. Rebuilding overwrites whichever side holds the newer edit. Reconcile the two directories first.
|
|
57
59
|
- Edit skills at `.agents/skills/<name>/SKILL.md`. Editing through a bridge is only safe when that bridge is a symlink.
|
|
58
60
|
- Do not add bridges to `.gitignore`. An untracked bridge swallows a real edit silently.
|
|
61
|
+
- 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.
|
|
62
|
+
- Write instructions in `AGENTS.md`, never in `CLAUDE.md`. A bridge file holds the import and any harness-specific notes; content written there reaches one harness and drifts from the canonical file.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# Skills bridge findings
|
|
4
|
+
|
|
5
|
+
| Finding | What it means | Repair |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| `no-canonical` | the canonical skill directory does not exist, so no bridge can resolve | run `/buddy-agent-harness:init`, which creates `.agents/skills` and the bridges |
|
|
8
|
+
| `missing` | no bridge at this path — the harness sees zero project skills | run `/buddy-agent-harness:init` |
|
|
9
|
+
| `degraded` | expected a directory but found a regular file — checkout without core.symlinks | run `/buddy-agent-harness:init --copy --force <path>` |
|
|
10
|
+
| `stale` | symlink does not resolve to .agents/skills | run `/buddy-agent-harness:init --force <path>` |
|
|
11
|
+
| `diverged-bridge` | only the bridge changed since the two last agreed — an agent wrote through the copy | replace .agents/skills with <path> to keep the newer edit, then run `/buddy-agent-harness:init --force <path>` |
|
|
12
|
+
| `diverged-canonical` | only .agents/skills changed since the two last agreed — the copy is stale | run `/buddy-agent-harness:init --copy --force <path>` |
|
|
13
|
+
| `diverged-both` | both sides changed since they last agreed — rebuilding would discard one of them | run `git diff --no-index .agents/skills <path>` and reconcile by hand |
|
|
14
|
+
| `diverged-unknown` | contents differ and no commit where they agreed was found — which side moved is unknown | run `git diff --no-index .agents/skills <path>` and reconcile by hand |
|
|
15
|
+
| `unpinned-copy` | tracked copy without the skip-worktree bit — the tree is dirty with content that must not be committed | run `git ls-files -z <path> \| xargs -0 git update-index --skip-worktree` |
|
|
16
|
+
|
|
17
|
+
Substitute the reported bridge path for `<path>`.
|
|
18
|
+
|
|
19
|
+
## The Windows case
|
|
20
|
+
|
|
21
|
+
The common failure is `degraded`. Creating a symlink on Windows needs a privilege most accounts do not have, and Git for Windows gates it separately with `core.symlinks`, which its installer leaves off. With `core.symlinks=false` git does not error — it writes the symlink out as a regular file whose contents are the target path. `/buddy-agent-harness:init --copy --force` rebuilds every bridge as a real directory on that machine; name one bridge to rebuild only that one.
|
|
22
|
+
|
|
23
|
+
A copy is a snapshot rather than a live projection, and an agent that edits a skill through it writes into the copy instead of into `.agents/skills`. That is what the `diverged` findings catch.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# Configuration findings
|
|
4
|
+
|
|
5
|
+
The bridges resolve, and the configuration around them is still wrong: a superseded harness name, a git-ignored bridge, a local-override file nothing reads, a skill whose frontmatter makes every harness skip it. None of these is an `init` flag — `init` consolidates and creates, and will not correct a file the user already wrote. They go to the `repair` skill, which offers each correction with its before and after and writes only what is approved.
|
|
6
|
+
|
|
7
|
+
| Finding | What it means | Repair |
|
|
8
|
+
| --- | --- | --- |
|
|
9
|
+
| `deprecated-harness` | a projection under a harness name that has been superseded — the replacement reads .agents/skills natively and needs no projection at all | run `/buddy-agent-harness:repair` |
|
|
10
|
+
| `ignored-bridge` | a .gitignore rule matches this bridge — an untracked bridge swallows a real edit silently | run `/buddy-agent-harness:repair` |
|
|
11
|
+
| `unread-local-override` | no harness reads this filename, so everything in it is invisible to every agent | run `/buddy-agent-harness:repair` |
|
|
12
|
+
| `unloadable-skill` | frontmatter that does not parse, or no description — either one makes a harness skip the skill outright | run `/buddy-agent-harness:repair` |
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# claude-code
|
|
4
|
+
|
|
5
|
+
## Project scope
|
|
6
|
+
|
|
7
|
+
Where `doctor` looks inside a repository.
|
|
8
|
+
|
|
9
|
+
| What | Path |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| detection directory | `.claude` |
|
|
12
|
+
| skills projection | `.claude/skills` — written by `init` |
|
|
13
|
+
| instruction bridge | `CLAUDE.md` — an import of `AGENTS.md` |
|
|
14
|
+
| MCP configuration | `.mcp.json` — the `mcpServers` key, json |
|
|
15
|
+
|
|
16
|
+
## User scope
|
|
17
|
+
|
|
18
|
+
Described, never written: `init` and `doctor` both work inside a repository.
|
|
19
|
+
|
|
20
|
+
| What | Path |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| detection directory | `.claude` |
|
|
23
|
+
| skills projection | `.claude/skills` — written by `init` |
|
|
24
|
+
| instruction bridge | none |
|
|
25
|
+
| MCP configuration | none |
|
|
26
|
+
|
|
27
|
+
## Configuration only this harness reads
|
|
28
|
+
|
|
29
|
+
Reported by `doctor` so it can be converted; see `../nonstandard.md` for what each conversion is.
|
|
30
|
+
|
|
31
|
+
| Path | Kind | Converts to |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `.claude/commands/` | command | `.agents/skills/<name>/SKILL.md` |
|
|
34
|
+
| `.claude/rules/` | rule | a skill, where the path scoping is incidental |
|
|
35
|
+
| `.claude/agents/` | subagent | nothing yet — no cross-harness format exists |
|
|
36
|
+
|
|
37
|
+
## Judgment about this harness
|
|
38
|
+
|
|
39
|
+
What to generate for it, what to leave alone, and which claims are contested: `../../../init/references/harnesses/claude-code.md`. That page is hand-written and is the one to read before writing anything for this harness.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# codex
|
|
4
|
+
|
|
5
|
+
## Project scope
|
|
6
|
+
|
|
7
|
+
Where `doctor` looks inside a repository.
|
|
8
|
+
|
|
9
|
+
| What | Path |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| detection directory | `.codex` |
|
|
12
|
+
| skills projection | none — reads `.agents/skills` natively |
|
|
13
|
+
| instruction bridge | none |
|
|
14
|
+
| MCP configuration | `.codex/config.toml` — the `mcp_servers` key, toml |
|
|
15
|
+
|
|
16
|
+
## User scope
|
|
17
|
+
|
|
18
|
+
Described, never written: `init` and `doctor` both work inside a repository.
|
|
19
|
+
|
|
20
|
+
| What | Path |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| detection directory | `.codex` |
|
|
23
|
+
| skills projection | none — reads `.agents/skills` natively |
|
|
24
|
+
| instruction bridge | none |
|
|
25
|
+
| MCP configuration | none |
|
|
26
|
+
|
|
27
|
+
## Configuration only this harness reads
|
|
28
|
+
|
|
29
|
+
Reported by `doctor` so it can be converted; see `../nonstandard.md` for what each conversion is.
|
|
30
|
+
|
|
31
|
+
| Path | Kind | Converts to |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `.codex/skills/` | skill | `.agents/skills`, projected back if needed |
|
|
34
|
+
|
|
35
|
+
## Judgment about this harness
|
|
36
|
+
|
|
37
|
+
What to generate for it, what to leave alone, and which claims are contested: `../../../init/references/harnesses/codex.md`. That page is hand-written and is the one to read before writing anything for this harness.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# copilot-cli
|
|
4
|
+
|
|
5
|
+
## Project scope
|
|
6
|
+
|
|
7
|
+
Where `doctor` looks inside a repository.
|
|
8
|
+
|
|
9
|
+
| What | Path |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| detection directory | `.github/skills` |
|
|
12
|
+
| skills projection | none — reads `.agents/skills` natively |
|
|
13
|
+
| instruction bridge | none |
|
|
14
|
+
| MCP configuration | none |
|
|
15
|
+
|
|
16
|
+
## User scope
|
|
17
|
+
|
|
18
|
+
Described, never written: `init` and `doctor` both work inside a repository.
|
|
19
|
+
|
|
20
|
+
| What | Path |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| detection directory | `.copilot` |
|
|
23
|
+
| skills projection | none — reads `.agents/skills` natively |
|
|
24
|
+
| instruction bridge | none |
|
|
25
|
+
| MCP configuration | none |
|
|
26
|
+
|
|
27
|
+
## Configuration only this harness reads
|
|
28
|
+
|
|
29
|
+
Reported by `doctor` so it can be converted; see `../nonstandard.md` for what each conversion is.
|
|
30
|
+
|
|
31
|
+
| Path | Kind | Converts to |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `.github/copilot-instructions.md` | instructions | `AGENTS.md`, with a generated bridge left behind |
|
|
34
|
+
| `.github/instructions/` | instructions | `AGENTS.md`, with a generated bridge left behind |
|
|
35
|
+
| `.github/skills/` | skill | `.agents/skills`, projected back if needed |
|
|
36
|
+
|
|
37
|
+
## Judgment about this harness
|
|
38
|
+
|
|
39
|
+
What to generate for it, what to leave alone, and which claims are contested: `../../../init/references/harnesses/copilot-cli.md`. That page is hand-written and is the one to read before writing anything for this harness.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# cursor
|
|
4
|
+
|
|
5
|
+
## Project scope
|
|
6
|
+
|
|
7
|
+
Where `doctor` looks inside a repository.
|
|
8
|
+
|
|
9
|
+
| What | Path |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| detection directory | `.cursor` |
|
|
12
|
+
| skills projection | none — reads `.agents/skills` natively |
|
|
13
|
+
| instruction bridge | none |
|
|
14
|
+
| MCP configuration | `.cursor/mcp.json` — the `mcpServers` key, json |
|
|
15
|
+
|
|
16
|
+
## User scope
|
|
17
|
+
|
|
18
|
+
Described, never written: `init` and `doctor` both work inside a repository.
|
|
19
|
+
|
|
20
|
+
| What | Path |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| detection directory | `.cursor` |
|
|
23
|
+
| skills projection | none — reads `.agents/skills` natively |
|
|
24
|
+
| instruction bridge | none |
|
|
25
|
+
| MCP configuration | none |
|
|
26
|
+
|
|
27
|
+
## Configuration only this harness reads
|
|
28
|
+
|
|
29
|
+
Reported by `doctor` so it can be converted; see `../nonstandard.md` for what each conversion is.
|
|
30
|
+
|
|
31
|
+
| Path | Kind | Converts to |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `.cursorrules` | instructions | `AGENTS.md`, with a generated bridge left behind |
|
|
34
|
+
| `.cursor/rules/` | rule | a skill, where the path scoping is incidental |
|
|
35
|
+
| `.cursor/commands/` | command | `.agents/skills/<name>/SKILL.md` |
|
|
36
|
+
| `.cursor/skills/` | skill | `.agents/skills`, projected back if needed |
|
|
37
|
+
|
|
38
|
+
## Judgment about this harness
|
|
39
|
+
|
|
40
|
+
What to generate for it, what to leave alone, and which claims are contested: `../../../init/references/harnesses/cursor.md`. That page is hand-written and is the one to read before writing anything for this harness.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# devin-desktop
|
|
4
|
+
|
|
5
|
+
## Project scope
|
|
6
|
+
|
|
7
|
+
Where `doctor` looks inside a repository.
|
|
8
|
+
|
|
9
|
+
| What | Path |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| detection directory | `.devin` |
|
|
12
|
+
| skills projection | none — reads `.agents/skills` natively |
|
|
13
|
+
| instruction bridge | none |
|
|
14
|
+
| MCP configuration | none |
|
|
15
|
+
|
|
16
|
+
No user-scope paths are primary-sourced for this harness, so `doctor` describes none.
|
|
17
|
+
|
|
18
|
+
## Judgment about this harness
|
|
19
|
+
|
|
20
|
+
What to generate for it, what to leave alone, and which claims are contested: `../../../init/references/harnesses/devin-desktop.md`. That page is hand-written and is the one to read before writing anything for this harness.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# gemini-cli
|
|
4
|
+
|
|
5
|
+
## Project scope
|
|
6
|
+
|
|
7
|
+
Where `doctor` looks inside a repository.
|
|
8
|
+
|
|
9
|
+
| What | Path |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| detection directory | `.gemini` |
|
|
12
|
+
| skills projection | none — reads `.agents/skills` natively |
|
|
13
|
+
| instruction bridge | `.gemini/settings.json` — `AGENTS.md` in the `context.fileName` entry |
|
|
14
|
+
| MCP configuration | `.gemini/settings.json` — the `mcpServers` key, json, shared with other settings |
|
|
15
|
+
|
|
16
|
+
## User scope
|
|
17
|
+
|
|
18
|
+
Described, never written: `init` and `doctor` both work inside a repository.
|
|
19
|
+
|
|
20
|
+
| What | Path |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| detection directory | `.gemini` |
|
|
23
|
+
| skills projection | none — reads `.agents/skills` natively |
|
|
24
|
+
| instruction bridge | none |
|
|
25
|
+
| MCP configuration | none |
|
|
26
|
+
|
|
27
|
+
## Configuration only this harness reads
|
|
28
|
+
|
|
29
|
+
Reported by `doctor` so it can be converted; see `../nonstandard.md` for what each conversion is.
|
|
30
|
+
|
|
31
|
+
| Path | Kind | Converts to |
|
|
32
|
+
| --- | --- | --- |
|
|
33
|
+
| `GEMINI.md` | instructions | `AGENTS.md`, with a generated bridge left behind |
|
|
34
|
+
| `.gemini/skills/` | skill | `.agents/skills`, projected back if needed |
|
|
35
|
+
|
|
36
|
+
## Judgment about this harness
|
|
37
|
+
|
|
38
|
+
What to generate for it, what to leave alone, and which claims are contested: `../../../init/references/harnesses/gemini-cli.md`. That page is hand-written and is the one to read before writing anything for this harness.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# windsurf
|
|
4
|
+
|
|
5
|
+
> **Superseded by `devin-desktop`.** The legacy paths still work, so a projection here keeps resolving and `doctor` reports the name as deprecated rather than broken. New repositories should enable `devin-desktop`.
|
|
6
|
+
|
|
7
|
+
## Project scope
|
|
8
|
+
|
|
9
|
+
Where `doctor` looks inside a repository.
|
|
10
|
+
|
|
11
|
+
| What | Path |
|
|
12
|
+
| --- | --- |
|
|
13
|
+
| detection directory | `.windsurf` |
|
|
14
|
+
| skills projection | `.windsurf/skills` — written by `init` |
|
|
15
|
+
| instruction bridge | none |
|
|
16
|
+
| MCP configuration | none |
|
|
17
|
+
|
|
18
|
+
No user-scope paths are primary-sourced for this harness, so `doctor` describes none.
|
|
19
|
+
|
|
20
|
+
## Configuration only this harness reads
|
|
21
|
+
|
|
22
|
+
Reported by `doctor` so it can be converted; see `../nonstandard.md` for what each conversion is.
|
|
23
|
+
|
|
24
|
+
| Path | Kind | Converts to |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| `.windsurfrules` | instructions | `AGENTS.md`, with a generated bridge left behind |
|
|
27
|
+
| `.windsurf/rules/` | rule | a skill, where the path scoping is incidental |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# Instruction bridge findings
|
|
4
|
+
|
|
5
|
+
| Finding | What it means | Repair |
|
|
6
|
+
| --- | --- | --- |
|
|
7
|
+
| `no-instructions` | no AGENTS.md at the repository root, so every instruction bridge points at nothing | run `/buddy-agent-harness:init`, which derives AGENTS.md and the bridges to it |
|
|
8
|
+
| `instructions-missing` | no instruction bridge at this path — the harness reads none of AGENTS.md | run `/buddy-agent-harness:init` |
|
|
9
|
+
| `instructions-unbridged` | the file is present but names AGENTS.md nowhere — the harness reads none of it | run `/buddy-agent-harness:init`, which adds the bridge without discarding what the file already says |
|
|
10
|
+
| `instructions-unreadable` | the settings file does not parse, so the harness reads none of it | fix the JSON by hand, then run `/buddy-agent-harness:init` |
|
|
11
|
+
|
|
12
|
+
`unbridged` is the one to read carefully. The file is there and looks fine, and it names `AGENTS.md` nowhere — a `CLAUDE.md` someone overwrote with real content, or a `.gemini/settings.json` another tool rewrote without `AGENTS.md` in `context.fileName`. Never fix it by replacing the file: the content that displaced the bridge may be the only copy of something.
|
|
13
|
+
|
|
14
|
+
An instruction bridge is reported per file, so a monorepo gets one row per `AGENTS.md` in the tree. Each nested `AGENTS.md` needs its own stub — an import bridges the file beside it and nothing deeper.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# MCP findings
|
|
4
|
+
|
|
5
|
+
A repository may keep a **golden MCP server set** at `.agents/buddy-agent-harness/mcp.toml` — one canonical entry per server, in the superset of fields the supported hosts accept, written by the user. Where it exists, `doctor` compares it against each harness's own MCP configuration and reports how the two have drifted. **No golden set means no MCP drift findings at all**, and a harness with no MCP file yet has nothing that could have drifted.
|
|
6
|
+
|
|
7
|
+
Comparison is semantic. Six config keys across three file formats means no two of these files are ever byte-equal, so each side is parsed into one model and the models are compared. A field the golden set leaves unset is never a difference, however a harness fills it in: a host restating its own default and a user's deliberate edit are indistinguishable there, and treating both as changes is what makes a golden set accumulate noise.
|
|
8
|
+
|
|
9
|
+
Each finding names a **locator**, not a file: `.cursor/mcp.json#servers.linear.command` is the server and field, and that is what you route on.
|
|
10
|
+
|
|
11
|
+
| Finding | What it means | Repair |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| `mcp-golden-unreadable` | the golden MCP set does not parse — the locator gives the line and column, and nothing else can be said about it | fix the TOML at <path> by hand — the reported line and column are all that can be quoted, because the parser's own message repeats the offending line and that line is the one holding the credential |
|
|
14
|
+
| `mcp-target-unreadable` | this harness config does not parse, so the harness starts none of its servers and nothing in it can be compared | fix the syntax of <path> by hand |
|
|
15
|
+
| `mcp-unprojected` | the golden set declares this server and the harness config does not carry it | add the server at <path> to that file from its golden entry, or drop it from the golden set |
|
|
16
|
+
| `mcp-undeclared` | the harness config carries this server and the golden set does not declare it | copy the server at <path> into .agents/buddy-agent-harness/mcp.toml, refusing any literal credential it carries, or drop it from <path> |
|
|
17
|
+
| `mcp-diverged-target` | only the harness config changed since the two last agreed — the edit was made through the copy | reconcile the value at <path> back into .agents/buddy-agent-harness/mcp.toml, field by field |
|
|
18
|
+
| `mcp-diverged-golden` | only the golden set changed since the two last agreed — the harness copy is stale | update <path> from the golden entry |
|
|
19
|
+
| `mcp-diverged-both` | both sides changed since they last agreed — merging either way would discard the other | reconcile <path> against .agents/buddy-agent-harness/mcp.toml by hand — never merge a three-way conflict automatically |
|
|
20
|
+
| `mcp-diverged-unknown` | the two disagree and no baseline says which side moved — neither history nor a last-projected record covers this server | compare <path> against .agents/buddy-agent-harness/mcp.toml by hand |
|
|
21
|
+
| `mcp-literal-secret` | a credential-bearing field holds a literal rather than a reference to an environment variable | move the value at <path> into an environment variable and reference it — read the value from the file, never from this report, and never repeat it back |
|
|
22
|
+
| `mcp-committed-secret` | a credential-bearing field holds a literal in a git-tracked file — the credential is committed, and moving it does not un-commit it | rotate the credential behind <path> at its issuer, then reference it from an environment variable — it is in the repository's history, so moving it is not enough |
|
|
23
|
+
|
|
24
|
+
## Credentials
|
|
25
|
+
|
|
26
|
+
The two secret findings are the ones to handle carefully.
|
|
27
|
+
|
|
28
|
+
- **The report never contains the value.** It gives you the locator and stops. Read the value out of the file named in the locator, and do not repeat it into your reply, into a commit message, or into any other file. There is no truncated preview to work from because a truncated credential is a leaked credential in the same transcript.
|
|
29
|
+
- **`mcp-committed-secret` is not `mcp-literal-secret` with worse wording.** The file is tracked, so the value is in the repository's history and every clone already has it. Moving it into an environment variable fixes the working tree and changes nothing about that. Rotate it at its issuer first.
|
|
30
|
+
- **A reference passes.** `${LINEAR_TOKEN}` and `Bearer ${LINEAR_TOKEN}` are the documented ways to write these fields and are never reported. The test is that shape, not how random the value looks.
|
|
31
|
+
- **An unreadable golden set is reported by position only.** The parser's own message quotes the line it failed on, and in this file that line is the one holding the credential — so neither the message nor the offending line is ever carried into the report. Open the file at the reported line and column.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand. -->
|
|
2
|
+
|
|
3
|
+
# Non-standard configuration
|
|
4
|
+
|
|
5
|
+
Configuration only one harness can read. Nothing here is broken — a Cursor rule does exactly what it says — which is why none of it is in the other four families. What these findings report is **reach**: guidance that lands in one tool and nowhere else, where nobody finds out except by noticing an agent behave differently somewhere else.
|
|
6
|
+
|
|
7
|
+
Each finding names the canonical form it converts to. The direction is always the same: move the content to a canonical source, and let the harness file be **generated** from it rather than authored beside it. A repository with none of these is the target; it is a direction to walk, not a gate to pass.
|
|
8
|
+
|
|
9
|
+
| Finding | What it means | Repair |
|
|
10
|
+
| --- | --- | --- |
|
|
11
|
+
| `nonstandard-instructions` | instruction content only one harness reads — AGENTS.md carries the same prose to all of them | hand <path> to `/buddy-agent-harness:init`, which consolidates it into AGENTS.md |
|
|
12
|
+
| `nonstandard-rule` | a path-scoped rule only one harness reads — a skill reaches every harness where the scoping is incidental | hand <path> to `/buddy-agent-harness:init` to convert into a skill, unless the path scoping is load-bearing |
|
|
13
|
+
| `nonstandard-command` | a harness command file — a skill is the portable form, and this harness reads skills too | hand <path> to `/buddy-agent-harness:init`, which moves it to .agents/skills |
|
|
14
|
+
| `nonstandard-skill` | a skill under a harness directory rather than the canonical one, where only that harness finds it | hand <path> to `/buddy-agent-harness:init`, which moves it to .agents/skills |
|
|
15
|
+
| `nonstandard-subagent` | a subagent definition with no cross-harness form — nothing outside this harness can read it, and no canonical form exists yet | leave <path> in place — no portable form exists yet, so this is work for a person rather than a skill |
|
|
16
|
+
|
|
17
|
+
## Two of them need judgment, not a move
|
|
18
|
+
|
|
19
|
+
**A path-scoped rule may have nowhere to go.** `AGENTS.md` scopes by directory nesting and a skill is loaded on relevance, so neither reproduces "these globs and no others". Where the scoping is incidental — a rule that happens to name paths but says something generally true — a skill carries it everywhere. Where the scoping is the point, leave it, and the finding stays as the record of why.
|
|
20
|
+
|
|
21
|
+
**A subagent has no portable form at all.** No cross-harness format exists, so the finding is the gap rather than a repair. It names no skill, and it is work for a person if it is work at all.
|
|
22
|
+
|
|
23
|
+
## What is not reported
|
|
24
|
+
|
|
25
|
+
A harness directory that is a **symlink** is a projection someone already made, not configuration authored here. An artifact is reported whether or not its harness is enabled: a `.cursorrules` in a repository nobody opens in Cursor is still instruction content `AGENTS.md` does not carry, and filtering by the enabled set would hide exactly the drift worth converting.
|
|
26
|
+
|
|
27
|
+
Hooks, LSP settings, and output styles are not covered yet. Their event names and shapes differ by harness with no safe projection, and half-reporting them would be worse than the silence.
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// Generated from src/diagnose-bridges/doctor-guidance.ts by scripts/generate-skills.ts. Do not edit by hand.
|
|
3
3
|
import { dirname, join } from 'node:path'
|
|
4
|
-
import { fileURLToPath } from 'node:url'
|
|
4
|
+
import { fileURLToPath, pathToFileURL } from 'node:url'
|
|
5
5
|
|
|
6
6
|
// <package>/skills/<skill>/scripts/doctor.mjs: four levels up is the package root.
|
|
7
7
|
const packageRoot = dirname(dirname(dirname(dirname(fileURLToPath(import.meta.url)))))
|
|
8
|
+
const { run } = await import(pathToFileURL(join(packageRoot, 'dist', 'cli.mjs')).href)
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
// The subcommand is composed into a fresh argv rather than spliced into the global one, so nothing
|
|
11
|
+
// outside this file observes the rewrite. Applied only when non-zero, so a usage code clibuilder
|
|
12
|
+
// recorded itself is not overwritten by the zero `run` returns on that path.
|
|
13
|
+
const code = await run([...process.argv.slice(0, 2), 'doctor', ...process.argv.slice(2)])
|
|
14
|
+
if (code !== 0) process.exitCode = code
|
package/skills/enhance/SKILL.md
CHANGED
|
@@ -38,6 +38,8 @@ Judge by meaning, not by heading or wording. A repository covering delegation un
|
|
|
38
38
|
|
|
39
39
|
When in doubt, treat it as covered and say why. A missing offer costs the user nothing; a duplicate section teaches every future agent that this file repeats itself.
|
|
40
40
|
|
|
41
|
+
**A heading inside a fenced code block is not a heading.** Text between ``` or ~~~ fences is an example of a file, not part of this one, and an addition quoted inside a fence is being shown rather than adopted. This is not hypothetical: every addition here is offered as a fenced block containing its own heading, so a repository documenting this tool — or an `AGENTS.md` that quotes one — carries the exact heading the addition would write, inside a fence, while remaining entirely uncovered. Judge only the prose the agent actually reads as instruction.
|
|
42
|
+
|
|
41
43
|
## 4. Offer
|
|
42
44
|
|
|
43
45
|
Where an addition is uncovered, show its text **verbatim** — the whole thing, not a summary — say where it would go, and ask.
|
|
@@ -48,6 +50,8 @@ Do not argue for it past one sentence. The user is reading the actual text; that
|
|
|
48
50
|
|
|
49
51
|
On approval, append the section to the root `AGENTS.md`, outside the managed region, preserving the surrounding file exactly.
|
|
50
52
|
|
|
53
|
+
Strip the fence when you write. The ``` markers around the addition in its reference file are there so you can see where the text begins and ends; the section goes into `AGENTS.md` as prose, not as a code block.
|
|
54
|
+
|
|
51
55
|
On a decline, write nothing.
|
|
52
56
|
|
|
53
57
|
## 6. Report
|
package/skills/init/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Give a repository one canonical agent configuration — a root `AGENTS.md` and a
|
|
|
6
6
|
|
|
7
7
|
The skill runs a five-phase workflow: survey the repository, classify what it finds, confirm the plan with you, apply it, then verify.
|
|
8
8
|
|
|
9
|
-
It detects agent configuration you already have — instruction files, skills, commands, subagents, rules, MCP servers, hooks — and either consolidates it into the canonical source, links it back out, or reports it as canonical-only where
|
|
9
|
+
It detects agent configuration you already have — instruction files, skills, commands, subagents, rules, MCP servers, hooks — and either consolidates it into the canonical source, links it back out, or reports it as canonical-only where converting it would mean inventing configuration you did not write. It never removes or rewrites a file you authored without asking first.
|
|
10
10
|
|
|
11
11
|
## Why the projection step is small
|
|
12
12
|
|