Some mix of product, support and eng decides how refunds work. It lives in a Notion doc. Then Slack. Then hardcoded as a bunch of if statements. No tests. No trace. No version control.
decision-layer is a small framework to clean that up.
You write the logic in YAML. Run it like code. Test it. Trace it.
What it does: - Versioned YAML policies - CLI to run and test them - Trace output with every rule fired - Examples: refunds, escalation, tiering
All in plain Python. No weird dependencies. Just testable logic defined clearly.
⸻
Would love to hear what confuses, breaks or annoys you. (Or what would make this usable where you work.)
emt00•3h ago
I built this after one too many rounds of debugging refund logic that lived partly in code, partly in Slack/Notion and in human HDD.
What it is: A minimal framework to define decisions (refunds, escalation, tiering) in YAML, run them in Python, and trace exactly what rule fired.
Not trying to be: - A full-blown policy engine - A DSL replacement - A product
Just something useful for when your business logic needs versioning, traceability, and tests but you don’t want to build all that infra from scratch.
Trace output → shows you exactly which rule fired and why Versioning → write your policies like code, diff them, roll back Testable → run them with real inputs, locally or in CI
Happy to answer: Why YAML? (it’s config, not code) How this fits in a real app What I’d add next if people use it
Use it. Abuse it. Feedback very welcome.