Workspace Design History
Vyasa Workspace Design History
Section titled “Vyasa Workspace Design History”In reverse chronological order
2026-02-14: Build Tooling Cleanup
Section titled “2026-02-14: Build Tooling Cleanup”- Migration: WASM output directory moved from
src/pkgtosrc/vyasac-wasmfor clarity. - Convention: Build scripts renamed for consistency:
build-samples→build:samples, alongside existingbuild:wasm. - Cleanup: Removed redundant nested
vyasa-docsdirectory from thevyasaworkspace.
2026-02-12: Configuration Cleanup
Section titled “2026-02-12: Configuration Cleanup”- Removal: Removed
[collection]configuration fromvyasac.toml.- Constraint: Collection behavior is now defined entirely within the template files (
reference.vy) using attributes.
- Constraint: Collection behavior is now defined entirely within the template files (
- Semantics:
work.chaptersis deprecated in favor ofwork.items(though aliases may exist during transition).
2026-02-08: Standardized Template Directory
Section titled “2026-02-08: Standardized Template Directory”- Convention:
templates/<target>/is now the standard location for templates. - Shell:
default.html(formerlynative.html) is the standard entry point. - Configuration: Removed explicit
[templates]section fromvyasac.tomlin favor of convention.
2026-02-07: Dynamic Template Configuration
Section titled “2026-02-07: Dynamic Template Configuration”- Feature: Added
template_dirconfiguration key invyasac.toml. - Behavior: PlayArea parsing logic scan this directory (defaulting to
templates/) to populate the template dropdown. - Goal: Allow flexible workspace structures where templates might reside in
theme/or other custom paths.
2026-02-05: Graph Persistence (The “Sink”)
Section titled “2026-02-05: Graph Persistence (The “Sink”)”- Goal: Close the loop by persisting compiler output back to the database.
- Implementation:
- Compiler: Returns a map of
CompiledDocumentASTs. - SQLite Service: Recursively inserts AST nodes into the
nodestable. - Schema:
files(source) andnodes(graph) are now synchronized.
- Compiler: Returns a map of
- Benefit: Enables graph querying (e.g., “Find all
vcommands spoken byKrishna”).
2026-02-03: The “Git-in-a-DB” Architecture
Section titled “2026-02-03: The “Git-in-a-DB” Architecture”- Major Shift: Moved away from in-memory WASM FS (memfs) to a database-backed Virtual File System.
- Architecture:
- Browser (PlayArea): Manages
wa-sqlite(OPFS) as the source of truth. - WASM (Compiler): Reads source files directly from the DB via
SqliteFileSystem.
- Browser (PlayArea): Manages
- Significance:
- Zero-Copy: No need to “upload” files to WASM memory manually.
- Persistence: Changes survive page reloads naturally.
- Incremental: The DB state is the build state.
2026-01-30: SQLite Source Packaging
Section titled “2026-01-30: SQLite Source Packaging”- Goal: Provide an “App-Ready” distribution format for Vyasa content.
- Format: Monolithic SQLite database (
.db) containing normalized tables:manifest,streams,nodes,registry. - Usage:
vyasac pack --target sqlite. Enables direct SQL querying of the semantic graph (e.g., “Select all verses in Chapter 1”).
2026-01-29: Source Packaging (Samples)
Section titled “2026-01-29: Source Packaging (Samples)”- Goal: Enable distribution of compiled workspaces to publishers without requiring them to rebuild from source.
- Format: ZIP archive containing
vyasac.toml,context.vy, and compiledcontent. - Implementation: Initial support added via
package-samples.jsfor the documentation site. Futurevyasac packcommand will formalize this.
2026-01-26: Context-Driven Configuration
Section titled “2026-01-26: Context-Driven Configuration”- Shift: Moved configuration logic (Aliases, URN Schemes) out of
vyasac.tomland intocontext.vy. - Mechanism: The
context.vyfile is now the single source of truth for “soft” configuration that might change per-folder.vyasac.tomlis reserved for “hard” build config (source path, streams). - Benefit: Simplifies the mental model. Configuring the language is done in the language.
2026-01-25: Template Customization & Aliases
Section titled “2026-01-25: Template Customization & Aliases”- Templates: Added support for a
templates/directory in the workspace root. The compiler now looks fordefault.htmlhere to override built-in templates. - AST Rendering: Templates now receive the raw AST (
Node::Command,Node::Text).- Change: Moved away from pre-formatted HTML generation in the backend to giving templates full control over the AST.
- Refinement:
Textnodes must be accessed via.value.
- Workflows: Added support for packaging workspaces (
build-samples) and syncing WASM binaries (/sync-wasm).
2025-12-31: The Workspace Model
Section titled “2025-12-31: The Workspace Model”- Shift: Moved from “Project + Sidecars” to “Workspace + Streams”.
- Reasoning: “Sidecar” implies second-class citizenship. In reality, a translation or an audio alignment file is just another stream of information about the work.
- Concept:
- Workspace: A collection of related streams defined by
vyasac.toml. - Primary Stream: The definitive text source (defining valid reference IDs).
- Secondary Streams: Other folders (formerly sidecars) that reference the primary stream.
- Workspace: A collection of related streams defined by
- Linking: Linking is implicit based on relative paths.
primary/vol1/gen.vylinks tosecondary/vol1/gen.vy. - Config:
[streams]primary = "hebrew"secondary = ["spanish", "audio"]
2025-12-30: Sidecars as Vyasa Files
Section titled “2025-12-30: Sidecars as Vyasa Files”- Decision: Rejected using custom TOML schemas for sidecars (e.g.,
.audio.toml). - Insight: “One Grammar to Rule Them All”.
- Translation sidecar? It’s a Vyasa file with text.
- Audio alignment? It’s a Vyasa file using
rcommands with time attributes.
- Result: Sidecars are just
.vyfiles. The compiler processes them into standard ASTs.
2025-12-29: Project Structure & Inheritance
Section titled “2025-12-29: Project Structure & Inheritance”- Decision: Configuration should be hierarchical.
- Mechanism:
vyasac.tomlat root defines global context (Work=“Bible”).content/vyasa.tomloverrides/adds context.content/vol1/vyasa.tomladdsvolume="1".
- Output: The compiler merges these contexts down the tree so every file has a complete view of its metadata.
Initial Concept
Section titled “Initial Concept”- Single folder of Text files.
- Sidecars as ad-hoc ancillary files.