Fully autonomous

AI-Powered
Development Pipeline

From a YouTrack issue to an app deployed on staging. With no human involvement. An orchestrator plus 11 specialised AI agents, 18 pipeline steps, 7 autonomous workflows.

YouTrack Claude Code GitHub Docker Nginx Proxy Manager Playwright OpenRouter Leonardo AI
This presentation was built by the very AI-powered pipeline it describes Built by the AI-powered pipeline
// Architecture

System overview

🔗

Webhook Trigger

A YouTrack webhook starts the pipeline through a webhook receiver. The script picks up a new Open issue and hands it over to an AI agent (Claude / Gemini).

📋

YouTrack Integration

Full REST API integration — reading issues and comments, changing states, publishing to the Knowledge Base. Newer comments take precedence over the original description.

🤖

AI Orchestrator

The main Claude session drives the whole workflow. It delegates work to 11 specialised agents — it never implements anything directly, not even trivial changes.

🐙

GitHub CI/CD

Automatic clone, a branch named after the issue ID, commit, push and Pull Request creation. On an incremental re-run the existing PR is updated instead.

🐳

Docker Deployment

Every issue runs in its own Docker Compose project with an isolated environment. Automatic health check and rollback on failure.

🌐

Nginx Proxy Manager

Reverse proxy configured automatically over the API. A wildcard SSL certificate covers the staging domain. The proxy host is never deleted.

// Workflow

18 pipeline steps

01

Research direct

Loading the issue from the YouTrack API — description, requirements, comments. Deciding whether the architect, designer, graphics and game graphics agents are needed, based on keywords.

02

State change direct

Issue → In Progress. The first visible action in YouTrack. The pipeline script also posts a comment with the agent process PID.

03

Setup direct

Creating a dedicated working directory for the issue on the staging server.

04

Clone & Branch direct

Git clone of the repository and creation of a feature branch. The source branch from YouTrack is respected, otherwise the pipeline falls back to main/master.

4b

📄 Project Doc Agent conditional

If CLAUDE.md is missing from the project root (or is older than 30 days), the agent analyses the codebase and generates the project documentation (tech stack, structure, conventions, build commands). Every following agent loads it automatically.

05

🏗 Architect Agent conditional

Technical design — data model, API specification, dependencies, implementation order. Runs whenever non-trivial technical decisions are involved.

06

🎨 Designer Agent conditional

UI/UX design — layout, components, visual specification. It identifies the graphic assets needed and signals that via NEEDS_ASSETS=YES.

07

🖼 Graphics Agent conditional

Generates general graphic assets through the OpenRouter API. The cost is aggregated into openrouter_cost_usd in the log. Max 1 retry.

7b

🎮 Game Graphics Agent conditional

Game graphic assets (sprites, textures, character art) through Leonardo AI. The choice between 7 and 7b follows game-specific keywords. Max 1 retry.

08

🔧 Coder Agent agent

Writes the code and tests and verifies the build. It receives the full context from the architect, designer and graphics agents as part of its prompt.

09

📋 Reviewer Agent agent

Code review — quality, security, conventions, tech debt detection. Max 2 iterations with the Coder. A non-empty ### Tech Debt section triggers step 15b.

10

🧪 Tester Agent agent

Unit tests, build verification, Docker build (without up -d). Max 2 iterations with the Coder.

11

Pull Request direct

A PR is opened on GitHub describing the changes. On an incremental re-run the existing PR is updated automatically.

12

Deployment direct

docker compose -p <issue-id> up -d — the service starts in an isolated container.

12b

Health Check direct

A docker compose ps check, crash indicators in the logs and an HTTP health check via curl. On failure → coder → redeploy (max 1 iteration).

13

Proxy configuration direct

The NPM API creates a proxy host for the staging URL of the issue (wildcard SSL) pointing at the container through the Docker bridge.

14

👁 Visual Tester Agent agent

Playwright screenshots of the running UI → visual verification against the assignment. Max 1 iteration with the Coder plus a redeploy.

15

📝 Summarizer Agent agent

The final summary of the whole workflow — what was implemented, the PR link, the staging URL and how the agents performed.

15b

🔧 Tech Debt sub-tasks conditional

If the reviewer returned a non-empty ### Tech Debt section and the workflow finished successfully, the orchestrator creates up to 2 sub-tasks in YouTrack (Type=Task, Priority=Low, State=Backlog) and links them to the parent issue.

16

Finalisation direct

Issue → To Verify. A comment with the summary, the PR URL and the staging URL.

17

Workflow Execution Log direct

A JSONL record in the central run log, including token telemetry (agents_run[].tokens, top-level totals) and openrouter_cost_usd. Agent token counts are filled in after the run by a deterministic post-processor.

18

Pipeline State File direct

Writing .pipeline_state (JSON) into the issue directory — it holds last_run_at, pr_url, commit_sha and branch. This is what makes an incremental re-run possible.

// Specialisation

11 AI agents

Conditional
📄

Project Doc Agent

Generates CLAUDE.md in the project root — tech stack, structure, conventions. It passes that context to every following agent.

SUCCESS | PARTIAL | BLOCKED
Conditional
🏗

Architect Agent

Technical design, data model, API specification. It analyses the codebase and proposes a technical plan.

SUCCESS | BLOCKED
Conditional
🎨

Designer Agent

UI/UX design, layout, components, visual specification. It identifies which graphic assets are needed.

SUCCESS | BLOCKED
Conditional
🖼

Graphics Agent

Generates general graphic assets (logos, icons, banners) through the OpenRouter API.

SUCCESS | PARTIAL | BLOCKED max 1 retry
Conditional
🎮

Game Graphics Agent

Game graphic assets (sprites, textures, character art, pixel art) through Leonardo AI.

SUCCESS | PARTIAL | BLOCKED max 1 retry
Mandatory
🔧

Coder Agent

The heart of the pipeline. It writes the code, writes the tests and verifies the build. It consumes feedback from the Reviewer, the Tester, the Health Check and the Visual Tester.

SUCCESS | PARTIAL | BLOCKED
Mandatory
📋

Reviewer Agent

Code review focused on code quality, security, adherence to conventions and tech debt detection.

APPROVED | CHANGES_REQUESTED max 2 iterations
Mandatory
🧪

Tester Agent

Runs the unit tests, verifies the build and builds the Docker image without up -d (so that no port conflict arises).

PASS | FAIL max 2 iterations
Mandatory
👁

Visual Tester Agent

Takes screenshots of the deployed UI with Playwright and verifies the implementation visually against the assignment.

PASS | FAIL max 1 iteration
Mandatory
📝

Summarizer Agent

Compiles the final summary of the whole workflow — what was implemented, the PR link, the staging URL and how the agents performed.

SUCCESS
Workflow
📚

Other agents

For non-pipeline workflows: analyst (design documents), sprint-planner (KB → issues), workflow-improver (daily cron), kb-updater (daily KB update).

see Workflows

🚫 The key rule

The orchestrator NEVER writes code, reviews, tests, designs architecture or UI directly — not even for a trivial one-line change. It always delegates to the proper agent. Implementing anything itself is a workflow violation.

// Flow diagram

Orchestration and feedback loops

▸ Orchestrator (the main Claude session)
├── Steps 1–4: research, state, setup, clone
├── Step 4b: → project-doc (generating CLAUDE.md) [CONDITIONAL]
├── Step 5: → architect (technical design) [CONDITIONAL]
├── Step 6: → designer (UI/UX design) [CONDITIONAL]
├── Step 7: → grafika (OpenRouter) [CONDITIONAL]
├── Step 7b: → herni-grafika (Leonardo AI) [CONDITIONAL]
├── Step 8: → coder (implementation)
├── Step 9: → reviewer (code review)
│      └── CHANGES_REQUESTED → coder → reviewer (max 2×)
├── Step 10: → tester (tests)
│      └── FAIL → coder → tester (max 2×)
├── Steps 11–12: PR, deploy
├── Step 12b: health check
│      └── FAIL → coder → redeploy → health-check (max 1×)
├── Step 13: proxy configuration
├── Step 14: → visual-tester (visual UI verification)
│      └── FAIL → coder → redeploy → visual-tester (max 1×)
├── Step 15: → summarizer (final summary + YouTrack comment)
├── Step 15b: Tech Debt sub-tasks [CONDITIONAL]
├── Step 16: finalisation → To Verify
├── Step 17: Workflow Execution Log (+ token/cost telemetry)
└── Step 18: Pipeline State File (.pipeline_state)

⟳ Graphics retry

Graphics Agent
Max 1 iteration

⟳ Game Graphics retry

Game Graphics Agent
Max 1 iteration

⟳ Review loop

Coder ↔ Reviewer
Max 2 iterations

⟳ Test loop

Coder ↔ Tester
Max 2 iterations

⟳ Health check loop

Coder ↔ Health Check
Max 1 iteration

⟳ Visual loop

Coder ↔ Visual Tester
Max 1 iteration

// More workflows

7 autonomous workflows

🚀

Issue Handling (the main pipeline)

The full 18-step workflow from an Open issue to an app deployed on staging. Delegation to 11 agents, feedback loops, telemetry.

Open → 18 steps → To Verify → .pipeline_state
🔁

Incremental re-run

A shortened workflow activated through .pipeline_state when the user sends an issue back for rework. It skips setup, clone, conditional agents and PR creation. Around 50 % time saved.

New comments → coder → reviewer → tester → redeploy → visual-tester → summarizer
✅

AutoVerify

Automatic merge of verified issues into the auto-verify branch and chaining on to the next issue. Per-project locking lets different projects run in parallel.

To Verify + autoVerify=true → Merge into auto-verify → State → Waiting → Next issue activated → Manual merge into main
📄

Design Document

Design documents written by the analyst, the architect and the designer, then published to the YouTrack Knowledge Base. Triggered by keywords such as "design", "specification" or "application plan".

analyst → architect → designer [CONDITIONAL] → Compilation → KB publication → To Verify
📅

Sprint Planning (KB → issues)

Decomposition of a KB document into structured YouTrack issues with dependencies and a sprint plan. Triggered by a request such as "create issues from [KB link]".

KB document → sprint-planner → Issues created in YouTrack → Dependencies linked
⚙

Workflow Improver

A daily cron agent that reviews the current state of the workflow (agents, CLAUDE.md, scripts) and proposes 1–2 concrete improvements as YouTrack issues.

Analysis of agents, CLAUDE.md, scripts → 1–2 proposals → Issues created in YouTrack
Daily at 9:17 UTC
📰

KB Updater

Daily content generation for two KB articles in the aipowereddevelopment project: 2 new tips on Claude/AI development (article A-1) and 1 piece of AI news (article A-2). The agent has a minimal toolset (Read, WebSearch, WebFetch) — no API credentials at all, every write is done by the orchestrator after the output has been sanitised.

Loading A-1 + A-2 → kb-updater (WebSearch deduplication) → Sanitisation → POST /api/articles → Tracking issue (To Verify)
Daily at 5:00 CEST (cron 0 3 * * *)
// Infrastructure

Deployment & conventions

🌐 Staging domain

URL a dedicated staging URL for every issue
SSL wildcard certificate for the staging domain
1 level → covered by the wildcard certificate ✓
2+ levels → not covered by the certificate ✗
// A wildcard cert covers a single subdomain level only
// a multi-level subdomain → SSL error
certificate = wildcard("staging domain").covers("1 level")

🐳 Docker

Project a separate Docker Compose project per issue
Working dir a separate directory per issue
Forward host Docker bridge gateway
NPM API internal, not reachable from outside
# Starting the project
docker compose -p <issue-id> up -d

# Proxy: UPDATE the existing one, never DELETE
PUT /api/nginx/proxy-hosts/<id>

📊 Workflow Execution Log (step 17)

Every run is written as a single JSONL line into the central log. Token telemetry is filled in after the run by a deterministic post-processor.

issue_id, started_at, finished_at, duration_minutes
agents_run[]: agent, status, iterations,
  tokens {input, output, cache_*, cost_usd}
totals: {input, output, cache_*, cost_usd}
openrouter_cost_usd: grafika/herni-grafika
pr_url, staging_url, final_status
tech_debt_issues[], disk_usage_pct

💾 Pipeline State File (step 18)

The JSON file .pipeline_state in the issue directory — it enables the incremental re-run. When the pipeline script detects it, it adds INCREMENTAL_RERUN=true to the prompt.

{
  "last_run_at": // ISO 8601 UTC
  "pr_url": // the existing PR
  "staging_url": // staging URL of the issue
  "commit_sha": // the last commit
  "final_status": "To verify",
  "branch": // branch name
}
// Lifecycle

YouTrack issue states

Open
→
In Progress
→
To Verify
→
Done
The alternative path when a blocker appears:
In Progress
→
Waiting

🛑 Falling back to Waiting

This happens when the review/test loop runs out of iterations without success, when the health check fails, on a critical blocker with no way forward, or when input from the user is missing. The issue receives a comment explaining the reason and the information needed.

📝 YouTrack comments

After every agent finishes, a comment is posted to the YouTrack issue with a prefix matching the agent:

📄 Project Doc: <output>
🏗 Architect: <output>
🎨 Designer: <output>
🖼 Grafika: <output>
🎮 Herni Grafika: <output>
🔧 Coder: <output>
📋 Reviewer: <output>
🧪 Tester: <output>
👁 Visual Tester: <output>
📝 Summarizer: <output>

🧹 Cleanup (the Done state)

When Done issues are cleaned up, the pipeline automatically:

# 1. Stops the containers of the issue
docker compose down

# 2. Removes the working directory
rm -rf <working directory>

# 3. The proxy host is NEVER deleted!
# (because of the SSL certificate)