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.
# 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.mdStatute 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.
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.
topics/fluxo-corrupcao-municipal.md— Life cycle of a municipal corruption case: detection → TCE → câmara → MP → improbidade → sanctions → Ficha Limpatopics/fluxo-transferencia-federal.md— How a federal transfer becomes a municipal expenditure: allocation → budget → procurement → audit → enforcementtopics/fluxo-credito-tributario.md— Life cycle of a tax debt: fato gerador → lançamento → PAF → inscrição em dívida ativa → cobrança extrajudicial → execução fiscal → extinção
topics/juizes.md— Judicial guarantees, duties, entry, promotion (CF provisions)topics/funcoes-essenciais.md— MP, advocacia pública, advocacia, defensoria
topics/cortes-superiores.md— STF, STJ, TSE, TST, STM, CNJ composition and competencetopics/justica-federal.md— TRFs, varas federais, federal competencetopics/justica-estadual.md— TJs, comarcas, entrância systemtopics/justica-eleitoral.md— TSE, TREs, zonas eleitoraistopics/justica-trabalho.md— TST, TRTs, varas do trabalho, 2017 reformtopics/tribunais-contas.md— TCU, TCEs, TCMs (audit courts)topics/cnj-administracao-judicial.md— CNJ normative power, Justiça em Números, PJe, case numbering
topics/processo-civil.md— CPC 2015, recursos, execução, tutela provisóriatopics/processo-eleitoral.md— AIPRC, AIME, AIJE, RCED, recursos eleitoraistopics/processo-penal.md— CPP, prescrição, recursos criminaistopics/procedimentos-legais.md— Foro privilegiado, case assignment, segredo de justiça
topics/carreira-juizes.md— Concurso, entrância, promoção, quinto constitucionaltopics/reformas-judiciais.md— Chronology of reforms 1965–2019topics/organizacao-judiciario.md— Judiciary structural overview
topics/ministerio-publico.md— MP structure, career, CNMP, investigative instrumentstopics/policia-federal.md— Polícia Federal, jurisdiction, operações, PF–MP triangular relationshiptopics/policias-estaduais.md— Polícia Civil, Polícia Militar, Guarda Municipal; state-level PC–MPE flowtopics/cgu-controle-interno.md— CGU, random municipal audits, PAD, Lei Anticorrupçãotopics/controladorias-estaduais.md— CGE / state controladorias, state-level PAD, PAR, state leniencytopics/controle-legislativo.md— CPIs, impeachment, decoro parlamentar, Senate approvals, congressional contas reviewtopics/partidos-e-sistema-eleitoral.md— Open-list PR, coligações/federações, campaign finance, Ficha Limpatopics/federalismo-fiscal.md— FPM, ICMS, SUS transfers, LRF limits
topics/direito-tributario.md— CTN framework, lançamento, decadência/prescrição, responsabilidade, reforma tributáriatopics/processo-administrativo-fiscal.md— PAF, DRJ, CARF, voto de qualidadetopics/tribunais-administrativos-fiscais.md— state/municipal PATs: TIT-SP, CCMG, Conselho RJ, TARF, CCRF, CMT-SP, CCM-Riotopics/divida-ativa.md— inscrição em dívida ativa, CDA, PGFN, CADIN, protesto, averbação, transaçãotopics/execucao-fiscal.md— LEF, penhora, embargos, prescrição intercorrente, medida cautelar fiscal
topics/licitacoes.md— Procurement law, CADE cartel typology, bid-riggingtopics/improbidade.md— Lei 8.429/92, 2021 reform, Tema 1199topics/anticorrupcao-penal.md— Criminal corruption, lavagem, colaboração premiada, Lei Anticorrupçãotopics/contas-municipais.md— Mayoral accounts, TCE parecer, câmara vote, Ficha Limpatopics/prestacao-contas-eleitorais.md— Campaign finance accountingtopics/transparencia-dados.md— LAI, LGPD, data infrastructure
| 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) |
| 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 |
| 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 |
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:
- Add a topical file in
topics/following the existing format (header with scope, keywords, snapshot date, cross-references). - Add statutes to
leis_index.yamlwith an apelido so cite.py can resolve them. - Add cases to
jurisprudencia_index.yamlandjurisprudencia-stf.mdas needed. - Add acronyms to
siglas.mdand terms toglossario.md.
See CONTRIBUTING.md for guidelines.
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.
Part of a set of repositories I use across my research projects:
- research-kit — Claude Code
skills, conventions, methodology docs, tools (includes the
/institutionsskill that consumes this reference) - diarios — toolkit for Brazilian court and administrative data
- llmkit — LLM extraction toolkit with caching and audit
- newsbr — Brazilian news collection
Released under CC BY 4.0 (see LICENSE). You are free
to use, share, and adapt the material with attribution.