Files
biaslens/docs/HANDOFF.md

31 KiB
Raw Permalink Blame History

Handoff — BiasLens investigations and rewrite desk

Last refreshed with the PR that touched it. Read this first, then AGENTS.md.

New direction (read first)

As of 2026-11-03 the product direction is docs/plans/2026-11-one-loop.md: collapse Examine/Investigate/Rewrite/notebook into one article page (Read · Talk · Check · Rewrite), add chat, a followed-sources feed and sitekit nav. Its last section is a ready-to-paste build brief for phase 1. The briefs further down are superseded where they conflict.

Signed-in writer path (12 Nov 2026)

Drafts: src/app/write/Composer.tsx restores a local draft only when this tab wrote it (sessionStorage mark biaslens:draft-tab:<key>, set on every local save and on the unmount flush); otherwise it offers Resume / Start empty and pauses local saving until the choice. Link-buttons: src/app/globals.css (a.bb-button--primary) beats the link reset; scripts/design-check.mjs guards it. /privacy and /terms state only what the code does — change them with the behaviour. The sign-in button grouping is accountkit's (OidcButtons) and the consent links are OrangeCat's client spec (scripts/oauth/client-specs.ts in bitbaum/orangecat); both are separate pull requests in those repos.

Languages on langkit (30 Nov 2026)

src/lib/config/languages.ts builds the language list with @bitbaum/langkit (defineLanguages, pickLocale); localizeSpelling and the copy tables' swiss() are langkit's respelling. The reader's chosen report language is localStorage['biaslens:report-language'] (AnalyzeWorkspace). Next step, not done: moving the copy tables to ICU messages (toIcu, langkit README "Migrating"); it changes two things on purpose (a name inside a Swiss sentence is no longer respelled; French zero is singular), so it wants its own PR.

The name in one place (30 Nov 2026)

src/lib/config/brand.ts holds the name, mark, domain, tagline, description and contact (DEFAULTS), and userAgent() for every outgoing fetch. Write BRAND.name (in a template or JSX), never the name itself: brand.test.ts fails on a written-out name in src outside comments and log lines. Each NEXT_PUBLIC_PRODUCT_* variable is read by name on purpose, or client components would not see it.

Write it again (30 Nov 2026)

RestyleBar (src/app/_components/voices) sends restyle: { rewriteId, how } to POST /api/rewrite. The route takes the voice, form and length from the earlier text (shorter → short, longer → full), checks the person again, and queues it like any simulation; RESTYLE_INSTRUCTIONS (src/lib/config/rewrite-modes.ts) is the only wording the model gets, and the draft goes in as restyle on RewriteInput. The new text keeps revisesId; the simulation page links back to it.

Jobs and allowances (30 Nov 2026)

POST /api/rewrite does every check in the request (reading, person, correction, opt-outs), builds a RewriteContext (plain data, no keys) and queues it: enqueueJob then ensureWorker, answering 202 { job }. The worker (src/lib/jobs/worker.ts) runs in the app's process, two loops, started on first use by that route and by GET /api/jobs/<id> (so a waiting page restarts it after a deploy); BIASLENS_WORKER=0 turns it off. claimNextJob uses FOR UPDATE SKIP LOCKED with a three-minute lease; a job is tried at most twice. The model work itself is executeRewrite (src/lib/rewrite/execute.ts), shared with the inline path for a reader's own key. Clients use requestRewrite (src/lib/client/rewrite-request.ts), which follows the job and returns the old response shape. Allowances: lib/jobs/allowance.ts (ALLOWANCE), counted from Job, failed jobs not counted. Why not limitkit for this: its Store is synchronous, so it cannot read Postgres without changing the package. Started from instrumentation.ts first, the worker sent the dev server into a reload loop; starting on first use avoids that. Walked locally: 202, the worker took the job, the model call failed (placeholder key) and the page and /api/jobs reported it plainly. A successful run on a real model has not been seen.

A reading's first screen (30 Nov 2026)

FirstScreen (src/app/analyze/report) sits right under the masthead of ReportView: the top three of rankFindings (the reply card's ranker, so both agree), then AskVoice for answerers(report) (named people among the voices, deduplicated, at most four) when reportId is passed (saved readings and fresh ones once saved), then the reply action and "The full reading". "Show the passage" appears only where the passage is marked in the text, which a saved reading does not keep; it was not walked on a fresh analysis.

Readings as jobs (30 Nov 2026)

POST /api/analyze checks the input, then, with a database, queues a Job of kind analyze (202 { job }); the worker runs analyzeArticle with analysisDeps (src/lib/analysis/execute.ts, shared with the no-database path) and writes the stage to Job.stage. useAnalysis follows the job with followJob (src/lib/client/jobs.ts, also used by requestRewrite). finishJob/failJob clear every job's input; scrubReadings cuts a done reading's result to { savedId } once GET /api/jobs/<id> has delivered it and, in the worker loop, after an hour. Allowances per kind: ALLOWANCES. Walked on a production build at 390px: queued, done, report on the page, input {} and result scrubbed. A reading on a real model through the queue was not seen (the free budget was spent that day; the walked reading was a cache hit).

Own record (prompt rewrite@1.9, 30 Nov 2026)

A person simulation may not state figures from the speaker's own record that the article does not report. The prompt says so (OWN RECORD in src/lib/rewrite/run.ts). Then ownRecordFigures in src/lib/rewrite/own-record.ts checks the draft: a first-person sentence with a number the article lacks, or "tripled"/"doubled", sends it back once with those sentences named. The notes pass (voiceNotes) throws when its answer is cut off, malformed or holds nothing usable, and is then tried once more; it has 2,400 output tokens (1,000 cut German notes off). A person text with no notes says so (notes.missing in rewrite-copy). Not yet measured on a real model: the free budget was spent. The eval stops at EVAL_TOKEN_CAP (default 30,000 tokens) or at the first daily refusal, so it never drains the key the live site uses.

Voice eval (30 Nov 2026)

pnpm run eval:voices (eval/voices.eval.ts) pairs each article in eval/voices.json with its voices, reads each article once, writes the simulation as production does (voiceChain), then measure (code) and a judge (judgeMessages, parseJudgement in src/lib/rewrite/voice-eval.ts). Output: eval/out/voices/<prompt>/ (ignored); keep a summary in eval/baselines/. In this cloud container Node's fetch needs NODE_USE_ENV_PROXY=1 and GROQ_API_KEY=proxy-injected (the key is a network secret on the environment). The free Groq key is shared with the live site: it ran out on 30 Nov at 2 of 14 cases. EVAL_CASES picks cases, EVAL_PAUSE_SECONDS paces them, EVAL_WITH_POSITIONS=1 gives the record as cited positions.

My voice (30 Nov 2026)

/who/[qid]/voice (holder only; others go to the claim page) lists voiceItems and statedPositions. On a simulation, HolderTools (src/app/_components/voices) replaces the plain text for the holder: AnnotatedText with onCorrect, then approve, change, answer. All effects live in src/lib/claims/voice.ts and check the claim themselves: setApproval, publishOwnAnswer (the only writer of owner@1 texts), withdrawPosition, recordPosition (stated only for the holder), promptPositions (stated and cited, never changed), revokeClaimAsWrong. Labels come from labelFor and are stored with the text; change a state, store its label again. A holder's change goes through POST /api/rewrite with correction (an empty quote means the whole text, holder only); the route finds the holder with verifiedClaim, passes correctionByHolder and positions to the prompt, saves claimId, and records the position in after(). POST /api/profile/voice takes approve, unapprove, answer and withdraw-position. An own answer is tied to the profile as answered. Walked at 390px locally: approve, own answer, the voice page, a stranger (no tools, /voice sends to sign-in, the API refuses). The change path was not walked to a result: it needs the model chain.

Claiming a profile (29 Nov 2026)

/who/[qid]/claim and POST /api/profile/claim (start, check, revoke). Rules both sides share are in src/lib/claims/rules.ts (browser-safe); the checks in proof.ts (server only: it imports ai-kit's fetch guard); rows in store.ts. checkClaim is the only path to verified: the address is on the Wikidata item now, was on the revision current 14 days ago (listedAt), and carries the code (checkXPost through publish.x.com/oembed, or checkWebsite: the well-known file or a meta tag, never the page body). isVerifiedOwner(db, qid, accountId) is the gate for everything an owner may do next. Position (same migration, 0013) is empty. Known limits: an X name that the public record still lists but someone else now holds would pass; Wikidata edits older than 14 days are trusted; the profile shows the proof, not the account. Walked locally on a 390px screen against the real Wikidata, X and a real site up to every refusal; the verified screens were seen by setting the row by hand, and no real owner has claimed anything.

Voices from history; journal cross-post (29 Nov 2026)

Voice.died (person voices) is set in POST /api/rewrite from Wikidata's date of death (yearOfDeath, also returned by checkPublicFigure); the request parser never reads it. It adds the HISTORIC line to the person prompt and selects the personHistoric label. A profile of someone who has died must not be claimable. GET /api/blog/[slug] serves bip-kit's sharedArticle; the post page links to OrangeCat's composer with crossPostUrl.

Free AI capacity (30 Nov 2026)

src/lib/ai/capacity.ts: one ai-kit createLinkCooldown per process (on globalThis). Every complete() call spreads ...cooled(chain) (the chain without cooling links, plus onLinkFailure). minutesUntilCapacity(error) turns an all-rate-limit ChainExhaustedError into the reader's message (analyze route, rewriteError). freeCapacity() feeds /api/health (freeAi) and /numbers. Whether the box has an OpenRouter key (the second free provider) shows in freeAi.providers once this is deployed; without it, Groq's limit is the whole free capacity. A new model call must use cooled().

Who made a simulation (29 Nov 2026)

Rewrite.authorId (migration 0012) is the accountkit user who asked for or brought the text, read with getSession() in POST /api/rewrite; null when not signed in. profileMaterial and getSimulation join users for the name. AskVoice (src/app/_components/voices) writes the next voice's answer from a simulation's page. The target model and the order of the remaining steps are in docs/architecture/voices-system.md.

Sharing and the menu (29 Nov 2026)

src/app/_components/share/ShareBar.tsx is the one share control (system sheet with the card image where the device takes files, else copy link; networks behind a disclosure, list in share/networks.ts, also used by the reply SharePanel). Simulation and profile pages have opengraph-image.tsx built with renderCard; a simulation's card leads with "AI simulation · not written by …" and its share text comes from rewriteCopy().shareText. The menu and tab bar are configuration in Chrome.tsx (sitekit renders them); specialist tools are linked from the footer only.

Ready for users (29 Nov 2026)

Plan and definition of ready: docs/plans/2026-11-ready-for-users.md. Built so far: the home hero with a GET form to /analyze?u=, /about, src/app/robots.ts and sitemap.ts, and usage counts (src/lib/usage/store.ts, table UsageDay, migration 0011; count() never throws and is called in after() from the analyze and rewrite routes and inline from replies). /numbers shows 30 days. To count a new action, add it to USAGE_EVENTS and call count.

Written elsewhere, published here (29 Nov 2026)

POST /api/rewrite takes two more shapes for a person's response. exportPrompt: true returns the write prompt as one plain text (exportPrompt in src/lib/rewrite/run.ts; no model call, nothing saved). supplied: <text> runs acceptSupplied: formatSupplied (pure, tested), a supplied check pass on the chain the reader is entitled to, then the basis notes; it saves with promptVersion supplied@1, no model id and the personSupplied label. A refusal is SuppliedRefused (422 with the passages); no verdict from the checker is a failure, never a pass. The check is a model's judgement and can miss things: the label, the opt-out list and the challenge link remain the backstop.

Which model writes a voice (29 Nov 2026)

src/lib/ai/voice-chain.ts picks the chain for POST /api/rewrite: the reader's own key (ownModel in the request, from Settings; ai-kit byok, checked by POST /api/ai/own-model), else a paid model the server names, else the free chain. Spending is decided by ai-kit's spend module alone.

To switch on the paid model for simulated voices, the box needs, in /opt/biaslens/shared/.env (the vendor key may sit in /opt/fleet/env):

BIASLENS_VOICE_MODEL=<vendor>:<model>        # vendor from ai-kit BYOK_VENDORS
<VENDOR>_API_KEY=<the vendor's key>          # e.g. ANTHROPIC_API_KEY
AI_PAID_DISABLED=0                           # the fleet's kill switch, on when unset
BIASLENS_AI_PAID_OK=1
BIASLENS_DAILY_PAID_CALLS=12                 # one simulation is 3 to 4 calls
BIASLENS_DAILY_PAID_INPUT_TOKENS=75000
BIASLENS_DAILY_PAID_OUTPUT_TOKENS=12000

BiasLens's built-in allowance is 1 call a day, so nothing is spent until the three BIASLENS_DAILY_PAID_* lines raise it; the fleet's own daily cap (90 calls, 120,000 input tokens across every app) still binds on top. The caps are counted per process unless the box sets a shared ledger. Not yet tried against a real paid vendor from this repo: the first run on the box is the test.

Simulations that explain themselves (29 Nov 2026)

Plan and rules: docs/plans/2026-11-voices.md. A person simulation runs up to four passes (src/lib/rewrite/run.ts): write, stance (would they sign it; one revision), write again if needed, basis (voiceNotes: positions with origin and reason, and suggested other voices). Notes are kept only when their quote is in the text word for word, so the UI (AnnotatedText) can mark the passage. A reader's correction arrives as correction on POST /api/rewrite; the route checks the passage is in the earlier text of the same person on the same reading. Not built: checking "from their record" notes, response chains, claiming a profile, position memory.

Profiles with a page (29 Nov 2026)

/who lists every profile; /who/[qid] is one. Identity is the Wikidata item (Profile.qid, migration 0009), so only a name that resolved to exactly one public record gets a page. Profiles are created in three places, all through src/lib/entities/attach.ts: the analyze route after a report is saved (author and outlet, in after()), the rewrite route (the simulated person, whose item the route already checked; a simulated outlet in after()), and GET /api/profile when a reader opens a found record. ProfileLink ties a profile to a reading (author, outlet) or a rewrite (simulated).

src/lib/entities/works.ts gathers works on three shelves that must stay apart: authored works (Wikidata P50, Open Library by P648, own YouTube channel by P2397), addresses from Wikidata identifiers, and Internet Archive recordings whose title names the person as speaker (likelySpeaker; found by title, said so on the page). Record and works are cached on the row for a week (an hour if a catalogue was down). Readings from pasted text are unlisted and not shown on a profile; a simulation is shown, without a link to such a reading. Profile and simulation pages are noindex until someone decides otherwise. /who ties simulations written before profiles existed (backfillSimulations), so no script has to run.

Known gaps, on the roadmap: journalists' articles (no open catalogue lists them; outlet feeds and sitemaps by byline are the next source), interviews and podcasts beyond the Internet Archive, people without a Wikidata item, quoted people (only authors, outlets and simulated voices get a page so far).

First-time writer path (12 Nov 2026)

A signed-out dogfood found: no Save draft on /write, sign-in copy about the profile, /desk stuck on "Loading what you wrote…", unlabeled composer tools and an unexplained "On more than one wire" row on Today. All five are fixed in one PR (see CHANGELOG.md, "a first-time writer's path"). Server drafts were already stored (WrittenArticle.status = 'draft'); the change is the path to them and the honest state line (src/lib/writing/draft-state.ts). The sign-in line is chosen from next in src/app/account/purpose.ts. The desk reads articles on the server (src/app/desk/page.tsx); GET /api/writing remains for other clients. Open: drafts still need a title and some text to save (validation unchanged), and a signed-in composer does not autosave to the account — it saves on Save draft.

WritingKit composer and source rewrite adoption

Implementation branch: feat/writingkit-biaslens, starting from navigation release 91a3819f3dc7799136884ce0809c9c8cfd48a282. Scope: adopt the verified WritingKit release in existing composer assistance and source RewriteStudio. Preserve the current editor/tools, original sources, simulation labels and copied output. Keep Undo and storage in the composer. Investigation revision writes are a separate adapter scope: retain their server capability/revision checks and history; stopping a browser request does not roll back a committed server write.

Acceptance: synchronous overlap prevention, Strict Mode lifecycle, late answers after manual edit/revert, account/draft/report switches, cancellation followed by new work, safe Undo after editing and source rewrite option changes. Run the normal full verify/build/browser gates and existing server conflict/capability checks, then fleet sweep, deployed receipt and current-artifact journey. Host adapters are implemented using the verified Git artifact; its compiled entry matched the tagged source. Full verify passed (211 tests in 42 files plus nine design checks), the production build passed, and the controlled browser lifecycle suite passed at 320/390/834/1440px, including an abort-ignoring provider, Strict Mode, edit/revert, safe Undo, account/draft/report switches, latest anonymous-draft handoff and labelled source-copy preservation. Friendly network-error/retry and instruction-edit coverage also passed. The screenshot fixture exposed the existing client-input import of a server store; PUBLIC_ID now has one client-safe producer and the store preserves its public export. Full local browser smoke passed: 42 page captures, shared shell, existing investigation journeys and the four-width WritingKit suite. The fixture uses the complete product stylesheet stack with controlled auth/model/publishing boundaries. PR #194 owns exact candidate CI, fleet-sweep merge, deployment and served-receipt/journey evidence; inspect it before resuming. Concurrent ChatKit 0.23.0 (#193) and generated fleet rules (#195) were reconciled into this candidate; retain both when refreshing it. Local checks alone do not establish those later stages. Next after this bounded adoption: the one-loop workspace and a versioned investigation adapter that reconciles server writes rather than pretending browser abort rolls them back. Wider one-loop consolidation, Heidi/Loki and physical keyboard/production publication acceptance remain open.

Grouped navigation canary

Current candidate uses published SiteKit 0.7.0, tagged at 28012464359deaec61deee35b81ba6cabfcc0cfe. Release, exact-commit CI and npm publication passed. The exact-version npm metadata matched that commit and the locked integrity. Local online installation hit upstream proxy transport errors and offline installation failed for missing cached metadata. The candidate's normal online CI installation and full verification passed; its source tree matched the locally built and browser-tested implementation.

BiasLens supplies descriptive groups; SiteKit owns the disclosure, layout, keyboard/focus behavior and dismissal. The phone shortcuts use SiteKit SVG icons. Keep the masthead tabBar shortcut off: hiding the grouped menu would remove destinations beyond the five shortcuts. The footer labels /workspace as “Workspace tools”, matching its destination.

Screenshot review drove shared corrections in SiteKit #47 and #48: align desktop panels with the header frame, avoid clipping narrow account popups, and preserve nested host widget styling. Consumer checks measure actual AccountKit popup bounds and row anatomy in both account states at 320/390/834/1440px. The signed-in menu fixture is controlled; it is not a real production sign-in or physical-keyboard test.

Browser screenshots use Playwright against the production build with the same page list, dimensions and PNG checks after the Chromium CLI capture timed out. The harness owns its Next process directly so cleanup stops the server. Generated browser evidence stays out of source formatting and Git.

Source preserves the writing-tools/comments work from #189 and the published package floors from #190/#191. PR #192 is the authority for current candidate, merge and deployment evidence. Candidate CI passed online frozen install, full verify (211 unit tests in 42 files plus nine design checks) and production build. Browser CI passed both screenshots/user flows and the database-backed account lifecycle. Corrected desktop, phone and 320px account-menu screenshots were inspected; local production-build browser checks also passed. Later documentation-only commits retain normal required checks. A source commit or PR merge alone does not establish deployment: check the PR's served receipt and current-artifact journey before treating the canary as deployed. The wider one-loop/WritingKit adoption remains open; follow Fleet's content plan for Heidi, Loki and cross-product ownership. Private drafts do not synchronize.

Current state

  • Writing tools (src/app/write/WritingTools.tsx): Speak (chatkit useDictation, server leg /api/transcribe) → POST /api/writing/assist (src/lib/writing/assist.ts, ai-kit free chain) for draft/improve with Undo; Photo (Commons PhotoSearch, inserted as a bip-kit figure); Chart (bip-kit chart fence); Preview (chatkit Markdown). Comments (src/lib/writing/comments.ts, Comment table, migration 0008) under published articles, posted through chatkit's Composer. Article actions are one shape (article.module.css .actionRow). Browser-tested locally: toolbar, chart render, comments post/remove, phone.

  • Writing (src/lib/writing/, src/app/write/, src/app/articles/, src/app/api/writing/): account-backed written articles (WrittenArticle, migration 0007) with drafts, responses (respondToId), the headline a piece is about (sourceUrl/sourceTitle) and the author's examination (reportId). trendingTopics (src/lib/writing/trending.ts) finds subjects shared across wires for Today and the composer. A nameless account sets its byline in the composer (authClient.updateUser). "Post on OrangeCat" opens orangecat.ch/articles/new?import=<this article's JSON url>; OrangeCat's composer reads it through its own server proxy. Tested end to end in a browser against a local Postgres (sign-up → write → publish → share → respond → edit → draft → delete, phone and desktop).

  • Responsive rewrite repair: rewrite.module.css uses shrinkable grid tracks and wraps imported/generated long text; report.module.css does the same for the annotated source. scripts/investigation-browser-check.mjs includes long URLs, both phone comparison views, open evidence notes and labelled copy output. Run through pnpm run browser:smoke against a production build. This repair does not complete the one-loop migration or navigation redesign.

  • Navigation: Chrome.tsx configures SiteKit's grouped masthead, tab bar and SVG icons. The package owns markup and interaction; the canary checkpoint above records verification and deployment state.

  • Shared authoring follow-up: follow Fleet's linked content plan and OrangeCat's writing checkpoint. BiasLens's WritingKit adoption and one-loop consolidation remain open. Keep evidence policies, simulation labels, capability tokens and server revision checks here. Heidi retains its variety-pack boundary and source provenance. This navigation change adds no cross-product draft synchronization.

  • Live: https://biaslens.orangecat.ch — demo investigation at https://biaslens.orangecat.ch/investigations/demo; a saved test investigation with five model-written versions at https://biaslens.orangecat.ch/investigations/3iqMy8Z5ro.

  • Investigations: claims → study findings (stance, design tier, horizon, perspective tag), compareClaims (no score), gap suggestions (src/lib/domain/gaps.ts), one-tap rewrites (src/lib/investigations/revise.ts, prompt revise@1.x) saved as DraftVersions with [E#] citations, a sentence diff and a second-pass citation check (flags). Flags become "Fix this sentence" suggestions.

  • UI (src/app/investigations/): GapDesk, VersionHistory, ReadingMode, EvidenceCards (mark reviewed / dispute, edit token only), EpistemicMap (SVG, animated, reduced-motion aware), MethodTimeline, EvidenceCharts (chartkit), InvestigationImages + PhotoSearch (Wikimedia Commons, open licences only), SuggestSources (OpenAlex/Crossref leads), InvestigationEditor.

  • Rewrite studio (src/lib/rewrite/): neutral and labelled simulations (Economist / FT / Reason voices among presets), fact diff, "what the original omitted", optional evidence from an investigation.

  • Home is "Today" (src/app/page.tsx, src/lib/investigations/featured.ts): the page now opens on a public wire (src/lib/wire/), then the featured investigation. Featured ids only (FEATURED_IDS), never every saved link. Visit streak, follows and edit links live in src/lib/client/local.ts (device only).

  • Navigation: src/app/_components/Chrome.tsx (one list → sitekit SiteMasthead + SiteTabBar). Pages /investigations, /desk (MyDesk, device-local), /settings (SettingsForm, PreferencesApplier sets data-text-size/data-motion on <html>), AccountTabs across desk/settings/account.

  • Shared packages extended for this work: @bitbaum/ai-kit 1.24 (/images, ai-kit PR #108) and @bitbaum/sitekit 0.5 (SiteTabBar, sitekit PR #41). BiasLens PRs #152–#165.

Architecture and packages

Next.js App Router, TypeScript strict, Drizzle/Postgres (PGlite in tests), Vitest. Packages: @bitbaum/ai-kit (model calls via freeChain('BIASLENS'); images via @bitbaum/ai-kit/images once released), @bitbaum/chartkit, @bitbaum/design-tokens, @bitbaum/accountkit, @bitbaum/chatkit, @bitbaum/sitekit, @bitbaum/mail-kit, limitkit. Investigations are one jsonb row (Investigation table, migration 0004) with an edit-token hash and an optimistic revision (409 on conflict). Shared provider keys come from the fleet's /opt/fleet/env (Loki scripts/hetzner/fleet-keys.conf); never put a key or a model id in the repo.

Run and test

pnpm install, pnpm dev, pnpm run verify (format, lint, typecheck, design check — no raw colours outside src/app/theme.css — and tests). Screenshots: a Playwright helper outside the repo; any headless Chromium at 1366 and 390 px works. PRs auto-merge through the fleet sweep (gh workflow run auto-merge.yml if it stalls); deploy follows on main.

Known issues

  • The sign-in page shows "Continue with OrangeCat" whenever SIGNIN_* is set, but Morulia (morulia.orangecat.ch/api/providers) has no provider switched on yet, so the button dead-ends. The fix belongs in @bitbaum/accountkit (hide the button when the issuer publishes no providers) and in Morulia (paste one provider's keys).

  • Writing help answers 503 until the server has an ai-kit key (GROQ_API_KEY / OPENROUTER_API_KEY via /opt/fleet/env); the composer says so in words.

  • Tab icons are still unicode glyphs; @bitbaum/sitekit 0.6 (PR #45) adds SiteIcon and the masthead tabBar prop. Switch Chrome.tsx to them when the floor-raise lands.

  • The citation check is a model pass: it can miss or over-flag (it flags numbers cited to an indicator definition finding; the fix is to cite the dataset).

  • Commons search can return off-topic files; ranking only reorders.

  • AI illustrations are built (@bitbaum/ai-kit/images, src/lib/investigations/ai-image.ts, POST /api/investigations/<id>/images, bytes in the GeneratedImage table, served at /api/images/generated/<id>) but stay hidden until the server sets IMAGE_GEN_API and IMAGE_GEN_MODEL.

  • Version pages show the model run id; times are shown in Europe/Zurich.

Unverified

Colour-blind contrast of the stance colours; screen-reader pass of reading mode; the citation check's precision across many articles.

Next briefs (paste as-is)

  1. "Switch on BiasLens AI illustrations: on the Hetzner box add to /opt/biaslens/shared/.env the lines IMAGE_GEN_API=gemini (or openrouter-chat) and IMAGE_GEN_MODEL=<an image-output model that key can use>; the key itself (GEMINI_API_KEY / OPENROUTER_API_KEY) already comes from /opt/fleet/env. Restart the app, open /investigations/3iqMy8Z5ro with its edit link, generate one illustration, confirm the AI-generated badge, screenshot desktop and mobile."
  2. "In bitbaum/orangecat, replace src/services/images/generate.ts with @bitbaum/ai-kit/images (same behaviour, BYOK unchanged); keep the tests."
  3. "In bitbaum/biaslens, keep the desk (edit links, follows, streak) in the signed-in account so it syncs across devices; additive migration only."
  4. "In bitbaum/biaslens, record who reviewed a link and when, show it on the evidence card, and add a filter by review state."