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
Project registry in its own crate, raea-app-registry (apps/workspace/registry), so raea-app-workspace stays under the crate limit (L1 size: 2060 lines)
shinyobjectz151de4ba6389
diff --git a/Cargo.lock b/Cargo.lockindex 86a6ad3b..ce5f8549 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -13665,6 +13665,14 @@ dependencies = ["winit",]+[[package]]+name = "raea-app-registry"+version = "0.1.0"+dependencies = [+ "oxc",+ "serde_json",+]+[[package]]name = "raea-app-solid"version = "0.1.0"@@ -13704,7 +13712,7 @@ dependencies = [name = "raea-app-workspace"version = "0.1.0"dependencies = [- "oxc",+ "raea-app-registry","raea-core-brief","serde_json",]diff --git a/Cargo.toml b/Cargo.tomlindex 58a2e713..7ff80e7d 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -148,6 +148,7 @@ members = ["runtime/shared","apps/check","apps/workspace",+ "apps/workspace/registry","apps/ci","apps/tools","apps/judge",diff --git a/apps/workspace/Cargo.toml b/apps/workspace/Cargo.tomlindex 8ac0af88..a229256f 100644--- a/apps/workspace/Cargo.toml+++ b/apps/workspace/Cargo.toml@@ -10,6 +10,5 @@ description = "`raea workspace`, `raea project` and `raea controller`: a workspa# the controller schema (core/brief controller.rs): a controller file is checked and normalized against itraea-core-brief = { path = "../../core/brief" }serde_json = "1"-# a project's compositions, components and controllers read from their source (registry/, docs/projects.feature PJ8):-# the version engine/bundle parses TSX with-oxc = { version = "=0.152.0", features = ["ast_visit"] }+# a project's compositions, components and controllers read from their source (docs/projects.feature PJ8)+raea-app-registry = { path = "registry" }diff --git a/apps/workspace/registry/Cargo.toml b/apps/workspace/registry/Cargo.tomlnew file mode 100644index 00000000..d2866891--- /dev/null+++ b/apps/workspace/registry/Cargo.toml@@ -0,0 +1,12 @@+[package]+name = "raea-app-registry"+version = "0.1.0"+edition = "2024"+license = "FSL-1.1-ALv2"+publish = false+description = "A raea project's compositions, components and controllers, read from their source without running it, and lint for what isn't connected (docs/projects.feature PJ8)"++[dependencies]+# the version engine/bundle parses TSX with+oxc = { version = "=0.152.0", features = ["ast_visit"] }+serde_json = "1"diff --git a/apps/workspace/src/registry/mod.rs b/apps/workspace/registry/src/lib.rssimilarity index 82%rename from apps/workspace/src/registry/mod.rsrename to apps/workspace/registry/src/lib.rsindex 8d2af759..ccbfacb6 100644--- a/apps/workspace/src/registry/mod.rs+++ b/apps/workspace/registry/src/lib.rs@@ -5,7 +5,9 @@//! NAME-vN.tsx are one composition), sized from its newest render's manifest when it has one;//! - a component is a .tsx a composition imports, directly or through another;//! - a controller is a module whose default export is `controller({...})` from "raea/brief".-//! What isn't connected is linted (lint.rs), each with its file and line and the fix.+//! What isn't connected is linted (lint.rs), each with its file and line and the fix. raea-app-workspace wraps `scan`+//! with the project's controller overrides (read from .raea/project's git config) and runs it for `raea project scan`,+//! `raea doctor`, `raea next` and `raea context`.use std::collections::{BTreeMap, BTreeSet};use std::path::{Path, PathBuf};@@ -17,6 +19,25 @@ mod read;pub use lint::{Fix, Level, Lint, apply};pub use read::{Facts, Prop};+/// The nearest folder at or above `from` that holds `marker` (.raea/workspace, .raea/project).+pub fn up(from: &Path, marker: &str) -> Option<PathBuf> {+ let from = from.canonicalize().ok()?;+ from.ancestors().find(|d| d.join(marker).is_file()).map(Path::to_path_buf)+}++/// A name as a folder: lowercase, dashes. A controller's id from its title is this (core/brief fills it the same way).+pub fn slug(s: &str) -> String {+ let mut out = String::new();+ for c in s.trim().to_lowercase().chars() {+ if c.is_ascii_alphanumeric() {+ out.push(c);+ } else if !out.is_empty() && !out.ends_with('-') {+ out.push('-');+ }+ }+ out.trim_end_matches('-').to_string()+}+#[cfg(test)]mod tests;@@ -110,17 +131,18 @@ pub fn stem(file: &str) -> String {}}-/// The file a relative or absolute import names: as written, or with .tsx, .ts, .jsx or .js, or its folder's index.+/// The file a relative or absolute import names: as written, or with .tsx, .ts, .jsx or .js (in place of an extension+/// or after the name), or its folder's index.pub(crate) fn resolve(from: &Path, spec: &str) -> Option<PathBuf> {let base = if spec.starts_with('/') { PathBuf::from(spec) } else { from.parent()?.join(spec) };- let tries = [base.clone(), base.with_extension("tsx"), base.with_extension("ts"), base.with_extension("jsx"), base.with_extension("js")];- let named = |ext: &str| PathBuf::from(format!("{}.{ext}", base.display()));- tries- .into_iter()- .chain(["tsx", "ts", "jsx", "js"].map(named))- .chain(["index.tsx", "index.ts"].map(|i| base.join(i)))- .find(|p| p.is_file())- .map(|p| std::fs::canonicalize(&p).unwrap_or(p))+ let mut tries = vec![base.clone()];+ for ext in ["tsx", "ts", "jsx", "js"] {+ tries.push(base.with_extension(ext));+ tries.push(PathBuf::from(format!("{}.{ext}", base.display())));+ }+ tries.extend([base.join("index.tsx"), base.join("index.ts")]);+ let found = tries.into_iter().find(|p| p.is_file())?;+ Some(std::fs::canonicalize(&found).unwrap_or(found))}/// An import of a file (not a package): relative or absolute.@@ -140,11 +162,11 @@ fn manifest(path: &Path) -> Option<Value> {serde_json::from_str(&std::fs::read_to_string(f).ok()?).ok()}-/// The folder's registry. `controllers_home`: the workspace's controllers/ folder, read too, so an override or a-/// controller elsewhere can be checked against the whole set.-pub fn scan(dir: &Path) -> Registry {+/// The folder's registry. `overridden`: the controller ids the project's overrides name, each checked against the+/// controllers there (the folder's and its workspace's controllers/).+pub fn scan(dir: &Path, overridden: &[String]) -> Registry {let dir = std::fs::canonicalize(dir).unwrap_or_else(|_| dir.to_path_buf());- let project = crate::up(&dir, ".raea/project").is_some();+ let project = up(&dir, ".raea/project").is_some();let mut found = Vec::new();sources(&dir, "", 0, &mut found);let files: Vec<File> = found@@ -206,11 +228,29 @@ pub fn scan(dir: &Path) -> Registry {let controllers = files.iter().filter_map(|f| f.facts.controller.as_ref().map(|c| Controller { id: c.id.clone(), file: f.rel.clone(), line: c.line })).collect();let mut reg = Registry { dir, project, compositions, components, controllers, lint: Vec::new() };- reg.lint = lint::lint(®, &files, &used_by);+ reg.lint = lint::lint(®, &files, &used_by, overridden);reg}impl Registry {+ /// What isn't connected: the warnings (the notes say what only the render knows).+ pub fn warnings(&self) -> impl Iterator<Item = &Lint> {+ self.lint.iter().filter(|l| l.level == Level::Warn)+ }++ /// The compositions' files, each once, the newest first.+ pub fn composition_files(&self) -> Vec<PathBuf> {+ let mut out: Vec<PathBuf> = Vec::new();+ for c in &self.compositions {+ let p = self.dir.join(&c.file);+ if !out.contains(&p) {+ out.push(p);+ }+ }+ out.sort_by_cached_key(|p| std::cmp::Reverse(std::fs::metadata(p).and_then(|m| m.modified()).ok()));+ out+ }+pub fn json(&self) -> Value {let p = |v: &Option<Prop>| v.as_ref().map_or(Value::Null, Prop::json);json!({@@ -249,7 +289,7 @@ impl Registry {if !self.controllers.is_empty() {out.push_str(&format!("controllers: {}\n", self.controllers.iter().map(|c| format!("{} ({})", c.id.as_deref().unwrap_or("?"), c.file)).collect::<Vec<_>>().join(", ")));}- let warn: Vec<&Lint> = self.lint.iter().filter(|l| l.level == Level::Warn).collect();+ let warn: Vec<&Lint> = self.warnings().collect();if !warn.is_empty() {out.push_str(&format!("\nnot connected ({}; raea doctor --fix fixes what it can):\n", warn.len()));for l in warn.iter().take(10) {diff --git a/apps/workspace/src/registry/lint.rs b/apps/workspace/registry/src/lint.rssimilarity index 97%rename from apps/workspace/src/registry/lint.rsrename to apps/workspace/registry/src/lint.rsindex 66641b85..47889220 100644--- a/apps/workspace/src/registry/lint.rs+++ b/apps/workspace/registry/src/lint.rs@@ -64,7 +64,7 @@ fn warn(file: &str, line: usize, rule: &'static str, says: String, fix: impl IntLint { file: file.into(), line, rule, level: Level::Warn, says, fix: fix.into(), action: None }}-pub(super) fn lint(reg: &Registry, files: &[File], used_by: &BTreeMap<String, BTreeSet<String>>) -> Vec<Lint> {+pub(super) fn lint(reg: &Registry, files: &[File], used_by: &BTreeMap<String, BTreeSet<String>>, overridden: &[String]) -> Vec<Lint> {let mut out = Vec::new();if !reg.project && !(reg.compositions.is_empty() && reg.controllers.is_empty()) {out.push(warn("", 0, "not-a-project", "this folder isn't in a raea project (no .raea/project at or above it)".into(), "raea project new NAME and move the files in, or raea workspace adopt the folder"));@@ -158,7 +158,7 @@ pub(super) fn lint(reg: &Registry, files: &[File], used_by: &BTreeMap<String, BT}// controllers: where they're kept, one id each, and every override naming one that's there- let ws = crate::up(®.dir, ".raea/workspace");+ let ws = super::up(®.dir, ".raea/workspace");let home = ws.clone().unwrap_or_else(|| reg.dir.clone()).join("controllers");let mut ids: BTreeMap<String, Vec<&str>> = BTreeMap::new();for c in ®.controllers {@@ -195,9 +195,8 @@ pub(super) fn lint(reg: &Registry, files: &[File], used_by: &BTreeMap<String, BT}}let mut named = BTreeSet::new();- for (path, _) in crate::controllers::overrides(®.dir) {- let id = path.split('.').next().unwrap_or_default().to_string();- if !known.contains(&id) && named.insert(id.clone()) {+ for id in overridden {+ if !known.contains(id) && named.insert(id.clone()) {out.push(warn(".raea/project", 0, "override-missing", format!("overrides controller \"{id}\", which isn't there"), format!("raea controller ls lists the ones there; remove the override with git config --file .raea/project --remove-section controller.{id}")));}}diff --git a/apps/workspace/src/registry/read.rs b/apps/workspace/registry/src/read.rssimilarity index 97%rename from apps/workspace/src/registry/read.rsrename to apps/workspace/registry/src/read.rsindex 0cc110b7..d008872d 100644--- a/apps/workspace/src/registry/read.rs+++ b/apps/workspace/registry/src/read.rs@@ -69,8 +69,8 @@ pub fn read(source: &str, tsx: bool) -> Facts {let alloc = Allocator::default();let st = if tsx { SourceType::tsx() } else { SourceType::ts() };let parsed = Parser::new(&alloc, source, st).parse();- let lines = line_starts(source);- let line = |at: u32| lines.partition_point(|&s| s <= at as usize);+ // 1-based: the newlines before it, plus one+ let line = |at: u32| source.as_bytes()[..at as usize].iter().filter(|&&b| b == b'\n').count() + 1;let mut f = Facts::default();if let Some(d) = parsed.diagnostics.first() {f.broken = Some(d.to_string());@@ -139,7 +139,7 @@ fn controller_id(c: &CallExpression) -> Option<String> {_ => None,})};- text("id").or_else(|| text("title").map(|t| crate::slug(&t)))+ text("id").or_else(|| text("title").map(|t| super::slug(&t)))}/// The file's top-level numeric constants, in order: `const FPS = 30`, `const DUR = 15 * FPS`, and an object constant's@@ -288,8 +288,3 @@ impl Compositions<'_> {}}}--/// Where each line starts, for 1-based line numbers.-fn line_starts(src: &str) -> Vec<usize> {- std::iter::once(0).chain(src.match_indices('\n').map(|(i, _)| i + 1)).collect()-}diff --git a/apps/workspace/src/registry/tests.rs b/apps/workspace/registry/src/tests.rssimilarity index 92%rename from apps/workspace/src/registry/tests.rsrename to apps/workspace/registry/src/tests.rsindex 6236c252..5dcce4ca 100644--- a/apps/workspace/src/registry/tests.rs+++ b/apps/workspace/registry/src/tests.rs@@ -47,7 +47,7 @@ mod tempdir {#[test]fn compositions_components_and_controllers_are_read_from_the_files() {let (_t, p) = project();- let r = scan(&p);+ let r = scan(&p, &[]);assert!(r.project);let comps: Vec<(&str, &str, How)> = r.compositions.iter().map(|c| (c.id.as_str(), c.file.as_str(), c.how)).collect();assert!(comps.contains(&("promo", "promo.tsx", How::Registered)));@@ -71,7 +71,7 @@ fn compositions_components_and_controllers_are_read_from_the_files() {#[test]fn what_isnt_connected_is_linted_with_its_place_and_fix() {let (_t, p) = project();- let r = scan(&p);+ let r = scan(&p, &[]);let has = |rule: &str, file: &str, line: usize| r.lint.iter().any(|l| l.rule == rule && l.file == file && l.line == line);assert!(has("orphan", "stray.tsx", 1));assert!(!r.lint.iter().any(|l| l.rule == "orphan" && ["card.tsx", "lib/glyph.tsx", "promo.tsx"].contains(&l.file.as_str())));@@ -94,7 +94,7 @@ fn what_isnt_connected_is_linted_with_its_place_and_fix() {#[test]fn fixes_register_a_default_export_and_move_a_controller_home() {let (_t, p) = project();- let r = scan(&p);+ let r = scan(&p, &[]);for l in r.lint.iter().filter(|l| l.action.is_some()) {lint::apply(l.action.as_ref().unwrap()).unwrap();}@@ -102,7 +102,7 @@ fn fixes_register_a_default_export_and_move_a_controller_home() {assert!(bare.starts_with("import { Composition, registerRoot } from \"raea\";\nimport { AbsoluteFill }"), "{bare}");assert!(bare.ends_with("registerRoot(() => <Composition id=\"bare\" component={Bare} width={1080} height={1080} fps={30} durationInFrames={3} />);\n"), "{bare}");assert!(p.join("controllers/look-and-feel.ts").is_file() && !p.join("settings/look.ts").exists());- let again = scan(&p);+ let again = scan(&p, &[]);assert_eq!(again.compositions.iter().find(|c| c.file == "bare.tsx").unwrap().how, How::Registered);assert!(!again.lint.iter().any(|l| l.rule == "controller-home" || (l.rule == "unregistered" && l.file == "bare.tsx")));}@@ -111,11 +111,19 @@ fn fixes_register_a_default_export_and_move_a_controller_home() {fn a_folder_outside_any_project_says_so() {let t = tempdir::Dir::new();std::fs::write(t.0.join("a.tsx"), "export default function A() { return null; }\n").unwrap();- let r = scan(&t.0);+ let r = scan(&t.0, &[]);assert!(!r.project);assert!(r.lint.iter().any(|l| l.rule == "not-a-project"));}+#[test]+fn an_override_naming_a_controller_that_isnt_there_is_linted() {+ let (_t, p) = project();+ let r = scan(&p, &["delivery".into(), "gone".into(), "gone".into()]);+ let named: Vec<&str> = r.lint.iter().filter(|l| l.rule == "override-missing").map(|l| l.says.as_str()).collect();+ assert_eq!(named, ["overrides controller \"gone\", which isn't there"], "once, and not for one that's there");+}+#[test]fn versions_share_a_stem() {assert_eq!(stem("promo-v12.tsx"), "promo");@@ -123,12 +131,12 @@ fn versions_share_a_stem() {assert_eq!(stem("x-v.tsx"), "x-v");}-/// A real folder's registry, printed: `RAEA_SCAN_DIR=~/Studio/x cargo test -p raea-app-workspace real_folder -- --ignored --nocapture`.+/// A real folder's registry, printed: `RAEA_SCAN_DIR=~/Studio/x cargo test -p raea-app-registry real_folder -- --ignored --nocapture`.#[test]#[ignore]fn real_folder() {let Some(dir) = std::env::var_os("RAEA_SCAN_DIR") else { return };let t = std::time::Instant::now();- let r = scan(Path::new(&dir));+ let r = scan(Path::new(&dir), &[]);println!("{}\n({} ms)", r.text(), t.elapsed().as_millis());}diff --git a/apps/workspace/src/doctor.rs b/apps/workspace/src/doctor.rsindex bea7ed47..a3310b30 100644--- a/apps/workspace/src/doctor.rs+++ b/apps/workspace/src/doctor.rs@@ -115,13 +115,11 @@ pub fn registry_dir(from: &Path) -> Option<PathBuf> {pub fn registry_findings(from: &Path) -> Vec<Finding> {let Some(dir) = registry_dir(from) else { return vec![] };let reg = crate::registry::scan(&dir);- reg.lint- .into_iter()- .filter(|l| l.level == crate::registry::Level::Warn)+ reg.warnings().map(|l| {let at = if l.file.is_empty() { reg.dir.display().to_string() } else { reg.dir.join(&l.file).display().to_string() };let at = if l.line > 0 { format!("{at}:{}", l.line) } else { at };- Finding { says: format!("{at}: {} ({})", l.says, l.fix), fix: l.action.map_or(Fix::No, Fix::Registry) }+ Finding { says: format!("{at}: {} ({})", l.says, l.fix), fix: l.action.clone().map_or(Fix::No, Fix::Registry) }}).collect()}diff --git a/apps/workspace/src/lib.rs b/apps/workspace/src/lib.rsindex 3e9dbaa3..bb8d79f1 100644--- a/apps/workspace/src/lib.rs+++ b/apps/workspace/src/lib.rs@@ -14,6 +14,7 @@ mod storage;mod workspace;pub use controllers::{controller, module, summary};+pub use registry::context;pub use literal::{tidy, tidy_deep, ts_literal};pub use workspace::{project, projects, root, slug, up, workspace};diff --git a/apps/workspace/src/next.rs b/apps/workspace/src/next.rsindex a4e2471c..c4794418 100644--- a/apps/workspace/src/next.rs+++ b/apps/workspace/src/next.rs@@ -55,13 +55,11 @@ pub fn steps(dir: &Path, brief: &Brief, stale: usize) -> Vec<String> {}// the compositions as raea's project system reads them (PJ8), newest first; what isn't connected is a step beforelet reg = crate::registry::scan(dir);- let loose: Vec<&crate::registry::Lint> = reg.lint.iter().filter(|l| l.level == crate::registry::Level::Warn).collect();+ let loose: Vec<&crate::registry::Lint> = reg.warnings().collect();if let Some(first) = loose.first() {out.push(format!("connect the project's files: {} thing(s) aren't connected, first {} (`raea project scan` lists them, `raea doctor --fix` fixes what it can)", loose.len(), first.line()));}- let mut comps: Vec<PathBuf> = reg.compositions.iter().map(|c| reg.dir.join(&c.file)).collect();- comps.dedup();- comps.sort_by_key(|p| std::cmp::Reverse(modified(p)));+ let comps = reg.composition_files();let renders = files(&dir.join("out"), ".mp4");match (comps.first(), renders.first()) {(None, _) => out.push("make the first item: one .tsx whose root registers a Composition (`raea guide craft` first)".into()),diff --git a/apps/workspace/src/registry.rs b/apps/workspace/src/registry.rsnew file mode 100644index 00000000..715ed78d--- /dev/null+++ b/apps/workspace/src/registry.rs@@ -0,0 +1,25 @@+//! A project's compositions, components and controllers (docs/projects.feature PJ8): raea-app-registry's reading of+//! its files, with the project's controller overrides from .raea/project checked against the controllers there.+use std::path::Path;++use crate::Eval;+pub use raea_app_registry::{Component, Composition, Controller, Fix, How, Level, Lint, Prop, Registry, apply};++/// The folder's registry.+pub fn scan(dir: &Path) -> Registry {+ let ids: Vec<String> = crate::controllers::overrides(dir).into_iter().filter_map(|(path, _)| path.split('.').next().map(str::to_string)).collect();+ raea_app_registry::scan(dir, &ids)+}++/// What `raea context` reads of the workspace, as (section, text): its controllers with this project's overrides, and+/// the project's compositions, components and controllers as raea reads them.+pub fn context(from: &Path, eval: Eval) -> Vec<(String, String)> {+ let mut out = Vec::new();+ if let Some(text) = crate::summary(from, eval) {+ out.push(("CONTROLLERS (raea controller ls; a project's own values marked)".to_string(), text));+ }+ if let Some(dir) = crate::doctor::registry_dir(from) {+ out.push(("PROJECT FILES (raea project scan)".to_string(), scan(&dir).summary()));+ }+ out+}diff --git a/apps/workspace/src/workspace.rs b/apps/workspace/src/workspace.rsindex a1332e12..4cada651 100644--- a/apps/workspace/src/workspace.rs+++ b/apps/workspace/src/workspace.rs@@ -69,18 +69,9 @@ fn words(args: &[String]) -> Vec<&str> {args.iter().enumerate().filter(|(i, a)| !a.starts_with("--") && !(*i > 0 && takes.contains(&args[i - 1].as_str()))).map(|(_, a)| a.as_str()).collect()}-/// A name as a folder: lowercase, dashes.-pub fn slug(s: &str) -> String {- let mut out = String::new();- for c in s.trim().to_lowercase().chars() {- if c.is_ascii_alphanumeric() {- out.push(c);- } else if !out.is_empty() && !out.ends_with('-') {- out.push('-');- }- }- out.trim_end_matches('-').to_string()-}+// a name as a folder (slug), and the nearest folder holding a marker (up): the registry's, which reads controller ids+// and projects with them+pub use raea_app_registry::{slug, up};/// A new id: the prefix and eight hex digits from the clock and the process.pub(crate) fn new_id(prefix: &str) -> String {@@ -99,12 +90,6 @@ pub fn root() -> PathBuf {}}-/// The nearest folder at or above `from` that holds `marker` (.raea/workspace, .raea/project).-pub fn up(from: &Path, marker: &str) -> Option<PathBuf> {- let from = from.canonicalize().ok()?;- from.ancestors().find(|d| d.join(marker).is_file()).map(Path::to_path_buf)-}-/// The include in a repo's own config that makes `git config` read a committed file. Idempotent; the path is relative/// to the config file, which for a submodule lives under the workspace's .git/modules.pub(crate) fn include(repo: &Path, file: &Path) -> R<()> {diff --git a/engine/cli/src/guide.rs b/engine/cli/src/guide.rsindex 5bbda74c..191b5eb3 100644--- a/engine/cli/src/guide.rs+++ b/engine/cli/src/guide.rs@@ -130,13 +130,10 @@ fn context_body(out: &mut String, dir: &Path, taste_dir: Option<PathBuf>, modes:if let Some((p, text)) = raea_app_workspace::up(&dir, ".raea/workspace").and_then(|ws| spec::taste_file(&ws, "taste")) {section(format!("WORKSPACE TASTE {}", p.display()), text);}- // the workspace's controllers, with this project's overrides: its settings and workflows, which the work follows- if let Some(text) = raea_app_workspace::summary(&dir, spec::spec_json) {- section("CONTROLLERS (raea controller ls; a project's own values marked)".into(), text);- }- // the project's compositions, components and controllers as raea's project system reads them (PJ8)- if let Some(d) = raea_app_workspace::doctor::registry_dir(dir) {- section("PROJECT FILES (raea project scan)".into(), raea_app_workspace::registry::scan(&d).summary());+ // the workspace's controllers with this project's overrides (its settings and workflows, which the work follows), and+ // the project's compositions, components and controllers as raea reads them (docs/projects.feature PJ8)+ for (name, text) in raea_app_workspace::context(dir, spec::spec_json) {+ section(name, text);}section(format!("BRIEF {}", brief_path.display()), brief.clone());for (p, t) in &subs {