Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AIScientists Dev WorldSeed build skeleton

From Leeroopedia
Knowledge Sources
Domains CLI, Presentation
Last Updated 2026-10-26 18:00 GMT

Overview

Concrete skeleton builder for the `worldseed present-skeleton` CLI command, assembling a PilotDataset-shaped JSON from workspace contents and event streams, provided by the WorldSeed library.

Description

The build_skeleton function reads a workspace folder, its `manifest.json`, `scenario.yaml`, and `story.md`, plus the matching `~/.worldseed/runs/{run_id}/` event stream. It fills mechanical fields (eyebrow, title, subtitle, meta, panel, rules, branchMap) from workspace contents, while narrative fields (verdict, story, moments, branches, confidence) contain literal `TODO:` placeholders for MAIN/Codex to overwrite. Branches are derived from agent lane JSONL rows grouped by artifact ID. Event moments are extracted from the event stream (action/wakeup/whisper/register kinds). The graph shape is `wide` for ≤4 branches, `mixed` otherwise.

Usage

Use the `worldseed present-skeleton` CLI command to generate a draft `present-skeleton.json` in a workspace, which is then filled in by the agent before shipping a run's pilot presentation.

Code Reference

Source Location

  • Repository: WorldSeed
  • File: src/worldseed/cli/_present.py

Signature

def build_skeleton(workspace: Path) -> dict[str, Any]:
    """Build a PilotDataset-shaped skeleton from workspace contents."""

def run(args: argparse.Namespace) -> None:
    """CLI entry: writes present-skeleton.json to the workspace."""

Import

from worldseed.cli._present import build_skeleton

I/O Contract

Inputs

Name Type Required Description
workspace Path Yes Workspace directory with manifest.json, scenario.yaml, story.md

Outputs

Name Type Description
build_skeleton returns dict[str, Any] PilotDataset shape with mechanical fields filled, narrative fields as TODO

Usage Examples

# CLI usage
worldseed present-skeleton ./my_workspace
# → writes ./my_workspace/present-skeleton.json
from pathlib import Path
from worldseed.cli._present import build_skeleton

skeleton = build_skeleton(Path("./my_workspace"))
# skeleton = {"eyebrow": "TEAHOUSE · 2026-04-26", "title": "...", "branches": [...], ...}

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment