Skip to content
NELSON

Search posts

Continuous agentic engineering loops

Repository-native agent loops can turn engineering work into a governed, auditable, continuously validated runtime.

Agentic deliveryPart 4 of 5

What if the repository itself becomes the scheduler?

Most AI coding workflows are still session-driven:

Plain text
Human -> Prompt -> Agent -> Stop

That is useful, but it treats the agent as a temporary chat participant. A repository can instead become a continuously evolving system where agents execute bounded work from persistent queues while humans remain reviewers, architects, and governors.

The operating model becomes closer to:

Plain text
Human -> Governance -> Continuous Agent Runtime

Core architecture

The repository itself becomes the orchestration layer.

Plain text
repo/
├── src/
├── tests/
├── docs/
├── agent/
│   ├── backlog/
│   ├── wip/
│   ├── done/
│   ├── blocked/
│   ├── archive/
│   └── policies/

Each engineering task exists as a file:

Plain text
agent/backlog/add-search-unit-tests.md
agent/backlog/remove-legacy-api-client.md
agent/backlog/improve-error-boundaries.md

This resembles Kanban because work is represented as visible items moving through explicit states. The difference is that git records those state transitions, so the queue becomes reviewable and recoverable.

Agent runtime flow

flowchart TD
  A["fa:fa-robot Agent loop runtime"] --> B["fa:fa-folder-open Scan backlog/"]
  B --> C["fa:fa-list-check Pick next task"]
  C --> D["fa:fa-arrow-right Move task to wip/"]
  D --> E["fa:fa-book Read repository policies"]
  E --> F["fa:fa-code Implement changes"]
  F --> G["fa:fa-vial Run validations"]
  G --> H{"fa:fa-circle-question Validation passed?"}
  H -- "No" --> I["fa:fa-triangle-exclamation Capture failure context"]
  I --> J["fa:fa-ban Move to blocked/ or retry"]
  H -- "Yes" --> K["fa:fa-check Commit changes"]
  K --> L["fa:fa-box-archive Move task to done/"]
  L --> M["fa:fa-chart-line Generate metrics/report"]
  M --> B

  style A fill:#1e293b,color:#fff,stroke:#334155
  style H fill:#7c2d12,color:#fff,stroke:#ea580c
  style K fill:#14532d,color:#fff,stroke:#22c55e
  style L fill:#0f766e,color:#fff,stroke:#14b8a6

The important part is not that the agent is autonomous. It is that the agent operates inside a state machine humans can inspect.

Why filesystem Kanban?

Most orchestration systems eventually reinvent capabilities git already provides.

CapabilityGit already provides
AuditabilityCommit history
RollbackGit revert
ReviewabilityPull requests
OwnershipCODEOWNERS
TraceabilityCommit SHA
ReplicationClone/fork
AutomationCI/CD
State transitionsFile movement

That means the queue itself becomes versioned, reviewable, reproducible, observable, and branchable.

Task boundaries

A task file should be more than a title. It should define the boundary the agent is allowed to operate inside.

md
# Task

Improve order page loading skeleton.

# Goal

Reduce perceived loading delay and improve CLS stability.

# Constraints

- No layout shift after hydration
- Must support static export
- Avoid client-only rendering

# Validation

bun run test
bun run typecheck
bun run build

# Ownership

frontend-platform

# Priority

P2

This gives the agent a bounded execution surface and gives reviewers a compact contract to audit.

Human-auditable without blocking runtime

The difficult question is not whether agents can keep working. It is how humans stay involved without becoming the runtime bottleneck.

The answer is to move human responsibility toward policy, review, and exception handling.

flowchart LR
  A["fa:fa-user-gear Architects"] --> B["fa:fa-scale-balanced Policies"]
  B --> C["fa:fa-robot Agent runtime"]
  C --> D["fa:fa-vial Validation layer"]
  D --> E["fa:fa-code-pull-request Pull requests"]
  E --> F["fa:fa-user-check Human review"]
  F --> G["fa:fa-rocket Merge / deploy"]

  style C fill:#312e81,color:#fff
  style D fill:#0f766e,color:#fff
  style F fill:#92400e,color:#fff
RoleResponsibility
ArchitectDefine boundaries
ReviewerAudit changes
GovernorControl policies
PrioritizerFeed backlog
Incident resolverHandle blocked states

The loop keeps moving, but humans keep control of the rules.

Validation is the runtime controller

Agents are probabilistic. Validation is deterministic.

The system should shift trust away from:

Plain text
trusting the agent

and toward:

Plain text
trusting the validation system
flowchart LR
  A["fa:fa-code Agent change"] --> B["fa:fa-wand-magic-sparkles Lint"]
  B --> C["fa:fa-code-branch Type check"]
  C --> D["fa:fa-flask Unit tests"]
  D --> E["fa:fa-desktop E2E tests"]
  E --> F["fa:fa-shield-halved Security scan"]
  F --> G["fa:fa-circle-check Merge eligible"]

  style G fill:#14532d,color:#fff

This is where engineering quality actually lives: in checks, contracts, reviewable diffs, and rollback paths.

Self-growing quality

One useful emergent property is that the repository can gradually improve itself through small queued tasks.

CategoryExample
TestingAdd missing edge-case tests
RefactoringRemove dead abstractions
TypesStrengthen type safety
PerformanceReduce bundle size
ReliabilityImprove retry logic
DXImprove CI feedback
ObservabilityAdd missing tracing
DocsKeep docs synchronized

This resembles compound interest more than traditional project delivery. The gains come from many validated micro-improvements rather than one large rewrite.

Multi-agent topology

Specialization can emerge over time.

flowchart TD
  A["fa:fa-inbox Backlog"] --> B1["fa:fa-code Feature agent"]
  A --> B2["fa:fa-flask Test agent"]
  A --> B3["fa:fa-broom Refactor agent"]
  A --> B4["fa:fa-book Docs agent"]
  A --> B5["fa:fa-shield Security agent"]
  B1 --> C["fa:fa-vial Validation layer"]
  B2 --> C
  B3 --> C
  B4 --> C
  B5 --> C
  C --> D["fa:fa-user-check Human review"]

  style C fill:#0f766e,color:#fff
  style D fill:#92400e,color:#fff

The topology should stay boring at first. A single worker with a strict queue is easier to govern than a swarm. Specialization only helps once validation, ownership, and review capacity are already strong.

Failure modes

This system is not magic. Autonomy increases throughput, but it can also amplify mistakes.

RiskDescription
Infinite loopsAgent repeatedly edits the same files
Validation gamingWork optimizes only for CI passing
Repo churnCommits become frequent but low-value
Context driftAgent misunderstands architectural intent
Cost explosionToken and runner usage become unbounded
PR overloadReviewers cannot absorb the diff volume
False productivityActivity increases without product value

Governance matters more as autonomy increases.

Minimal prototype stack

LayerSuggested choice
QueueFilesystem Kanban
RuntimeClaude Code / Codex / OpenAI Agents
ValidationGitHub Actions
StateGit commits
GovernanceCODEOWNERS and branch rules
MetricsOpenTelemetry, ELK, Datadog, or Sentry
IsolationContainerized runner
SchedulingCron or CI scheduler

The first prototype does not need a complex control plane. It needs a small queue, a bounded worker, deterministic checks, and a clear rule for when humans review or stop the loop.

sequenceDiagram
  participant A as Agent
  participant R as Repository
  participant C as CI system
  participant H as Human reviewer

  A->>R: Pick backlog item
  A->>R: Move task to wip/
  A->>R: Implement changes
  A->>C: Run validations
  C-->>A: Validation passed
  A->>R: Commit changes
  A->>R: Move task to done/
  H->>R: Async review / governance
  A->>R: Pick next task

Related work

Several nearby projects and papers point in the same direction. GitHub's Agentic Workflows experiments with work definitions that can be executed by agents, while GitHub Next's Discovery Agent explores repository-aware agents that investigate codebases. Microsoft's research on YoloFS argues that filesystem design can shift information and control toward safer agent autonomy.

The risks are also visible in current research. A study of failed agentic pull requests examines how autonomous coding attempts fail in practice, and TDFlow frames agentic work around test-driven feedback loops. The official Kanban Guide is useful background for the visualized workflow and WIP-control side of the model. Backlog is another example of local files being used as an agent-friendly task orchestration surface.

Final thought

The biggest unlock may not be smarter models. It may be designing repositories where autonomous engineering work can continue safely while humans are offline.

That turns software engineering from human-triggered execution into policy-constrained continuous evolution.

Related posts

GitHub Actions should separate delivery from diagnosis

CI governance improves when delivery, diagnosis, telemetry, and decision loops are modeled as separate but connected planes.

#Delivery and CI#Observability#AI agents

Frontend development as agentic engineering takes shape

Agents already help ship software, but teams are still rebuilding product decisions, engineering boundaries, review, and release routines around them.

#AI agents#Delivery and CI#Teams and leadership

Codex `/goal` changes the developer loop

Codex `/goal` turns agent work from prompt-by-prompt steering into a goal-driven loop with completion defined up front.

#AI agents#Delivery and CI

Embedded comments are unavailable here.

View discussion on GitHub