citations.ts
@file The triage table. Every answer this bot gives comes from here.
Overview
@file The triage table. Every answer this bot gives comes from here.
A lookup table, not a model. Each entry is a plain reading, a next command,
and a file:line into this repository. Nothing is written from memory: if a
failure mode is not documented in the tree it does not get an entry, and the
bot escalates instead of guessing. A confident wrong diagnosis costs somebody
an evening, which is worse than no answer at all.
expect is the drift guard. scripts/check-citations.ts reads each cited line
and fails if the substring is no longer on it, so an edit to mk/cdk.mk that
moves a line breaks CI rather than quietly turning this table into folklore.
Keep expect short and distinctive, and never let it span a line break.
depends on signatures.ts · used by check-citations.ts drift.ts decode-devid.ts help-me.ts twin.ts why.ts signatures.ts twin.ts
flowchart TD allCitations --> signatureCitations
API
Fexport function cite(c: Citation): string
modules/woz_uwb/src/fira/fira_session.h:111 — one citation as a bare
file:line, for building a reply string. Ranges are display-only: cite the
anchor line here, and write the span into the sentence around it.
explainDecisionFexport function allCitations(): Citation[]
Every citation the bot can print, for the drift checker.
signatureCitationsFexport function formatCitations(citations: Citation[]): string
` mk/cdk.mk:293 ` — the form a terminal turns into a link.
handler, matchesSection