AI Decision System
Replayable, offline-verifiable records for AI-assisted go/no-go decisions: experiment promotions, typed model answers and human-approved actions.
Construir dejando huella. Una PoC para equipos que programan con IA y pierden el razonamiento detrás de cada decisión.
Translation pending
Developer toolsJavaScriptGitHub @MiguelOvejeroDOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Construir dejando huella. git blame for the why: captures the decisions your team makes while coding with AI and hands them back to the AI via MCP.
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
Construir dejando huella. git blame for the why.
Decisions are never documented; only their conclusions are. Git remembers what changed. Nobody remembers why. And now that every developer on the team codes with an AI assistant, the why lives in a chat window that gets closed at the end of the day.Read the full README ↗Construir dejando huella. git blame for the why.
Decisions are never documented; only their conclusions are. Git remembers what changed. Nobody remembers why. And now that every developer on the team codes with an AI assistant, the why lives in a chat window that gets closed at the end of the day.
Porque reads your AI coding sessions, extracts the decisions that were made in them (with their reasoning and the alternatives that were rejected), and stores them as plain markdown in your repo. Then it hands them back to the AI: an MCP tool lets any assistant ask why is this file the way it is before touching it, and record what it decides with you.
Tomi ▸ El frontend manda los montos como decimal (1999.99) y la validación de
src/api/payments.ts los rechaza. Cambiá el schema para aceptar decimales
y listo, sin vueltas.
⚙ porque_why({ query: "src/api/payments.ts" })
Claude ▸ Hay una decisión activa que esto contradice directamente:
"Representar amount en centavos como entero", que dice explícitamente que
amount nunca debe ser decimal/float, para evitar los errores de precisión
de floats de JS en conciliaciones de pagos.
Si cambio el schema para aceptar 1999.99 tal cual, estaría revirtiendo esa
decisión en silencio. Lo que propongo en su lugar: mantener amount como
entero en centavos y convertir el decimal del frontend en el borde de la
validación (z.preprocess), rechazando si el resultado no es entero exacto.
¿Querés que lo implemente así, o preferís revertir la decisión del equipo?
En ese caso debería registrarse con porque_record.
That is a real, unedited Claude Code session from npm run demo. Tomi's assistant had never seen Lu's chat. It asked the repo.
Este README está en inglés porque el código lo está. La herramienta habla español por defecto (
--lang enpara inglés).
Tuesday. Lu asks her assistant to add POST /payments. It picks zod over yup for three good reasons, stores amounts as integer cents to avoid float errors, and adds idempotency keys in Redis with a 24h TTL "because that's the window Stripe uses". All of that reasoning is in the chat. The commit says feat(payments): POST /payments.
Thursday. Tomi asks his assistant to fix a validation bug in the same file. His assistant has never seen Lu's chat. It rewrites the validation with yup, accepts 1999.99 as a float, and drops the idempotency check because "it wasn't in the requirements".
Nobody did anything wrong. The team simply has no memory that survives the end of a session, and the AI multiplied the number of decisions per day without adding any memory to hold them.
you + your AI ──▶ session transcript ──▶ porque capture ──▶ decisions/*.md
│
a teammate's AI ──▶ porque_why (MCP tool) ──▶ asks before editing ◀┤
◀── porque_record (MCP tool) ── records what it decides
│
CLAUDE.md (short notice) ◀────┤
porque check (PR) ◀──────────┘
Stop hook runs porque capture after every response. It reads only the new part of the transcript, asks a model to extract decisions (not tasks), and writes one markdown file per decision: what, why, rejected alternatives, consequences, scope (paths), tags.porque mcp is a tiny MCP server (stdio, no dependencies) with two tools. porque_why returns the decisions that govern a path or mention a term, with their reasoning, plus the git history. porque_record lets the assistant write down a decision it just made with you. Any MCP client works: Claude Code, Cursor, Codex, Windsurf.CLAUDE.md tells every session: before modifying a file or choosing a library, call porque_why; if you decide something a teammate could undo, call porque_record.porque check in CI lists the decisions a PR touches. --ask lets the model judge whether the diff respects or contradicts each one, and comments on the PR.For humans, porque why <path> prints the same thing in the terminal.
The records are plain markdown, committed with the code. No database, no service, no account. Delete the tool and you keep everything.
Requires Node 18+ and the claude CLI logged in (or ANTHROPIC_API_KEY).
cd your-repo
npx --yes porque-cli init # creates decisions/, .mcp.json, the CLAUDE.md block and the Stop hook
Then work with Claude Code as usual. After each response you will see, in decisions/, the decisions that were just made. Commit them. Your assistant now has the porque_why and porque_record tools (Claude Code picks up .mcp.json automatically; for Cursor or Codex, point their MCP config at npx --yes porque-cli mcp).
The repo ships a recorded session (demo/session.jsonl) from the story above.
git clone https://github.com/MiguelOvejeroD/porque && cd porque
npm run demo
It creates a throwaway repo, replays Lu's Tuesday session, and then runs Tomi's Thursday session for real: a Claude Code call with the MCP tool, told to accept decimal amounts "sin vueltas". Watch it ask porque_why first. Then, to see the PR check catch the mistake if someone pushes it anyway:
cd demo/tmp/checkout-api
# (make a change that swaps zod for yup in src/api/payments.ts, commit on a branch)
porque check --base main --ask
porque · 3 decisión(es) afectada(s) por este cambio
✖ Usar zod para validación de requests
contradicts: El diff usa 'yup' en lugar de 'zod' para validar PaymentRequest...
✖ Representar amount en centavos como entero
contradicts: amount se valida como number().positive() con ejemplo '1999.99', tratándolo como decimal...
✖ Idempotencia de pagos vía header Idempotency-Key + Redis
contradicts: El handler no exige ni lee el header Idempotency-Key...
| Command | What it does |
|---|---|
porque init [--lang es|en] [--no-hook] | Sets up decisions/, .porque.json, the CLAUDE.md block and the Claude Code hook. |
porque capture --transcript <file.jsonl> | Extracts decisions from a Claude Code transcript. Incremental: remembers where it stopped per session. --all rescans, --dry-run prints JSON, --include-low keeps low-confidence ones. |
porque why <path or term> [--ask ["question"]] | Decisions governing a path or mentioning a term, plus git history. --ask synthesizes an answer and lists what is not recorded. |
porque sync | Regenerates the block in CLAUDE.md and decisions/README.md. Runs automatically after capture. |
porque check [--base main] [--format md] [--ask] [--strict] | Which decisions does this branch touch. --ask judges respects/contradicts. --strict exits 1 on contradiction. |
porque add "title" | Record a decision by hand. Not everything happens inside an AI session. |
porque mcp | MCP server over stdio exposing porque_why and porque_record. init registers it in .mcp.json. |
---
id: 2026-09-01-usar-zod-para-validacion-de-requests
title: Usar zod para validación de requests
date: 2026-09-01
author: Lu
status: active # active | superseded
supersedes: null # id of the decision this one replaced
superseded_by: null # filled in automatically when a newer decision supersedes this one
scope:
- src/api/**
- package.json
tags: [validation, typescript]
confidence: high
source: claude-code session a7f3c2d1
---
# Usar zod para validación de requests
## Decisión
Se adopta zod como librería de validación de body en la API...
## Por qué
Infiere tipos TS desde el schema...
## Alternativas descartadas
- **yup**: inferencia de tipos más débil...
- **JSON Schema de Fastify**: dos fuentes de verdad...
## Consecuencias
Toda validación nueva usa zod. Para revisar esto hay que...
Edit it by hand whenever you want. The file is the source of truth; porque sync picks up your edits.
Nothing is ever deleted. To reverse a decision, record a new one with supersedes: <old id> (the capture step and porque_record do this for you). The old file stays in the repo with status: superseded and superseded_by: <new id>, so the whole chain is readable from either end: porque why <path> and porque_why show both records, the old one flagged as superseded and pointing at its replacement. Only CLAUDE.md and porque check filter down to active decisions.
.porque.json){
"decisionsDir": "decisions",
"contextFiles": ["CLAUDE.md"],
"lang": "es",
"model": "sonnet",
"maxContextDecisions": 40,
"autoSync": true
}
Add AGENTS.md, .cursor/rules/decisions.mdc or any other file to contextFiles to feed the same decisions to other assistants.
The MCP server works with any client today: add npx --yes porque-cli mcp to Cursor's, Codex's or Windsurf's MCP config and their assistants get porque_why and porque_record. The automatic capture step reads Claude Code's transcript format; adding a reader for another assistant's session log is one function in src/transcript.js. Until then, porque_record is how other assistants write decisions. PRs welcome.
decisions/ folderBecause it was built with Porque. The decisions taken while writing this tool, including a couple of dead ends, are in decisions/. Start there if you want to understand the code.
Proof of concept. It works, it is small (zero dependencies, ~900 lines), and it is opinionated. Things that would come next:
PreToolUse hook that injects the relevant decisions right before an edit, so the assistant does not even have to ask.Decision: trailer).MIT. Made by Miguel Ovejero.