Self-Hosted AI Delivery Fabric — Architecture Deep Dive
Issue → agent → CI → PR pipeline design with policy gates and human approval.
Self-Hosted AI Delivery Fabric — Architecture Deep Dive
Design notes for AI Fabric — a self-hosted alternative to cloud-only “AI dev tools” that keeps code, issues, and runners on your own Gitea instance.
Design goals
- Gitea as SSOT — issues, branches, PRs, and Actions stay in one place
- Policy before merge —
fmt,lint,testare hard gates, not suggestions - Human in the loop — agents open PRs; humans approve merges
- Observable control plane — Telegram bot for status without SSH
Request flow
flowchart LR
Issue[Gitea Issue] --> Handler[issue-handler]
Handler --> Agent["cursor-agent / MCP"]
Agent --> Branch[Feature Branch]
Branch --> CI[Gitea Actions]
CI -->|pass| PR[Pull Request]
CI -->|fail| Agent
PR --> Human[Human Review]
Human --> Merge[Merge]
TgBot[Telegram Bot] --> Handler
Why not GitHub Copilot-only?
- Private Gitea (
git.produktor.io) holds proprietary stacks - Runners and LLM endpoints stay on-premises (Ollama-compatible)
- Issue → PR automation must respect repo-specific CI and branch policies
Components
| Layer | Responsibility |
|---|---|
issue-handler | Orchestration, retries, PR body policy |
gitea-mcp | Tool surface for agents (repos, issues, files) |
gitea-runner | Isolated CI execution (act_runner replicas) |
tg-bot | Notifications and manual triggers |
Related
This post is licensed under CC BY 4.0 by the author.