Skip to Content
Numinance
CLI

numi validate

Schema-check kind documents with the open build. The difference between --files and repository mode, why exit 7 is not a pass, JSON output, limits and refusals.

View as .mdUpdated
Pre-alpha

The open build checks schemas and loader rules. Profile resolution and floors need the private engine build.

A schema pass tells you a document is well formed. It does not tell you the profile resolves, that floors hold, or that the system is ready to do work.

Three checks that are easy to confuse

CheckWhat it tells youWhere it happens
Schema and loader validationEach document is well formed against the generated kind schema and the loader rulesOpen numi validate (both modes)
Profile resolutionThe profile resolves across org, repo and component scopes under floors, with provenance per fieldThe engine build's numi validate
ReadinessThe system can safely perform work with this configurationNot claimed by any public check

Synopsis

numi validate [--rev REV] [--org DIR] [--component ROOT] [--json] [path]
numi validate --files [--json] path

path is the repository (default .) in repository mode. --org is the organization policy repository. --component is a repository-relative component root such as svc/api. Flags may come before or after the path. -- ends flag parsing; everything after it is a path.

Mode 1: --files (example validator)

--files PATH checks kind documents that are not a repository. PATH is one YAML file or a directory, and every .yaml or .yml file below it is a document. Each is checked against its generated kind schema (unknown fields are errors unless under extensions:) plus the loader checks. No resolver runs. This is how the repository's just schema-check validates every shipped example.

revision: "files"
ok       file "org-baseline.yaml" SDLCProfile "org-baseline"
ok       file "payments-api.yaml" SDLCProfile "payments-api"
✓ verifiednumi validate --files schemas/examples/SDLCProfile, from the checkout root· numinance-spec @ 3c74d59 · 2026-11-09· 0

JSON output is one object:

{"status":"ok","revision":"files","documents":[{"scope":"file","path":"org-ladder.yaml","kind":"AutonomyPolicy","name":"org-ladder","status":"ok"}]}
✓ verifiednumi validate --files --json schemas/examples/AutonomyPolicy· numinance-spec @ 3c74d59 · 2026-11-09· 0

A schema failure names a path and a keyword and never a value:

revision: "files"
invalid  file "x.yaml": kind: does not match the kind schema: schema: value does not match (violations: 1): \"/spec/bogus\": additionalProperties
✓ verifieda file with an unknown field spec.bogus, human output· numinance-spec @ 3c74d59 · 2026-11-09· 3
{"status":"invalid","revision":"files","documents":[{"scope":"file","path":"x.yaml","status":"invalid","error":"kind: does not match the kind schema: schema: value does not match (violations: 1): \\\"/spec/bogus\\\": additionalProperties"}]}
✓ verifiedthe same file with --json· numinance-spec @ 3c74d59 · 2026-11-09· 3

An unknown kind is also exit 3:

revision: "files"
invalid  file "k.yaml": kind: unknown kind
✓ verifieda file containing apiVersion and kind: Nope· numinance-spec @ 3c74d59 · 2026-11-09· 3

Exit codes in --files mode

ExitMeaning
0Every document passes the schema and loader checks
3At least one document is invalid, or a refused file name or file type
4The path is missing, or holds no kind document
2Usage: no path, more than one, or combined with --rev, --org or --component
numi validate: path not found
✓ verifiednumi validate --files on a path that does not exist· numinance-spec @ 3c74d59 · 2026-11-09· 4
numi validate: --files excludes --rev, --org and --component
usage: numi validate [--rev REV] [--org DIR] [--component ROOT] [--json] [path]
       numi validate --files [--json] path
  ...
✓ verifiednumi validate --files --rev x schemas/examples· numinance-spec @ 3c74d59 · 2026-11-09· 2

(The usage block continues with the flag list; it is elided here.)

Mode 2: repository mode, ending in exit 7

Without --files, the open build reads .numinance/ of the directories given, so uncommitted edits are seen. It schema-validates every kind document of the org, repo and component trees, then exits 7 with a message that profile resolution needs the engine build.

revision: "working tree (uncommitted changes included)"
ok       repo ".numinance/policy/autonomy.yaml" AutonomyPolicy "pr-only"
ok       repo ".numinance/policy/playbook-bugfix-bounded.yaml" Playbook "bugfix-bounded"
ok       repo ".numinance/policy/sdlc-profile.yaml" SDLCProfile "python-repo"
ok       repo ".numinance/policy/stage-registry.yaml" StageRegistry "pr-only"
ok       repo ".numinance/policy/toolchain-python.yaml" LanguageToolchain "python-3.12"
numi validate: profile resolution needs the Numinance engine build
✓ verifiednumi validate on a repository scaffolded by numi init· numinance-spec @ 3c74d59 · 2026-11-09· 7
{"status":"unavailable","revision":"working tree (uncommitted changes included)","documents":[{"scope":"repo","path":".numinance/policy/autonomy.yaml","kind":"AutonomyPolicy","name":"pr-only","status":"ok"}, ... ],"error":"profile resolution needs the Numinance engine build"}
✓ verifiedthe same repository with --json· numinance-spec @ 3c74d59 · 2026-11-09· 7

(Four further documents entries are elided.) Exit 7 is deliberate: a CI that uses the open build cannot mistake a schema pass for a full one. In the open build, 7 has exactly one meaning: the schema pass succeeded and profile resolution is not available. A cancel (SIGINT, SIGTERM) exits 1, never 7. The --files mode of the same documents exits 0, which is why it is not a substitute for repository validation.

With an organization directory, the output labels each tree:

revision: "working tree (uncommitted changes included)"
ok       org ".numinance/policy/autonomy.yaml" AutonomyPolicy "pr-only"
ok       org ".numinance/policy/ci-jenkins.yaml" AdapterSelector "ci-jenkins"
...
ok       repo ".numinance/policy/sdlc-profile.yaml" SDLCProfile "python-repo"
numi validate: profile resolution needs the Numinance engine build
✓ verifiednumi validate --org ../org .· numinance-spec @ 3c74d59 · 2026-11-09· 7

--rev is refused

numi validate: the open build reads the working tree; --rev needs the engine build
✓ verifiednumi validate --rev HEAD .· numinance-spec @ 3c74d59 · 2026-11-09· 2

The open build cannot read a commit. --rev "" is the default. This keeps --rev from silently meaning something else.

What the engine build adds

OpenEngine
SourceWorking tree, uncommitted edits includedA private copy of HEAD, refs and objects; never the working tree
OutputDocument list, then exit 7Resolved profile digest and the provenance of each field, with the reason when a contribution was ignored
--filesSupportedNot available; exit 2
Exit 7Schema pass, no resolutionA dependency was unavailable
Other exits3 for a revision expression or option, a link, an object failing fsck or a repository over 1 GiB or 200000 files; 4 for an unknown revision; 8 when the 60 s run expires

Refusals and limits

Reads use os.Root, so no path escapes the directory. These are refused, with exit 3:

numi validate: file tree has a file that is not regular (a link or special file)
✓ verifieda directory containing a symbolic link to a valid example· numinance-spec @ 3c74d59 · 2026-11-09· 3
numi validate: path is not a regular file or a directory (a link is refused)
✓ verifieda path that is itself a symbolic link· numinance-spec @ 3c74d59 · 2026-11-09· 3
numi validate: file tree has a file that is not regular (a link or special file)
✓ verifieda directory containing a named pipe called p.yaml (completed without blocking)· numinance-spec @ 3c74d59 · 2026-11-09· 3
numi validate: y.YAML: a file name mentioning .yaml or .yml must end in lowercase .yaml or .yml
✓ verifieda file named y.YAML in --files mode· numinance-spec @ 3c74d59 · 2026-11-09· 3
numi validate: repo tree: a link or non-directory on the path to .numinance
✓ verifiedrepository mode where .numinance is a symbolic link· numinance-spec @ 3c74d59 · 2026-11-09· 3

Also refused: a symbolic link on the --component path, and any file that is not regular, checked on the open descriptor so a FIFO cannot block the run. In --files mode a name mentioning .yaml or .yml in any letter case but not ending exactly in lowercase .yaml or .yml (.YAML, .Yml, .yaml.bak, a trailing space) is invalid. Other names such as README.md~ are ignored. Repository mode ignores such files; --files refuses them.

Bounds across all trees: 4096 entries, 256 documents, 16 MiB total, and kindyaml.MaxBytes (128 KiB) per document. Names, paths and messages from documents are cut and escaped before printing: control, bidi and zero-width characters become \u escapes, so a name cannot pass for another. A panic or an error of no kind exits 1, never 0. An empty directory is exit 4:

revision: "files"
numi validate: no kind documents found
✓ verifiednumi validate --files on an empty directory· numinance-spec @ 3c74d59 · 2026-11-09· 4

What a pass means

A --files pass means the input conforms to its schema and loads. A repository-mode schema pass followed by exit 7 means the same thing for every tree, and that nothing more ran. Neither checks floors, nor that a provider is installed, nor that the configuration is safe. A produced kind (ContextBundle) is never loaded as configuration; --files checks it against its own strict schema instead, and leaves its other constraints to the producer.

The open CLI does not claim to detect every misconfiguration, and it does not run the engine.

Troubleshooting

MessageCause
--files needs exactly one pathNo path, or several
no kind documents foundEmpty directory, or no .yaml/.yml file
kind: unknown kindkind is not a known kind
additionalProperties at a pathAn unknown field outside extensions:
Exit 7 in CIExpected in the open build; gate on the engine build for full validation

Next steps

On this page