cgcardona / muse public
docs main #56 / 100

docs: complete type-contracts.md refresh for v0.2.0 (#78)

Brings the type reference fully up to date with the codebase:

New sections: - CRDT Primitive Types (VectorClock, LWWRegister, ORSet, RGA, AWMap, GCounter) — class APIs, wire-format TypedDicts, lattice contracts - Op Log Types (OpEntry, OpLogCheckpoint, OpLog) - Diff Algorithm Types (SequenceInput/SetInput/TensorInput/MapInput/ TreeInput, EditStep, EditKind, TreeNode, DiffInput) - Code Plugin Types (SymbolKind, SymbolRecord, SymbolTree, LanguageAdapter, LangSpec, PythonAdapter, TreeSitterAdapter)

Updated sections: - DomainOp: added MutateOp (with FieldMutation) — five leaf variants now documented; PatchOp recursion made explicit - StructuredDelta: sem_ver_bump and breaking_changes fields added; correct total=False noted - MergeResult: op_log and conflict_records fields added; ConflictRecord documented - CommitRecord/CommitDict: all 20 fields documented including structured_delta, sem_ver_bump, agent provenance, format_version 1–5 evolution table, reviewed_by (ORSet), test_runs (GCounter) - DomainSchema/ElementSchema: individual schema TypedDicts each get their own field table; MapSchema recursive value_schema documented - MIDI: INTERNAL_DIMS corrected to 21 dimensions with full list; NON_INDEPENDENT_DIMS added; DIM_ALIAS documented - MuseConfig: domain: dict[str, str] section added

Mermaid diagrams: 11 total (was 9), all updated: 1 Domain Protocol and Plugin Contract (updated) 2 DomainOp Discriminated Union (new — shows FieldMutation and recursion) 3 Domain Schema and Diff Input Pairing (new — ElementSchema ↔ DiffInput) 4 CRDT Primitive Lattice (new — all 5 CRDTs) 5 Store Wire-Format and In-Memory Dataclasses (updated) 6 Op Log Types (new) 7 Merge Engine State (updated — adds MergeOpsResult) 8 Attributes and MIDI Dimension Merge (updated) 9 Code Plugin Types (new) 10 Configuration, Import, Stash, and Errors (consolidated) 11 Full Entity Dependency Overview (updated)

Co-authored-by: Gabriel Cardona <gabriel@tellurstori.com>

G Gabriel Cardona <cgcardona@gmail.com> · 1d ago Mar 19, 2026 · e831ac24 · parent 119290fc
oldest
newest 45%

Snapshot Diff

211 files in tree
~1

Comments

0

No comments yet. Be the first to start the discussion.