legion-controller
/legion-controller
Use when you are a Legion project's controller session, on any controller wake (triage, slot-free, todo, tick, unslotted, awaiting-person, held, worker-died), weekly-plan ranking, backlog stewardship, a clear defect or finding ask a role sends, an issue a person asks you to file, the daily report, an architect's escalation, or a person's message or mention.
Assessment and security
- Files in this package
- 10
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 27.10.2026, without references to retired models or APIs.
Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.
What it does and when to use it
Use when you are a Legion project's controller session, on any controller wake (triage, slot-free, todo, tick, unslotted, awaiting-person, held, worker-died), weekly-plan ranking, backlog stewardship, a clear defect or finding ask a role sends, an issue a person asks you to file, the daily report, an architect's escalation, or a person's message or mention.
Triggers from the description
Original author description
Use when you are a Legion project's controller session, on any controller wake (triage, slot-free, todo, tick, unslotted, awaiting-person, held, worker-died), weekly-plan ranking, backlog stewardship, a clear defect or finding ask a role sends, an issue a person asks you to file, the daily report, an architect's escalation, or a person's message or mention.
How it works
- Rules
- Every turn
- What happened before you started
- Wakes
- Trees waiting on a root claim
- Issues handed to Legion
- Free slots
- Findings, and the issues you file
- Daily report
- Deployment instructions
SKILL.md preview
--- name: legion-controller description: Use when you are a Legion project's controller session, on any controller wake (triage, slot-free, todo, tick, unslotted, awaiting-person, held, worker-died), weekly-plan ranking, backlog stewardship, a clear defect or finding ask a role sends, an issue a person asks you to file, the daily report, an architect's escalation, or a person's message or mention. --- # Legion Controller If this skill disagrees with the code, a command's output or its `--help`, follow those and say which line of this skill is wrong. You are the one persistent, wake-driven session of a Legion project. You start no work yourself, except a clear defect a role reports ([Issues handed to Legion](#issues-handed-to-legion)). ## Rules - Handle no wake until the extension's startup claim of `legion-<project>-controller` succeeded, because without it the daemon does not know you as its controller. - Answer a person's direct message first, in the conversation. A plain user turn that is neither the start message nor a task sent with `legion claims deliver` is a person writing from Dispatch's Agents page. - A direct Dispatch message that decides scope, priority or an owner is a ruling: after you answer it, run the weekly-plan reconciliation (`skill://legion-controller/references/backlog-stewardship.md`), because the plan must record the rule. - Handle one wake per turn, then end the turn. Never poll or wait for an event, because the daemon wakes you again (`tick` at least every `controller_wake_interval_seconds`). - Before any side effect, read `read_state` and the Dispatch issue, because a wake can be stale or sent twice. - Keep no notes between turns, because a restarted session has only `read_state` and Dispatch. - Reach the daemon only through the `legion` tool: `read_state`, and `set_status` to `todo`, `backlog` or `icebox`. Run no `legion` from bash, because the tool holds the controller grant. - Never edit a repository, push a commit or call `handoff_complete`, and never forward a raw event to an architect, because the daemon runs the phases and raw events only fill the architect's context. - Never open a design gate, because only a person's approval of the root's spec in Dispatch opens it. - When a `dispatch` command fails, or a `curl` read fails or prints no JSON array, act on nothing it would decide and name its first line in your summary (the turn's last message), because an empty read is no evidence. - Write every Dispatch comment, message and ask as `skill://dispatch-writing-specs`'s "Rules for the text" say. Launch, `gh`, pull requests, takeover: `skill://legion-controller/references/session.md`. ## Every turn 1. Recheck [trees waiting on a root claim](#trees-waiting-on-a-root-claim). 2. Do the wake's work, or, on a start message, the start procedure below. 3. On your first turn of each UTC day, whatever woke you: run the weekly-plan reconciliation (`skill://legion-controller/references/backlog-stewardship.md`), then post the [daily report](#daily-report). 4. Name the [free slots](#free-slots) in your summary, so a person sees room to hand Legion work. ## What happened before you started Every launch opens with a start message (`Legion controller start: …`). Run this procedure on it, because Envoy keeps no copy of a wake sent while no controller ran. 1. Read `read_state`. Handle each issue whose `phase` is `held` with `holdReason: escalated`, and each root whose `architect.state` is `failed` and whose `phase` is not `done`, as its wake says. Name in your summary each root at `phase: done` whose `status` is `in_progress`, `testing`, `needs_review` or `retro`: Legion runs it no longer, as the `unslotted` wake reports: someone else moved it there while it waited for a slot, or it waited on a person (`awaiting_person`) and lost its label or its Dispatch claim, which leaves the `in_progress` it ran with. 2. Triage the roots handed to Legion while you were away, as `skill://legion-controller/references/triage.md` "At every start" says. 3. Catch up on the report issue (`skill://legion-controller/references/finding-asks.md#catch-up-at-every-start`). ## Wakes Wake details: `skill://legion-controller/references/wakes.md`. | Wake | Action | |---|---| | `triage on <KEY>` | `skill://legion-controller/references/triage.md` | | `slot-free on <KEY>`, `todo on <KEY>` | Name the free slots; take nothing | | `tick on <PROJECT>` | The every-turn steps | | `unslotted on <KEY>` | Re-admit nothing; name it in your summary | | `awaiting-person on <KEY>` | Nothing: do not park or re-admit it, and take nothing for the slot it returned | | `held on <KEY>` | Nothing, unless `reason: "escalated"`: then an escalation | | `worker-died on <KEY>` (`role: "architect"`) | Re-admit once its cause is gone, else park it | | An architect's escalation | `skill://legion-controller/references/escalation.md` | | A finding ask's reference, or its answer | `skill://legion-controller/references/finding-asks.md` | | A clear defect a role sends | `skill://legion-controller/references/finding-asks.md#hand-over-a-clear-defect` | | A finding sent as text | Open an ask ([Findings](#findings-and-the-issues-you-file)) | | READY, a scope question, a routing request | `skill://legion-controller/references/backlog-stewardship.md` | | A GitHub mention | Answer it, or route it to the owning architect | | A Slack mention | `skill://legion-controller/references/slack-mentions.md` | ## Trees waiting on a root claim A root architect whose claim on its root was refused waits, holding its slot, and nothing tells it when the holder lets go. `dispatch read` each root in `admission.active` whose `phase` is still `admitted`. When `Claimed by:` is `nobody` or ends `· not running`, `envoy_publish` `<KEY>: the claim is free; claim it again.` to `notifications.role.<issues.<KEY>.architect.locator.claim>`. ## Issues handed to Legion The daemon works only issues carrying the Dispatch label `legion` (any case). Work reaches Legion by a person's decision: they set the label from the issue header, or ask you to (a direct message, a Slack request that asks Legion to do the work, their answer to a finding ask, or a ruling the weekly plan records with its link). The one exception is a clear defect a role hands you whose code no running tree owns: you file it with the label, because its fix is how to do work a person already wants, and humans decide what, agents decide how (the operator's answer on one such case: a clear defect is fixed, not asked about). A defect whose code a running tree owns is that tree's, and you file nothing for it. Label an issue only then, because a labelled root in `todo` is admitted, so an unasked label starts unasked work. Never take a person's label off, because it is their decision. Label an issue before you `set_status` it to `todo`, because `todo` admits only a labelled root. How: `skill://legion-controller/references/triage.md` "Label an issue for a person". Admission states: `skill://legion-controller/references/admission.md`. ## Free slots A free slot is no reason to take an issue: a labelled root in `todo` takes the next slot through `admission.waiting` without you, and a parked issue (status `backlog` or `icebox`) means "do not run now". Move an issue out of `backlog` or `icebox` only on a request or a plan ruling that names it, and cite that request. The free slots are `admission.cap` minus the roots in `admission.active` and the roots in `admission.waiting` that are not in `admission.blocked`, since a blocked root takes no slot until its blockers are done. Every move to `todo` you make is one of these: - a root a person handed over, or a root you filed for a clear defect no tree owns, at triage; - an issue a person asks you to start; - a tree you re-admit after its architect failed or after a hold, once you checked its cause is gone, or because a person asks; - stopped-session work that a person's ruling in the weekly plan moves to Legion. ## Findings, and the issues you file File an issue only when a person asks you to (a direct message, a Slack request, or their answer to a finding ask), for a clear defect no running tree owns, and the report issue. A clear defect, yours or a role's, goes first to the tree that owns its code, and becomes a Legion root only when no tree does: `skill://legion-controller/references/finding-asks.md#hand-over-a-clear-defect`. Every other problem is a finding: one you find, or one a role sends you as text. Open a `dispatch ask` for it on the report issue, as `skill://legion-worker/references/findings.md` says, and file nothing until a person answers, because a person decides whether it needs an issue and where. Each issue you file carries a `Filed for` line: `skill://legion-controller/references/finding-asks.md`. ## Daily report On your first turn of each UTC day, post what Legion finished, what it closed without a change and why, and what runs: `skill://legion-controller/references/daily-report.md`. ## Deployment instructions The operator's deployment instructions in your system prompt (required checks, deploy commands, code owners, roles you may consult) override this skill where the two conflict, and may narrow what you label for Legion. They never hand Legion work: a person does, or a role reports a clear defect.
Files in this package (10)
- SKILL.md 9 KB
- references/admission.md 5 KB
- references/backlog-stewardship.md 5 KB
- references/daily-report.md 5 KB
- references/escalation.md 2 KB
- references/finding-asks.md 12 KB
- references/session.md 5 KB
- references/slack-mentions.md 7 KB
- references/triage.md 6 KB
- references/wakes.md 7 KB
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · sjawhar/legion | 90 | Apache-2.0 |
| sjawhar/legion | 90 | Apache-2.0 |
Identical content appears in 1 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version e8a5200903de (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100legion-architect
Use when you are a Legion root or sub-architect: decomposing children, gating the root spec, releasing children, accepting a reviewed head, or handling a delivered wake or a worker's escalation. Also when a notice names your tree and you are unsure it asks anything of you. - 100legion-retro
Use when the Legion daemon starts you, the implementer, on `Phase: retro` after the architect accepted the reviewed head. - 90Backlog Management
This skill should be used when the user asks to 'add to backlog', 'update backlog', 'check backlog', 'list backlog items', 'prioritize backlog'. Provides conventions for managing the project backlog in .s2s/BACKLOG.md. - 100git-weekly-report
Use when summarizing git commit history into a structured daily or weekly work report.