Automated pipeline that fetches U.S. Code XML releases from the Office of the Law Revision Counsel (OLRC), transforms them into Markdown, and tracks changes over time using Git as a version control backend.
Independence disclaimer: This is an independent community project. It is not affiliated with, endorsed by, or associated with any government agency, employer, or official body.
- Polls OLRC for new U.S. Code release points (Public Laws)
- Transforms USLM 2.0 XML into structured Markdown with YAML frontmatter
- Commits changes to civic-source/us-code with full Git history
- Serves a searchable static site for browsing and diffing legislation
| Package | Description |
|---|---|
@civic-source/types |
Shared TypeScript types, Zod schemas, and interfaces |
@civic-source/fetcher |
OLRC release point fetcher with retry and idempotency |
@civic-source/transformer |
USLM XML to Markdown converter |
@civic-source/web |
Astro static site for browsing U.S. Code changes |
pnpm install
pnpm build
pnpm test
pnpm lint
pnpm typecheckRequires Node.js 22.x LTS and pnpm 9.x.
OLRC XML → Fetcher → Transformer → Markdown → us-code repo → Astro site
↓ ↓
Hash check Git commit
(idempotent) (weekly cron)
See CONTRIBUTING.md for guidelines.
Code is licensed under Apache 2.0. The us-code data repository uses CC0 1.0 (public domain).