Data model

How Sonaloop stores everything as JSON in one graph.

Sonaloop stores everything as JSON in a graph. Three layers explain the format — and each concept shows its concrete schema when you open it.

Three layers

1
Content — five primitives

Every piece of content in every artefact is one of five: Statement · Finding · Prompt · Ref · Stance. One renderer per primitive — so the "same thing" looks the same everywhere.

2
Graph — nodes & edges

Every artefact (persona, council, report, prototype, note, section) is a Node with {id, kind, title, project_id, created_at}. Typed Edges wire them together (based_on, feeds_into, refines, answers).

3
Memory — time-indexed

Persona memory lives in its own dated records (experiences, daily summaries, pain points), so recall and time-travel work.

The five primitives

Statement
A persona's utterance: text, stance, refs. Unifies council turns, report voices and prototype reactions.
{ "persona_id": "persona_…",
  "text": "…markdown, in the persona's voice…",
  "stance": { "value": 1, "label": "conditional" },   // optional
  "about":  { "kind": "prompt", "id": "q0" },         // what it responds to
  "refs":   [ { "kind": "memory", "text": "missed a deadline in March" } ] }
Finding
An analysis item: a key problem, recommendation or open question — with an optional score and refs.
{ "text": "…markdown…",
  "kind": "summary|key_problem|recommendation|open_question|risk|cluster|segment",
  "score": { "effort": 2, "value": 5 },   // optional
  "refs":  [ { "kind": "council", "id": "council_…" } ] }
Prompt
The thing posed: a question, a proposal, a goal or a focus.
{ "text": "…markdown…", "kind": "question|proposal|goal|focus|hypothesis", "id": "q0" }
Ref
A grounding pointer to a memory, a council, a prototype state or a quote.
{ "kind": "memory|council|synthesis|prototype_state|persona|external",
  "id": "council_…",      // when it points at a stored record
  "text": "…",            // when it is a free observed-state string
  "quote": "…" }          // optional supporting quote
Stance
One positivity scale (−2 oppose … +2 support). Unifies stance, sentiment and votes.
{ "value": -2, "label": "oppose" }
// −2 oppose · −1 skeptical · 0 neutral · +1 conditional · +2 support

Full details & migration path: spec/unified-artifact-schema.md.

open
New here? Take the 60-second tour.

Feedback

Sent along, transparently: Page · Version 0.2.0

Or open a GitHub issue ↗