GitOps for Agentic Cognitive Layers
Date: August 2026
What I Wanted
As the Works-by-Worrell agentic ecosystem scaled, storing system prompts, API keys, and operational parameters within the application repositories became a severe governance risk. I needed a mechanism to decouple the generic application code from the highly proprietary "cognitive data" (prompts, schemas, targeting criteria) driving the agents.
The goal was to enable completely public, open-source codebases while maintaining an impenetrable, private data layer to dictate business logic.
What I Did
I architected a multi-repository topology driven by a strict GitOps methodology.
- Repository Split: The monolithic codebase was fractured into specialized micro-repositories (e.g.,
wbw-infra,warlock-mcp,wbw-config,wbw-config-private). - Decoupled Data Access: I implemented the Repository Pattern within the backend code, decoupling the application logic from the underlying datastore via strict interfaces (e.g.,
AgentRepository). - Declarative Ingestion: I built the
AgentConfigIngestionPipeline—an ETL workflow that validates raw Markdown/YAML configuration files from the config repositories, computes deltas, and securely syncs them into Google Firestore.
✅ GOVERNANCE ESTABLISHED
Result: Application code contains 0 hardcoded prompts or secrets. Behavior is 100% dictated by declarative, version-controlled runtime data.
What I Learned
Treating LLM system prompts as code is a mistake. Prompts are highly volatile business logic data, not infrastructure.
By enforcing this separation of concerns, the platform achieved extreme flexibility. The exact same public open-source repository could be directed to evaluate GitHub bugs or scrape Staff Engineering job postings entirely by hot-swapping the private Firestore overlay at runtime.
This initiative validated that enterprise-grade security, auditability, and cognitive governance can be applied to AI agents without sacrificing rapid local development velocity.