Closure AoharuCat
winget install --id=AoharuCat.Closure -e 📌 This is Closure — a fork of OrisonSpace (Apache-2.0). On top of OrisonSpace's local-first AI writing IDE, Closure adds its narrative operating system layer: structured state machines (CognitionGraph / desire vectors / world entries / information-gap state machines / narrative dependency graphs), a structured knowledge base with hybrid retrieval (a deterministic pure-code core), and original modules such as information-gap control, emotion loops, the desire engine, theme gravity fields, and ripple propagation. Closure as a whole is released under AGPL-3.0-or-later; code derived from OrisonSpace retains Apache-2.0. For attribution and provenance, see NOTICE. Closure is an open-source, local-first AI novel-writing IDE for web-novel and long-form fiction authors, bringing outlines, chapters, characters, and worldbuilding asset cards into one workspace. Its principle is "you lead the creativity; the AI writes and self-checks": AI generation, continuation, polishing, review, and controlled edits, connected to any OpenAI-compatible model — with all creative data kept on your own computer. Windows is the priority platform; macOS / Linux are inherited from the upstream architecture. Closure is open source under AGPL-3.0-or-later (code derived from OrisonSpace retains Apache-2.0). Feature Highlights The Closure Layer: Narrative Engineering On top of OrisonSpace's writing-IDE base, Closure rebuilt the generation pipeline around "letting the AI manipulate information gaps, emotion, and desire like a human author": - Multi-thread narrative structure — one scene graph manages the story skeleton; multiple storylines advance in parallel and interlock - Structure workbench — a single structure page overviewing the whole book: causal skeleton and arrangement workbench, two linked zones; the chapter axis is banded by volume and a minimap supports long-form navigation; emotion and pacing curves can be toggled on as overlays over the structure graph (foreshadowing overlay planned); isomorphic lockstep — select an element in either zone and the associated cards highlight in sync, so tracing one thread across zones takes no flipping back and forth - Information-gap control — records what each character knows and what the reader knows. Review catches holes like "a character said something they couldn't know" or "a planted foreshadow was never revealed," while the author's deliberate concealments and delays are not false-flagged - World-event system — after each chapter is written, five kinds of changes (physical, cognitive, emotional, relational, factional) are extracted from the prose and merged into world-state snapshots that advance with the plot. The key is that the ledgers come in two layers: factual truth and what the reader knows right now are recorded separately — the gap between them is your foreshadow inventory; what should have been planted but wasn't, what should have been revealed but wasn't, the system can see. When a later chapter starts, who knows what right now and where each relationship stands enters the writer's context automatically - Engineered emotion loop — set the target emotion for a scene before writing it; once written, automatically check whether the emotion actually landed, and bounce it back for revision if it didn't - Write-chapter chain — the full flow of writing one chapter: intent is dialogued, the director checks settings, context is assembled, the writer drafts, a checkpoint pauses for your review, review and revision run, and after the chapter lands it comes back to report. Every step pauses for a human; the steering wheel stays in your hands - Two-layer orchestration architecture — the strategic layer is the commander in the dialog (you in the loop, redirecting anytime); the tactical layer is a node chain with explicit contracts (dependencies never dropped, artifact flow never relies on prompts implicitly carrying it); chain segments bring only summaries back to the dialog — internal process never eats your context; checkpoints can pause, resume, and rerun after edits - Two-phase writer drafting — the writer doesn't generate in one breath: it first self-checks for context gaps, lists an investigation checklist, and only starts writing after the researcher verifies every item. When the context budget runs out, pruning follows a degradation ladder — the story skeleton, the full-book table of contents, and queryable pointers are never pruned - Web research — check sources before writing: multiple search providers configurable (Tavily / Bocha / AnySearch; keys stored locally only). The researcher searches, the director verifies — anything contradicting existing settings gets bounced back for you to clarify, and research results settle into the workbench as cards. Useful for checking canon when writing fanfic, or industry details when writing urban fiction - Meaning-preserving revision — every AI edit is presented as a word-level diff: what changed, and whether the original meaning drifted — verifiable at a glance - Never lost at a million words — chapter summaries, integrity checks, and mention ledgers; even at a million words, it still remembers who said what in which chapter - Ripple propagation — changed a setting in chapter 3? The system traces forward along the narrative dependency graph and automatically marks which downstream chapters and threads are affected and what kind of impact it is — the bill for changing settings never goes unrecorded - De-AI-flavor — embeds the llmlint static engine: hundreds of rules scanning purely locally at zero cost to catch "AI tone"; paired with the Lint panel and the revision loop to clear findings one by one - Style cards — paste a passage from a novel you admire, and a sub-agent analyzes it into a style card stored in the project (with the original excerpt); the writer, refiner, and planner all reference it afterwards. Without a style card, everything works as usual - Craft knowledge base (craft KB) — a built-in knowledge base of writing methodology: craft entries, source anchoring, grouping by topic; the writer, director, and reviewer can all consult and cite it; seed content ships with the app, and you can extend it yourself - Two-layer review — free pure-code rules run first; drafts with zero findings pass straight through; only flagged drafts go to the model for detailed review (six groups: consistency, narrative features, promise fulfillment, cognitive state, emotion landing, setting contracts). Two disciplines: every finding must cite the original text — no evidence, no opinion; and false positives are preferred over misses — the review layer is never allowed a "fake pass" - Tiered model routing — planning, prose writing, review, research, style analysis, and every other stage can each be assigned a different model and tier: the strongest model for prose, cheap models for chores; each stage's thinking depth (reasoning effort) is also individually adjustable — cost goes where it counts - Creative decision records — major creative choices are archived like architecture decision records (why it was decided this way, what the alternatives were); review uses them to check whether later chapters betray the promises you made Base Capabilities (Inherited from OrisonSpace) - Full-pipeline creation workspace — outlines, chapters, and character & worldbuilding asset cards in one workspace - Local-first — works are saved as plain files on your own computer; no account needed - Image generation + editing — text-to-image, image editing (brush/mask/crop); results go straight into the library - Version control — isomorphic-git-based commit nodes, branches, diffs, and timeline - IDE-style editor — split view, minimap, multi-tab, command palette - Model freedom — connect any OpenAI-compatible endpoint; keys stored encrypted, locally only Experimental features: Agent Orchestration (multi-step pipelines), Auto Mode (auto-advance), and video generation are currently experimental and not guaranteed to be stable.