The Plaited framework — behavioral-programming runtime, SSR Renderer, browser Controller, HTML/CSS schemas, validation utils, and CLI.
src/— the framework (runtime, schemas, Renderer/Controller, CLI)skills/— published reference skills (plaited-framework,design,git-context,markdown,mcp-client,typescript-lsp).agents/skills/— workspace-installed skillsresearch/— research briefs (atproto-content-sites,mcp-apps, Spatiotemporal Composability paper)prompts/— implementation promptsscripts/— repo setup and package-maintenance shell gluebin/— CLI entry pointassets/— brand assets
Imported as plaited. Three entry points:
// Main entry — behavioral runtime, Renderer, validation utils, frontier analysis
import { Renderer, validateAndEscapeHtml, validateAttributeValue, ValidationError } from 'plaited'
// Controller — browser-side controller bootstrap
import { Controller } from 'plaited/controller'
// Utils — keyMirror, deepEqual, isTypeOf, trueTypeOf, ueid, case conversion, escape, wait
import { keyMirror, deepEqual } from 'plaited/utils'src/main/— behavioral runtime, Renderer (SSR), message schemas, HTML/CSS schemas,html-rewriter.utils.ts(validation utils),swap-boundary.ts(scale-check classifier), frontier analysissrc/controller/— browser Controller (WebSocket-driven, appliesrender/attrs/dispatch_custom_event/navigate/scale_checkto the live DOM)src/cli/—plaitedCLI (git-context,markdown,mcp-client,typescript-lsp)src/utils/— shared utilitiesbin/plaited.ts— CLI entry point
p-scale is advisory structural metadata, not a runtime-enforced invariant.
The framework exposes a read-only scaleCheck pre-flight (Renderer method +
Controller scale_check WS message) that returns the effective structural
boundary a render target lives in, so a server-side b-thread can generate
content that respects the boundary before rendering. See the
plaited-framework skill's design-spec.md → Structural scale for the rule.
The server-side b-program is the validation edge — the Controller trusts what the server sent. Two substrate-neutral utilities are exported for pre-flighting dynamic HTML before it crosses the WebSocket to the browser:
validateAndEscapeHtml(html)— HTMLRewriter pass validating HTML attributes- CSS, returning the escaped HTML string
validateAttributeValue({ tag, attr, val })—on*blocklist + per-tag schemasafeParse, throwsValidationErroron failure
bun --bun tsc --noEmit # typecheck
bun test # tests