<- All 20 Essays rafaelbenavi.com

Federated Spec-Driven AI-SDLC: Why Repo-Level Governance Beats IDE Lock-In

Buying AI coding licenses for 200 engineers does not create an AI-SDLC. Without portable repository governance and separated validation agents, you just generate architectural drift faster.

AI-SDLCAGENTS.mdSpec-DrivenPlatform EngineeringArchitecture

Rolling out AI coding assistants across an engineering organization without changing how specifications and architecture standards work produces a predictable outcome: pull requests double in size, code review queues clog, and subtle architectural violations ship twice as fast.

The root cause is easy to spot. Most organizations treat AI adoption as an IDE plugin procurement decision. Every team configures ad-hoc prompts inside proprietary editor settings. The moment a team switches models, editors, or CLI agents, all tribal context evaporates.

Principle 1: Portable Repository Governance

Architectural standards must live where the code lives, in plain, tool-agnostic Markdown checked directly into Git. By standardizing on portable instruction files (such as AGENTS.md for repository boundaries and SKILL.md for repeatable engineering workflows), every agent - whether running inside an IDE, a CI pipeline, or an autonomous runner - reads the exact same operational contract.

repo-root/
  AGENTS.md                  # Service boundaries, forbidden dependencies, SLA rules
  docs/specs/                # Structured feature & architecture specs
  .agent/skills/
    hld-authoring/SKILL.md   # Required sections, threat model & FinOps checklist
    impact-review/SKILL.md   # Upstream/downstream contract & schema check

When a domain architect updates a security guardrail or an API versioning rule, it lands as a standard pull request. Governance stops being a forgotten slide deck in SharePoint and becomes executable context.

Principle 2: Separate Creation from Validation

The single biggest quality failure in AI-assisted engineering is letting one agent session draft the design, write the implementation, and review its own work. Single-agent loops suffer from confirmation bias: once a model commits to a flawed assumption early in the context window, it defends that assumption through tests and documentation.

A production AI-SDLC splits responsibilities across specialized, stateless agents:

  1. Specification Authoring Agent: Interviews the engineer and pulls service context to generate a structured High-Level Design (HLD) and acceptance criteria before a single line of code is written.
  2. Cross-System Impact Analysis Agent: Queries the service catalog and event schemas to surface breaking API changes, Kafka topic contract mismatches, and shared database dependencies across neighboring squads.
  3. Automated Validation Agent: Runs in CI with a fresh context window, checking the spec and diff strictly against repository AGENTS.md guardrails, IAM least-privilege policies, and observability requirements.

Principle 3: Measure Lead Time and Defect Escape, Not Lines Generated

Lines of AI-generated code is a vanity metric. In federated delivery across multiple brands and squads, the metrics that actually tell you whether AI-SDLC is working are specification cycle time, PR review turnaround, architectural rework rate, and production incident rate per deployment.

The Takeaway

AI does not eliminate the need for architectural discipline. It raises the payoff for making your architecture explicit enough that both engineers and autonomous agents can follow it without guessing.

Building production AI infrastructure or scaling distributed platforms?

Open to Principal / Distinguished Architect, VP of Engineering, and CTO conversations with high-bar engineering organizations.

Email Rafael Connect on LinkedIn
Earlier Essay (2026-06-24)RAG Over Unstructured Wikis Fails at Scale: Building an Enterprise Knowledge Graph for Agents