The opening steps of every agent session on a Layerz model, from the modeling guide.
- Conventions first.
layerz_get_conventions({ model_id })returns the conventions of the model's workspace (the standing preferences its members share: conventions, tone, modelling habits, on every model of the workspace) and the model's FINANCE.md (currency, units, sign convention, glossary, objective, statement structure). Every value returned by the tools is expressed in those conventions:12000may be 12k EUR or 12M USD depending onunitsandcurrency. The same two documents come back asconventionsin the results oflayerz_get_model,layerz_create_model,layerz_build_from_blueprintand an unfilteredlayerz_read, so a session that opens a model already has them. - Push a local FINANCE.md. When the local project root carries a
FINANCE.md, push it withlayerz_set_finance_md({ content, source: "imported" })so later writes follow the same conventions. - Keep the FINANCE.md complete. Its Markdown body documents the objective
(what the model builds, the deliverable expected), the structure of the P&L,
the Cash Flow and the Balance Sheet (sections, key line items, how they
connect: net income → retained earnings, cash flow → closing cash) and the
conventions. When any of this is missing or stale, reconstruct it from the
live model (
layerz_readreturns every item withrole+parent_uid; that hierarchy IS the statements structure) and persist it withlayerz_set_finance_md. Update it in the same turn as any change to the model's identity, structure or conventions (layerz_set_finance_mdor themetaop oflayerz_patch). - Model identity. A model carries a
glyph: a kebab-case Lucide icon name (https://lucide.dev/icons) shown as its emblem in the app and on shared links. Whenglyphis absent fromlayerz_get_model, set one coherent with the business via themetaop oflayerz_patch(SaaS →trending-up, coffee shop →coffee, real estate →house, banking →landmark, energy →wind, HR →users, valuation →scale, treasury →wallet), without asking. - Read before writing.
layerz_read(structure, optional values) andlayerz_get_model(full detail, branches, sharing roster) are the two reads;layerz_validate_modelaudits the DAG. Values returned withcomputable: falseare zero-filled placeholders: fix the model first. - A
noticeis for the user. A tool result can carry anotice(the AI actions of the billing cycle nearing the plan's cap). Relay it to the user in one sentence, once, and carry on with the task. Past the cap, the tools answerQUOTA_EXCEEDEDwith the reset date and the link to pass on.