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. It does not modify the original file — it produces a separate, persistent artifact that can be re-run whenever the source changes.
source file
│
▼
parser
│
▼
data model
│
▼
view component
│
▼
rendered viewThe view updates by re-running the parser against the current file, not by editing anything in place. This is the core invariant of the spec: the source file 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.- A parser module — transforms normalized input into a 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
.mviews/
└── sales-dashboard/
├── 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.json
├── parser.ts
├── Dashboard.tsx
└── resources/See Directory Layout for the full discovery convention.
Design invariants
These hold regardless of implementation:
- The MView never modifies the source file.
- 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 parser, not the 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.