agentleFS
elpabloultronelpabloultron/open-legal-chile/CLAUDE.md

open-legal-chile

CLAUDE.md5 starsChanged 44 days agoApache-2.0View on GitHub

Este repositorio es una suite de inteligencia jurídica y servidor Model Context Protocol (MCP) nativo especializado en el ordenamiento jurídico de la República de Chile (Civil Law / Derecho Continental Codificado). Al agregar o cambiar una herramienta: esquema y despacho en servidor/<dominio>.py, nombre en ORDEN_ORIGEN de mcp_server.py. Al cambiar agents/*.json: python scripts/generar_agentes_plugin.py. Al subir versión: python scripts/bump_version.py <patch|minor|major> (también actualiza el plugin y la extensión de Gemini, que fijan la versión que lanza uvx).

The file

We split this CLAUDE.md into the rules it gives an agent

3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.

    line 77
  2. Very specific:

    Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.

    line 78
  3. Very specific:

    After modifying code, run graphify update .

    line 79

≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

Open Legal Chile — Guía de Desarrollo para Asistentes y Agentes (CLAUDE.md)

Este repositorio es una suite de inteligencia jurídica y servidor Model Context Protocol (MCP) nativo especializado en el ordenamiento jurídico de la República de Chile (Civil Law / Derecho Continental Codificado).

1. Principios Jurídicos Innegociables

  • Primacía de la Ley Escrita: La Ley es la fuente primordial (Art. 1 Código Civil). Las sentencias tienen efecto relativo (Art. 3 inc. 2 Código Civil).
  • Prohibición de Términos de Common Law: NUNCA usar conceptos del derecho anglosajón (at-will, punitive damages, discovery, subpoena, grand jury, Title VII, OSHA). Usar terminología procesal y sustantiva chilena (necesidades de la empresa, finiquito, indemnización por años de servicio, fuero, daño moral, daño emergente, lucro cesante, otrosí, casación, reposición, apelación, SpA).
  • Estándar de Citación Obligatorio: Citar con brackets oficiales:
    • Normas: [BCN - Código del Trabajo, Art. 161] o [BCN - Ley N° 21.643, Art. 2]
    • Constitución: [CPR 1980 - Art. 19 N° 24]
    • Jurisprudencia Judicial: [CS - Rol N° 12.345-2023, Fecha: 15-11-2023]
    • Jurisprudencia Administrativa: [Dictamen DT N° 1234/15 de 2024] o [Dictamen CGR N° E123456 (2024)]
    • Regulatorio: [Circular SII N° 45 (2023)] o [NCG CMF N° 461]

2. Arquitectura de Módulos y Conectores

open-legal-chile/
├── mcp_server.py             # Servidor MCP JSON-RPC 2.0 sobre stdio: protocolo, perfiles y ensamblado (87 herramientas)
├── servidor/                 # Esquemas y despacho de las herramientas, un módulo por dominio
│   ├── conectores.py         # BCN, CGR, DT, CNE, Panel, CMF, SII, SMA, TDLC, PJUD
│   ├── corpus.py · forense.py · casos.py · ambiental.py · suite.py
├── openlegal.py              # CLI (openlegal mcp | doctor | instalar | integrar | …)
├── integraciones_harness.py  # Config MCP por harness (Claude Code/Desktop, Cursor, VS Code, Gemini, Codex, …)
├── diagnostico.py            # `openlegal doctor` / herramienta suite_doctor
├── recursos.py               # Ubica skills, agentes y AGENTS.md (repo o share/openlegal-chile instalado)
├── agents_runtime.py         # Runtime de agentes y exportación a subagentes de Claude Code
├── agents/                   # 19 agentes: *.json (fuente) y *.md (subagentes del plugin, generados)
├── .agents/skills/           # 18 skills (SKILL.md), compartidas por todos los harness
├── .claude-plugin/           # plugin.json (MCP por uvx + skills + agentes) y marketplace.json
├── gemini-extension.json     # Extensión de Gemini CLI
├── chat_engine.py · critique.py · exporters.py · config.py   # chat, crítica, escritos OJV, configuración y red
├── *_connector.py            # Conectores del Estado (BCN, CGR, DT, PJUD, CNE, Panel, CMF, SII, SMA, TDLC, …)
├── connectors/registry.py    # StateRegistry unificado con caché
├── domain/ · doctrina/ · data/   # modelos, corpus doctrinal y grafo LegalGraphify (viajan en el wheel)
├── scripts/                  # Ingestas, bump de versión, generador de agentes del plugin
├── evals/                    # Benchmark de evaluación jurídica chilena
└── tests/                    # Suite pytest (protocolo, esquemas portables, plugin, empaquetado, conectores…)

Al agregar o cambiar una herramienta: esquema y despacho en servidor/<dominio>.py, nombre en ORDEN_ORIGEN de mcp_server.py. Al cambiar agents/*.json: python scripts/generar_agentes_plugin.py. Al subir versión: python scripts/bump_version.py <patch|minor|major> (también actualiza el plugin y la extensión de Gemini, que fijan la versión que lanza uvx).


3. Comandos de Validación y Testing

# Ejecutar toda la suite de pruebas unitarias e integración
python -m pytest tests/ -v

# Probar servidor MCP sobre stdio
python mcp_server.py

# Iniciar CLI interactivo
python openlegal.py

# Diagnóstico de la instalación
python openlegal.py doctor

# Plugin de Claude Code y extensión de Gemini
claude plugin validate .claude-plugin/plugin.json && claude plugin validate .claude-plugin/marketplace.json
python scripts/generar_agentes_plugin.py --check
npx -y @google/gemini-cli extensions validate .

graphify

This project has a knowledge graph at graphify-out/ with god nodes, community structure, and cross-file relationships.

Rules:

  • For codebase questions, first run graphify query "<question>" when graphify-out/graph.json exists. Use graphify path "<A>" "<B>" for relationships and graphify explain "<concept>" for focused concepts. These return a scoped subgraph, usually much smaller than GRAPH_REPORT.md or raw grep output.
  • If graphify-out/wiki/index.md exists, use it for broad navigation instead of raw source browsing.
  • Read graphify-out/GRAPH_REPORT.md only for broad architecture review or when query/path/explain do not surface enough context.
  • After modifying code, run graphify update . to keep the graph current (AST-only, no API cost).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.