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
{{ message }}
Repository navigation
Commit ebdcc5e
Browse filesBrowse the repository at this point in the historyBrowse files
Two isolated reviewers (GPT-5.6-sol and DeepSeek-R1 through the gateway),
each checked against the tree by a sub-agent, found: the release-check row
listed the wrong recipes (it runs shellcheck, not spec-check); the nightly
install check runs on Ubuntu as well as macOS; "secrets never in
config.yaml" contradicted SECURITY.md, where the LAN password may be set;
the guide had no licensing statement, no conduct expectations, no
proportional change paths, no fork/review/merge mechanics and no platform
note; the e2e trigger was vague, "every claim is guarded" overclaimed, and
"triaged within a few days" promised a service level. All applied. The
LiteLLM section now says never to commit a gateway hostname or key and keeps
the maintainers' multi-model practice to one sentence. A CI comment that
pointed at the private review tree is reworded.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/contributing.md
+48-28Lines changed: 48 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,9 +9,18 @@ The project is a **pre-release (0.1.x)**. Five mentor harnesses are first-party:
9
9
Code are core; OpenCode and pi are preview. Everything else is out of scope until an issue defines it.
10
10
11
11
Contributions of every kind are welcome: a reproducible bug, a clearer setup sentence, an accessibility
12
-
observation, a focused test, or an honest account of where a study flow became overwhelming. Read the
13
-
[AuDHD learning philosophy](audhd-learning-philosophy.md) first; it explains the design constraints that
14
-
shape every decision here.
12
+
observation, a focused test, or an honest account of where a study flow became overwhelming. The fastest
13
+
way in is the [development environment](#development-environment) and one green `just preflight`; before
14
+
you design anything, read the [AuDHD learning philosophy](audhd-learning-philosophy.md), which explains the
15
+
constraints behind the decisions here.
16
+
17
+
**Licensing.** Contributions are accepted under the repository's [MIT License](https://github.com/NetDevAutomate/StudyLoop/blob/main/LICENSE)
18
+
(inbound = outbound). No CLA and no DCO sign-off is required.
19
+
20
+
**Conduct.** Be kind and specific; assume the other person is tired. Learners' private material (session
21
+
transcripts, notes, struggles) is never quoted in public threads. Report a conduct concern privately to the
22
+
maintainer through the contact in [`SECURITY.md`](https://github.com/NetDevAutomate/StudyLoop/blob/main/SECURITY.md);
23
+
a formal code of conduct is on the list for the next release.
15
24
16
25
## Contents
17
26
@@ -54,9 +63,12 @@ The `Justfile` is the front door. The recipes you will use most:
54
63
|`just spec-check`|`openspec validate --specs --all`; skips when the `openspec` CLI is missing. |
55
64
|`just preflight`| Everything above in one run: lint, typecheck, unit, JS, docs, release consistency, spec check. Run it before every push. |
56
65
|`just e2e`| The Playwright browser suite. It takes a machine-wide lock; **one e2e run per machine at a time**. |
57
-
|`just release-check`| The release gate: preflight plus dependency audits, a wheel build, a fresh-venv install smoke and a per-extra install smoke. |
66
+
|`just release-check`| The release gate: unit + JS tests, lint, typecheck, shellcheck, docs, both dependency audits, release consistency, a wheel build with a fresh-venv install smoke and a per-extra install smoke. It does not run `spec-check`; `preflight` does. |
58
67
|`just ci-local`| Mirrors the GitHub Actions matrix locally. |
59
68
69
+
Development happens on macOS and Linux; CI runs Ubuntu and the nightly checks run both Ubuntu and macOS. If setup
70
+
fails, the [troubleshooting page](troubleshooting.md) covers the common causes; `uv sync --reinstall` resets the venv.
71
+
60
72
Working from a git worktree? Prefix `just` and `uv run` with `env -u VIRTUAL_ENV` so the worktree's own venv is
61
73
used rather than the one exported by your shell.
62
74
@@ -104,24 +116,31 @@ harness's transcripts).
104
116
105
117
## Making changes
106
118
107
-
1.**Start from an issue for anything that changes behaviour.** For a new mentor harness the issue must
108
-
define the persona mechanism, launch and resume commands, session store, exporter, health check, failure
109
-
behaviour and a live acceptance path. Drive-by harness additions are declined.
110
-
2.**Branch from `main`** with a `feat/`, `fix/`, `docs/` or `test/` prefix. Do not use `lane/…`; that prefix
111
-
is reserved for the maintainers' remediation lanes and carries an ownership test that only makes sense
112
-
there. On any other branch that test is skipped.
113
-
3.**Specs before surprises.** Behaviour is described in `openspec/specs/<capability>/spec.md`; a change that
114
-
alters behaviour comes with a proposal under `openspec/changes/<change>/` (proposal, design, tasks).
115
-
`just spec-check` validates the specs. When a design decision will still matter in six months, write an
116
-
ADR (`docs/adr/NNNN-kebab-title.md`, indexed in `docs/adr/README.md`) and have the design link to it.
119
+
1.**Pick the path that fits the size of the change.**
120
+
-*Small fix* (a bug with a test, a docs correction, a test-only change): open the pull request directly.
121
+
-*Behaviour or design change* (a new option, a changed flow, a new module): open an issue first, then a
122
+
proposal under `openspec/changes/<change>/` (proposal, design, tasks) against the capability spec in
123
+
`openspec/specs/<capability>/spec.md`. `just spec-check` validates the specs. When a decision will still
124
+
matter in six months, write an ADR (`docs/adr/NNNN-kebab-title.md`, indexed in `docs/adr/README.md`).
125
+
-*New mentor harness or backend*: the issue must define the persona mechanism, launch and resume
126
+
commands, session store, exporter, health check, failure behaviour and a live acceptance path. Drive-by
127
+
harness additions are declined.
128
+
2.**Fork and branch.** Outside contributors fork and open pull requests against `main`; maintainers branch
129
+
in the repository. Name branches `feat/…`, `fix/…`, `docs/…` or `test/…`. Do not use `lane/…`: that
130
+
prefix is reserved for the maintainers' remediation lanes and carries an ownership test that only makes
131
+
sense there (on any other branch it is skipped). Review comments are addressed on the same branch; the
132
+
maintainer merges, so far always with a merge commit.
133
+
3.**Keep specs and code together.** If your change alters what a spec describes, update the spec in the
134
+
same pull request; the spec is the description of behaviour, the tests are the proof.
117
135
4.**Tests first.** Write the failing test at the nearest useful boundary, watch it fail for the right reason,
118
136
then make it pass. A fix without a test that would fail on revert is not finished.
119
137
5.**Docs in the same change.** Every user-visible change updates the relevant guide and the changelog in the
120
138
same pull request. Documentation claims are tested (see below), so a stale sentence fails the build.
121
139
6.**Keep the diff focused.** One problem per pull request. If public behaviour and internal structure both
122
140
have to move, split them unless one is meaningless without the other.
123
-
7.**Before pushing:**`just preflight`, then `git diff --check`. If you touched anything the browser exercises,
124
-
`just e2e` as well.
141
+
7.**Before pushing:**`just preflight`, then `git diff --check`. Run `just e2e` as well when you touched
142
+
`packages/studyloop/src/studyloop/web/` (routes, static JS, CSS, HTML), the session transports under
143
+
`session/`, or anything under `tests/e2e/`.
125
144
126
145
Commit messages: an imperative subject line, and a body that says **why** (what was wrong, what the change
127
146
makes true), not a restatement of the diff. If an AI assistant helped write the change, say so with a
@@ -167,8 +186,8 @@ the unit suite on Python 3.12 and 3.13, the JavaScript tests, the browser suite,
167
186
smoke, and the web, content and semantic dependency profiles. A red job blocks merging; fix it or explain in
168
187
the pull request exactly which unrelated failure you are seeing and where it is tracked.
169
188
170
-
Two nightly workflows run on a fresh macOS runner: the **tmux integration UAT** (03:00 UTC, also triggerable
171
-
manually) and the **install check** (03:30 UTC). They catch what a developer machine hides: a hard-coded
189
+
Two nightly workflows run on fresh runners: the **tmux integration UAT** on macOS (03:00 UTC, also triggerable
190
+
manually) and the **install check**on Ubuntu and macOS (03:30 UTC). They catch what a developer machine hides: a hard-coded
172
191
path, a dependency that only resolves from the workspace, a lock file that drifted.
173
192
174
193
The dependency lock is enforced (`uv sync --locked`). If you change a dependency, run `uv lock`, commit
@@ -179,7 +198,7 @@ The dependency lock is enforced (`uv sync --locked`). If you change a dependency
179
198
-**The published site is an allowlist.**`mkdocs.yml` names every public page. A new file under `docs/` is
180
199
invisible to the site until it is written for readers and added to both the allowlist and the navigation.
181
200
`docs/adr/` and `docs/architecture/` are public in the repository for the reasoning they carry.
182
-
-**Every documented claim must be true**, and the true ones are guarded: CLI examples in the reference are
201
+
-**Every documented claim must be true**, and many are machine-checked: CLI examples in the reference are
183
202
resolved against the real Click commands, prompt strings in the setup guide are checked against the wizard
184
203
code, the break table is parsed and compared with the constants, third-party notices are counted against the
185
204
vendored manifest. When you change behaviour, expect a docs test to fail until the page catches up.
@@ -233,7 +252,7 @@ friction was), then the smallest change that would help. The philosophy page exp
233
252
4. Accessibility and low-energy paths.
234
253
5. New capability, in the order the roadmap gives.
235
254
236
-
Issues are triaged within a few days. Reactions and clear reproductions move things up.
255
+
The maintainer reads every new issue; there is no response-time promise yet. Clear reproductions move things up.
237
256
238
257
## AI usage, and models through a LiteLLM gateway
239
258
@@ -262,21 +281,22 @@ today a row's base URL is fixed in the registry, so a per-machine proxy address
262
281
override that does not exist yet — open an issue and propose it there first; and keys named `*_API_KEY`,
263
282
`*_TOKEN`, `*_SECRET` are deliberately scrubbed from every process StudyLoop spawns
264
283
(`session/child_env.py`), so a gateway key set for StudyLoop never reaches a mentor child. That is a feature.
284
+
Never commit a gateway hostname, port or key: read them from environment variables and keep the values in
285
+
your untracked `.env`.
265
286
266
-
**How the maintainers use one.** Plans and large changes are reviewed by three or four models from different
267
-
families through a LiteLLM gateway before a human reads them: each model gets the same brief, works in
268
-
isolation, and every load-bearing claim it makes is checked against the source before it counts. The
269
-
arbitration is recorded with the change. Contributors do not need this — CI and human review are the gate — but
270
-
if you run your own multi-model review, keep keys and transcripts out of the pull request and cite the
271
-
verified findings, not the model's opinion.
287
+
Large changes to this project have been reviewed by several models from different families through such a
288
+
gateway before a human read them, with each claim checked against the source; that is optional practice, not
289
+
a requirement. If you run a multi-model review of your own, cite the verified findings and keep keys and
290
+
transcripts out of the pull request.
272
291
273
292
## Security
274
293
275
294
Report vulnerabilities privately through
276
295
[GitHub's advisory form](https://github.com/NetDevAutomate/StudyLoop/security/advisories/new); see
277
296
[`SECURITY.md`](https://github.com/NetDevAutomate/StudyLoop/blob/main/SECURITY.md) for the supported line
278
-
and the model. In code: secrets live in the encrypted store, never in `config.yaml` or the repository; the
279
-
LAN password reaches the web process through its environment, not argv; test hatches that replace the agent
297
+
and the model. In code: API keys live in the encrypted store, never in the repository; the LAN password may be set in
298
+
`config.yaml` (written with mode 0600) or generated, and reaches the web process through its environment,
299
+
not argv; test hatches that replace the agent
280
300
binary are snapshotted at import and refused when they arrive from a `.env`. Pre-commit runs secret detection
0 commit comments