World Format

Overview

World is a human-editable text format for describing the complete state of a small system.

It is designed for:

  • single-user or low-scale applications
  • textarea-based editing
  • direct conversion to a JavaScript object
  • iterative human–AI workflows (AI generates, humans edit, AI re-reads)

World is not a database schema, not TOML, not YAML, and not INI —
but it intentionally borrows familiar surface syntax from all three.

The primary design goal is:

Edit the world itself, not CRUD forms.


Core Concepts

1. The Document Represents the World

A World document represents a snapshot of the entire state.

The system does not expose explicit Create / Update / Delete operations.
State changes are expressed by producing a new version of the document,
whether edited by a human or generated by a program.


Syntax

2. Node Declaration

A node is declared using a single-bracket absolute path.

Example:

[task1]
  • Brackets declare a node
  • The path uniquely identifies its position in the hierarchy
  • Paths are separated by /
  • Paths are absolute, not relative

Example:

[projectA/task1/subtask1]

3. Attributes

Attributes are assigned using =.

Escaped example:

name = "Write report"
done = false
priority = 2

Rules:

  • Left side is a key
  • Right side is a value
  • = always means assignment
  • No implicit typing beyond basic primitives

Supported value types:

  • string
  • number
  • boolean

4. Hierarchy

Hierarchy is expressed only through paths.

Escaped example:

[task1]
name = "Task 1"

[task1/sub1]
name = "Subtask 1"
done = false

Notes:

  • Parent–child relationships are determined solely by the path
  • Document order does not imply hierarchy

This maps naturally to a tree structure.


5. Arrays (Repetition Rule)

Arrays are created implicitly by repeating the same absolute path.

Escaped example:

[task]
name = "Task A"

[task]
name = "Task B"

This results in:

  • A single node declaration → object
  • Multiple declarations at the same path → array of objects

No special array syntax is required.


6. Hierarchy with Arrays

Hierarchy and arrays compose naturally when paths are explicit.

Escaped example:

[task]
name = "Task A"

[task/sub]
name = "Subtask 1"

[task/sub]
name = "Subtask 2"

Important:

  • [task/sub] is an absolute path
  • It does not inherit meaning from the most recently declared [task]
  • If a parent path resolves to an array, it cannot be used as an intermediate node and is considered invalid

Semantics

7. Interpretation Model

  • The document is treated as a set of node declarations
  • Each declaration defines a node at its absolute path
  • Attributes apply only to the node declared by that path
  • No implicit parent, previous-node, or document-order context is used
  • Repeated declarations at the same path accumulate into arrays

8. JavaScript Object Mapping

The format is designed to map directly to a JavaScript object.

Conceptual example (non-executable):

{
  task: {
    name: "Task A",
    sub: [
      { name: "Subtask 1" },
      { name: "Subtask 2" }
    ]
  }
}

Design Principles

9. Minimal Syntax

  • No indentation-based meaning
  • No colons for structure
  • No implicit context
  • No explicit CRUD operations
  • No schema required at write time

10. Human-First Editing

  • Works in a plain textarea
  • Mobile-friendly
  • Easy to scan
  • Easy to diff

Errors are structural, not semantic.


Non-Goals

World intentionally does NOT aim to provide:

  • Database-level constraints
  • Query language
  • Referential integrity
  • Type inference
  • Partial updates

Those belong to other layers.


Summary

World is a format for people who:

  • dislike forms
  • trust text
  • want structure without ceremony
  • prefer late decisions over early schemas

You do not edit records.
You rewrite the world.