evo-dialogue-parser
Parses dialogue script text into intermediate section structures using regex, then builds a validated JSON graph schema with typed nodes and edges. Handles section headers, speaker lines, numbered cho
SKILL.mdtasks-evolved/dialogue-parser/environment/skills/evo-dialogue-parser/SKILL.md
GitHubDialogue Parser
This skill parses raw dialogue script text files into a structured JSON graph.
Parsing Rules
- Section headers:
[NodeName]on their own line - Speaker lines:
Speaker: text -> Target(target optional) - Choice lines:
N. [OptionalTag] Choice text -> Target - Node type is "choice" if section has numbered choices, else "line"
Output Schema
{"nodes": [{"id": str, "text": str, "speaker": str, "type": str}], "edges": [{"from": str, "to": str, "text": str}]}
Key Functions
parse_dialogue_text(script_text)- Parse raw text into intermediate sectionsbuild_json_graph(sections)- Convert sections to graph schemavalidate_graph(graph)- Validate reachability and edge targetsparse_script(script_text)- End-to-end: parse, build, validate