palimpsest-plasma is a deterministic, typed policy engine for the agentic
era. You write policies as machine-readable, deontic rules — obligations,
prohibitions, permissions over repository state — and plasma check evaluates
a repository against them exactly: same policy, same repository, same
findings, byte for byte, every time.
That precision is the point. When neural/LLM tooling operates on a codebase, something deterministic has to define what "correct" means and verify it afterwards. Plasma is that something.
-
A policy engine: typed rules in TOML or JSON, evaluated by a pure, total function over a collected fact snapshot. No clocks, no randomness, no ambient state. See engine-v0-design.adoc for the normative semantics.
-
A license/SPDX toolkit:
plasma auditchecks SPDX headers against a zone-aware license map (.plasma.toml), powered by a real SPDX expression parser;plasma init,migrate, andbadgehandle license adoption for any SPDX license. -
A fact source for agent verification:
plasma factsemits the exact JSON snapshot the evaluator sees;plasma check --format sarifemits SARIF 2.1.0 with stableplasma/<rule-id>rule identifiers.
-
Not the PMPL governance engine. The Palimpsest license (PMPL) is a separate, future project. This repo’s parser recognises Palimpsest-family SPDX identifiers, but the project itself is licensed plainly: code under MPL-2.0, documentation under CC-BY-SA-4.0.
-
Not an OCaml system. Earlier documentation described an OCaml core that was never built. The engine is Rust, implementing the design in policy-ast-v0.1.adoc, and its policy format is specified so a future formal core (OCaml/Catala) can generate or verify the same policies.
Plasma is the policy-definition and compliance-evaluation member of a planned trio for keeping automated agents honest:
-
somethings-fishy — forensic investigation of bot-inflicted damage
-
did-you-actually-do-that — verification that agents did what they claimed
The integration contract is plasma’s deterministic output: JSON findings,
SARIF results, and plasma facts snapshots (diffable before/after an agent
run).
cargo build --release
./target/release/plasma check . # evaluate against the bundled repo-hygiene policy
./target/release/plasma check . --format json
./target/release/plasma facts . # the fact snapshot the evaluator sees
./target/release/plasma policy validate plasma-engine/policies/repo-hygiene.plasma.toml
./target/release/plasma audit . # SPDX header audit (MPL-2.0 default)plasma check exits 0 when no violation at or above the severity threshold
exists (default: error), 1 otherwise — ready for CI and git hooks.
schema_version = { major = 0, minor = 1 }
id = "my-policy"
version = { major = 1, minor = 0 }
[[rules]]
id = "license-file-present"
modality = "obligation"
severity = "error"
subject = { type = "repo" }
resource = { type = "file", path = "LICENSE*" }
action = { type = "present" }
rationale = "Every repository must carry its license text."Rules bind a deontic modality (obligation, prohibition, permission) to
a subject, resource, optional condition, and action. Subjects expand over the
repository (file-pattern matches globs); conditions compose with
all/any/not. The full vocabulary and its exact semantics are in
engine-v0-design.adoc.
| Crate | Purpose |
|---|---|
|
SPDX expression lexer/parser (including Palimpsest-family identifiers),
license family types, zone auditing ( |
|
Policy AST, versioned schema loading, fact collection, the pure evaluator, and finding/report rendering. Depends on plasma-parser. |
root ( |
The CLI: |
See docs/architecture.adoc for the engine design, docs/policy-ast-v0.1.adoc for the original typed-AST design, docs/engine-v0-design.adoc for the normative v0 semantics and Catala-readiness guarantees, and TOPOLOGY.md for the project map and honest completion dashboard.
Compliance guidance builds through a local Elixir mix project at site/.
Run mix site.build from that folder to regenerate site/_site. The GitHub
Actions workflow in .github/workflows/nimble-site.yml deploys the pages.
Code is licensed under the Mozilla Public License 2.0 (see LICENSE).
Documentation is licensed under CC-BY-SA-4.0 (see LICENSES/CC-BY-SA-4.0.txt).
Every file carries an SPDX header; NOTICE has the details.
Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>