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: .claude/skills/docs/SKILL.md
+5-4Lines changed: 5 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,14 +41,15 @@ All run from the `docs/` directory (or with `make -C docs <target>`):
41
41
| Command | What it does |
42
42
|---|---|
43
43
|`make apidocs`| Regenerate all `docs/api/*.rst` from source using sphinx-apidoc. Run this whenever Python modules are added or removed. |
44
-
|`make livehtml`| Build docs and serve with live reload at http://localhost:9000. Requires the docs Docker container (`docker compose -f docker-compose.docs.yml up`). |
44
+
|`make livehtml`| Build docs and serve with live reload at http://localhost:9000. Run inside the `docs` service (started with `just up`; see `docker-compose.local.yml`). |
45
45
|`make clean`| Remove `_build/` and `api/` directories for a fresh build. |
46
46
|`make html`| One-off HTML build into `_build/html/`. |
47
47
48
-
To serve with live reload locally (in Docker):
48
+
To serve with live reload locally (in Docker), start the stack so the `docs` service runs (from repo root):
49
49
```
50
-
docker compose -f docker-compose.docs.yml up
50
+
just up
51
51
```
52
+
The `docs` container runs `make livehtml` via `compose/local/django/start-docs`.
52
53
53
54
To regenerate API docs locally (sphinx-apidoc must be installed):
54
55
```
@@ -98,7 +99,7 @@ Line length: 88 characters (enforced by ruff). Wrap long docstring lines to stay
98
99
-`:class:\`~democrasite.webiscite.models.Bill\`` — class link
99
100
-`:func:\`~democrasite.webiscite.tasks.submit_bill\`` — function link
100
101
-`:meth:\`~democrasite.webiscite.webhooks.PullRequestHandler.opened\`` — method link
101
-
3. Verify the build: `docker compose -f docker-compose.docs.yml up`
102
+
3. Verify the build: `just up` and open http://localhost:9000/
102
103
103
104
### Adding a new Python module
104
105
1. Write a module-level docstring at the top of the file
Copy file name to clipboardExpand all lines: CLAUDE.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,9 +62,9 @@ Pytest is configured with `--ds=config.settings.test --reuse-db` in `pyproject.t
62
62
63
63
### Key Patterns
64
64
65
-
-**Constitution system** (`webiscite/constitution.py`, `constitution.json`): Maps files to protected line ranges. PRs touching protected code become "constitutional" bills requiring supermajority. Line numbers auto-update after merges.
66
-
-**Bill lifecycle**: OPEN → APPROVED/REJECTED/FAILED/CLOSED. Each Bill has a OneToOne to a Celery `PeriodicTask` that runs `submit_bill()` at voting period end.
-**Constitution system** (`democrasite/webiscite/constitution.py`, repo-root`constitution.json`): Maps files to protected line ranges. PRs touching protected code become "constitutional" bills requiring supermajority. Line numbers auto-update after merges.
66
+
-**Bill lifecycle**: Draft PRs yield `DRAFT` bills until `ready_for_review`; then `OPEN` → APPROVED/REJECTED/FAILED/CLOSED (or `AMENDED` if the PR branch changes during voting). Each Bill has a OneToOne to a Celery Beat`PeriodicTask` that runs `submit_bill()` at voting period end.
67
+
-**Webhook flow** (`democrasite/webiscite/webhooks.py`): GitHub `pull_request` webhooks (open, reopen, close, synchronize, ready_for_review, etc.) → HMAC validation → create/update `PullRequest`and `Bill` as appropriate. `push` and `ping` are accepted with minimal handling.
68
68
-**Vote constraints**: One vote per user per bill (DB unique constraint). Votes can be changed.
69
69
-**Audit trail**: `django-simple-history` tracks changes on key models.
0 commit comments