Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

118 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brazilian institutions — a structured reference for research

A dense, citation-backed reference on Brazilian legal and political institutions, designed to be read by both researchers and LLM agents. Covers courts, procedure, the Ministério Público, fiscal federalism, electoral system, procurement, corruption statutes, labor justice, and related topics.

What this gives you:

  • 36 topical files with inline statute and jurisprudence citations
  • Citation resolver (cite.py) that looks up any statute article, STF case, or súmula from a compact backtick citation
  • Annotated legislation databases — STF decisions mapped to each CF article; TSE jurisprudence mapped to each Electoral Code article
  • 463 TST súmulas, 72 TSE súmulas, 63 STF Súmulas Vinculantes, 11 STJ súmulas — all resolvable via cite.py
  • Common-pitfalls list so you don't make the mistakes everyone makes about Brazilian institutions

What this is not: an authoritative legal treatise, current binding law, or a substitute for reading the statute. Coverage reflects the maintainer's research areas (corruption, courts, elections, fiscal federalism). Most claims cite statutes or jurisprudence inline; verify against the primary source for legally-current work.

Quick start

# Look up a statute article
python3 tools/leis_artigos/cite.py 'LIA.9'

# Look up an STF case
python3 tools/leis_artigos/cite.py 'Tema1199'

# Look up a súmula (STF SV, TSE, TST, STJ)
python3 tools/leis_artigos/cite.py 'SV14'
python3 tools/leis_artigos/cite.py 'STSE38'
python3 tools/leis_artigos/cite.py 'STST331'

# Show STF jurisprudence for a CF article
python3 tools/leis_artigos/cite.py 'CF.37' --annotations

# Show TSE jurisprudence for a CE article
python3 tools/leis_artigos/cite.py 'CE.35' --annotations

# Find all citations in a markdown file
python3 tools/leis_artigos/cite.py --find-in topics/improbidade.md

Statute and annotation lookups (LIA.9, CF.37 --annotations) need institutions.db — the consolidated SQLite database bundling statute text + STF/TSE annotations. Download it from the latest release and place it at ~/research/data/institutions.db, or set the INSTITUTIONS_DB env var. Jurisprudence and súmula lookups (Tema1199, SV14, STSE38) work without the database — they use YAML indices shipped in the repo.

Using with LLM agents

This repo is optimized for Claude Code and similar agents. The format conventions — topic keywords, inline statute citations, cross-reference backlinks, alphabetical indices — are designed for fast grep and self-contained claims that survive being read out of context.

For agents: CLAUDE.md is the entry point (auto-loaded by Claude Code). It has a quick-start guide, navigation instructions, and the full citation grammar.

For humans: start here, then grep siglas.md for acronyms and glossario.md for Portuguese legal terms.

Contents

Cross-cutting flows

Constitutional framework

Courts

Procedure

Career and history

Institutions

Tax system

Substantive areas

Indices (start here when navigating)

Index What it answers
siglas.md "What does this acronym mean?"
glossario.md "What does this Portuguese legal term mean?"
pitfalls.md "Am I about to make a common mistake?"
leis_index.yaml "What's the status/apelido of this law?"
jurisprudencia-stf.md "What did the STF decide in this case?"
quasi-experimentos.md "What natural experiments exist in Brazilian institutions?"
data_pointers.md "Where does this data live?"
timeline.md "When did this reform/decision happen?"
faq.md "How do I find X?" (by research question)

Súmula indices

File Court Count Citation prefix
sumulas_vinculantes.yaml STF (binding) 63 SV14
sumulas_tse.yaml TSE 72 STSE38
sumulas_tst.yaml TST 463 STST331
sumulas_stj.yaml STJ (on demand) 11 SSTJ359

Tools

Tool Purpose
tools/leis_artigos/cite.py Citation resolver — statutes, cases, súmulas, annotations
tools/planalto_scraper/ Scraper for statute text from planalto.gov.br
tools/tse_ce_anotado/ TSE annotated Electoral Code → SQLite (422 annotations)
tools/stf_constituicao/ STF annotated Constitution → SQLite (1,758 annotations)
tools/tst_scraper/ TST Súmulas via Playwright (463 entries)
tools/sumulas_scraper/ STF SV and TSE súmula scrapers

Extending to new areas

This repo covers the institutional areas most relevant to the maintainer's research (corruption, courts, elections, fiscal federalism). If your research touches a different area — health law, environmental regulation, tax procedure, social security — the architecture is designed to extend:

  1. Add a topical file in topics/ following the existing format (header with scope, keywords, snapshot date, cross-references).
  2. Add statutes to leis_index.yaml with an apelido so cite.py can resolve them.
  3. Add cases to jurisprudencia_index.yaml and jurisprudencia-stf.md as needed.
  4. Add acronyms to siglas.md and terms to glossario.md.

See CONTRIBUTING.md for guidelines.

Status

A living reference, updated as research projects surface new material. Coverage is uneven — not every file is revisited on every change in the law. Each topical file carries a Snapshot as of YYYY line. For legally-current details, verify against the primary source.

Related repos

Part of a set of repositories I use across my research projects:

  • research-kit — Claude Code skills, conventions, methodology docs, tools (includes the /institutions skill that consumes this reference)
  • diarios — toolkit for Brazilian court and administrative data
  • llmkit — LLM extraction toolkit with caching and audit
  • newsbr — Brazilian news collection

License

Released under CC BY 4.0 (see LICENSE). You are free to use, share, and adapt the material with attribution.

About

Research reference on Brazilian legal and political institutions — courts, procedure, Ministério Público, fiscal federalism, elections, procurement, and anti-corruption.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages