How the AI stays on track
The agent harness - the routing ladder, self-correcting errors, right-sized tool sets, and the guardrails that keep the assistant honest.
How the AI stays on track
Anyone who has used an AI agent has watched one get stuck: it calls the same tool over and over, guesses at names that don't exist, burns a minute of your time, then confidently reports something it never actually did. That failure mode isn't the model being dumb - it's the harness around the model being naive.
NVS's assistant runs inside a purpose-built harness. This page explains what it does, so you know what you can trust - and what the assistant is structurally prevented from doing. It's also why the chat works well even on small, fast models: the harness does the discipline, so the model doesn't have to.
The routing ladder
Every request the assistant handles moves down the same four rungs:
- Find -
searchis the only authority on whether something exists. The assistant is forbidden from concluding "you don't have a scene about X" just because X didn't appear in a long listing - big projects return partial listings, and partial is not proof. - Read - each kind of question has a purpose-built reader (cast, threads, lore, arcs, plot problems, your corkboard plans). The assistant is steered to the reader whose name matches the noun, not to raw database queries.
- Act - the assistant may only act on names and ids that a previous tool result actually handed it. It never invents a file path. Bulk edits are one call on a folder, never a fragile per-scene loop.
- Verify - after an action, the matching deterministic check runs: a reformat is verified by the format oracle, graph edits by re-reading the graph. The assistant cites what it verified - "done" without evidence doesn't count.
Errors that teach
When the assistant gets a name wrong, the error it receives isn't a dead end - it's a correction it can apply directly:
{
"error": "no page at \"Ending Notes\"",
"valid": ["05-ending-note.md"],
"next": "queuePageEdit({ path: \"05-ending-note.md\", ... })"
}Every recoverable failure comes back with the thing that didn't match, the nearest real alternatives from your actual project, and a literal retry. A wrong guess costs one step, not a spiral. This is also the honest-failure principle: nothing is ever silently truncated or silently dropped - a result that had to be cut says so, and says what to do about it.
Right-sized tool sets
Different AI surfaces see different tool sets - a model can't misuse a tool it was never offered:
| Surface | Tools it sees | Why |
|---|---|---|
| In-app chat | A tight core: find, read, edit-for-review, verify | Works reliably even on small/fast models |
| Claude plugin (skills) | The full surface, incl. analysis internals | A stronger agent under explicit skill contracts |
| Sandbox | Capture and render only | Visuals never touch your live writing window |
The in-app chat deliberately does not get raw SQL, analysis internals, or restructuring tools. Those live in the Claude plugin lane, where a stronger model works under explicit instructions.
Guardrails
Four runtime guards sit under everything above - they exist for the day the model misbehaves anyway:
- Repeat guard - the exact same call twice is intercepted; the assistant is told to use the result it already has.
- Stall breaker - failing calls accumulate a counter that only a real, successful action resets. At three, the assistant is ordered to stop gathering and act on what it has; at six, the run ends with a plain-language note instead of a silent spin. You never watch an endless loop of red tool calls.
- Crash guard - a tool that throws becomes a readable error the assistant can recover from, instead of killing the whole conversation turn.
- Honest truncation - oversized results keep their beginning and end (the end is where totals and errors live) and declare exactly how much was omitted.
No silent substitutions
A subtle failure we specifically engineered against: you ask for an edit on "the Afterword scenes", and an agent quietly picks some other folder that happens to exist, edits it, and reports success. In NVS:
- A name that matches a folder plus leftover words ("Event Quests Afterword ") is refused rather than silently widened to the bigger folder - the assistant is pushed to search for what you actually named.
- When a loose name is fuzzily resolved, the result echoes what it resolved to, and the assistant is required to tell you - "I queued edits on X" where X is the real folder, not a paraphrase of your request.
The last gate is you
Everything above reduces mistakes. The review model makes the remaining ones cheap:
- Edits are proposals. Chat and
/agentqueue Tasks - you see the change, then apply it. One undo reverts an applied task. - New pages are labeled. AI-created pages are visibly stamped as generated, for you to review.
- Judgment calls stay yours. Canon status, dismissing a coherence finding, merging duplicates, restructuring folders - the assistant acts on these only when you explicitly ask, never as a side effect.
- There is no delete tool. Removing content is a human action, full stop.
The net effect: the assistant can be fast, cheap, and occasionally wrong - and your manuscript still can't be damaged by it.