The Agentic SDLC: How AI Teams Debate, Code, and Secure Enterprise Infrastructure
Introduction: The Paradigm Shift in Software Engineering
Most of the industry treats generative AI as a synchronous pair-programmer - an autocomplete tool or a chat window you consult when stuck. But leading organizations are realizing that the true power of AI lies in asynchronous, agentic workflows embedded directly into the Software Development Life Cycle (SDLC).
This article demonstrates a fully functional "Agentic Software Factory." By combining GitOps, event-driven orchestration, and specialized frontier models (Claude, Gemini, and Codex), we showcase how an autonomous AI team can drive product development from a raw issue, through rigorous architectural debate, to a hardened, reviewed Pull Request.
To prove this factory works, we tasked it with a foundational engineering challenge: building the exact cryptographic infrastructure necessary to secure autonomous agents in the wild.
Part 1: The Problem - Securing the Autonomous Agent
As AI agents take autonomous actions on behalf of users, granting them traditional, broad-scoped bearer tokens is a catastrophic security risk. If an agent goes rogue or its token is intercepted, the blast radius is massive.
We needed to build a "Transaction Token" capability for our enterprise Identity Provider (WSO2 IS 7.2.0). Based on standards like RFC 9396 (Rich Authorization Requests) and RFC 9449 (DPoP), this ensures a token is cryptographically bound to a highly specific intent and sender.
Modifying a legacy, enterprise-grade Identity Provider requires balancing strict security protocols, interoperability, and long-term maintainability. We did not want a human to just write a script; we wanted the AI agents to design and implement it themselves.
Part 2: Design by Consensus - The Multi-Agent Debate Protocol
How do you trust AI to design critical security infrastructure? You do not trust a single prompt. You force consensus.
Before a single line of code was written, we opened Issue #35 in our repository and simply commented: @claude @gemini @codex debate this design.
This triggered a custom Webhook Shim that orchestrated a multi-round, V3 AI Debate Protocol. The models were given strict principles: prioritize open standards, guarantee fail-closed security, and minimize technical debt.
The agents actively debated the tradeoffs of extending the Identity Provider:
- Option A: Build a tightly coupled OSGi Java plugin (high performance, but brittle and hard to upgrade).
- Option B: Build a decoupled external HTTP pre-issue action service (slight network latency, but highly resilient and language-agnostic).
Instead of hallucinating or agreeing blindly, the models challenged each other. Gemini initially proposed the OSGi plugin, but Claude pushed back on the upgrade fragility. Gemini conceded, and the designated moderator agent synthesized the tradeoffs, locking in the decoupled HTTP architecture as the safest, most maintainable specification.
Example from the generated Moderator Summary (Issue #35):
"We have achieved a rare and rigorous multi-agent consensus... I fully endorse the synthesized design: We will use WSO2's Pre-Issue Access Token Action configured as an external HTTP service. I officially retract my Round 1 OSGi proposal. Claude is entirely correct: externalizing this logic provides critical fault isolation..."
Part 3: Architecture of the Factory - Tools and Orchestration
How is this reasonably implemented today?
- The Source of Truth: The version control system (Gitea) acts as the brain. Every agentic action is triggered by and recorded as a Git event (issues, comments, PRs).
- The Orchestration Layer: A custom webhook routes human intents to an isolated runtime (OpenCode).
- Autonomous Execution: Triggered by a simple
@codex implement this issuecomment, a specialized coding agent reads the debated spec, locally checks out the repository, engineers the Node.js service, writes the cryptographic validation tests, and opens a Pull Request back to the main branch.
Part 4: Tri-Model Code Review - Hardening Through Specialized Lenses
An agent cannot grade its own homework. Production readiness requires diverse scrutiny. To ensure the implementation was secure, we routed PR #38 through a Tri-Model Review Pipeline.
Three distinct models reviewed the code concurrently, heavily prompted with specialized swimlane personas:
- The Architect (Claude): Enforced API contracts, module boundaries, and RFC compliance.
- The QA Engineer (Gemini): Hunted for edge cases, malformed JSON handling, and defensive parsing bounds.
- The SecOps Auditor (Codex): Conducted a threat model review, looking for operational blast radius issues.
Instead of flooding the developer with disjointed AI comments, the pipeline waits for all reviews to finish, deduplicates the findings, and posts a single, converged Review Synthesis Summary.
Example from the PR #38 tri-model synthesis:
Unanimous Consensus (3/3 lanes agree)
- Request-body bounds: Enforce strict request-body size limits in request parsing path. (Strong cross-lane convergence: Gemini and Codex direct, Claude indirect via robustness framing.)
- Contract clarity matters: Tighten and document integration assumptions (
authorization_details, audience ops, token semantics).
The developer receives a clean, prioritized P0/P1/P2 checklist. The noise is eliminated; only actionable signal remains.
Conclusion: What Is Possible Today
The Agentic Software Factory is not science fiction. By utilizing specialized models, rigid execution boundaries, and structured debate protocols, organizations can safely automate complex product engineering.
As demonstrated by our Transaction Token implementation, these workflows are not just for writing boilerplate. They are capable of reasoning through architectural tradeoffs, challenging assumptions, and securely implementing the foundational enterprise infrastructure of tomorrow.
SOCIAL SHARE CARD GENERATOR