raea/brief

The specs an agent writes as data: brief, script, taste, plan and controller, checked against raea's schemas.

View as Markdown

A spec is a TypeScript module whose default export is data: what a project is for (brief), a storyboard (script), the person's or the house's taste (taste), a frozen plan for a build (plan) and a workspace's settings (controller). It renders nothing and imports nothing that renders. The types are generated from the Rust schemas raea reads them with, so what TypeScript accepts is what raea accepts; raea spec prints one as checked JSON.

TS
// brief.ts
import { brief } from "raea/brief";

export default brief({
  title: "Spring launch",
  for: "Acme Running",
  audience: "runners who already own our shoes, on their phones",
  believe: "the new sole makes an easy run feel easier",
  mode: ["pitch"],
  deliver: [{ name: "launch-9x16", specs: ["30 s", "9:16", "with sound"] }],
});

See Workspaces and projects for where each spec lives.

TS
import { brief, controller, plan, script } from "raea/brief"

raea/brief exports 5 functions, 28 types. Source: sdk/raea/src/brief.ts.

Functions

brief

A project's brief (brief.ts): what to make, for whom, the one thing to believe, its deliverables and staged tasks.

TS
function brief(b: Brief): Brief

controller

A workspace's controller (controllers/.ts): settings in groups of typed fields that every agent works to.

TS
function controller(c: ControllerInput): ControllerInput

plan

An object's plan (plan.ts): its parts by name, levels, counts, materials.

TS
function plan(p: Plan): Plan

script

A storyboard or a screenplay (script.ts): scenes, beats, lines, camera and cut.

TS
function script(s: Script): Script

taste

Taste (taste.ts): standing rules, some with a check raea check --taste holds every export to.

TS
function taste(t: Taste): Taste

Types

Agent

TS
type Agent = { name: string, role?: string, }

Beat

TS
type Beat = { /** * what's seen (a screenplay's action) */ onScreen: string, /** * the move ("push in on the knife", "orbit left, keeps moving through the cut") */ camera?: string, /** * how this beat is cut into ("match on motion", "hard cut") */ cut?: string, lines?: Array<Line>, /** * sound and music cues…

Brief

TS
type Brief = { title: string, logline?: string, /** * who the work is for (a person or a client) */ for?: string, /** * YYYY-MM-DD */ due?: string, /** * who watches or plays it, and where */ audience?: string, /** * the one thing they should think afterwards */ believe?: string, /** * pitch, explain, story, …

Check

TS
type Check = { "form": "text-hold", "value": number } | { "form": "text-above", "value": number } | { "form": "text-below", "value": number } | { "form": "text-margin", "value": number } | { "form": "loudness", "value": number } | { "form": "still-max", "value": number }

Concept

TS
type Concept = { /** * what it is ("flight feather", "toy rocking horse") */ what: string, style: string, /** * its largest extent, in metres */ size: number, /** * how close it's seen, in metres: sets how much detail up close must hold */ seenFrom: number, material?: string, use?: string, }

Controller

TS
type Controller = { id: string, title: string, help?: string, groups: Array<Group>, }

ControllerInput

A controller as written: ids are filled in from titles and labels when left out.

TS
type ControllerInput = Omit<Controller, "id" | "groups"> & { id?: string; groups: (Omit<Group, "id" | "fields"> & { id?: string; fields: FieldInput[] })[]; }

Count

TS
type Count = number | { min: number, max: number, }

Deliverable

TS
type Deliverable = { name: string, /** * "90 s", "16:9", "with sound" */ specs?: Array<string>, /** * the feed item it lands as */ item?: string, /** * its own brief module, when it differs from the project in mode, look or audience */ brief?: string, /** * its script module (storyboard or screenplay) */ script?: s…

Field

TS
type Field = { id: string, label: string, help?: string, } & ({ "type": "toggle", value: boolean, } | { "type": "choice", options: Array<string>, value: string, } | { "type": "number", value: number, unit?: string, min?: number, max?: number, step?: number, } | { "type": "text", value: string, placeholder?: s…

FieldInput

A field as written: its id is filled in from its label when left out.

TS
type FieldInput = Field extends infer F ? (F extends Field ? Omit<F, "id"> & { id?: string } : never) : never

Group

TS
type Group = { id: string, title: string, help?: string, fields: Array<Field>, }

Kind

TS
type Kind = { "type": "toggle", value: boolean, } | { "type": "choice", options: Array<string>, value: string, } | { "type": "number", value: number, unit?: string, min?: number, max?: number, step?: number, } | { "type": "text", value: string, placeholder?: string, multiline?: boolean, } | { "type": "list",…

Level

TS
type Level = "primary" | "secondary" | "tertiary"

Line

TS
type Line = { /** * a character, or "narrator" */ who: string, says: string, /** * a screenplay's parenthetical ("quietly") */ how?: string, }

Mark

TS
type Mark = "todo" | "done" | "dropped"

Part

TS
type Part = { /** * the label it carries into the world ("seat", "leaf", "gem") */ role: string, level: Level, /** * the part it sits on or in; none for the root */ parent?: string, count?: Count, /** * its own, else its parent's, else the concept's */ material?: string, style?: string, /** * what a near cro…

Plan

TS
type Plan = { concept: Concept, /** * by name; the build's parts are typed from these keys, so a planned part the build skips is a tsc error */ parts: { [key in string]: Part }, }

Reference

TS
type Reference = { target: string, note?: string, }

Rule

TS
type Rule = { text: string, check?: Check, }

Scene

TS
type Scene = { /** * where and when ("INT. SENATE - NIGHT", or "The brief page") */ heading?: string, beats: Array<Beat>, /** * what the scene must land */ payoff?: string, }

Script

TS
type Script = { title: string, logline?: string, scenes: Array<Scene>, }

Section

TS
type Section = { heading: string, text: string, }

Stage

TS
type Stage = { name: string, tasks: Array<Task>, }

Step

TS
type Step = { name: string, by?: string, back?: string, }

Task

TS
type Task = { text: string, /** * a task linked to an item takes the item's state (the work is the truth); this is for unlinked ones */ mark?: Mark, agents?: Array<string>, item?: string, tags?: Array<string>, due?: string, /** * the craft verb it was written as ("quieter"): agents read it, the page shows th…

Taste

TS
type Taste = { title: string, /** * when this file is read ("Read for pitch, explain and story") */ note?: string, for?: string, /** * the kinds of work with their own taste file (motion, games, sound, ui) */ kinds?: Array<string>, sections: Array<TasteSection>, }

TasteSection

TS
type TasteSection = { /** * "Always", "Never", "Camera" */ heading: string, rules: Array<Rule>, }