Read the story

Architecture

Builds visit plans from eleven practice masters.Runs inside the estimator.

The engine and its editor live in their own repo and reach the estimator as a built snapshot committed under vendor/sequence, stamped with the commit it came from. The estimator generates a plan from a transcribed practice master on the server, the builder edits it, and each save is a new version in Postgres.

4.5 hours

from the first commit at 11:35 AM on Aug 27 to the builder live in the estimator

2 of 2

packages built from the same clean commit, or the estimator's CI fails

11 masters

the practice's own documents, transcribed word for word, all validated

0 errors

in 271 attempts across 75 live estimates, production audit of Aug 27

New York --:-- simulated

A coordinator opens a plan
Hybridge Treatment Sequence The engine and its editor live in their own repo and reach the estimator as a built snapshot committed under vendor/sequence, stamped with the commit it came from. The estimator generates a plan from a transcribed practice master on the server, the builder edits it, and each save is a new version in Postgres. Practice masters the office's Word docs Capacity planner 2nd consumer, behind vendor:check in CI one commit, clean tree Sequence repo core + ui, no app pnpm vendor:sequence build, copy, stamp vendor/sequence committed, link: deps estimator-prod generates on the server Sequence builder three pane editor Core tests 65 in Vitest Postgres 16 versions as JSON Word and PDF from the plan on screen built dist stamped import the plan transcribed test first older copy checks stamp save version download GCP hybridge-estimator, us-east1

Hover a part to trace what it touches. Click it for its notes.

  • Built by me
  • Managed by Google
  • Outside system
  • Main data path
  • On demand
  • Credentials cross

When it breaks

What each failure does, and what it does not do.

  1. A consumer falls behind

    Nothing goes red. vendor:check only notes it when the source repo sits beside it, and both repos carry a file marked TEMPORARY that says so.

    SYNC-STATUS.md

  2. No master fits the case

    The builder opens empty for a manual build instead of bending a master to fit. The Aug 27 audit found 8 such cases in 271.

    estimator/scripts/audit

  3. A refresh does not take

    The vendor script compares node_modules with the new stamp and exits 1 if it still serves the old build.

    estimator/scripts/vendor-sequence.mjs:167

What I tuned

Small choices that keep it fast and cheap.

  1. link:, not file:

    file: copied the folder once and never again, because the spec never changed. link: points into the folder, so a refresh is live.

    estimator/docs/sequence-packages.md

  2. 15 minute units everywhere

    Every value in the masters divides evenly into 15 minute units, so hours are only a way of printing it.

    README.md

  3. One JSON version per save

    The editor and both renderers already read that shape, and nothing queries inside the steps, so five tables would be a second thing to keep in step.

    estimator/docs/treatment-sequences.md:39

Guards

Rules the code enforces, not rules people remember.

  1. One commit for both packages

    A core and an editor from different commits is a pairing nobody tested, so CI refuses it.

    estimator/scripts/check-vendor-sequence.mjs

  2. Staging is stated, not guessed

    Staging is an explicit mode on the option. Reading empty tooth lists as no staging once sent every Hybridge case to a manual build.

    packages/core/src/generate.ts:140

  3. Unvalidated means a banner

    A master not transcribed from the practice prints a draft, not clinically reviewed banner on screen, PDF and Word. All 11 are validated.

    packages/core/src/render/text.ts:15