agentleFS
OKHP3OKHP3/skillz/.agents/skills/okhp3-decision-model-authoring/SKILL.md

okhp3-decision-model-authoring

Skill3 starsChanged 2 months agoMITView on GitHub

Author and validate decision models from PNS decision points using DMN-aligned rule tables. Use this skill when the PNS contains three or more gateway decision points that warrant a structured decision table; when the user asks to document business rules as decision logic, build a DMN table, or make decision criteria explicit. This is a recommended extension skill triggered automatically when visual-process-modeling identifies three or more gateways. Produces a decision-model YAML and a human-readable DMN rule table.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do not model decisions before the PNS is validated (score ≥ 75)

    line 59
  2. Very specific:

    Read pns.decision_points[] and group by the activity_id where they occur.

    line 83
  3. Very specific:

    Every decision_id must match a pns.decision_points[].id.

    line 106
  4. Very specific:

    Use decision_id values as gateway label annotations in the bpmn-beta.mmd diagram.

    line 131

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

okhp3-decision-model-authoring

OverKill Hill P³ · overkillhill.com · github.com/OKHP3

Purpose

Transform PNS decision_points into structured DMN-aligned decision models. Each decision point becomes a decision table with explicit input conditions, output values, and the business rule governing the routing logic.


When to use this skill

  • PNS has ≥3 decision_points — this is the mandatory trigger condition
  • User needs a decision table to communicate routing logic to implementers
  • Business rules are complex enough that prose descriptions are insufficient
  • Preparing a decision catalog as part of governance documentation

When NOT to use this skill

  • PNS has fewer than 3 decision_points — inline the logic in the PNS decision_points[] section
  • Decision logic is trivially binary (yes/no) with no business rule — document in business_rules[] instead
  • Do not model decisions before the PNS is validated (score ≥ 75)

DMN Table Structure

Each decision table entry has:

FieldDescription
decision_idStable identifier matching pns.decision_points[].id
decision_nameHuman-readable label
activity_idThe PNS activity where this decision occurs
hit_policyU (Unique) | F (First) | A (Any) | C (Collect)
inputs[]Each input: name, type (string|number|boolean), values[]
outputs[]Each output: name, type, values[]
rules[]Each rule: id, conditions{}, output{}, annotation

Authoring Workflow

Step 1 — Extract decision points

Read pns.decision_points[] and group by the activity_id where they occur.

Step 2 — Identify inputs and outputs

For each decision:

  • Inputs — the data values or conditions being evaluated (from criteria)
  • Outputs — the possible routing outcomes (from outcomes[].label)

Step 3 — Select hit policy

SituationHit policy
Exactly one rule fires per input combinationU (Unique)
Rules are ordered; first match winsF (First)
Multiple rules can fire but give the same outputA (Any)
Multiple rules can fire and outputs are aggregatedC (Collect)

Step 4 — Write rules

For each combination of input values, specify the output. Mark any unhandled combination as FAIL — do not silently default.

Step 5 — Validate traceability

Every decision_id must match a pns.decision_points[].id. Every output value must match a pns.decision_points[].outcomes[].label.


DMN Table Markdown Format

## Decision: Approve PO Request (gw-001)

Hit policy: **U** (Unique)

| Amount | Requester Level | → Outcome |
|---|---|---|
| ≤ 1000 | any | Auto-approve |
| > 1000 | manager | Manual review |
| > 1000 | staff | Escalate to Director |
| > 10000 | any | Board approval required |

Handoff Instruction

Pass decision-model.yaml and dmn-table.md to publication-and-handoff-packaging for bundle assembly.

Use decision_id values as gateway label annotations in the bpmn-beta.mmd diagram.


References

Load on demand:

  • references/dmn-modeling-rules.md — hit policy selection rules, input/output type definitions, and traceability requirements

Scripts

  • scripts/validate-decision-model.mjs — validates decision model structure, hit policy completeness, and PNS traceability

Assets

  • assets/fixtures/decision-model-example.yaml — canonical decision model for purchase-approval gateway logic

About

Built by Jamie Hill · OverKill Hill P³ Published at github.com/OKHP3 Part of the OKHP3/skillz Agent Skill library. MIT License -- free to use, fork, and adapt. A nod to the source is appreciated.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.