Maintaining the reference pages
Keep /help, /developers, /legal, /changelog, /compliance and /status accurate: where each page's content lives and how it is checked.
TaxPilot's public reference pages read signed out, outside the app shell, under app/(public). Most of their content is data in apps/web/lib, so a change to the product and a change to its documentation can land in the same pull request.
Help, Developer docs and Legal
Each collection is a typed Collection (lib/docs/types.ts) with sections and an array of Doc. A doc has a slug, title, one-sentence summary, section, updated date, related slugs and a list of blocks: h2, h3, p, list, steps, table, callout, code, figure, faq, defs and links. One renderer, components/docs/doc-blocks.tsx, draws every block, and the table of contents and search index read the same structure.
Text inside blocks accepts a small markup: **bold** for UI labels exactly as on screen, backticks for code and file names, [label](/path) for links and [[⌘+K]] for keys.
- Write or edit the doc in its collection file.Verify every UI label by finding it in the source. Don't describe a feature the code doesn't have.
- Add a diagram if a picture helps.Register an inline SVG under an id in
components/docs/diagrams.tsxand reference it with afigureblock. UsecurrentColorand CSS variables so it reads in light and dark. - Set
updatedto the date you checked the content against the product. - Run the docs test.
npx vitest run test/docs.test.ts --maxWorkers=1fromapps/web.
test/docs.test.ts checks unique slugs and known sections, the summary format (one sentence of 20 to 240 characters ending in a full stop), at least one h2, that related slugs exist, that table rows match the header width, that figure ids are registered, and that every link resolves to a doc, a heading anchor or a known route. Legal docs must carry version metadata.
Changelog
The changelog merges two sources, newest first:
- Product changes: add an entry at the top of
PRODUCT_CHANGESinlib/changelog.tswithid,date,type,area,title,descriptionand optionaldetails.typeisNew,Improved,FixedorSecurity; it drives the badge colour.areais one of the fixed values inProductChange. - Tax rules changes: these come from each release's
notesinsrc/repo.tsthroughlistReleases(). Don't repeat them inlib/changelog.ts, so the two never drift.
Write entries for an accountant: what they can now do, in the product's own words, not in commit-message style.
Compliance versions
complianceRows() in lib/compliance.ts builds one row per release, newest first: tax year, status, the Income Tax Act assent date (enacted), the T2, AT1 and CO-17 form editions (versionCode looked up by publishedAs), every AT1 schedule edition, and the first filing spec's label. There is nothing to edit by hand: register a release or change a form's versionCode and the page follows. test/compliance.test.ts checks the order, the 2026.1 editions and that every release has an assent date and a CRA spec.
Status
The status page has two inputs. runHealthChecks() in lib/health.ts runs live server-side checks that load the real code paths (the app responds, rules releases load, every release's forms build, the filing adapters), and /api/health returns the same result as JSON: HTTP 200 when operational or degraded, 503 on an outage. Availability history comes from the hand-maintained log in lib/status.ts: COMPONENTS, INCIDENTS and MAINTENANCE. It isn't an external monitor, and the page says so.
- When something goes wrong, add an
Incidentwithid,title,impact(outage,degradedormaintenance), the affectedcomponents, a UTCstart, andupdatesas it progresses (investigating, identified, monitoring, resolved). Leaveendout while it's open. - Never back-fill guesses.
dailyStatusandavailabilityderive the 90-day bars and percentages from the log, so an invented entry shows as fact. test/status.test.tscovers the derivations.- When
NEXT_PUBLIC_STATUS_URLis set, the app's Service status links point to the hosted status page (STATUS_URLinlib/links.ts).
Legal documents
Legal documents are docs in lib/docs/legal/docs.ts with a legal block of LegalMeta:
versionandeffective(an ISO date, or"[date]"while it's a draft);changes: a version history of{ version, date, summary };placeholders: facts counsel or the business must supply before publishing. They show as an Open items callout on the page.
Keep bracketed placeholders such as [date] in the text until the fact is confirmed, and list each one in placeholders. Never fill one with a guess. Bump version and add a changes entry for every material edit.
/terms redirects to /legal/terms (next.config.ts).
Related
- ContributingBranch, change, check and open a pull request the way this repository expects, with the right extra steps for rules and UI changes.
- TestingRun the engine, web and Playwright suites, know what each covers, and add the right tests for a change without overloading your machine.
- Rules releasesLearn what a rules release contains, how a return picks one, how releases are published and frozen, and how returns move between them.