open-policy-agent/opa ? reverse-engineered prompt
Reverse engineered prompt
Build me an open source policy engine that lets me write rules in a simple declarative language and then ask it yes or no questions about things like access control, compliance, and where workloads should run.
I want a command line tool I can run locally, plus a small server mode with a REST API so other apps can send it data and get policy decisions back. It should support loading policy files and JSON data, evaluating rules, formatting and testing policies, and giving clear error messages when something is wrong. It would be great if there’s a way to inspect or debug how a decision was made, and if it can also work in embedded Go apps.
Please make it feel polished for real users, with good docs, sensible defaults, and examples for common cases like allow or deny API requests. If you need to look up current best practices or docs online while building it, go ahead.
Are you gonna build this?
make sure you review the code using coderabbit