Open-source project
sigpanic/goink avatar
sigpanic/goink

goink: a novel-writing agent that cannot forget your protagonist

Goink is a desktop AI novel-writing assistant with conversational writing, automatic state tracking, and local semantic search. Cross-platform and works out of the box. An AI agent novel generator.

520 stars85 forksGoAGPL-3.0

At a glance

What is it?
A Go desktop application where a ReAct loop with 31 tools maintains structured story state instead of prose history: character relationships as a directed graph, foreshadowing with recall targets, arcs as node chains, locations as a map, and what the reader already knows. Maintenance is forced three ways, every edit is a diff you approve, and the build ships its own Git.
Who is it for?
goink is for someone writing a long novel with an assistant and losing the thread, because its answer is to move state out of the conversation and into structured records the agent has to update. The three enforcement layers, the diff-before-write rule and the local semantic index are the parts that make that work rather than merely be claimed.
Can I use it commercially?
Yes, with strict conditions. AGPL-3.0 is a network copyleft licence: if people use a modified version over a network, for example as a hosted service, you must offer them its source code under the same licence.
Is it still maintained?
Yes. The repository last received commits 1 day ago.
What is it written in?
Mainly Go, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • sigpanic/goink520 ★ · +179
Star history
Repository2026-09-132026-11-15
sigpanic/goink341520

179 Stars in the last 63 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

The pitch is that the assistant forgets, so the system remembers

The opening paragraph describes a specific failure. Anyone who has used a general assistant to write a long novel knows that by chapter five it has forgotten the protagonist's name, that by chapter thirty you are manually paging back to find a line of foreshadowing, and that after finishing a chapter you have to remind the assistant to update character state and check arc progress.

Goink's answer is that the state should not live in the conversation. It is described as a desktop writing system with structured memory: character profiles, foreshadowing state, arc progress, location relationships and reader knowledge, which the system keeps and the agent queries, edits and maintains itself.

The comparison table makes the difference concrete on seven rows. Creative information is re-explained every conversation in a general assistant and tracked as a structured chain here. Editing the text outputs text directly, with no record of what changed, against a diff preview with line-by-line comparison that writes only after you confirm. Looking back through earlier text is manual searching against a local semantic search engine, where one sentence about a pendant finds every relevant paragraph. Maintenance after writing is neglected unless reminded, against automatic triggers for character updates, foreshadowing recall, arc advancement and reader knowledge refresh.

The environment row makes the pitch concrete too: the general path often needs Python and a GPU, this one is a single installer.

Diff before write, Git after

Two mechanisms sit between the agent and your manuscript.

The first is the approval flow. The assistant never edits the prose directly. Every edit produces a diff first, and it is written only after you approve. You can approve, reject, or send feedback and have it revise. There is also a switch into an automatic mode for writing several rounds without stopping.

For a tool whose whole premise is that it will rewrite your text over dozens of sessions, that gate is the difference between a collaborator and a hazard. A diff is also the cheapest possible review: you read the change rather than reconstructing what the assistant intended.

The second is version history, and it is built in rather than delegated to your editor. There is Git embedded in the application, every conversation commits automatically, and you can revert to any state at any time.

Shipping Git matters more than it sounds. A novel is a directory of files edited by a program you did not write, and the recovery path for that is version control. Doing it automatically means the history exists whether or not you remember to make a commit.

The application also re-reads a file and compares before writing, which is the other half of the same idea: it avoids overwriting a change you made by hand while it was working.

Maintenance is forced three separate ways

The stated problem is an assistant that forgets to maintain state after finishing a chapter, and the response is three layers of enforcement.

The first is the system prompt. The maintenance procedure is written into the agent's core instructions as a hard requirement, phrased as: after finishing the work, immediately perform state maintenance, and this is not an optional step.

The second is dynamic injection. Once the assistant finishes a long piece of text, the system injects a reminder listing exactly what to check: whether characters have changed, whether foreshadowing that was due has been resolved, whether arc nodes need advancing, and whether reader knowledge needs refreshing. The claim is that the agent cannot forget because it is forced to check item by item.

The third is a review sub-agent you can start. It is a separate agent that reads the chapter from the beginning and compares the chapter content against the system state, writes any problems it finds straight into the conversation, and the main agent corrects on the spot.

Three layers for one behaviour is redundancy rather than elegance, and the readme frames the third as something you start if you are not yet satisfied with the first two. The design assumption throughout is that an assistant asked to remember will eventually forget, so the reminder has to arrive from outside the conversation.

Thirty-one tools and a ReAct loop, not a pipeline

The agent layer is described precisely enough to be worth quoting: a self-built ReAct loop in Go, with server-sent event streaming, 31 function-calling tools, and nested sub-agents.

The important claim is what the loop is not. It is not a pipeline that hands a finished chapter to the next stage. The agent calls tools inside the current conversation, deciding autonomously which tool to call, with which parameters, and what to do next, until the task is complete: query a character, query a foreshadowing, read or write the text, update state.

That is the difference between an orchestration chain and an agent loop, and it is why the tool count matters. Thirty-one structured tools is a lot of surface, but each one is a capability the agent can reach for rather than a stage it must pass through, and a request that needs two characters and one foreshadowing gets exactly those calls.

Nested sub-agents are what make the review layer possible. A sub-agent that reads the chapter and reports to its parent is not something a single loop does to itself, because the reading is the whole task.

The state model is graphs: relationships, locations, arcs, reader knowledge

Six record types carry the structured state, and four of them are graphs rather than lists.

Characters hold a profile of personality, abilities and background. Relationships between characters are a directed graph with independent records per direction: Zhang San regards Li Si as a master but secretly guards against him, and Li Si respects Zhang San but conceals something, are two separate entries. When a relationship changes the old record is kept, so the evolution can be reviewed rather than overwritten.

Foreshadowing records a target recall chapter and an importance level for each item. Near the recall point you get a reminder, and something overdue and unresolved is flagged as abnormal. Chapter plans are split into three tiers: next chapter, near term and long term.

Arcs are chains of nodes, each tied to a target chapter, and finishing a chapter advances them automatically. A story is expected to carry three to five parallel arcs.

Locations are a graph twice over: hierarchy, such as kingdom, then palace, then hall, and spatial connectivity, where A and B are linked by a mountain road. The agent can be asked for a detail, a sub-location, a connection or the whole map.

Reader knowledge is the one that has no equivalent in a generic assistant: what the reader already knows, which answer they are waiting for, and what they currently believe wrongly, which is how suspense and reversals get timed.

Skills are three layers by three modes, and a markdown file is all it takes

The method layer is a plugin system with a stated capacity: three layers of override by three trigger modes, described as nine strategy dimensions.

The layers resolve by priority, novel over user over builtin, and edits hot-reload immediately with no restart. Builtin skills are packaged read-only and visible to every novel. User skills live in ~/.goink/skills/, are visible to every novel and are editable. Novel skills live in the novel's own skills directory, apply to that novel only and are editable.

The modes govern when a skill applies. An auto skill can be called by the agent, triggered by the user with a slash, and appears in the catalogue. A manual skill is user-triggered only and stays out of the catalogue. An always skill can be called by the agent, triggered by the user, and is injected in full at the start of a session.

Crossing the two gives the built-in catalogue: auto skills cover scene beats, dialogue subtext, pacing control, suspense hooks, character design, revision polish, removing AI flavour and co-creation ideation, while manual ones are review, memory, collect and next. The same three modes at the user level give cross-novel workflows, personal shortcuts and global style rules; at the novel level, the book-specific equivalents.

Creating one is creating a markdown file with YAML frontmatter carrying a name, a description, a category and a mode. There is no code to write, changes take effect immediately, and deletion works the same way. Sharing one is a pull request to a separate skills repository so it reaches every user.

Style distillation turns a sample passage into a skill

One feature deserves its own note, because it answers a question most assistants handle badly.

You paste a sample passage, and the assistant breaks it down along six dimensions: sentence structure, word habits, rhetorical devices, pacing control, narrative distance and atmospheric tone. From that it generates a complete imitation skill.

The distinction the page insists on is extraction versus substitution. This is not keyword replacement. A keyword list reproduces vocabulary; a style distillation is supposed to capture the pattern that makes the vocabulary arrive in that order.

The generated skill then behaves like any other: it appears in the list, loads with a slash command using its name, and every subsequent conversation outputs in that style until you change it. You can also open it for editing and adjust it.

That last point is what makes it usable rather than a novelty. A distilled style is a starting draft of a preference, and the same override rules apply to it as to a hand-written skill, so it can be scoped to one novel instead of becoming global by accident.

The build ships its own Git and patches the Windows version resource

The Makefile is where the desktop application details show, and two of them are unusual.

The first is the dependency target. make deps downloads two runtimes into the build directory, skipping each one if it is already present: a Git runtime, checked for a binary on Windows and a mingw64 directory elsewhere, through scripts/download-git.sh, and ONNX Runtime, checked for the shared library, the dylib or the DLL, through scripts/download-onnx.sh.

So the application bundles its own Git. That is consistent with the built-in version control feature, and it means the recoverability story does not depend on the user having Git installed or on it being on the PATH.

The second is the version injection for Windows. The build target copies build/windows/info.json to a backup, uses a trap to restore it on exit whatever happens, and runs jq to write the version into four fields: the fixed file version, the fixed product version, and the matching FileVersion and ProductVersion entries. Wails reads that file and uses winres to embed the values as PE version resources in the executable, so Windows reports the right version in its properties dialog.

Restoring the file through a trap rather than cleaning up afterwards is the detail to copy. It is the difference between a build that leaves your tree dirty when a command fails and one that does not.

The rest is conventional: development mode runs Wails with a webkit2_41 build tag, the production build runs the same with ldflags stamping the version into the Go binary, and the root package.json exists only to proxy three npm commands into the frontend directory.

Building from source needs the desktop toolchain first, and the sequence is four commands:

bash
sudo apt install libsqlite3-dev libgtk-3-dev libwebkit2gtk-4.1-dev gcc
git clone https://github.com/sigpanic/goink
cd goink
make deps
make build   # production build
make dev     # development mode with hot reload

The library list tells you what the shell is doing: SQLite for storage, GTK and a specific webkit2gtk version for the desktop webview, and a C compiler for cgo. The webkit2_41 build tag in the Makefile matches that library version, which is the kind of pairing that silently fails to compile when the two drift apart.

Editorial conclusion

goink is for someone writing a long novel with an assistant and losing the thread, because its answer is to move state out of the conversation and into structured records the agent has to update. The three enforcement layers, the diff-before-write rule and the local semantic index are the parts that make that work rather than merely be claimed. Two things to check before you rely on it. The maintenance is enforced by prompting and a review agent rather than by anything the tool can verify, and the state model is opinionated about what a novel contains, arcs and reader cognition in particular. Expect the local models to be Chinese-language ones, and bring your own API key.

Frequently asked questions

How does goink stop the assistant from forgetting earlier chapters?

It keeps structured state outside the conversation: character profiles, a directed relationship graph, foreshadowing with target recall chapters, arcs as node chains, a location map and what the reader knows. After a chapter the system injects a maintenance reminder listing what to check, and an optional review sub-agent compares the chapter against the state.

Does goink edit my manuscript without asking?

Not by default. Every edit produces a diff and is written only after you approve, and you can reject it or send feedback for a revision. An automatic mode exists for writing several rounds without stopping, and all changes are committed to the built-in Git history so any state can be reverted.

What does goink need installed to run?

An LLM API key, with built-in templates for DeepSeek, GLM and MiMo and OpenAI-compatible formatting. The installer is under 60MB and needs no Python, Node.js, database or GPU. There are installers for Windows, a DMG for macOS and an AppImage for Linux.

How do I add my own writing method to goink?

Create a markdown file with YAML frontmatter carrying a name, description, category and mode. Skills resolve by layer, novel over user over builtin, and hot-reload without a restart. You can also paste a sample passage and have a style skill distilled across six dimensions.

Official sources

  1. Issues
  2. License: AGPL-3.0
  3. README
  4. Releases
  5. sigpanic/goink on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/sigpanic-goink.svg)](https://hysenlabs.com/projects/sigpanic-goink)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/sigpanic-goink.svg)](https://hysenlabs.com/projects/sigpanic-goink)

Was this useful?