Skip to main content

Concept 01

The Agentic Layer

The configuration surface your team builds and maintains. Not code that runs, but configuration that governs how code gets written.

"The code is output. The agentic layer is the product."

When output quality degrades, you fix the layer, not the generated code. The agentic layer is the artifact your team collaborates on, versions, and iterates.

What is the agentic layer?

The agentic layer is the configuration surface between your team and your codebase. It contains everything an AI agent needs to work autonomously: prompt templates that define behavior, tool configurations that grant capabilities, quality gates that enforce standards, and workflow definitions that orchestrate phases.

Think of it this way: the agentic layer is not code that runs. It is configuration that governs how code gets written. If your codebase is a factory floor, the agentic layer is the set of Standard Operating Procedures posted on the wall. The agents follow the SOPs. You write the SOPs.

What it contains

Prompt Templates

One per phase, versioned like code. The instructions agents follow.

Tool Configurations

Which capabilities each phase can access. Read, search, execute, write.

Quality Gates

Pass/fail criteria per phase. Coverage thresholds, severity limits.

Workflow Definitions

Phase ordering, loop limits, escalation rules, checkpoint config.

Custom Commands & Skills

Reusable prompt+tool bundles. Commands are user-invoked, skills are agent-invoked.

# Your agentic layer directory
agentic-layer/
prompts/           # One template per phase
   plan.md
   build.md
   test.md
   review.md
   document.md
   deploy.md
   monitor.md
gates/             # Quality criteria per phase
   test-coverage.yaml
   review-severity.yaml
tools/             # Integration configurations
   file-system.yaml
   ci-cd.yaml
commands/          # Reusable skills & commands
   commit.md
   security-audit.md
workflow.yaml      # Orchestration rules

The three-layer architecture

Every agentic engineering system has three layers. Developers operate at the top. The framework orchestrates in the middle. Agents work at the bottom. Understanding which layer you are changing (and which layer you are not) is the key to working effectively.

Agentic Layer Humans Collaborate Here Prompts Tools Gates Config Workflow Engine Framework Runs Here Plan -> Build -> Test -> Review -> Doc -> Deploy Your Codebase Agents Work Here src/ tests/ docs/ infra/

Layer 1: Agentic Layer (Humans Collaborate Here)

This is where your team spends its time. The agentic layer contains prompt templates, tool configurations, quality gates, workflow YAML, and custom commands or skills. It lives version-controlled alongside your codebase, or in a separate repo for multi-project organizations.

Changes to this layer change how every future task is executed. When you improve a prompt template, every subsequent workflow run benefits. When you tighten a quality gate, every future build is held to the new standard. This is leverage.

Layer 2: Workflow Engine (Framework Runs Here)

The orchestration runtime that reads the agentic layer and executes phases. It manages phase sequencing, artifact chaining between phases, feedback loop execution, state tracking, and escalation.

You do not modify this layer. You configure it via the agentic layer. If the agentic layer is the set of SOPs, the workflow engine is the factory conveyor belt. It moves work through stations according to the procedures you defined.

Layer 3: Codebase (Agents Work Here)

Your source code, tests, documentation, infrastructure files. Agents read, write, test, and ship changes here, following the prompts and permissions defined in the agentic layer.

This is output, not input. The quality of this layer is a function of the quality of the agentic layer above it.

Why teams collaborate on the layer

In traditional development, developers write code, review each other's code, and maintain institutional knowledge about patterns and standards. With agentic engineering, the collaboration point shifts upward. The shared artifact is the agentic layer, not the source code.

What shifts when agents do the building

Activity Developer-driven Agent-driven (AEF)
Primary artifact Source code Agentic layer (prompts, gates, config)
Code review focus Implementation quality Template and gate quality
Onboarding Learn the codebase + team conventions Learn the codebase + read the agentic layer
Architecture knowledge Docs, ADRs, undocumented expertise Docs, ADRs, plus codified in prompts and gates
Collaboration mode Pair programming Pair prompting on templates

The agentic layer becomes the shared artifact your team collaborates on. Code reviews focus on template and gate quality. Architecture discussions center on prompt design and workflow configuration.

The role shift: developer to workflow architect

Developers still need engineering judgment. That judgment now goes into designing prompts, choosing tool permissions, and calibrating quality gates. This is not about giving up engineering. It is about applying engineering at a higher level of abstraction.

Developer writes code reviews code maintains institutional knowledge evolves into Workflow Architect designs prompts tunes workflows calibrates quality gates

Think of it as meta-engineering: designing the system that builds the system. The new core competencies include:

  • 01 Prompt design: writing templates that produce consistent, high-quality output across varied inputs
  • 02 Workflow tuning: configuring loop limits, escalation rules, and phase transitions
  • 03 Gate calibration: setting thresholds that catch real issues without false positives
  • 04 Artifact chain design: structuring outputs so downstream phases receive exactly the context they need

"The code is output, the agentic layer is the product"

This inversion has practical consequences:

Version control the layer

Your agentic layer deserves the same rigor as production code: version control, code review, testing, documentation. A prompt template change is as significant as an API change.

Fix the layer, not the output

When output quality degrades, fix the layer, not the generated code. Patching generated output treats the symptom. Improving the template treats the cause.

Port the layer across projects

The agentic layer is portable. The same Plan template can work for a Python backend and a React frontend. You adapt the layer, not rebuild it.

Onboard with the layer

When onboarding a new project, you port your agentic layer (or adapt it), not your code patterns. The layer encodes your engineering standards in a form agents can execute.

Example: minimal agentic layer

A new project needs surprisingly little to start. Three templates, one set of gates, and a workflow config:

# workflow.yaml -- minimum viable agentic layer
phases:
  plan:
    template: prompts/plan.md
    tools: [read, search]
  build:
    template: prompts/build.md
    tools: [read, search, execute, write]
    gates:
      all_pass: true
  review:
    template: prompts/review.md
    tools: [read, search]
    gates:
      max_blockers: 0

loops:
  test_retry: { max: 3 }
  review_patch: { max: 3 }

escalation:
  target: human
  include: [plan, build_report, test_results, review_issues]