brainstorming
Structured design dialogue that validates ideas before implementation begins.
law-machine-readable-interpreter
Interprets legal text in regelrecht YAML files and generates machine-readable execution logic with parameters, operations, outputs, and cross-law references. Use when user wants to make a law executable, add machine_readable sections, or interpret legal articles for computational execution.
Full skill instructions
Analyzes legal text in YAML files and generates complete machine_readable execution logic.
regulation/nl/machine_readable sections with:
competent_authority - who has binding authorityrequires - dependencies on other laws/regulationsdefinitions - constants and fixed valuesexecution section containing:
produces - legal character and decision typeparameters - caller-provided inputsinput - data from other sourcesoutput - what this article producesactions - operations and logicThe schema has NO public or endpoint fields. The machine_readable section structure is:
machine_readable:
competent_authority: # Who has binding authority
name: "Belastingdienst"
type: "INSTANCE" # or "CATEGORY" (default: INSTANCE)
requires: # Dependencies (optional)
- law: "Zorgverzekeringswet"
values: ["is_verzekerd"]
definitions: # Constants (optional)
VERMOGENSGRENS:
value: 15485900
execution:
produces: # Legal character (optional)
legal_character: "BESCHIKKING" # or TOETS, WAARDEBEPALING, BESLUIT_VAN_ALGEMENE_STREKKING
decision_type: "TOEKENNING" # or AFWIJZING, GOEDKEURING, AANSLAG, etc.
parameters: # Caller-provided inputs
- name: "bsn"
type: "string"
required: true
input: # Data from other sources
- name: "toetsingsinkomen"
type: "amount"
source:
regulation: "awir" # Name of the law/regulation
output: "toetsingsinkomen" # Output field to retrieve
parameters:
bsn: "$bsn"
output: # What this produces
- name: "heeft_recht"
type: "boolean"
actions: # Computation logic
- output: "heeft_recht"
operation: "GREATER_THAN_OR_EQUAL"
subject: "$leeftijd"
value: 18
When user asks to "interpret" or "make executable" a law:
regulation/nl/ for the law fileFor each article in the articles array:
Read the legal text in the text field
Identify if it's executable:
machine_readable sectionExtract key elements:
Determine who has binding authority for the decision:
competent_authority:
name: "Belastingdienst/Toeslagen"
type: "INSTANCE" # Specific organization
Or for categories (must be resolved per context):
competent_authority:
name: "gemeente"
type: "CATEGORY" # Abstract category, resolved at runtime
Look for inputs that must be provided by the caller:
Common parameters:
bsn (string) - Citizen service numberpeildatum (date) - Reference datejaar (number) - Yearbedrag (amount) - AmountExample from text:
"Een persoon heeft recht op zorgtoeslag indien hij de leeftijd van 18 jaar heeft bereikt"
→ Needs bsn to look up person's age
YAML output:
parameters:
- name: "bsn"
type: "string"
required: true
description: "Burgerservicenummer van de persoon"
Look for fixed values mentioned in the text:
Example from text:
"De grens bedraagt € 154.859 voor een alleenstaande"
YAML output:
definitions:
VERMOGENSGRENS_ALLEENSTAANDE:
value: 15485900 # Converted to eurocent!
description: "Vermogensgrens voor alleenstaande personen"
Monetary Conversion Rules:
Look for references to other laws or articles:
Patterns to detect:
[text](https://wetten.overheid.nl/BWBR...)Source Structure:
input:
- name: "is_verzekerd"
type: "boolean"
source:
regulation: "zorgverzekeringswet" # Law identifier
output: "is_verzekerd" # Output field name
parameters:
bsn: "$bsn"
description: "Verzekerd ingevolge de Zorgverzekeringswet"
For external data (not from another law):
input:
- name: "geboortedatum"
type: "date"
source:
output: "geboortedatum" # No regulation = external data source
description: "Geboortedatum uit BRP"
If external law not found in repo:
input:
- name: "is_verzekerd"
type: "boolean"
source:
# TODO: Implement zorgverzekeringswet
regulation: "zorgverzekeringswet"
output: "is_verzekerd"
parameters:
bsn: "$bsn"
Identify what the article produces:
Data types available:
string - Text valuesnumber - Numeric valuesboolean - True/falseamount - Monetary values (in eurocent)date - Date valuesobject - Complex structuresarray - ListsWith type specifications:
output:
- name: "zorgtoeslag_bedrag"
type: "amount"
type_spec:
unit: "eurocent"
description: "Het bedrag van de zorgtoeslag"
With temporal metadata:
output:
- name: "toetsingsinkomen"
type: "amount"
temporal:
type: "period"
period_type: "year"
Convert legal conditions to operations:
Available Operations:
| Category | Operations |
|---|---|
| Arithmetic | ADD, SUBTRACT, MULTIPLY, DIVIDE, MIN, MAX |
| Comparison | EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN_OR_EQUAL |
| Logical | AND, OR, NOT |
| Membership | IN, NOT_IN |
| Null check | NOT_NULL |
| Conditional | IF |
| Iteration | FOREACH |
| Date | SUBTRACT_DATE |
| String | CONCAT |
Common Legal Patterns → Operations:
| Legal Text | Operation |
|---|---|
| "heeft bereikt de leeftijd van 18 jaar" | GREATER_THAN_OR_EQUAL, subject: $leeftijd, value: 18 |
| "niet meer bedraagt dan X" | LESS_THAN_OR_EQUAL |
| "ten minste X" | GREATER_THAN_OR_EQUAL |
| "indien ... en ..." | AND with values array |
| "indien ... of ..." | OR with values array |
| "niet ..." | NOT |
| "gelijk aan" | EQUALS |
Simple comparison:
actions:
- output: "is_volwassen"
operation: "GREATER_THAN_OR_EQUAL"
subject: "$leeftijd"
value: 18
Multiple conditions (AND/OR):
actions:
- output: "voldoet_aan_voorwaarden"
operation: "AND"
values:
- operation: "EQUALS"
subject: "$is_verzekerd"
value: true
- operation: "GREATER_THAN_OR_EQUAL"
subject: "$leeftijd"
value: 18
Conditional with if-then-else (using conditions array):
actions:
- output: "toeslag_percentage"
conditions:
- test:
operation: "EQUALS"
subject: "$huishouden_type"
value: "alleenstaand"
then: 100
else: 50
Conditional with IF operation:
actions:
- output: "resultaat"
operation: "IF"
test:
operation: "GREATER_THAN"
subject: "$inkomen"
value: 50000
then: 0
else: "$berekend_bedrag"
Calculation chain:
actions:
- output: "premie_basis"
operation: "MULTIPLY"
values:
- "$standaardpremie"
- "$percentage"
- output: "premie_na_korting"
operation: "SUBTRACT"
values:
- "$premie_basis"
- "$korting"
Date calculation:
actions:
- output: "leeftijd"
operation: "SUBTRACT_DATE"
values:
- "$peildatum"
- "$geboortedatum"
Resolve from ministeriele regeling:
actions:
- output: "standaardpremie"
resolve:
type: "ministeriele_regeling"
output: "standaardpremie"
match:
output: "jaar"
value: "$jaar"
For important computations, add legal_basis to trace back to the law:
actions:
- output: "heeft_recht"
operation: "AND"
values:
- "$is_verzekerd"
- "$is_volwassen"
legal_basis:
law: "Wet op de zorgtoeslag"
bwb_id: "BWBR0018451"
article: "2"
paragraph: "1"
url: "https://wetten.overheid.nl/BWBR0018451#Artikel2"
explanation: "Lid 1 bepaalt de voorwaarden voor recht op zorgtoeslag"
If the article produces a formal decision:
execution:
produces:
legal_character: "BESCHIKKING" # Individual decision
decision_type: "TOEKENNING" # Grant/approval
Legal character options:
BESCHIKKING - Individual administrative decisionTOETS - Check/verificationWAARDEBEPALING - Value determinationBESLUIT_VAN_ALGEMENE_STREKKING - General binding decisionDecision type options:
TOEKENNING - GrantAFWIJZING - RejectionGOEDKEURING - ApprovalAANSLAG - Tax assessmentALGEMEEN_VERBINDEND_VOORSCHRIFT - General binding regulationBELEIDSREGEL - Policy ruleVOORBEREIDINGSBESLUIT - Preparatory decisionANDERE_HANDELING - Other actionLegal text:
Artikel 2
1. Een persoon heeft recht op zorgtoeslag indien hij:
a. de leeftijd van 18 jaar heeft bereikt;
b. verzekerd is ingevolge de Zorgverzekeringswet.
Complete machine_readable section:
machine_readable:
competent_authority:
name: "Belastingdienst/Toeslagen"
requires:
- law: "Zorgverzekeringswet"
values: ["is_verzekerd"]
execution:
produces:
legal_character: "BESCHIKKING"
decision_type: "TOEKENNING"
parameters:
- name: "bsn"
type: "string"
required: true
description: "Burgerservicenummer"
- name: "peildatum"
type: "date"
required: true
description: "Datum waarop het recht wordt getoetst"
input:
- name: "geboortedatum"
type: "date"
source:
output: "geboortedatum"
description: "Geboortedatum uit BRP"
- name: "is_verzekerd"
type: "boolean"
source:
# TODO: Implement zorgverzekeringswet
regulation: "zorgverzekeringswet"
output: "is_verzekerd"
parameters:
bsn: "$bsn"
output:
- name: "leeftijd"
type: "number"
type_spec:
unit: "years"
- name: "heeft_recht"
type: "boolean"
description: "Geeft aan of de persoon recht heeft op zorgtoeslag"
actions:
- output: "leeftijd"
operation: "SUBTRACT_DATE"
values:
- "$peildatum"
- "$geboortedatum"
legal_basis:
article: "2"
paragraph: "1"
explanation: "Leeftijd bepaald op peildatum"
- output: "heeft_recht"
operation: "AND"
values:
- operation: "GREATER_THAN_OR_EQUAL"
subject: "$leeftijd"
value: 18
- operation: "EQUALS"
subject: "$is_verzekerd"
value: true
legal_basis:
article: "2"
paragraph: "1"
explanation: "Voorwaarden a en b van lid 1"
For each article that needs a machine_readable section:
url fieldBefore reporting, validate the updated YAML:
Step 13a: Run YAML linting
uv run yamllint {LAW_FILE_PATH}
This checks for:
Step 13b: Run schema validation
uv run python script/validate.py {LAW_FILE_PATH}
This validates against the JSON schema.
If validation fails:
output field in sourceAfter schema validation passes, verify that every element in the machine_readable section can be traced back to the original legal text.
For each element, check:
Definitions/Constants:
Input fields:
Output fields:
Actions/Operations:
Conditions:
Decision matrix:
| Traceable in text? | Needed for logic? | Action |
|---|---|---|
| YES | YES | Keep |
| YES | NO | Keep (may be informational) |
| NO | YES | Report as assumption |
| NO | NO | Remove |
Example check:
# Article text: "Een persoon heeft recht indien hij 18 jaar is"
# GOOD - traceable:
- output: "heeft_recht" # ✓ "heeft recht" in text
operation: "GREATER_THAN_OR_EQUAL"
subject: "$leeftijd"
value: 18 # ✓ "18 jaar" in text
# BAD - not traceable (hallucinated):
- output: "woont_in_nederland" # ✗ Not mentioned in article
operation: "EQUALS"
subject: "$woonland"
value: "NL"
# → REMOVE THIS
After reverse validation:
After successful validation:
Count processed articles:
List TODOs:
List Assumptions (from reverse validation):
Report to user:
Interpreted {LAW_NAME}
Articles processed: {TOTAL}
Made executable: {EXECUTABLE_COUNT}
Schema validation: PASSED
Reverse validation: PASSED
Assumptions (need review):
- Article 2: Added "peildatum" parameter (implied but not stated)
- Article 3: Assumed "inkomen" refers to toetsingsinkomen
TODOs remaining:
- Download and interpret: {external_law_1}
- Clarify calculation in article {X}
The law is now executable via the engine!
input:
- name: "geboortedatum"
type: "date"
source:
output: "geboortedatum"
description: "Geboortedatum uit BRP"
actions:
- output: "leeftijd"
operation: "SUBTRACT_DATE"
values:
- "$peildatum"
- "$geboortedatum"
- output: "is_volwassen"
operation: "GREATER_THAN_OR_EQUAL"
subject: "$leeftijd"
value: 18
definitions:
INKOMENSGRENS:
value: 7954700 # € 79.547 in eurocent
input:
- name: "toetsingsinkomen"
type: "amount"
source:
regulation: "awir"
output: "toetsingsinkomen"
parameters:
bsn: "$bsn"
jaar: "$jaar"
actions:
- output: "onder_inkomensgrens"
operation: "LESS_THAN_OR_EQUAL"
subject: "$toetsingsinkomen"
value: "$INKOMENSGRENS"
actions:
- output: "voldoet_aan_voorwaarden"
operation: "AND"
values:
- operation: "EQUALS"
subject: "$is_verzekerd"
value: true
- operation: "GREATER_THAN_OR_EQUAL"
subject: "$leeftijd"
value: 18
- operation: "EQUALS"
subject: "$woont_in_nederland"
value: true
actions:
- output: "premie_basis"
operation: "MULTIPLY"
values:
- "$standaardpremie"
- "$percentage"
- output: "premie_na_korting"
operation: "SUBTRACT"
values:
- "$premie_basis"
- "$korting"
- output: "premie_finaal"
operation: "MAX"
values:
- 0
- "$premie_na_korting"
actions:
- output: "vermogensgrens"
conditions:
- test:
operation: "EQUALS"
subject: "$heeft_partner"
value: true
then: "$VERMOGENSGRENS_PARTNERS"
else: "$VERMOGENSGRENS_ALLEENSTAANDE"
actions:
- output: "standaardpremie"
resolve:
type: "ministeriele_regeling"
output: "standaardpremie"
match:
output: "jaar"
value: "$jaar"
toetsingsinkomen not incomeregulation/nl/# TODO: comments for missing refsIf legal text is ambiguous:
If external law not found:
If operation unclear:
Structured design dialogue that validates ideas before implementation begins.
Comprehensive design intelligence for web and mobile UI/UX across 10 technology stacks.
Comprehensive implementation plans for multi-step tasks, breaking down specs into bite-sized, testable steps.
Introduction to the obra skills system with mandatory skill invocation rules and best practices.
Execute a written implementation plan with critical review and task checkpoints.
Delegate independent tasks to specialized agents working concurrently with isolated context.
Isolated git worktrees with smart directory selection and safety verification.
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
Plan searchable and shareable content that drives traffic, builds authority, and generates leads.
README-first repository scanner that extracts commands and classifies reproduction candidates without executing them.
Brainstorm and prioritize marketing strategies tailored to your SaaS stage, budget, and goals.
Plan and optimize your website's page hierarchy, navigation, URL structure, and internal linking.
The world's fastest calendar for remote work
Capture, organize, and utilize your knowledge effortlessly.
Instant Summaries of Audio & Video Interviews with AnySummary
Transform PDFs into engaging mind maps.
Chat with any PDF instantly
Create an optimal daily plan using your voice
A productivity platform to centralize organizational knowledge and workflows with contextual AI assistance.
AskYourPDF Pricing Plans: Tailored to Your Needs