Sourceevents · latest 8 · order by at desc · actions_log retired on X-520
Messageslatest inbound + outboundGAP
Sourcemessages · latest 4 · order by created_at desc
Contacts
R-100 · records · an independent rootpeople, not accounts — a household is several of these
—
Contact Boardeach contact sits with its earliest open job · call = no visit booked yet
Contact Listpress a person to correct their details, or delete one made by mistake
Name
Phone
Email
Jobs
Properties
Last activity
Sourcecontacts · job counts by join · property count reachable only through jobs until the junction lands, so a contact with no job reads zero properties
Contact
Added —
Phone
Mobile preferred
Email
Portal sign-in
Properties
Through jobs only, today
Lifetime value
Signed contracts, all jobs
Everything On This Contactevery table that points at a personGAP
Sourceone read per node scoped by contact · the properties node reads through jobs until the junction lands
Properties
R-110 · records · an independent rootthe house outlives everyone who owns it
Property Boardeach property sits with its earliest open job
Property List
Address
City
State
Zip
Jobs
Contacts
Sourceproperties · job counts by join · contact count reachable only through jobs today
Address
Normalised key —
City
County —
Jobs
All time, all owners
Lifetime revenue
Signed contracts at this address
Last worked
Warranty clock
People At This Addressrole and validity — the junction renderedGAP
Sourceproperty_contacts (owed) · role and validity per relationship · past owners stay readable as past
Everything At This Addressevery table that points at a placeGAP
Sourceone read per node scoped by property · job history spans owners, which is the point of holding it on the property
Jobs
R-120 · records · stage pipelinethe center of the graph — everything else hangs off a job
New jobboard: open work · list: everythingcount: — · count(jobs)
Pipeline Boardone column per stage · count and value per column
Current — in stage under a week Aging — a week or more Stalled — two weeks or moreWeight, not colour: orange means unwired and nothing else.
Sourcejobs_list · stage · derived label · property · budget total · days in stage from stage_transitions (052)
All Jobsthe office view — sort, filter, work a queueGAP
Job
Stage
Client
Property
Contract
Balance
Days in stage
Next action
Sourcejobs joined to contacts · properties · proposals · invoices · next action has no home — no todos table exists
/—
Job
Created —
Stage
—
Client
Primary contact
Property
Reached through this job
Contract
Signed proposal total
Balance
Invoiced less paid
Activity
The propertybackstage · everything the crew needs to get in
Sourceproperties by jobs_list.property_id · access and delivery notes never cross to P-600
People on this jobeveryone holding a live role+ Assign
Sourcejob_contacts and job_principals, both where valid_to is null · the role is read off the person, never copied onto the assignment · ending an assignment keeps it · is_primary says who signs (189) and job_contact_set_primary moves it (190)
Stagethe verb lives on the job, not on the card that links to it
Sourcejob_stage vocabulary · set_job_stage() writes jobs.stage_term_id and one stage_transitions row (064)
Progresswhat the logs have answered, stop by stop
Sourcestage_gate (148) · log_type_stages maps a log type to the stop it answers · required counted from log_requirements so a stop with no log reads as owed
Everything On This Jobevery table with a foreign key to jobs, drawn as one surfaceGAP
Sourceone read per node, all scoped by job_id
Job Timelinewhat happened, in order
Sourceevents scoped by job_id, oldest first · a stage move points at stage_transitions for its from and to
No estimate on this job yet.
Estimates
Sourceestimates_list · budgets, many per job since 171 · option count and proposal link computed in the view
Sectionsbudget_items · quantities resolved by formula · live
Sourcebudget_items (034) · formula_text + parameter_snapshot + resolved_qty frozen at add · an estimate prices LIVE from catalog_pricing for the life of the job (101 - nothing freezes here; the copy into document_lines does) · templates arrive through apply_template (092), quantities through the formula cascade (093), and in_total decides what counts toward the ESTIMATE and in_body_total toward the body on screen (095, 188)
Totals
Sourcecomputed in SQL — section subtotals, markup, total. Nothing on this sheet computes.
Documentsone typed table, a fixed ladder of what a job carries — D-S3.53
The processderived · nobody ticks these
Sourcestage_gate (148) · a requirement is true because the artifact exists · a manual tick can never move these numbers
Sourcetasks (149) · the list is derived from subject + department_term_id, so an empty list cannot exist · assignee_principal_id has no picker until a person has a name (R-130)
Daily Logsthe crew records · the office publishes
Sourcedaily_logs by job_id (128) · log_type_term_id (135) is the folder these photos land in · the checklist is log_gate, derived from the artifacts — nobody ticks · notes is the crew’s words and never leaves this page · client_summary is authored here and the Customer chip names who sees it — P-600 reads daily_logs_list.published, which is the pair (137, 138)
Filesevery artifact of this job — photos, documents, video
Sourcefiles by job_id · tag_links · file_tags (070, renamed 137) — bucket diamond is private, so every URL here is signed and expires in an hour
Messagesconversations on this job
Sourceconversations by job_id (281), newest activity first · messages by conversation_id, oldest first · received left, sent right — position, never a color · the quoted chain is trimmed by the renderer, never in the store · the list and its verb are always drawn — the verb lives under the list, so it is there before the first conversation exists · every Send names its conversation (284), so the subject is the conversation's title and her answer files back
Crews
R-130 · recordswho does the work · W2 or 1099 · paid hourly, by the day or by the piece
Crew Listone job a day each · a second job the same day turns that day red on the Schedule
Name
Trades
Hired as
Paid
Leader
Jobs booked
Sourcecrews_list (626) · trades from the company’s own trade list · jobs booked = open work entries from today on · written only through crew_save and crew_retire · a crew is a name on the schedule, never a login (S2.99); the crew leader’s login comes with the crew app
People
R-140 · recordseveryone this company reaches a job through
Staffwho works here, whether or not they can sign in
Name
Role
Email
Phone
Sign-in
Sourceprincipals_list where is_staff · display_name derived in the view (151) · written only through principal_save and principal_retire, because authenticated holds SELECT on principals and nothing else
Client loginsa homeowner reaches jobs through their contact, never a company
Name
Email
Phone
Sign-in
Sourceprincipals_list where contact_id is not null · the name comes from contacts and is never copied onto the principal (151) · minted by principal_client_grant (187) from the verb on this sheet · the SEAT is bound by principal_client_seat (267), called by the client-seat Edge Function after it mints the login · the second factor is DEFERRED BY RULING (S3.54) and gated on launch, so a password is the only secret today
CrewsThe people who do the work have their own list on R-130 Crews (626, Gabe 2026-11-15: a crew is who does the work, not who signs in). A crew leader’s login arrives with the crew app and points at the crew.
SuppliersWhere material comes from. vendors already exists and is read by the catalog; nobody can sign in as one, which is the whole of what this section is waiting for.
Architects1099, paid by the contractor, and the homeowner is never involved (Gabe, S3.09) — so an architect reaches a job exactly the way a crew does. Same branch, different trade.
Schedule
E-200 · engagementa plan is a commitment, and a commitment has a cost
appointment — a person at a time work — capacity on a job delivery — an arrival on a date collection — a departure on a date a crew on two jobs that day — one job a day each
Sourcecalendar_entries (155) · a task is on the calendar when it has a start_date, which is derived and not a column · kind is a label and decides nothing · an entry with no start_time draws in the all-day strip, because a time cell would assert an hour the record does not carry
This week, in orderthe same rows the grid draws
When
What
Kind
Job
Who
Sourcethe same read, ordered by date then time · the client comes from job_contacts through the view and is never copied onto the entry
Deliveries that draw themselvesA delivery is bookable here by hand now. It becomes a record when a material order exists to derive it from, which is E-230 — until then the arrival is typed, and a typed arrival is honest as long as nothing claims it was confirmed.
A moved appointment says nothingBooking emits appointment.booked once, and the homeowner’s timeline reads it (156). Moving one emits nothing: a reschedule is a different fact, event_kinds has no term for it, and inventing one here would be a vocabulary nobody ruled. Rev 2.23 ruled reschedule as supersession against a table that never existed — the dates live on the row now, so that ruling is owed a re-cut before this band comes down.
Messages
E-210 · engagementevery conversation, across every job
Conversationsnewest activity first
Sourceconversations_list (285) · one row per conversation, the job named by jobs_list · order by last_message_at desc · the row opens the job on its Messages tab, because the thread has exactly one renderer and it lives there
Daily Logs
E-220 · engagementthe crew records; the office publishes
+ Log Entry GAPfilter: all jobs · last 7 daysTABLE UNRATIFIED
Log — By Dayeach entry names the scheduled work it reports onGAP
Sourcedaily_logs (candidate) by date desc · work_item_id (owed) resolves the anchor · publish state from daily_logs_list.published — a Customer tag AND authored words
One Entrywhat the crew writes, and the separate thing the client readsGAP
anchor — work_item · job · author · logged at
Entry — internal
Written on site by whoever was there. Nobody outside this tenant ever reads it. It may say the crew ran late and why.
Photos — all captured
Client summary — null until published
Empty. Authored deliberately by the office, in words chosen for the homeowner, alongside the subset of photos marked above.
Sourcedaily_logs.entry · daily_logs.client_summary (owed, nullable) · photo selection per entry — the published set is a subset
Production Orders
E-230 · engagementwork order drawn — material order still gated
This sheet was gated as one thing for a reason that only covered half of it. The stated gate was that a material order’s recipient is a supplier, and delivering a document to one is the same permission question a vendor login is. True — of the material order. A work order goes to your own crew, and a crew has no auth surface by ruling. The two halves were bundled, so the internal half inherited an external half’s gate.
The Work Orderlabour and subcontract lines, from the frozen estimateGAP
scopeTear off, one layer — budget_items line
quantity— SQ
crew—
1 work_item
scopeInstall shingles — budget_items line
quantity— SQ
crew—
1 work_item
scopeGutter replacement — subcontract
quantity— LF
crewsub —
1 work_item
Sourcework_orders (owed) generated from the frozen estimate · work_order_lines (owed) edge each frozen budget_item where cost_type in (labour, subcontract) · one work_item per line
Catalog
M-300 · estimating vocabularyest / actual is a first-class field, not a naming trick
+ New ItemAuthor many items
Catalog Itemsthe vocabulary an estimate line is allowed to name
Item
Cost Code
Est Unit
Order Unit
Cost Type
Unit Cost
Unit Price
Sourcecatalog_pricing · catalog_items · catalog_purchase_units (071, dimensions 081) — one item, many packages · cost_codes (hierarchical, self-FK) · units · cost_types · markup_rules · named by budget_items.catalog_item_id, nullable
Templatesa named selection of items, each line carrying a quantity or a formula
Sourcetemplates + template_items (080, 090) · a line names an item and may carry a quantity or a qty_formula, which overrides the item’s · expands into budget_items through apply_template (092)
Proposals
M-320 · money — estimatingfreeze is three things: copy + trigger + chain
PREVIEWThis is what the homeowner will see, and the values are
live. This strip is not part of the document.
Diamond Exteriors
Roofing · Siding · Windows · Northern Virginia
Property photograph
Photographed during your assessment. Full photo set stays available in your portal.
Proposal prepared for
Thank you for having us out. Below is everything we found, exactly what we propose to do about it, and what it costs: no line items you have to decode, and no number that moves after you sign.
What we found
3 · What we are buildingX-540 — a drawing or render
Scope of work
Your investment
TotalAll materials, labor, permits, disposal, and cleanup
How you pay
When it happens
Who you call
What is included
Full tear-off and haul-away of existing material
Permits pulled and inspections scheduled
Daily site cleanup and magnetic nail sweep
Photo documentation before, during, and after
A named point of contact for the whole project
Warranty
What happens next
Accept this proposal
Signing locks these prices and puts you on the schedule. Nothing is charged today; the deposit is invoiced after you sign.
Signature
Printed name & date
Sign above the line with your mouse, finger or pen.
Signed
Not quite right? Ask for a revision and we will re-issue this proposal with the changes priced. Nothing here is final until you sign it, and asking costs you nothing but a day.
Questions before you sign? Call your project contact directly. We would rather answer one now than have you guess.
Terms
Design note — not part of the document. The issued surface carries no stamps and no source lines by ruling; a client never sees scaffolding. The freeze fires at ISSUE, not at signature: 065 closed the wording, money and visibility the moment a number was assigned, and 068 made that deny-by-default and made acceptance one-way. Signing writes a row and a stamp, nothing else. The option cards are the selection windows on document_groups made client-facing, which is also the only place a client writes to the graph; choose_document_line is that path and it is wired. Photography comes from the assessment set, so the hero is a real dependency, not decoration.
Invoices
M-400 · money — actualspawned by the sign event · the schedule is data, not code
Outstandingoldest money first — this is the cash viewGAP
Invoice
Client
Job
Issued
Due
Amount
Paid
Balance
Days late
Sourceinvoices · aging needs invoices.due_date; if that column is absent every bucket on this sheet is unanswerable
Invoice ListGAP
Invoice
Job
Status
Due
Amount
Paid
Balance
Sourceinvoices · balance computed in SQL · payments recorded on M-410
PREVIEWThis is the invoice the homeowner receives. Values read null until the adapter is wired. Issued surfaces carry no stamps, so this surface carries one banner instead.
Diamond Exteriors
Invoice
Invoice
Issued
Due
Billed to
For work at
Against your signed agreement
Signed Contract total
Deposit — first of three scheduled paymentsNot a new charge. This is the portion of your signed contract that comes due at this milestone, at the split you agreed to.
Already receivedEvery payment recorded on this project to date
Amount due
Pay however suits you. Card and bank transfer go through the button; checks are fine too — make it out to Diamond Exteriors and hand it to your project lead. We record the date and method either way, and it shows up in your portal the same day.
Design note — not part of the invoice. A milestone invoice does not re-list materials. Re-itemising a signed contract invites a renegotiation the client already settled, so the document names the milestone, references the agreement, and shows what has already been received. The only numbers are the three that answer “what do I owe today.”
Payments
M-410 · money — actualdate + method per payment · money physics stay at the bank
+ Record Payment GAPfilter: last 30 days
Record A Paymentwhat arrived, when, and by what railGAP
Invoice
Date received
Amount
Reference / check no.
Method
CheckCardBank transferCash
Sourcepayments insert · money physics stay at the bank — this records the fact, it does not move funds
Payment Ledgerinsert-only — no update, no deleteGAP
Date
Invoice
Job
Method
Amount
Sourcepayments · FK → invoices · a job can pay deposit / progress / final by different rails
Costs
M-420 · money — actualthe cost mirror of the invoice — and the input every report depends on
book of record: Diamond CRM · pushed to QBO · last sync —
GAPThis queue is an exception list, and an empty one is the normal state. Costs are authored here, so nothing routine arrives to be reconciled. What lands here is a transaction at the bank with no counterpart in this system — and every figure on X-500 excludes whatever is still sitting in it.
Unmatched At The Bankthe safety net, not the main pathGAP
Sourcebank-feed rows read through QBO with no matching native transaction · suggestions read vendor history + open jobs + date proximity
Cost Ledgerthe allocation is updatable; the transaction behind it is notGAP
Date
Job
Vendor
Doc Type
Cost Code
Status
Amount
Sourcecost_allocations joined to ledger_transactions · date/vendor/amount from the transaction, job and cost code from the allocation · status derived from bill_payments against due_date, never stored
Budget Versus Actual By Cost Codethe grain variance is computed atGAP
Cost code
Description
Budget
Actual
Variance
Committed
Sourcebudget_items grouped by cost_code vs cost_allocations grouped by cost_code · committed = issued order lines net of landed cost, per X-500
GAPSync is only as clean as this table. A QuickBooks account with no cost code cannot be reconciled to a job, and a cost code with no account cannot be pushed back. Every unmapped row on either side is a transaction that will stall in the inbox.
Cost Codes To Chart Of AccountsCOGS accounts map to job cost codes · expense accounts map to categoriesGAP
Cost code
Description
QuickBooks account
Account type
Status
Sourcecost_codes.qbo_account_ref owed · account list read from the connector · unmapped rows on either side are the sync health check
Record A Billa liability, and the expense it booksGAP
Payeewho is owed
Job or category
Datedelivery or service, not entry
Due date
Amount
Cost code
Where does this belong
A joblands in that job’s P&LA company categoryoverhead, marketing, equipment, insurance
Where this came from
An invoicesupplier, sub, utility, insurerEntered by hand
Does this repeat
One offMonthlyQuarterlyAnnually
Does this fulfil an order
material order —open, this supplier, this job$—Link
work order line —subcontract, this job$—Link
No orderrecords the bill unlinked; variance falls back to cost-code grain—Skip
Sourcebills insert (payee, due_date, amount, origin) · cost_allocations carries job_id or expense_category · recurring_bills insert when a cadence is set · fulfils_order_id and fulfils_schedule_id, at most one · candidate orders read open lines on the same job and supplier
What the company owes right now, and to whom. A bill leaves this queue when settlement rows against it sum to its amount. Nothing here is a stored status.
Bills Awaiting Paymentoldest due firstGAP
Payee
Job
Origin
Due
Amount
Paid
Balance
Sourcebills where sum(bill_payments.amount) < amount · paid and balance computed in SQL · no stored status column
Recurring Billswhat will come due, not what is owedGAP
Payee
Job or category
Cost code
Every
Next due
Expected
Sourcerecurring_bills (owed) · payee, cadence, expected amount, cost code, job_id or expense_category · produces expected obligations, never bills
Settling Oneand what happens when the money came from outsideGAP
Bill
Date paid
Amount
Reference
Where the money came from
A company accountvisible in QuickBooksSomeone out of pocketpersonal card, personal cash
Sourcebill_payments insert · funded_by nullable · when set, a successor bill is born payable to the funder
A difference between the two systems is not a defect. QuickBooks is kept on a tax basis by an accountant. This is kept on a management basis, to run jobs. The requirement is not that they agree — it is that every difference has a recorded reason.
Changed In QuickBookspending a decision, and an empty queue is normalGAP
Sourceqbo_changes (owed) · one row per changed entity · detection mechanism unruled · pending rows only; ruled rows move to the register below
Standing Divergenceswhat the accountant needs at quarter closeGAP
Sourceqbo_changes where disposition = divergent · reason required · an issued surface: the accountant reads this, so it is gated by the access tier and not internal-only
Record A Costan expense, with no liability attachedGAP
Job or category
Vendorwho supplied it
Datedelivery or purchase, not entry
Amount
Cost code
Reference
Where does this belong
A joblands in that job’s P&LA company categoryoverhead, marketing, equipment, insurance
Who paid for this
The companycash or a company card at the counterSomeone out of pocketcreates a bill owed to them
Receipt
AttachNone
Which budget line does this belong to
budget line —matched on cost code$—Link
budget line —matched on cost code$—Link
No budget linerecords the cost unlinked and flags it on reports—Skip
Sourceledger_transactions insert with origin=native · cost_allocations insert, job_id or expense_category per the exactly-one CHECK · funded_by set only when someone paid out of pocket, which births a reimbursement bill · candidate lines read from budget_items on the same job filtered by cost_code
Client Portal
P-600 · portals · issued surfacea document is read once — a portal is returned to
Viewing asa client is a contact on a job — no membership row, no credential
Diamond Exteriors
Signed in as—
—
—
Activity
Design note — not part of the portal. A homeowner never sees the
internal pipeline; operational granularity reads as anxiety. The five client
phases are derived from artifacts, not from stage — a proposal
exists, the contract is signed, the job is closed. Stage is maintained by a
person and lags: this database holds an accepted proposal on a job still
reading Quoted, and a client shown that would be told something false.
In progress has no producer and draws as a future stop rather than
an invented state.
Diamond Portal
P-610 · portalsruled, not drawn
Material Confirmation — The Crew’s Surfacecounted against ordered, then the request queueGAP
Item
Ordered
Counted
Exception
Photo
Submitted, this is either confirmed or it is a discrepancy report — and that is derived, not chosen: any line where counted differs from ordered, or an exception is set, makes it the second. Nobody picks an outcome from a menu.
Requested item
Qty
Suggested supplier
Photo
Disposition
Sourcematerial_confirmation_lines joined to material_order_lines (both owed) · material_requests (owed) · confirmed-or-discrepancy derived from the lines, never stored · crew principal only (R-140)
One System, Drawnthe same renderer, a different listGAP
The production system, rendered by the client portal’s ladder component with a different ordered set. Nothing here is a second copy of that code, which is the claim being demonstrated rather than asserted.
Each stage names its witness where it has one: the order exists, the delivery is verified, the work items complete. Confirm the truck deliberately has none — it is a stage only a person can assert, and 2.28’s split says so out loud rather than pretending the system knows.
GAPsystem_stages owed (R-140). Sales, marketing and admin are undrawn; the shape is proven once and copying it four times is exactly what this pass exists to prevent.
Sourcesystem_stages where system = production, ordered (owed) · rendered by the P-600 ladder component · three systems undrawn
Intake
P-620 · portalsevery lead, before it is anybody's job
+ Take a call—the public form is served at page.html?p=free-inspection
Waitingnobody has answered these yet
Marketing
P-630 · portalswhere the public surfaces are authored — P-620 is what they write
The P-6xx family is about audience. P-600 and P-610 are one job seen by a client and by a supplier; P-620 is what a stranger may write. P-630 is where every one of those public surfaces is authored — landing pages, the forms on them, the social schedule, the blog. It is the front door of the front of the house, and it is drawn before the pipeline it feeds because a sheet is not designed before the sheets it derives from.
+ New Page GAPstatus: all · owner: unmodelled
Reports
X-500 · the rollup heartfully native reads · books stay external by ruling
period: month to date · basis: accrual
GAPThis statement excludes — unreconciled transactions totalling $—. A profit figure that silently omits costs still sitting in the inbox is not a profit figure. Every report in this system states what it left out, on the report, not in a footnote.
Job Profit & Lossone job, revenue against costGAP
Sourcerevenue from proposals + change_orders + invoices · cost from cost_allocations on this job · percentages of contract, computed in SQL
GAPEvery card below excludes the same transactions. Anything still unreconciled is missing from all of them, and the count is shown so each number is read with the right amount of trust.
What Is Coming Duethe company’s obligations forward, not a job rollupGAP
Payee
Job or category
Source
Due
Amount
Sourceunpaid bills by due date, plus recurring_bills expected within the window · an expectation is labelled as one, never mixed silently with a real liability
Every Jobthe chain per job, and rolled upGAP
Job
Budget
Contract
Actual
Projected
Variance
Margin
Sourcevariance = budget − projected · margin = (contract − projected) ÷ contract · both computed in SQL, never here
Both statements, and every difference between them, on one screen. Neither is a draft of the other. QuickBooks is kept on a tax basis by an accountant; this is kept on a management basis to run jobs. The screen exists so the gap between them is a stated list rather than a feeling.
one shape, any report · the residual is computed per report
QuickBooks, Mirroredread, never written — the last received artefact in the systemGAP
Account
QuickBooks account type
Period
Year to date
Sourceqbo_report_snapshot (owed) · report_type + line_key + period, immutable, origin QBO · a report is a row here, not a table · pulled at close, never authored here
Diamond, Management Basisthe same period, the way the business is runGAP
Cost code or category
Maps to
Period
Year to date
Sourceinvoices + cost_allocations rolled through a per-report line mapping · accrual, capital purchases expensed · the mapping is owed and unruled: a balance sheet does not roll up through cost codes the way a P&L does
Why They Differitemised, and it has to footGAP
Difference
Reason
Disposition
Amount
Sourceqbo_changes where disposition = divergent, plus basis differences computed from the two statements · residual = (Diamond total − QBO total) − sum(stated differences)
Ordered Against Actualwhat the order said, what the invoice saidGAP
Order
Supplier or crew
Cost code
Ordered
Actual
Variance
Sourcework_orders + material_orders against bills.fulfils_order_id · order grain where the link exists, cost-code grain where it does not · readable when the invoice arrives, not when it is paid
GAPClosing %—%
GAPAd Spend$—
GAPAvg Ticket$—
GAPAvg Margin—%
The Chain, Definedeach figure means exactly one thingGAP
Sourcebudget_items · proposals + change_orders · cost_allocations · remaining budget — every node computed in SQL
What The Stakes Numbers Needfour figures, three dependencies
Figure
Reads
Blocked by
Sourceclosing rate needs proposal issued/signed timestamps · ad spend now arrives through the cost pipeline · margin depends on the projected ruling above
Settings
X-510 · rollupthis sheet is where “data, not code” is either true or exposed
Tenantone row, and every scoped write checks itGAP
Setting
Value
Governed By
Company
companies · select-only
Scope
LAB001
RLS with_check on every scoped write
Time zone
GAP owed — a delay of five minutes needs a wall clock
Send window
GAP owed — quiet hours, per tenant, not per rule
Issued branding
read by every issued document · gold is permitted there
Price guarantee
data, not code — frozen onto the proposal at issue
Sales window
data, not code — ours, never shown to a client
Payment schedule default
data, not code — the DEFAULT is a setting; the schedule itself freezes onto a proposal at ISSUE (127)
Sourcecompanies · tenant_settings (owed) — time zone and send window are read by the automation layer, not by any screen
What every proposal sayschanges the next one, never one already issued
Sourcecompany_settings · one row per tenant (161) · documents_list resolves the printed ones onto a DRAFT and issue_document copies them onto the row before the status flips, so an issued document keeps what the homeowner was shown · the autocomplete key (185) is a working setting and is copied onto nothing
Why this is here and not on a job
A tick on one log is a task and lives on
that log. A requirement belongs to the log type, so changing
one changes every log of that type — the ones already
recorded and the ones nobody has written yet.
Sourcelog_requirements by log type · what proves an item comes from log_subject_fields() (154), so a requirement can always be satisfied by somebody · written only through log_requirement_save and log_requirement_retire
Job Stagesthe internal pipeline — twelve, and contractualGAP
Stage
Order
Reads It
R-120 board columns · job.stage_changed
the stall signal, once stage_transitions lands
the phase map, below — which has no home
Sourcejob_stages (vocabulary) · active_stages — enters by SQL, by design · a stage name is contractual and appears in rules
“Data, not code” is a claim, and this register is where it gets tested. Every hand-maintained map in the system is listed together for the first time. Contractor #2 is a different set of rows in each of these, or the claim is false.
Every Hand-Maintained Map In This Systemone row each — and one of them reads NOGAP
Map
Grain
Authored where
Is it data?
job_stages
tenant
X-510 · by SQL
yes — rows
job_stages.client_phase
stage
X-510 · owed
yes, once it exists
markup_rules
item → code → type → tenant
X-510 · owed
yes — most specific wins
cost_codes.qbo_account_ref
account
M-420 mapping register
yes — owed column
vendor field map
vendor → parameter
M-310 · owed
yes — Roofr and Hover differ
item quantity formulas
catalog item
M-300
yes — a formula is a row
catalog_items.order_unit
catalog item
M-300 · owed
yes — never a constant in a formula
automation_rules
tenant
X-520 · owed
yes — three slots
event_types
tenant
X-520 · owed
yes — the extension point
message_templates
tenant
X-510 · owed
yes — referenced by id
action_type
—
SQL · fixed named set
no — and deliberately so
record_baseline key list
—
application code
NO — and not deliberately
Sourcetwelve maps · ten are rows or owed as rows · one is a closed set by ruling · one is a hardcoded list nobody ruled
Message Templateswhat a rule is allowed to sendGAP
Template
Channel
Fired by
Gate
lead_ack
email
lead.submitted + 5 min
none — they wrote to us
lead_ack_sms
sms
lead.submitted + 5 min
GAPsms_consent required
onboarding
email
proposal.signed
none
invoice_reminder
email
GAPinvoice.overdue
waits on the clock
visit_tomorrow
sms
GAPwork_item — owed
GAPsms_consent required
Sourcemessage_templates (owed) — id, channel, subject, body · referenced by automation_rules.action_params, never inlined
Jurisdictions
Locality
Frost depth
Ground snow
Wind (Vult)
Seismic
Termite
Code
Source
Automations
X-520 · rollupthe process definition is a record
If automation is what makes the process consistent, the automation definition is the process definition — so it is native. Marketing automation is not being integrated; it is being replaced. GoHighLevel is a specification reference for what these rules must express, never a runtime dependency. Splitting the process definition from the records it drives puts two owners on one fact, which is what this system refuses in invoices.amount_paid.
Rules As Rowswhen this · after that · do the one thingGAP
whenproposal.signed
afterimmediately
doadvance_stage → Signed
whenjob.stage_changed → Signed
afterimmediately
dodraft_invoices_from_proposal · deposit
whenlead.submitted
after5 minutes
doGAPsend_template · lead_ack · email
whenGAPinvoice.overdue
afterimmediately
doGAPsend_template · invoice_reminder
whenpayment.received
afterimmediately
dosend_template · paused by the office
Sourceautomation_rules (owed) — event_type, delay_minutes, action_type, action_params jsonb, enabled · one row per rule, per tenant
Event Vocabularydata, not code — a row per kind of thing that happensGAP
Event type
Emitted by
Standing
job.stage_changed
trigger on stage_transitions
ruled on E-200 — table owed
proposal.signed
trigger on proposals
table exists
invoice.issued
trigger on invoices
table exists
payment.received
trigger on payments
table exists
daily_log.published
trigger on daily_logs.client_summary
column owed — E-220
lead.submitted
trigger on lead_submissions
table owed — P-620
work_item.completed
trigger on work_items
table owed — E-200
invoice.overdue
GAP nothing — no write happens
needs a clock. amount_paid is refused, not owed — balance is derived (112)
Sourceevent_types (owed) · events (owed) — emitted by SQL trigger, never by application code, per thin client
Action Types — The Closed Seteach enters one at a time, with the thing that consumes itGAP
advance_stage
Consumer: R-120. Writes a stage_transitions row with cause set to the run. The board reads it the same way it reads a human move.
draft_invoices_from_proposal
Consumer: M-400, shipped at 112. Drafts the whole schedule off an accepted proposal, penny-exact. There is no payment_schedules table: the invoice rows are the schedule, and a table restating them would be a second owner for one fact.
GAP send_template
Consumer owed: E-210. The action has a caller but no drain — there is no outbox, no delivery record, and no channel. It enters the vocabulary so the rules above can be drawn honestly, and it cannot fire.
Sourceaction_type is a fixed named set in SQL, not a row — you author which action runs, never a new kind of action
Run Recordwhat fired, what was held, and whyGAP
Sourceautomation_runs (owed) — rule_id, event_id, status, at, held_reason · every write it makes carries its id as cause