|
| 1 | +// SPDX-License-Identifier: MPL-2.0 |
| 2 | +// SPDX-FileCopyrightText: 2026 Jonathan D.A. Jewell (hyperpolymath) <6759885+hyperpolymath@users.noreply.github.com> |
| 3 | += Contributing — hyperpolymath.github.io |
| 4 | +:revdate: 2026-MM-DD |
| 5 | + |
| 6 | +== Audience |
| 7 | + |
| 8 | +Developers working *on* `hyperpolymath.github.io`. For consumers (people calling |
| 9 | +or depending on it) see link:./usage.adoc[usage.adoc]. |
| 10 | + |
| 11 | +== Local-dev setup |
| 12 | + |
| 13 | +Prerequisites — the minimum versions and where to get them: |
| 14 | + |
| 15 | +* `<tool 1>` v`<version>` — `<install instruction>`. |
| 16 | +* `<tool 2>` v`<version>` — `<install instruction>`. |
| 17 | +* GPG signing key configured (estate policy — all commits must be |
| 18 | + signed). See |
| 19 | + link:https://github.com/hyperpolymath/standards/blob/main/docs/secure-coding-training.md[standards/docs/secure-coding-training.md]. |
| 20 | + |
| 21 | +One-shot setup: |
| 22 | + |
| 23 | +[source,bash] |
| 24 | +---- |
| 25 | +git clone git@github.com:hyperpolymath/hyperpolymath.github.io.git |
| 26 | +cd hyperpolymath.github.io |
| 27 | +just setup # installs deps, sets up hooks |
| 28 | +just test # runs the full test suite |
| 29 | +---- |
| 30 | + |
| 31 | +== Running tests |
| 32 | + |
| 33 | +* **Unit**: `just test-unit` — fast, no I/O. |
| 34 | +* **Integration**: `just test-int` — uses real services (database, |
| 35 | + HTTP, etc.). Estate policy: prefer real over mocked |
| 36 | + (see `feedback_integration_tests_real_db` in maintainer's memory). |
| 37 | +* **Property**: `just test-prop` — randomised, slower; budget |
| 38 | + documented in `docs/proof-debt.md` if applicable. |
| 39 | +* **Full**: `just test` — runs all of the above. |
| 40 | + |
| 41 | +== Code style |
| 42 | + |
| 43 | +We enforce style via CI (governance-reusable.yml from hyperpolymath/standards). |
| 44 | +Locally: |
| 45 | + |
| 46 | +[source,bash] |
| 47 | +---- |
| 48 | +just fmt # auto-format |
| 49 | +just lint # static checks |
| 50 | +---- |
| 51 | + |
| 52 | +* All commits must be **GPG-signed** (CI enforces; see |
| 53 | + link:https://github.com/hyperpolymath/standards[standards]). |
| 54 | +* All source files must carry an **SPDX-License-Identifier** header |
| 55 | + (CI enforces). |
| 56 | +* Conventional commits — `feat`, `fix`, `chore`, `refactor`, `docs`, |
| 57 | + `test`, `ci`, `revert` (CHANGELOG is auto-generated from these |
| 58 | + via link:https://github.com/hyperpolymath/standards/blob/main/.github/workflows/changelog-reusable.yml[`changelog-reusable.yml`]). |
| 59 | + |
| 60 | +== Branching & PR workflow |
| 61 | + |
| 62 | +. Branch off `main` as `claude/<topic>` (for AI agents) or |
| 63 | + `<initials>/<topic>` (for humans). |
| 64 | +. Make focused, narrow commits — one logical change per commit. |
| 65 | +. Open a PR against `main`. |
| 66 | +. **Enable auto-merge immediately** on every PR you open |
| 67 | + (`gh pr merge <num> --auto --squash`) — estate standing policy |
| 68 | + (see standards#196 audit and policies). |
| 69 | +. CI must be green. The PR auto-merges when checks pass + reviews land. |
| 70 | + |
| 71 | +== Adding a new dependency |
| 72 | + |
| 73 | +. State the *why* in the PR body — what does this dependency unlock? |
| 74 | +. Check provenance (maintained, audited, no malicious history). |
| 75 | +. Pin to a SHA, not a tag. |
| 76 | +. Update `docs/architecture.adoc#Dependencies`. |
| 77 | + |
| 78 | +== Adding an ADR |
| 79 | + |
| 80 | +When you make a non-obvious design decision, write it down: |
| 81 | + |
| 82 | +. Copy `docs/decisions/0001-template.adoc` → `0002-<slug>.adoc`. |
| 83 | +. Fill in: Context, Decision, Consequences, Alternatives. |
| 84 | +. Link the ADR from the README or relevant code as a comment. |
| 85 | + |
| 86 | +== Reporting issues |
| 87 | + |
| 88 | +* Bugs in `hyperpolymath.github.io`: file at `hyperpolymath/hyperpolymath.github.io/issues`. |
| 89 | +* Estate-wide concerns (policy, conventions, CI): file at |
| 90 | + `hyperpolymath/standards/issues`. |
0 commit comments