Skip to content

Government · Moraph software

Tax Code "Rule-as-Code" Engine

Draft tax rules once, in a form people can review and processing systems can run

Overview

The Tax Code Rule-as-Code Engine lets tax law specialists write rules in a structured, readable format that is tied clause by clause to the statute, regulation or guidance it implements. Each rule is tested against worked examples, reviewed by counsel and released as a versioned, machine-readable package that downstream processing systems consume. The link from legal text to running logic stays visible for every version, so reviewers can see what changed and why.

The problem it solves

When tax law changes, policy specialists describe the change in documents, developers interpret those documents into code in several processing systems, and testers try to confirm the result matches the law. Each hand-off is a chance for the meaning to drift. The same rule can be implemented differently in different systems, effective dates are tracked separately from the logic, and when a question arises about why a calculation behaves as it does, tracing it back to the legal text means reading code and old requirement documents side by side.

Who it’s for

  • Tax administration agencies implementing changes to tax law and guidance
  • Tax law specialists and policy analysts who interpret new provisions
  • Counsel who review the legal reading of each rule
  • Engineering teams who maintain tax processing and forms systems
  • Testing, audit and oversight staff who need to trace logic to law

How the work flows

  1. DraftA tax law specialist opens the provision being implemented and writes the rule in a structured format of definitions, conditions, calculations and effective dates, with each part linked to the clause it comes from.
  2. TestEach rule is run against worked examples written by the specialist, including edge cases and examples from published guidance, so the logic is checked before anyone downstream relies on it.
  3. ReviewCounsel and a second specialist review the rule beside its legal source, the interpretation notes and the test results, and approve or return it.
  4. PublishApproved rule versions are released as a versioned, machine-readable package that processing systems consume through an API or file export, with release notes describing what changed.

What it does

Structured rule format
Rules are written as definitions, conditions, calculations and effective dates in a format specialists can read and processing systems can run.
Clause-level citations
Every part of a rule links to the clause of statute, regulation or guidance it implements, and the link is kept across versions.
Effective dating
Rules carry effective and end dates, and transition provisions are modeled explicitly, so the right version applies to each tax period.
Worked-example testing
Specialists write examples with expected results, and every rule change is run against the full example set.
Step-by-step trace
Each result can be explained step by step, showing the conditions met, values used and the clause behind each step.
Version comparison
Compare two versions of a rule to see changed conditions, calculations, dates and citations, and which examples now give a different result.
Review and approval
Clause-level comments, recorded interpretation questions and answers, and separate approvals for the legal reading and for release.
Shared definitions
Terms used across many provisions are defined once and referenced, so a change to a definition shows every rule it affects.
Release packages
Approved versions published as versioned packages with release notes, for consumption by API or file export.
Impact view
Before release, see which rules, forms and consuming systems a change touches, from the dependencies recorded in the engine.
Synthetic test data
Worked examples use constructed scenarios rather than real return information, so testing does not require access to taxpayer data.
Audit trail
Every edit, test run, comment, approval and release recorded with the person and time.

Who uses it

Tax law specialist
Drafts rules, writes worked examples and raises interpretation questions
Legal reviewer
Reviews the reading of the law in each rule and approves or returns it
Rules engineer
Maintains shared definitions, integrations and the rule format, without approving legal readings
Release manager
Groups approved versions into releases and promotes them to consuming systems
Consuming system team
Reads released rules and runs their own tests against test-channel packages
Auditor or oversight reviewer (read-only)
Views rules, versions, tests, approvals and the audit trail, with no ability to change them

Integrations

Tax processing systems
Released rule packages are consumed by your processing systems through the engine's API or a scheduled file export, in a format agreed during implementation.
Legal source library
Statutory, regulatory and guidance text loaded from the sources your agency uses, with versions kept as the text changes.
Source control and build pipelines
Rule packages can be exported to your source control and continuous integration tools so consuming teams test them like any other dependency.
Requirements and work tracking
Rule changes can be linked to the work items your agency uses to manage legislative implementation.
Forms and instructions
Rule references can be shared with the teams that produce forms and instructions, so they can check that the published guidance and the logic agree.
Single sign-on
Staff sign in through your agency's identity provider, including PIV-based authentication where your provider supports it.
Work API
Rule, version, test and approval data available to your reporting tools through the Moraph Work API.

Security

Hosted in the United States
Rules, examples and review records are hosted in the United States region.
Cleared support lane
Support tickets from federal clients are routed only to US citizens with active security clearances.
Access by role
Drafting, legal approval and release are separate permissions, and unreleased rules can be limited to the people working on them.
Encryption under controlled keys
Client data is encrypted with keys our staff cannot access without explicit, time-bound authorization.
Complete audit trail
Every edit, test, approval and release is recorded with the user and time, and cannot be edited.
Independent audits
Moraph's controls are covered by its SOC 2 Type II report and ISO/IEC 27001 certification, available through the Trust Center.

Hosting and deployment

Moraph cloud, United States
Hosted in the United States region, with data kept in the US.
Dedicated environment
A single-tenant environment for agencies that require isolation, scoped in the proposal.
Rule packages run in your systems
Released packages are executed by your own processing systems or by an execution component installed in your environment, so production calculations do not depend on Moraph's cloud.
With a managed service
Optionally run alongside a Moraph managed service for administration, rule-engineering support and integration support.

Implementation

Scope and pilot provisions
We agree with your policy and engineering leads which provisions to model first, usually a recent change with known expected results.
Rule format and conventions
Drafting conventions, shared definitions and citation styles are agreed with your specialists and counsel, and documented.
Legal source loading
The statutory, regulatory and guidance text in scope is loaded and versioned, with your team confirming the sources.
Consuming system integration
The package format and delivery method are agreed with one consuming system team, and their tests are run against the first release.
Roles and approvals
Roles, review steps and approvers are configured to match your agency's procedures for legal review and release.
Training and handover
Specialists, reviewers and engineers are trained on drafting, testing and release, and Moraph works alongside your team on the first provisions.

What it doesn’t do

  • It does not interpret the law for your agency. Every rule reflects the reading of your specialists and counsel, and Moraph does not provide tax or legal advice.
  • It does not process returns or hold taxpayer accounts. Your processing systems run the released rules.
  • Some provisions depend on judgment, facts and circumstances that cannot be reduced to conditions and calculations; these are recorded as inputs a person or system must supply, not decided by the engine.
  • A rule is only as reliable as its worked examples. Testing shows the rule matches the examples written, not that the examples cover every case.
  • Moraph holds no FedRAMP authorization for this product. We provide control documentation to support your agency's own authorization decision.
  • Existing logic in legacy processing systems is not converted automatically; provisions are modeled in the engine as your agency chooses to bring them across.
  • Consuming systems must be changed to read the released packages, and that work sits with the teams that own them.
  • It is designed for tax provisions. Other areas of law can be modeled but are outside the conventions delivered at implementation.

How to evaluate it

  • Ask a specialist to model a recent provision and judge whether counsel could review it without help
  • Check that every step of a rule traces to a specific clause
  • Write edge-case examples, including a transition period, and review how failures are explained
  • Compare two versions of a rule and confirm the differences shown are complete
  • Have an engineering team consume a test release in a non-production system
  • Confirm role separation: who can draft, approve the legal reading and release

Questions

Do policy specialists need to write code?

No. Rules are written in a structured format of definitions, conditions and calculations that specialists can learn without programming. Rules engineers support more complex structures.

Does the engine decide how the law should be read?

No. Your specialists draft the reading and your counsel approves it. The engine records the reading, tests it and keeps the link to the legal text.

Do we need taxpayer data to test rules?

No. Worked examples are built from constructed scenarios. If your agency chooses to test against return information, that happens within your own systems and under your own controls.

How do our processing systems use the rules?

They consume released packages through an API or file export, or through an execution component installed in your environment. The format is agreed with your engineering teams during implementation.

Is it FedRAMP authorized?

No. Moraph holds no FedRAMP authorization for this product. We provide control documentation to support your agency's own authorization decision.

How do we try it before buying?

A demonstration uses fictional provisions. For a deeper evaluation, your specialists can model a recent provision with known expected results and compare the engine's output with your current implementation.