Skip to content

Versioned export/import: snapshot and restore the screenplay bible #42

@renaudcepre

Description

@renaudcepre

Context

felix-export already produces a full JSON dump of the graph (characters, locations, scenes, timeline, relations, fragments, beats, issues). But there's no way to re-import an export, and no versioning scheme.

Screenwriters iterate in drafts — they need to snapshot a state, explore alternatives, and sometimes roll back. A semver-like scheme on the bible itself (not the code) would enable this.

Proposed features

1. Versioned export format

  • Add felix_version (tool version) and bible_version (user-defined, semver) to the export JSON
  • Schema: {"felix_version": "0.3.0", "bible_version": "1.0.0", "exported_at": "...", "characters": [...], ...}
  • CLI: felix-export --version 1.0.0 (optional, defaults to auto-increment or timestamp)

2. Re-import from export

  • New CLI command or API endpoint: restore a full graph state from an export JSON
  • Wipes current graph and rebuilds from the export (with confirmation)
  • Or: merge mode (upsert, don't delete existing data not in the export)

3. Version history

  • Store exports in exports/ with version in filename: bible_v1.0.0_20260325.json
  • List available versions: felix versions
  • Diff between versions (character added/removed, relation changed, etc.)

What exists today

  • felix-export CLI command → writes JSON to exports/
  • GET /api/export API endpoint → returns JSON
  • Export format covers: characters, locations, scenes, timeline_events, character_events, character_relations, character_fragments, narrative_beats, issues

What's missing

  • No import-from-JSON capability
  • No version field in exports
  • No diff tooling
  • No rollback mechanism

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions