v0.13.2Control flow and dataflow are rebuilt on explicit semantics, Z3 translation matches executable C# numeric rules, and the build chain is hermetic and supply-chain verified with hash- and size-pinned Z3 binaries.See what's new

ids

Validate, materialize, and index Calor declaration IDs

Bash
calor ids <command> [paths] [options]

Current Calor syntax permits structural openers without source IDs. The parser gives those declarations in-memory _auto IDs; use ids assign only when your repository needs explicit, durable source identity.

CommandPurpose
checkValidate source IDs, including prefixes, formats, duplicate values, and test-ID policy
assignAdd compact IDs to declarations that omit them and optionally repair duplicates
indexWrite a JSON declaration index

ids check

Bash
calor ids check <paths...> [options]
OptionDescription
--allow-test-idsAllow short IDs such as f001 and m001 outside test paths
-v, --verboseShow file-processing detail in text mode
-f, --format <text|json>Select text output or the schema 2.0 machine envelope

Exit code 0 means every scanned ID passed; 1 means the command found an ID problem or no .calr inputs. JSON mode writes one envelope to stdout and keeps human diagnostics on stderr.

Bash
calor ids check src/
calor ids check src/ --format json

The check validates the current tree. It cannot infer from a standalone snapshot that one otherwise-valid ID was replaced by another; use version control or an edit hook when ID-churn detection matters.


ids assign

Bash
calor ids assign <paths...> [options]
OptionShortDescription
--dry-run-nPreview assignments without writing files
--fix-duplicatesKeep the first occurrence and reassign later duplicates
--allow-test-idsLeave allowed short test IDs unchanged
--verbose-vList changed files and assignments

Assignments use the current compact format, such as f_7k9m2npqrstv.

Bash
calor ids assign src/ --dry-run
calor ids assign src/
calor ids assign src/ --fix-duplicates

ids index

Bash
calor ids index <paths...> [--output <file>]

--output (-o) defaults to calor.ids.json. The file contains an array of entries:

JSON
[
  {
    "id": "f_7k9m2npqrstv",
    "kind": "Function",
    "name": "Calculate",
    "file": "src/calculator.calr",
    "line": 3
  }
]

Formats and Policy

The canonical v0.12 form is a kind prefix plus 12 lowercase Crockford Base32 characters. The compiler still accepts legacy 26-character uppercase ULID payloads.

KindCompact example
Modulem_3hj8x2bw9pkq
Functionf_7k9m2npqrstv
Classc_z4w7n5q2gxht
Methodmt_5v8b3kxq2nhp
Constructorctor_9m4z7x2qhwjt

Short sequential IDs are accepted in tests/, docs/, and examples/. Use calor fix --compact-ids for a reversible legacy-ULID migration rather than regenerating IDs:

Bash
calor fix src/ --compact-ids --log compact-ids.json

Suggested Workflow

Bash
# Compact authoring form is valid
calor -i src/app.calr -o generated/app.g.cs

# Materialize persistent IDs when external tools need them
calor ids assign src/ --dry-run
calor ids assign src/

# Validate in CI and generate an index for navigation tools
calor ids check src/
calor ids index src/ --output calor.ids.json

See Also