Skip to content
L Legalize.pe

Search

Find a law, jump to a section, or run a command.

About

Why this exists

Peruvian legislation is published, but it is not accessible as machine-readable, version-controlled data.

A citizen, lawyer, journalist, or AI agent that needs to know which legal rules apply to them faces a fragmented landscape: SPIJ has the national text but not the sub-national; El Peruano publishes reforms as new PDFs unlinked to their predecessors; 1,919 issuing authorities each have their own portal with their own schema; commercial providers charge for what is public domain.

What this is

A two-repo system:

  • Corpus at crafter-research/legalize-pe. Every Peruvian legal norm as a Markdown file with YAML frontmatter, following SPEC v0.2. Every reform is a git commit with the real publication date.
  • Engine at crafter-research/legalize-pe-engine. The CLI, this web app, the scrapers, and the recon IRs that produce the corpus. Pre-1.0.

What makes it different

Sub-national coverage. Peru has 1,919 legally distinct issuing authorities: 25 regional governments, Lima Metropolitana, Callao, 196 provincial municipalities, and 1,695 district municipalities. SPIJ covers national legislation decently and almost nothing below it. This is the first attempt at a cohesive sub-national legal corpus aggregation for a Global South country.

Full Constitution timeline. git log pe/CON-1993.md returns 32 commits with real author dates from 1993-12-30 to 2024-12-11. No other country in the legalize.dev federation has its constitution this granularly versioned.

Agent-first engineering. Every step of the pipeline is invocable from a CLI. Recon writes a persisted IR per jurisdiction; runtime extraction is then zero-LLM and reproducible.

Federation

Same spec, same commit conventions, same git-native workflow as 30+ other countries on legalize.dev. Community-maintained.

License

The text of legal norms is public domain by force of law (Decreto Legislativo 822, Art. 9). Repository structure and tooling: MIT.

Maintainers

Part of Crafter Research.