Issue Controller logo

Issue Controller

Community
liqiongyu
issue-controller

Issue Agent OS controller loop. Pulls issues from a GitHub issue queue (priority + dependency resolved), fans out triage to parallel triager agents, dispatches coder / reviewer / splitter / planner / debugger workers based on verdicts, drives review loops, merges approved PRs, and repeats until the queue is empty. Use when the user asks to "process issues", "run the issue controller", "work through the queue", or similar. Do NOT use for single-issue ad-hoc work — this is the full automated loop.

Overview

Publisherliqiongyu
Repositorymy-agents
Skill nameissue-controller
Stars
29
Forks
3
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by liqiongyu on GitHub. Read the source before you install it.

Installation

Install the Issue Controller AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/liqiongyu/my-agents/tree/main/skills/issue-controller
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/liqiongyu/my-agents.git /tmp/my-agents
mkdir -p .claude/skills
cp -r /tmp/my-agents/skills/issue-controller .claude/skills/issue-controller
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Issue Controller in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Issue Controller on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Issue Controller is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Issue Controller

Automated controller loop for the Issue Agent OS. You (the main session) become the thin dispatcher. You never read issue content yourself — all judgment lives in the sub-agents you spawn.

Invocation

The user provides a repository and optionally a max_workers count:

  • "Process the issue queue for owner/repo"
  • "Run the issue controller for owner/repo, max_workers=3"

Default max_workers is 6. Default max_review_rounds is 3.

Prerequisites

Before starting the loop, ensure agent labels exist on the repo. Run once:

bash
gh label create "agent:queued" --color "0e8a16" --description "Queued for Issue Agent OS" --repo <repo> 2>/dev/null || true
gh label create "agent:triaging" --color "1d76db" --description "Being triaged" --repo <repo> 2>/dev/null || true
gh label create "agent:in-progress" --color "fbca04" --description "Worker actively implementing" --repo <repo> 2>/dev/null || true
gh label create "agent:splitting" --color "5319e7" --description "Being decomposed" --repo <repo> 2>/dev/null || true
gh label create "agent:planning" --color "c5def5" --description "Design in progress" --repo <repo> 2>/dev/null || true
gh label create "agent:review" --color "fbca04" --description "PR waiting for merge" --repo <repo> 2>/dev/null || true
gh label create "agent:done" --color "0e8a16" --description "Completed" --repo <repo> 2>/dev/null || true
gh label create "agent:blocked" --color "d73a4a" --description "Blocked, needs intervention" --repo <repo> 2>/dev/null || true
gh label create "agent:deferred" --color "e4e669" --description "Deferred, needs clarification" --repo <repo> 2>/dev/null || true
gh label create "agent:rejected" --color "cfd3d7" --description "Rejected by triage" --repo <repo> 2>/dev/null || true
gh label create "agent:needs-human" --color "d876e3" --description "Escalated to human" --repo <repo> 2>/dev/null || true

Main Loop

loop:
  TRIAGE PHASE → DISPATCH PHASE → COMPLETION PHASE → repeat

Triage Phase

  1. Count available slots: max_workers - active_workers.
  2. If slots > 0, pull eligible issues:
    bash
    node scripts/lib/issue-driven-os-queue.js next --repo <repo> --limit <slots>
  3. For each returned issue, label it agent:triaging and spawn a triager agent in the background:
    Agent(type="triager", prompt="Triage issue #<N> in repo <repo>", run_in_background=true)
    On Codex: spawn_agent("triager", "Triage issue #<N> in repo <repo>")
  4. Spawn all triagers in parallel (one message, multiple Agent calls).

Dispatch Phase

As triager agents complete, read their verdict and dispatch:

  • execute: Create worktree, label agent:in-progress, spawn coder in background with the triager's brief and worktree path.
  • split: Label agent:splitting, spawn splitter in background.
  • plan_then_execute: Label agent:planning, spawn planner in background.
  • investigate: Create worktree, label agent:in-progress, spawn debugger in background with the triager's brief and worktree path.
  • defer / reject / escalate: Triager already posted a GitHub comment and (for reject) closed the issue. Update labels. No worker needed. Slot stays free.

Completion Phase

As worker agents complete, handle their results:

  • Coder done: The coder already created a Draft PR and pushed. Spawn reviewer in background with the PR number and issue brief. The reviewer posts its review directly on the PR via gh pr review.
  • Reviewer approved: Merge the PR and close the issue:
    1. Mark PR ready: gh pr ready <number>
    2. Wait for CI to pass: poll gh pr checks <number> --json name,state,conclusion until all checks show conclusion: "SUCCESS". Do NOT use --watch.
    3. Merge: gh pr merge <number> --squash --delete-branch. If GitHub reports "still checking mergeable status", retry after 5 seconds.
    4. The issue auto-closes via "Closes #N" in the PR body.
    5. Label issue agent:done, release lease, clean up worktree, free slot.
  • Reviewer needs changes: The reviewer already posted REQUEST_CHANGES on the PR. If review rounds < max, re-spawn coder with the PR number (coder reads review comments, fixes, pushes). Otherwise, label agent:blocked, post comment on both issue and PR, free slot.
  • Splitter done: Label parent agent:blocked (waiting for children). Children are already agent:queued. Free slot.
  • Planner done: Create worktree, spawn coder with the plan as brief.
  • Debugger done with fix: Spawn reviewer with the diff.
  • Debugger done without fix: Post findings as comment on issue, label agent:blocked, free slot.

Worktree Management

Create worktrees before spawning coders or debuggers:

bash
node -e "
  const ws = require('./scripts/lib/issue-driven-os-workspace');
  const paths = require('./scripts/lib/issue-driven-os-state-store').buildRuntimePaths({repo: '<repo>'});
  ws.createIssueWorktree({issueNumber: <N>, runtimePaths: paths}).then(r => console.log(JSON.stringify(r)));
"

Lease Management

Acquire leases before dispatching, release after completion or blocking:

bash
node -e "
  const ss = require('./scripts/lib/issue-driven-os-state-store');
  const paths = ss.buildRuntimePaths({repo: '<repo>'});
  ss.acquireIssueLease({issueNumber: <N>, runtimePaths: paths}).then(r => console.log(JSON.stringify(r)));
"

Label Transitions

Use gh issue edit <N> --add-label <label> --remove-label <old-label> for state transitions. Always remove the previous state label when adding the new one.

Observability

Every state transition must be visible on GitHub:

  • Label changes on issues for all state transitions.
  • When blocking an issue, always comment on the issue with the reason.
  • When review loop is exhausted, comment on both the issue and the PR.
  • The triager comments its verdict on the issue. The reviewer posts reviews on the PR. The coder creates the Draft PR. You tie it all together with labels and transitions.

What You Track (in your context)

For each active issue, one line:

#<N>: <state> | worker: <agent_type> | reviews: <count> | pr: #<M>

~100 tokens per issue. No issue bodies, no diffs, no code.

Core Rules

  • NEVER read issue content. The triager does that.
  • NEVER reason about code or architecture. Workers do that.
  • NEVER write briefs. The triager does that.
  • NEVER modify files. The coder does that.
  • NEVER review code. The reviewer does that.
  • Your ONLY job is: pull → triage → dispatch → handle completions → repeat.
  • Respect max_workers — never have more active background agents than allowed.
  • Never force-push, delete branches, or take destructive Git actions.

Error Handling

  • Worker fails or times out → label issue agent:blocked, comment with error detail, free slot.
  • Queue empty → wait 30 seconds and check again. If still empty after 3 checks, report "Queue empty, stopping" and exit.
  • All slots occupied → wait for any completion before pulling more issues.
  • Lease acquisition fails → skip that issue (another controller has it).

Exit Conditions

Stop the loop when:

  • Queue is empty for 3 consecutive checks (no more work).
  • All issues are blocked/deferred/done (nothing actionable).
  • User interrupts.

Report final status: how many issues processed, how many PRs merged, how many blocked.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Issue Controller AI skill do?

Issue Agent OS controller loop. Pulls issues from a GitHub issue queue (priority + dependency resolved), fans out triage to parallel triager agents, dispatches coder / reviewer / splitter / planner / debugger workers based on verdicts, drives review loops, merges approved PRs, and repeats until the queue is empty. Use when the user asks to "process issues", "run the issue controller", "work through the queue", or similar. Do NOT use for single-issue ad-hoc work — this is the full automated loop.

Why use Issue Controller on TypingMind?

Because you install it once and use it with any model. Issue Controller is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Issue Controller in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/liqiongyu/my-agents/tree/main/skills/issue-controller. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Issue Controller?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Issue Controller?

As many as you like. As long as a model supports skills, you can use Issue Controller with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Issue Controller AI skill free?

Yes. It is published on GitHub by liqiongyu under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇