Overview Modules context person Developer # public context::Developer Author of architecture models: edits `.pds` files in an IDE and runs the CLI.
Sequence Sequence — editModel scroll to zoom · drag to pan + − ⟲ ⤢ SEQUENCE editModel PERSON Developer Author of architecture models: edits `.pds` SYSTEM Editor IDEs that speak the Language Server SYSTEM Pseudoscript The PseudoScript CLI — loads a `.pds` CONTAINER Cli Pseudoscript `crates/pseudoscript` — the binary crate COMPONENT LspHost Pseudoscript::Cli `pds lsp` — boot a Tokio runtime and CONTAINER Lsp Pseudoscript `crates/pseudoscript-lsp`. The stdio language COMPONENT Server Pseudoscript::Lsp The tower-lsp `Backend`: owns the COMPONENT Store Pseudoscript::Lsp The workspace document store: the server's 1 openDocument(doc: model::WorkspaceModule) 2 serveLanguage(doc: model::WorkspaceModule) 3 runLsp() 4 run() 5 runStdio() 6 runStdio() ↩ return ↩ Ok<void> ↩ return Result<void, cli::IoError> 7 onChange(doc: model::WorkspaceModule) 8 onChange(doc: model::WorkspaceModule) 9 change(doc: model::WorkspaceModule) ↩ return 10 publishAll Sequence Sequence — renderDocs scroll to zoom · drag to pan + − ⟲ ⤢ SEQUENCE renderDocs alt [found.isErr] [else] alt [dependencies.isErr] [else] alt [modules.isErr] [else] alt [config.isErr] [else] alt [self.isHtml()] alt [written.isErr] [else] alt [site.isErr] [else] alt [project.isErr] [else] alt [root.isErr] [else] alt [built.isErr] [else] PERSON Developer Author of architecture models: edits `.pds` SYSTEM Pseudoscript The PseudoScript CLI — loads a `.pds` CONTAINER Cli Pseudoscript `crates/pseudoscript` — the binary crate COMPONENT DocCmd Pseudoscript::Cli `pds doc` — the headline command COMPONENT Loader Pseudoscript::Cli The CLI loader: resolves the project CONTAINER Project Pseudoscript `crates/pseudoscript-project`. The disk-facing COMPONENT Loader Pseudoscript::Project Resolves and reads a workspace off disk: CONTAINER Model Pseudoscript `crates/pseudoscript-model`. AST to one resolved COMPONENT Checks Pseudoscript::Model Static analysis (LANG.md §2.2, §2.3, CONTAINER Doc Pseudoscript `crates/pseudoscript-doc`. Turns a resolved grap… COMPONENT Health Pseudoscript::Doc Positions the host's diagnostics in the COMPONENT Builder Pseudoscript::Model Projects the parsed, resolved workspace COMPONENT Workspace Pseudoscript::Model The resolved set of modules keyed by FQN 1 renderDocs(path: string) 2 runDoc(path: string) 3 noFormatOverride 4 run(path: string, cliFormat: string) 5 findRoot(start: string) 6 findRoot(start: string) 7 findRoot(start: string) ↩ return Result<string, project::IoError> ↩ return Result<string, project::IoError> 8 ioError ↩ Err<cli::IoError> ↩ Ok<string> ↩ Err<cli::IoError> 9 load(root: string) 10 loadManifest ↩ Err<cli::IoError> 11 loadModules ↩ Err<cli::IoError> 12 loadDependencies ↩ Err<cli::IoError> ↩ Ok<cli::Workspace> ↩ Err<cli::IoError> 13 resolveFormat 14 checkWorkspaceModules(modules: model::WorkspaceModule[], externals: model::WorkspaceModule[]) 15 checkWorkspaceModules(modules: model::WorkspaceModule[], externals: model::WorkspaceModule[]) ↩ return model::ModuleDiagnostics[] ↩ return model::ModuleDiagnostics[] 16 reportModules 17 prepareDiagnostics(modules: model::WorkspaceModule[], perModule: model::ModuleDiagnostics[]) 18 prepare(modules: model::WorkspaceModule[], perModule: model::ModuleDiagnostics[]) ↩ return doc::DiagnosticInput[] ↩ return doc::DiagnosticInput[] 19 graph(modules: model::WorkspaceModule[]) 20 graph(modules: model::WorkspaceModule[]) 21 build(modules: model::WorkspaceModule[]) 22 noExternals 23 buildWithExternals ↩ return model::ModuleEntry[] 24 graphOf ↩ return model::Graph ↩ return model::Graph 25 renderSite ↩ Err<cli::IoError> 26 write ↩ Err<cli::IoError> 27 isHtml 28 copyLogo ↩ Ok<string> ↩ Err<cli::IoError> ↩ Ok<void> context::Editor IDEs that speak the Language Server Protocol (VS Code, Neovim, …). The editor
spawns `pds lsp` as a child process and drives it over stdio: it streams
document changes to the server and renders the diagnostics it publishes.
Containers Container diagram scroll to zoom · drag to pan + − ⟲ ⤢ PERSON Developer Author of architecture models: edits `.pds` files in an IDE and runs the CLI. SYSTEM Pseudoscript The PseudoScript CLI — loads a `.pds` workspace into one resolved graph and… renderDocs system Pseudoscript # public context::Pseudoscript The PseudoScript CLI — loads a `.pds` workspace into one resolved graph and
documents it as a static site, or serves the language to editors. Cross-system
callers couple to these published faces; the containers stay behind them.
#headline
Scenarios DocumentAWorkspace
Render a `.pds` workspace to a browsable documentation site — the headline
flow, aggregating load, check, graph, project, and write.
#headline
given a directory holding a pds.toml and one or more .pds modules and the modules form a well-formed C4 model when the developer runs `pds doc` against the directory then every module is loaded into one resolved graph and C4 and sequence diagrams are projected as scene geometry the site's client islands draw and a static site is written under the configured output directory Flow Flow — DocumentAWorkspace scroll to zoom · drag to pan + − ⟲ ⤢ FEATURE DocumentAWorkspace for Pseudoscript GIVEN a directory holding a pds.toml and one or more .pds modules AND the modules form a well-formed C4 model WHEN the developer runs `pds doc` against the directory THEN every module is loaded into one resolved graph AND C4 and sequence diagrams are projected as scene geometry the site's client islands draw AND a static site is written under the configured output directory CheckAModel
Statically validate a model and report what is wrong.
given a .pds source file when the developer runs `pds check` on it then the source is parsed with error recovery and resolution, visibility, Result-flow, and return-coverage checks run and every violation is reported as a diagnostic but a well-formed model reports nothing and exits zero Flow Flow — CheckAModel scroll to zoom · drag to pan + − ⟲ ⤢ FEATURE CheckAModel for Pseudoscript GIVEN a .pds source file WHEN the developer runs `pds check` on it THEN the source is parsed with error recovery AND resolution, visibility, Result-flow, and return-coverage checks run AND every violation is reported as a diagnostic BUT a well-formed model reports nothing and exits zero FormatAModel
Reformat a model to one canonical form.
given a .pds source file with non-canonical spacing when the developer runs `pds fmt` then the source is parsed and pretty-printed to canonical PseudoScript and comments and blank-line runs are preserved but unparseable source is rejected without rewriting the file Flow Flow — FormatAModel scroll to zoom · drag to pan + − ⟲ ⤢ FEATURE FormatAModel for Pseudoscript GIVEN a .pds source file with non-canonical spacing WHEN the developer runs `pds fmt` THEN the source is parsed and pretty-printed to canonical PseudoScript AND comments and blank-line runs are preserved BUT unparseable source is rejected without rewriting the file EditModelInIde
Author a model in an editor with live diagnostics.
given an editor that speaks the Language Server Protocol and `pds lsp` running as a child process over stdio when the author changes a document then the server re-checks the document from its current text and diagnostics are published back to the editor Flow Flow — EditModelInIde scroll to zoom · drag to pan + − ⟲ ⤢ FEATURE EditModelInIde for Pseudoscript GIVEN an editor that speaks the Language Server Protocol AND `pds lsp` running as a child process over stdio WHEN the author changes a document THEN the server re-checks the document from its current text AND diagnostics are published back to the editor ServeLiveDocs
Preview docs that rebuild as the model changes.
given a generated documentation site when the developer runs `pds doc --serve --watch` then the site is hosted over HTTP on localhost and a change to any .pds or pds.toml rebuilds the site and the browser live-reloads to the new version Flow Flow — ServeLiveDocs scroll to zoom · drag to pan + − ⟲ ⤢ FEATURE ServeLiveDocs for Pseudoscript GIVEN a generated documentation site WHEN the developer runs `pds doc --serve --watch` THEN the site is hosted over HTTP on localhost AND a change to any .pds or pds.toml rebuilds the site AND the browser live-reloads to the new version Containers Container diagram scroll to zoom · drag to pan + − ⟲ ⤢ Pseudoscript CONTAINER Cli `crates/pseudoscript` — the binary crate (`pds`). The composition root and only I/O… CONTAINER Doc `crates/pseudoscript-doc`. Turns a resolved graph into a Svelte-rendered,… CONTAINER Dot `crates/pseudoscript-dot`. Runs the four-pass layered pipeline over a `Graph` t… CONTAINER Emit `crates/pseudoscript-emit`. Projects a view into a `Scene` and renders it to SVG; C4… CONTAINER Format `crates/pseudoscript-format`. The canonical formatter: parse, then pretty-print the tre… CONTAINER IdeSession `crates/pseudoscript-ide` — the IDE application, Rust compiled to a single wasm… CONTAINER WebIde `web-ide` — the IDE at `ide.pdscript.dev`: a SvelteKit shell on Cloudflare Workers stati… CONTAINER Landing `web-landing` — the marketing site at `pdscript.dev`. A static Svelte build on… CONTAINER Layout `crates/pseudoscript-layout`. The geometry/text `Core` and the sequence… CONTAINER Lsp `crates/pseudoscript-lsp`. The stdio language server (tower-lsp): workspace… CONTAINER LspCore `crates/pseudoscript-lsp-core`. The single home for language intelligence as… CONTAINER Model `crates/pseudoscript-model`. AST to one resolved graph; static checks (resolution,… CONTAINER Project `crates/pseudoscript-project`. The disk-facing loader: resolves the workspace… CONTAINER Syntax `crates/pseudoscript-syntax`. The foundation crate: source text to tokens and a typed… CONTAINER Universe `crates/pseudoscript-universe`. Maps the resolved C4 model into the software graph… PERSON Developer Author of architecture models: edits `.pds` files in an IDE and runs the CLI. SYSTEM Editor IDEs that speak the Language Server Protocol (VS Code, Neovim, …). The editor spawns `pd… SYSTEM LlmProvider The author's configured OpenAI-compatible completion provider — hosted (OpenAI,… PERSON Visitor A prospective user reading the landing page. prepareDiagnostics render renderMarkdown format runStdio check checkWorkspace checkWorkspaceModules graph findRoot load renderTokens openDocument project flows fromModel snapshot gridLayout runPipeline layout parse prepareDiagnostics check checkWorkspaceModules graph build flows snapshot complete dependencyModules diagnostics hover mount outline setSource chatComplete fimComplete listModels open openIde showInstall definition formatEdit hover check parse project graph