Perceptions
A Perception is the type declaration of a Page or Pane. It states the Pane’s one type, which other Panes it uses, which Plots it owns, and the Pane’s own data when it has any. It is the contract between the values people save, the Pane’s code, and every Page that places the Pane, and it is what lets Parable refuse bad data before it is saved. A Perception is part of its Page or Pane, saved and versioned with it; it is not a Piece of its own. It describes what a value may contain. It does not hold saved values, which are Preferences, and it does not decide who may act, which is Policies. A Perception is a TypeScript declaration that exports an interface named Perception extending BasePerception, with the Pane’s type in angle brackets:BasePerception<Category> declares type: Category. The type is what the Pane shows and what people save on it, so a Pane has one type and never a second one for saved values. A type whose items people save is a named interface with an id field, Generic.Text or Identity.UUID, that names each item; Preferences are rows of the type, one for each item and each actor (see the Preferences Power). A Pane draws with no value from its parent when its type takes null (T | null), when it is a saved-data Pane, which shows its own rows, or when it owns Pane data; any other Pane shows “Choose a Preference or provide an input.” until its parent hands it a value. With no value, its code gets null as props.primitive, and the type of props.primitive takes null too, so read it with a check for null, such as props.primitive?.name. A Page’s type is null, and a Page is composition only: its code may import only the Panes it declares and the runtime layout modules, and the compiler refuses anything else. The other parts are the Panes it uses (panes), the Plots it declares (the second type argument), and the resolved Policy decisions (policies), which the host supplies and which cannot be replaced or narrowed. Extra root fields are refused.
There are four kinds of Pane, and the Perception says which one a Pane is. A Plot Pane, such as Meetings, owns the Plots it draws, and its type is the kind of the rows of the one Plot it does not declare. A bound Pane, such as a meeting’s attendees, has no SQL: one field of its parent’s row feeds it as props.value, and it uses its parent’s Policies. A saved-data Pane, such as Categories, a date range, an audience or a switch, has no SQL: its rows are the values people save. A layout Pane, such as a section, has a null type and holds no data. Which parts are Panes follows the test in the Panes Power, and many things of one kind are rows. A field that is not a Pane uses the design system’s default control for its type. Any Pane can also own data of its own.
Optional fields say more about the Pane. readonly data: readonly Concept[] declares the Pane’s own data: a list of a named interface with an id field, such as an ontology or the descriptions of Provider tables, that the Parable owns. The data travels with each Release, holds no person or Workspace ids, and changes only through a proposal, item by item, under the Pane’s data Policy; Pane code reads it in id order with data.get(id) for one item, data.list({ limit, after }) for one page, and data.list() or the data.useItems() hook for every item, and SQL reads parables.<parable>.<pane>_data. readonly preload: "all" carries every saved item with the Pane’s load, for a bounded set such as categories; "page" carries one page, for rows that grow such as judgments; without it, rows load when the code reads them. readonly overrides: true lets a Plot Pane take per-actor rows by id that change only the reader’s own view of the Plot’s rows, never a Refresh, a Pipeline or a Report. readonly fixedDefaults: true on a Pane whose type has an id field means no Me, team or This Parable row can change a Default row: a save with a Default row’s id is refused (PA-AU-094), and every read shows the Default row as it is. A type with one top-level list of Identity.Recipient, such as readonly to: readonly Identity.Recipient[], and an Identity.Signer field, such as readonly from?: Identity.Signer, holds rows for named people: each row is a This Parable row that names 1 to 100 active members, and only the person who signed it and the people it names read it. readonly proposes: readonly ["plot"] lists the Piece kinds that the Pane’s code may propose, such as a Pipeline builder that proposes Plots; "pane" lets it add, rename and remove the Panes that its own data layer holds, each with its Plot, and the server writes each new Pane’s code from a code module that exports KindPane; a Pane may always propose changes to its own data. A Plot that no Pane draws is saved on the data-layer Package with propose.plots and kind ‘plot’, and needs no Pane. readonly workspaceFiles: true lets the code of the Pane or Page read the Workspace’s files with files (see the Panes Power). Only a person who can view the Workspace’s files may save it.
attendees: Bound<Panes["meetingAttendees"], "attendees">. The field must be in the parent’s type, with the bound Pane’s type, and a field feeds one Pane. The bound Pane takes the value from its parent’s row, so it needs no read of its own, and it cannot narrow its parent’s Policies yet: keep its Policies at the defaults.
{ Generic, Temporal } from “@psgen/scalar-lib” (add Identity, Contact or another namespace when a field needs it): Generic.Text for text, Generic.Float64 for a number, Generic.Int64 for a whole number, Generic.Boolean for yes or no, Temporal.Date for a calendar day such as “2026-10-09”, Temporal.DateTime for an instant (an ISO 8601 string), Temporal.Time for a time of day such as “09:30:00”, Temporal.Duration for a length such as ”90s”, and the scalar-lib type that says what a value is where one fits, such as Identity.UUID or Contact.Email. A field that may have no value is T | null, a list is readonly T[], and an optional field is written with a question mark. A link to another item is a typed reference, Ref<Category>, imported from parable/foundation: on the wire it is the item’s id, TypeScript refuses a link to a different type, and a save and Prepare check that the item exists. A Ref names a named interface with an id field, declared in this Perception or imported from another Pane’s Perception. A value with several fields is a named interface of these, declared in the Perception: never an inline object type, a tuple, or a union of different types. Raw JSON is not a type: Generic.JSON, unknown, any and Readonly<Record<string, T>> are refused (no-raw-json); items keyed by text are rows of a Pane, or a list of a named interface with an id field. A plain string, number or boolean is not a scalar-lib type, and neither is a JavaScript Date. Never import Text, Number, YesNo, Empty, List, Day, Moment, Time, Duration or Map from parable/foundation: write Generic.Text, Generic.Float64, Generic.Boolean, null, readonly T[], Temporal.Date, Temporal.DateTime, Temporal.Time or Temporal.Duration instead, and each one imported is PA-AU-051. Time is always a Temporal.Date, a Temporal.DateTime or a Temporal.Time, never Generic.Text or a number. The check judges a time by the field’s name: a number field whose name ends in at, date, timestamp or epoch, such as created_at, is read as a time and refused with PA-AU-051. An amount to date, such as completed_quarter_to_date, is a number. Name a number field for what it counts, such as completed_this_quarter, and give a time Temporal.Date or Temporal.DateTime. A span is a named interface with a field for each end, such as started_at and ended_at. A literal union such as “7d” | “30d” is text with fixed values. The platform casts a column holding a type’s values in another width or encoding where the Plot returns: any integer, REAL or DECIMAL to a number field, DATE64 to a Temporal.Date, a TIMESTAMP of any unit or zone to a Temporal.DateTime in UTC. Text where a number is declared is still PA-AU-047, and a day or time held as text needs a CAST to DATE or TIMESTAMP.
Older Perceptions used patterns that are now Warnings & Errors, each refused at Prepare and Publish, with a message that says what to write instead: Versioned<T> and Versioned<PlotSql> (versioned-removed: declare the value as the Pane’s data and change it with propose.change, make it rows of a saved-data Pane, or propose a change to the Plot), Live<T> (live-wrapper: remove the wrapper), a preferences field (one-type: remove it, or move a second type into its own Pane or into data), also readonly preferences: null (one-type: remove it and write the type as T | null, so the Pane still draws with no value from its parent), raw JSON (no-raw-json), a field bound wrong or twice (bound-field), a bound Pane with Policies of its own (bound-policy), and readonly primitive (primitive-renamed: the field is type, which BasePerception<T> already declares). A save is refused only when it adds one of these, so you can remove them one step at a time.
The Home Page’s Perception, and no other, names the Providers the Parable reads as named groups in an optional providers field: readonly providers: { readonly code: { readonly title: "Code"; readonly description: "Pull requests, reviews and commits."; readonly role: "populate"; readonly choice: "atLeastOne"; readonly providers: readonly ["github", "gitlab"] } }. role is “populate” (Required to Populate) or “improve” (Improves the Parable); choice is “atLeastOne”, “atMostOne” or “exactlyOne”, and a “populate” group is never “atMostOne”. Each Provider is its catalog name as in Plot SQL, a Provider can be in several groups, and every value is written in quotes. Put in a group every Provider that the Parable’s Plots read. Prepare refuses a Provider that is not in the catalog, but it does not find a Provider that no group names, and a Pane whose Plots read only such Providers shows no badge.
Only a Platform Parable gives its own Pieces to places in the product, and only its Home Page’s Perception declares them, in an optional contributes field of named entries. Each entry names its place and the Pieces it gives by handle, every value in quotes: readonly contributes: { readonly tab: { readonly place: "ponder.tab"; readonly page: "proofs" }; readonly checks: { readonly place: "publish.checks"; readonly plot: "checks"; readonly titles: "proofs" }; readonly review: { readonly place: "react"; readonly report: "reviews"; readonly on: readonly ["patch.proposed"]; readonly may: readonly ["read.subject"]; readonly menu: { readonly in: "parable.actions"; readonly title: "Run Proofs again" } } }. “ponder.tab” takes page, the Page of the Parable’s tab. “publish.checks” takes plot, the Plot whose rows are the checks that Publish waits for, and titles, the Pane whose rows name them. “react” takes report, the Report that runs for each subject; on, the subject kinds, only “patch.proposed” now; may, only “read.subject” now, or readonly [] for nothing; and an optional menu with in “parable.actions” and a title. A Parable fills “ponder.tab” and “publish.checks” once each. A save refuses any other place, a missing or extra field, and a Page, Plot, Pane or Report that the Parable does not have, and it names each one. A save or an archive import of contributes on a Parable that is not a Platform Parable is refused with PA-AU-085: remove contributes, and tell the person that Parable staff make a Parable a Platform Parable. No Workspace’s copy of such a Parable can fork. The “ponder.tab” Page shows as the Parable’s tab beside every Parable, and its Pane code reads the Parable on screen beside it as getParableContext().subject, or live with the useParableContext() hook from the same module: its line, the Release or the Patch at its revision, the Refresh, the Page on screen and the Piece in focus. The subject names what the person reads and grants nothing: the tab reads and saves at the person’s own participation on the Platform Parable’s copy.
A named type is vendor neutral: never one Provider’s version of another type, and never a field named for a Provider such as zoom_id. A Provider feeds a type through a mapping Pane whose Perception imports the type from its own Pane (import type { Deploy } from "parable/panes/<Pane ID>/perception"), uses it as its type, and names the Provider with @provider in its doc comment; its undeclared Plot returns that Provider’s rows of the type, and the type’s Pane owns an undeclared Plot that combines its mapping Panes by name. Every such type carries provider_refs: readonly ProviderRef[], with ProviderRef imported from parable/foundation: provider is the Provider’s catalog name as in Plot SQL, provider_id the record’s ID in that Provider as text. A record from one Provider has one entry; a record merged from several has one per source record. Build them in SQL with [named_struct(‘provider’, ‘github’, ‘provider_id’, CAST(id AS VARCHAR))] and concatenate them where records merge. A reference to a thing that can be one of several types is two fields, its ID and its kind, such as subject_id and subject_kind, with the kind a literal union of the type names; any Plot resolves it by joining on both. A link to one type is a Ref.
A Plot Pane’s type is its kind: a named interface, in scalar-lib types, of the rows its undeclared Plot returns. The one Plot that the Pane owns and does not declare returns rows of that type, picked to the columns its SQL returns, so it needs no type of its own. A Pane has at most one such Plot. A Pane whose Plots are all declared may have a null type. A Plot that takes input, or returns rows of another shape, is declared as the second type argument of BasePerception, keyed by the Plot’s handle, with a PlotContract of its input and its output:
OpenIssues | null, because a Page hands a Pane no value: without null, the Pane shows “Choose a Preference or provide an input.” on a Page. A Pane that takes an input still draws when the Page opens: give its input a default, such as the last 12 weeks or all teams. The person can change it. PlotContract comes from “parable/foundation”; no parable/plots module exists. A bare row type, a function type, or a hand-written manifest is refused. A Plot that this map does not declare returns rows of the Pane’s type, so a Pane has at most one such Plot, and then its type is not null (T | null is not a null type). A second undeclared Plot, or an undeclared Plot on BasePerception<null, { ... }>, is refused with PA-AU-049. A Pane whose Plots are all declared here may have a null type. The Plot must already belong to the Pane when the Perception is saved, so save the Plot first or send both in one call; a name that matches no owned Plot is refused as “does not bind to an owned Plot”. A Page cannot declare Plots. Once the declaration saves, the Pane’s code receives plots.openIssuesByPriority(), which returns status, rows, error, and rerun, and the Plot editor’s Preview can run. The input is the tuple of positional SQL parameters: readonly [] for none, or named members such as readonly [since: Generic.Text, limit: Generic.Int64]. The output is a readonly array of the kind, which has one field for every column the SQL selects, under the exact column name, and no others; give each column a lower-case AS alias and declare that name. Each field is a scalar-lib type: text is Generic.Text, a whole number such as a COUNT is Generic.Int64, any other number, such as an AVG, is Generic.Float64, yes or no is Generic.Boolean, a calendar day is Temporal.Date, and an instant is Temporal.DateTime. Add | null to every column that can be NULL, which includes most columns read straight from a table. Cast decimals and identifiers wider than a safe integer in the SQL, to DOUBLE or VARCHAR, so the planned type stays fixed.
Saving runs the TypeScript compiler and derives value validation, typed links and reference bindings from the declaration. A Perception’s source is the only thing an author writes. The server compiles the manifest from it, so the manifest cannot be edited on its own. When the compiler refuses a declaration, the refusal names the Pane and the line; correct that line instead of trying another shape. The editor shows readable handles, while stored references use permanent identifiers, so renaming a Pane keeps references pointed at the same Pane. Another Pane’s code can import exported types from a Perception as types only; that does not mount the Pane or grant access to its data. Types disappear when Pane code compiles, so to show what a named type is, read it at runtime instead of copying the types by hand: import { namedType } from '@parable/<parable>/<pane>' is the named type the Pane shows, panes.<name>.namedType is the one a Pane it declares shows, and the module’s namedTypes holds every named type the read describes, by key. A named type has key, name, paneKey (the Pane whose Perception declares it), its doc comment as written in description, extends (the keys of the interfaces it extends), and fields. Each field has name, type (its scalar-lib type, such as Generic.Text, or the name of the named type it holds), namedType (that type’s key), ref (the key of the type a Ref names), list, nullable, its doc comment, and declaredIn. namedType is null when the type is null or is not one named type, and when the reader may not view the Perception that declares it.
A Release may only grow the type of a Pane that holds saved rows: add optional fields or widen a union. Each row records the type it was checked against, and Publish refuses a change that removes, renames, retypes or narrows a field, or adds a required one (shape-grow): keep the old field and add a new optional one. A Personal Parable has no Release. Its save checks each saved row against the new type instead, and refuses a change that a saved row does not fit (PA-AU-073). Nothing in that save is kept. To retype, rename or remove a field there, keep the old field, add a new optional one, and stop using the old one. To narrow a union, first save each of the person’s own rows with a value that the narrower type takes. To add a required field, first add it as optional and save a value for it in each of the person’s own rows, then make it required. Neither the person nor Ponder can change rows that other people saved, so when those rows do not fit, keep the old field. Viewing a Perception needs view permission on it, and changing it needs edit permission; the change follows the Parable’s Collaboration Mode. Types grant nothing.
- Agree on meaning first. Ask Ponder what the Pane is for, which kind of Pane it is, and which fields a person sees, edits, or chooses. Settle this with the Panes and Preferences decisions before writing types.
- Ponder writes the declaration with one concrete type with an
idfield where people save items, Ref links between items, the Pane’s data when the Parable owns values, each referenced Pane by its actual handle, and each Plot that takes input as a PlotContract. - Ponder compares the declaration with the read-only platform base shown in the editor and with the props the Pane’s React code receives: required fields, empty values, list items, links, and dates.
- Before changing the type of a Pane that already has saved rows, Ponder checks those rows and the Panes that depend on it, and only grows the type. On a Personal Parable, a change that every saved row fits also saves. When a Personal save is refused because saved rows do not fit, Ponder follows the steps above and does not offer to convert the rows. Never loosen a meaningful type to make invalid data disappear; repair the data or the design instead.
- Save, read the Pane’s Warnings & Errors, then prove the contract with one valid value accepted and one invalid value refused.