惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Stack Overflow Blog
Stack Overflow Blog
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
美团技术团队
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
Recent Announcements
Recent Announcements
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Microsoft Security Blog
Microsoft Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
J
Java Code Geeks
V
V2EX
大猫的无限游戏
大猫的无限游戏
D
DataBreaches.Net
博客园 - Franky
爱范儿
爱范儿
T
Tailwind CSS Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
博客园_首页
B
Blog RSS Feed
博客园 - 司徒正美
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
GitHub - Duvet05/Constitucion-Politica-del-Peru: Peru's 1...
Duvet05 · 2026-05-04 · via Hacker News: Show HN

Constitucion Politica del Peru como historial de Git

La Constitucion Politica del Peru ha sido modificada muchas veces desde 1993. Esas reformas normalmente aparecen como leyes, notas editoriales y textos actualizados en PDF.

Este repositorio intenta responder una pregunta simple: como se ve la Constitucion vigente si tratamos cada reforma constitucional como un commit?

La meta es que git blame constitucion.md muestre que ley introdujo o modifico cada linea.

English version below.

Demo rapida

Historial reconstruido con 40 hitos

Blame del articulo 7-A atribuido a la Ley 30588

Blame de la firma restituida por la Ley 32265

Ver el historial publico con blame:

git clone --branch history https://github.com/Duvet05/Constitucion-Politica-del-Peru.git
cd Constitucion-Politica-del-Peru
git blame constitucion.md

Reconstruir el historial en un repo nuevo:

./scripts/build_history.py reformas.csv build/constitucion-peru-history
cd build/constitucion-peru-history
git log --oneline
git blame constitucion.md

La opcion -w ayuda a ignorar cambios de espacios cuando hubo normalizacion de formato:

git blame -w constitucion.md

Estado

MVP auditable. Incluye:

  • fuentes oficiales conocidas;
  • scripts para descargar y normalizar texto;
  • un inventario completo de reformas constitucionales;
  • un manifest editable para reconstruir commits historicos;
  • snapshots reconstruidos por reforma individual desde 1993 hasta 2025, incluyendo Ley 32265;
  • una rama publica history con el historial Git reconstruido para inspeccionar git blame;
  • una herramienta para reconstruir un repo historico desde snapshots.

La fuente oficial vigente usada como referencia principal es la edicion del Congreso de la Republica de diciembre de 2024, actualizada con la Ley 32265 de 2025. El texto conserva anotaciones editoriales cuando aclaran reformas, vigencia diferida, derogaciones o sentencias relevantes, porque el objetivo es publicar una Constitucion vigente y anotada.

Limitaciones conocidas:

  • El texto original de 1993 esta reconstruido desde el checkpoint oficial de 2013, leyes oficiales pre-2013 y fuentes anotadas de contraste; no debe leerse como una transcripcion directa desde un OCR oficial perfecto de 1993.
  • La Ley 31988, por su tamano y vigencia diferida, fue revisada para separar cambios sustantivos de normalizaciones editoriales evidentes; aun asi, algunos blame puntuales pueden requerir revision fina.

Fuentes oficiales

  • Constitucion vigente, pagina del Congreso: https://www.congreso.gob.pe/datos-generales/constitucion-del-peru-y-reglamento/
  • PDF oficial, edicion diciembre 2024: https://www3.congreso.gob.pe/Docs/files/constitucion/constitucion-12-2024.pdf
  • Biblioteca del Congreso, constituciones historicas: https://www.congreso.gob.pe/biblioteca/constituciones_peru/
  • Texto HTML historico de 1993, si vuelve a estar disponible: https://www.congreso.gob.pe/Docs/sites/webs/quipu/constitu/1993.htm

Estructura

sources/              fuentes descargadas, no editadas
snapshots/            textos normalizados por fecha
reformas.csv          manifest de reformas y snapshots
metadata/             inventario historico y fuentes
constitucion.md       texto vigente que queda versionado por Git
scripts/              utilidades de descarga, normalizacion e historial

Uso

Descargar fuentes:

./scripts/fetch_sources.sh

Normalizar un HTML oficial:

./scripts/html_to_text.py sources/archivo-oficial.html snapshots/YYYY-MM-DD.md

Extraer un snapshot desde el PDF oficial del Congreso:

./scripts/pdf_to_snapshot.py sources/constitucion-12-2024.pdf snapshots/2024-12-11.md
./scripts/canonicalize_snapshot.py snapshots/2024-12-11.md snapshots/2024-12-11.md

Validar que el snapshot contenga los articulos esperados:

./scripts/validate_snapshot.py snapshots/2024-12-11.md
./scripts/validate_snapshot.py snapshots/2024-12-11.md --current

Auditar detalles de extraccion del PDF:

./scripts/audit_snapshot.py constitucion.md --current

Como completar el proyecto

  1. Usa metadata/reformas-constitucionales.csv como checklist de reformas.
  2. Coloca en snapshots/ un archivo por cada reforma constitucional relevante.
  3. Registra cada snapshot listo para reconstruccion en reformas.csv con fecha, norma, fuente y descripcion.
  4. Ejecuta scripts/build_history.py para crear un repo historico limpio.
  5. Revisa git diff entre commits para detectar errores de OCR, saltos de linea o notas editoriales.

Criterio editorial

  • Mantener la Constitucion vigente y anotada en constitucion.md.
  • Conservar notas editoriales del Congreso cuando aclaran reformas, vigencia o textos futuros.
  • Usar fechas de publicacion/promulgacion de la norma reformadora.
  • No mezclar cambios de formato con reformas de contenido si se quiere un blame util.
  • Corregir extracciones PDF solo en commits separados y auditables.

Aviso

Este repositorio no es una fuente oficial. Usa fuentes oficiales del Congreso de la Republica y otros archivos legislativos para reconstruir un historial auditable.


Peru Constitution as Git History

Peru's 1993 Constitution has been amended many times. Those amendments usually appear as reform laws, editorial notes, and updated official PDFs.

This repository asks a simple question: what would the current Constitution look like if each constitutional reform were treated as a Git commit?

The goal is for git blame constitucion.md to show which law introduced or modified each line.

Quick Demo

Reconstructed history with 40 commits

Blame of article 7-A attributed to Law 30588

Blame of the signature restored by Law 32265

View the public blame history:

git clone --branch history https://github.com/Duvet05/Constitucion-Politica-del-Peru.git
cd Constitucion-Politica-del-Peru
git blame constitucion.md

Rebuild the historical repository:

./scripts/build_history.py reformas.csv build/constitucion-peru-history
cd build/constitucion-peru-history
git log --oneline
git blame constitucion.md

Use -w to ignore whitespace-only normalization:

git blame -w constitucion.md

Status

Auditable MVP. It currently includes:

  • known official sources;
  • scripts to download and normalize text;
  • a full inventory of constitutional reforms;
  • an editable manifest for rebuilding historical commits;
  • individually reconstructed reform snapshots from 1993 through 2025, including Law 32265;
  • a public history branch with the reconstructed Git history for git blame;
  • a tool to rebuild a clean historical Git repository from snapshots.

The current official reference text comes mainly from the Congress of the Republic's December 2024 edition, updated with Law 32265 of 2025. The text keeps editorial notes when they clarify amendments, future effect, repeals, or relevant rulings because the goal is to publish a current, annotated Constitution with an auditable history.

Known limitations:

  • The original 1993 text is reconstructed from the official 2013 checkpoint, pre-2013 official laws, and annotated comparison sources; it should not be read as a direct transcription from a perfect official 1993 OCR.
  • Law 31988, because of its size and deferred effect, was reviewed to separate substantive changes from obvious editorial normalizations; some specific blame output may still need fine review.

Official Sources

  • Current Constitution, Congress page: https://www.congreso.gob.pe/datos-generales/constitucion-del-peru-y-reglamento/
  • Official PDF, December 2024 edition: https://www3.congreso.gob.pe/Docs/files/constitucion/constitucion-12-2024.pdf
  • Congress Library, historical constitutions: https://www.congreso.gob.pe/biblioteca/constituciones_peru/
  • Historical 1993 HTML text, if available again: https://www.congreso.gob.pe/Docs/sites/webs/quipu/constitu/1993.htm

Repository Layout

sources/              downloaded sources, left unedited
snapshots/            normalized texts by date
reformas.csv          reform and snapshot manifest
metadata/             historical inventory and sources
constitucion.md       current text tracked by Git
scripts/              download, normalization, and history tools

Usage

Download sources:

./scripts/fetch_sources.sh

Normalize an official HTML file:

./scripts/html_to_text.py sources/official-file.html snapshots/YYYY-MM-DD.md

Extract a snapshot from the official Congress PDF:

./scripts/pdf_to_snapshot.py sources/constitucion-12-2024.pdf snapshots/2024-12-11.md
./scripts/canonicalize_snapshot.py snapshots/2024-12-11.md snapshots/2024-12-11.md

Validate that a snapshot contains the expected articles:

./scripts/validate_snapshot.py snapshots/2024-12-11.md
./scripts/validate_snapshot.py snapshots/2024-12-11.md --current

Audit PDF extraction details:

./scripts/audit_snapshot.py constitucion.md --current

How to Help

  1. Use metadata/reformas-constitucionales.csv as the reform checklist.
  2. Add one file under snapshots/ for each relevant constitutional reform.
  3. Register each ready snapshot in reformas.csv with date, law, source, and description.
  4. Run scripts/build_history.py to create a clean historical repository.
  5. Review git diff between commits to catch OCR errors, line breaks, or editorial notes.

Editorial Policy

  • Keep the current annotated Constitution in constitucion.md.
  • Preserve Congress editorial notes when they clarify amendments, repeals, future effect, or relevant rulings.
  • Use publication or promulgation dates from the reforming law.
  • Do not mix formatting changes with substantive constitutional reforms if git blame should remain useful.
  • Keep PDF extraction fixes in separate, auditable commits.

Disclaimer

This repository is not an official source. It uses official sources from Congress and other legislative archives to reconstruct an auditable history.