Skip to content

feat(website): skills and crons as first-class .t27 specs; Queen modules SKILLS (7) and CRONS (8) - #975

Merged
gHashTag merged 5 commits into
mainfrom
feat/queen-skills-crons-spec-first
Sep 9, 2026
Merged

feat(website): skills and crons as first-class .t27 specs; Queen modules SKILLS (7) and CRONS (8)#975
gHashTag merged 5 commits into
mainfrom
feat/queen-skills-crons-spec-first

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

Skills and crons become spec-first on t27.ai. Every published agent skill (26) and every scheduled job (33) is now stated by a .t27 module; the site generates its catalogs from those specs through the vendored compiler wasm at build time, and the Explorer cards open on the spec — bytes, sha256, compiler verdict — before the code the sync script found. The Queen gains two modules, SKILLS (7) and CRONS (8), that embed the two Explorers the way SPECS embeds the corpus.

Companion PR in the canonical spec home: gHashTag/t27#3543 (feat/specs-skills-crons), tracking issue gHashTag/t27#3544.

Language (LANG-EN) and translations through a spec. t27 CI (bootstrap/build.rs) rejects Cyrillic in any spec, so SUMMARY_RU is gone from all 59 vendored specs (rg -l '[\p{Cyrillic}]' public/t27/files/specs → nothing; copies byte-identical with t27). Russian is connected through a spec: public/t27/files/specs/i18n/agents-ru.t27 (module i18n_agents_ru, KIND="i18n") declares LOCALE, SCOPE (specs/skills, specs/crons), FIELDS (SUMMARY, NAME), BUNDLE_REPO="trinity", BUNDLE_PATH="apps/website/i18n/agents.ru.json", KEY="ID", FALLBACK="en", COVERAGE_REQUIRED=false, ORPHANS_ALLOWED=false, ENABLED=true. The Cyrillic payload is only in apps/website/i18n/agents.ru.json ({$spec, locale, entries: {ID: {SUMMARY}}}, 59 entries). The generator discovers specs/i18n/*.t27 through the wasm, loads each declared bundle, validates it against its contract (locale / $spec match, keys ⊆ FIELDS, orphan entry → build fails, missing translation → coverage only, duplicate LOCALE → fails) and emits summary: {en, ru} / name: {en, ru} plus i18n: [{locale, spec, sha256, bundle, enabled, fields, scope, coverage: {n, total}, missing}] per catalog. No locale is enumerated in code: agents-de.t27 etc. are one file each. check:agents prints ru via specs/i18n/agents-ru.t27: skills 26/26, crons 33/33, orphans 0. The SPEC panel shows translations: ru via specs/i18n/agents-ru.t27 (n/total).

Data flow

gHashTag/t27  specs/skills/*.t27, specs/crons/*.t27          (canonical, edited there)
      │  vendored copy
      ▼
apps/website/public/t27/files/specs/{skills,crons}/*.t27
      │  scripts/agents-from-specs.mjs   (prebuild, after skills-core index)
      │    · runs each spec through public/t27/t27.wasm  → typecheck.ok, discarded
      │    · checks the field schema (ID/KIND/HOST/… types, ranges, enums)
      │    · joins with public/skills/manifest.json + public/crons/manifest.json
      │    · labels spec+code / spec-only / code-only; dup ID → build fails;
      │      RUNS id unresolved → health:'fail'
      ▼
public/skills/spec-skills.json, public/crons/spec-crons.json   (committed, --check pins them)
      │
      ├─ src/lib/agentSpecs.ts  → loaders, witness labels, URL builders, optional control client
      ├─ src/components/AgentSpecPanel.tsx  → spec panel + cross-links + CONTROL strip (EN+RU)
      ├─ SkillExplorer (layer "Spec" first) · CronExplorer (spec panel first)
      └─ Queen tabs 7/8 (QueenAgents.tsx, iframe #/skills|#/crons?embed=1)
qa/agents-spec-contract.mjs  (npm run check:agents)  pins catalogs ↔ specs ↔ Queen modules ↔ HUD_VIEWS

Witness

Check Command Result
Specs written 26 skills + 33 crons = 59 .t27
Compiler typecheck (vendored wasm 4d9c0447b5ca2887…) node scripts/agents-from-specs.mjs typecheck ok 59/59, discarded 0
Witness split same skills spec+code 26/26, crons spec+code 33/33, spec-only 0, code-only 0, RUNS resolved 0 (all specs carry RUNS = [] + RUNS_NOTE)
Generated entries public/skills/spec-skills.json, public/crons/spec-crons.json 26 + 33; run-now targets: github-actions 12, inngest 6, railway 1, timer (disabled) 14
Catalogs match specs node scripts/agents-from-specs.mjs --check match
Generator tests node --test scripts/agents-from-specs.test.mjs 13 pass / 0 fail
npm run prebuild exit 0 (only the new files change under public/)
npm run typecheck ratchet node scripts/typecheck-ratchet.mjs 179 errors / 26 files = baseline; no file gained errors
npm run lint 180 problems, identical to main (none in changed/new files)
npm run build exit 0
npm run check:agents PASS — skills 26, crons 33, Queen views 8, modules 8
check:spec-catalog, check:skills-catalog, check:crons-catalog PASS / PASS / PASS
check:explorer-languages, check:queen-languages PASS (4 pages) / PASS (258 EN, 258 RU keys)
check:shared-core, check:queen-{atlas,treasury,catalog,continuous,spec-mirrors,coverage,worlds,city,construction,hardware,responsive} PASS
check:queen-{honesty,cycle,factory,review} FAIL — identical failures on untouched main @ 50d11a5, unrelated to this PR
check:queen-viewport and other Chromium gates not run here (no Chromium in the sandbox); count updated 5/6 → 8

Note on the wasm gate: the vendored typecheck.ok is lenient (it stays true for str = 5 or u16 = 70000), so the generator's schema check is the real gate. "typecheck ok" is necessary, not sufficient — the PR says so in the generator header and the README.

What changed where

  • public/t27/files/specs/{skills,crons,i18n}/*.t27 + README.md — vendored specs (canonical home is gHashTag/t27); i18n/agents-ru.t27 is the Russian translation contract.
  • i18n/agents.ru.json — the Russian bundle the contract points to (the only place Cyrillic for these specs lives).
  • scripts/agents-from-specs.mjs (+ .test.mjs) — generator; package.json prebuild/prebuild:ci += generator; new check:agents, test:agents-specs.
  • scripts/railway-services.json — Railway projectId and per-service serviceId so "run now" resolves at build time (test:sync-crons still 8/8).
  • src/lib/agentSpecs.ts, src/components/AgentSpecPanel.tsx — loaders, witness labels, panel, CONTROL strip; SkillExplorer.tsx, CronExplorer.tsx wired (spec first; tags witness/*, enabled/*; badges ⟲ N / ◷ N; embed=1 kept).
  • docs/agent-control-api.md, .env.example.queen — optional VITE_AGENT_CONTROL_URL contract (POST {url}/crons/<id>/run|enable|disable, POST {url}/skills/<id>/run, body {id, requestedAt}); unset → muted "control plane not connected". .gitignore gains !apps/website/docs/** so the doc can be committed.
  • Queen: queenHud.ts HUD_VIEWS now lists all eight views; queenModules.ts entries 7 ⟁ SKILLS/СКИЛЛЫ, 8 ◷ CRONS/КРОНЫ; Queen.tsx union → HudView, command items, EN+RU dicts, render branches, aria; QueenAgents.tsx; ModulesBlock six → eight (EN+RU); QueenCommand.tsx comments.
  • qa/queen-viewport-contract.mjs — command-button count 5 (readiness) / 6 (assert) → 8. Ratchet moved because the panel it counts has eight buttons; the readiness probe was already stale at 5 while the panel had 6.

Pre-existing bug fixed on the way: HUD_VIEWS omitted specs, so ?tab=specs fell back to the comb and the digit shortcuts pointed one view off from the digits the panel printed. Explained in the commit.

CI on this PR (pre-existing, infra, not addressed here): claude-review (curl failure), pr-opened ("Bad credentials"), Brain Health ("not implemented") fail independently of this diff.

Boundaries (what this PR does not claim)

  • No live control plane is deployed. VITE_AGENT_CONTROL_URL is a documented contract only; with it unset the UI says so and offers only spec-edit and host links.
  • The vendored specs are not in public/t27/manifest.json yet (inSpecCorpus = false for 59/59); the "Open in Spec Explorer" link stays hidden until sync-t27-specs is re-run after the t27 PR merges. The panel shows a muted "not in vendored corpus manifest yet" instead.
  • In-process timers (14 crons) have no outside handle; their "run now" is disabled with a stated reason.
  • RUNS is empty in every cron spec (with a RUNS_NOTE); no cron → skill edge is asserted yet.
  • Chromium-based QA gates were not run in this environment.
  • The bootstrap compiler on t27 master was not run against these specs — only the vendored wasm.

Do not merge without review.

Each published agent skill and each scheduled job gets a .t27 module under
specs/skills and specs/crons (vendored copy under public/t27/files, canonical
home gHashTag/t27). The compiler wasm typechecks all 59 with nothing
discarded; the field schema is checked by the generator that reads them.
…t27 specs

scripts/agents-from-specs.mjs runs every spec through the vendored compiler
wasm, checks the field schema (the wasm's typecheck.ok is necessary, not
sufficient: it stays true for wrong annotations and out-of-range ints), joins
the result with the code manifests and labels each entry spec+code, spec-only
or code-only. Duplicate IDs fail the build; an unresolved RUNS id is
health:'fail'. Wired into prebuild and prebuild:ci after skills-core index;
node --test covers the schema gate and the joins; qa/agents-spec-contract.mjs
(npm run check:agents) pins the catalogs to the specs and the Queen modules
to HUD_VIEWS. Railway project/service ids join scripts/railway-services.json
so 'run now' can resolve at build time.
Skill and Cron Explorer cards open on the spec: its bytes (highlighted through
the compiler), sha256 verified in the browser, the compiler verdict, and the
witness label. Crons link to the skills their RUNS name (⟲ N), skills to the
jobs that run them (◷ N). The CONTROL strip reads ENABLED from the spec, links
to the canonical edit on gHashTag/t27 and the vendored copy, and sends 'run
now' to the host that owns the job — GitHub Actions workflow page, Railway
service, Inngest dashboard — while a timer says it has no outside handle.
VITE_AGENT_CONTROL_URL (optional, documented in docs/agent-control-api.md)
adds live buttons; unset, the strip says no control plane is connected.
Witness and enabled join the tag filters. Cards without a spec say code-only.
… list

Two modules embed the Explorers like SPECS does. HUD_VIEWS now lists all
eight views in command-panel order, including specs, which it had omitted:
?tab=specs fell back to the comb and the digit keys pointed one view off from
the labels the panel printed. ModulesBlock says eight; the viewport contract
counts eight command buttons (its readiness probe still counted five).
gHashTag added a commit to gHashTag/t27 that referenced this pull request Sep 9, 2026
…es from them)

specs/skills: 26 modules, one per Claude Code skill t27.ai publishes.
specs/crons:  33 modules, one per scheduled job (GitHub Actions, Inngest,
Railway, in-process timers). Every constant is pub const; the field schema
is in each README. Specs are English-only (LANG-EN): the Russian summaries
live on the site side (apps/website/scripts/agents-i18n.ru.json), merged into
the generated JSON as summary.ru with ruSource 'site-annotation'.

All 59 typecheck ok under the compiler wasm vendored by gHashTag/trinity
(sha256 4d9c0447b5ca2887...), nothing discarded; the wasm's typecheck.ok is
lenient, so the site generator's schema check is the gate that holds. The
site generates public/skills/spec-skills.json and public/crons/spec-crons.json
from a vendored, byte-identical copy of these files; this directory is the
canonical home. specs/OWNERS.md: skills/, crons/ -> T-Queen. docs/now entry
added.

Site PR: gHashTag/trinity#975

Closes #3544
gHashTag added a commit to gHashTag/t27 that referenced this pull request Sep 9, 2026
…es from them)

specs/skills: 26 modules, one per Claude Code skill t27.ai publishes.
specs/crons:  33 modules, one per scheduled job (GitHub Actions, Inngest,
Railway, in-process timers). Every constant is pub const; the field schema
is in each README.

Specs are English-only (LANG-EN). Translations are connected through a
spec: specs/i18n/agents-ru.t27 (module i18n_agents_ru, KIND "i18n") declares
LOCALE, SCOPE (specs/skills, specs/crons), the translatable FIELDS (SUMMARY,
NAME), the bundle location (trinity:apps/website/i18n/agents.ru.json, keyed
by ID), FALLBACK "en", COVERAGE_REQUIRED false, ORPHANS_ALLOWED false. The
Cyrillic payload lives only in that bundle; one contract file per locale, no
locale list hardcoded in the site generator.

All 60 typecheck ok under the compiler wasm vendored by gHashTag/trinity
(sha256 4d9c0447b5ca2887...), nothing discarded; the wasm's typecheck.ok is
lenient, so the site generator's schema check is the gate that holds. The
site generates public/skills/spec-skills.json and public/crons/spec-crons.json
from a vendored, byte-identical copy of these files; this directory is the
canonical home. specs/OWNERS.md: skills/, crons/, i18n/ -> T-Queen. docs/now
entry added.

Site PR: gHashTag/trinity#975

Closes #3544
…ough specs/i18n/agents-ru.t27

t27 CI (bootstrap/build.rs) rejects Cyrillic in any spec, so SUMMARY_RU is
gone from all 59 vendored skill/cron specs (byte-identical with gHashTag/t27
feat/specs-skills-crons). Russian is now connected through a spec, not a
site-side convention:

- public/t27/files/specs/i18n/agents-ru.t27 (module i18n_agents_ru, KIND
  "i18n") declares LOCALE ru, SCOPE [specs/skills, specs/crons], FIELDS
  [SUMMARY, NAME], BUNDLE_REPO trinity, BUNDLE_PATH
  apps/website/i18n/agents.ru.json, KEY ID, FALLBACK en, COVERAGE_REQUIRED
  false, ORPHANS_ALLOWED false, ENABLED true. One file per locale; nothing
  in the generator enumerates locales.
- apps/website/i18n/agents.ru.json carries the Cyrillic payload
  ({$spec, locale, entries: {ID: {SUMMARY}}}); 59 entries.
- scripts/agents-from-specs.mjs discovers specs/i18n/*.t27 through the wasm
  like every other spec, loads each declared bundle, checks it against its
  contract (locale, $spec, keys within FIELDS, orphans fail, coverage warns
  unless COVERAGE_REQUIRED, duplicate LOCALE fails) and emits summary/name as
  {en, <locale>...} plus i18n: [{locale, spec, sha256, bundle, enabled,
  fields, scope, coverage: {n, total}, missing}] per catalog. Cyrillic in any
  .t27 is a build problem.
- tests: 24 pass (contract typechecks, merge, orphan strict/loose,
  COVERAGE_REQUIRED, bundle validation, locale discovery + duplicate,
  Cyrillic, committed contract + bundle).
- qa/agents-spec-contract.mjs (check:agents): i18n contract section --
  bundle exists at the declared path, names its contract, matches locale, no
  orphan, no key outside FIELDS, catalog coverage equals the bundle; prints
  "ru via specs/i18n/agents-ru.t27: skills 26/26, crons 33/33, orphans 0".
- UI: Explorers read summary[lang] ?? summary.en; the SPEC panel adds
  "translations: ru via specs/i18n/agents-ru.t27 (n/total)" (EN+RU copy).
- READMEs (skills, crons, new i18n) document the contract; t27 issue #3544.
@gHashTag
gHashTag merged commit 479743f into main Sep 9, 2026
22 of 27 checks passed
@gHashTag
gHashTag deleted the feat/queen-skills-crons-spec-first branch September 9, 2026 12:58
github-actions Bot added a commit that referenced this pull request Sep 9, 2026
feat(queen): spec-first SKILLS (7) and CRONS (8) explorers generated from .t27 specs (#975)

59 skill/cron specs + specs/i18n/agents-ru.t27; generator scripts/agents-from-specs.mjs (wasm AST, no regex); Explorer spec panel, cron->skill links, CONTROL strip; Queen tabs 7/8; HUD_VIEWS fix. Canonical specs: gHashTag/t27#3543.
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