Skip to main content

codec-cortex

Implementación determinista del codec CODEC-CORTEX v0.4.0. Procesador modular de artefactos .cortex y .hcortex.md sin dependencia de LLM: parsea a AST, serializa CORTEX, renderiza HCORTEX, ejecuta validaciones VIEW, compara equivalencia, valida roundtrip bidireccional, deriva documentación e inventaria benchmarks.

Licencia: MPL-2.0. Releases anteriores bajo MIT.

codec-cortex es un procesador determinista de memoria cognitiva para agentes LLM/SLM. Opera sobre archivos .cortex (formato denso nativo) y .hcortex.md (representación humana reversible), sin depender de modelos de lenguaje.

Gate de reversibilidad

reversible:true solo es válido cuando:

  1. view_coverage == 100%;
  2. no existen errores E_VIEW_* ni E_HCORTEX_*;
  3. el modo no es display;
  4. el roundtrip canónico aplicable pasa sin pérdida no declarada.

Modelo conceptual

Concepto Rol Estado
CORTEX Representación densa nativa. Fuente canónica operacional y base de verificación, reversible por contrato VIEW. current
HCORTEX / HUMAN-CORTEX Representación humana densa y reversible cuando conserva VIEW/trazabilidad equivalente con cobertura válida. current
VIEW Contrato declarativo de correspondencia CORTEX ⇄ HCORTEX. Define render, reversión, campos, preservación y fallback. current
CORTEX-OUT Respuesta conversacional eficiente. No participa en decode/encode/verify/roundtrip. specification

Instalación

pip install codec-cortex
# o para desarrollo
pip install -e ".[dev]"

Comandos principales

# Identidad
cortex --version

# Documentación y benchmark (E3)
cortex docstring canonicalize
cortex docstring --all
cortex benchmark --list

# Inspección y cobertura
cortex inspect skill/cortex/SKILL.md
cortex verify-view skill/cortex/SKILL.md

# Roundtrip CORTEX byte-identical
cortex roundtrip skill/cortex/SKILL.md

# CORTEX → HCORTEX
cortex convert skill/cortex/SKILL.md --from cortex --to hcortex --out /tmp/skill.hcortex.md

# HCORTEX → CORTEX
cortex convert skill/hcortex/SKILL.md --from hcortex --to cortex --out /tmp/skill.cortex.md

# Roundtrip bidireccional
cortex roundtrip-bidir skill/cortex/SKILL.md
cortex roundtrip-bidir skill/hcortex/SKILL.md

# Comparación de equivalencia
cortex compare skill/cortex/SKILL.md /tmp/skill.cortex.md

# Canonicalización
cortex canonicalize skill/cortex/SKILL.md --out /tmp/canonical.cortex.md

# Seguridad y auditoría (E2)
cortex doctor --scan-secrets
cortex audit status
cortex verify --signature skill/cortex/SKILL.md

Estado de madurez

Capacidad Estado Evidencia
CORTEX v2 parser/writer current cortex roundtrip byte-identical
CORTEX → HCORTEX current genera skill/hcortex/SKILL.md byte-identical
HCORTEX → CORTEX current reconstruye 266/266 entries
Roundtrip bidireccional current cortex roundtrip-bidir rc=0, 0 diffs
VIEW coverage current 44/44 VIEW en skill; 10/10 artefactos del corpus
Docstring derivada current cortex docstring (E3)
Benchmark inventory current cortex benchmark --list (E3)
Coverage gate current pytest-cov ≥85% (E3)
Secret scanner current cortex doctor --scan-secrets (E2)
Mutation gates current --mode read-only|editor|admin (E2)
Audit log current cortex audit on/off/snapshot (E2)
MCP server future no implementado

Versiones

  • v0.4.0 (actual) — License transition a MPL-2.0. SPDX headers, docs/legal/, trademark policy.
  • v0.3.4 — E2: Security & Governance. Secret scanner, mutation gates, audit log, verify --signature.
  • v0.3.3 — E1: CI/CD + PyPI. GitHub Actions, ruff 0 errores, publish automático.
  • v0.3.2 — Nombres canónicos CLI. VIEW-aware canonicalize, corpus VIEW migration.
  • v2.4.0 — Núcleo bidireccional CORTEX ⇄ HCORTEX verificado.

Licencia

MIT — Fidel Ernesto Lozada A.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codec_cortex-0.5.2-py3-none-any.whl (249.8 kB view details)

Uploaded Python 3

File details

Details for the file codec_cortex-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: codec_cortex-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 249.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for codec_cortex-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 786019c799c5940e7989281e9bb51f60e78e20910b8507be34fdecde6893d1a2
MD5 4661afefc38c58f03d9149a05fb4d5e2
BLAKE2b-256 60e4bdb5dab3191c95dd0ad33f146b97b8fa2e5a53283395e6e5eb112ced2138

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.2

1 file

This release

0.5.2 This release

1 file

0.5.1

1 file

0.5.0

1 file

0.4.3

1 file

0.4.0

1 file

0.3.7

1 file

0.3.6

1 file

0.3.5

1 file

0.3.4

1 file

0.3.3

1 file

0.3.2

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page