Skip to content

Commit 8a5171c

Browse files
committed
docs: add tool exposure requirement for agent manifests
morph_edit routing policy requires both the always-on instruction AND tool manifest exposure. Document this in instructions/morph-tools.md, README installation section, and test assertions. Also gitignore ADV plugin artifacts and lockfiles.
1 parent eebf986 commit 8a5171c

5 files changed

Lines changed: 34 additions & 2 deletions

File tree

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ logs/
1616
.vscode/
1717
.idea/
1818

19+
# Lockfiles (bun/pnpm — npm uses package-lock.json)
20+
bun.lock
21+
pnpm-lock.yaml
22+
23+
# ADV plugin state
24+
.specdb/
25+
project.json
26+
1927
# OS
2028
.DS_Store
2129
Thumbs.db

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Or pin to a specific version:
4545
"~/.config/opencode/instructions/morph-tools.md"
4646
],
4747
"plugin": [
48-
"github:JRedeker/opencode-morph-fast-apply#v1.8.1"
48+
"github:JRedeker/opencode-morph-fast-apply#v1.8.2"
4949
]
5050
}
5151
```
@@ -76,6 +76,10 @@ tool selection you should also load the packaged always-on instruction file
7676
shown above. This avoids agents defaulting to native `edit` when `morph_edit`
7777
is the better fit for large, scattered, or whitespace-sensitive edits.
7878

79+
Important: the active agent must also expose `morph_edit` in its tool manifest.
80+
If an agent profile marks `morph_edit: false`, the model cannot choose Morph
81+
even when the plugin is installed and the always-on instruction is present.
82+
7983
### 2. Set your Morph API key
8084

8185
Get an API key at [morphllm.com/dashboard](https://morphllm.com/dashboard/api-keys), then add to your shell profile:
@@ -187,6 +191,12 @@ The `morph_edit` tool is disabled in readonly agent modes (`plan`, `explore`). S
187191

188192
## Changelog
189193

194+
### v1.8.2
195+
196+
- **Tool exposure requirement docs**`instructions/morph-tools.md` now documents that agent profiles must expose `morph_edit: true` in their tool manifest for the routing policy to take effect
197+
- **README alignment** — Installation section notes the tool manifest requirement alongside the always-on instruction
198+
- **Test coverage** — Tests verify the tool exposure section exists in the instruction file and README
199+
190200
### v1.8.1
191201

192202
- **Stable instruction path guidance** - README now prefers `~/.config/opencode/instructions/morph-tools.md` and keeps the packaged `node_modules/...` path as a fallback for direct installs

index.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ describe("packaged tool-selection instructions", () => {
4040
expect(content).toContain("`edit`");
4141
expect(content).toContain("New file creation");
4242
expect(content).toContain("`write`");
43+
expect(content).toContain("Tool Exposure Requirement");
44+
expect(content).toContain("morph_edit: true");
4345
});
4446

4547
test("README documents packaged instruction path", () => {
@@ -52,6 +54,7 @@ describe("packaged tool-selection instructions", () => {
5254
"~/.config/opencode/node_modules/opencode-morph-fast-apply/instructions/morph-tools.md",
5355
);
5456
expect(content).toContain("always-on instruction file");
57+
expect(content).toContain("tool manifest");
5558
});
5659
});
5760

instructions/morph-tools.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,17 @@ faster or more reliable than exact-string replacement.
4444
- Packaged fallback path: `~/.config/opencode/node_modules/opencode-morph-fast-apply/instructions/morph-tools.md`
4545
- The `morph_edit` tool description is self-contained, but loading this file as an always-on instruction makes tool choice more reliable
4646

47+
### Tool Exposure Requirement
48+
49+
Instruction policy is necessary but not sufficient. The active agent or
50+
sub-agent must also expose `morph_edit` in its tool manifest.
51+
52+
- If an agent profile sets `morph_edit: false` or omits the tool, the model
53+
cannot choose Morph even when this instruction is loaded.
54+
- Enable `morph_edit: true` for write-capable agents that should use Morph for
55+
large or scattered edits.
56+
- Keep readonly agents blocked unless you explicitly want them to edit files.
57+
4758
### Anti-Patterns
4859

4960
- Do NOT use `edit` first for large, scattered, or whitespace-sensitive edits

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "opencode-morph-fast-apply",
3-
"version": "1.8.1",
3+
"version": "1.8.2",
44
"description": "OpenCode plugin for Morph Fast Apply - 10x faster code editing",
55
"type": "module",
66
"main": "index.ts",

0 commit comments

Comments
 (0)