Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.
TypeScript 3dagent-skillsai-agentsai-videobevyclaude-codegame-enginegpulinuxmacosmotion-designmotion-graphicsreactrusttypescriptvideo-editingvideo-renderingwgpuwindows
PL8a: a brief has no tasks, and an object's plan is its parts
shinyobjectzd90b05017e32
diff --git a/apps/workspace/src/doctor.rs b/apps/workspace/src/doctor.rsindex 952af1cc..9037419c 100644--- a/apps/workspace/src/doctor.rs+++ b/apps/workspace/src/doctor.rs@@ -86,6 +86,16 @@ fn old_controllers(base: &Path, ws: Option<&Path>, out: &mut Vec<Finding>) {}}+/// A brief.ts that still keeps tasks in `stages` (docs/plan.feature PL8a): they read, unread, and belong in plan.org.+fn briefs_with_tasks(base: &Path, out: &mut Vec<Finding>) {+ let f = base.join("brief.ts");+ let Ok(text) = std::fs::read_to_string(&f) else { return };+ if text.lines().any(|l| l.trim_start().starts_with("stages:") || l.trim_start().starts_with("\"stages\":")) {+ let says = format!("{}: keeps tasks in `stages`, which raea no longer reads; move each to the project's plan.org (an Org heading under its stage, its mark as TODO, DONE or DROPPED), then delete `stages`", f.display());+ out.push(Finding { says, fix: Fix::No });+ }+}+/// The `version:` in a SKILL.md's front matter.fn skill_version(md: &Path) -> Option<String> {let text = std::fs::read_to_string(md).ok()?;@@ -101,6 +111,7 @@ pub fn findings(from: &Path, skills: &[(&str, PathBuf)], version: &str) -> Vec<Flet base = project.clone().or_else(|| ws.clone()).unwrap_or_else(|| from.to_path_buf());old_briefs(&base, if project.is_some() { 2 } else { 1 }, &mut out);old_controllers(&base, ws.as_deref(), &mut out);+ briefs_with_tasks(&base, &mut out);if let Some(ws) = &ws {let name = ws.file_name().map(|n| n.to_string_lossy().into_owned()).unwrap_or_default();let keys = [("workspace.id", new_id("ws")), ("workspace.name", name), ("workspace.layout", "monorepo".to_string())];diff --git a/apps/workspace/src/tests.rs b/apps/workspace/src/tests.rsindex bb70cf7c..c99a046b 100644--- a/apps/workspace/src/tests.rs+++ b/apps/workspace/src/tests.rs@@ -83,14 +83,17 @@ fn doctor_connects_a_projects_files() {std::fs::write(d.join("loose.tsx"), "export const Loose = () => null;\n").unwrap();std::fs::create_dir_all(d.join("controllers")).unwrap();std::fs::write(d.join("controllers/pace.ts"), "import { controller } from \"raea/brief\";\nexport default controller({ title: \"Pace\", fields: {} });\n").unwrap();+ std::fs::write(d.join("brief.ts"), "import { brief } from \"raea/brief\";\nexport default brief({\n title: \"Old\",\n stages: [{ name: \"\", tasks: [{ text: \"Write the plan\" }] }],\n});\n").unwrap();let found = doctor::registry_findings(&d);let says: Vec<&String> = found.iter().map(|f| &f.says).collect();assert_eq!(found.len(), 1, "{says:?}");assert!(says[0].contains("loose.tsx:1: isn't a composition") && !found[0].fixable(), "{says:?}");// a controller from before 11-20 is told where its parts go, and keptlet out = doctor::doctor(&["--fix".into(), d.display().to_string()], &[], "0.0.1", &|_| Ok(String::new())).unwrap();- assert!(out.starts_with("APPLIED 2 of 4 fixed") && out.contains("controllers/pace.ts: a controller, which raea no longer reads") && out.contains("taste.ts"), "{out}");- assert!(d.join("controllers/pace.ts").is_file(), "nothing of the person's is deleted");+ assert!(out.starts_with("APPLIED 2 of 5 fixed") && out.contains("controllers/pace.ts: a controller, which raea no longer reads") && out.contains("taste.ts"), "{out}");+ // a brief's old tasks are said to belong in plan.org (docs/plan.feature PL8a), and kept+ assert!(out.contains("brief.ts: keeps tasks in `stages`") && out.contains("plan.org"), "{out}");+ assert!(d.join("controllers/pace.ts").is_file() && std::fs::read_to_string(d.join("brief.ts")).unwrap().contains("stages"), "nothing of the person's is deleted");let _ = std::fs::remove_dir_all(&d);}diff --git a/core/brief/src/brief.rs b/core/brief/src/brief.rsindex 9e4c3a48..840eaf41 100644--- a/core/brief/src/brief.rs+++ b/core/brief/src/brief.rs@@ -1,5 +1,6 @@-//! A project's brief: who it's for, the one thing they should believe, what it delivers and the work to get there.-//! The facts an agent guessed are listed in `assumed`, for the person to confirm.+//! A project's brief: who it's for, the one thing they should believe and what it delivers. The facts an agent guessed+//! are listed in `assumed`, for the person to confirm. Its tasks are in the project's plan.org, not here+//! (docs/plan.feature PL8a).use serde::{Deserialize, Serialize};use ts_rs::TS;@@ -47,10 +48,11 @@ pub struct Brief {#[serde(default)]#[ts(as = "Option<Vec<Reference>>", optional)]pub references: Vec<Reference>,- /// the tasks, in stages ("Act one", "The cut")- #[serde(default)]- #[ts(as = "Option<Vec<Stage>>", optional)]- pub stages: Vec<Stage>,+ /// an older brief's tasks, read only so it still loads: they belong in plan.org (docs/plan.feature PL8a), and+ /// `raea doctor` says so; never written, and not in the schema an agent writes to+ #[serde(default, skip_serializing)]+ #[ts(skip)]+ pub stages: Option<serde_json::Value>,#[serde(default)]#[ts(as = "Option<Vec<Agent>>", optional)]pub agents: Vec<Agent>,@@ -88,43 +90,6 @@ pub struct Reference {pub note: Option<String>,}-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]-#[serde(deny_unknown_fields)]-pub struct Stage {- pub name: String,- pub tasks: Vec<Task>,-}--#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize, TS)]-#[serde(rename_all = "lowercase")]-pub enum Mark {- #[default]- Todo,- Done,- Dropped,-}--#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]-#[serde(rename_all = "camelCase", deny_unknown_fields)]-#[ts(optional_fields)]-pub struct Task {- pub text: String,- /// a task linked to an item takes the item's state (the work is the truth); this is for unlinked ones- #[serde(default)]- #[ts(as = "Option<Mark>", optional)]- pub mark: Mark,- #[serde(default)]- #[ts(as = "Option<Vec<String>>", optional)]- pub agents: Vec<String>,- pub item: Option<String>,- #[serde(default)]- #[ts(as = "Option<Vec<String>>", optional)]- pub tags: Vec<String>,- pub due: Option<String>,- /// the craft verb it was written as ("quieter"): agents read it, the page shows the text- pub verb: Option<String>,-}-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]#[serde(deny_unknown_fields)]#[ts(optional_fields)]diff --git a/core/brief/src/lib.rs b/core/brief/src/lib.rsindex 1af26aa8..af30957d 100644--- a/core/brief/src/lib.rs+++ b/core/brief/src/lib.rs@@ -1,15 +1,15 @@//! What an agent writes for raea, as Rust types: a project's brief, a script (storyboard or screenplay), a person's-//! taste and an object's plan. The agent writes them as TypeScript modules (docs/handoff/authoring.md); `raea run`+//! taste and an object's parts. The agent writes them as TypeScript modules (docs/handoff/authoring.md); `raea run`//! evaluates one, and its default export arrives here as JSON. The TypeScript declarations are generated from these//! types (`declarations`), so what tsc checks is exactly what this crate reads.pub mod brief;-pub mod plan;+pub mod parts;pub mod script;pub mod taste;pub use brief::Brief;-pub use plan::Plan;+pub use parts::Parts;pub use script::Script;pub use taste::Taste;@@ -32,10 +32,10 @@ pub fn declarations() -> String {let cfg = Config::new();let mut out = vec!["// Generated from raea-core-brief (core/brief) by its `declarations`; edit the Rust, not this.".to_string()];out.extend(decls!(cfg;- brief::Brief, brief::Section, brief::Deliverable, brief::Reference, brief::Stage, brief::Mark, brief::Task, brief::Agent,+ brief::Brief, brief::Section, brief::Deliverable, brief::Reference, brief::Agent,script::Script, script::Scene, script::Beat, script::Line,taste::Taste, taste::TasteSection, taste::Rule, taste::RuleCheck, taste::RuleLevel, taste::Check,- plan::Plan, plan::Concept, plan::Level, plan::Count, plan::Part,+ parts::Parts, parts::Concept, parts::Level, parts::Count, parts::Part,));out.join("\n\n") + "\n"}diff --git a/core/brief/src/plan.rs b/core/brief/src/parts.rssimilarity index 88%rename from core/brief/src/plan.rsrename to core/brief/src/parts.rsindex ce0e288b..eaad09a7 100644--- a/core/brief/src/plan.rs+++ b/core/brief/src/parts.rs@@ -1,5 +1,6 @@-//! An object's plan, written before any geometry and frozen when building starts (docs/handoff/solids.md, "The plan-//! is the contract"). Generic over what's made: a crown, a feather and a rocking horse are all a concept and a tree of+//! An object's parts (NAME.parts.ts, `parts()` from "raea/brief"), written before any geometry and frozen when+//! building starts (docs/handoff/solids.md, "The plan is the contract"; named parts since 11-20, so "plan" is only a+//! project's plan.org, docs/plan.feature PL8a). Generic over what's made: a crown, a feather and a rocking horse are all a concept and a tree of//! named parts, each with a level, a count, and a material and style it has or inherits.use std::collections::BTreeMap;@@ -9,7 +10,7 @@ use ts_rs::TS;#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)]#[serde(deny_unknown_fields)]-pub struct Plan {+pub struct Parts {pub concept: Concept,/// by name; the build's parts are typed from these keys, so a planned part the build skips is a tsc errorpub parts: BTreeMap<String, Part>,@@ -77,7 +78,7 @@ pub struct Resolved {/// Everything wrong with a plan that would let a build leave something behind: a parent that isn't planned, a loop,/// no root, a range upside down, or a part that resolves to no material. Empty when the plan can be built against.-pub fn check(plan: &Plan) -> Vec<String> {+pub fn check(plan: &Parts) -> Vec<String> {let mut out = Vec::new();let roots: Vec<&String> = plan.parts.iter().filter(|(_, p)| p.parent.is_none()).map(|(n, _)| n).collect();if roots.is_empty() {@@ -107,7 +108,7 @@ pub fn check(plan: &Plan) -> Vec<String> {}/// The part and its ancestors, nearest first; none on a loop or a missing parent.-fn chain<'a>(plan: &'a Plan, name: &str) -> Option<Vec<&'a Part>> {+fn chain<'a>(plan: &'a Parts, name: &str) -> Option<Vec<&'a Part>> {let mut out = Vec::new();let mut at = plan.parts.get(name)?;loop {@@ -124,7 +125,7 @@ fn chain<'a>(plan: &'a Plan, name: &str) -> Option<Vec<&'a Part>> {/// A part's material and style, inherited up its parents to the concept. Style always resolves (the concept has/// one); material may not.-pub fn resolve(plan: &Plan, name: &str) -> Option<Resolved> {+pub fn resolve(plan: &Parts, name: &str) -> Option<Resolved> {let chain = chain(plan, name)?;let material = chain.iter().find_map(|p| p.material.clone()).or_else(|| plan.concept.material.clone())?;let style = chain.iter().find_map(|p| p.style.clone()).unwrap_or_else(|| plan.concept.style.clone());diff --git a/core/brief/src/tests.rs b/core/brief/src/tests.rsindex ce6e06e6..14d289a6 100644--- a/core/brief/src/tests.rs+++ b/core/brief/src/tests.rs@@ -14,9 +14,7 @@ fn declarations_match_the_committed_file() {#[test]fn a_brief_reads_and_its_doctor_asks_for_what_is_missing() {let b: Brief = read("brief.ts", r#"{"title": "A walkthrough", "mode": ["explain"], "assumed": ["voice"], "voice": "one calm narrator",- "deliver": [{"name": "Walkthrough", "specs": ["60 s", "16:9"]}],- "stages": [{"name": "", "tasks": [{"text": "Storyboard it", "agents": ["director"], "mark": "done"}]}]}"#).unwrap();- assert_eq!(b.stages[0].tasks[0].mark, brief::Mark::Done);+ "deliver": [{"name": "Walkthrough", "specs": ["60 s", "16:9"]}]}"#).unwrap();let d = brief::doctor(&b);assert!(d.iter().any(|m| m.contains("`believe`")), "{d:?}");assert!(d.iter().any(|m| m.contains("no script")), "{d:?}");@@ -68,26 +66,34 @@ fn a_taste_line_holds_any_check_by_name_or_path_with_values_and_a_level() {}#[test]-fn a_plan_leaves_nothing_without_a_material() {- let ok: Plan = read("plan.ts", r#"{"concept": {"what": "flight feather", "style": "realistic", "size": 0.25, "seenFrom": 0.3, "material": "keratin"},+fn an_objects_parts_leave_nothing_without_a_material() {+ let ok: Parts = read("feather.parts.ts", r#"{"concept": {"what": "flight feather", "style": "realistic", "size": 0.25, "seenFrom": 0.3, "material": "keratin"},"parts": {"rachis": {"role": "shaft", "level": "primary"},"vane": {"role": "vane", "level": "secondary", "parent": "rachis", "count": 2, "style": "barred brown"},"barb": {"role": "barb", "level": "tertiary", "parent": "vane", "count": {"min": 300, "max": 500}, "near": "separate barbs, a few split gaps"}}}"#).unwrap();- assert_eq!(plan::check(&ok), Vec::<String>::new());- assert_eq!(plan::resolve(&ok, "barb").unwrap(), plan::Resolved { material: "keratin".into(), style: "barred brown".into() });+ assert_eq!(parts::check(&ok), Vec::<String>::new());+ assert_eq!(parts::resolve(&ok, "barb").unwrap(), parts::Resolved { material: "keratin".into(), style: "barred brown".into() });let mut bad = ok.clone();bad.concept.material = None;bad.parts.get_mut("rachis").unwrap().parent = Some("calamus".into());- let e = plan::check(&bad);+ let e = parts::check(&bad);assert!(e.iter().any(|m| m.contains("`calamus` isn't planned")), "{e:?}");assert!(e.iter().any(|m| m.contains("no root")), "{e:?}");}#[test]fn a_close_view_needs_tertiary_detail() {- let p: Plan = read("plan.ts", r#"{"concept": {"what": "toy rocking horse", "style": "painted wood", "size": 0.9, "seenFrom": 0.5, "material": "beech"},+ let p: Parts = read("horse.parts.ts", r#"{"concept": {"what": "toy rocking horse", "style": "painted wood", "size": 0.9, "seenFrom": 0.5, "material": "beech"},"parts": {"body": {"role": "body", "level": "primary"}, "rocker": {"role": "rocker", "level": "secondary", "parent": "body", "count": 2}}}"#).unwrap();- assert!(plan::check(&p).iter().any(|m| m.contains("tertiary")));+ assert!(parts::check(&p).iter().any(|m| m.contains("tertiary")));+}++#[test]+fn an_older_brief_with_stages_still_reads_and_never_writes_them() {+ let b: Brief = read("brief.ts", r#"{"title": "Old", "stages": [{"name": "", "tasks": [{"text": "Write the plan", "mark": "todo"}]}]}"#).unwrap();+ assert!(b.stages.is_some());+ assert!(!serde_json::to_string(&b).unwrap().contains("stages"));+ assert!(!declarations().contains("stages"), "the schema an agent writes has no stages (docs/plan.feature PL8a)");}diff --git a/docs/manual/concepts/workspaces.md b/docs/manual/concepts/workspaces.mdindex 5b09a594..5f900b60 100644--- a/docs/manual/concepts/workspaces.md+++ b/docs/manual/concepts/workspaces.md@@ -56,7 +56,7 @@ raea's specs are TypeScript files whose default export is checked against a sche| `NAME.script.ts` | A storyboard: scenes of beats, what's on screen, what each scene must land || `~/.raea/taste/taste.ts` | The person's taste, which beats any guide's default || `taste.ts` | A workspace's or a project's rules, which `raea check` holds every piece to |-| `plan.ts` | A frozen plan for a build, checked by raea |+| `NAME.parts.ts` | An object's parts, frozen before it's built, checked by raea |```shraea spec brief.ts # prints the brief as JSON, checked against its schemadiff --git a/docs/manual/reference/cli/index.md b/docs/manual/reference/cli/index.mdindex 648ffdcf..8d361139 100644--- a/docs/manual/reference/cli/index.md+++ b/docs/manual/reference/cli/index.md@@ -49,7 +49,7 @@ The workspace, its projects and what a project holds.| [`raea init`](init.md) | Add a project's starting files where they're missing: edit.tsx, cuts.ts, components/ and AGENTS.md. || [`raea workspace`](workspace.md) | Make, adopt or show a workspace: the git repository that holds a studio's projects and house taste. || [`raea project`](project.md) | Make a project in the workspace, list them, or move one between inline and a repository of its own. |-| [`raea spec`](spec.md) | Print a spec file's default export as JSON, checked against its schema: briefs, scripts, taste and plans. |+| [`raea spec`](spec.md) | Print a spec file's default export as JSON, checked against its schema: briefs, scripts, taste and an object's parts. || [`raea component`](component.md) | Copy a ready-made component or set into the project's components/, or the workspace's shared/components/, to use and change as your own. || [`raea part`](part.md) | The old name of raea component: copy a ready-made component into the project's components/, to use and change as your own. || [`raea add`](add.md) | Add, remove and install npm packages for a project, with no Node or npm: raea.lock and node_modules. |diff --git a/docs/manual/reference/cli/spec.md b/docs/manual/reference/cli/spec.mdindex eeb1f251..664ecc4b 100644--- a/docs/manual/reference/cli/spec.md+++ b/docs/manual/reference/cli/spec.md@@ -1,12 +1,12 @@---title: "raea spec"-summary: "Print a spec file's default export as JSON, checked against its schema: briefs, scripts, taste and plans."+summary: "Print a spec file's default export as JSON, checked against its schema: briefs, scripts, taste and an object's parts."order: 25sources: ["engine/cli/src/spec.rs"]---raea's specs are TypeScript files whose default export is data: `brief.ts`, `NAME.script.ts`, `taste.ts` and-`plan.ts`. `raea spec` evaluates one, checks it against its schema and prints it as JSON,+`NAME.parts.ts`. `raea spec` evaluates one, checks it against its schema and prints it as JSON,so an agent can read a brief without running anything else, and a wrong field is caught before it matters.```sh@@ -20,7 +20,7 @@ raea spec notes.ts --as taste## Usage```sh-raea spec FILE.ts [--as brief|script|taste|plan] (a spec's default export as JSON, checked against its schema: brief.ts, script.ts, taste.ts, plan.ts)+raea spec FILE.ts [--as brief|script|taste|parts] (a spec's default export as JSON, checked against its schema: brief.ts, script.ts, taste.ts, NAME.parts.ts)```Headless: it needs nothing running and opens no window. Takes up to 1 argument besides its flags.@@ -29,6 +29,6 @@ Headless: it needs nothing running and opens no window. Takes up to 1 argument b| Flag | Takes | What it does || --- | --- | --- |-| `--as` | `brief\|script\|taste\|plan` | Which schema to check it against. By default from the file's name (`brief`, `script`, `plan`), and `taste` otherwise. |+| `--as` | `brief\|script\|taste\|parts` | Which schema to check it against. By default from the file's name (`brief`, `script`, `parts`), and `taste` otherwise. |<!-- generated:end -->diff --git a/docs/manual/reference/sdk/brief.md b/docs/manual/reference/sdk/brief.mdindex 954d75f9..9314ab1a 100644--- a/docs/manual/reference/sdk/brief.md+++ b/docs/manual/reference/sdk/brief.md@@ -1,6 +1,6 @@---title: "raea/brief"-summary: "The specs an agent writes as data: brief, script, taste and plan, checked against raea's schemas."+summary: "The specs an agent writes as data: brief, script, taste and an object's parts, checked against raea's schemas."order: 4sources: ["sdk/raea/src/brief.ts", "core/brief/src"]---@@ -30,16 +30,17 @@ See [Workspaces and projects](../../concepts/workspaces.md) for where each spec<!-- generated:begin by tools/manual-ref/sdk.ts from the SDK's exports and doc comments; edit outside this block -->```ts-import { brief, fingerprint, plan, script } from "raea/brief"+import { brief, fingerprint, parts, script } from "raea/brief"```-`raea/brief` exports 5 functions, 27 types. Source: [sdk/raea/src/brief.ts](https://github.com/shinyobjectz/raea/blob/main/sdk/raea/src/brief.ts).+`raea/brief` exports 5 functions, 24 types. Source: [sdk/raea/src/brief.ts](https://github.com/shinyobjectz/raea/blob/main/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.+A project's brief (brief.ts): what to make, for whom, the one thing to believe and its deliverables. Its tasks are+the project's plan.org.```tsfunction brief(b: Brief): Brief@@ -53,12 +54,12 @@ A fingerprint (fingerprint.ts): its axes and the encoders its heads were trainedfunction fingerprint(f: Fingerprint): Fingerprint```-### `plan`+### `parts`-An object's plan (plan.ts): its parts by name, levels, counts, materials.+An object's parts (NAME.parts.ts), written before any geometry: each by name, its level, count and material.```ts-function plan(p: Plan): Plan+function parts(p: Parts): Parts```### `script`@@ -170,12 +171,6 @@ type Level = "primary" | "secondary" | "tertiary"type Line = { /** * a character, or "narrator" */ who: string, says: string, /** * a screenplay's parenthetical ("quietly") */ how?: string, }```-### `Mark`--```ts-type Mark = "todo" | "done" | "dropped"-```-### `Modality`What an axis's head reads: the frames (SigLIP 2), how they change, their look, the sound (CLAP) or its events (YAMNet).@@ -190,10 +185,10 @@ type Modality = "picture" | "change" | "look" | "sound" | "events" | "text"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`+### `Parts````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 }, }+type Parts = { 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`@@ -238,18 +233,6 @@ type Script = { title: string, logline?: string, scenes: Array<Scene>, }type Section = { heading: string, text: string, }```-### `Stage`--```ts-type Stage = { name: string, tasks: Array<Task>, }-```--### `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````tsdiff --git a/docs/manual/reference/sdk/index.md b/docs/manual/reference/sdk/index.mdindex 71488223..1ad8240d 100644--- a/docs/manual/reference/sdk/index.md+++ b/docs/manual/reference/sdk/index.md@@ -33,7 +33,7 @@ The composition, the app, and the specs and notes an agent writes.| --- | --- | --- || [`raea`](raea.md) | The main entry: compositions, sequences, time, interpolation, springs, footage, sound and words. | 20 components, 9 hooks, 62 functions, 11 values, 107 types || [`raea/app`](app.md) | The App, its plugins and schedules, and the registry a video's compositions are kept in. | 1 component, 1 hook, 4 functions, 3 classes, 17 values, 17 types |-| [`raea/brief`](brief.md) | The specs an agent writes as data: brief, script, taste and plan, checked against raea's schemas. | 5 functions, 27 types |+| [`raea/brief`](brief.md) | The specs an agent writes as data: brief, script, taste and an object's parts, checked against raea's schemas. | 5 functions, 24 types || [`raea/note`](note.md) | A person's note as a file in the project: their words kept as written, and the asks the agent restates it as. | 1 function, 4 types |## Time and motiondiff --git a/engine/cli/src/cli.rs b/engine/cli/src/cli.rsindex 52c1bb18..69c72658 100644--- a/engine/cli/src/cli.rs+++ b/engine/cli/src/cli.rs@@ -143,7 +143,7 @@ pub fn run(args: &[String]) -> R<String> {// an agent's report of a bug in raea itself, to raea's server (engine/cli/src/bug.ts; Shane 11-16)let usage = format!("{usage}\n raea bug TITLE... --text TEXT [--command CMD] [--error TEXT] [--agent NAME] [--dry-run] (a bug in raea itself, not in your own composition, sent to raea's server with raea's version and the OS, no account needed: words only, paths, emails and keys taken out before it goes; five a day from a machine, the same bug again counted on the first report; --dry-run prints what would go and sends nothing)");// a workspace's files and specs (docs/projects.feature), listed under render's usage like library- let usage = format!("{usage}\n raea spec FILE.ts [--as brief|script|taste|plan] (a spec's default export as JSON, checked against its schema: brief.ts, script.ts, taste.ts, plan.ts)\n raea workspace init [NAME] [--layout LAYOUT] | raea workspace adopt DIR [--name NAME] | raea workspace [--json] (a workspace: a git repo of projects under raea.root, ~/Documents/raea unless git config says)\n raea project new NAME [--storage inline|submodule] | raea project split NAME [--remote URL] | raea project join NAME | raea project [--json] (a project in the workspace: its folder, brief.ts, media/, out/; split and join keep its history)\n raea check EDIT.tsx --quick [--shape S] [--platform P] [--taste T] [-o check.json] (three stills of a composition checked for text: clipped, cramped, safe areas, sizes; about a second)\n raea hook [claude|codex|gemini|kimi] (every agent's tool hooks, which raea skills install adds: before a shell command, media opened in the Mac's viewer while the raea app is installed is stopped once for raea show (the same command again goes through); after a save, the quick check on a composition)\n raea next [DIR] (the two or three useful next steps for the project, from its brief, compositions, renders and checks)\n raea doctor [--fix] [DIR] (what doesn't match this raea: old brief files, an older workspace format, an agent's skill from another version)\n raea app run|check|bundle APP.tsx [--target web|native] [--size WxH] [--script steps.json] [--png DIR] [-o App.app] (a TSX app on @raea/ui: its window, the headless check, a Mac app; web is Blitz on Bevy, native is Rune; the app's `export const app` sets the target, web when it doesn't; raea rune ... is --target native)\n {}\n {}\n {} ({})\n {}\n {}\n {}", skill::USAGE, tools::blender::USAGE, tools::motion::SETUP_USAGE, tools::motion::SETUP_ABOUT, raea_app_engines::godot::USAGE, raea_app_engines::shot::USAGE, raea_app_engines::round::USAGE);+ let usage = format!("{usage}\n raea spec FILE.ts [--as brief|script|taste|parts] (a spec's default export as JSON, checked against its schema: brief.ts, script.ts, taste.ts, NAME.parts.ts)\n raea workspace init [NAME] [--layout LAYOUT] | raea workspace adopt DIR [--name NAME] | raea workspace [--json] (a workspace: a git repo of projects under raea.root, ~/Documents/raea unless git config says)\n raea project new NAME [--storage inline|submodule] | raea project split NAME [--remote URL] | raea project join NAME | raea project [--json] (a project in the workspace: its folder, brief.ts, media/, out/; split and join keep its history)\n raea check EDIT.tsx --quick [--shape S] [--platform P] [--taste T] [-o check.json] (three stills of a composition checked for text: clipped, cramped, safe areas, sizes; about a second)\n raea hook [claude|codex|gemini|kimi] (every agent's tool hooks, which raea skills install adds: before a shell command, media opened in the Mac's viewer while the raea app is installed is stopped once for raea show (the same command again goes through); after a save, the quick check on a composition)\n raea next [DIR] (the two or three useful next steps for the project, from its brief, compositions, renders and checks)\n raea doctor [--fix] [DIR] (what doesn't match this raea: old brief files, an older workspace format, an agent's skill from another version)\n raea app run|check|bundle APP.tsx [--target web|native] [--size WxH] [--script steps.json] [--png DIR] [-o App.app] (a TSX app on @raea/ui: its window, the headless check, a Mac app; web is Blitz on Bevy, native is Rune; the app's `export const app` sets the target, web when it doesn't; raea rune ... is --target native)\n {}\n {}\n {} ({})\n {}\n {}\n {}", skill::USAGE, tools::blender::USAGE, tools::motion::SETUP_USAGE, tools::motion::SETUP_ABOUT, raea_app_engines::godot::USAGE, raea_app_engines::shot::USAGE, raea_app_engines::round::USAGE);let (export_game, capcut, layers, xml, scene, physics, splat, wear) = (raea_app_game::USAGE, raea_app_capcut::USAGE, raea_app_layers::USAGE, raea_app_layers::USAGE_XML, export::SCENE_USAGE, motion::physics::USAGE, tools::splat::USAGE, raea_runtime_wear::USAGE);let apps = format!(" {}\n {}\n {}\n {}\n {}\n {}\n {}\n {}\n {}\n", raea_app_direction::check::USAGE, raea_app_check::USAGE, raea_app_solid::USAGE, raea_app_judge::USAGE, raea_app_direction::USAGE, raea_app_direction::findings::USAGE, raea_app_notes::USAGE, raea_app_fingerprint::USAGE, raea_sys_index::cli::USAGE);return Ok(format!("raea: renders, plays and checks raea compositions (React and TypeScript) on the GPU.\n\nusage: {usage}\n raea init (a project's files where they're missing: edit.tsx, cuts.ts, components/, AGENTS.md)\n raea cut TAKE \"line\" ... | --at A-B ... [--append] (cuts.ts and words.json: a take under media/ cut in the pauses around each line it says, transcribed first if it has no TAKE.words.json; or at those seconds)\n raea frame TAKE [--at S] (how a take fits the edit: a talking take for <FaceFrame>, a screen for <ScreenFit>, from where its face is)\n raea component list | raea component add NAME ... [--shared] [--force] | raea part list | raea part add NAME ... [--shared] [--force] (a ready component or set copied into components/, or the workspace's shared/components/ with --shared, yours to change; raea part is its old name)\n raea brand DOMAIN|URL (the brand kit read from its website on this machine: brand/brand.css, brand/brand.json, BRAND.md, logos in media/brand; says when a plain fetch saw too little)\n raea guide [NAME] (craft, the floor read before any edit; the modes: pitch, explain, story, play, tool; motion, music, layout and the rest; bevy and bevy/NAME for 3D)\n raea context PROJECT (what to read before working on a project: taste, brief, look, the floor and its modes' guides)\n{apps} raea play EDIT.tsx [--input | --input-script KEYS.json] [--size WxH] [--seconds N|end] (a game, live; also: --input-log FILE --offscreen --snapshot T FILE --json FILE --seek F FILE --pick X,Y --view YAW,PITCH,DISTANCE --scrub N --baked --autoplay --no-vsync --master --3d)\n {export_game} (a game as a program of its own: a Mac app or a command)\n {capcut}\n {layers}\n {xml}\n {scene} (what each 3D part rests on: floating, sunk and clipping parts; light: the scene's lighting)\n {physics} (the bakes <Physics> and <Goo> make)\n {wear} (a .glb's weathering causes for raea/wear: the model with a second UV set and its cause maps, made once in the asset store)\n {splat} (footage trained into a Gaussian splat for <Splat>; setup installs its tools)\n raea run SCRIPT.ts (a TypeScript program on the engine, headless: its default export is called, what it prints is the answer; a check like a room's checkLayout; also: --timeout S)\n raea gen image|video|music|sfx|speech|mesh|text \"PROMPT\" | gen plan|run FLOW.ts|FLOW.json | gen comfy import|export|run|schema FILE | gen models | gen balance (generated media through made.app, fal, Replicate, OpenRouter, Modal or ComfyUI; ComfyUI workflows both ways: raea gen alone lists its flags)\n {neural_usage} (DLSS 5 neural rendering on a `render --aov` folder, with its motion and depth: your own MLX-DLSS build and weights, RAEA_MLXDLSS and RAEA_DLSS_MODEL)\n {light_usage} (each scene on each light path against its path-traced reference: distance in stops, the worst tile, a moving shot's flicker, a frame's cost; DIR/report.json)\n raea mezz [--check] PATH... (an intra-only ProRes copy of each long-GOP source over 1080p, for smooth scrubbing; --check says which would get one)\n raea traces [show [N|last|DIR]] (the sessions raea left, newest first: how each ended, its glitches; show tells one in full)"));diff --git a/engine/cli/src/spec.rs b/engine/cli/src/spec.rsindex 40255d73..a5149046 100644--- a/engine/cli/src/spec.rs+++ b/engine/cli/src/spec.rs@@ -1,5 +1,5 @@//! Specs written in TypeScript (docs/handoff/authoring.md, docs/projects.feature PJ0): brief.ts, script.ts, taste.ts-//! and plan.ts. A spec is a module whose default export is data; the engine evaluates it headless+//! and NAME.parts.ts (an object's parts). A spec is a module whose default export is data; the engine evaluates it headless//! (bundle_module with PRINT_DEFAULT, run_bundle) and Rust reads the JSON against the schema in core/brief, so tsc's errors come first and//! these come second, naming the field.use super::*;@@ -89,14 +89,14 @@ pub fn tastes_ts(args: &[String]) -> R<Vec<schema::Taste>> {}/// `raea spec FILE.ts [--as KIND]`: the default export as JSON, checked as KIND (by default from the file's name:-/// brief, script, taste or plan in it; anything else is checked as Taste, the files in+/// brief, script, taste or parts in it; anything else is checked as Taste, the files in/// ~/.raea/taste being named for their kind).pub fn spec_cli(args: &[String]) -> R<String> {- const USAGE: &str = "usage: raea spec FILE.ts [--as brief|script|taste|plan]";+ const USAGE: &str = "usage: raea spec FILE.ts [--as brief|script|taste|parts]";let file = args.iter().enumerate().find(|(i, a)| !a.starts_with("--") && (*i == 0 || args[i - 1] != "--as")).map(|(_, a)| PathBuf::from(a)).ok_or(USAGE)?;let kind = args.iter().position(|a| a == "--as").and_then(|i| args.get(i + 1)).cloned().unwrap_or_else(|| {let base = file.file_name().map(|n| n.to_string_lossy().to_lowercase()).unwrap_or_default();- ["brief", "script", "plan"].iter().find(|k| base.contains(*k)).map(|k| k.to_string()).unwrap_or_else(|| "taste".into())+ ["brief", "script", "parts"].iter().find(|k| base.contains(*k)).map(|k| k.to_string()).unwrap_or_else(|| "taste".into())});let json = spec_json(&file)?;let name = file.file_name().map(|n| n.to_string_lossy().into_owned()).unwrap_or_default();@@ -104,8 +104,8 @@ pub fn spec_cli(args: &[String]) -> R<String> {"brief" => serde_json::to_value(schema::read::<schema::Brief>(&name, &json)?),"script" => serde_json::to_value(schema::read::<schema::Script>(&name, &json)?),"taste" => serde_json::to_value(schema::read::<schema::Taste>(&name, &json)?),- "plan" => serde_json::to_value(schema::read::<schema::Plan>(&name, &json)?),- k => return Err(format!("raea spec can't check a {k:?}: brief, script, taste or plan\n{USAGE}")),+ "parts" => serde_json::to_value(schema::read::<schema::Parts>(&name, &json)?),+ k => return Err(format!("raea spec can't check a {k:?}: brief, script, taste or parts\n{USAGE}")),}.map_err(|e| e.to_string())?;Ok(value.to_string())diff --git a/sdk/guides/craft/bevy/prompts.md b/sdk/guides/craft/bevy/prompts.mdindex 4cb0c230..ad6f8231 100644--- a/sdk/guides/craft/bevy/prompts.md+++ b/sdk/guides/craft/bevy/prompts.md@@ -20,7 +20,7 @@ Where these texts come from: the published Blender + Claude workflows.## What to do-1. Write the brief from the template (section 1). Write a `plan.ts` for every hero object.+1. Write the brief from the template (section 1). Write a `NAME.parts.ts` for every hero object.2. Start the builder with the builder prompt (section 2), filled from the brief.3. After every stage and every fix, run step R: the review sheets, then the judge prompt (section 3) in a new contextand `raea judge` on the same sheets.@@ -29,7 +29,7 @@ Where these texts come from: the published Blender + Claude workflows.The brief is data, in three files:- `brief.ts` for the scene, made with `brief()` from `raea/brief`.-- A `plan.ts` for each hero object, made with `plan()`.+- A `NAME.parts.ts` for each hero object, made with `parts()`.- For an interior, the room plan that `checkLayout` reads (`raea/room`).Fields that have no schema yet go in `sections` as text.@@ -72,12 +72,12 @@ Each generated object needs a reference picture made from this template:> light, plain pale grey seamless background, the whole object in frame with margin, three-quarter view from slightly> above, sharp focus, no people, no text, no brand names, no logos.-Each hero object gets a plan. Its fields are the frozen contract that `raea solid info --expect` and the judge check+Each hero object gets its parts (NAME.parts.ts). Its fields are the frozen contract that `raea solid info --expect` and the judge checkagainst:```ts-import { plan } from "raea/brief";-export default plan({+import { parts } from "raea/brief";+export default parts({concept: { what: "coin-op tumble dryer, stacked pair", style: "worn 1990s commercial", size: 1.9, seenFrom: 1.2,material: "enamelled steel" },parts: {@@ -104,7 +104,7 @@ finished scene must read as the same place, the same objects and the same light.invent in the same world. brief.ts notDoing is a hard list: add nothing on it, and nothing the brief doesn't name.ORDER OF WORK (one stage at a time; a stage that fails its check is fixed before the next one starts)-0. Plan. Every object row in brief.ts has a route, a real size and, for each hero, a plan.ts with its part tree and+0. Plan. Every object row in brief.ts has a route, a real size and, for each hero, a NAME.parts.ts with its part tree andconnection map. If any is missing, write it first, from how the real thing is built: look up the real product.1. Space. Block the room as boxes at real size. Place furniture with place() from raea/3d (on, against, beside,near, apart, facing, align, clear), never typed coordinates; its `found` must be empty. Check: `raea run checks.ts`diff --git a/sdk/guides/craft/bevy/scenes.md b/sdk/guides/craft/bevy/scenes.mdindex 0713d00a..b066141d 100644--- a/sdk/guides/craft/bevy/scenes.md+++ b/sdk/guides/craft/bevy/scenes.md@@ -28,7 +28,7 @@ The brief template, the builder prompt and the judge prompt to paste are in `bev- Printed matter.- Motion.- Budget: generation cents and judge rounds.-- Each hero object gets a `plan.ts` (`plan()`) with its concept (what, style, size, seenFrom, material) and parts, each+- Each hero object gets a `NAME.parts.ts` (`parts()`) with its concept (what, style, size, seenFrom, material) and parts, eachwith a role, a level (primary, secondary, tertiary), a parent, a count and `near` detail. Below it, add a connectionmap with one line per joint: `door <-> cabinet hinge side touches`.- Write the plan from how the real thing is built: look up the product, the catalogue or a drawing.@@ -65,7 +65,7 @@ check names a script (`bevy/blender`). It never places, lights, frames, material### 3. Build, one stage at a time; a stage that fails its check is fixed first-0. **Plan.** Every object row has a route and a real size, and every hero has a `plan.ts`.+0. **Plan.** Every object row has a route and a real size, and every hero has a `NAME.parts.ts`.1. **Space.** Block the room as boxes at real size. Place furniture by relations, not typed coordinates:`place({ room, objects, rules })` from raea/3d. Rules are `on`, `against` a wall, `beside`, `near`, `apart`,`facing`, `align` and `clear` (floor kept free in front). It returns each object's `center`, `base` and `yaw`,diff --git a/sdk/raea/src/brief.gen.ts b/sdk/raea/src/brief.gen.tsindex 08e977a9..8025909e 100644--- a/sdk/raea/src/brief.gen.ts+++ b/sdk/raea/src/brief.gen.ts@@ -40,11 +40,7 @@ assumed?: Array<string>,/*** prose sections beyond the fields above (Goal, Background), in order*/-sections?: Array<Section>, deliver?: Array<Deliverable>, references?: Array<Reference>,-/**- * the tasks, in stages ("Act one", "The cut")- */-stages?: Array<Stage>, agents?: Array<Agent>, };+sections?: Array<Section>, deliver?: Array<Deliverable>, references?: Array<Reference>, agents?: Array<Agent>, };export type Section = { heading: string, text: string, };@@ -68,20 +64,6 @@ script?: string, };export type Reference = { target: string, note?: string, };-export type Stage = { name: string, tasks: Array<Task>, };--export type Mark = "todo" | "done" | "dropped";--export 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 the text- */-verb?: string, };-export type Agent = { name: string, role?: string, };export type Script = { title: string, logline?: string, scenes: Array<Scene>, };@@ -161,7 +143,7 @@ export type RuleLevel = "error" | "warn" | "note";export 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 };-export type Plan = { concept: Concept,+export type Parts = { concept: Concept,/*** by name; the build's parts are typed from these keys, so a planned part the build skips is a tsc error*/diff --git a/sdk/raea/src/brief.ts b/sdk/raea/src/brief.tsindex 3819766c..3b08a790 100644--- a/sdk/raea/src/brief.ts+++ b/sdk/raea/src/brief.ts@@ -7,13 +7,14 @@//// The types are generated from the Rust schemas (core/brief, raea-core-brief) into brief.gen.ts, so what tsc checks is// what raea reads: `raea context` evaluates the module and Rust validates its default export again.-import type { Brief, Plan, Script, Taste } from "./brief.gen";+import type { Brief, Parts, Script, Taste } from "./brief.gen";export type * from "./brief.gen";export { fingerprint } from "./fingerprint";export type { Applies, Axis, Fingerprint, Modality } from "./fingerprint";-/** A project's brief (brief.ts): what to make, for whom, the one thing to believe, its deliverables and staged tasks. */+/** A project's brief (brief.ts): what to make, for whom, the one thing to believe and its deliverables. Its tasks are+ * the project's plan.org (docs/plan.feature PL8a). */export const brief = (b: Brief): Brief => b;/** A storyboard or a screenplay (script.ts): scenes, beats, lines, camera and cut. */export const script = (s: Script): Script => s;@@ -22,5 +23,5 @@ export const script = (s: Script): Script => s;* (`"loudness"`), or the project's own by its path from this file (`"../checks/clear.ts"`), with its `values`.* `raea check` runs every one that applies. */export const taste = (t: Taste): Taste => t;-/** An object's plan (plan.ts): its parts by name, levels, counts, materials. */-export const plan = (p: Plan): Plan => p;+/** An object's parts (NAME.parts.ts), written before any geometry: each by name, its level, count and material. */+export const parts = (p: Parts): Parts => p;diff --git a/tools/skills.sh b/tools/skills.shindex ec50d5d5..576199c3 100755--- a/tools/skills.sh+++ b/tools/skills.sh@@ -205,7 +205,7 @@ gen_files() {echo "## The spec files"echoecho "Each spec's fields, as raea/brief's types (sdk/raea/src/brief.gen.ts, generated from the schemas in core/brief that"- echo "\`raea spec\` checks against): brief.ts is a Brief, NAME.script.ts a Script, taste.ts a Taste and plan.ts a Plan."+ echo "\`raea spec\` checks against): brief.ts is a Brief, NAME.script.ts a Script, taste.ts a Taste and NAME.parts.ts an object's Parts."echo "A field marked ? may be left out."echoecho '```ts'