Skip to content

civic-source/us-code-tracker

US Code Tracker

CI License: Apache 2.0

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.

What It Does

  • 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

Packages

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

Development

pnpm install
pnpm build
pnpm test
pnpm lint
pnpm typecheck

Requires Node.js 22.x LTS and pnpm 9.x.

Architecture

OLRC XML → Fetcher → Transformer → Markdown → us-code repo → Astro site
                ↓                       ↓
           Hash check              Git commit
          (idempotent)         (weekly cron)

Contributing

See CONTRIBUTING.md for guidelines.

License

Code is licensed under Apache 2.0. The us-code data repository uses CC0 1.0 (public domain).

About

Ingestion engine, XML transformer, and static site for tracking changes to the U.S. Code

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors