@skyf0xx/hedgehog 6.4.2 → 6.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.
- package/README.md +6 -0
- package/bin/cli.mjs +2 -1
- package/package.json +1 -1
- package/src/hosts/emit.mjs +16 -0
- package/src/hosts/gemini/gemini-extension.json +1 -1
- package/src/hosts/index.mjs +18 -1
- package/src/hosts/opencode/DISPATCH.md +18 -0
- package/vendor-skills/BMAD/ATTRIBUTION.md +8 -2
- package/vendor-skills/BMAD/core-skills/bmad-deep-recon/scripts/recon_kit.py +4 -0
- package/vendor-skills/BMAD/scripts/memlog.py +4 -0
package/README.md
CHANGED
|
@@ -251,6 +251,12 @@ gemini extensions install https://github.com/skyf0xx/hedgehog
|
|
|
251
251
|
git clone https://github.com/skyf0xx/hedgehog ~/.cursor/plugins/local/hedgehog
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
+
### OpenCode
|
|
255
|
+
|
|
256
|
+
``` bash
|
|
257
|
+
npx @skyf0xx/hedgehog init --host=opencode
|
|
258
|
+
```
|
|
259
|
+
|
|
254
260
|
Then open a project and describe what you want to build and mention `hedgehog`.
|
|
255
261
|
|
|
256
262
|
On a fresh project with no warm pnpm store, that first install can take
|
package/bin/cli.mjs
CHANGED
|
@@ -724,7 +724,8 @@ ${bold('Usage')}
|
|
|
724
724
|
npx @skyf0xx/hedgehog init --cursor install for Cursor (default: Claude Code)
|
|
725
725
|
npx @skyf0xx/hedgehog init --host=claude,gemini install for several coding agents at once
|
|
726
726
|
npx @skyf0xx/hedgehog init --all-hosts install for every supported coding agent
|
|
727
|
-
npx @skyf0xx/hedgehog init --force
|
|
727
|
+
npx @skyf0xx/hedgehog init --force | -f overwrite existing files
|
|
728
|
+
npx @skyf0xx/hedgehog --version | -v print the installed version
|
|
728
729
|
npx @skyf0xx/hedgehog update refresh the installed agents + skills
|
|
729
730
|
npx @skyf0xx/hedgehog update --check report whether a newer release is published
|
|
730
731
|
npx @skyf0xx/hedgehog db init create .hedgehog/hedgehog.db if absent
|
package/package.json
CHANGED
package/src/hosts/emit.mjs
CHANGED
|
@@ -21,3 +21,19 @@ export function emitPromptAgent(text) {
|
|
|
21
21
|
const constraint = `**Tools for this role:** ${grant.summary}\n\n`;
|
|
22
22
|
return stringify(kept, `\n${constraint}${body.replace(/^\n+/, '')}`);
|
|
23
23
|
}
|
|
24
|
+
|
|
25
|
+
// OpenCode registers subagents from `.opencode/agents/` markdown files.
|
|
26
|
+
// Its frontmatter wants `description` and `mode`, and the file name is
|
|
27
|
+
// the agent name. Claude Code's `model:`/`tools:` subagent schema and
|
|
28
|
+
// the redundant `name:` come off; the tool grant is restated as a line
|
|
29
|
+
// the agent reads — `hedgehog verify` gates the commit regardless.
|
|
30
|
+
export function emitOpencodeAgent(text) {
|
|
31
|
+
const { data, body } = parse(text);
|
|
32
|
+
const kept = { ...data };
|
|
33
|
+
for (const key of [...CLAUDE_ONLY, 'name']) delete kept[key];
|
|
34
|
+
kept.mode = 'subagent';
|
|
35
|
+
|
|
36
|
+
const grant = grantFor(data.name);
|
|
37
|
+
const constraint = `**Tools for this role:** ${grant.summary}\n\n`;
|
|
38
|
+
return stringify(kept, `\n${constraint}${body.replace(/^\n+/, '')}`);
|
|
39
|
+
}
|
package/src/hosts/index.mjs
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Adding a host means adding one entry here (and a matching directory
|
|
9
9
|
// under src/hosts/<name>/ for whatever templates it needs).
|
|
10
10
|
|
|
11
|
-
import { emitPromptAgent } from './emit.mjs';
|
|
11
|
+
import { emitPromptAgent, emitOpencodeAgent } from './emit.mjs';
|
|
12
12
|
|
|
13
13
|
// Hosts that dispatch real subagents get the full discipline: each build
|
|
14
14
|
// step runs in its own context with its own role. Hosts that don't are
|
|
@@ -108,6 +108,22 @@ export const HOSTS = {
|
|
|
108
108
|
];
|
|
109
109
|
},
|
|
110
110
|
},
|
|
111
|
+
|
|
112
|
+
// OpenCode auto-loads AGENTS.md from the repo root — the same file
|
|
113
|
+
// every host ships as an index. The bootstrap merge carries the
|
|
114
|
+
// discipline shell and the dispatch into it directly, so no separate
|
|
115
|
+
// routing doc is generated and the file has one writer per install
|
|
116
|
+
// flag. Subagents register from `.opencode/agents/` (the file name is
|
|
117
|
+
// the agent name; Claude Code's `model:`/`tools:` subagent schema
|
|
118
|
+
// comes off on install), and skills load on demand from
|
|
119
|
+
// `.opencode/skills/`.
|
|
120
|
+
opencode: {
|
|
121
|
+
agentsDir: '.opencode/agents',
|
|
122
|
+
skillsDir: '.opencode/skills',
|
|
123
|
+
bootstrapFile: 'AGENTS.md',
|
|
124
|
+
label: 'OpenCode',
|
|
125
|
+
emitAgent: emitOpencodeAgent,
|
|
126
|
+
},
|
|
111
127
|
};
|
|
112
128
|
|
|
113
129
|
// One install flag per host, named for the tool a user is asking to use.
|
|
@@ -117,6 +133,7 @@ export const HOST_FLAGS = {
|
|
|
117
133
|
'--claude': 'claude',
|
|
118
134
|
'--cursor': 'cursor',
|
|
119
135
|
'--gemini': 'gemini',
|
|
136
|
+
'--opencode': 'opencode',
|
|
120
137
|
};
|
|
121
138
|
|
|
122
139
|
export const DEFAULT_HOST = 'claude';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## Delegating on this host
|
|
2
|
+
|
|
3
|
+
OpenCode registers subagents from `.opencode/agents/` — each file becomes
|
|
4
|
+
an agent named for the file. Invoke one with `@<name>` and pass it the
|
|
5
|
+
`hedgehog next` packet as the task: the full packet, not a step name.
|
|
6
|
+
|
|
7
|
+
Independent steps can go out as several subagent calls in one message.
|
|
8
|
+
Steps that depend on each other stay sequential.
|
|
9
|
+
|
|
10
|
+
Each agent file carries its tool grant as a line of its prompt, and
|
|
11
|
+
`hedgehog verify` checks the touched files against the packet's ALLOWED
|
|
12
|
+
SCOPE before any commit lands.
|
|
13
|
+
|
|
14
|
+
The skills in `.opencode/skills/` are procedures to follow — read the one
|
|
15
|
+
whose situation applies rather than improvising the steps.
|
|
16
|
+
|
|
17
|
+
Clear the conversation at the unit boundaries the `hedgehog-orchestrating`
|
|
18
|
+
skill states.
|
|
@@ -5,8 +5,8 @@ This directory vendors a subset of [BMAD-METHOD](https://github.com/bmad-code-or
|
|
|
5
5
|
for the full license text.
|
|
6
6
|
|
|
7
7
|
- **Source repo:** https://github.com/bmad-code-org/BMAD-METHOD
|
|
8
|
-
- **Vendored from:** tag `v6.12.
|
|
9
|
-
- **Vendored on:** 2026-10-
|
|
8
|
+
- **Vendored from:** tag `v6.12.2`, commit `10db8f35bba515e4fbf0388c5bd59a6cc7a3e9c8`
|
|
9
|
+
- **Vendored on:** 2026-10-13
|
|
10
10
|
- **Module:** `bmm` (BMAD Method Module)
|
|
11
11
|
|
|
12
12
|
## What's vendored
|
|
@@ -57,6 +57,12 @@ This keeps a skill installed outside the target project (e.g. one that
|
|
|
57
57
|
would otherwise walk up to `~`) from landing on the wrong root and
|
|
58
58
|
silently missing the project's own override.
|
|
59
59
|
|
|
60
|
+
`scripts/memlog.py` and `core-skills/bmad-deep-recon/scripts/recon_kit.py`
|
|
61
|
+
each reconfigure `stdout`/`stderr` to UTF-8 on Windows before exiting,
|
|
62
|
+
since piped output there defaults to a legacy code page and would
|
|
63
|
+
otherwise crash on non-ASCII text — the same fix
|
|
64
|
+
`core-skills/bmad-brainstorming/scripts/brain.py` already carries.
|
|
65
|
+
|
|
60
66
|
## What's stripped
|
|
61
67
|
|
|
62
68
|
BMAD-METHOD's own orchestration layer is not vendored and is removed from
|
|
@@ -319,4 +319,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
319
319
|
|
|
320
320
|
|
|
321
321
|
if __name__ == "__main__":
|
|
322
|
+
if sys.platform == "win32":
|
|
323
|
+
# Piped output on Windows defaults to a legacy code page, not UTF-8.
|
|
324
|
+
sys.stdout.reconfigure(encoding="utf-8")
|
|
325
|
+
sys.stderr.reconfigure(encoding="utf-8")
|
|
322
326
|
sys.exit(main())
|
|
@@ -221,4 +221,8 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
221
221
|
|
|
222
222
|
|
|
223
223
|
if __name__ == "__main__":
|
|
224
|
+
if sys.platform == "win32":
|
|
225
|
+
# Piped output on Windows defaults to a legacy code page, not UTF-8.
|
|
226
|
+
sys.stdout.reconfigure(encoding="utf-8")
|
|
227
|
+
sys.stderr.reconfigure(encoding="utf-8")
|
|
224
228
|
sys.exit(main())
|