Inspiration

AI writing tools draft scenes fast, but they forget what they just established — a glass that was empty is suddenly full, a locked door is casually opened. I wanted a simple, trustworthy way to catch these continuity contradictions without sending my draft to a cloud service or another AI to judge.

What it does

Canon Lock is a fixed-rule continuity checker for AI-drafted scenes. You define "locks" — things that must stay true (like "the glass is empty") — along with phrases that would break them. The checker reviews every line of a scene and returns a verdict: BLOCK, REVIEW, or ALLOW, each with quoted evidence from the text.

Features

  • Add, edit, and delete custom locks
  • Built-in demo locks to try instantly
  • Negation logic (so "not empty" and "isn't empty" are understood)
  • Evidence highlighting with quoted lines
  • Verdict grouping for quick scanning
  • Stale-state warnings when a lock's context may have changed
  • Suggest locks: proposes lock candidates from pasted scenes

How I built it

Canon Lock is a single self-contained HTML file with JavaScript and CSS. There are no external requests and no dependencies — it works fully offline, so nothing you paste ever leaves your machine. Rule matching, negation handling, verdict grouping, and the lock-suggestion heuristic are all implemented in plain vanilla JS.

Challenges

The trickiest part was negation logic: distinguishing "the glass is empty" from "the glass is not empty" and from "the glass is no longer empty" requires careful phrase matching rather than naive keyword search. I also tuned the REVIEW vs. BLOCK thresholds so ambiguous lines get flagged for human eyes instead of being silently blocked or allowed.

What I learned

I learned that deterministic, rule-based checks can be a strong complement to AI generation — not everything needs another model call. Keeping the whole tool in one offline file forced clean, dependency-free design.

Built With

Share this project:

Updates

Submission history