Skip to content

widgets: thirteen tools that run in the reader's browser, each from its own .t27 spec - #1383

Merged
gHashTag merged 5 commits into
mainfrom
feat/widget-tools-land
Oct 5, 2026
Merged

gHashTag merged 5 commits into
mainfrom
feat/widget-tools-land

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Closes #1378 (epic #1377)

Thirteen widget tools for the WIDGETS tab, each a static page at t27.ai/widgets/<id>/ generated from specs/widgets/<id>.t27. The reader's files never leave the browser; no cookies; no network beyond same-origin files.

widget tests hook (from its spec)
bit-diff 5 Check the byte-identical claim yourself: drop t27's .bit and openXC7's and see every frame compared, or the first one that is not.
build-receipt 4 From a ternary spec to an Artix-7 200T bitstream with no Vivado: every stage timed, versioned and hashed.
cost-curves 7 A 64x64 multiplier with -nodsp costs 9,772 LUTs, 7.26% of an XC7A200T. Let it use DSPs and it is 16 DSP48E1 and 243 LUTs.
gf16-calc 6 Where does phi land in 16 bits? Type any number and watch it rounded to GF16, field by field, with the error printed exactly.
idcode 7 Paste your board's IDCODE, get its bit fields and its device as a link: #id=0x03636093 is the Artix-7 200T on our bench.
lut-explain 5 One routed design, 4738 LUTs: 1305 are XOR or XNOR, 2251 have no short name. Guess the gate from its 64 INIT bits.
pin-map 6 Our own Wukong XDC puts 13 of its 49 ports on balls with no user IO. Paste yours and see where every pin lands on the XC7A200T.
placement-map 4 A 373-cell design on a 33,650-slice die: see exactly which sites nextpnr picked, then drop your own routed JSON.
race-the-bee 4 Three times this week a person and a bee went for the same issue. The person started first every time; the bee merged first every time.
resource-bars 4 How much of a 200T does a UART-command blinker take? 0.12% of the LUTs. Drop your routed JSON and see your own bars.
slack-waterfall 5 Where do 4.8 ns go in a 20 ns clock? Every path of a real Artix-7 run, segment by segment, worst first; drop your report for yours.
test-touch 5 Bees landed 367 PRs on t27 in 14 days. 11 deleted tests or asserts; one titled 'Implement the 1 empty function body' deleted all 26 tests in its file.
test-waves 5 A spec's test block, run as gates and drawn as waves: every edge is from a real simulation, and your own .vcd opens in the same view.

The gallery spec lists them as tool in category runs; seven new ideas from the competitor sweep replace the seven now built.

Found while landing

  • test-waves/demo.vcd was kept out of git by the root *.vcd rule while the page's ?v= stamp hashes it, so a clean checkout reported the page stale. Negations scoped to public/widgets/ now ship widget data (*.vcd, and *.log for synth-smells' samples); other .vcd/.log files stay ignored.
{
  "version": 1,
  "head_sha": "630beba2f7aa5e40d00675ccabfe0b0f4bc2c0b8",
  "summary": "Thirteen widget tools that run in the reader's browser, each generated from its own specs/widgets/<id>.t27 with its words, numbers and tests in the spec, listed in the Queen's WIDGETS tab as kind tool.",
  "changes": [
    "scripts/widget-pages-from-spec.mjs (new) compiles each widget-tool spec with the wasm compiler, runs its test blocks, refuses a spec missing TITLE/HOOK/DATA_SOURCES/SENDS_NOTHING, and writes public/widgets/<id>/index.html with og and twitter card tags, a t27:hook meta and the spec copy.",
    "13 specs under specs/widgets/ with 67 test blocks, 323 asserts; tool.js, tool.css, card.png and data files under public/widgets/<id>/; the scripts that produced the data under scripts/widget-data/.",
    "specs/widgets/gallery.t27 gains the kind tool and the shared page words; 31 widgets in three category runs, a tool's hook left empty so its page holds the sentence; seven new ideas (gatle, bit-autopsy, synth-smells, fasm-skyline, vcd-wrapped, stat-card, fits-on) replace the seven now built.",
    "src/data/siliconHistory.ts excludes dmitrii-f-t27/trinity-memory/t27/rtl/gf16_attn.t27 (a Q16.16 attention controller whose name says gf16), which turned main red on check:silicon after #1371.",
    "public/widgets/widget.css: shared frame, buttons and drop zones; every frame link is a 32px tap target.",
    "package.json gets check:widget-pages and test:widget-pages and the generator joins prebuild; website-checks runs both."
  ],
  "tests": [
    {
      "command": "node scripts/widget-pages-from-spec.mjs --check",
      "result": "13 tool pages up to date; spec tests 67, asserts 323, all hold",
      "status": "passed",
      "evidence": "Local run on this branch before the commit (tri widget check)."
    },
    {
      "command": "node --test scripts/widget-pages-from-spec.test.mjs",
      "result": "3 pass, 0 fail",
      "status": "passed",
      "evidence": "Local run on this branch."
    },
    {
      "command": "node scripts/widgets-from-spec.mjs --check && npm run test:widgets-spec",
      "result": "31 widgets in 3 categories, 7 ideas not built; spec tests 7, asserts 22, all hold; 5 pass, 0 fail",
      "status": "passed",
      "evidence": "Local run on this branch."
    },
    {
      "command": "npx tsc --noEmit -p apps/website",
      "result": "exit 0, no type errors in the website project",
      "status": "passed",
      "evidence": "Local run on this branch."
    },
    {
      "command": "each of the 13 pages loaded at ?embed=1 in a 640x460 iframe",
      "result": "every tool mounted into #widget, html.embed set, no horizontal overflow, no console errors",
      "status": "passed",
      "evidence": "In-app browser against a static server of public/."
    }
  ],
  "limitations": [
    "Widget data are snapshots taken by the scripts under scripts/widget-data/ on the dates their specs name; nothing re-runs them on deploy.",
    "lut-explain reads an AX7203 (xc7a200tfbg484) build in /tmp/x7board, not the Wukong; the page names the board.",
    "test-touch classifies diffs by a heuristic with known false positives, listed on its page.",
    "gatle, bit-autopsy, synth-smells and fasm-skyline are still being built and are listed as ideas, not widgets.",
    "Nothing is posted anywhere; cards are made for the owner to post."
  ],
  "tags": [
    "t27",
    "FPGA",
    "Widgets",
    "QueenBoard"
  ],
  "blog": {
    "title": "Thirteen FPGA widgets that run in your browser, each from a t27 spec",
    "summary": "Bitstream diff, IDCODE decoder, pin map, placement map, timing waterfall, LUT explainer, build receipt and more: each one a static page whose every word and number lives in a .t27 spec with its own tests.",
    "outline": [
      "Why tools, not recordings: a reader can drop their own file and get their own card.",
      "One spec per widget: the page generator refuses a tool without a hook, data sources or a no-network promise.",
      "Where the numbers come from: yosys, nextpnr-xilinx and git, each named on the page.",
      "What the competitor sweep found, and the next ideas waiting on the gallery shelf, each with its source."
    ]
  }
}

🤖 Generated with Claude Code

gHashTag and others added 2 commits October 5, 2026 01:17
…ts own specs/widgets/<id>.t27

Every tool's words, numbers and tests live in its spec; widget-pages-from-spec.mjs
writes the page (og card, t27:hook, spec copy) and runs the spec's test blocks.
The gallery lists them as kind "tool" in category runs, its hook empty so the
sentence has one home, and seven new ideas replace the seven now built.
CI runs check:widget-pages and test:widget-pages. Frame links are 32px targets.

Closes #1378

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the status:in-progress 🔵 Agent working label Oct 4, 2026
… the GF16 format

Main went red on check:silicon after #1371 mirrored it under public/t27/files;
its own header says no stage value is a GF16 float.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

X Brain Health Check

Score: 100.0/100
Status: 🟢 HEALTHY
Threshold: 80/100

X Brain is above merge threshold

The root *.vcd rule kept demo.vcd out of the commit, while the page's
?v= stamp hashes it: a clean checkout reports test-waves/index.html stale
(measured by removing the file: --check fails). Negations are scoped to
public/widgets/ (*.vcd at root, *.log in apps/website for synth-smells'
sample logs); other .vcd and .log files stay ignored.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🚨 CRITICAL: Brain Health Below Threshold

The brain health CI gate has failed. This PR cannot be merged until:

  1. All brain region unit tests pass
  2. Integration tests pass (zig build test-brain)
  3. Every stress test passes with no leaks (zig build test-brain-stress)
  4. Brain health score >= 80/100, and every probe passes in CLI Smoke

Please review the failed job logs and fix the issues.

2 similar comments
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🚨 CRITICAL: Brain Health Below Threshold

The brain health CI gate has failed. This PR cannot be merged until:

  1. All brain region unit tests pass
  2. Integration tests pass (zig build test-brain)
  3. Every stress test passes with no leaks (zig build test-brain-stress)
  4. Brain health score >= 80/100, and every probe passes in CLI Smoke

Please review the failed job logs and fix the issues.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🚨 CRITICAL: Brain Health Below Threshold

The brain health CI gate has failed. This PR cannot be merged until:

  1. All brain region unit tests pass
  2. Integration tests pass (zig build test-brain)
  3. Every stress test passes with no leaks (zig build test-brain-stress)
  4. Brain health score >= 80/100, and every probe passes in CLI Smoke

Please review the failed job logs and fix the issues.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🧪 Brain Stress Test Results

Tests: 261/261 passed, 0 leaked
Status: 🟢 PASS
Gate: every test in zig build test-brain-stress passes and none leaks

@gHashTag
gHashTag merged commit 8cd27f5 into main Oct 5, 2026
37 of 41 checks passed
@github-actions github-actions Bot added status:completed Done and removed status:in-progress 🔵 Agent working labels Oct 5, 2026
gHashTag added a commit that referenced this pull request Oct 5, 2026
#1383 and 3fbafd1 each excluded trinity-memory's gf16_attn.t27; after
both landed main held the key twice (TS1117) and the typecheck ratchet
went 179 -> 180. One entry is kept, the one main had first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gHashTag added a commit that referenced this pull request Oct 5, 2026
* widgets: bit-autopsy, fasm-skyline and synth-smells, each from its own .t27 spec

Three more drop-in FPGA tools, read in the reader's browser, nothing uploaded:
- bit-autopsy: a 7-series .bit parsed per UG470: header part vs the IDCODE it
  writes, frames, zero bytes; counts cross-checked against prjxray bitread.
- fasm-skyline: a .fasm as one column per configured tile on the full
  XC7A200T grid (prjxray-db tilegrid), PNG and STL out.
- synth-smells: a yosys synth_xilinx log as a lint card (latches, undriven
  wires, driver conflicts, memories as FFs, final cells).
gallery.t27 gets them via tri widget gallery-add (WIDGET_COUNT 34) and three
researched ideas (same-circuit, lut-golf, wave-card) refill the shelf.

Closes #1379
Closes #1380
Closes #1381

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* widgets: vcd-wrapped, three real Icarus simulations wrapped on one card

Drop a .vcd: value changes, busiest net, signals stuck at X/Z, time span,
parsed in the browser in chunks. Samples are vvp output as dumped:
counter (7/7), vsa-bind (6/6), tmu (0/8, labelled: tmu.v reads *_wide.mem
files that are not committed, #1393). Gallery: 35 widgets, shelf refilled
with die-guessr.

Closes #1385

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* widgets: fits-on, how many copies of a design an XC7A200T holds

Device totals parsed from two real nextpnr-xilinx xc7a200t runs (AX7203
board, fbg484; the two logs agree on all 57 BEL types); LUTs divided by the
134,600 LUT6 positions by default, BELs on a toggle; every result is an
upper bound, not a promise that it routes. node0: 28 copies, tnf16: 160.

Closes #1387

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* widgets: stat-card, yosys stat -json as a card and a README badge

Paste or drop stat -json: LUT, FF, DSP, BRAM by explicit 7-series cell
lists in the spec, unknown types listed as other, never dropped; card and
badge say "yosys synth, not place and route". Sample: lm_head_matvec,
Yosys 0.67, synth_xilinx -flatten: LUT 138, FF 149, DSP 0, BRAM 4.

Closes #1386

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* widgets: lut-depth and fsm-sketch tools; shelf gets xdc-check, open-flow-check

lut-depth: paste yosys ltp -noff output, see the longest path as a LUT
staircase (sample: gf16_add.v, 23 levels, 11 LUTs; levels are not ns).
fsm-sketch: drop a yosys fsm_export KISS2 or fsm_info log, see the state
machine yosys actually extracted (uart_rx 4 states, spi_flash_master 7,
fsm_simple refused). Gallery 39 widgets, 7 ideas.

Closes #1394
Closes #1396

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* widgets: gatle, a daily guess-the-LUTs game from real t27 specs

The page shows the Verilog the t27 compiler (wasm, in the browser) emits for
one spec a day; the reader has six guesses at its yosys synth_xilinx LUT
count. Pool: 37 of 1682 specs (yosys 0.67+post, -nodsp, stat -json; rejects
counted in pool.json). Puzzle #1 ternary/gft_sgd_step, 1826 LUTs. Nothing is
stored or sent. Gallery 40 widgets, 6 ideas.

Closes #1384

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* siliconHistory: drop the second gf16_attn exclusion

#1383 and 3fbafd1 each excluded trinity-memory's gf16_attn.t27; after
both landed main held the key twice (TS1117) and the typecheck ratchet
went 179 -> 180. One entry is kept, the one main had first.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WIDGETS: fourteen widget tools built from .t27 specs

1 participant