← ClaudeAtlas

morphirlisted

Translate pure business/decision logic (Scala, Java, or similar) into Morphir IR via hand-authored Elm, then verify the translation with a hand-traced decision table against the source code. Trigger on: "model this in Morphir", "translate this logic to Morphir IR", "morphir-elm", "decision table verification", "verify this Elm model against the source", "morphir-elm make/gen/develop", or when a codebase's pure rule/eligibility/comparison logic needs a formal, language-agnostic representation for review or downstream generation. Covers `morphir.json` project shape, `morphir-elm` CLI subcommands and their traps, and the decision-table technique for verifying an Elm model's behavior matches its source — a fixture-based equivalence check, not exhaustive state-space search. Do not use for parsing/checking a domain spec's own syntax (that's a spec-authoring tool's job, not this skill's), for exhaustive state-space model-checking of a specification (see `alloy-structural-analysis` if that toolchain is available — a
tkolleh/skills · ★ 1 · AI & Automation · score 78
Install: claude install-skill tkolleh/skills
# Morphir Translates pure business/decision logic into [Morphir](https://morphir.finos.org/) IR by hand-authoring an equivalent Elm model, then verifies the translation is behaviorally faithful using a hand-traced decision table — not by trusting `morphir-elm gen`/`test`/`develop` round-trips, which are not reliable correctness signals for this purpose (see Phase 3). This is a narrower, complementary technique to exhaustive state-space model-checking (e.g. an Alloy-based toolchain, if one is part of the project's workflow): it doesn't search a state space for a counterexample to a claimed property, it checks that a hand-authored model produces the same output as the source code on a curated set of concrete fixtures. That's a weaker guarantee in the abstract (untested inputs are unverified) but a much cheaper and more approachable one to produce and review by hand, and it's the right tool when the actual goal is "does this Elm model faithfully represent this Scala/Java function," not "does this system ever reach a bad state." Work phases **A → D** in order. --- ## Phase A — Scope: pure logic only Before modeling anything, confirm the candidate function is actually pure — no I/O, no database access, no network calls, no mutable shared state. Morphir's IR and Elm's own language design both assume purity; effectful code doesn't benefit from being forced into this shape. 1. Identify candidate functions: decision/rule logic, eligibility checks, value comparison, tree/policy