Overview
What a Mutated View is and the model it's built on.
Overview
A Mutated View (MView) is a re-executable, alternate representation of a file or a selection of files within a directory. It does not modify the original source — it produces a separate, persistent artifact that can be re-run whenever the source changes.
original source file
│
▼
Source Adapter
│
▼
normalized input
│
▼
MView parser
│
▼
data model
│
▼
component / Renderer
│
▼
rendered viewThe view updates by reading the original source again, running the Source Adapter and parser, and rendering the result. A persisted normalized representation is never the source of truth. For a directory, the runtime reads only the files declared in the manifest. This is the core invariant of the spec: the source is read-only from the MView's perspective.
What an MView is made of
An MView is a small bundle of files:
mview.json— the manifest. Identity, versioning, capabilities required, and where to find the parser and component. See the Schema Reference.- One or more Source Adapters — interpret the original source file and transform it into normalized input. See Capabilities.
- A parser module — transforms normalized input into a view-specific data model. See the Parser Contract.
- A view component — renders that data model with the renderer declared by
runtime(for example React, Solid, HTML, PDF, or a custom renderer). See the Component Contract. resources/(optional) — static assets the component needs (CSS, icons, sample data).
Recommended layout
Two placements are valid. Colocated, next to the source file:
sales.csv
sales-dashboard.mview/
├── mview.json
├── parser.ts
├── Dashboard.tsx
└── resources/Or centralized in a project-level folder, with source.path pointing back at the file:
.mviews/
└── sales-dashboard.mview/
├── mview.json
├── parser.ts
├── Dashboard.tsx
└── resources/An MView may also point to a directory, but its manifest must freeze an explicit file selection through source.files. The directory does not grant general access or automatically include all its contents:
reports/
├── january.csv
├── february.csv
└── notes.md
reports-summary.mview/
├── mview.json
├── parser.ts
└── Dashboard.tsxSee Directory Layout for the full discovery convention.
Design invariants
These hold regardless of implementation:
- The MView never modifies the source file or files.
- The runtime always starts from the original source file; a persisted normalized representation is never the source of truth.
- A Source Adapter transforms the physical format into normalized input and does not know the visual data model of a specific MView.
- The parser is a pure transform: same input in, same data model out. No filesystem access, no absolute paths.
- The component only renders the data model it's given. It does not read files itself.
- The runtime — not the adapter, parser, or component — owns file I/O.
- Manifests are validated against the published JSON Schema before being loaded or saved.
Next
- Schema Reference — every field in
mview.json, explained. - Create an MView with an AI agent — a self-contained prompt for building one.
