The Lead Stack: Agent-Agnostic Workflows
intent-brief → spec → plan → diff → review-report → release

A high-performance repository of "Skills" and RTK-powered tools designed for
Tech Leads. These workflows are Agent-Agnostic, allowing any LLM agent
(Gemini, Claude, GPT) to assist with implementation planning, code review, and
automated testing.
Live Web App:
https://ai-tech-lead-stack.vercel.app
Setting this up with an AI assistant? There's a prompt written for that:
Set this up with an AI assistant. It
checks your computer, asks what you want help with, sets everything up, and
answers your questions afterwards.
Contents
How it fits together
There are two ways in: the web dashboard and your IDE's coding agent. Both use
the same shared core (packages/core). Both can also change code:
- The web app mostly reads your linked GitHub repo, but a few routes commit
to its
feat/* and discovery/* branches or trigger its GitHub Actions
(close-up 4).
- In the IDE, your coding agent edits files, and the MCP server's
apply_patch tool can write them too (close-up 7).
The overview comes first. It is followed by the web app flow, then the IDE
flow, and finally the telemetry both flows share. Colours are the same in
every diagram: purple for people, blue for the dashboard, green for the shared
core and MCP server, and pink for storage and outside services. Dashed lines are
optional or conditional calls. Thick arrows are writes to code or to a Git repo.
flowchart LR
dev(("Developer<br/>in browser"))
agent(("IDE coding agent"))
dash["Dashboard app<br/>apps/dashboard"]
subgraph core["Shared core · packages/core"]
mcp["MCP server"]
libs["Reflexion engine · skills<br/>model resolver · telemetry"]
end
repo["Your project repo<br/>on GitHub"]
code[("Files on your machine<br/>(MCP working directory)")]
ext[("Postgres · AI providers<br/>E2B · ClickUp · Figma · Discord · Ollama")]
dev -->|"uses"| dash
agent -->|"calls MCP tools"| mcp
agent ==>|"edits"| code
mcp ==>|"reads · apply_patch writes"| code
dash -->|"uses"| libs
mcp -->|"uses"| libs
dash ==>|"reads · commits to feat/* and discovery/*<br/>branches · triggers Actions"| repo
dash -->|"app data · models · sandboxes · webhooks"| ext
libs -->|"app data · models · telemetry"| ext
mcp -->|"code_search embeddings"| ext
classDef actor fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef app fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef coreNode fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef extNode fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
class dev,agent actor
class dash app
class mcp,libs coreNode
class repo,code,ext extNode
Web app flow
Everything the dashboard (apps/dashboard) does. You sign in with GitHub, and
routes that touch GitHub use your GitHub token on the project's linked repo.
Model calls use the API keys you saved in Settings, and fall back to the
server's env keys.
1. Chat and feature discovery
Chat streams replies from your chosen model and saves the conversation. When the
project has a linked repo, it reads code from that repo on GitHub. Otherwise its
tools read skills and files from the dashboard server's own toolbox checkout.
Slash-command workflows always come from the toolbox. The ClickUp and Figma
tools only read, and only work when the project has those keys saved. Feature
discovery streams a planning conversation; its one tool, write_to_sandbox,
runs in your browser (close-up 3). Both routes also read your user and project
records.
flowchart LR
discovery["Feature discovery<br/>api/orchestrator/discovery"]
chat["Chat<br/>api/chat"]
db[("Postgres")]
ai["AI model providers"]
tools["ClickUp · Figma<br/>read-only"]
github["Your project repo<br/>on GitHub"]
toolbox[("Toolbox skills<br/>and workflows")]
core["Telemetry<br/>(see close-up 9)"]
discovery -->|"streams replies"| ai
chat -->|"saves chats and messages"| db
chat -->|"streams replies"| ai
chat -.->|"reads tasks and designs"| tools
chat -.->|"reads code (repo linked)"| github
chat -->|"slash workflows · skills<br/>when no repo is linked"| toolbox
chat -->|"records events"| core
click chat "https://github.com/bronz3beard/ai.tech-lead-stack/blob/main/apps/dashboard/src/app/api/chat/route.ts"
click discovery "https://github.com/bronz3beard/ai.tech-lead-stack/blob/main/apps/dashboard/src/app/api/orchestrator/discovery/route.ts"
classDef actor fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef app fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef coreNode fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef extNode fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
class chat,discovery app
class core coreNode
class tools,github,toolbox,ai,db extNode
2. Reflexion from the web app
The Reflexion route reads package.json and tsconfig.json from your linked
repo for context, then runs the reflexion engine. The engine drafts a plan,
critiques it and revises it, saving progress to the ReflexionRun table after
each step. Every step is also recorded as telemetry. You get back a plan and an
IDE prompt to apply yourself. The resume route continues a paused run the same
way, without reading GitHub.
flowchart LR
dev(("Developer<br/>in browser"))
reflexapi["Reflexion route<br/>api/orchestrator/reflexion"]
github["Your project repo<br/>on GitHub"]
engine["Reflexion engine<br/>engine.ts"]
runner["Model runner<br/>providers-user"]
ai["AI model providers"]
dbstore["DbStateStore"]
db[("Postgres<br/>ReflexionRun")]
telemetry["Telemetry<br/>(see close-up 9)"]
dev -->|"starts a run"| reflexapi
reflexapi -.->|"reads package.json<br/>and tsconfig.json"| github
reflexapi -->|"runs loop"| engine
engine -->|"drafts and critiques"| runner
runner -->|"your saved keys,<br/>else env keys"| ai
engine -->|"saves progress"| dbstore
dbstore --> db
reflexapi -->|"records each step"| telemetry
reflexapi -->|"plan + IDE prompt"| dev