buddy-agent-harness 0.4.1 → 0.5.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,6 +1,6 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.4.1",
3
+ "version": "0.5.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.4.1",
3
+ "version": "0.5.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.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Initialize standards-based agent configuration across agent harnesses",
5
5
  "author": {
6
6
  "name": "repobuddy"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "buddy-agent-harness",
3
- "version": "0.4.1",
3
+ "version": "0.5.0",
4
4
  "description": "Initialize standards-based agent configuration across agent harnesses",
5
5
  "keywords": [
6
6
  "repobuddy",
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.1",
4
+ "version": "0.5.0",
5
5
  "description": "Initialize standards-based agent configuration across agent harnesses",
6
6
  "author": {
7
7
  "name": "repobuddy"
@@ -15,7 +15,7 @@ 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.4.1 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.
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.5.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
 
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: enhance
3
+ description: Use this skill when a repository already has an AGENTS.md and you want to add guidance it is missing — offering vetted sections one at a time and writing only what the user approves. Runs on its own or straight after init.
4
+ argument-hint: '[--root <dir>]'
5
+ ---
6
+
7
+ # Harness Enhance
8
+
9
+ `init` consolidates what a repository already has. `enhance` proposes what it does not.
10
+
11
+ The split matters: initialization has to run everywhere and invent nothing, so it carries no opinions. An addition is opinionated by construction, and worth having only where its subject is missing. Keeping them apart is what lets `init` stay safe to run on any repository.
12
+
13
+ Every addition is **offered, never written on sight**. An addition asserts something about how the repository is worked in — it stays true whether or not this tool ever ran — so it is material under the rule in `../init/references/agents-md.md`, and material content needs approval. Nothing here goes inside the `buddy-agent-harness` managed region; that region is for the tool's own bookkeeping.
14
+
15
+ One addition ships today: `references/delegation.md`.
16
+
17
+ ## 1. Find the instruction file
18
+
19
+ Locate the Git repository root. The target is the root `AGENTS.md`.
20
+
21
+ If there is no root `AGENTS.md`, stop and say so. This skill adds to an existing file; creating one is `init`'s job, so point there and write nothing.
22
+
23
+ A nested `AGENTS.md` is never a target. It governs its own subtree, and none of these additions are subtree-scoped.
24
+
25
+ ## 2. Read the merged view
26
+
27
+ Read the root `AGENTS.md`. Then read any harness instruction file whose content still belongs in it — `CLAUDE.md` with a body of its own, `.cursorrules`, `.cursor/rules/**`, `.github/copilot-instructions.md`, `GEMINI.md`, `.windsurfrules`. `../init/references/detection.md` lists them.
28
+
29
+ Judge against all of it together. That combined text is what an agent effectively reads, so guidance living in a Cursor always-on rule counts as present even though `AGENTS.md` does not carry it yet.
30
+
31
+ **Read those files; do not consolidate them.** Merging them into `AGENTS.md` is `init`'s work and belongs to `init` alone. If you find content that should be consolidated, say so and recommend `init` — then carry on with the coverage judgment.
32
+
33
+ ## 3. Judge coverage
34
+
35
+ For each addition, ask: **does the merged view already tell the agent what this addition would tell it?**
36
+
37
+ Judge by meaning, not by heading or wording. A repository covering delegation under `## Working with subagents`, or in three sentences inside a longer section, is covered. A repository that mentions subagents only to name a tool is not.
38
+
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
+
41
+ ## 4. Offer
42
+
43
+ Where an addition is uncovered, show its text **verbatim** — the whole thing, not a summary — say where it would go, and ask.
44
+
45
+ Do not argue for it past one sentence. The user is reading the actual text; that is the argument.
46
+
47
+ ## 5. Write what was approved
48
+
49
+ On approval, append the section to the root `AGENTS.md`, outside the managed region, preserving the surrounding file exactly.
50
+
51
+ On a decline, write nothing.
52
+
53
+ ## 6. Report
54
+
55
+ Report every run, whichever way it went: what you read, what you judged covered and why, what you offered, and what was written. A run that offers nothing still reports — that is the only way the user can tell "already covered" from "did not look".
56
+
57
+ ## Rules
58
+
59
+ - **Detection decides every run.** There is no first-run path and no memory of a previous decline; run the same way every time. A section the user deleted reads as absent and is offered again, because absence is the whole state. If that becomes annoying, the fix is the user declining `init`'s offer to run this skill, not a flag here.
60
+ - **Never write without approval.** The offer is the whole point.
61
+ - **Never edit an addition to fit a repository.** The wording is fixed. Offer it as written or not at all.
62
+ - **Never touch the managed region**, a nested `AGENTS.md`, or any file other than the root `AGENTS.md`.
63
+ - Local agent configuration only. Do not change workflows, repository settings, or unrelated project files.
@@ -0,0 +1,28 @@
1
+ # Addition: Delegation
2
+
3
+ ## Covered when
4
+
5
+ The merged view already tells the agent **when to hand work to a subagent**. Any of these counts:
6
+
7
+ - guidance on what to delegate and what to keep, under any heading
8
+ - a rule about briefing subagents, paired with any sense of when to spawn one
9
+ - an explicit statement that this repository does not use subagents
10
+
11
+ Naming a subagent tool, or listing available models, is not coverage. Neither is a delegation
12
+ rule that appears only in a skill body — this addition is for the always-loaded file.
13
+
14
+ ## Offer this text verbatim
15
+
16
+ ```markdown
17
+ ## Delegation
18
+
19
+ If this harness can spawn subagents, delegate bulk-mechanical work and research whose answer is far smaller than the reading behind it. Do it yourself when the brief would cost more than the task — a one-line edit is not worth a subagent. Keep the judgment calls and final decisions; delegate the fact-gathering that feeds them. The cheaper the subagent, the less should break if it gets the answer wrong. Brief every one you spawn: it inherits no context, so give it the context, the why, and what done looks like.
20
+ ```
21
+
22
+ ## Do not edit it
23
+
24
+ The wording is fixed. In particular, do not add model names, tiers, or a table of models — the
25
+ section is written to stay correct as model lineups change, and naming one breaks that. Offer it
26
+ as written or not at all.
27
+
28
+ Place it at the end of the user's prose, outside the `buddy-agent-harness` managed region.
@@ -65,7 +65,7 @@ One case does need asking even though it only creates a file: a nested `AGENTS.m
65
65
  1. Scaffold the baseline in `references/standard.md`: `.agents/`, `.agents/skills/`, and a root `AGENTS.md` if absent. Never clobber an existing one. `references/agents-md.md` decides what belongs in that file — a repository with no instruction content still needs one derived and confirmed, not an empty heading.
66
66
  2. Move approved skills and commands to `.agents/skills/<name>/SKILL.md`, preferring `git mv` so history follows. Fix frontmatter per `references/frontmatter.md` — this is where cross-harness portability is won or lost.
67
67
  3. Merge approved instruction content into `AGENTS.md`, preserving the author's wording. Append; do not restructure. Replace a harness file with a pointer only where approved. Content only some tasks need belongs in a skill, not in `AGENTS.md`.
68
- 4. Run `node scripts/init.mjs` at the repository root, resolving that path against this skill's own directory. The launcher runs the CLI that shipped beside it, so nothing is downloaded; fall back to `npx -y buddy-agent-harness@^0.4.1 init` when the path cannot be resolved. It links `.agents/skills` into the harnesses that need it and skips those that read it natively. Add harnesses the user names with `--harness codex,gemini-cli`.
68
+ 4. Run `node scripts/init.mjs` at the repository root, resolving that path against this skill's own directory. The launcher runs the CLI that shipped beside it, so nothing is downloaded; fall back to `npx -y buddy-agent-harness@^0.5.0 init` when the path cannot be resolved. It links `.agents/skills` into the harnesses that need it and skips those that read it natively. Add harnesses the user names with `--harness codex,gemini-cli`.
69
69
  5. If the command reports a conflict, resolve the named target and retry. Use `--force` only to replace that exact projection; use `--copy` only where links are unavailable — a copy is a snapshot, not a live projection, so say so when you fall back.
70
70
  6. Apply the instruction bridges `init` does not write. Claude Code reads `CLAUDE.md`, not `AGENTS.md` — create a `CLAUDE.md` containing `@AGENTS.md`. Gemini CLI needs `AGENTS.md` added to `context.fileName` in `.gemini/settings.json`. Both are detailed in the matching `references/harnesses/<harness>.md`; apply only the ones you enabled. Where nested `AGENTS.md` files exist, write the same stub in each directory holding one — `references/agents-md.md` covers the one case that stops for approval first.
71
71
  7. If any bridge now exists, write or restore the non-material region in `AGENTS.md` per `references/agents-md.md`, unless the markers are present and empty. Without it, an agent asked to change a skill edits `.claude/skills/<name>/SKILL.md` — which a link resolves back to canonical, but a copy silently forks. Skip this when every enabled harness reads `.agents/skills/` natively; with no bridge there is nothing to warn about.
@@ -76,6 +76,8 @@ Confirm each projection resolves into `.agents/skills` and that every migrated `
76
76
 
77
77
  `init` is not a formatter. If the repository has one, run it over the written files and say so.
78
78
 
79
+ Then offer to continue with the `enhance` skill, which proposes guidance the repository is missing rather than consolidating what it has. Ask once and take the answer; `init` writes no instruction content of its own either way, and `enhance` decides for itself whether anything is worth offering.
80
+
79
81
  ## Rules
80
82
 
81
83
  - Never invent project policy, and never make a material change to a user's `AGENTS.md`. `references/agents-md.md` draws the line: a statement that would stop being true if `init`'s output were removed describes the tool's own artifact and is non-material.