You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ This page is for contributors: anyone adding, editing, or restructuring skills,
11
11
-**Every skill and every agent gets a long-form doc.** No exceptions. See the [coverage rule](./docs/templates/coverage-rule.md).
12
12
- Use the [long-form skill template](./docs/templates/skill-long-form-template.md) or the [agent template](./docs/templates/agent-long-form-template.md).
13
13
- The root [CLAUDE.md](./CLAUDE.md) carries the at-a-glance project map for assistants and contributors.
14
+
- Before your first commit, run `npm install`. It installs the pinned dev tools and wires up the git hook. See [Setting up your environment](#setting-up-your-environment).
14
15
15
16
## Before you start
16
17
@@ -21,6 +22,32 @@ Read these once:
21
22
-**[`han-plugin-builder/skills/guidance/references/agent-building-guidelines/`](./han-plugin-builder/skills/guidance/references/agent-building-guidelines/).** The agent-authoring rules: external files, model selection, domain focus, graceful degradation, multi-agent economics.
22
23
-**[Root `CLAUDE.md`](./CLAUDE.md).** Repo conventions, doc map, and where each kind of file lives.
23
24
25
+
## Setting up your environment
26
+
27
+
Han's dev tooling is managed as npm devDependencies, so a single `npm install` sets everything up at pinned versions with nothing installed globally. It installs [prek](https://github.com/j178/prek) (the git-hook runner), [Prettier](https://prettier.io) (formatting), and [Bats](https://github.com/bats-core/bats-core) (shell tests).
28
+
29
+
One-time setup, from the repo root:
30
+
31
+
1. Install [Node.js](https://nodejs.org/) (the current LTS is fine).
32
+
2. Run `npm install`. It installs the pinned tools into `node_modules/`. Nothing lands on your global PATH, so tool versions never clash with your other projects.
33
+
3. If you want pre-commit hooks, run `npx prek install`.
34
+
35
+
Everyday use:
36
+
37
+
-`npm run lint` runs every hook over the whole repo (`prek run --all-files`).
38
+
-`npm test` runs the shell tests (`bats --recursive test/`).
39
+
- If installed, every commit runs the lint hooks (Prettier, ShellCheck, and file hygiene) on your staged files.
40
+
41
+
CI runs the same lint hooks and the tests on every pull request.
42
+
43
+
How Prettier treats your files:
44
+
45
+
- It formats Markdown, JSON, YAML, and JavaScript. Prose reflows to 120 columns and ordered lists keep their `1.`, `2.`, `3.` numbering (configured in `.prettierrc.json`).
46
+
- PR and issue templates under `.github/` are unwrapped rather than wrapped, because GitHub renders every newline in a PR or issue body as a line break.
47
+
- The static archives under `docs/plans/` and `docs/research/`, and the vendored assets under `han-reporting/skills/html-summary/assets/`, are left untouched (`.prettierignore`).
48
+
49
+
Shell scripts are linted with ShellCheck. Tests live in `test/` as `*.bats` files and run in CI rather than on commit; run them locally with `npm test`.
50
+
24
51
## Which plugin does the change belong in?
25
52
26
53
Han ships as a family of plugins. Most carry components; the `han` meta-plugin bundles the others. Decide where your change goes before you scaffold anything. (For the user-facing version of this map, see [Choosing a Han plugin](./docs/choosing-a-han-plugin.md).)
@@ -112,6 +139,8 @@ Before opening the PR, run through this checklist:
112
139
-[ ] Internal links resolve.
113
140
-[ ] No em-dashes anywhere in the doc.
114
141
-[ ] No *"actually," "just," "leverage," "utilize," "showcase," "robust" (vague), "It's worth noting," "Importantly,"* or other voice violations.
0 commit comments