Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
2da1f9b
fix(sap): make DraggableHud use pointer capture to prevent Leaflet pan
Cheewye Feb 14, 2026
d48aae0
fix(sap): stabilize dev build identity + overlay drag capture
Cheewye Feb 15, 2026
756bfc8
fix(sap): make overlays draggable in Brave and align build identity
Cheewye Feb 15, 2026
4d5698a
fix(sap): ensure debug and status HUD drag capture in Brave
Cheewye Feb 15, 2026
3d36d09
fix(sap): progressive disclosure first glance + responsive technical …
Cheewye Feb 16, 2026
bb321c1
docs(sap): add HITL EN+PT translations and wire links
Cheewye Feb 16, 2026
72d7534
docs(sap): link HITL with CRIT Gate and 8 guardians
Cheewye Feb 16, 2026
71ab62e
docs(sap): add ops runbooks package
Cheewye Feb 16, 2026
ef871f6
docs(sap): add monitoring spec package
Cheewye Feb 16, 2026
fc05dd8
docs(sap): add HITL work-split (architecture vs bugfix lane)
Cheewye Feb 16, 2026
fa19f1d
docs(sap): add on-call policy (SRE + escalation)
Cheewye Feb 17, 2026
530663f
docs(sap): add datasets index (PMAP-RJ RTS)
Cheewye Feb 17, 2026
510b076
docs(sap): add PMAP funding+continuity note
Cheewye Feb 17, 2026
dcafe59
docs(sap): add BL05 zones scaffold
Cheewye Feb 17, 2026
6b3c403
docs(sap): add ports+governance scaffold (PMAP 2024 landing sites) an…
Cheewye Feb 17, 2026
e14eab4
docs(sap): add ops glossary (SRE/SOP/SEV) and role map
Cheewye Feb 17, 2026
64b736e
docs(sap): add truth rules + status checklist for PMAP 2024 ports
Cheewye Feb 17, 2026
9239a8a
docs(sap): add ports data model (schemas + stable IDs)
Cheewye Feb 17, 2026
d9c1f95
docs(sap): ops docs pack (monitoring evidence + SOP + brainstorming)
Cheewye Feb 17, 2026
d6b0ae8
chore(sap): restore guardian scope (no .cursor/AGENTS diff)
Cheewye Feb 17, 2026
a4f9141
chore(sap): apply HITL governance files
Cheewye Feb 17, 2026
2653a73
chore(sap): fix guardian scope check + renew churn approval
Cheewye Feb 17, 2026
485316a
chore(sap): add churn approval for HITL governance files
Cheewye Feb 17, 2026
ed700b1
chore(sap): add churn approval for HITL governance files
Cheewye Feb 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .cursor/rules/ContractAlways.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@ Output final máximo 8 líneas:
## Prioridad Absoluta
Esta regla precede a todas las demás.
No duplicar lógica en otros .mdc.
Referenciar aquí.
Referenciar aquí.
2 changes: 1 addition & 1 deletion .cursor/rules/GoldenRuleAlways.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ No duplicar esta lógica en otros archivos .mdc - solo referenciar aquí.
## Referencias
- docs/GOLDEN_RULE.md (documento fuente)
- sap/core/guardian_cursor_gate.py (implementación técnica)
- tools/golden_rule_check.py (CI enforcement)
- tools/golden_rule_check.py (CI enforcement)
2 changes: 1 addition & 1 deletion .cursor/rules/anti_frankenstein_always.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Todo hotfix/patch debe tener "REMOVE BY: YYYY-MM-DD" y quedar registrado.

## Limpieza Automática
- Script anti-frankenstein busca y elimina código expirado
- Ejecutado en CI para mantener codebase limpio
- Ejecutado en CI para mantener codebase limpio
2 changes: 1 addition & 1 deletion .cursor/rules/anti_manual_steps_always.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ No pedir pasos manuales por default. Solo HUMAN_REQUIRED si no hay alternativa f
- "hardware": Conectado físicamente

## Excepciones
- Casos físicos inevitables: HUMAN_REQUIRED con checklist
- Casos físicos inevitables: HUMAN_REQUIRED con checklist
2 changes: 1 addition & 1 deletion .cursor/rules/anti_questions_always.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ Si Cursor intenta pedir más datos cuando ya tiene suficiente contexto: RETRY
- `available_tools`: Herramientas disponibles

## Excepciones
- Contexto insuficiente: ALLOW preguntas necesarias
- Contexto insuficiente: ALLOW preguntas necesarias
2 changes: 1 addition & 1 deletion .cursor/rules/gobernanza.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ Cuando algo SOLO puede resolverse en el navegador del usuario:
### ❌ Imposible Server-Side
- Requiere acción del usuario (navegador/hardware)
- Protocolo aplicado (1 frase + checklist)
- Sin soluciones alternativas
- Sin soluciones alternativas
2 changes: 1 addition & 1 deletion .cursor/rules/veracity_always.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Prohibido afirmar "deploy completado", "verificado", "listo" sin evidencia real.
- `evidence_files`: Archivos de evidencia

## Excepciones
- Con evidencia real: ALLOW con metadata de validación
- Con evidencia real: ALLOW con metadata de validación
10 changes: 5 additions & 5 deletions .guardian/churn_approval.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
approved_by: Cristian
reason: "Fix prod 500 on /api/identity/last (runtime_context import path); Fix expired REMOVE BY required to restore CI"
approved_by: Cristian Barnes
reason: Allow HITL governance files required by Cursor project workflow.
allow_paths:
- sap/api/routes_identity_verifier.py
- nginx/conf.d/iuriapp.conf
expires_at: 2026-05-12
- .cursor/rules/hitl-handshake-done-claim-gate.mdc
- AGENTS.md
expires_at: 2026-12-31
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ Cuando algo es IMPOSIBLE server-side:

---
**Vigente desde:** 2026-01-12
**Guardian Cursor Gate:** Activo
**Guardian Cursor Gate:** Activo
6 changes: 6 additions & 0 deletions churn_approval.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
approved_by: Cristian Barnes
reason: Allow out-of-scope governance files required by HITL/Cursor workflow.
allow_paths:
- .cursor/rules/hitl-handshake-done-claim-gate.mdc
- AGENTS.md
expires_at: 2026-12-31
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# iURi Docs Index

- **Brainstorming** (o que é, termos para sessões): [`docs/brainstorming.md`](./brainstorming.md)
- **Guardian Unification**: `docs/GUARDIAN_UNIFICATION.md`
- **SSOT Brain Core (CritGate entrypoint)**: `docs/brain/ssot_brain_core.md`
- **LLM Brain / WILL Architecture**: `docs/LLM_BRAIN_WILL_ARCHITECTURE.md`
Expand Down
33 changes: 33 additions & 0 deletions docs/brainstorming.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Brainstorming

Muitos documentos do iURi nascem de sessões de brainstorming. Este documento define o que é brainstorming no contexto do projeto e oferece termos para sessões informais.

---

## O que é brainstorming (neste contexto)

*[A preencher — aceito como documento inicial]*

- Geração de ideias em grupo ou solo, sem filtro prévio.
- Exploração antes de decisão.
- Primeiro divergir, depois convergir.

---

## Termos para sessões informais

### Favoritos
- **idea jam** — sessão livre de geração de ideias
- **whiteboard jam** — exploração visual em quadro
- **design riff** (ou "riffing session") — iteração rápida sobre um tema

### Extras (menu mais longo)
- jam session
- sketch session
- tabletop session
- working session
- rapid ideation

---

*Documento inicial. Será preenchido em iterações.*
8 changes: 8 additions & 0 deletions docs/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Each guardian explains a different safety angle of the same decision:
- **Airbag (safety)**: risk and damage reduction
- **Ledger (traceability)**: audit trail and justification

Operational process (validation): Human-in-the-Loop (HITL) — [ES](../human-in-the-loop/README.md) | [EN](../human-in-the-loop/README.en.md) | [PT](../human-in-the-loop/README.pt.md) | [Runbooks](../ops/runbooks/README.md) | [Monitoring](../ops/monitoring/README.md) | [On-Call](../ops/oncall/README.md) | [Datasets](../ops/datasets/README.md) | [PMAP funding](../ops/pmap-funding-and-continuity.md)

More detail:
- [`docs/GUARDIANS_SUMMARY_FOR_HUMANS.md`](../GUARDIANS_SUMMARY_FOR_HUMANS.md)
- [`docs/GUARDIANS_ROLL_CALL.md`](../GUARDIANS_ROLL_CALL.md)
Expand All @@ -43,3 +45,9 @@ More detail:

## Safety defaults
- Safe-by-default behavior and explicit uncertainty when evidence is missing.

### Human in the Loop (HITL)
- Reality Anchor Protocol: [`docs/human-in-the-loop/README.md`](../human-in-the-loop/README.md)
- Manifesto: [`docs/human-in-the-loop/manifesto.md`](../human-in-the-loop/manifesto.md)
- Manual: [`docs/human-in-the-loop/manual.md`](../human-in-the-loop/manual.md)
- **Translations:** [EN](../human-in-the-loop/README.en.md) | [PT](../human-in-the-loop/README.pt.md)
57 changes: 5 additions & 52 deletions docs/guardian/churn_approval.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,6 @@
# Churn approval (scope-check)

Este archivo describe el esquema estricto de `.guardian/churn_approval.yml` y las
reglas de seguridad aplicadas por `tools/guardian_scope_check.py`.

## Esquema

Campos requeridos:
- `approved_by`: string no vacío
- `reason`: string no vacío (mínimo 10 caracteres)
- `allow_paths`: lista no vacía de rutas de archivos explícitas

Campos opcionales (recomendados):
- `pr`: número o string
- `expires_at`: ISO8601 (`YYYY-MM-DD` o `YYYY-MM-DDTHH:MM:SSZ`)
- `base_ref`: string (por ejemplo, `origin/main`)
- `sha`: SHA de git (7-40 hex)

Reglas estrictas:
- Se rechazan campos desconocidos.
- `allow_paths` no admite globs, wildcards, `..`, rutas absolutas ni directorios.

## Plantilla mínima

```yaml
approved_by: Nombre Apellido
reason: Motivo claro y auditable (min 10 chars)
approved_by: Cristian Barnes
reason: Allow Cursor governance files required by HITL workflow and agents.
allow_paths:
- core/config.py
expires_at: 2026-01-31
```

## Ejemplo válido

```yaml
approved_by: Cheewye
reason: Ajuste de higiene pydantic; comportamiento preservado.
allow_paths:
- core/config.py
- tools/guardian_scope_check.py
expires_at: 2026-02-15T23:59:59Z
base_ref: origin/main
pr: 86
```

## Ejemplo inválido

```yaml
approved_by:
reason: corto
allow_paths:
- frontend/**
```
- .cursor/rules/hitl-handshake-done-claim-gate.mdc
- AGENTS.md
expires_at: 2026-12-31
41 changes: 41 additions & 0 deletions docs/human-in-the-loop/README.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[ES](./README.md) | [EN](./README.en.md) | [PT](./README.pt.md)

**Source of truth:** [ES](./README.md)

# Human in the Loop (HITL)
## Reality Anchor Protocol ⚓️

These documents define the role and method for working with models (Codex/LLMs) without falling into:
- "works in my head"
- invisible regressions
- time travel (wrong build)
- expensive loops

### Quick read
- **Manifesto (1 page):** [manifesto.en.md](./manifesto.en.md)
- **Operational manual:** [manual.en.md](./manual.en.md)
- **Reality Anchor as a craft:** [reality-anchor-role.en.md](./reality-anchor-role.en.md)
- **Work Split: Architecture vs Bugfix Lane:** [work-split-architecture-vs-bugfix-lane.en.md](./work-split-architecture-vs-bugfix-lane.en.md)

### How we use this
1. **Model delivers** → IMPLEMENTED (UNVERIFIED) + short checklist
2. **Human validates** → tests in UI/map and responds PASS or FAIL + symptom
3. **Model declares DONE** → only if human reported PASS with evidence

Example report (3 lines):
> PASS. PNBOIA visible. Build efb3694, URL /map, checklist 3/3 OK.

Reminder: **No DevTools by default.** Prefer badges, counters in UI, short `curl` commands.

### HITL ↔ CRIT Gate
- **CRIT Gate** governs the system (pre/post checks on model output).
- **HITL** governs the validation process (human in runtime).
- **Done-Claim Gate** is the bridge (nobody declares DONE without evidence).

[CRIT Gate and 8 guardians](../core/README.md#crit-gate-prepost) | [The eight guardians (lanes)](../core/README.md#the-eight-guardians-lanes)

### Key concepts
- **Done-Claim Gate:** nobody declares DONE without minimal evidence.
- **Official states:** PROPOSED → IMPLEMENTED (UNVERIFIED) → VERIFIED (BUILD) → VERIFIED (RUNTIME) → DONE (VERIFIED)
- **Model ↔ human handshake:** the human validates runtime, the model doesn't "claim victory" without proof.
- **Observability first:** LayerLab (Photoshop Layers) + probes + UI badges, before DevTools.
41 changes: 41 additions & 0 deletions docs/human-in-the-loop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[ES](./README.md) | [EN](./README.en.md) | [PT](./README.pt.md)

**Source of truth:** ES (Español)

# Human in the Loop (HITL)
## Reality Anchor Protocol ⚓️

Estos documentos definen el rol y el método para trabajar con modelos (Codex/LLMs) sin caer en:
- "funciona en mi cabeza"
- regresiones invisibles
- viaje del tiempo (build equivocado)
- loops caros

### Lectura rápida
- **Manifiesto (1 página):** [manifesto.md](./manifesto.md)
- **Manual operativo:** [manual.md](./manual.md)
- **Reality Anchor como oficio:** [reality-anchor-role.md](./reality-anchor-role.md)
- **Work Split: Arquitectura vs Bugfix Lane:** [work-split-architecture-vs-bugfix-lane.md](./work-split-architecture-vs-bugfix-lane.md)

### Cómo lo usamos
1. **Modelo entrega** → IMPLEMENTED (UNVERIFIED) + checklist corto
2. **Humano valida** → testea en UI/mapa y responde PASS o FAIL + síntoma
3. **Modelo declara DONE** → solo si humano reportó PASS con evidencia

Ejemplo de reporte (3 líneas):
> PASS. PNBOIA visible. Build efb3694, URL /map, checklist 3/3 OK.

Recordatorio: **No DevTools por defecto.** Preferir badges, contadores en UI, `curl` cortos.

### HITL ↔ CRIT Gate
- **CRIT Gate** gobierna el sistema (checks pre/post en modelo).
- **HITL** gobierna el proceso de validación (humano en runtime).
- **Done-Claim Gate** es el puente (nadie declara DONE sin evidencia).

[CRIT Gate y 8 guardians](../core/README.md#crit-gate-prepost) | [The eight guardians (lanes)](../core/README.md#the-eight-guardians-lanes)

### Conceptos clave
- **Done-Claim Gate:** nadie declara DONE sin evidencia mínima.
- **Estados oficiales:** PROPOSED → IMPLEMENTED (UNVERIFIED) → VERIFIED (BUILD) → VERIFIED (RUNTIME) → DONE (VERIFIED)
- **Handshake modelo ↔ humano:** el humano valida runtime, el modelo no "canta victoria" sin prueba.
- **Observabilidad primero:** LayerLab (Photoshop Layers) + probes + badges en UI, antes que DevTools.
41 changes: 41 additions & 0 deletions docs/human-in-the-loop/README.pt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[ES](./README.md) | [EN](./README.en.md) | [PT](./README.pt.md)

**Source of truth:** [ES](./README.md)

# Human in the Loop (HITL)
## Reality Anchor Protocol ⚓️

Estes documentos definem o papel e o método para trabalhar com modelos (Codex/LLMs) sem cair em:
- "funciona na minha cabeça"
- regressões invisíveis
- viagem no tempo (build errado)
- loops caros

### Leitura rápida
- **Manifesto (1 página):** [manifesto.pt.md](./manifesto.pt.md)
- **Manual operativo:** [manual.pt.md](./manual.pt.md)
- **Reality Anchor como ofício:** [reality-anchor-role.pt.md](./reality-anchor-role.pt.md)
- **Work Split: Arquitetura vs Bugfix Lane:** [work-split-architecture-vs-bugfix-lane.pt.md](./work-split-architecture-vs-bugfix-lane.pt.md)

### Como usamos
1. **Modelo entrega** → IMPLEMENTED (UNVERIFIED) + checklist curto
2. **Humano valida** → testa na UI/mapa e responde PASS ou FAIL + síntoma
3. **Modelo declara DONE** → só se o humano reportou PASS com evidência

Exemplo de relatório (3 linhas):
> PASS. PNBOIA visível. Build efb3694, URL /map, checklist 3/3 OK.

Lembrete: **Sem DevTools por padrão.** Preferir badges, contadores na UI, `curl` curtos.

### HITL ↔ CRIT Gate
- **CRIT Gate** governa o sistema (checks pre/post no modelo).
- **HITL** governa o processo de validação (humano em runtime).
- **Done-Claim Gate** é a ponte (ninguém declara DONE sem evidência).

[CRIT Gate e 8 guardians](../core/README.md#crit-gate-prepost) | [The eight guardians (lanes)](../core/README.md#the-eight-guardians-lanes)

### Conceitos chave
- **Done-Claim Gate:** ninguém declara DONE sem evidência mínima.
- **Estados oficiais:** PROPOSED → IMPLEMENTED (UNVERIFIED) → VERIFIED (BUILD) → VERIFIED (RUNTIME) → DONE (VERIFIED)
- **Handshake modelo ↔ humano:** o humano valida runtime, o modelo não "canta vitória" sem prova.
- **Observabilidade primeiro:** LayerLab (Photoshop Layers) + probes + badges na UI, antes de DevTools.
42 changes: 42 additions & 0 deletions docs/human-in-the-loop/manifesto.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Human in the Loop (HITL) Manifesto
## Reality Anchor Protocol ⚓️
A new craft: humans as reality anchors for systems built with models.

### 1) The core idea
- AI is a tool of the human.
- When the human builds with AI, the human also becomes a tool of the system: **observes, validates, prioritizes, and anchors reality**.
- The model can "solve in its head". The human prevents that from being confused with "solved in the world".

### 2) What the Reality Anchor does
- Turns "doesn't work / looks weird" into actionable evidence:
- **what should happen**
- **what actually happens**
- **where / when / with which build**
- Prevents "time travel" (fixing one version while looking at another).
- Reduces loops and cost: fewer retries, more certainty.

### 3) Principles (golden rules)
1. **Nothing is "Done" without evidence.**
2. **Visible first, elegant later.**
3. **Visual diagnosis when there are layers (Photoshop Layers).**
4. **One task, one goal, one commit.**
5. **Mandatory stop conditions**: "we stop when X is visible".
6. **No DevTools by default**: if the human gets lost, design diagnosis in the UI.
7. **Regression = debt**: if something worked, getting back to "works" is worth more than "new feature".

### 4) Allowed states (anti smoke)
- **PROPOSED**: idea / plan (not applied).
- **IMPLEMENTED (UNVERIFIED)**: applied but not validated.
- **VERIFIED (BUILD)**: build/tests OK.
- **VERIFIED (RUNTIME)**: tested in the real UI.
- **DONE (VERIFIED)**: only when the human confirms runtime.

### 5) The "Handshake" (model ↔ human)
- Model delivers: `IMPLEMENTED (UNVERIFIED)` + minimal checklist.
- Human responds: `VERIFIED ✅` or `FAILED ❌` + 1 line of evidence.
- Only then is `DONE (VERIFIED)` authorized.

### 6) Oath of the Reality Anchor
Don't guess. Don't invent. Don't confuse.
Make the invisible visible.
Turn potential into real progress.
Loading
Loading