Skip to content

feat(queen): rail fix + layer 4 AGENTS (9) — 27 agent specs, experience join, Agent Explorer - #976

Merged
gHashTag merged 3 commits into
mainfrom
feat/queen-agents-layer4
Sep 9, 2026
Merged

gHashTag merged 3 commits into
mainfrom
feat/queen-agents-layer4

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Round 2 — item A (rail bug) + item B (layer 4: AGENTS)

Two commits, in order, so the rail fix can be cherry-picked on its own:

  1. fix(queen): command rail derives its rows from the item count, COLLAPSE stays last
  2. feat(queen): layer 4 AGENTS (9) — 27 agent specs, experience join, Agent Explorer

Companion t27 PR: specs/agents (27 specs + README) and the i18n SCOPE change — the vendored copies under public/t27/files/specs/agents/ and specs/i18n/ in this PR are byte-identical to it (README differs only by the "Where this lives" note in t27).

A. Rail fix (src/pages/Queen.css, QueenCommand.tsx, qa/queen-viewport-contract.mjs)

  • Cause: .queen27-page.is-shell .queen27-hud-command { grid-template-rows: repeat(6, auto) minmax(0,1fr) auto } hardcoded six rows; SKILLS (7), CRONS (8) and now AGENTS (9) fell into the spacer track under «СВЕРНУТЬ».
  • Fix: the rail is a flex column; COLLAPSE pins to the bottom with margin-top: auto; the item count is read from commandItems (data-views, --queen-views, --queen-tile-rows on the nav). Below 760 px height the rail becomes two columns of tiles with COLLAPSE as the last full-width row (the media block is placed after the base rules so display:grid wins the cascade — same specificity).
  • QA: queen-viewport-contract.mjs gains 1280×700 and rail assertions (RAIL COUNT MISMATCH / ITEM OUTSIDE / OUT OF ORDER / COLLAPSE ABOVE A VIEW BUTTON). No other repeat(6/nth-child(6) selector was tied to the rail (Queen.css hud-res rules are the top bar, unrelated).
  • Measured with headless Chromium (playwright cache) at 1280×600 / 700 / 900, RU: 9 items above COLLAPSE, no overflow (collapseBelowAll=true, overflow=false at all three). Screenshots attached in the report.

B. Layer 4 — AGENTS (key 9, «АГЕНТЫ» / AGENTS)

  • Specs: 27 × specs/agents/<letter>.t27 (module agent_<letter>, KIND="agent", ID="t27/", LETTER, NAME, DOMAIN, ARCHETYPE, REGISTER, LAYER, SOUL, AGENTS_DOC, ALPHABET, KEY_FILES, ENTRY/EXIT_INVARIANT, CLARA_ROLE, SKILLS + SKILLS_NOTE, EXPERIENCE_LOG, ENABLED). 27/27 typecheck ok through public/t27/t27_compiler.wasm. English-only (rg '[\p{Cyrillic}]' public/t27/files/specs → empty).
  • Skill binding rule (README): a skill is bound only when a source evidently binds it. Today only T (.claude/agents/trinity.md names phi-loop and tri-pipeline); the other 26 carry SKILLS = [] and a SKILLS_NOTE. OWNERS.md rows are catalog ownership, not held skills.
  • Experience (scripts/sync-agents-experience.mjs → public/agents/experience.json): reads .trinity/experience/** from this checkout (440 files, 383 episodes, 56 unreadable, 1 note) and from the t27 checkout via T27_ROOT (2 files, 3 episodes). Attribution rule is explicit (attribution.fields, attribution.letters). Result: 0 attributed, 386 unattributed — no episode names an agent letter ((no agent field) ×385, claude-opus-4.6 ×1). Nothing is assigned by guess.
  • Generator (scripts/agents-from-specs.mjs → public/agents/spec-agents.json): skills resolved (unknown id fails), crons derived from RUNS (0 today — no cron spec has RUNS), experience joined by LETTER, SOUL.md / AGENTS.md / alphabet links pinned at the t27 snapshot commit (2de523f), witness spec+experience | spec-only (27 spec-only), ladder {specs 760, skills 26, crons 33, agents 27}. --check covers the new output.
  • i18n: specs/i18n/agents-ru.t27 SCOPE → ["specs/skills","specs/crons","specs/agents"]; apps/website/i18n/agents.ru.json +27 entries; coverage 27/27.
  • UI: src/pages/AgentExplorer.tsx (#/agents, ?agent=<LETTER>, ?embed=1) — ladder header Specs → Skills → Crons → Agents with live counts; library of 27 letters grouped by LAYER; detail = SPEC panel first (AgentSpecPanel kind="agent"), «Душа и закон», skills chips → #/skills?skill=, crons chips → #/crons?cron=, «Опыт» (says "no attributed episodes" when 0 and shows the snapshot's unattributed count), «Инварианты», «Инструменты» placeholder (layer 5), CONTROL strip (Изменить в спеке → / Открыть SOUL.md / AGENTS.md / Журнал опыта). Queen: view + module agents key 9 (HUD_KEYS 1-9,0,p), ModulesBlock eight → nine. Route in src/main.tsx.

Checks run (cwd apps/website)

npm run prebuild · node --test scripts/agents-from-specs.test.mjs (30 pass) · node scripts/agents-from-specs.mjs --check · node scripts/sync-agents-experience.mjs --check · npm run typecheck + node scripts/typecheck-ratchet.mjs (179/26 = baseline) · npm run lint (180 = baseline) · npm run build · check:agents · check:spec-catalog · check:skills-catalog · check:crons-catalog · check:explorer-languages (5 pages) · check:queen-languages · check:shared-core · check:queen-{atlas,treasury,catalog,continuous,spec-mirrors,coverage,worlds,city,construction,hardware,responsive} — all PASS. check:queen-viewport (Chromium): no rail failures; remaining failures are pre-existing on main (UNDECLARED SCROLLER .queen27-hud-viewport, STATUS SLOT MISSING alerts, NOT EXACTLY ONE VIEW RENDERED comb, phone .is-compact horizontal scroller). Pre-existing FAIL unchanged: check:queen-{honesty,cycle,factory,review}.

Boundaries

  • in vendored corpus manifest: 0/59+27 — public/t27/manifest.json is not hand-edited; sync-t27-specs re-run is the owner's step.
  • No episode is attributed to any agent: the experience section is honest about that, not decorative.
  • .tool_artifacts/ untouched. No secrets. Do not merge — owner review.

…SE stays last

The shell rail hardcoded grid-template-rows: repeat(6, auto) minmax(0,1fr) auto,
so every view added after the sixth (SKILLS, CRONS, and now AGENTS) rendered
below COLLAPSE in the spacer track. The rail is now a flex column: buttons
stack from the top, COLLAPSE pins to the bottom with margin-top:auto, and the
item count is read from commandItems (data-views / --queen-views /
--queen-tile-rows on the nav). Below 760px height the rail becomes two columns
of tiles with COLLAPSE as the last full-width row; the media block sits after
the base rail rules so its display:grid wins the cascade (same specificity).

qa/queen-viewport-contract.mjs gains 1280x700 and rail assertions (count
matches data-views, every view button inside the rail and in order, COLLAPSE
below every view button). Measured with headless Chromium at 1280x600/700/900:
9 items above COLLAPSE, no overflow.
…ent Explorer

Specs -> Skills -> Crons -> Agents. The 27 letters of docs/agents/AGENTS_ALPHABET.md
(A..Z + Ti) are now spec-first: t27 specs/agents/<letter>.t27 (module agent_<letter>,
KIND="agent") vendored byte-identical under public/t27/files/specs/agents/, 27/27
typecheck ok through the real wasm compiler; README documents the schema, the
four-layer ladder, the skill-binding rule (a skill is bound only when a source
evidently binds it: today T alone, via .claude/agents/trinity.md) and the known
source inconsistencies. RU summaries travel through the same i18n contract:
specs/i18n/agents-ru.t27 SCOPE gains specs/agents (both copies identical) and
apps/website/i18n/agents.ru.json gains 27 entries.

Experience is evidence, not vibes: scripts/sync-agents-experience.mjs reads
.trinity/experience/** from this checkout and from the t27 checkout (T27_ROOT)
and writes public/agents/experience.json with an explicit attribution rule
(fields + letters). Snapshot: 386 episodes, 0 attributed, 386 unattributed,
56 unreadable files — the page says "no attributed episodes" rather than
assigning anybody.

scripts/agents-from-specs.mjs -> public/agents/spec-agents.json: skills resolved
(unknown id fails), crons derived from RUNS, experience joined by LETTER,
SOUL.md / AGENTS.md / alphabet links pinned at the t27 snapshot commit, witness
spec+experience | spec-only, ladder counts. Tests 30 pass; qa/agents-spec-contract
covers 27 agents, order, links, joins, Queen views/modules/keys.

UI: src/pages/AgentExplorer.tsx (#/agents, ?agent=<LETTER>, embed) with the
ladder header, spec panel first, Soul & law, skills/crons chips, experience,
invariants, tools placeholder (layer 5); AgentSpecPanel accepts kind="agent";
Queen view/module `agents` key '9' (HUD_KEYS 1-9,0,p), ModulesBlock eight -> nine.
…OT defaults to the sibling checkout

Mirrors t27 9874cc6c (specs/agents/README.md byte-identical again). Experience
snapshot re-read at trinity dbed090 / t27 9874cc6c; counts unchanged
(386 episodes, 0 attributed).
@gHashTag
gHashTag merged commit eb3c01e into main Sep 9, 2026
22 of 27 checks passed
github-actions Bot added a commit that referenced this pull request Sep 9, 2026
Merge pull request #976 from gHashTag/feat/queen-agents-layer4

feat(queen): rail fix + layer 4 AGENTS (9) — 27 agent specs, experience join, Agent Explorer
@gHashTag
gHashTag deleted the feat/queen-agents-layer4 branch September 9, 2026 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant