Repository navigation
feat(dox): how search engines and AI answer engines read the site (DOX-G5 #456, DOX-G6 #448) - #478
Conversation
…DOX-G6, #448) Runbook section 8 of CORE-86 now lists the console steps that show how the site is crawled and indexed: the Search Console sitemap and URL Inspection, the Bing Webmaster Tools import, the AI Crawl Control request counts, and Crawler Hints. Each step has a Check line, and none is optional.
… caching (DOX-G6, #448) Generated pages now state lastUpdated from their inputs' newest commit (scripts/build-utils/commit-dates.mjs, one git log per run). Starlight reads footer dates from git, and generated MDX is untracked, so these pages had no date at all. The sitemap's lastmod is copied from each page's footer date, so the two cannot disagree. A tracked src/assets-root/_headers is copied to dist/_headers beside _redirects. Hashed /gmt/_astro/* files get a one-year immutable Cache-Control, and the .md twins and llms*.txt files get X-Robots-Tag: noindex, since they have no meta tags or canonical. The 404 page carries noindex and no canonical, so it cannot be indexed as /gmt/404/. deploy-smoke checks the new headers and the 404 page after each deploy.
…-G6, #448) The root /gmt/llms.txt drops the 18 Reference sections that made it about 213 KB. Its Reference section now links one llms.txt per namespace, so the root is about 45 KB, and a test holds it to 64 KiB. Each namespace file lists its functions by module with their .md twins. The Changelog section is renamed Optional and stays last, as llmstxt.org names links a reader may skip. Every page carries rel=describedby pointing at its namespace file, or at the root file outside the reference. This replaces the site-wide text/plain alternate link. Each namespace has one authored summary. It is the llms.txt line and the namespace index page description, so 13 pages no longer share boilerplate. A namespace without a summary stops the build. released-exports.test.ts drops inherited GIT_* variables. With GIT_DIR set, its fixture git init and commit wrote to the real repository.
…or the rest (DOX-G6, #448) Every docs page carried all 1,070 API Reference links ahead of its content. Other namespaces now show only their Overview link, so the guide page is 44% smaller and every namespace stays one click away. Prev/next links are worked out on the full tree before the trim, and the tab walk covers one function page per namespace.
…nd-improve-how-search-engines
Sibling functions with the same TSDoc summary get a qualifier in their frontmatter description: the value kind the name states, else the namespace. An industry namespace has its own summary, worded apart from the industry definition. A group no qualifier splits fails the build.
…at name them (DOX-G6, #448, #456) Cards are drawn with CanvasKit over a fixed Earth frame: the text sits in the centre square a preview app crops to, a title takes two lines at most and never an ellipsis, and each PNG is a palette PNG under 300 KB. og:locale is en_US, og:image:type is set, the image alt describes the card the page shows, and both image URLs carry ?v= with the PNG's hash so a redrawn card is a new URL. share-preview.test.ts checks every indexable page in CI. The GitHub social preview moves to apps/dox/assets/share/ with the other upload-ready images.
… (DOX-G6, #448, #456) Apple's Messages preview reads a page only up to 1 MB and the changelog was 1.5 MB. Each package's changelog is now an index of its release lines plus a page per major.minor line, each with its own description, date and share card. dist-base.test.ts fails when any built page exceeds 1 MiB, and llms.txt links only the four index pages.
…he zone list (DOX-G6, #448, #456) - hero-space loads `getUnixNow` and `getSystemTimeZone` from gmt by dynamic import, beside the sky fetch, so the Temporal polyfill leaves the first-paint graph. - zone-clock-list writes every row before it measures any, and its row estimate matches the rendered height, so the landing no longer forces a layout per row. - scripts/web-vitals.mjs measures LCP, CLS and INP on a built or live page.
… when hidden or covered (DOX-G6, #448, #456) - The canvas 2D globe draws in a worker on an OffscreenCanvas. A text probe compares a worker label with a page label first; any pixel difference keeps the globe on the main thread. - Globe canvases use `auto` font smoothing and the shading uses a pattern fill instead of `clip()`, so worker and main-thread frames match pixel for pixel. - Every globe pauses when its surface is hidden or covered (globe-cover), through one hold path. - Mounting yields to the main thread between steps (yield-to-main), so a globe start is not one long task.
…nd-improve-how-search-engines # Conflicts: # .github/workflows/ci.yml # context/dox/tracker.md
baldurpan
left a comment
There was a problem hiding this comment.
Three comments, inline. I read the whole diff at 9a3fee6 in two halves: first crawl, SEO and build, then the globe worker.
The first comment should be fixed before this merges: the lean sidebar's test never runs in CI. The other two are small:
- after a WebGPU loss, a renderer can outlive
destroy(); - one request in the deploy smoke runs outside the retries.
The rest checked out:
- the
_headerspatterns under/gmt/; - the 404's noindex;
lastmodfrom commit dates, withfetch-depth: 0;- the per-namespace
llms.txtanddescribedby; - the unique descriptions;
- the share-card sizes;
- the lockfile;
- the worker protocol, the start-up fallback and the teardown.
Locally, the crawl and build suites pass (773 tests), and so do the worker, protocol and painter tests. I didn't build the site, so the dist tests didn't run here.
The description is behind the branch:
- It still says the lean sidebar is "not pushed yet: in testing".
- It lists slice 4's tester pass,
validateand the Dox gates as "still to come, before this is marked ready". Have those run?
CI: everything has passed except the Dox gates, which are still running.
…torn down, deploy smoke retries a dropped request (DOX-G6, #448, #456) - CI and the local dox-dist check no longer name built-site tests by hand. apps/dox/scripts/dist-tests.mjs runs every Node test that imports dist-dir. It finds 11; the old list had 6, so sidebar-reach, data-credits-built, display-font-built, header-built and upstream-built had only ever skipped. - After a device loss, a renderer that finishes loading once the globe is destroyed is destroyed too, not adopted. This covers the WebGPU retry and the canvas 2D fallback, so no canvas or worker is left behind. - deploy-smoke.mjs counts a request that fails while the rows are built as a failed attempt and retries it, instead of exiting on the first one.
|
Thanks for the careful read. All three are fixed in d516fc3, with replies on each comment. On the description, it's now up to date:
|
baldurpan
left a comment
There was a problem hiding this comment.
Approving 0f41506. I checked each of the three fixes:
test:distpicks up every built-site test.- A late renderer is destroyed on both recovery paths. The new tests fail against the old engine.
- The deploy smoke reports a dropped request as a row instead of crashing.
The lint fix in 0f41506 clears lint:dox locally. Thanks for bringing the description up to date.
CI when I approved: Build & Lint passed on Node 22. Build & Lint on Node 24 and 26, the Dox gates, Story consistency and some TZ jobs were still running. The description still lists the globe worker in real Firefox and Safari as open.
…p with main (#482) Agents now keep a branch up to date with `main`, and every PR they open or close out gets its labels, milestone and reviewer. ## Labels, milestone and reviewer `node scripts/pr-meta.mjs` shows what a PR should carry. `--apply` sets it on the branch's open PR. - **Labels** come from the commit types (`feat` → enhancement, `fix` → bug, `refactor`, `docs`) and the changed paths: - `packages/gmt` → gmt, its `skills/` → skills, and each lint plugin → its own label - `.github/workflows` → pipes - `.agents`, `.claude`, `AGENTS.md`, `CLAUDE.md` → ai skills - root tooling, `.github` outside workflows, `.vscode` and `apps/dox/scripts` → gmt monorepo - `context`, `docs`, the rest of `apps/dox`, the READMEs and every LICENSE → documentation - a test checks that every tracked file gets a label, except a changeset entry, which comes with the package change - a `release/` branch gets only `release` - **Milestone** is the milestone of the issue the PR closes. Without one, it is taken from the tracker that holds the branch's story id (Dox or Domination). - **Reviewer** is every collaborator who is not the PR's author. `--apply` only adds. It never removes a label, never replaces a milestone someone set, and never asks again someone who was already asked or has already reviewed. A `gh` failure other than gh's own "not found" answer stops the script with gh's message. The rules live in `scripts/lib/pr-meta-plan.mjs`, tested in `apps/dox/scripts/pr-meta/plan.test.ts` with branches and paths from merged PRs. ## Keeping up with main AGENTS.md § Git gains two standing instructions: 1. When work on a branch starts, as `finalizer`'s first step (before it edits the READMEs or the tracker), and before any push: fetch `origin/main`, merge it in (never rebase), resolve conflicts so both sides survive, validate, and commit the merge. - If uncommitted work touches the incoming files, the agent names them and does not stash. - Pushing still needs the owner's word. - AGENTS.md, CLAUDE.md and the inline pipeline name these two as the only exceptions to the git rule. 2. Run `pr-meta.mjs --apply` right after a PR opens, and when `finalizer` closes a story whose PR is open. `finalizer` (steps 1 and 11), `/pipeline`, `/pr-desc` and `/release` point at these. ## Validation - `vitest run scripts/pr-meta/plan.test.ts scripts/affected.test.ts`: 87 passed - `node scripts/verdict.mjs validate`: PASS, 23 of 23 - `GH_TOKEN=bad node scripts/pr-meta.mjs 482` prints `HTTP 401: Bad credentials` and exits 2 - oxfmt `--check` and oxlint on the new and changed scripts: clean - `/optimize`: 0 findings to fix - Dry run on #478 gave documentation, enhancement, gmt monorepo, pipes; milestone Dox (from #448); reviewer baldurpan. Those values were then applied.
Answers the second round of review on #493. Held space. column-timestamp-bridge and id-timestamp-decoder now hold the same height before they load as after, in Chromium and WebKit, at 1440 and 390 px, light and dark. Three things made them differ: - The calls frame and its output were empty until the library loaded. The template now holds the lines the default preset fills, and a sizer as wide as the widest line, so the scroll track shows just as it does once loaded. DEFAULT_CALLS records both numbers, and a mount test checks them against the real library. - In the format card, inline rows and chips sat in a line box with the hold wrapper's strut, and their block ghosts did not. They are blocks now. - The precision ladder aligned each rung on its baseline. Before load a rung's value is an empty hold, and an empty box's baseline is its bottom edge. The rungs now align to the top. The instant hero's hold now keeps the NO SIGNAL pill too. At 390 px the pill is taller than a line of the instant, so the decoder changed height by 4.4 px between presets. hero-space. checkZoomFills and checkSkyCamera read the globe's pixels. Since #478 the globe hands its canvas to a worker, and getContext then throws. The two checks now remove transferControlToOffscreen first, so the globe draws on the main thread with the same painter. readout-still. A missing frame fails the gate again. Only a row with frame: false skips it. Library. PRECISION_OF_DIGITS is a literal, so nothing runs at import. A test checks that it is FIX_FRACTION_DIGITS the other way round. Its five rows raise the published test count in gmt-stats.json.
… (#493) Closes #403 (FIN-95). ## Summary This adds a `finance` namespace to `@northguild/gmt`, starting with the FIX `UTCTimestamp` (`YYYYMMDD-HH:MM:SS[.fraction]`). A FIX stamp states its precision by how many fraction digits it has, and its seconds field can read `60` on a day a leap second was inserted. The new functions read and write the stamp without losing either fact. The docs site gains a Finance industry, a guide and the FIX Timestamp Reader tool. ## What changes ### 1. Library: `@northguild/gmt/finance` New subpaths `/parse`, `/format` and `/validate`. - `parseFixUtcTimestamp(value)` returns `{ instant, precision, leapSecond, picoseconds }`, or `null`. The precision comes from the number of fraction digits (none, 3, 6, 9 or 12) and is never widened. Digits 10 to 12 of a picosecond stamp come back in `picoseconds`, so nothing is dropped without saying so. - `formatFixUtcTimestamp(instant, precision)` writes an instant in UTC at the precision a counterparty asks for. It cuts and never rounds, and `"picosecond"` pads `000`. It returns `""` for a date-time with no offset. - `isValidFixUtcTimestamp(value)` is true exactly when the parser returns a value. It takes any value and narrows it to `string`. This replaces the issue's `value: string` signature with the usual overload trio. - A seconds field of `60` is accepted only on the 27 days a leap second was inserted. It reads back as `23:59:60`. - The realm's wiring: barrels, `package.json` exports and `typesVersions`, the noThrow fuzz list, and a scoped exception for finance message grammars in `context/coding-standards.md`. FIN-96 builds into the same realm. ### 2. Agent skill - A `gmt-finance` TanStack Intent skill, listed in the skills registry, the vocabulary the docs chat reads, and the install and skills pages. ### 3. Docs site - A Finance industry, a guide (`finance-message-timestamps`), two scenarios and a mistakes page. - The FIX Timestamp Reader tool, with its chat tool and starter card. - Two shared styles change, so the space a tool holds before it loads matches the loaded tool (see below). ### 4. Bookkeeping - Changeset: minor, for `@northguild/gmt`. - Tracker row 47 is Done. The spec folders are folded into `issues/FIN-95.md`, `issues/FIN-95/design-notes.md` and `context/dox/built.md`, and deleted. The painpoints row now cites FIN-95 and FIN-96. ### 5. Merge with main `origin/main` is merged in. It brings SPA-47 (the Terrestrial Time Stack tool, #489) and the #480 gate fixes (#486). Both new tools sat at the same place in six registration files, and each file now keeps both. In `DOX_TOOL_DOCS` the Terrestrial Time Stack keeps index 43, and the FIX Timestamp Reader follows at 44. The function count, test figures, reference corpus and the root bundle budget are regenerated for the merged tree. ## Why FIX engines send `SendingTime` and `TransactTime` at whatever precision they support, and a reader that guesses the precision, rounds, or rejects `23:59:60` gets a different instant from the one that was sent. The functions keep the precision and the leap second, so a stamp can be checked and written back the same way. ## For the owner to check - **Bundle budget.** The root entry budget in `scripts/bundle-size.budgets.json` rises from 570,400 to 578,900 bytes. The merged root entry is 573,092 bytes, and 578,900 is that times 1.01, rounded up to the next 100, which is the `--update` formula. No other budget changes. Please confirm it. - **Two shared Dox styles changed**, so the space held for a tool matches the loaded tool: - instant-hero `.pill` and `.chip` are now block and fit-content. - edi-call `.frameGhost` has a 1px margin. - **Effect on other pages:** - The jump on load drops to 0 on dtm-decoder, x12-time-reader and epcis-event-reader. - id-timestamp-decoder's hero no longer moves 6 px between presets at 1440. - dtm-decoder is 2 px taller, and id-timestamp-decoder is 6 px shorter at 1440. ## Known, and already there before this story - The hero-space gate was failing on main after DOX-G6 (#478) moved the globe canvas offscreen. It was not run again after the merge. - id-timestamp-decoder still varies 4.4 px between presets at 390. ## Left to CI - **Firefox.** The Firefox gate runs are left to CI, because Firefox does not launch on the dev Mac. ## Validation - `pnpm validate` on the merged tree, against origin/main: 23 of 23 checks pass (format, deps, markers, licences, docs-check, bundle-size, the builds, dox-pages, stats, compat, upstream, api-surface, dox-tables, lint, typecheck and test). - test:gmt: 72,506 tests in 957 files pass. - test:dox: 18,700 tests in 539 files pass. - dox-tables: 818 pages, 1,251 tables, none scroll or spill. - `node scripts/bundle-size.mjs`: the root entry is 573,092 bytes, under its 578,900 budget. Every other entry is under its budget too. - No test is disabled, focused or marked as expected to fail. ## Release One minor changeset for `@northguild/gmt`: `.changeset/finance-fix-utc-timestamp.md`. Merging publishes nothing. ## Checks - [x] Every new or changed behaviour has a test, with expected values taken from the spec. - [x] A changeset is added with `pnpm changeset`. - [x] `pnpm run validate` passes.
Closes #448
Closes #456
New OG images:
Method pages og images:
Makes
northguild.dev/gmt/easier for search engines and AI answer engines to crawl, index and quote. Everything follows documented mechanics: crawlable text, accurate sitemaps, one indexable URL per page, lighter pages, and anllms.txtthat fits in an agent's context. AI crawlers stay allowed. Nopackages/gmtchange and no changeset.Search descriptions
llms.txt, and it replaces 13 identical boilerplate descriptions.Crawling and
llms.txt<lastmod>is copied from that footer date, so the two agree._headersfile caches hashed/gmt/_astro/*files for a year as immutable, and marks the.mdtwins andllms*.txtfilesnoindex.noindexand no canonical./gmt/llms.txtfits in 64 KiB (it was about 213 KB). Its Reference section links onellms.txtper namespace. Every page carriesrel="describedby"pointing at its namespace file, or at the root file outside the reference.deploy-smoke.mjschecks the crawl rows after each deploy.Share cards and tags
og:localeisen_US,og:image:typeis set,og:image:altandtwitter:image:altdescribe the card, and both image URLs end in?v=<hash of the PNG>so a redrawn card is a new URL.apps/dox/assets/share/.Changelog pages
/changelog/1-21/) plus an index, so no page nears 1 MB. Apple's Messages preview reads only the first 1 MB of a page, and the single page was 1,546,542 bytes. The largest page is now 729,975 bytes, and a build test fails on any page over 1,048,576 bytes.Root site card (other repo)
The landing page
northguild.dev/is a separate site. Its search data and card are made innorthguild/northguild.dev, and both PRs are merged:Globe, LCP and INP
OffscreenCanvas. Input no longer waits for a globe frame. A probe compares text rasterisation on both paths first; if they differ, or the worker fails, the main-thread renderer takes over. The look is unchanged.@northguild/gmtby dynamic import beside the star list, which keeps the Temporal polyfill off the first-paint path.apps/dox/scripts/web-vitals.mjsmeasures LCP, CLS, TBT and INP by hand.Local lab numbers for the home page on mobile, before then after: TBT 464 ms to 149 ms; LCP 3.0 s (varying between runs) to 2.26 s; INP at 4x CPU throttling 256 ms to 96 ms with WebGPU, and 392 ms to 96 ms with canvas 2D. Guide and reference pages were already good.
Owner steps
From
context/domination/issues/CORE-86/search-and-crawlers.md(runbook §8).https://northguild.dev/(Sitemap, logo and Organization data for search engines northguild.dev#21): Organization, 0 errors, 0 warnings./gmt/and two reference pages.Open checks after deploy
These run against the live site, so they stay open. The list is also in
context/dox/built.md./gmt/, a guide, a reference page and/gmt/changelog/; WhatsApp shows the whole title in a square crop.https://northguild.dev/.node apps/dox/scripts/deploy-smoke.mjspasses againsthttps://northguild.dev.https://northguild.dev/.node scripts/web-vitals.mjs --live https://northguild.devwithPSI_API_KEYset records PageSpeed Insights and CrUX numbers.Baseline
Search Console, Bing and AI Crawl Control numbers from before deploy:
To be filled in by the owner.
Validation
llms.txt: the Dox Vitest suite, every built-site test on a fresh build,astro check, lint, a local Wrangler run ofdeploy-smoke.mjs, and a whole-site HTML comparison againstmain's build.share-preview.test.tson a fresh build.apps/dox/scripts/dist-tests.mjs). All 11 files pass on a fresh build.main, 93 to 95 here.pnpm deps:sync: no change to anyBlocked bycell.Not verified:
verdict validatehas not run locally: the scratch copy it would run in is not a git checkout. CI runs the same build, lint and test steps.