RedlineKnowledge base

B5 YYZ

Deferred to Stage 2 (amendment 2026-10-10). YYZ’s pages now come from kb-packages: the root from kb-yyz-site-root, children as fragments rendered at publish. Neither carries build-time history or block ids, so the steps below no longer work as written. Re-plan after TD-002 to TD-004 in kb/lifecycle/tech-debt.md. Stage 1 is B6.

The consuming site. Work happens in the YYZ repository (/Users/caruana/Projects/fridai/fio-kb/yyz, project fridai/fio-kb/yyz), on a branch redline-experiment there, with the same commit rules as the protocol. Each task needs a published package version that contains the listed dependencies; the operator promotes it and gives the executor the exact CalVer string.


T5.1 YYZ history on

  • Wave: 6
  • Depends on: T1.3, T1.4 (published), T2.1
  • Size: M
  • Touches (YYZ): package.json, package-lock.json, astro.config.mjs, src/env.d.ts, src/lib/page-metadata.ts, kb.config.ts, .npmrc (only if the @fridai scope mapping is missing)
  • Why: the on-ramp. The site has run with history off since 2026-10-08.

Steps

  1. Replace the dependency @fridai/astro-git-history with @fridai/fio-redline@<exact CalVer>; update the three import sites (astro.config.mjs, src/env.d.ts, src/lib/page-metadata.ts).
  2. In astro.config.mjs keep the existing gitlab options as they are and add contentRoots: ['<the content directory the site uses>']. Find the directory from contentDirectory in src/config/site.ts.
  3. kb.config.ts: history: true; remove the TODO(history) comment.
  4. Build twice: npm run build. Capture the [fio-redline] indexed … paths in … ms (… git calls) line from each run.

Acceptance

npm run build 2>&1 | grep -E '^\[fio-redline\] indexed [0-9]+ paths in [0-9]+ ms \([0-9]+ git calls\)$'   # exactly one line; git calls <= 8
grep -c 'astro-git-history' package.json astro.config.mjs src/env.d.ts src/lib/page-metadata.ts   # every file prints 0

Record in STATUS.md: both log lines, the wall-clock build time before and after (time npm run build), and the page count.


T5.2 YYZ review components

  • Wave: 7
  • Depends on: T5.1, T4.4, and a published package containing T3.4, T3.5, T3.6
  • Size: M
  • Touches (YYZ): kb.config.ts (new feature flag review), src/config/site.ts (type for the flag and reviewServiceUrl), src/pages/[...slug].astro, the markdown pipeline file that configures remark plugins (src/ui/markdown/build.mjs; confirm by grepping for remarkPlugins)
  • Why: put the three capabilities in front of real readers.

Steps

  1. Feature flag features.review: boolean (default false) and review: { serviceUrl: 'https://yqa.fio.sh', siteId: 'yyz' } in site config.
  2. Register remarkRedlineBlocks from @fridai/fio-redline/remark-redline-blocks.js in the site’s markdown pipeline so rendered documents carry data-redline-block.
  3. In [...slug].astro, when entry && siteConfig.features.review: wrap the rendered document in an element with data-redline-document, and render GitRedline, GitChangedSince and GitComments from the package after the article with serviceUrl, siteId and documentPath={repoPath(entry)}. Keep the existing PageHistory.
  4. Set features.review: true.
  5. Build and deploy through the site’s normal pipeline.

Acceptance

npm run build 2>&1 | tail -1                                    # build succeeds
grep -c 'data-redline-block=' dist/<any document page>/index.html   # > 0

From a tailnet device, open a document page in a browser and record in STATUS.md: the page URL, that the three components reach live or connect-required (visible in the element’s data-redline-state in the inspector), and a screenshot path. Then run npm run smoke -- https://yqa.fio.sh yyz <that document path> from this repository and record the output.

Git history

Loading the page's history…