<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=Prose%2Fagent%2FPROSE_PROTOCOL</id>
	<title>Prose/agent/PROSE PROTOCOL - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mindattic.com/wiki/docs/index.php?action=history&amp;feed=atom&amp;title=Prose%2Fagent%2FPROSE_PROTOCOL"/>
	<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=Prose/agent/PROSE_PROTOCOL&amp;action=history"/>
	<updated>2026-12-06T00:22:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.3</generator>
	<entry>
		<id>https://mindattic.com/wiki/docs/index.php?title=Prose/agent/PROSE_PROTOCOL&amp;diff=751&amp;oldid=prev</id>
		<title>Docs Sync: md2wiki: sync from MindAttic.Docs</title>
		<link rel="alternate" type="text/html" href="https://mindattic.com/wiki/docs/index.php?title=Prose/agent/PROSE_PROTOCOL&amp;diff=751&amp;oldid=prev"/>
		<updated>2026-11-29T20:31:00Z</updated>

		<summary type="html">&lt;p&gt;md2wiki: sync from MindAttic.Docs&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Prose Agent Protocol =&lt;br /&gt;
&lt;br /&gt;
Version: &amp;lt;code&amp;gt;2.0&amp;lt;/code&amp;gt; (RFC 0015, the Novel Factory, 2026-09-23) Status: active&lt;br /&gt;
&lt;br /&gt;
Prose is a Hub-backed prose engine. The database is authoritative and all database access goes through &amp;lt;code&amp;gt;Prose.Hub&amp;lt;/code&amp;gt;; an agent must never use direct SQL, EF, or a private copy of the database. The design is &amp;lt;code&amp;gt;docs/rfc/0015-novel-factory.md&amp;lt;/code&amp;gt;. &amp;lt;strong&amp;gt;The plan is not this file or any file: it is the factory&amp;#039;s live state in the Hub.&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Start every session ==&lt;br /&gt;
&lt;br /&gt;
# The SessionStart hook opens a factory session and injects the FACTORY block: the next action (computed from the book&amp;#039;s state), the books on the line, the last session&amp;#039;s summary, the laws. If it says FACTORY UNREACHABLE, start the Hub (&amp;lt;code&amp;gt;run.ps1 -Apps Hub -Start Hub&amp;lt;/code&amp;gt;) and do no story work from memory.&lt;br /&gt;
# Without the hook: &amp;lt;code&amp;gt;prose --factory next&amp;lt;/code&amp;gt; (MCP &amp;lt;code&amp;gt;factory_next&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;prose --order list&amp;lt;/code&amp;gt;.&lt;br /&gt;
# Do the next action. A bare &amp;lt;code&amp;gt;do&amp;lt;/code&amp;gt; means exactly that.&lt;br /&gt;
&lt;br /&gt;
== The laws ==&lt;br /&gt;
&lt;br /&gt;
# The book is its beats; the world is its entities. Nothing else is stored about the story — no outline, spine, blueprint, ledger, summary or reconciler.&lt;br /&gt;
# Every story change is a logged Hub call (MCP or the prose CLI). Never raw SQL.&lt;br /&gt;
# Repo changes need an open engine work order whose paths cover them, and a commit that names it (&amp;lt;code&amp;gt;WO:&amp;amp;lt;id&amp;gt;&amp;lt;/code&amp;gt;). The Stop hook refuses changes no open order covers.&lt;br /&gt;
# Done is computed (a station passes) or Hub-validated (a work order&amp;#039;s checks). Claims do not count.&lt;br /&gt;
# A decision goes into the world the moment it is made: &amp;lt;code&amp;gt;record_ruling&amp;lt;/code&amp;gt;, or the entity record, with a read-back.&lt;br /&gt;
# The book is read and written whole: a chapter is a unit of work, never a boundary of sight.&lt;br /&gt;
# Deterministic checks only. No LLM judges, votes, or scores.&lt;br /&gt;
# A failed check is reported, never compensated with a new system.&lt;br /&gt;
# No override on the read gate. Export only what has been read as it stands.&lt;br /&gt;
# End every session with &amp;lt;code&amp;gt;/quicksave&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;session_end&amp;lt;/code&amp;gt;): every decision references a ruling or order.&lt;br /&gt;
&lt;br /&gt;
== The line (per chapter) ==&lt;br /&gt;
&lt;br /&gt;
F2 Planned → F3 Written → F4 Captured → F5 Read → F6 Clean → F1 Verified, then F7 Pressed and A Audio for the book. &amp;lt;code&amp;gt;prose --factory status --node &amp;amp;lt;book&amp;gt;&amp;lt;/code&amp;gt; shows the matrix.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;strong&amp;gt;Heal a written book:&amp;lt;/strong&amp;gt; read it in order with &amp;lt;code&amp;gt;read_beats(markRead)&amp;lt;/code&amp;gt; / &amp;lt;code&amp;gt;prose --read-beats … --mark-read --read-by claude&amp;lt;/code&amp;gt;; file defects as read notes; fix with &amp;lt;code&amp;gt;splice_beats&amp;lt;/code&amp;gt; (dry run, then apply); re-read what changed; entity corrections are filed as notes during the pass and applied as one batch after it; verify each record; export.&lt;br /&gt;
* &amp;lt;strong&amp;gt;Write a new book:&amp;lt;/strong&amp;gt; create the book and chapters; plan beats (title + description); write each chapter in-session with the full prior prose and the cast&amp;#039;s records in view; capture new names and facts into the world; then heal it as above.&lt;br /&gt;
* &amp;lt;strong&amp;gt;Rebuild a written book&amp;lt;/strong&amp;gt; (structure, not polish: cut, expand, re-slot, deepen, change the ending). The story itself is never stored anywhere but the beats; the rebuild adds no outline, spine or registry. Apply the whole-book checklist (CraftGuide §12, &amp;lt;code&amp;gt;SS-CRAFT-NOVEL&amp;lt;/code&amp;gt;) on every read. 0. &amp;lt;strong&amp;gt;Clone and fence.&amp;lt;/strong&amp;gt; &amp;lt;code&amp;gt;--archive-book&amp;lt;/code&amp;gt; the original, then &amp;lt;code&amp;gt;--clone-book --slug &amp;amp;lt;orig&amp;gt; --title    &amp;quot;&amp;amp;lt;same title&amp;gt;&amp;quot; --book-code &amp;amp;lt;CODE&amp;gt;2 --draft&amp;lt;/code&amp;gt;. Assert that beats and words match. Rulings are not copied: re-seed the original&amp;#039;s book rulings (&amp;lt;code&amp;gt;--ruling seed --node &amp;amp;lt;CODE&amp;gt;2 --file …&amp;lt;/code&amp;gt;) and confirm F4 and the metrics match the original. Create a &amp;lt;code&amp;gt;&amp;amp;lt;CODE&amp;gt;2CUTS&amp;lt;/code&amp;gt; book with one chapter to hold cuts. Open an author order on the clone (&amp;lt;code&amp;gt;work_order_add kind:author nodeIdOrSlug:&amp;amp;lt;CODE&amp;gt;2&amp;lt;/code&amp;gt;) so it is on the line. The original stays frozen.&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Every later change&amp;lt;/strong&amp;gt; to prose, entities or facts in any book follows the same rules:&amp;lt;br&amp;gt;The read gate marks a beat unread when its text changes, when it moves, or when an entity it mentions changes. Re-read the flagged beats before pressing.&lt;br /&gt;
*# &amp;lt;strong&amp;gt;Diagnosis read.&amp;lt;/strong&amp;gt; Read the clone front to back with &amp;lt;code&amp;gt;markRead&amp;lt;/code&amp;gt;. File structural failures against the checklist as read notes on the beat where they show. Run &amp;lt;code&amp;gt;get_entity_beat_mentions&amp;lt;/code&amp;gt; for every named character.&lt;br /&gt;
*# &amp;lt;strong&amp;gt;Gate G1 (author).&amp;lt;/strong&amp;gt; Propose the restructure: cuts with word counts, new scenes, merged or deepened characters, re-slotted chapters, the ending. Only the decisions the author approves persist, each as a &amp;lt;code&amp;gt;record_ruling&amp;lt;/code&amp;gt; on the clone.&lt;br /&gt;
*# &amp;lt;strong&amp;gt;Restructure.&amp;lt;/strong&amp;gt; Create and re-slot chapters (&amp;lt;code&amp;gt;create_chapter&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--reparent-node --after-slug&amp;lt;/code&amp;gt;). Move each cut beat to the cuts book with &amp;lt;code&amp;gt;--move-beat-to-node&amp;lt;/code&amp;gt;, which moves the same row so the text is kept byte for byte. Insert new scenes as planned beats: a title and a description of what the scene does, including what it plants or pays off. Check the counts: book beats plus cuts beats equal the original beats plus the planned beats inserted.&lt;br /&gt;
*# &amp;lt;strong&amp;gt;Write and revise.&amp;lt;/strong&amp;gt; Work in reading order, in session, with &amp;lt;code&amp;gt;factory_context(priorUnits: all)&amp;lt;/code&amp;gt;. Write planned beats. Splice revisions with a dry run first, against the raw tagged text, by hand. Capture new names and facts into entities and read each one back.&lt;br /&gt;
*# &amp;lt;strong&amp;gt;Heal&amp;lt;/strong&amp;gt; as above, until F1–F6 pass on every unit, metrics hold and &amp;lt;code&amp;gt;law_violations&amp;lt;/code&amp;gt; is 0.&lt;br /&gt;
*# &amp;lt;strong&amp;gt;Gate G2 (author).&amp;lt;/strong&amp;gt; The author reads and decides whether to press. No audio unless the author asks for it.&lt;br /&gt;
** archive before editing prose;&lt;br /&gt;
** splice with a dry run first;&lt;br /&gt;
** record every decision (&amp;lt;code&amp;gt;record_ruling&amp;lt;/code&amp;gt; or the entity record) and read it back;&lt;br /&gt;
** never press over an unread beat.&lt;br /&gt;
&lt;br /&gt;
== Transport-neutral operation envelope ==&lt;br /&gt;
&lt;br /&gt;
Every adapter should preserve this envelope, whether it is MCP, CLI, or HTTP:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre class=&amp;quot;md-code lang-json&amp;quot;&amp;gt;{&lt;br /&gt;
  &amp;quot;protocolVersion&amp;quot;: &amp;quot;2.0&amp;quot;,&lt;br /&gt;
  &amp;quot;operation&amp;quot;: &amp;quot;factory_next&amp;quot;,&lt;br /&gt;
  &amp;quot;universe&amp;quot;: &amp;quot;glmz&amp;quot;,&lt;br /&gt;
  &amp;quot;arguments&amp;quot;: {},&lt;br /&gt;
  &amp;quot;requestId&amp;quot;: &amp;quot;client-generated-id&amp;quot;&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Responses must identify &amp;lt;code&amp;gt;requestId&amp;lt;/code&amp;gt;, operation, universe, status, result, warnings and ledger identifiers. Errors are structured and name the failed precondition (&amp;lt;code&amp;gt;hub_unreachable&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;missing_universe&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;unknown_argument&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;write_gate_rejected&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;unread_beats&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;check_failed&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;decision_unrecorded&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
== Handoff ==&lt;br /&gt;
&lt;br /&gt;
There is no transcript file. The session is a &amp;lt;code&amp;gt;FactorySessions&amp;lt;/code&amp;gt; row; &amp;lt;code&amp;gt;/quicksave&amp;lt;/code&amp;gt; ends it with a summary whose every decision references a recorded ruling or work order, and the next session&amp;#039;s start hook shows that summary beside the live next action.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-crumb&amp;quot;&amp;gt;Part of [[Prose]].&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;md2wiki-source&amp;quot;&amp;gt;From [https://github.com/mindattic/Prose/blob/main/docs/agent/PROSE_PROTOCOL.md Prose/docs/agent/PROSE_PROTOCOL.md] via MindAttic.Docs; synced automatically, so edit the repo, not this page.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Prose]]&lt;/div&gt;</summary>
		<author><name>Docs Sync</name></author>
	</entry>
</feed>