Skip to content
cmdrvlPublic

About

profile manages column-scoping configurations for report tools — defining which columns to include, key alignment, and normalization rules for rvl, compare, and shape.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

profile

profile: freeze operator knowledge. A painterly dashboard showing Connections.csv with its four-row preamble dimmed and the header at row 4 highlighted. A profile config draft in the middle holds fields like header_at, key_column, trim_whitespace, decimals, slug. A snowflake FREEZE action produces a profile.lock file with sha256:9a2c…f1d8. Outputs include a clean CSV table and a slicing manifest. A profile version history table shows v1 draft and v2 frozen.

What you know about the file becomes a hash. The freeze is the moment of trust.

License: MIT GitHub release

Stop passing column lists on the command line. Freeze your domain knowledge into a versioned, validated, tamper-evident config.

brew install cmdrvl/tap/profile

Your dataset has 42 columns. 15 of them matter for this analysis. The key is loan_id. Float precision is 6 decimal places. Order doesn't matter. Where does this knowledge live? In a Slack thread? In someone's head? In a --exclude flag you'll forget next month?

profile captures all of it in a versioned YAML file that downstream report tools can consume. Draft one from a real CSV header, iterate until it's right, then freeze it — immutable, SHA-256 hashed, recorded in every lockfile and report that uses it. Change a column? New version. Full audit trail.

What makes this different

  • Draft → freeze lifecycle — profile draft init reads a CSV header and generates a starting profile. Edit it. Lint it against real data. When it's right, profile freeze makes it immutable and content-addressed.
  • Key intelligence — profile suggest-key ranks candidate key columns by uniqueness, null rate, and type. No guessing.
  • Registry-backed header canonicalization — optional column_registry lets the same profile survive heterogeneous raw headers by resolving them to canonical column IDs before scoping. Frozen registry-backed profiles also record column_registry_hash, so registry byte drift is refused on replay.
  • Witnessed pre-parse slicing — optional pre_parse directives describe how to remove export preambles, merge multi-row headers, and capture units rows before downstream tools read the CSV.
  • One file, reusable scoping — rvl consumes frozen profiles today, and the same artifact is the intended scoping surface for shape, compare, and lock as those integrations settle. Declare your domain choices once.
  • Schema drift detection — profile lint --against data.csv catches columns that disappeared, keys that aren't unique, and types that shifted.

5-Minute Quickstart (Copy/Paste)

# 1) Create a draft profile from a real dataset
profile draft init loan_tape.csv --out loan_tape.draft.yaml

# 2) Validate schema and lint against the dataset
profile validate loan_tape.draft.yaml
profile lint loan_tape.draft.yaml --against loan_tape.csv

# Agent discovery: read-only and safe to run before paths are known
profile --robot-triage
profile capabilities --json
profile robot-docs guide

# 3) Freeze to an immutable profile
profile freeze loan_tape.draft.yaml \
  --family csv.loan_tape.core \
  --version 0 \
  --out profiles/csv.loan_tape.core.v0.yaml

# 4) Use the frozen profile with the current live downstream surface
rvl old.csv new.csv --profile profiles/csv.loan_tape.core.v0.yaml --json

rvl and shape are profile-aware today and consume the complete ordered key list. Check compare's operator contract before assuming equivalent behavior in its current release line.


Draft → Frozen Workflow (With Expected Output)

profile draft init loan_tape.csv --out loan_tape.draft.yaml
# writes: loan_tape.draft.yaml

profile lint loan_tape.draft.yaml --against loan_tape.csv
# exit 0 (or exit 1 with deterministic lint issues)

profile freeze loan_tape.draft.yaml \
  --family csv.loan_tape.core \
  --version 0 \
  --out profiles/csv.loan_tape.core.v0.yaml
# writes: profiles/csv.loan_tape.core.v0.yaml
# frozen profile includes: profile_id, profile_family, profile_version, profile_sha256
# registry-backed frozen profiles also include: column_registry_hash

A draft is cheap to iterate. A frozen profile is immutable and hashable for reproducible downstream analysis.


Where profile Fits

profile is a metadata tool that configures how report tools operate.

vacuum → hashbytes → lock
           ↑
        profile → rvl
        profile → shape
        profile → compare (release-line dependent)

Profile doesn't sit in the stream pipeline (vacuum → hashbytes → lock). Instead, it produces configuration files that downstream tools can consume where the current runtime contract supports --profile. rvl and shape are live consumers today; other integrations are converging by tool/release line. Lock records which profiles were active in its profiles array.


What profile Is Not

If you need... Use
Enumerate files in a directory vacuum
Compute content hashes hash
Match files against templates fingerprint
Pin artifacts into a lockfile lock
Check structural comparability shape
Explain numeric changes rvl

profile only answers: which columns matter, what's the key, and how should values be compared?

It can also perform a narrow lineage-preserving CSV slice. That slice is not a general transform pipeline: it only removes pre-data rows when configured, materializes registry-backed canonical headers when configured, optionally captures units/preamble metadata in a manifest, and emits clean CSV for the existing profile workflow.


Profile Format

A profile is a YAML file with a defined schema:

profile_id: "csv.loan_tape.core.v0"
profile_version: 0
format: csv
column_registry: "registries/annex-columns-v0"
pre_parse:
  sheet: loans
  slice:
    mode: preamble_skip
    skip_rows: 3
    header_at_row: 4
    data_starts_at: 5
include_columns:
  - loan_id
  - property_id
  - current_balance
  - note_rate
  - maturity_date
  - property_type
  - occupancy
key:
  - loan_id
  - property_id
columns:
  current_balance:
    type: number
    nullable: false
    unit: USD
    sensitivity: protected
    airlock_class: forbidden
equivalence:
  order: "order-invariant"
  float_decimals: 6
  trim_strings: true
Field Type Description
profile_id string Unique identifier with version suffix
profile_version integer Monotonically increasing version number
column_registry string Optional canon registry path used to normalize raw headers to canonical column IDs before scoping
column_registry_hash string Frozen-only blake3:<hex> hash over length-framed registry bytes, present when column_registry is set
fingerprint_ref string Optional upstream fingerprint ID used as pre-parse lineage
format enum csv, tsv, parquet, jsonl, or xlsx
pre_parse object Optional sheet/fingerprint selector plus slicing directives (preamble_skip, multi_row_header, preamble_with_units)
columns map Optional canonical-column metadata: type, nullable, unit, sensitivity, and airlock class
include_columns string[] Columns to include in analysis (others ignored)
key string[] Ordered zero-or-more columns used for row alignment; names must be non-empty and unique
equivalence.order string "order-invariant" or "order-sensitive"
equivalence.float_decimals integer Decimal places for float comparison
equivalence.trim_strings boolean Trim whitespace before string comparison

Frozen Profiles

Once frozen, a profile is immutable:

profile_id: "csv.loan_tape.core.v0"
profile_version: 0
profile_sha256: "sha256:a1b2c3d4e5f6..."
frozen: true
# ... rest of profile

When column_registry is set, profile freeze writes column_registry_hash into the canonical YAML before computing profile_sha256. Any semantic change, including registry byte drift, requires a new profile_version and a new profile_id.


Subcommands

profile --robot-triage

Emit a read-only machine triage report without requiring a profile or dataset path. This is the first command an agent should run when it needs the current CLI contract.

profile capabilities

Print the supported agent surfaces and side-effect boundaries:

profile capabilities --json

profile robot-docs

Print a paste-ready operating guide for headless agents:

profile robot-docs guide

profile draft init

Generate a draft profile from a tabular dataset:

profile draft init loan_tape.csv --out loan_profile.yaml

Auto-populates include_columns and conservative columns type/nullability metadata from the header and rows. You edit the draft to remove unwanted columns and set the key. When headers vary across providers, add --column-registry registries/annex-columns-v0 to write canonical column IDs into the draft instead of raw header spellings. For messy exports, seed pre-parse directives from fingerprint peek --suggest:

fingerprint peek vendor_export.csv --json --suggest > peek.json
profile draft init vendor_export.csv --from-peek peek.json --out vendor_profile.yaml

Filesystem-free library API

The profile library also exposes deterministic byte-slice entrypoints for browser and embedded callers: inspect_bytes, slice_bytes (including preamble_skip), draft_bytes, suggest_key_bytes, and evolve_profiles (also available as evolve). They accept caller-owned CSV/TSV bytes and return the same redacted schema fields as the CLI: ordinal column refs by default, or keyed HMAC markers when the caller supplies an already-validated RedactionKey. They do not read files, environment variables, the clock, or the witness ledger; the CLI's filesystem and witness behavior is unchanged. slice_bytes returns canonical CSV bytes and metadata, while draft_bytes and evolve_profiles return validated profile domain objects.

The CLI and tabular reader remain enabled by default. For a pure library build, disable defaults:

profile = { version = "0.13.0", default-features = false }

That build has no CLI, tabular, zstd, clock, or witness surface and is checked in CI for wasm32-unknown-unknown with:

cargo check --lib --target wasm32-unknown-unknown --no-default-features

profile suggest-key

Rank candidate key columns by uniqueness, null rate, and deterministic order. When no single column is unique, suggest-key also evaluates minimal ordered 2- and 3-column tuples using compact Blake3 hashes; request a maximum arity explicitly when needed:

profile suggest-key loan_tape.csv
profile suggest-key loan_tape.csv --max-arity 3
# candidates[0]: column redacted:ref:c1, uniqueness 1.0, null_rate 0.0, viable (ranked first)
# candidates[1]: column redacted:ref:c4, uniqueness 0.85, null_rate 0.0
profile --explicit suggest-key loan_tape.csv   # prints the column names instead of refs

Columns are redacted:ref:cN refs by default (see Header redaction); --explicit prints names.

profile lint

Validate a profile against a dataset:

profile lint loan_profile.yaml --against loan_tape.csv

Catches: missing columns, missing key components, type mismatches, and schema drift. With a column registry, every key component is checked against canonicalized dataset headers.

profile evolve

Create a mutable draft from a frozen profile and a new dataset without changing the frozen input. The delta report identifies added/dropped columns, registry-backed or similar rename candidates, key status, and an optional preamble shift from fingerprint peek --suggest:

profile evolve profiles/csv.loan_tape.core.v0.yaml \
  --against vendor_export.csv \
  --out profiles/csv.loan_tape.core.next.draft.yaml \
  --from-peek vendor_export.peek.json \
  --view delta --json

The result reports next_profile_version and typed next_actions; the output remains a draft until the operator reviews it, runs profile lint, and invokes profile freeze with the next version. Ambiguous rename candidates are surfaced for confirmation and are never applied silently.

Without --explicit, header text from the new dataset is never printed (bd-bix): added_columns, the new side of renamed_candidates, key_status.repaired[].to and, in --view full, the dataset-origin entries of draft_profile are redacted:ref:cN refs numbered in the dataset's header-row order (equal text shares a ref; ranking ties use header position, never text), or keyed redacted:hmac-sha256: markers with PROFILE_REDACTION_KEY (the same marker inspect gives that header). The profile's own names stay. The draft file written by --out keeps the real names. To map a ref back, rerun with --explicit or run profile inspect|slice --explicit on the same header row. An unusable key refuses E_REDACTION_KEY_INVALID before any draft is written.

profile slice

Apply profile-driven or ad-hoc pre-parse directives to emit clean CSV. When the profile declares column_registry, slice also materializes canonical CSV headers after any pre-parse row cleanup:

profile slice vendor_export.csv --profile-path vendor_profile.yaml --out clean.csv --emit-manifest slice.manifest.json
profile slice vendor_export.csv --mode multi_row_header --header-rows 2,3 --data-starts-at 4 --out clean.csv

slice never prints raw CSV rows to stdout by default (bd-6aj): pass --out <path> to write the CSV to a file (stdout then carries only the summary, even with --explicit), or --explicit without --out to stream the CSV to stdout for local piping. Human mode with neither refuses with E_OUTPUT_REQUIRED (exit 2) and a shell-quoted next_command; --json without --out prints metadata only (no rows; the CSV appears as slice_csv only with --explicit). Profiles without pre_parse use the flat CSV default: header row 1, data starts at row 2. With --json, it emits the profile.v0 envelope with row counts, columns, output hash, source encoding, and lineage metadata; raw data rows are omitted unless --explicit is set. The optional manifest is explicit opt-in and may contain captured preamble/unit rows plus CRV1 receipt fields: input_hash, profile_sha256, column_registry_hash, canonicalizer_version, mapping, and unmapped. pre_parse.slice.encoding and --encoding support strict utf-8, windows-1252, and latin1 input; output CSV is always UTF-8. When a profile is provided and slice flags override profile directives, slice emits explicit warnings.

profile emit-discovery

Emit a deterministic profile.discovery.v0 candidate template from an already-sliced CSV and a chosen preamble skip offset:

profile emit-discovery linkedin_sliced.csv \
  --source-file Connections.csv \
  --skip-rows 3 \
  --source-kind linkedin_export --json

The result payload is designed for downstream fingerprint template promote without re-reading the source file.

profile stats

Surface structural statistics about a dataset. Per-column example values are redacted by default; JSON output only includes example fields when the global --explicit flag is set:

profile stats loan_tape.csv
# JSON: row_count, column_count and columns[] with id (redacted:ref:cN), type, nullable,
# null_rate, uniqueness and key_viable; the column names appear only with --explicit

profile --explicit --json stats loan_tape.csv
# includes per-column example values

Each redacted column entry also reports a conservative type (integer, number, boolean, text, or unknown) and nullable flag. Mixed values become unknown; no raw values are retained unless --explicit is requested.

Profile inspect

Inspect one dataset in a single redacted report. It combines format/dialect, row and column metadata, numeric summaries, key candidates, and a conservative header/preamble suggestion:

profile --json inspect loan_tape.csv
profile --json inspect loans.xlsx --sheet loans

Columns carry an id (a redacted:ref:cN ref, see Header redaction); name appears only with --explicit. String examples and numeric min/max/p50/p95 are redacted by default: their keys remain present with null, so consumers can distinguish redaction from a non-numeric column. Inspect emits no sum, mean, or example field. Use the global --explicit flag only when raw examples and exact numeric summaries are intentionally authorized; it restores today's values.

Header redaction (slice, inspect, stats, suggest-key, evolve)

On a messy sheet the header row can be a title banner, a methodology paragraph or an actual data row, so header text is dataset content. Without --explicit, slice, inspect, stats, suggest-key and evolve never print dataset header text on stdout or stderr; a column is an id:

  • Ordinal refs (default): redacted:ref:c1, c2, ... numbered in column order, never in text order. Equal header text in one output shares a ref (a banner merged across four columns is one ref repeated). Refs are not comparable across files. Output is byte-identical across runs. No hash of any header is computed.
  • Keyed markers (opt-in): set PROFILE_REDACTION_KEY (at least 16 bytes) and each id becomes redacted:hmac-sha256:<32 hex>, the first 128 bits of HMAC-SHA256(key, "column" NUL header). The same key gives the same marker for the same header in any file (the correlation feature) and nothing is guessable without it; a key holder can test a candidate header by computing its marker. An empty or short key refuses with E_REDACTION_KEY_INVALID (exit 2) for all five commands (with or without --explicit); it never falls back to ordinal refs. The key is never printed, never written to the witness ledger, and profile doctor reports only configured / not configured / unusable.
  • --explicit prints the names (name beside id; slice lists the real headers in columns). stats --profile keeps the profile's own column names, which are not dataset text.
  • A slice --emit-manifest file and --out CSV are artifacts you asked for and keep real headers. Refusals withhold the dataset's sheet names (sheet_count) and header list (available_count) unless --explicit.
  • emit-verify-starter / emit-ddl read column names from a --stats file, so feed them profile --explicit stats ... output or stats --profile <frozen profile>; a default (redacted) stats file now refuses instead of silently dropping every type.
  • evolve redacts the new dataset's headers in added_columns, renamed_candidates[].new, key_status.repaired[].to and the full-view draft (see profile evolve); slice without --out or --explicit in human mode refuses E_OUTPUT_REQUIRED instead of printing rows (see profile slice).

Redaction exemptions (operator ruling, bd-c2q). A profile and the files you ask for are authored artifacts, so these files keep the real header names and values on purpose:

  1. the profile YAML written by profile draft init --out;
  2. the CSV written by profile slice --out and the JSON written by profile slice --emit-manifest;
  3. the draft profile YAML written by profile evolve --out.

Everything PRINTED to stdout or stderr stays header/example/numeric-summary-redacted by default (ordinal refs, or keyed markers with PROFILE_REDACTION_KEY) and shows names, examples, and exact numeric summaries only with --explicit. draft init and lint print no dataset header text on stdout; lint reports the profile's own column names. Registry-ambiguity refusals report physical column positions with ordinal or keyed markers by default; raw physical header text appears only with --explicit.

When a workbook has several sheets and none is chosen, E_AMBIGUOUS_SHEET / E_SHEET_NOT_FOUND carry a copy-pasteable next_command with the real subcommand and a shell-quoted path (profile stats 'report (1).xlsx' --sheet 0).

Profile projections

Frozen profiles can bootstrap downstream constraints without duplicating YAML. Optional stats JSON contributes only type/nullability metadata and never raw examples:

profile --json emit-verify-starter profiles/csv.loan_tape.core.v0.yaml --stats stats.json
profile --json emit-ddl profiles/csv.loan_tape.core.v0.yaml --stats stats.json \
  --dialect postgres --table loan_tape --out loan_tape.sql

The first emits verify portable authoring (constraint_set_id, bindings, rules with id, severity, binding, op, columns; nothing else at the top level), which verify compile accepts directly: profile --json emit-verify-starter p.yaml --out starter.json && verify compile starter.json. It derives one unique rule over the profile key and a not_null rule per column the profile or --stats declares non-nullable; types, units and sensitivity have no portable op and are not carried, and a profile with no key and no non-null column is refused. Checked against the released verify 0.6.1. The second emits twinning.ddl.v1 for Postgres or Snowflake. Both require a frozen profile and are deterministic projections apart from an explicit --out artifact.

profile freeze

Validate and mark a profile immutable with SHA-256 content hash:

profile freeze loan_profile.yaml \
  --family csv.loan_tape.core \
  --version 0 \
  --out profiles/csv.loan_tape.core.v0.yaml

How profile Compares

Capability profile Manual column lists Config files SQL views
Versioned and frozen Yes No No No
Content hash (tamper-evident) Yes No No No
Validated against dataset Yes (lint) No No At query time
Key declaration Yes Ad-hoc Ad-hoc Yes
Normalization rules Yes No No No
Cross-tool (shape/rvl/compare) Yes No No No
Draft from header Yes (draft init) Manual Manual Manual

Installation

Homebrew (Recommended)

brew install cmdrvl/tap/profile

Shell Script

curl -fsSL https://raw.githubusercontent.com/cmdrvl/profile/main/scripts/install.sh | bash

From Source

cargo build --release
./target/release/profile --help

Integration with Report Tools

Current runtime support:

  • rvl accepts --profile today for complete-key derivation and column scoping
  • shape accepts --profile / --profile-id and evaluates complete ordered profile keys
  • compare remains the deferred exhaustive diff tool in the broader spine roadmap
# rvl — only explain changes in profile columns
rvl old.csv new.csv --profile loan_profile.yaml --json

Lock Integration

lock records which profiles were active:

{
  "profiles": [
    {
      "profile_id": "csv.loan_tape.core.v0",
      "profile_version": 0,
      "profile_sha256": "sha256:a1b2c3d4...",
      "column_registry_hash": "blake3:..."
    }
  ]
}

Dataset formats

draft init, suggest-key, lint, stats and slice read CSV, TSV, JSONL, Parquet and XLSX/XLS datasets. The format is chosen by file extension (.tsv, .jsonl/.ndjson, .parquet, .xlsx/.xlsm/.xls; anything else is read as CSV exactly as before). Non-CSV datasets are read through the shared cmdrvl-tabular reader and rendered to CSV in memory, so the same data in any container gives the same stats, suggest-key, lint issues, draft init profile and slice output (golden tests in tests/formats.rs).

  • --sheet <name|index> picks the worksheet of a workbook (0-based index). A workbook with more than one sheet and no --sheet is refused (E_INPUT_FORMAT, tabular_code: E_AMBIGUOUS_SHEET, the sheet names in detail.context.sheets).
  • A file tabular cannot read (unsupported Parquet value type, extension that disagrees with the content, nested JSON value, zip bomb) is refused with E_INPUT_FORMAT and tabular's own code; refusals carry coordinates, sheet names and type names, never cell values. A missing file is the ordinary E_IO.
  • .tsv files are now parsed as tab-separated (previously they were read as comma-separated, i.e. as one column). A .tsv file that is really comma-separated is refused with E_FORMAT.
  • slice over a non-CSV dataset works on the tabular grid (row 1 is the header row tabular reports; --delimiter and --encoding do not apply). input_hash in the manifest is the blake3 of the original file, not of the rendering.
  • Hashes that depend only on the profile (profile_sha256, column_registry_hash) are unchanged.

Operational Contract

Global flags

Flag Behavior
--describe Print operator.json and exit 0 before normal input validation
--schema Print JSON Schema and exit 0 before normal input validation (profile --schema prints profile YAML schema; profile emit-discovery --schema prints profile.discovery.v0 schema)
--version Print profile <semver> and exit 0
--no-witness Suppress witness ledger recording

Exit codes

Exit Meaning When
0 SUCCESS Operation completed with no issues
1 ISSUES_FOUND Lint/diff found issues or differences
2 REFUSAL Invalid input, schema violation, parse/IO refusal, or CLI error

Doctor

profile doctor is a read-only diagnostic surface for headless agents. It does not read profile files, datasets, column registries, stdin, witness ledgers, or network endpoints. It does not write profile YAML, witness records, .doctor/ artifacts, or remote data.

profile doctor health --json
profile doctor capabilities --json
profile doctor --robot-triage
profile doctor robot-docs

doctor --json responses use the same profile.v0 output envelope as the rest of the CLI. There is no doctor --fix mode.

Refusal codes

E_INVALID_SCHEMA, E_MISSING_FIELD, E_BAD_VERSION, E_ALREADY_FROZEN, E_IO, E_CSV_PARSE, E_EMPTY, E_COLUMN_NOT_FOUND, E_INPUT_FORMAT

With --json, refusals are emitted in the unified output envelope (outcome=REFUSAL, refusal detail in result). Without --json, refusals are human-readable errors on stderr with the refusal code.

Managed paths

  • Frozen profile lookup: ~/.cmdrvl/config/profile/profiles/; legacy ~/.epistemic/profiles/ is copied on first default use.
  • Fabric config for push/pull (only in a build with the network feature; the default build refuses E_NETWORK_DISABLED): $EPISTEMIC_FABRIC_URL or ~/.cmdrvl/config/profile/config.toml; legacy ~/.epistemic/config.toml is copied on first default use.

Witness behavior

  • Witness append is enabled for: freeze, validate, lint, slice, stats, suggest-key
  • Witness append is skipped for: draft new, draft init, emit-discovery, list, show, diff, push, pull
  • --no-witness disables witness writes without changing domain outcome or exit semantics
  • Ledger path: $EPISTEMIC_WITNESS or ~/.cmdrvl/state/witness/witness.jsonl; legacy ~/.epistemic/witness.jsonl is copied on first default use.
  • Witness append failures warn on stderr and do not change primary command outcome/exit code
  • Breaking output change (bd-rle): --json witness query now emits a bare array of records, --json witness count emits bare {"count":n}, and --json witness last emits the newest bare record or null by default. witness last --count N emits a bare array for every N other than 1 (including N=0). Empty or absent ledgers are successful and emit [], {"count":0}, or null. Refusals remain the profile.v0 envelope; human witness output is unchanged.

The global --json flag uses the profile.v0 envelope for normal commands. The three successful witness read commands are the deliberate exception so they match the shared family format; their refusal output remains enveloped.


Troubleshooting

"Column not found" when using profile with shape/rvl

A column in include_columns doesn't exist in the dataset. Run profile lint to diagnose:

profile lint loan_profile.yaml --against new_tape.csv
# ERROR: Column 'occupancy' in profile not found in dataset

Key column isn't unique

The complete tuple declared in key has duplicate values. Component order matters, and every component must be populated. Use profile suggest-key to find candidate columns:

profile suggest-key loan_tape.csv

Profile version confusion

Frozen profiles are immutable. If you need to change columns, create a new version:

# Old: csv.loan_tape.core.v0 (frozen)
# New: csv.loan_tape.core.v1 (add new columns, re-freeze)
profile_id: "csv.loan_tape.core.v1"
profile_version: 1

float_decimals too aggressive

If rvl reports spurious changes, your float_decimals may be too high. Try reducing precision:

equivalence:
  float_decimals: 2  # was 6, reduced to match business precision

Profile works locally but fails in CI

Ensure the profile file is committed and the path is correct. Profiles are plain YAML — no environment dependencies.


Limitations

Limitation Detail
Profile format metadata Profiles may declare csv, tsv, jsonl, parquet, or xlsx; workbook sheet and fingerprint selectors are optional pre_parse metadata. Dataset reads still use the shared tabular reader and an explicit --sheet when a workbook is ambiguous.
Single key type Composite keys supported, but only column-based — no expression keys
No auto-update Profile doesn't auto-detect schema changes — use lint to catch drift
Registry paths are local Profiles can reference local column registries, but registry distribution/resolution is still path-based in v0
Network publish is opt-in push/pull data-fabric wrappers exist only in a build with the network Cargo feature (cargo install profile --features network). The default build has no HTTP or TLS crates and push/pull refuse E_NETWORK_DISABLED (exit 2)
Shipped (0.13.0) The commands above are implemented and tested: draft, validate, lint, evolve, freeze, slice, stats, inspect, suggest-key, diff, show, list, projections (emit-verify-starter, emit-ddl, emit-discovery), witness queries, and doctor. Default output redacts dataset header text and refuses raw CSV on stdout (see Header redaction and profile slice)

FAQ

Why not just pass column names as CLI flags?

Flags don't compose. With 15 columns, a key, and normalization rules, the command line becomes unmanageable. A profile captures all scoping decisions in a versioned, validated, shareable file.

Why freeze profiles?

Immutability. Once a profile is frozen and referenced by a lockfile, you can prove that the exact same column scoping was used. Any change requires a new version, creating an audit trail.

Can I use the same profile across datasets?

Yes — as long as the datasets have the same schema. Use profile lint --against to verify compatibility before use.

What if my dataset has columns not in the profile?

They're ignored. Report tools only analyze columns in include_columns. This is the whole point — focus on what matters.

How does profile relate to fingerprint?

Fingerprint identifies what kind of file something is (template recognition). fingerprint peek can also provide row-shape metadata for messy CSV exports. Profile consumes that shape metadata through draft init --from-peek and pre_parse, then declares which cleaned columns report tools should analyze.

Why is key declaration important?

Without a key, report tools like rvl can't align rows between two datasets. key is an ordered zero-or-more list: [] declares no key, one item declares a simple key, and multiple items declare a composite tuple. Reordering components changes profile identity. profile suggest-key helps identify individual candidate columns.

Can profiles be generated programmatically?

Yes. profile draft init generates a starting profile from a CSV header, and --from-peek can seed pre_parse from fingerprint peek --suggest. You can also write YAML directly or generate it from any tool.


Agent Integration

For the full toolchain guide, see the Agent Operator Guide. Run profile --describe for this tool's machine-readable contract.


Spec and Development

This README describes the behavior of the released binary (profile 0.13.0); the design notes are in docs/PLAN.md.

cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo test
cargo test --features network   # push/pull against a local test server

profile is part of the open-source toolchain from the CMD+RVL lineage and AI enablement practice. MIT-licensed. Contributions welcome from any practice or stack.

About

profile manages column-scoping configurations for report tools — defining which columns to include, key alignment, and normalization rules for rvl, compare, and shape.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages