Repository navigation
Queen roadmap from one .t27 source, live from the epics, read by the planner; plus self-diagnosis rules #9022
Copy link
Copy link
Open
Labels
Description
Owner, 2026-10-11 (translated): "The roadmap -- why is it not aware of the overall plan? Improve the logic." And: "why doesn't the Queen see these problems herself?" (see https://t27.ai/#/queen?tab=roadmap).
What is wrong today
- The roadmap is hand-written and stale. The roadmap tab reads trinity
apps/website/public/roadmap/goals.json: 9 goals written by hand and tied to the old epic [EPIC] t27 Language Roadmap: 12 workstreams (R-TT completion -> Trinity provenance) #1219. It also readsstack.json, last measured 2026-09-21. The current plan is invisible there:- the matryoshka (AGENTS.md: the matryoshka rule -- every layer is generated from .t27 and compiles itself #8920);
- t27b builds itself (Epic: t27b builds itself -- ELF, C-ABI bridge, self-built modules, fixed point #8951);
- t27o as a service (Epic: t27o as a service -- golden specs for every repo that installs the Trinity app, with zero LLM tokens #8998);
- dogfooding our repos (t27o dogfooding: clean our own target repos of hand-written foreign code, to a high quality standard #9000);
- effects at the edge (Epic: effects at the edge -- how t27 expresses I/O, network, threads, async, FFI, GPU, unsafe and Python dynamics #9008).
- The Queen has no model of the plan. She orders open issues only by priority labels (specs/queen/priority.t27). Goals and epics do not reach her planner, so bees follow whatever was filed last, not the roadmap.
- The Queen does not diagnose herself. On 2026-10-11, 48 of 70 lanes sat idle (see Queen: 48 of 70 bee lanes idle -- one dispatch per tick, derived files counted as conflicts, review behind finishing #9021) and none of her rules fired:
- "lanes-idle" fires only while work is dispatchable, and nothing was: every candidate was skipped;
- the skip reasons (fileConflict 228, completed 373) sit in /queen/status, but nothing acts on them;
- the one-per-tick cap is a policy, so nothing compares it with capacity.
Proposal
- One source:
specs/queen/roadmap.t27. It defines goals (id, stage, title en/ru, why), the epic issues each goal is made of, and each goal's done-criteria, with tests. Seed it from the current plan:- L0-L4 of the matryoshka;
- t27b self-build (Epic: t27b builds itself -- ELF, C-ABI bridge, self-built modules, fixed point #8951);
- t27o (Epic: t27o as a service -- golden specs for every repo that installs the Trinity app, with zero LLM tokens #8998);
- effects (Epic: effects at the edge -- how t27 expresses I/O, network, threads, async, FFI, GPU, unsafe and Python dynamics #9008);
- dogfooding (t27o dogfooding: clean our own target repos of hand-written foreign code, to a high quality standard #9000);
- silicon;
- the existing goals that still hold.
- Live progress. The Queen server computes each goal's progress from its epics' sub-issue states (open/closed, with PRs) and serves
/queen/roadmap; the tab reads it. goals.json and stack.json become generated outputs, re-measured on a schedule, not hand edits. - Plan-aware priority. Priority takes a goal weight (the stage and the critical path from roadmap.t27) as an input, so an issue under the current critical-path goal outranks an unlinked one at the same label level.
- Self-diagnosis rules in
specs/queen/self_health.t27, evaluated on every tick over the status the Queen already has. Each anomaly names its fix and is posted (board and issue), not just logged:- tick-capped: dispatch rate x mean turn < capacity;
- conflict-starved: fileConflict above 20% of candidates while lanes idle;
- completed-open: more than 50 completed issues still open;
- review-lagging: reviewedLastHour < finishedLastHour for N hours;
- fuel-low: dispatchable < idle lanes;
- roadmap-drift: the critical-path goal has had no claimed issue for N ticks.
Ownership
- The runtime is the Queen session's: Queen: 48 of 70 bee lanes idle -- one dispatch per tick, derived files counted as conflicts, review behind finishing #9021 is in progress there (K dispatches per tick, derived files free).
- The plan content (roadmap.t27 goals and the epic links) comes from the epic owners.
- The website tab reads the served data.
- No hand-written code grows (policy: hand-written code in any language but t27 may only shrink (Closes #8227) #8236); the rules are .t27.
User Scenarios
- Given the Queen server runs with
specs/queen/roadmap.t27defining goals and their epic links, when the server computes progress from live GitHub issue states, then/queen/roadmapreturns each goal with a current progress percentage derived from its epics' sub-issues (open/closed with PRs). - Given
specs/queen/self_health.t27defines self-diagnosis rules, when the Queen evaluates a tick and detects an anomaly (e.g., conflict-starved: fileConflict > 20% of candidates while lanes idle), then the anomaly is posted to the board and an issue is created with its named fix. - Given
specs/queen/priority.t27reads goal weights fromroadmap.t27, when two issues have the same priority label but one belongs to the critical-path goal, then the critical-path issue is ordered first.
Requirements
- FR-001: The file
specs/queen/roadmap.t27MUST exist and define goals with id, stage, title (en/ru), why, epic issue numbers, and done-criteria with tests. - FR-002: The Queen server MUST serve
/queen/roadmapwith live progress computed from each goal's epic sub-issue states (open/closed with PRs). - FR-003: The files
goals.jsonandstack.jsonMUST become generated outputs re-measured on a schedule, not hand-edited. - FR-004:
specs/queen/priority.t27MUST consume goal weights (stage and critical path) fromroadmap.t27so critical-path issues outrank unlinked ones at the same label level. - FR-005: The file
specs/queen/self_health.t27MUST exist and define rules evaluated every tick: tick-capped, conflict-starved, completed-open, review-lagging, fuel-low, roadmap-drift. - FR-006: Each self-diagnosis anomaly MUST name its fix and be posted to the board and as an issue, not only logged.
Success Criteria
t27c check specs/queen/roadmap.t27exits 0t27c check specs/queen/self_health.t27exits 0t27c check specs/queen/priority.t27exits 0curl -s /queen/roadmap | jq '.goals | length'returns 8 (L0–L4 matryoshka, t27b self-build, t27o, effects, dogfooding, silicon, plus existing valid goals)curl -s /queen/roadmap | jq '.goals[].progress'shows a number 0–100 for each goal derived from epic sub-issues- A Queen tick with 250 fileConflict candidates and 1000 total candidates while 48 lanes idle produces a "conflict-starved" anomaly posted to board and issue
- A Queen tick where dispatch rate × mean turn < capacity produces a "tick-capped" anomaly posted to board and issue
Boundary
- specs/queen/roadmap.t27
- specs/queen/self_health.t27
- specs/queen/priority.t27
- /queen
- specs/docs/chapters/queen.t27
- specs/docs/chapters/rules.t27
Reactions are currently unavailable
Activity
spec(queen): self_health.t27, the Queen's doctor -- a prescription fo…