CODEC-CORTEX CLI — modular deterministic processor for .cortex files
Project description
codec-cortex
Implementación determinista del codec CODEC-CORTEX v0.4.0. Procesador modular de artefactos
.cortexy.hcortex.mdsin 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:
view_coverage == 100%;- no existen errores
E_VIEW_*niE_HCORTEX_*; - el modo no es
display; - 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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codec_cortex-0.4.0-py3-none-any.whl.
File metadata
- Download URL: codec_cortex-0.4.0-py3-none-any.whl
- Upload date:
- Size: 222.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
886eb592bc4e9521c6d3151c881696004d245cbb9cb09a1e1f8c8b8d5e8af90d
|
|
| MD5 |
53a16b48ee029f51a2e7946462c2dd23
|
|
| BLAKE2b-256 |
aa4c9e42b085009a6dc52a986aaa334bb3a416a3aff67ef1d24b5c711e001ed6
|