What grounds our Costa Rican criminal-procedure AI
The Código Procesal Penal is one code — but it's been reshaped by three separate reform laws at three different times, each shifting what article numbers mean. This page shows exactly which articles ground each process, the stage-level mistakes a SINALEVI line-read caught, and the safeguards built in given what's actually at stake.
Quick background
Costa Rica's criminal procedure runs on the Código Procesal Penal (CPP), enacted as Ley N.º 7594 and in force since January 1, 1998. Unlike the civil branch's single clean 2018 reform, the CPP has been reshaped by three separate reform laws at three different times — each shifting what specific article numbers mean.
One code, three reform waves
1998
CPP Ley 7594 in force
2009
Ley 8720 — víctimas & flagrancia
2010
Ley 8837 — apelación de sentencia oral
2014
Ley 9271 — Tribunal de Apelación de Sentencia
Each law touched the numbering and, in places, the substance of the code it amended — exactly the kind of drift that makes a stale summary dangerous here specifically. An article number from an older commentary, a law-school outline, or a general-purpose model's training data can point at language that was renumbered or superseded a decade ago, with no obvious signal that it happened.
One pipeline — querella, the private criminal action — also has to reach outside the CPP entirely: the CPP explains how to bring one, but the catalog of offenses that qualify lives in the separate substantive CP (Código Penal, Ley 4573).
This page describes source grounding, not legal advice. It tells you what our system reads and how thoroughly that reading has been checked against the primary source. It does not tell you how the law applies to your facts. Nothing here substitutes for review by a licensed Costa Rican attorney.
Criminal procedure carries real liberty and safety stakes in a way a collections claim or a succession filing does not. A wrong article number in a civil grounding page is an embarrassing correction; here it can misstate how long someone may be held in prisión preventiva, or misdescribe a deadline protecting someone's liberty. That's why this branch's built-in safeguards, covered further down, are load-bearing, not optional polish.
Source alignments, by process
Procedimiento Ordinario
Libro I — arts. 274–372, + Libro III recursos + Libro IV ejecución| Stage | Art. | Governs |
|---|---|---|
| Denuncia / noticia criminis | 278–281 | How a complaint may be lodged, required form and content, duty to report certain offenses |
| Etapa preparatoria | 274–277, 290–296, 171–172 | The investigative phase; 171–172 set its outer time limit |
| Desestimación / archivo | 282, 298 | Grounds for the Ministerio Público to decline or shelve a case |
| Actos conclusivos | 299–302 | The closing acts available once investigation is complete |
| Acusación | 303–304 | Formal requirements for the prosecutor's accusation and request to open trial |
| Etapa intermedia — sobreseimiento | 311–315 | Case-dismissal mechanism (definitivo/provisional) and its appeal route |
| Audiencia preliminar | 316–320 | The preliminary hearing — convocation, timing, resolution |
| Auto de apertura a juicio | 321–322 | The ruling opening the case to trial, plus a 5-day emplazamiento |
| Juicio oral | 324–372 | Scheduling, debate, evidence, deliberation, sentencia — including in dubio pro reo |
| Recursos | 449–450, 452, 459–461, 467–469 | Appealable rulings, revocatoria, oral appeal of judgment, cassation |
| Ejecución de la pena | 476–478 | Enforcement jurisdiction and incidents raised during enforcement |
An earlier mapping assumed art. 303 was the auto de apertura a juicio and flatly not appealable. It isn't — art. 303 sets the requirements for the acusación, the prosecutor's accusation and request to open trial. The actual auto de apertura a juicio is at arts. 321–322.
A related error assumed art. 316 was the requerimiento conclusivo. Art. 316 is in fact the audiencia preliminar itself. The actual conclusory acts sit at arts. 299–303. Between these two fixes, the entire intermediate phase had effectively been mapped to the wrong pair of articles.
Art. 452 had been assumed to set the requirements for revocatoria. It's narrower — it lists which rulings are appealable at all (resoluciones apelables). The actual revocatoria provisions are arts. 449–450.
Denuncia (278–280), sobreseimiento (311–315), the fuller audiencia preliminar (316–320), and ejecución de la pena (476+, with 477 = the enforcement court, 478 = incidents) were all SINALEVI-PENDING and are now individually confirmed.
The earlier schema asserted the auto de apertura a juicio was flatly "not appealable." On the SINALEVI line-read, no literal "inapelable" language could be located attached to that ruling. Rather than leave that standing, we softened it: appealability should be treated as attorney-verify-before-citing, not a settled fact.
The Tribunal de Apelación de Sentencia — created by Ley 8837 (2010) and Ley 9271 (2014) — has a confirmed existence and function. What hasn't been pinned down precisely is the exact organic article within the CPP's own cross-references. Rated LOW confidence, still open. LOW
Procedimiento Abreviado
Libro II, Título I — arts. 373–375| Art. | Governs |
|---|---|
| 373 | Request and agreement to apply the abreviado — up until the case would otherwise open to trial |
| 374 | Hearing and jurisdictional review of the agreement, including the sentence (reduced at least one third below the applicable minimum) |
| 375 | Sentencing; the court's control over voluntariness — it may reject the agreement and send the case back to the ordinary track |
Both the hearing and sentencing provisions were previously SINALEVI-PENDING and are now located precisely at arts. 374–375.
Flagrancia
Título VIII — arts. 422–436| Art. | Governs |
|---|---|
| 236 | Definition of flagrancia itself — the factual condition that triggers this track |
| 422 | Mandatory application when conditions are met; omits the intermediate phase; conducted orally |
| 423–425 | Transfer to the Ministerio Público; 24-hour period for the defense to prepare |
| 426–428 | Hearing before the tribunal, oral accusation, alternative measures |
| 429 | Trial and oral sentencing, subject to 4-hour and 24-hour internal windows |
| 430 | Pretrial-detention ceiling specific to this track — 15 days ordinary, 25 days exceptional |
| 431–436 | Appellate routes, interaction with a parallel civil action or querella, procedural guarantees |
Art. 430's detention ceiling carries CRÍTICA severity — see the deadlines section below.
Querella
Título II — arts. 72–80, 36, 15 + CP| Art. | Governs |
|---|---|
| 72 | Standing to bring a querella |
| 74 | Form and required content, including the poder especial to act through a representative |
| 15 | 5-day window to cure formal defects |
| 77 | 3 days to signal intent, then 10 days non-extendable to file |
| 36 | Conciliation as a resolution route |
| 78 / 79 | Express (78) and implied/tacit (79) withdrawal |
| 80 | Additional provisions, closed in the June 2026 SINALEVI read |
| 324–372 | General trial rules apply to a querella's debate the same as the ordinario track |
The catalog of delitos de acción privada — which offenses can be pursued this way at all — is not defined in the CPP. It lives in the CP Código Penal (Ley 4573). This pipeline pulls a targeted slice of the CP for that purpose specifically, tagged substantive_topic: accion_privada, rather than treating the CP as a general corpus for this branch.
Acción Civil Resarcitoria
Título III — arts. 37–40, 111–124| Art. | Governs |
|---|---|
| 37–40 | Accessory character of the civil claim — a damages award can survive even where the criminal case ends in acquittal (art. 40) |
| 111–117 | The actor civil, including the poder especial to act through a representative (111) |
| 118 | Withdrawal of the civil claim — distinct from querella withdrawal under art. 79 |
| 119–124 | The civil defendant and third parties brought into the civil side of the case |
The provision letting a third party who could be civilly liable intervene voluntarily in the criminal case was previously unconfirmed and is now located at art. 121 (intervención espontánea del tercero civilmente responsable).
Medidas Cautelares
Título VI — arts. 239–258 · transversal| Art. | Governs |
|---|---|
| 239 | The four requirements that must be met before pretrial detention may be ordered |
| 244 | Exceptional, proportionality-bound character of pretrial detention; catalog of alternatives |
| 245–254 | Imposition and periodic review of alternative measures |
| 256 | The specific appeal mechanism for a cautelar ruling |
| 257 | Outer time limit on ordinary pretrial detention — 12 months |
| 258 | Mechanism for extending that limit, reviewed by the Tribunal de Apelación de Sentencia |
The catalog of alternatives to pretrial detention was previously unconfirmed and is now at art. 244 (imposition/review at 245–254). The appeal mechanism for a cautelar ruling — art. 256 — is a distinct route from the general revocatoria/apelable-rulings pair in Ordinario (449–450, 452); a cautelar ruling isn't appealed the same way a trial-stage ruling is.
Arts. 257 and 258 carry CRÍTICA severity — see the deadlines section below.
Salidas Alternas
Libro Preliminar — arts. 22, 25–28, 36| Art. | Governs |
|---|---|
| 22 | Criterio de oportunidad — MP discretion to decline a case, with exclusions for violence or public-official offenses |
| 25–28 | Suspensión del proceso a prueba — conditions for suspension and grounds for revocation |
| 36 | Conciliation, shared with the querella track |
Built-in safeguards for this branch
- Presunción de inocencia and in dubio pro reo are retrieval-ranking rules, not style guidance
The schema's
global_ai_guardrailsblock treats these as non-negotiable constraints on how content is ranked and surfaced for any query touching an imputado. Responsibility is a hypothesis until a final judgment; doubt is not resolved against the person under investigation. - Penal and civil standards are kept structurally separate
When a case runs a civil damages claim alongside the criminal one, the
penal_vs_civil_splitguardrail keeps the two legal standards tagged and ranked separately — an answer about criminal proof doesn't quietly borrow reasoning that only applies to the civil claim, or vice versa. - The juvenile-justice boundary fails closed
Ley 7576 (juvenile criminal justice) is a structurally separate jurisdiction. If intake suggests a matter falls under it, the system routes it out of scope entirely for these seven pipelines rather than answering with adult-procedure sources that don't govern it.
- Victim and witness identities are redacted as a mandatory step
Under Ley 8720 and Ley 8968, material touching victims, witnesses, and protected identities carries heightened confidentiality tagging, and redaction happens in processing — not left to a downstream prompt to remember.
- No autonomous filing
Every output is a draft. A human is in the loop before anything reaches a court. Given that a filing error here can affect a pending liberty determination, this boundary is absolute, not a configurable default.
Deadlines the system is built to never miss
A small number of deadlines carry CRÍTICA severity — a distinct tier from the "alta" and "media" deadlines elsewhere in these pipelines. All three bound how long a person may be held in pretrial detention.
| Deadline | Art. | Limit |
|---|---|---|
| Ceiling on ordinary pretrial detention | 257 | 12 months |
| Extension of that ceiling | 258 | +12 months ordinary / +6 exceptional, reviewed by Tribunal de Apelación de Sentencia |
| Ceiling under the flagrancia track | 430 | 15 days ordinary, 25 days extraordinary |
How to verify this yourself
We'd rather an expert reader — a practicing abogado penalista — check this page against the primary source than take it on faith. Everything above traces to the Sistema Nacional de Legislación Vigente (SINALEVI), published through Costa Rica's Procuraduría General de la República at pgrweb.go.cr/scij.
- CPP (Ley 7594): SCIJ
nValor2=41297— 505 articles, version "46 de 46 del 16/11/2025." Primary source for every pipeline above except the querella cross-law slice. - CP (Ley 4573): SCIJ
nValor2=5027— ingested as a targeted slice for querella's acción privada catalog specifically, not as a general substantive corpus for this branch.
What "verified" means here, at two grains
Every statutory chunk carries a verification_confidence tag at two grains: a chunk-level tag on every ingested article, and a per-correction rating in the drift-closure table used to track fixes like the ones above.
Function or existence confirmed, precise citation not yet pinned down — e.g. the Tribunal de Apelación de Sentencia's organic article.
Provisional mapping, partially checked against the primary source.
Independently spot-confirmed, used sparingly.
Checked article-by-article against the consolidated text — the level the corrections above were made at.
Reviewed and signed off by a licensed Costa Rican criminal attorney for user-facing citation — not yet reached.
Open items — not yet resolved
- The exact organic article establishing the Tribunal de Apelación de Sentencia within the CPP's own cross-references — its existence and function (created by Ley 8837 and Ley 9271) are confirmed; only the precise founding citation isn't.
- The precise procedural moment at which an acción civil resarcitoria must formally be lodged.
The article-to-process mapping on this page has reached SINALEVI_VERIFIED. Nothing on this page has reached ATTORNEY_VERIFIED yet. Given the liberty and safety stakes specific to this branch, that gate is treated as non-negotiable before any of this reaches a production, user-facing citation. If you're a practicing criminal attorney and something here doesn't match your own reading of the consolidated text, we want to hear about it.
Want to see Nammu on a criminal matter?
Request a demo