Skip to main content

Morphir v4 Design

This section contains the design documents for Morphir v4, organized into three primary themes.

Themes​

IR v4​

The intermediate representation format and data model.

Scope: Types, values, modules, packages, distributions, naming conventions, decorations, serialization formats.

Key Documents:


Document Tree Protocol​

The specification for the Document Tree IR layout and the JSON-RPC protocol.

Scope: Document Tree layout, Granular vs Hybrid modules, JSON-RPC 2.0 API.

Key Documents:


Morphir Daemon​

The long-running service for workspace management, builds, and IDE integration.

Scope: Workspace lifecycle, project management, dependency resolution, incremental builds, file watching, package publishing, JSON-RPC protocol.

Key Documents:


Extensions​

The MEP architecture for adding frontends, backends, validators, and transforms to Morphir.

Scope: Process and WASM runtimes, typed MEP capabilities, verified installation, and custom code generators.

Key Documents:


Status Tracking​

Each design document includes tracking metadata:

StatusDescription
DraftInitial design, under active development
ReviewDesign complete, awaiting review
ApprovedReady for implementation
POCProof of concept exists
PartialPartially implemented
CompleteFully implemented

Tracking Frontmatter​

Documents use this frontmatter format for tracking:

---
title: Document Title
status: draft
tracking:
beads: [morphir-xxx]
github_issues: [123]
github_discussions: [45]
implementation: "pkg/path/to/code"
---

Quick Reference​

Active GitHub Issues​

IssueThemeDescription
#398IRVFS core types
#392DaemonPipeline core types
#399ExtensionsTask execution engine
#401DaemonCaching and incremental builds
#400DaemonAnalyzer framework

Active Beads Issues​

IssueThemeDescription
morphir-om0IRCore decoration infrastructure
morphir-l75DaemonCaching and incremental builds
morphir-go-772ExtensionsTask execution engine
morphir-8fxIRVFS error types
morphir-369DaemonSQLite-backed VFS backend
DiscussionThemeTopic
#55IRDistributions, versioning, migrations
#88DaemonPackage manager
#52IRUnique identifiers in IR
#53IRType encoding

Implementation Priorities​

Phase 1: Foundation (Active)​

  1. IR v4 Core - Types, values, naming
  2. Decorations - Metadata infrastructure
  3. Pipeline - Build system foundation

Phase 2: Daemon (Planned)​

  1. Workspace - Multi-project support
  2. Dependencies - Path and repository resolution
  3. Builds - Incremental compilation

Phase 3: Extensions (not released)​

  1. MEP runtimes - Process and Extism-backed WASM adapters
  2. Verified distribution - Local index, lock, catalog, and store
  3. Tasks - Separate automation and hook design