omp packages

@srobroek/pi-business-rules1.0.0

Business rules for any project: where the logic lives, host-code guards and adapters, the CEL adoption standard, rule tests, the rules CI gate, and CEL authoring skills adapted from cel-expr/skills.

srobroek Published 3 days ago Apache-2.0 ~0 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

business-rules

Skills for business rules in any project. They cover where a rule lives, how to code it, and the standard for a project that adopts CEL. A rule lives in inline code or a named guard. It can also be data, or sit in a policy engine.

Install

Install the Pi package from npm:

pi install npm:@srobroek/pi-business-rules

OpenCode:

opencode plugin add 'github:srobroek/harness-plugins::path:plugins/business-rules/opencode'

Claude Code installs the same skills from this repository's marketplace:

claude plugin install business-rules@harness-plugins

Skills

OpenCode shows only business-rules-guide to the model. The other skills set opencode/autoinvoke: false, and the guide loads them by id. Claude Code ignores that metadata, so it shows every skill.

The plugin registers these skills from skills/, unless a skill with the same id already exists:

  • business-rules-guide: where business logic lives, the signs that logic must become data, and a decision list over engines, with upstream sources from 2026-11.

    • The places are inline code and named guards, data-driven rules, and a policy engine.
    • The engines are CEL, Rego and Cedar.
    • The engines also include JSONata, JSON Logic and expr-lang.
    • The last two are Starlark and plain code.
  • business-rules-code: named guards, rule tables that code reads, and the adapter around a rule engine. The adapter guidance covers one adapter per runtime, checking at load and no silent pass. It also covers error values versus exceptions, explanations, and one rule in one place.

  • business-rules-cel: the CEL adoption standard in four layers.

    • The general rules apply to every project.
    • The portability profile for protobuf covers rules that cross processes or languages.
    • The cel-policy profile covers rule lists.
    • The engine and tooling choices carry the date 2026-11.

    The skill also covers these topics:

    • The pipeline from TypeSpec to a checked bundle.
    • Structural scopes and presence.
    • references/, with one file per language (Python, Go, Rust, TypeScript). Each file has the packages to use and their gotchas.
    • references/, also with the gotchas for every engine and the tools.
    • The rule formats. They are cel-policy files, expressions in config and the bundle. They also cover versioning and YAML hygiene.
  • business-rules-testing: the rule test suite. It covers table-driven cases in one JSON file per scope. It also covers the supported-profile gate by engine role. It lists the cases every project needs:

    • Wrong fields per scope.
    • Presence.
    • Bundle tampering.
    • The effective environment.
    • Descriptor-set bytes.
    • The JCS vector.
    • Standalone expressions.
    • Policies.

    It shows how to run them under pytest and go test. It also covers cargo test and vitest.

  • business-rules-ci: the CI jobs.

    • Environment drift.
    • The reference checker over every rule file.
    • Bundle digest verification.
    • The per-engine suites.
    • Conformance against a failure baseline.
    • Engine pins, with a new run on each bump.

    It has a mise.toml and justfile layout and a GitHub Actions workflow with pinned actions. It also has a table of what runs on a laptop and what runs in CI.

  • business-rules-cel-authoring, business-rules-cel-debugging and business-rules-cel-testing: write, fix and test one expression with the cel-expr CLI, against the project's generated environment. Each one stops if no generated environment covers the scope.

Vendored skills

The three business-rules-cel-* skills come from the cel-authoring, cel-debugging and cel-testing skills of cel-expr/skills, at commit a41927f7d836d3e2eeec6c809b66fa444093427a, under the Apache License 2.0. The plugin adapted them. Each skill directory has a NOTICE file with the upstream source and the list of changes. The main change replaces upstream's step that creates an environment: these skills read the generated one.

Of upstream's six skills, the plugin vendors these three. cel-optimize would add Java to the toolchain. cel-conformance-testing and cel-doc-generator serve the authors of CEL engines.