尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
Open Parliamentary Accountability eXchange — Exposing governance blind spots in Australian democracy
翻译准备中
取自仓库 README
正在加载完整 README。
查看完整 README ↗Ask what Australian politicians actually said, see how they voted, and follow who funds them.
518,685 speeches from five parliaments | 13,867 recorded divisions | 199,233 donations classified by industry | 6 standing investigations
OPAX puts the parliamentary record in front of the reader and lets them question it. Every answer is written only from retrieved passages and cites them; if the record is thin, the answer says so.
Browser (static SPA, hash router)
│
▼
Cloudflare Worker portal/src/index.ts /api/search /api/ask (JSON or SSE) /api/resource /api/topic ...
│
▼
Progress Agentic RAG knowledge box speeches, bills, official statements, division records; topic labels and summaries from enrichment tasks
There is no live database behind the site. Structured data (donations, votes, expenses, interests, grants, contracts) stays relational in a SQLite corpus on the data box and reaches the site as static JSON exported by scripts/export_*.py.
MIGRATION-ARAG.md is the runbook: knowledge box identity, model pins, corpus inclusion rules, cost gates, platform quirks learned the hard way.
| Path | What it is |
|---|---|
portal/ | The site: Worker (src/index.ts), static front end (public/), 3D map engine (graph/, bundled to public/money-map.js) |
parli/ingest/ | Fetchers and loaders for every source, and arag_sync.py, which pushes the corpus into the knowledge box |
parli/arag.py | Knowledge box client used by the sync, the enrichment scripts and the report generator |
parli/schema.py, parli/db.py | The SQLite corpus schema and connection helpers |
scripts/ | Static JSON exports, report generation, the ask harness, enrichment and provisioning tools |
docs/ | Data notes: VOTES.md, DATA-MONEY.md, DATA-WORDS.md, DATA-INTERESTS.md, STREAMING.md |
*_DATA_SOURCES.md | Source surveys and licensing notes |
cd portal
npm install
printf 'ARAG_KB_TOKEN=...\n' > .dev.vars # the knowledge box token; zone and KB id are in wrangler.jsonc
npx wrangler dev # http://localhost:8787
Deploy with npm run deploy from portal/ — not npx wrangler deploy. The
npm script runs scripts/stamp_assets.mjs first, which content-hash stamps the
?v= on /app.js and /style.css in index.html; those two are served
immutable for a year, so an unstamped deploy strands returning visitors on the
old bundle. See docs/HARDENING.md.
The committed public/money-map.js must equal a fresh build:
npx esbuild graph/index.ts --bundle --minify --format=esm --target=es2022 --outfile=public/money-map.js
node graph/smoke-test.mjs
Component language, control recipes, homepage structure and remaining consolidation work. The homepage uses /; Ask and Search share /ask with view=search selecting Search. Workbench and prototype review assets are local-only and excluded from deployment.
The corpus lives in ~/.cache/autoresearch/parli.db on the data box. Python tooling is managed with uv:
uv sync
uv run python -m parli.ingest.arag_sync --tables speeches --full # push to the knowledge box
uv run python scripts/generate_reports.py # regenerate the six reports
uv run python scripts/ask_harness.py # 24 grounded questions against production
Reports retrieve original records across the corpus, with date windows rather than a Hansard-only topic filter. Each report includes a dedicated non-speech evidence question. Generated summaries and bill registry cards are excluded; original bill text, explanatory memoranda and other primary records remain eligible. Speech counts and charts use the current topic-labelled speech catalog; the financial charts retain the separately audited scripts/report_stats.json snapshot.
Set REPORT_STRUCTURED_WRITER=codex to use the installed Codex CLI for structured figures, party positions and introductions. Narratives still use the knowledge box’s configured writer. Run uv run python scripts/validate_reports.py before publishing to check citations against the live corpus.
Environment variables are documented in .env.example. Never commit .env or portal/.dev.vars.
| Source | What we take |
|---|---|
| Federal Hansard (House via Zenodo, Senate and recent House via OpenAustralia) | speeches since 1998 |
| Senate committee hearings | transcripts |
| NSW, Victorian, SA and Queensland parliaments | Hansard speeches |
| PM&C and NSW Government | Prime Minister transcripts and ministerial releases |
| TheyVoteForYou and state Hansard | recorded divisions, per-member voting records |
| AEC, ECQ and VEC disclosures | donations, classified across 27 industries |
| IPEA | parliamentary expenses |
| Registers of interests, lobbyist registers, ministerial diaries | declared interests and access |
| Guardian Australia and ABC | external headline links only; never ingested into the corpus |
Licensing and coverage per source are recorded in the docs/ notes and the *_DATA_SOURCES.md surveys.
Work on a branch and open a pull request; main is deployed manually and always matches production. Useful places to start:
scripts/ask_questions.json, and prompt or retrieval improvements in portal/src/index.ts.OPAX grew out of an autoresearch experiment, pivoted to parliamentary transparency. The first version ran as a FastAPI and Next.js stack on a single server; it was retired in September 2026 in favour of the Worker and knowledge box described above.
OPAX is licensed under the GNU Affero General Public License v3.0. You are free to use, modify and distribute it, but modifications to the web service must also be made available as open source.
Built with data from OpenAustralia, TheyVoteForYou, the AEC, the state parliaments and electoral commissions, and the Guardian and ABC.