Most DevOps tasks start with a manual checklist: Is the disk full? Is the latency too high? Should we promote this Canary? In my latest project for the HNG Internship, I decided that "manual" wasn't fast enough. I didn't just want to deploy code; I wanted to build a tool that protects itself. I upgraded my CLI tool, swiftdeploy, from a simple script to a policy-driven engine with its own "Eyes" (Metrics) and "Brain" (Open Policy Agent). Here is how I did it. The Architecture: A Single Source of Truth The core of the project is the manifest.yaml. I wanted to follow the Declarative Infrastructure philosophy—where I describe what I want, and the tool figured out how to build it. My tool takes this manifest and programmatically generates the docker-compose.yml and nginx.conf. No more hand-writing configs or fixing typos in Nginx blocks. Giving it "Eyes" (Instrumentation) You can't manage what you can't see. I instrumented my API service (the engine) to expose a /metrics endpoint in Prometheus format.…