First story · about 10 minutes
Start with a story you can inspect
TypeApe keeps prose, structure, validation, and Agent work in one local project. This guide takes you from a new project to a story you can read and prove.
- 1Write source
- 2Validate paths
- 3Read the result
text: { The signal answers from beneath the garden. };1. Create a project
Choose New project, give the story a name, then choose a story type:
- Linear story is one ordered path from an opening to one ending. Use it for fiction, scripts, and narrative drafts that should not branch.
- CYOA supports choices, multiple endings, and a finite set of remembered consequences. Use it when the reader changes what happens.
The story type determines which structures you can use. Linear story follows one route and cannot contain choices or State. CYOA supports branching, but every possible route must remain valid.
2. Meet the Lattice language
Story files end in .la. A small Linear story looks like this:
story main (
title: "Signal Garden",
language: "en",
format: novel,
entry: opening
);
scene garden (title: "The garden") {
block opening (title: "The signal", purpose: setup) {
text: { A light wakes beneath the garden. };
next -> answer;
}
block answer (title: "The answer", purpose: resolution) {
text: { Mara follows the light home. };
end;
}
}Four ideas explain most of the source:
- A declaration gives a story, entity, scene, or block a stable ID.
- Metadata in parentheses describes it without replacing that identity.
- Prose goes inside
{ ... }, so punctuation and line breaks remain natural. - Every Block ends with an explicit flow terminator such as
next,choice, orend.
Read the Lattice language guide for imports, dialogue, choices, finite State, Pools, Modules, and complete examples.
3. Validate before you read
Open Validate after a coherent edit. TypeApe checks the source in layers:
- Syntax and imports: can every
.lafile be read safely? - Structure and references: do IDs, owners, targets, and metadata agree?
- Story logic: can every relevant path reach a valid ending without a soft lock?
Fix the earliest error first; later messages may be consequences. Warnings do not automatically block the story, but they deserve a deliberate craft decision.
Declaration order makes a file readable; it does not create story order.
entry,next,choice,enter,complete, andenddefine what readers can actually reach.
4. Experience the latest source
Open Story to begin at the configured entry. Linear stories continue through validated links. CYOA stories present choices and eligible Modules from the current finite State.
Preview position is temporary. Leaving Story or reopening the project starts a fresh read without changing your .la files.
While reading, select exact prose or activate the passage marker to leave a revision note. Save every note, then choose Send notes to Agent to start a focused revision conversation.
5. Ask Agent for the right kind of work
Use ordinary Act requests for direct, bounded changes:
Give Mara a more hesitant voice in the opening, preserve the route structure, then validate the story.
Turn on Plan when the change crosses several files, introduces new branches or State, or needs a decision before editing. Plan mode inspects the project without writing, prepares an ordered checklist, and opens the plan for your review.
Continue with Work with Agent to learn plan review, annotations, steering, and follow-ups.
