The strategic question
Could policy-as-code (OPA Rego, Amazon Cedar, JSON Logic, or similar) serve as a bridge layer between:
- Apache INHERIT (Tier 0) — rules, values, citations
- AGPL+dual InheritKit (Tier 2) — production-grade rule engines + computation
If yes, significant implications:
- Reduces InheritKit Phase 1 build time (maybe 7–8 months → 3–5 months)
- Stronger interop signals for FAIR / conformance / public-register badges (Rich’s priority)
- Policy-as-code conformance testing becomes implementation-agnostic (single declarative layer runs anywhere)
- Changes InheritKit moat shape: from “competitor can’t reproduce anything” (fragile, fork-risk) to “competitor can validate + check eligibility with open tools, can’t efficiently compute, can’t access partner optimisations, can’t integrate cross-layer” (cleaner + interop-friendly)
Current position (Friday 17 April 2026, pre-book)
Apache-appropriate policy-as-code:
- Declarative validation rules beyond JSON Schema structural validation
- Eligibility tests (IFPA 1975 categories, will validity gates, precedence)
- Cross-field invariants
- Reference-data rule-shape (executable TemporalRule wrappers)
- Conformance test definitions (Lane 3, Rec 10)
InheritKit-only (moat preserved):
- Numerical computations (NRB stacking, PET taper, intestacy distribution math, faraid share arithmetic)
- Cross-layer consistency (succession × tax × faith integrated analysis)
- Workflow orchestration + AI scaffolding + document generation
Refined decision test:
- Rule outputs numeric (shares, amounts, dates beyond yes/no + category) → InheritKit
- Rule outputs yes/no or category → candidate for Apache policy-as-code
Estimated rule-surface coverage by policy-engine reuse: 30–50%, not the initial hand-wavy 70%.
Next action (handoff to fresh session)
Rich purchased “Policy as Code” by Jimmy Ray (O’Reilly, 2024, ISBN 978-1-098-13918-6). Book located at ~/off-github/library/. Fresh session will:
- Read the book (selective, 376pp total — see handoff prompt for reading order)
- Write InheritKit policy-as-code layer spec (becomes a key section of eventual design spec v2.0)
- Produce spike brief for 1–2 week OPA/Cedar prototype
Handoff prompt at docs/superpowers/scoping/policy-as-code-handoff-prompt.md.
Why this matters
Rich’s three interop-focused quick-win badges (FAIR maturity, JSON Schema conformance suite, public conformance register) are his stated priority. Policy-as-code is the strongest single lever for strengthening all three. Potential dual benefit: shorter InheritKit build timeline + stronger open-standard credibility.
Open questions (for fresh session)
- Specific engine choice (OPA Rego vs Amazon Cedar vs JSON Logic vs hybrid)
- Repo layout (policies alongside schemas, or separate)
- Policy versioning for TemporalRule-style legislative changes
- Sourcemeta agreement impact (Blaze validator vs policy engine — different category)
- CLA implications if contributors submit policies
- Pre-publication window use — apply this before v4.0.0 locks Apache