Contributing to Hedgehog
Walks a user from "I want to fix/build this in Hedgehog itself" to an open
pull request against skyf0xx/hedgehog. This is for changes to the
discipline — src/agents/, src/skills/, src/templates/,
bin/cli.mjs, README.md — never for changes to the user's own project,
which is a different repo with different rules.
When this runs
- The user names a specific gap (a bug they hit, a
ROADMAP.md item) and
wants to fix it in Hedgehog rather than work around it locally.
tweaker offered this at the end of a build and the user said yes.
If the user hasn't picked a target yet, read ROADMAP.md at the Hedgehog
repo root with them and let them choose an item — prefer the "Small items"
tier for a first contribution, since each entry there is scoped to one file
or one narrow addition.
Before starting
Confirm where the Hedgehog source actually lives on this machine. A project
that ran npx @skyf0xx/hedgehog init has a copy of the payload
(.claude/agents/, .claude/skills/), not the Hedgehog repo itself —
editing those files changes nothing upstream. Ask the user:
- If they already have a local clone of
skyf0xx/hedgehog, use it.
- If not, offer to clone it:
gh repo fork skyf0xx/hedgehog --clone (forks
under their account and clones the fork), or git clone https://github.com/skyf0xx/hedgehog if they'd rather push directly to a
branch on a repo they already have write access to.
Do this in a separate directory from the user's own project — never inside
it.
Workflow
- Read
CONTRIBUTING.md at the Hedgehog repo root before touching
anything. It defines the rules this repo's content has to follow:
current-state-only files (no changelog narration inside the content
itself), one owning file per rule (nothing load-bearing lives outside
src/agents/ or src/skills/), and PRs scoped to one agent, one skill,
or one template at a time.
- Branch.
git checkout -b <type>/<short-description> off master —
feat/, fix/, or docs/ prefix matching the change, e.g.
feat/windsurf-host or fix/tweaker-job2-wording.
- Make the change, scoped to what
CONTRIBUTING.md and the target
ROADMAP.md item actually call for — resist scope creep onto adjacent
files even if you notice something else worth fixing; that's a separate
PR.
- Verify the install path locally before committing, per
CONTRIBUTING.md:mkdir -p /tmp/hedgehog-smoke && cd /tmp/hedgehog-smoke
node /path/to/hedgehog/bin/cli.mjs init
Confirm .claude/agents/, .claude/skills/, and the root templates
land correctly, and that the specific thing you changed shows up as
expected (a new skill directory copied over, a new host's files in the
right place, a new blueprint reachable from hedgehog-core-design).
- Commit with Conventional Commits. If the change is already one
logical unit, commit it directly (
feat(hosts): add windsurf support,
fix(tweaker): ..., docs(roadmap): ...) — Hedgehog's commit format,
same as the one hedgehog-loop uses for a project build. If the working
tree has accumulated several unrelated changes that need splitting into
atomic commits, use the conventional-commits skill rather than
hand-rolling the split.
- Push and open the PR.
git push -u origin <branch-name>
gh pr create --repo skyf0xx/hedgehog --title "<type>(<scope>): <summary>" --body "$(cat <<'EOF'
## Summary
<1-3 bullets: what changed and why>
## Test plan
- [ ] Ran `node bin/cli.mjs init` in a scratch dir and confirmed the change lands correctly
EOF
)"
Describe the why in the PR body, not in the file being changed — same
rule CONTRIBUTING.md states for the content itself. If the PR closes
or addresses a ROADMAP.md item or a filed issue, reference it
(Addresses the "<item name>" item in ROADMAP.md, or Fixes #<n>).
- Report the PR URL
gh returns and stop — don't merge, don't push
further commits without being asked.
Self-test
- The change happened in a Hedgehog repo clone, never inside the user's own
project directory.
- The PR is scoped to one agent, one skill, one template, or one host —
not a bundle of unrelated changes.
- The install smoke test actually ran and actually confirmed the specific
change, not just that
init exits zero.
- Commit messages and the PR title follow Conventional Commits.
- Nothing was merged or force-pushed without the user explicitly asking.
1---2name: hedgehog-contributing3description: Use when the user wants to contribute a fix or ROADMAP.md item back to the Hedgehog project itself (skyf0xx/hedgehog) rather than their own project. Triggers on "let's fix that in Hedgehog", "I want to contribute", "let's pick up a roadmap item", or when `tweaker` offers this at the end of a build and the user says yes. Covers forking/branching, making the change under Hedgehog's own repo rules, committing with Conventional Commits, and opening the PR.4---5
6# Contributing to Hedgehog
7
8Walks a user from "I want to fix/build this in Hedgehog itself" to an open
9pull request against `skyf0xx/hedgehog`. This is for changes to the
10**discipline** — `src/agents/`, `src/skills/`, `src/templates/`,
11`bin/cli.mjs`, `README.md` — never for changes to the user's own project,
12which is a different repo with different rules.
13
14## When this runs
15
16- The user names a specific gap (a bug they hit, a `ROADMAP.md` item) and
17 wants to fix it in Hedgehog rather than work around it locally.
18- `tweaker` offered this at the end of a build and the user said yes.
19
20If the user hasn't picked a target yet, read `ROADMAP.md` at the Hedgehog
21repo root with them and let them choose an item — prefer the "Small items"
22tier for a first contribution, since each entry there is scoped to one file
23or one narrow addition.
24
25## Before starting
26
27Confirm where the Hedgehog source actually lives on this machine. A project
28that ran `npx @skyf0xx/hedgehog init` has a *copy* of the payload
29(`.claude/agents/`, `.claude/skills/`), not the Hedgehog repo itself —
30editing those files changes nothing upstream. Ask the user:
31
32- If they already have a local clone of `skyf0xx/hedgehog`, use it.
33- If not, offer to clone it: `gh repo fork skyf0xx/hedgehog --clone` (forks
34 under their account and clones the fork), or `git clone
35 https://github.com/skyf0xx/hedgehog` if they'd rather push directly to a
36 branch on a repo they already have write access to.
37
38Do this in a separate directory from the user's own project — never inside
39it.
40
41## Workflow
42
431. **Read `CONTRIBUTING.md`** at the Hedgehog repo root before touching
44 anything. It defines the rules this repo's content has to follow:
45 current-state-only files (no changelog narration inside the content
46 itself), one owning file per rule (nothing load-bearing lives outside
47 `src/agents/` or `src/skills/`), and PRs scoped to one agent, one skill,
48 or one template at a time.
492. **Branch.** `git checkout -b <type>/<short-description>` off `master` —
50 `feat/`, `fix/`, or `docs/` prefix matching the change, e.g.
51 `feat/windsurf-host` or `fix/tweaker-job2-wording`.
523. **Make the change**, scoped to what `CONTRIBUTING.md` and the target
53 `ROADMAP.md` item actually call for — resist scope creep onto adjacent
54 files even if you notice something else worth fixing; that's a separate
55 PR.
564. **Verify the install path locally** before committing, per
57 `CONTRIBUTING.md`:
58 ```bash
59 mkdir -p /tmp/hedgehog-smoke && cd /tmp/hedgehog-smoke
60 node /path/to/hedgehog/bin/cli.mjs init
61 ```
62 Confirm `.claude/agents/`, `.claude/skills/`, and the root templates
63 land correctly, and that the specific thing you changed shows up as
64 expected (a new skill directory copied over, a new host's files in the
65 right place, a new blueprint reachable from `hedgehog-core-design`).
665. **Commit with Conventional Commits.** If the change is already one
67 logical unit, commit it directly (`feat(hosts): add windsurf support`,
68 `fix(tweaker): ...`, `docs(roadmap): ...`) — Hedgehog's commit format,
69 same as the one `hedgehog-loop` uses for a project build. If the working
70 tree has accumulated several unrelated changes that need splitting into
71 atomic commits, use the `conventional-commits` skill rather than
72 hand-rolling the split.
736. **Push and open the PR.**
74 ```bash
75 git push -u origin <branch-name>
76 gh pr create --repo skyf0xx/hedgehog --title "<type>(<scope>): <summary>" --body "$(cat <<'EOF'
77 ## Summary
78 <1-3 bullets: what changed and why>
79
80 ## Test plan
81 - [ ] Ran `node bin/cli.mjs init` in a scratch dir and confirmed the change lands correctly
82 EOF
83 )"
84 ```
85 Describe the *why* in the PR body, not in the file being changed — same
86 rule `CONTRIBUTING.md` states for the content itself. If the PR closes
87 or addresses a `ROADMAP.md` item or a filed issue, reference it
88 (`Addresses the "<item name>" item in ROADMAP.md`, or `Fixes #<n>`).
897. **Report the PR URL** `gh` returns and stop — don't merge, don't push
90 further commits without being asked.
91
92## Self-test
93
94- The change happened in a Hedgehog repo clone, never inside the user's own
95 project directory.
96- The PR is scoped to one agent, one skill, one template, or one host —
97 not a bundle of unrelated changes.
98- The install smoke test actually ran and actually confirmed the specific
99 change, not just that `init` exits zero.
100- Commit messages and the PR title follow Conventional Commits.
101- Nothing was merged or force-pushed without the user explicitly asking.