@chiyigo/governance-kernel
v0.12.1
Published
A typed, machine-checkable AI-governance kernel: governance states, gate evidence, and rule accounting become checkable and diffable.
Readme
@chiyigo/governance-kernel
A typed, machine-checkable AI-governance kernel: governance states, gate evidence, and rule accounting become checkable and diffable.
Status
Status: source is public at https://github.com/chiyigo/governance-kernel. Distribution channel: npm (@chiyigo/governance-kernel); a version counts as released only when it appears on the npm registry.
Properties
- Deterministic CLI: the same canonical argv and input file bytes produce byte-identical output.
- Fail-closed by construction: schema-invalid input is never judged; missing evidence is non-compliance, not a skipped check.
- First-class rejected-review and multi-round review-history accounting over caller-supplied accounts; an absent account keeps prior behavior, byte-identical.
- External-action authorization accounting over a caller-supplied account (GK-008 slices), machine-checked via XA codes.
- Carries a 22-rule seed registry; the pending and manual rules are carried as accounting only and are never asserted to be checker-backed.
Dogfood evidence
Self-hosting dogfood evidence: the kernel encoded and judged its own multi-axis gate history, and its rejected-review and review-history closure judgement matched the ground-truth outcome. This is internal dogfood evidence, not an external effectiveness claim.
The kernel judges the encoded gate-history artifacts, not the project's governance history itself; encoding fidelity to what actually happened is the caller's responsibility and is never machine-verified in this axis.
Install
npm install @chiyigo/governance-kernel(after publication — see Status above)
CLI usage
governance check transition --task <task.json> --from <state> --to <state>
governance check gate-log <gate-log.json> --task <task.json>
governance check artifact <artifact.json> --kind <artifact_type>
governance check matrix <task.json> # L×R derivation + required path
governance check rules <task.json> # rule checker over the seed registry
governance check parity <declarations.json> # policy parity over the seed registry
governance check project <task.json> --profile <profile.json> # project-profile tightening over the task bundle
governance check taxonomy <declaration.json> # placement discipline over the declared corpusExit codes:
| Situation | Exit | Output |
| --- | --- | --- |
| Check passed / report produced (warnings do not block) | 0 | result document |
| Negative judgement: transition violation, blocked verdict, artifact schema failure | 1 | result document or error envelope |
| Input file well-formed JSON but schema-invalid (fail-closed "cannot judge") | 1 | error envelope |
| Argv usage error (unknown command/family/flag, missing required flag, bad enum token) | 2 | error envelope (CLI_USAGE) |
| File unreadable (IO_READ_FAILED) or JSON unparseable (JSON_PARSE_FAILED) | 2 | error envelope |
Development launcher:
npx tsx src/cli/main.ts check <family> ...License: Apache-2.0.
