bros-harness 0.1.5 → 0.1.6
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/CHANGELOG.md +4 -0
- package/README.md +16 -9
- package/bin/bros.mjs +27 -8
- package/docs/installation.md +137 -31
- package/docs/integrations/opencode.md +23 -5
- package/docs/native-opencode-agent-installation.md +8 -197
- package/examples/opencode/README.md +16 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.6 - 2026-06-03
|
|
4
|
+
|
|
5
|
+
- Corrected OpenCode installation guidance to use `opencode plugin bros-harness` as the primary package installer flow before manual config snippets.
|
|
6
|
+
|
|
3
7
|
## 0.1.5 - 2026-06-03
|
|
4
8
|
|
|
5
9
|
- Added flexible feature-branch Git permission patterns for BROS executor agents with explicit approval-packet requirements.
|
package/README.md
CHANGED
|
@@ -79,17 +79,22 @@ The point is not ceremony for ceremony’s sake. The point is to keep useful pre
|
|
|
79
79
|
|
|
80
80
|
## Installation
|
|
81
81
|
|
|
82
|
-
BROS Harness is OpenCode-first.
|
|
82
|
+
BROS Harness is OpenCode-first. Use the full installation guide:
|
|
83
83
|
|
|
84
|
-
|
|
84
|
+
[`docs/installation.md`](docs/installation.md)
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
86
|
+
Quick project install:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
opencode plugin bros-harness
|
|
90
90
|
```
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
Restart OpenCode, then verify:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
opencode agent list
|
|
96
|
+
opencode run --agent mighty-bro "hello"
|
|
97
|
+
```
|
|
93
98
|
|
|
94
99
|
Optional read-only CLI checks:
|
|
95
100
|
|
|
@@ -102,7 +107,10 @@ bros list-assets
|
|
|
102
107
|
For AI-assisted setup, use a narrow prompt:
|
|
103
108
|
|
|
104
109
|
```text
|
|
105
|
-
|
|
110
|
+
Install BROS Harness into OpenCode by following docs/installation.md as the source of truth.
|
|
111
|
+
Do not only paste JSON into opencode.jsonc; use OpenCode's plugin installer unless the guide's fallback applies.
|
|
112
|
+
Do not edit providers, MCP, permissions, telemetry, secrets, npm publishing, or npm dist-tags.
|
|
113
|
+
Restart OpenCode and verify BROS agents after installation.
|
|
106
114
|
```
|
|
107
115
|
|
|
108
116
|
The CLI can print similar guidance:
|
|
@@ -173,7 +181,6 @@ Before proposing changes, check:
|
|
|
173
181
|
Useful references:
|
|
174
182
|
|
|
175
183
|
- [`docs/installation.md`](docs/installation.md)
|
|
176
|
-
- [`docs/native-opencode-agent-installation.md`](docs/native-opencode-agent-installation.md)
|
|
177
184
|
- [`docs/integrations/opencode.md`](docs/integrations/opencode.md)
|
|
178
185
|
- [`docs/security.md`](docs/security.md)
|
|
179
186
|
- [`CONTRIBUTING.md`](CONTRIBUTING.md)
|
package/bin/bros.mjs
CHANGED
|
@@ -9,10 +9,10 @@ const manifestPath = join(packageRoot, "assets", "manifest.json");
|
|
|
9
9
|
|
|
10
10
|
const commands = [
|
|
11
11
|
["help", "Show available BROS Harness commands."],
|
|
12
|
-
["snippet", "Print
|
|
12
|
+
["snippet", "Print OpenCode installer commands and resulting plugin entry."],
|
|
13
13
|
["doctor", "Validate package asset directories and manifest shape without mutation."],
|
|
14
14
|
["list-assets", "Summarize packaged OpenCode agent, command, skill, doc, and template counts."],
|
|
15
|
-
["agent-install-prompt", "Print a safe prompt an AI agent can follow to
|
|
15
|
+
["agent-install-prompt", "Print a safe prompt an AI agent can follow to install the plugin."]
|
|
16
16
|
];
|
|
17
17
|
|
|
18
18
|
const requiredPaths = [
|
|
@@ -39,8 +39,27 @@ function printHelp() {
|
|
|
39
39
|
console.log("All commands are read-only. This CLI does not edit live OpenCode config.");
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
function
|
|
43
|
-
|
|
42
|
+
async function getPackageVersion() {
|
|
43
|
+
const packageJson = await readJson(join(packageRoot, "package.json"));
|
|
44
|
+
return packageJson.version || "latest";
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
async function printSnippet() {
|
|
48
|
+
const version = await getPackageVersion();
|
|
49
|
+
console.log(`Recommended OpenCode installer command:
|
|
50
|
+
opencode plugin bros-harness
|
|
51
|
+
|
|
52
|
+
Global OpenCode config:
|
|
53
|
+
opencode plugin bros-harness --global
|
|
54
|
+
|
|
55
|
+
Pinned current package when cache or latest resolution is suspect:
|
|
56
|
+
opencode plugin bros-harness@${version} --force
|
|
57
|
+
|
|
58
|
+
Full guide:
|
|
59
|
+
docs/installation.md
|
|
60
|
+
|
|
61
|
+
Resulting config entry:
|
|
62
|
+
${JSON.stringify({ plugin: ["bros-harness"] }, null, 2)}`);
|
|
44
63
|
}
|
|
45
64
|
|
|
46
65
|
async function readJson(path) {
|
|
@@ -85,8 +104,8 @@ async function listAssets() {
|
|
|
85
104
|
console.log(`Templates: ${counts.templates?.imported ?? "unknown"}`);
|
|
86
105
|
}
|
|
87
106
|
|
|
88
|
-
function printAgentInstallPrompt() {
|
|
89
|
-
console.log(`
|
|
107
|
+
async function printAgentInstallPrompt() {
|
|
108
|
+
console.log(`Install BROS Harness into OpenCode by following docs/installation.md as the source of truth.\nDo not only paste JSON into opencode.jsonc; use OpenCode's plugin installer unless the guide's fallback applies.\nDo not edit providers, MCP, permissions, telemetry, secrets, npm publishing, or npm dist-tags.\nRestart OpenCode and verify BROS agents after installation.`);
|
|
90
109
|
}
|
|
91
110
|
|
|
92
111
|
const command = process.argv[2] ?? "help";
|
|
@@ -99,7 +118,7 @@ try {
|
|
|
99
118
|
printHelp();
|
|
100
119
|
break;
|
|
101
120
|
case "snippet":
|
|
102
|
-
printSnippet();
|
|
121
|
+
await printSnippet();
|
|
103
122
|
break;
|
|
104
123
|
case "doctor":
|
|
105
124
|
await doctor();
|
|
@@ -108,7 +127,7 @@ try {
|
|
|
108
127
|
await listAssets();
|
|
109
128
|
break;
|
|
110
129
|
case "agent-install-prompt":
|
|
111
|
-
printAgentInstallPrompt();
|
|
130
|
+
await printAgentInstallPrompt();
|
|
112
131
|
break;
|
|
113
132
|
default:
|
|
114
133
|
console.error(`Unknown command: ${command}`);
|
package/docs/installation.md
CHANGED
|
@@ -1,10 +1,55 @@
|
|
|
1
|
-
# Installation
|
|
1
|
+
# Installation Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This is the source of truth for installing BROS Harness into OpenCode.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
BROS Harness is a package-first OpenCode plugin. The primary installation path is OpenCode's own plugin installer. Do not rely on only pasting `{"plugin":["bros-harness"]}` into `opencode.jsonc`: that config entry does not guarantee OpenCode has installed or cached the npm package it must load.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
Confirm the local tools are available:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
opencode --version
|
|
13
|
+
opencode plugin --help
|
|
14
|
+
npm --version
|
|
15
|
+
node --version
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Check the published package metadata:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm view bros-harness dist-tags version --json
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
As of this release, the validated published package is `bros-harness@0.1.6` and the expected `latest` dist-tag is `0.1.6`.
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
For the current project config, run:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
opencode plugin bros-harness
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
For global OpenCode config, run this only when you want BROS Harness in every OpenCode workspace:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
opencode plugin bros-harness --global
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If OpenCode has a stale cached package, or if npm metadata shows a stale `latest` dist-tag, pin the validated package and replace the existing plugin entry:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
opencode plugin bros-harness@0.1.6 --force
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For global scope with the pinned package, add `--global`:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
opencode plugin bros-harness@0.1.6 --force --global
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The installer makes the package available to OpenCode and writes a config entry like this:
|
|
8
53
|
|
|
9
54
|
```json
|
|
10
55
|
{
|
|
@@ -12,50 +57,112 @@ Add the plugin package to OpenCode config:
|
|
|
12
57
|
}
|
|
13
58
|
```
|
|
14
59
|
|
|
15
|
-
Restart
|
|
60
|
+
## Restart
|
|
61
|
+
|
|
62
|
+
Fully quit and restart OpenCode after installing or changing plugin config. OpenCode loads plugins at startup, so an already-running session can keep using stale config.
|
|
63
|
+
|
|
64
|
+
## Verify
|
|
65
|
+
|
|
66
|
+
After restart, verify that BROS agents are visible:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
opencode agent list
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Expected BROS agents include:
|
|
16
73
|
|
|
17
|
-
|
|
74
|
+
- `mighty-bro`
|
|
75
|
+
- `bro-build`
|
|
76
|
+
- `bro-test`
|
|
77
|
+
- `bro-shield`
|
|
78
|
+
- `bro-docs`
|
|
79
|
+
- `bro-ops`
|
|
80
|
+
- `bro-design`
|
|
81
|
+
- `bro-ui`
|
|
82
|
+
- `bro-explore`
|
|
83
|
+
|
|
84
|
+
Run a minimal smoke test:
|
|
18
85
|
|
|
19
86
|
```bash
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
87
|
+
opencode run --agent mighty-bro "hello"
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
If BROS commands are available in the active session, `/bros-status` can also be used after restart.
|
|
91
|
+
|
|
92
|
+
## Troubleshooting
|
|
93
|
+
|
|
94
|
+
If `opencode agent list` does not show `mighty-bro` or the `bro-*` agents, do not keep editing JSON. Check these causes first:
|
|
95
|
+
|
|
96
|
+
- OpenCode was not restarted after the plugin install.
|
|
97
|
+
- The plugin was installed in project scope but OpenCode was started from another project.
|
|
98
|
+
- The plugin was installed globally only in a different user or config home.
|
|
99
|
+
- OpenCode cached a stale package version.
|
|
100
|
+
- The config contains a manual plugin entry but OpenCode never installed the package.
|
|
101
|
+
|
|
102
|
+
Use the pinned installer to repair stale package resolution:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
opencode plugin bros-harness@0.1.6 --force
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Then restart OpenCode and run verification again.
|
|
109
|
+
|
|
110
|
+
## Manual Config Fallback
|
|
111
|
+
|
|
112
|
+
Manual config editing is a fallback, not the recommended installation path. Use it only when the package is already resolvable by OpenCode or when using a local development path.
|
|
113
|
+
|
|
114
|
+
For package config, merge only the plugin entry:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"plugin": ["bros-harness"]
|
|
119
|
+
}
|
|
23
120
|
```
|
|
24
121
|
|
|
25
|
-
|
|
122
|
+
For local repository smoke tests, use an absolute file URL:
|
|
26
123
|
|
|
27
|
-
|
|
124
|
+
```json
|
|
125
|
+
{
|
|
126
|
+
"plugin": ["file:///absolute/path/to/bros/src/plugin.mjs"]
|
|
127
|
+
}
|
|
128
|
+
```
|
|
28
129
|
|
|
29
|
-
|
|
130
|
+
After any manual config edit, fully restart OpenCode and verify with `opencode agent list`.
|
|
131
|
+
|
|
132
|
+
## AI Agent Prompt
|
|
133
|
+
|
|
134
|
+
Use this prompt when asking an AI coding agent to install BROS Harness:
|
|
30
135
|
|
|
31
136
|
```text
|
|
32
|
-
|
|
137
|
+
Install BROS Harness into OpenCode by following docs/installation.md as the source of truth.
|
|
138
|
+
First check opencode --version, opencode plugin --help, npm --version, node --version,
|
|
139
|
+
and npm view bros-harness dist-tags version --json.
|
|
140
|
+
Ask whether to use project scope or global scope.
|
|
141
|
+
After approval, use opencode plugin bros-harness for project scope or
|
|
142
|
+
opencode plugin bros-harness --global for global scope.
|
|
143
|
+
If latest resolution or cache state is suspect, use bros-harness@0.1.6 --force
|
|
144
|
+
in the same approved scope.
|
|
145
|
+
Do not run npm install, publish packages, mutate npm dist-tags, edit providers,
|
|
146
|
+
MCP servers, permissions, telemetry, secrets, or credentials.
|
|
147
|
+
If manual config editing is explicitly requested, merge only the plugin entry
|
|
148
|
+
and show the diff before writing.
|
|
149
|
+
Tell the human to fully restart OpenCode, then verify with opencode agent list
|
|
150
|
+
and opencode run --agent mighty-bro "hello".
|
|
33
151
|
```
|
|
34
152
|
|
|
35
|
-
The package helper
|
|
153
|
+
The package helper prints a short reference prompt:
|
|
36
154
|
|
|
37
155
|
```bash
|
|
38
156
|
bros agent-install-prompt
|
|
39
157
|
```
|
|
40
158
|
|
|
41
|
-
##
|
|
42
|
-
|
|
43
|
-
- Uses OpenCode's in-memory `config(cfg)` hook at startup.
|
|
44
|
-
- Adds package-relative BROS skills to `skills.paths` only when the existing field shape is schema-compatible.
|
|
45
|
-
- Adds packaged BROS command prompt entries to `command` without replacing existing command keys.
|
|
159
|
+
## Runtime Behavior
|
|
46
160
|
|
|
47
|
-
|
|
161
|
+
On startup, the plugin uses OpenCode's in-memory `config(cfg)` hook only. It adds package-relative BROS skills, packaged BROS agents, and packaged BROS commands without replacing existing keys.
|
|
48
162
|
|
|
49
|
-
|
|
50
|
-
- No MCP servers.
|
|
51
|
-
- No permission changes.
|
|
52
|
-
- No telemetry.
|
|
53
|
-
- No secrets or credential validation.
|
|
54
|
-
- No provider, MCP, permission, telemetry, or secret registration.
|
|
55
|
-
- No filesystem writes.
|
|
56
|
-
- No live user config file mutation; `opencode.json`, `.opencode/`, and global config files are not written by the package plugin.
|
|
163
|
+
The runtime plugin does not write user config files, install dependencies, publish packages, register providers, add MCP servers, change permissions, configure telemetry, or read, validate, or write secrets.
|
|
57
164
|
|
|
58
|
-
##
|
|
165
|
+
## Contributor Checks
|
|
59
166
|
|
|
60
167
|
For repository development only:
|
|
61
168
|
|
|
@@ -64,5 +171,4 @@ npm run validate
|
|
|
64
171
|
node bin/bros.mjs doctor
|
|
65
172
|
```
|
|
66
173
|
|
|
67
|
-
Publishing
|
|
68
|
-
Asset import is maintainer-only source maintenance for repository asset refreshes, not part of package installation. Package users should rely on the plugin snippet and read-only CLI helpers above; import tooling is not exposed as an installed package command.
|
|
174
|
+
Publishing, dependency installation, and asset import remain separate maintainer-gated actions. Package users should rely on OpenCode's plugin installer and the read-only CLI helpers above.
|
|
@@ -2,9 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
OpenCode is the primary integration target for BROS Harness.
|
|
4
4
|
|
|
5
|
-
## Package
|
|
5
|
+
## Package Installer
|
|
6
6
|
|
|
7
|
-
Use the
|
|
7
|
+
Use the complete installation guide as the source of truth:
|
|
8
|
+
|
|
9
|
+
[`../installation.md`](../installation.md)
|
|
10
|
+
|
|
11
|
+
OpenCode's plugin installer makes the npm package available to OpenCode and updates config in the selected scope.
|
|
12
|
+
|
|
13
|
+
Project scope:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
opencode plugin bros-harness
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Global scope:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
opencode plugin bros-harness --global
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The resulting config entry is:
|
|
8
26
|
|
|
9
27
|
```json
|
|
10
28
|
{
|
|
@@ -12,7 +30,7 @@ Use the package plugin entry:
|
|
|
12
30
|
}
|
|
13
31
|
```
|
|
14
32
|
|
|
15
|
-
This is the preferred path for users and agents. Local path examples are contributor-only.
|
|
33
|
+
This is the preferred path for users and agents. Adding the JSON entry manually is only enough when the package is already resolvable by OpenCode. Local path examples are contributor-only.
|
|
16
34
|
|
|
17
35
|
## Packaged assets
|
|
18
36
|
|
|
@@ -30,7 +48,7 @@ This runtime hook changes only the merged config object OpenCode passes to the p
|
|
|
30
48
|
|
|
31
49
|
## Safe agent workflow
|
|
32
50
|
|
|
33
|
-
For end-to-end native OpenCode detection, npm version selection, plugin installation, verification, troubleshooting, and restart guidance, see [`../
|
|
51
|
+
For end-to-end native OpenCode detection, npm version selection, plugin installation, verification, troubleshooting, and restart guidance, see [`../installation.md`](../installation.md).
|
|
34
52
|
|
|
35
53
|
Agents should use:
|
|
36
54
|
|
|
@@ -38,4 +56,4 @@ Agents should use:
|
|
|
38
56
|
bros agent-install-prompt
|
|
39
57
|
```
|
|
40
58
|
|
|
41
|
-
The prompt instructs agents to
|
|
59
|
+
The prompt instructs agents to follow the installation guide, run OpenCode's plugin installer after approval, restart OpenCode, and verify that BROS agents are visible.
|
|
@@ -1,205 +1,16 @@
|
|
|
1
1
|
# Native OpenCode Agent Installation Guide
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
This page is retained for older links.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Use the complete installation guide as the source of truth:
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
[`installation.md`](installation.md)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- LLMs and coding agents helping a user install BROS Harness into OpenCode.
|
|
12
|
-
- Maintainers validating installation instructions without changing global user configuration.
|
|
13
|
-
- Users who want a safe checklist for native OpenCode setup.
|
|
14
|
-
|
|
15
|
-
## Safety boundaries
|
|
16
|
-
|
|
17
|
-
Agents must follow these limits:
|
|
18
|
-
|
|
19
|
-
- Do not read `.env` files, tokens, credentials, provider keys, or secret stores.
|
|
20
|
-
- Do not print secret values if encountered. Report only the path, line number, variable name, or redacted value.
|
|
21
|
-
- Do not edit provider, MCP, permission, telemetry, credential, or secret settings.
|
|
22
|
-
- Do not publish npm packages.
|
|
23
|
-
- Do not change npm dist-tags unless the maintainer explicitly approves that registry mutation.
|
|
24
|
-
- Do not mutate global OpenCode config automatically. If a config edit is needed, show the proposed diff and ask the user before writing.
|
|
25
|
-
- Do not overwrite an existing OpenCode config. Merge only the BROS Harness plugin entry.
|
|
26
|
-
|
|
27
|
-
## Detect OpenCode and local tooling
|
|
28
|
-
|
|
29
|
-
Run only safe read-only detection commands unless the user approves a write.
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
opencode --version
|
|
33
|
-
npm --version
|
|
34
|
-
node --version
|
|
35
|
-
npm view bros-harness dist-tags version --json
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
If `opencode --version` fails, stop and ask the user to install or expose OpenCode on `PATH` before proceeding. If `npm --version` fails, ask the user which package manager they want to use and avoid guessing.
|
|
39
|
-
|
|
40
|
-
Be aware of likely OpenCode config locations, but do not edit them without user approval:
|
|
41
|
-
|
|
42
|
-
- Repository-local `opencode.json` or `opencode.jsonc`.
|
|
43
|
-
- Repository-local `.opencode/` configuration files.
|
|
44
|
-
- User-level OpenCode config under the platform's normal config directory, such as `~/.config/opencode/` on Linux.
|
|
45
|
-
|
|
46
|
-
When inspecting config, avoid files that may contain secrets. If the user asks for edits, propose the smallest plugin-only change.
|
|
47
|
-
|
|
48
|
-
## Choose the package version
|
|
49
|
-
|
|
50
|
-
The normal package plugin reference is:
|
|
51
|
-
|
|
52
|
-
```json
|
|
53
|
-
{
|
|
54
|
-
"plugin": ["bros-harness"]
|
|
55
|
-
}
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
However, OpenCode or npm may resolve `bros-harness@latest`, and the `latest` dist-tag can be stale. The known-good version from prior validation is `bros-harness@0.1.4`.
|
|
59
|
-
|
|
60
|
-
Use this version-selection rule:
|
|
61
|
-
|
|
62
|
-
1. Check npm metadata first:
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
npm view bros-harness dist-tags version --json
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
2. If `latest` points to the expected current known-good version, use `bros-harness@latest` or the bare plugin package name.
|
|
69
|
-
3. If `latest` is stale, ambiguous, or OpenCode appears to cache an older package, prefer the pinned known-good package reference: `bros-harness@0.1.4`.
|
|
70
|
-
4. If a newer known-good version is explicitly approved, replace `0.1.4` with `<known-good-version>` and document why it is trusted.
|
|
71
|
-
|
|
72
|
-
## Recommended install flow
|
|
73
|
-
|
|
74
|
-
1. Confirm OpenCode is available:
|
|
75
|
-
|
|
76
|
-
```bash
|
|
77
|
-
opencode --version
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
2. Confirm npm can resolve the package metadata:
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
npm view bros-harness dist-tags version --json
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
3. Ask the user which OpenCode config scope they want to update if more than one config path is possible.
|
|
87
|
-
|
|
88
|
-
4. Propose one of these plugin entries.
|
|
89
|
-
|
|
90
|
-
Use the normal latest-resolving entry only when npm metadata is healthy:
|
|
91
|
-
|
|
92
|
-
```json
|
|
93
|
-
{
|
|
94
|
-
"plugin": ["bros-harness"]
|
|
95
|
-
}
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Use a pinned package when `latest` is stale or cache behavior is suspect:
|
|
99
|
-
|
|
100
|
-
```json
|
|
101
|
-
{
|
|
102
|
-
"plugin": ["bros-harness@0.1.4"]
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
For future maintained releases, the pinned form may become:
|
|
107
|
-
|
|
108
|
-
```json
|
|
109
|
-
{
|
|
110
|
-
"plugin": ["bros-harness@<known-good-version>"]
|
|
111
|
-
}
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
5. Show the proposed config diff. The only intended change is adding or merging the BROS Harness plugin entry.
|
|
115
|
-
|
|
116
|
-
6. Ask the user before writing the config.
|
|
117
|
-
|
|
118
|
-
7. After the approved edit, tell the user to restart OpenCode. The plugin is loaded at OpenCode startup, so the running session may not see the new package until restart.
|
|
119
|
-
|
|
120
|
-
## Commands agents may run
|
|
121
|
-
|
|
122
|
-
Read-only detection and verification commands are safe when the user permits local command execution:
|
|
123
|
-
|
|
124
|
-
```bash
|
|
125
|
-
opencode --version
|
|
126
|
-
npm --version
|
|
127
|
-
node --version
|
|
128
|
-
npm view bros-harness dist-tags version --json
|
|
129
|
-
opencode agent list
|
|
130
|
-
opencode run --agent mighty-bro "hello"
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
If BROS commands are available after restart, this may also be used:
|
|
134
|
-
|
|
135
|
-
```text
|
|
136
|
-
/bros-status
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
Do not run install, publish, or registry mutation commands unless the user explicitly approves the exact action.
|
|
140
|
-
|
|
141
|
-
## Verification
|
|
142
|
-
|
|
143
|
-
After the config edit and OpenCode restart, verify that BROS agents are visible:
|
|
144
|
-
|
|
145
|
-
```bash
|
|
146
|
-
opencode agent list
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
Then run a minimal smoke test:
|
|
150
|
-
|
|
151
|
-
```bash
|
|
152
|
-
opencode run --agent mighty-bro "hello"
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
If the OpenCode command interface supports slash commands in the active session, check BROS status:
|
|
156
|
-
|
|
157
|
-
```text
|
|
158
|
-
/bros-status
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Expected result: packaged BROS agents and commands are available after restart. If the agent list does not include BROS agents, troubleshoot package version resolution and restart state first.
|
|
162
|
-
|
|
163
|
-
## Troubleshooting stale `latest` resolution
|
|
164
|
-
|
|
165
|
-
Check package metadata:
|
|
166
|
-
|
|
167
|
-
```bash
|
|
168
|
-
npm view bros-harness dist-tags version --json
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
If `latest` is stale or OpenCode appears to cache an older package:
|
|
172
|
-
|
|
173
|
-
1. Switch the plugin entry from the bare package name to a pinned package reference:
|
|
174
|
-
|
|
175
|
-
```json
|
|
176
|
-
{
|
|
177
|
-
"plugin": ["bros-harness@0.1.4"]
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
2. Restart OpenCode.
|
|
182
|
-
3. Re-run verification:
|
|
183
|
-
|
|
184
|
-
```bash
|
|
185
|
-
opencode agent list
|
|
186
|
-
opencode run --agent mighty-bro "hello"
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
Maintainers may repair a stale npm `latest` dist-tag only with explicit release approval:
|
|
190
|
-
|
|
191
|
-
```bash
|
|
192
|
-
npm dist-tag add bros-harness@<version> latest
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
That command mutates the public npm registry. Agents must not run it unless the maintainer explicitly authorizes the exact package version and registry action.
|
|
196
|
-
|
|
197
|
-
## Restart requirement
|
|
198
|
-
|
|
199
|
-
OpenCode loads package plugins during startup. After adding or changing the BROS Harness plugin entry, restart OpenCode before verification. If verification fails immediately after editing config, restart first before changing anything else.
|
|
200
|
-
|
|
201
|
-
## Minimal prompt for an agent
|
|
9
|
+
Agent prompt reference:
|
|
202
10
|
|
|
203
11
|
```text
|
|
204
|
-
Install BROS Harness into
|
|
12
|
+
Install BROS Harness into OpenCode by following docs/installation.md as the source of truth.
|
|
13
|
+
Do not only paste JSON into opencode.jsonc; use OpenCode's plugin installer unless the guide's fallback applies.
|
|
14
|
+
Do not edit providers, MCP, permissions, telemetry, secrets, npm publishing, or npm dist-tags.
|
|
15
|
+
Restart OpenCode and verify BROS agents after installation.
|
|
205
16
|
```
|
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
# OpenCode Example
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use the complete installation guide as the source of truth: [`../../docs/installation.md`](../../docs/installation.md).
|
|
4
|
+
|
|
5
|
+
Quick project install:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
opencode plugin bros-harness
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Use global scope when requested:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
opencode plugin bros-harness --global
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The installer writes a config entry like this:
|
|
4
18
|
|
|
5
19
|
```json
|
|
6
20
|
{
|
|
@@ -8,4 +22,4 @@ The package-first example uses the BROS Harness plugin snippet:
|
|
|
8
22
|
}
|
|
9
23
|
```
|
|
10
24
|
|
|
11
|
-
This example does not include provider keys, private endpoints, MCP servers, permissions, telemetry, credentials, or local absolute paths. Restart OpenCode after
|
|
25
|
+
This example does not include provider keys, private endpoints, MCP servers, permissions, telemetry, credentials, or local absolute paths. Restart OpenCode after installation or any approved config change.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bros-harness",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Package-first OpenCode plugin for disciplined BROS agent harness assets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"./package.json": "./package.json"
|
|
12
12
|
},
|
|
13
13
|
"bin": {
|
|
14
|
-
"bros": "
|
|
14
|
+
"bros": "bin/bros.mjs"
|
|
15
15
|
},
|
|
16
16
|
"files": [
|
|
17
17
|
"assets/",
|