superseded: semantic interoperability foundation design draft

Draft
TH
3mo ago
+5450-1

Purpose

Establish the initial commandF foundation after the final FHIR/interoperability donor and gap audit.

What this PR adds

  • a provenance-controlled donor inventory and adoption policy
  • a gap-to-solution architecture for FHIR and cross-standard interoperability
  • a separate research agenda under research/
  • an initial Rust workspace
  • commandf-csir: typed clinical semantic IR primitives and explicit loss events
  • commandf-evidence: machine-readable transformation certificate contracts
  • CI for format, clippy, and tests

Core architecture decision

FHIR is a first-class commandF dialect and validation target, but it is not the sole internal canonical model. commandF will parse source dialects, preserve facts in a typed semantic IR, compile mappings, lower to target dialects, run authoritative validators/oracles, and emit explicit semantic-loss and transformation evidence.

Donor strategy

Prefer DEPEND, IMPORT, and independent ORACLE use. PORT/COPY are allowed only after exact repository commit, source path, license/permission, notices, and modifications are pinned in donor provenance records.

No unverifiable leaked/proprietary source is eligible for ingestion. Founder-authorized private source can be audited when supplied through an authorized source with permission evidence.

Research separation

Candidate papers and master's research directions are isolated in research/RESEARCH_AGENDA.md; they are not product requirements or clinical claims.

Validation

GitHub Actions will run:

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-features

This PR is intentionally Draft while the bootstrap contracts and donor pins are reviewed.


Summary by cubic

Bootstraps commandF’s semantic interoperability foundation with typed Rust contracts and automated review configs, enabling provenance and compatibility certification before adopting donor code. No runtime adapters ship; behavior change is limited to CI and PR review automation.

  • Adds Rust workspace crates: commandf-csir (typed CSIR with loss accounting), commandf-evidence (transformation certificates), commandf-findings (evidence-bearing findings), commandf-package (content-addressed package/lock contracts), commandf-validator (implementation-neutral validator descriptors), commandf-profiler (read-only JSON profiling), commandf-review (breaking-change reports and quality gates).
  • Adds foundation docs (master plan, gap→solution map, consumer compatibility matrix, provenance/donor policy, Big Tech deep dive) and donor registries under donors/*.
  • Configures CI (.github/workflows/ci.yml) to run fmt, clippy, and workspace tests (Rust 1.75).
  • Enables automated PR reviews via .coderabbit.yaml and configures Qodo PR-Agent via .pr_agent.toml; adds engineering rules in AGENTS.md and review best_practices.md.
  • Updates README.md with the pipeline and FHIR positioning; adds workspace Cargo.toml and .gitignore.
  • Applies rustfmt to commandf-review contracts; no API or behavior changes.

Review and rollout

  • Pin all UNPINNED refs in donors/* before any DEPEND/PORT/COPY/IMPORT/ORACLE adoption.
  • Treat these crates as compile-time contracts only; no runtime adapters ship in this PR.
  • Use Rust 1.75 locally; CI must pass before merge. Automated reviews from CodeRabbit and PR-Agent will run on this branch.