Skip to content

Commit df3c59a

Browse files
committed
update ai docs
1 parent bd56d88 commit df3c59a

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

.claude/skills/docs/SKILL.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,15 @@ All run from the `docs/` directory (or with `make -C docs <target>`):
4141
| Command | What it does |
4242
|---|---|
4343
| `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`). |
4545
| `make clean` | Remove `_build/` and `api/` directories for a fresh build. |
4646
| `make html` | One-off HTML build into `_build/html/`. |
4747

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):
4949
```
50-
docker compose -f docker-compose.docs.yml up
50+
just up
5151
```
52+
The `docs` container runs `make livehtml` via `compose/local/django/start-docs`.
5253

5354
To regenerate API docs locally (sphinx-apidoc must be installed):
5455
```
@@ -98,7 +99,7 @@ Line length: 88 characters (enforced by ruff). Wrap long docstring lines to stay
9899
- `:class:\`~democrasite.webiscite.models.Bill\`` — class link
99100
- `:func:\`~democrasite.webiscite.tasks.submit_bill\`` — function link
100101
- `: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/
102103

103104
### Adding a new Python module
104105
1. Write a module-level docstring at the top of the file

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ Pytest is configured with `--ds=config.settings.test --reuse-db` in `pyproject.t
6060

6161
### Key Patterns
6262

63-
- **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.
64-
- **Bill lifecycle**: OPEN → APPROVED/REJECTED/FAILED/CLOSED. Each Bill has a OneToOne to a Celery `PeriodicTask` that runs `submit_bill()` at voting period end.
65-
- **Webhook flow** (`webiscite/webhooks.py`): GitHub push events → HMAC validation → create/update `PullRequest` → create `Bill`.
63+
- **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.
64+
- **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.
65+
- **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.
6666
- **Vote constraints**: One vote per user per bill (DB unique constraint). Votes can be changed.
6767
- **Audit trail**: `django-simple-history` tracks changes on key models.
6868

0 commit comments

Comments
 (0)