Literate AI

Repository documentation

ADR 0002: Use Python for the Reference Kernel and Isolate Node Tooling

Context

The first architecture commit placed package.json and package-lock.json at the repository root solely to pin and execute the OpenSpec CLI. That layout made the repository look like a Node.js framework even though the domain design proposed Python for OVA-compatible extraction. It also made a contributor-only npm dependency tree look like part of the framework's runtime supply chain.

literate-ai needs a conservative implementation ecosystem. OVA's reusable vertical slice, schemas, orchestration, tests, and compatibility boundary are Python. The portable value lies in versioned wire contracts and lifecycle semantics, not in requiring every consumer to run one language runtime.

Decision

The initial reference kernel SHALL be a Python 3.11+ distribution named literate-ai with import package literate_ai. It admits one exactly pinned runtime capability: cyclonedx-python-lib with its strict JSON-validation extra, behind the dependency adapter. This implements the standards boundary for every generated source and resolved SBOM without teaching the neutral domain about a Python library. Future runtime dependencies require an explicit decision covering maintenance health, security history, release cadence, license, transitive size, replacement strategy, and which architectural port contains them.

Node.js SHALL NOT be required to install, import, or run the framework kernel. The pinned OpenSpec CLI remains contributor tooling under tools/openspec/, with its own private package manifest, lockfile, installation target, and ignored node_modules. Repository validation may require this tool; framework runtime does not.

Portable schemas use JSON Schema and canonical serialization independently of Python. Optional TypeScript may implement a future console/presentation adapter. Security-sensitive CAS, sandbox, or execution helpers may later use Rust or platform-native code behind versioned ports. Neither choice changes domain or wire-contract ownership.

Dependency admission policy

For each proposed runtime dependency, record:

Dependencies SHALL be direct and intentional. Framework adapters may use pinned extras; the domain package cannot import them. Lockfiles are mandatory for contributor and release environments but do not convert tooling dependencies into runtime dependencies.

Consequences

Validation

Read the Markdown sourceConference homePublished 1.3.0 · Patch 1.3.1 in progress · Development 1.4