King Klown Logo
King Klown& KOA

Outline Grid CSV Round-Trip

Architectural Lineage (Credits):
SwarmCraft is an architectural fork and deep rewrite of the multi-agent swarm engine created by Mojomast in mojomast/swarmussy.
SwarmCraft’s deterministic “Architect-style” layering is also derived from the meta-structure of Abstract Wiki Architect (AWA).
Full details: Credits & Lineage

POWERED BY GROK

SwarmCraft supports a human-friendly grid editor for the outline and a CSV round-trip workflow.

Goal:

This page specifies how outline.json maps to a grid and how CSV import/export should behave.


1) Grid Model

1.1 What the grid shows

Source of truth:

1.2 What is NOT in the grid (by default)


2) Canonical Mapping: Outline → Grid

Given:

Cell mapping:


cell(thread, part_id) = outline.parts[part_id].beats[thread] (string or empty)

If the key is missing, treat it as empty when projecting:


3) CSV Export Format (Beats Grid)

3.1 Shape

The beats-only CSV is a projection of the grid (threads × parts).

Row 1 (human labels):

Row 2 (machine IDs):

This allows the CSV to remain stable even if “Part 3” is moved into a different chapter.

3.3 Example

,Part 1,Part 2,Part 3
part_id,P001,P002,P003
Plot,"The World in Turmoil...","The Revelation...","A Seed of Hope..."
Character Development,"King Klown feels helpless...","Insight sparks vision...","Cautious optimism..."
Conflict,"Global crisis escalates...","Self-doubt...","Opposition begins..."

4) CSV Import Rules (Beats Grid)

4.1 Primary key: part_id row

Import SHOULD use the part_id row as the canonical mapping.

4.2 Thread name matching

Rows are matched by thread name (first column).

4.3 Lock compliance (required)

Importer MUST respect outline locks:

Recommended behavior:


5) Handling Template Changes (Thread Set Changes)

If the user changes template (or template version):

Recommended: do not silently delete beats.


6) Parts/Chapter Changes (Column Reflow)

If the user changes parts_per_chapter:

Rule:


7) Optional: Contract CSV Export

Beats CSV is intentionally simple. If you want contract editing in CSV, use a second file:

outline_contract.csv (recommended)

Shape:

part_id,chapter_id,title,goal,obstacle,turn,outcome
P001,CH01,Part 1,"...","...","...","..."

Contract import MUST respect locks.contract.


8) Relationship to Writing and Orchestration

The grid is a scaffold. The engine uses it slice-by-slice:

See: