The definition

Four files define Leaseclock. Every key you write has an anchor, and each lists the outputs it generates.

Reads
Startup · Noun · Offer
Generates
all 34 outputs
Open

The sample

leaseclock.com/Startup/leaseclock.com.mdx
---$type: Startup$id: leaseclock.comname: Leaseclockdescription: Tracks lease renewals for small property managers.pitch: No renewal slips past its date.icp: small property managersbrand: Leaseclock---
leaseclock.com/Noun/Unit.mdx
---$type: Noun$id: leaseclock.com/nouns/Unitname: Unitfields:  label: { type: text, required: true }  building: { type: text }---
leaseclock.com/Noun/Lease.mdx
---$type: Noun$id: leaseclock.com/nouns/Leasename: Leasefields:  unit: { type: link, target: Unit, required: true }  renter: { type: email, required: true }  endsOn: { type: date, required: true, indexed: true }  status: { type: choice, options: [{ key: active }, { key: ended }] }verbs:  renew:    does: Move the end date forward    input: { endsOn: { says: the new end date, type: date, required: true } }    from: [active]    fn: { kind: code, body: replace }  end: { does: End the lease, from: [active], to: ended }---
leaseclock.com/Offer/pro.mdx
---$type: Offer$id: leaseclock.com/offers/proname: Leaseclock Proprice: { amount: 29, currency: USD, unit: month }limits: { Unit: 200 }personas: Property manager, Leasing coordinatorstatus: Live---

Each key line is an anchor: #definition--Noun.Lease.name.

Fields

A field's type sets its filter and its schemas on every Interface.

TypeIn LeaseclockFilterJSON Schema · Zod
textUnit.label, Unit.buildingexact, in, prefixstring · z.string()
emailLease.renterexact, informat: email · z.email()
dateLease.endsOnexact and range: endsOn[lte]=2026-11-30format: date · z.iso.date()
linkLease.unitexact, instring, link: Unit · z.string()
choiceLease.statusis, is not, in, not in, by option key: status=activeenum · z.enum(["active", "ended"])
moneyLease.rent, from Change one lineexact and rangenumber · z.number()

Money is an amount in major units plus a currency, as the Offer writes its price: amount: 29 is $29.

indexed: true on endsOn adds sort=endsOn and the Admin's Ends before filter.

Verbs

What you write as says: is what your agent reads.

$.d.ts
type LeaseRenewInput = { /** the new end date */ endsOn: string }
/** Move the end date forward · active · modes try|do */
You writeIt generates
input: { endsOn: … }LeaseRenewInput, the Renew dialog's form, and the body of POST /leases/4b/renew
from: [active]active in the doc line; Renew disabled on an ended Lease, with the reason; 422 Refused on any other call
to: endedEnd sets status to ended, and an End button on each Lease
fn: { kind: code, body: replace }The Function renew runs on commit. Override its body, and its URL, preview, undo, button and agent call stay generated

Names

Name it once. The name is the address.

You writeIt becomes
name: Leasethe Collection leases; /leaseclock.com/leases; $.Lease, with 8 methods; show /leaseclock.com/leases on the CLI; the Admin's "Leases" list
does: Move the end date forwardthe doc line your agent reads on $.Lease.renew, and the Renew button's tooltip
says: the new end datethe Renew dialog's one field, and the Docs page's input label

The engine refuses a name that breaks this grammar with 400 Invalid input, and the message names the fix.

You writeThe refusal
name: leasename is a Noun's name: PascalCase, letters and digits, at most 64 (got "lease")
EndsOn: { type: date }field "EndsOn": a field key is camelCase, starting with a lower-case letter
Renew: { … }verb Renew: a Verb is named by its action form: camelCase

Contents