DOC_003 · 10 Nov 2026 · 6 MIN READ
From CI/CD Templates to Governed Agentic DevOps
Audience: Platform engineers, DevOps engineers, SREs, engineering leads. Status: Architecture proposal, not an empirical performance claim.
The problem is not YAML
Imagine a company operating a dozen services: Python APIs, Node.js workers, a Next.js frontend deployed through Vercel, and a few containerized microservices. Every project has a CI/CD pipeline, yet each pipeline reflects its author's preferences. One checks for secrets; another does not. Some lock component versions; others import a moving branch. A backend shares a repository with an independently deployed frontend. A release job has been disabled to make a merge request pass.
It is tempting to solve this by publishing a set of .gitlab-ci.yml templates. Templates improve reuse, but they do not answer the bigger questions: Which template belongs to this project? Is the repository correctly structured? Who can authorize exceptions? What happens when a required component does not exist? Who verifies that an automated integration actually complies with policy?
AI coding agents can inspect repositories and change configuration rapidly. That speed makes these questions more urgent, not less. A fluent agent is not a reliable policy decision point.
The proposed answer is policy-driven agentic DevOps: a central engineering framework that distributes standards, provides reusable CI/CD components, exposes machine-executable validators, and defines the workflow an agent must follow. The agent performs discovery, planning and implementation. Independent controls determine whether its work is acceptable.
Four distinct responsibilities
The design separates four planes:
- Governance: organizational rules, repository topology, required checks, exceptions, and versioning policy.
- Execution: deterministic validators, GitLab CI jobs, and reusable components with explicit input contracts.
- Agent interaction: instructions, skills, contextual project inspection, and change proposals.
- Enforcement: GitLab permissions, protected branches, merge request approvals, and required pipeline status.
The agent proposes, independent controls decide
This distinction is the defining design choice. A prompt such as “never modify protected branches” is guidance. A locally configured hook is an additional obstacle. A protected branch configured on the GitLab server is an enforceable authorization boundary. Confusing these controls leads to a false sense of security.
A real integration begins with discovery
Consider a developer opening an agent in product-a-api and providing the URL of the organization's central DevOps repository. The URL is not magic: the agent needs a controlled bootstrap process to retrieve a trusted revision of the rules, load the appropriate skills, and install or activate locally supported controls. Reading a repository does not automatically activate its hooks.
The agent's first operation is read-only. It checks framework and runtime, lockfiles, tests, build scripts, existing pipeline, remotes, and GitLab project metadata. It then resolves an explicit version of the central policies and catalog. Only after this step can it produce a meaningful plan.
An example report might look like this:
Repository: product-a-api
Stack: Python / FastAPI
Dependency lockfile: present
Unit tests: present
Existing GitLab pipeline: partial
Repository structure: PASS
Required secret detection: MISSING
Catalog revision: 3.2.0 (verified)
State: PLAN_REQUIREDThe agent should state what it actually verified, what it inferred, and which facts remain unknown. It should not silently treat unavailable GitLab metadata as evidence of compliance.
Repository topology is an explicit organizational policy
The intended Genuka-style organization has a root GitLab group, a product subgroup, and independently deliverable GitLab projects:
genuka/
product-a/ # GitLab subgroup
product-a-api # GitLab project
product-a-front # GitLab project
product-a-notifications # GitLab projectFor this organization, a single repository containing an independently deployed frontend and API may be noncompliant. The agent should detect the condition, explain the desired split, and stop dependent integration work until a human approves remediation or an authorized exception. It must not casually migrate Git history or create repositories on its own.
This is a local architecture standard, not a universal claim that monorepos are technically inferior. A useful paper or implementation must make that distinction explicit.
Standardize guarantees, not incidental implementation details
Every project should meet an agreed minimum: secret detection, lint, build verification, and tests where required by the adopted policy. But an organization should avoid equating a guarantee with one particular tool.
A Next.js frontend deployed through Vercel's Git integration is an instructive case. The GitLab pipeline can own source checks and security verification, while Vercel performs and reports its build and deployment. There is no reason to install an obsolete vercel-deploy job simply because a template expects it. What matters is that the build outcome is independently checked and enforced at the appropriate merge gate.
Similarly, a service-specific deployment job may belong in its own repository, whereas a generic Python lint job belongs in the shared catalog. Centralization without a reuse test tends to produce bloated, tightly coupled component libraries.
The developer's experience
A well-designed agent should follow a predictable sequence:
- Resolve the policy and catalog revision.
- Inspect the project without modifying it.
- Run organization, architecture, build, CI and security validators.
- Present violations and a remediation plan if needed.
- Propose an integration plan with exact component references.
- Obtain approval before mutations.
- Implement in a working branch and validate the result.
- Open a merge request with evidence, without merging it.
When the catalog lacks a generic component, the agent can propose and author it in the central repository, but it must open a draft merge request and wait for review and a published release. Only then may the consumer reference the new immutable version.
The engineering trade-off
The architecture is not free. Policies need owners. Validators must be tested. Central components need release discipline and compatibility management. An elaborate policy language could become harder to maintain than the pipelines it replaces.
The sensible first release therefore uses a small set of rules and two pilot applications: an API and a Next.js frontend. The prototype should measure integration time, real compliance, false-positive blocks, human intervention, and failures—not just whether an agent can produce plausible YAML.
Conclusion
The value of agentic DevOps is not that an AI can generate a pipeline. It is that a developer can request an integration and receive a reviewable, versioned, policy-compliant change, with failures and exceptions made explicit. Automation performs the routine work; deterministic validation and GitLab permissions retain authority.
The central principle is simple: the agent may propose and implement; it must not be the sole judge of its own compliance.
Further reading
- GitLab CI/CD Components: https://docs.gitlab.com/ci/components/
- GitLab CI/CD Inputs: https://docs.gitlab.com/ci/inputs/
- GitLab Protected Branches: https://docs.gitlab.com/user/project/repository/branches/protected/