Skip to content

Commit 4cba2e2

Browse files
cursoragenttoomore
andcommitted
Add AGENTS.md with Cursor Cloud specific development instructions
Co-authored-by: Toomore Chiang <toomore0929@gmail.com>
1 parent 344713a commit 4cba2e2

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# AGENTS.md
2+
3+
## Cursor Cloud specific instructions
4+
5+
### Project overview
6+
7+
This monorepo contains three sub-projects for the Anoni.net anonymous network community. See `CLAUDE.md` for full details.
8+
9+
| Sub-project | Path | Type |
10+
|---|---|---|
11+
| Docs | `docs/` | MkDocs Material static site (zh-TW, zh-CN, en) |
12+
| Pulse | `pulse/` | Tor relay monitoring (FastAPI + PostgreSQL via Docker) |
13+
| ASN Coverage | `asn_coverage/` | OONI observation CLI tool |
14+
15+
### Running services
16+
17+
- **Docs dev server**: `cd docs && uv run mkdocs serve` (default port 8000; use `--dev-addr 0.0.0.0:8001` if Pulse API also needs port 8000)
18+
- **Pulse API (local dev)**: `cd pulse/backend && PG_CONN="postgresql://pulse:devpass123@127.0.0.1:5432/pulse" uv run fastapi dev api.py` (port 8000). Requires PostgreSQL — see below.
19+
- **Pulse PostgreSQL**: `cd pulse && sudo docker compose up -d db db-init` starts the DB and runs schema migrations. Requires a `pulse/.env` file (copy from `.env.sample`; set `PG_DB=pulse`, `PG_USER=pulse`, `PG_PASSWORD=devpass123`, `PG_HOST=127.0.0.1:5432`, `API_HOST=127.0.0.1:8000`).
20+
- **ASN Coverage CLI**: `cd asn_coverage && uv run python ooni.py --help`
21+
22+
### Gotchas
23+
24+
- Docker must be started manually: `sudo dockerd &>/tmp/dockerd.log &` — wait ~3 s before running `docker compose`.
25+
- Docker requires `fuse-overlayfs` storage driver and `iptables-legacy` in this cloud VM environment. These are configured during initial setup.
26+
- The MkDocs `social` plugin needs `libcairo2-dev` system package for Open Graph card generation. It is installed during initial setup.
27+
- The Pulse API uses `root_path="/api"`, so all endpoints are prefixed with `/api` (e.g. `/api/healthz`, `/api/readme` for Swagger UI).
28+
- Pulse backend `.env.example` is at `pulse/backend/.env.example`; the docker-compose `.env.sample` is at `pulse/.env.sample`. Both need to be copied and filled for their respective use cases.
29+
30+
### Lint / Test / Build
31+
32+
- **Lint (Pulse)**: `cd pulse/backend && uv run ruff check .` — configured in `pyproject.toml` (E, F, I rules, line-length 100).
33+
- **Build (Docs)**: `cd docs && uv run mkdocs build` — builds the zh-TW docs to `site/`.
34+
- No automated test suite exists in this repository.

0 commit comments

Comments
 (0)