Enterprise CLI
Enterprise adds source inspection, record preparation, A–E experiment control, final approval, and agent query routing to the Rust corec command.
Packaging and invocation
Customers invoke corec. The licensed package includes a private Rust executable that corec discovers as its Enterprise implementation. COREC_EE_BIN can select a non-default extension location for development or controlled packaging.
corec strategy list
corec corpus classify --help
corec schema advise --help
corec dataset prepare --help
corec design --help
corec manifest --help
corec query --helpInspect the customer strategy inventory
The base Enterprise build reports the four Core chunkers and an empty optionalPacks list. An enablement adds the packs selected for the customer's datasets. Dataset materialization checks this inventory, and its receipt binds each Stage B configuration to an available processor.
| Command | Purpose | Primary output |
|---|---|---|
| corec strategy list | Show Core strategies and optional packs enabled in this build | StrategyInventory JSON |
| corec strategy describe <pack-id> | Inspect compatibility, licensing, record types, processors, versions, and configuration schema | ChunkingStrategyPackDescriptor JSON |
Understand the source corpus
All three commands treat the source as immutable. Exploration hashes distinct values and omits examples by default. Enrichment adds explicit derived fields and keeps their origin visible.
| Command | Required inputs | Primary output |
|---|---|---|
| corec corpus classify | --input JSONL|Parquet, --output directory | classification.json and candidate dataset partitions |
| corec corpus explore | --input JSONL|Parquet, --output file | FieldProfile JSON; --include-examples is optional |
| corec corpus enrich | --input structured JSONL|Parquet, --output JSONL | Deterministically enriched rows with provenance |
JSONL and Parquet support
Enterprise reads source exports in JSONL or Apache Parquet. Classification, exploration, deterministic enrichment, schema advice, and canonical dataset preparation use the same Rust source reader for both formats. Parquet values and explicit nulls are preserved through Arrow record batches.
Reviewable and portable outputs remain JSON or JSONL: canonical records, schema registries, golden judgments, ranked results, misses, and evaluation reports. corec dataset prepare-batch consumes canonical records.jsonl and emits bounded API request parts. This gives analysts inspectable evidence while allowing source teams to deliver efficient columnar exports.
corec corpus classify --input exports/documents.parquet --output engagement/00-classification
corec corpus explore --input exports/documents.parquet --output engagement/02-profile.json
corec schema advise --input exports/documents.parquet --name reference-documents --output engagement/03-advice.json
corec dataset prepare --input exports/documents.parquet --schema engagement/04-registered-schema.json --name reference-documents --provider customer-export --observed-at 2026-08-26T00:00:00Z --allow group:reader --output engagement/05-dataset| Stage | Accepted input | Produced artifact |
|---|---|---|
| Classify / explore | source.jsonl or source.parquet | Classification JSON, partitions, and field profile JSON |
| Enrich / advise | structured JSONL or Parquet | Enriched JSONL and pipeline advice JSON |
| Dataset prepare | source JSONL or Parquet | Canonical records.jsonl plus dataset.json |
| Prepare batch | Canonical records.jsonl | request.json parts and integrity receipts |
| Golden and eval | Reviewable JSONL | Fragments, judgments, results, misses, and reports |
Advise and approve schema
| Command | Required inputs | Primary output |
|---|---|---|
| corec schema advise | --input, --name, --output | PipelineAdvice with proposed identity, text, types, attributes, and transforms |
| corec schema register | --suggestion, --registry, --approved-by | Append-only registry revision; optional --output registered schema |
Prepare and ingest datasets
Preparation requires an explicit access decision for every record set. It never infers reader permissions from customer fields. The resulting requests remain portable across adapter implementations.
| Command | Key options | Primary output |
|---|---|---|
| corec dataset prepare | --input, --schema, --name, --provider, --observed-at, plus --allow repeated or --public | Canonical records.jsonl and dataset manifest |
| corec dataset chunk | --input, --output, --strategy, optional --configuration | Reviewable fragment JSONL and a hashed ChunkingRun receipt |
| corec dataset prepare-batch | --input, --name, --configuration-revision, --mapping-fingerprint, --output | Backend-neutral request parts, hashes, and prepared manifest |
| corec dataset ingest | Prepared batch plus canonical database and adapter settings | Durable application and projection receipt |
| corec dataset ingest-demo | --database-url, --config, --batch, --design-configuration, --output | Starter-only PostgreSQL and memory-projection receipt |
| corec validate-batch | Prepared request JSON | Offline public-contract validation |
Create review candidates and run evaluations
The evaluators are public Core commands because their evidence contracts should remain independently inspectable. Enterprise prepares and coordinates the experiment workflow around them.
| Command | Purpose | Gate evidence |
|---|---|---|
| corec golden generate | Build candidate judgments from exact materialized fragments | Stable fragment IDs; candidates remain unreviewed |
| corec eval retrieval | Score BM25 or supplied lexical, semantic, or hybrid rankings | Hit@K, misses, expected-empty behavior, configuration and projection-receipt binding |
| corec eval generation | Score answers, citations, facts, abstention, and supplied faithfulness | Quality, faithfulness, abstention, model and judge identities |
Control stages A through E
record-result also accepts --converter-audit, --chunk-audit, --ingestion-evidence, --generation-report, and --latency-ms. Ingestion evidence is mandatory for A–C candidates and for D, where it must be the exact selected C receipt.
| Command | Purpose | Evidence requirement |
|---|---|---|
| corec design init | Validate a declared search space and plan Stage A | --search-space, --output |
| corec design record-result | Attach one evaluator result to a planned experiment | --state, --experiment-id, --retrieval-report, --results; audits and receipts as applicable |
| corec design advance | Select the stage winner and plan the next experiments | Complete equal-sample results for the active stage |
| corec design audit-converters | Record concrete converter provenance and representative review | --fragments, --requested-converter, --reviewed-by, repeated --representative |
| corec design audit-chunks | Measure exact token and split distributions | --fragments, --output |
| corec design finalize | Bind the A–D optimum to full Stage E reports | Exact selected configuration, ready ingestion receipt, receipt-bound retrieval, and optional corpus report |
| corec design demo-stages | Exercise controller wiring with the shipped synthetic fixture | Artifacts are labeled synthetic_demo |
Emit the certification manifest
Add --corpus-report for a multi-collection corpus. The result is certified only when every immutable gate passes; otherwise it is blocked and carries actionable reasons.
corec manifest emit \
--classification <classification.json> \
--sample-review <sample-review.json> \
--profile <profile.json> \
--advice <advice.json> \
--schema-registry <schema-registry.jsonl> \
--dataset <dataset.json> \
--ingestion <applied-receipt.json> \
--judgments <reviewed.jsonl> \
--design-decision <design-decision.json> \
--retrieval-report <report.json> \
--generation-report <generation-report.json> \
--certified-by <principal> \
--retrieval-target 0.55 \
--faithfulness-target 0.80 \
--qualified-answer-target 0.80 \
--output <manifest.json>Route agent queries
Optional flags are --dataset for dataset scope, --filters for a JSON object, --global-search for an explicit global scope, and --output for durable JSON. The routing decision can select lexical, hybrid, or bounded graph followed by evidence retrieval. Relationship intent always carries requiresAgentReview: true.
corec query route \
"Which authorities connect these two matters?" \
--filters ./request-scope.json \
--output ./routing-decision.jsonArtifact and security rules
- Input exports remain read-only and carry SHA-256 identity into derived artifacts.
- Every command writes to an explicit file or directory and produces machine-readable JSON or JSONL.
- Access uses explicit --allow principals or --public; customer fields never silently become permissions.
- Secrets stay in ignored environment files or a secret manager.
- Canonical records, reviewed judgments, and certification evidence remain independent of a vector or graph backend.