An open format and TypeScript toolchain for giving AI agents a persistent, authority-aware operating model for an IXO entity domain.
domain.md combines YAML 1.2 frontmatter with ordered Markdown guidance. The machine layer identifies
constitutions, controllers, services, resources, rights, claims, accounts, flows, privacy, and
source-of-truth boundaries.
The prose layer explains purpose and safe operating context.
The repository is structurally inspired by google-labs-code/design.md while providing an original IXO domain model and implementation. See ATTRIBUTION.md and NOTICE.
npm install @ixo/domain.md
npx domainmd lint ./domain.md
npx domainmd specThe package has not been published yet. During development:
npm ci
npm run build
node packages/cli/dist/cli.js lint examples/project-authoring/domain.mdThe unreleased public package version is 0.3.0; the bundled specification version is 1.0.0-rc.3. They are
intentionally independent.
import {
diffDomains,
exportDomain,
getRules,
getSchema,
getSpecification,
lint,
parseDomain,
renderTemplateBundle,
} from '@ixo/domain.md';Every lint finding carries a stable code, severity, JSON-pointer or section path, message, and source location. Reports distinguish static conformance from the structured external checks that remain required.
lintvalidates a file, package directory, or stdin and emits JSON, text, or SARIF.diffclassifies typed and narrative changes and reports conformance regressions.exportemits a parsed JSON model or SARIF findings; exported JSON is not CID-canonical bytes.specemits the bundled specification and active rule registry.schemaemits the matching JSON Schema.initrenders a pinned protocol template bundle into a validatedauthoring_draft.
Both domain.md and domainmd binaries point to the same CLI. Use domainmd on Windows to avoid .md
file-association conflicts.
lint, diff, and invalid SARIF export return exit 1 for a conformance or configured gate failure.
Invocation, filesystem, decoding, and internal failures return exit 2.
Initialization accepts parameters from JSON/YAML or stdin and never runs an interactive wizard:
domainmd init \
--manifest ./examples/protocol-domain/template-manifest.yaml \
--protocol did:ixo:entity:protocol:verified-services \
--derived-type project \
--params ./examples/protocol-domain/parameters.json \
--output ./new-projectHTTPS manifests require --manifest-sha256 or --manifest-cid. IPFS requires an explicit HTTPS
--ipfs-gateway; path-addressed IPFS manifests also require a SHA-256. CID verification in this release is
limited to raw sha2-256 CIDs over the exact retrieved bytes. Resolvers are pluggable, while the built-in
local, HTTPS, and IPFS resolvers enforce path, symlink, redirect, DNS, timeout, and size boundaries.
Successful initialization writes a validated authoring_draft and provenance.yaml through an atomic
temporary-directory rename. It does not persist, anchor, publish, register an entity, execute a Flow, grant
rights, or move value.
A static pass is not proof of live authorization. Anchored and runtime profiles still require external CID, DID/IID resolver, constitutional authority, capability revocation, trusted-clock, chain-anchor, and canonical-state checks. A constitutional document or model evaluation never self-authorizes an action. Reports enumerate those unresolved checks.
The current specification is 1.0.0-rc.3. Read the generated specification and the
machine-readable schema together.
rc.3 treats a constitutional subject as a general semantic role rather than a legal-entity taxon.
Persons, assets, work, services, claims, evidence, places, biological subjects, networks, and agentic
twins use the same identity, purpose, claims, wallets, authority, policy, governance, and lifecycle facets. A subject's
domain.type, semantic subject classes, constitutional archetypes, constitution type, and instruments
remain distinct.
Canonical inputs live under spec/: MDX, JSON Schemas, TypeScript rule metadata, and version constants.
npm run spec:generate creates docs/spec.md and packaged assets; npm run spec:check fails on drift in
schemas, IDs, rule codes, generated docs, legal notices, or runtime version constants. Valid examples live
under examples/.
spec/— canonical specification, domain/template schemas, the experimental Oracle Capsule manifest/source-lock contract, RFC 8785 vectors, and rule registrydocs/— generated human-readable specificationpackages/cli/— public ESM TypeScript library and CLIexamples/— valid governed project, protocol/template, service, and passive dataset domainsscripts/— specification, example, and packed-package verification
See CONTRIBUTING.md, SECURITY.md, and RELEASING.md. This project is licensed under Apache-2.0.