Skip to main content

rdra-ish

rdra-ish keeps requirements and design in one typed model, from the business value a system serves down to its APIs, data, and state transitions, so you can check that each layer is consistent with the layer that motivates it.

You write the model as code in a small DSL. The CLI type-checks it, finds gaps between layers, and projects the same model into diagrams, review CSVs, state tables, and exports such as OpenAPI, DBML, and TLA+.

What is RDRA?

RDRA (Relationship-Driven Requirements Analysis) is a requirements modeling approach that treats a system as a graph of typed elements (actors, businesses, BUCs, use cases, screens, entities, and so on) linked by explicit predicates such as performs, contains, and creates. The idea is to move from business-facing intent toward design review in one model: each layer on the left explains why the layer on the right exists.

This tool implements RDRA-ISH (RDRA-inspired Implementation and System Heuristics). It follows RDRA’s relationship-first style but is not a strict copy of the original method. It adds vocabulary for system boundaries, APIs, access constraints, and entity lifecycle so the same model can support check, diagrams, CSV reviews, and state derivation.

For how RDRA-ISH reads BUC, business flow, and use case, see RDRA-ish Interpretation.

The model follows a review spine: requirements, business, interaction, system boundary, data, then lifecycle and rules. The Language Reference is organized the same way, and every kind in the language names the check or output that reviews it.

Command Reviews
check, lint Type errors, unresolved references, and gaps between layers
next The refinement stage of each BUC, the gaps that block the next stage, and its questions
diagram The RDRA 3.0 diagrams as Mermaid text for a reader that redraws them: system context, requirements, business, robustness, sequence, UC複合図, business flow, screen transitions, information, conditions, state, events, ER, and the whole RDRA graph
csv, list CRUD matrix, permission audit, and element metadata
states Reachable entity states and state rule violations
export, verify OpenAPI, DBML, JSON Schema, AsyncAPI, and TLA+ with TLC

Refine the model in small stages instead of filling every layer at once. After each stage, run rdra-ish check on the current src/ tree and use diagrams or CSV output to review only the concern you just added (scope, screens, data touchpoints, API and access boundaries, structure, lifecycle, rules). rdra-ish next src/ tells you which stage each BUC has reached, which elements block the next stage, and which questions to ask next.

See Incremental Modeling Flow for stage goals, placement rules, and validation commands. For a worked example across seven steps, use samples/incremental-order.

Installation

uv tool install rdra-ish
rdra-ish --help

rdra-ish follows semantic versioning from 1.0.0. Compatibility lists what a minor or patch release keeps: a model that loads keeps loading, and check and verify give it the same verdict within the same printed bounds.

Upgrading a model written for 0.4.x: run python3 scripts/migrate-syntax-v3.py <model dir>, then rdra-ish check. The v1.0.0 notes list the rewritten forms and the verdicts that change.

Quick Start

# 1) Validate model consistency, and see the next refinement stage of each BUC
rdra-ish check samples/ec-site
rdra-ish next samples/ec-site

# 2) Generate diagrams for review
rdra-ish diagram samples/ec-site --kind context --format mermaid
rdra-ish diagram samples/ec-site --kind usecase --format mermaid --buc BucOrder
rdra-ish diagram samples/clinic-ops --kind flow --format mermaid --buc BucVisitCheckIn

# 3) Export coverage/access views (-o out writes out.matrix.csv, out.actor-permission-audit.csv)
rdra-ish csv samples/clinic-ops --kind matrix
rdra-ish csv samples/clinic-ops --kind actor-permission-audit

# 4) Derive reachable states
rdra-ish states samples/clinic-ops --entity Appointment

# 5) Formal verification (requires `tlc` or `tlc2` on PATH)
rdra-ish export samples/formal-verification/order.rdra --kind tla -o /tmp/rdra-tla
rdra-ish verify samples/formal-verification/order.rdra --backend tlc -o /tmp/rdra-tla

What You Can Review

  • Structure consistency: type errors, unresolved references, duplicate definitions.
  • Coverage: actor/use-case/API/entity links and CRUD matrix gaps.
  • Access design: required permissions/media and actor-permission mismatches.
  • State design: unreachable variants, missing creation paths, state rule violations.
  • Boundary design: API/system/event inconsistencies and orphaned nodes.

Learning Path

  1. Incremental Modeling Flow + samples/incremental-order
  2. Look up syntax in Language Reference only as needed
  3. Install agent skills from skills/README.md (rdra-ish-write, rdra-ish-review)

Main Documents

Samples

  • samples/incremental-order: seven-step refinement walkthrough
  • samples/ec-site: compact end-to-end sample
  • samples/clinic-ops: larger model with APIs, events, and access constraints, with a generated design document (design-doc.md) and PRD (prd.md)
  • samples/patent-ops, samples/food-permit-ops, samples/insurance-claim-ops: three Japanese business domains (a company's patent work, a 保健所's food business permits, a non-life insurer's motor claims), modeled from primary sources and passing verify --deny-undecided
  • samples/personal-info: personal data management sample
  • samples/api-contract: API contract metadata and the OpenAPI export
  • skills/rdra-ish-verify/samples: TLA+/TLC examples (also linked from samples/formal-verification/ and, for a model that must fail, samples/formal-verification-fail/; check files individually)

Development

The dev environment is a Nix flake. It provides the Rust toolchain, maturin, uv, Java, TLC, Node.js, and pre-commit.

nix develop          # or `direnv allow` with nix-direnv
cargo test --all
nix build            # builds the rdra-ish CLI into ./result

CI runs every step inside the same nix develop shell.

The files in samples/formal-verification/ are symlinks into skills/rdra-ish-verify/samples/. On Windows, clone with git clone -c core.symlinks=true (Developer Mode or an elevated shell), or Git writes each one as a text file that holds the link target.

Publish (maintainers)

uv tool install maturin
uvx maturin build --sdist
uvx maturin publish

Project Layout

crates/
  rdra-ish-syntax/   Lexer, parser, AST, removed-form table
  rdra-ish-core/     Semantic model, type checks, state derivation
  rdra-ish-emit/     Mermaid/CSV/state/TLA+ emitters
  rdra-ish-cli/      rdra-ish command
  rdra-ish-lsp/      Language server
editors/vscode/      VS Code extension for the language server
docs/                Language, CLI, state derivation, verification, compatibility
skills/              Agent skills
samples/             Example models (see Samples)
scripts/             Migration scripts, sample artifact and verification checks

License

MIT

Metadata

Release files for rdra-ish 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rdra-ish 1.2.0
File Size Uploaded Provenance Actions
rdra_ish-1.2.0.tar.gz 3.2 MB With provenance Details for rdra_ish-1.2.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for rdra-ish 1.2.0
File Interpreter ABI Platform Actions
rdra_ish-1.2.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for rdra_ish-1.2.0-py3-none-win_amd64.whl
rdra_ish-1.2.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for rdra_ish-1.2.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
rdra_ish-1.2.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for rdra_ish-1.2.0-py3-none-macosx_11_0_arm64.whl

Total release size: 13.1 MB

Release files / rdra_ish-1.2.0.tar.gz

Download URL rdra_ish-1.2.0.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
3f0ba984c8a5dfc1b07c4d2b313bde860760d791524471ac2915f97e8694bf1b
BLAKE2b-256 checksum
How to use checksums
790a6cdd551e6ba1935f0fcd56c5cb3600e477059d03fcc4062581277b40f8a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / rdra_ish-1.2.0-py3-none-win_amd64.whl

Download URL rdra_ish-1.2.0-py3-none-win_amd64.whl
Size 3.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
aca1c41acace6979c57da75f4de1f4eb52ca5bd9e4114eec5187025bfb0b1fca
BLAKE2b-256 checksum
How to use checksums
f9cf2e66634dfe8797aa6ce14b7e1c985045614824eae3c1db84c53de3c39ee9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / rdra_ish-1.2.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL rdra_ish-1.2.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 3.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
0c6c8c3c421f40fb25cc9b1e664e0c7cccbed4943ccdca825e214c9dd841a3b4
BLAKE2b-256 checksum
How to use checksums
e93cd66bff605d05eedb1a1d0635c3276288c12f8eace85e6534c81037c7f38a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Release files / rdra_ish-1.2.0-py3-none-macosx_11_0_arm64.whl

Download URL rdra_ish-1.2.0-py3-none-macosx_11_0_arm64.whl
Size 3.2 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7b5173e53f6a4b8311c90038812c6db1acb0949d52f56c37f7fd9fd373e0923e
BLAKE2b-256 checksum
How to use checksums
33d3e45441899c8dae3df70161b3b45f6e9b8847b537252cc11ce8fd0196f8e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

Security for rdra-ish 1.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for rdra_ish-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 5, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page