KdpPublish
KdpPublish
A WPF desktop app that automates republishing/publishing books on Amazon KDP: a control panel (checklist, sign-off, live log) next to a real WebView2 pane on kdp.amazon.com, driven by an LLM tool-calling loop (KdpOperatorService + the KdpTools/* tool set) over the same browser-automation toolkit (AutoWebNav) that JobHunt and Automata use.
Decoupled from the Prose monorepo on 2026-10-04. KdpPublish's actual publishing logic (the KDP store, the manifest builder, the operator tools) still lives in Prose.Core — this app consumes it as a versioned package rather than a sibling project. See NuGet.config for how that's wired, and bump the vendored Prose.Core package under lib/local-packages/ when Prose.Core changes in a way this app needs.
Scope
The complete product, every epic, feature and story built or still to build, is in SPEC.md. The current finish line, MS-39 (all 23 GLMZ Series 1 books on Kindle and a trustworthy tool), is in RELEASE.md; after it, MS-144 puts every book Prose presses on Kindle and finishes the product.
Build & run
dotnet build KdpPublish\KdpPublish.csproj -c Release
Deploy and start it with the repo-root run.ps1 (or a double-click on run.bat), the MindAttic standard run menu: 1) Redeploy builds Debug and Release into R:\MindAttic\Apps\KdpPublish\Debug and \Release (stopping a KdpPublish that runs from there), 2) Run Debug starts the Debug copy with any extra arguments, and 3) Run Release starts the installed Release copy without building. Picks combine: 13 is Deploy & Run. The KDP login session lives under %LocalAppData%\MindAttic\KdpPublish\ and survives redeploys.
.\run.ps1 # the menu .\run.ps1 -Redeploy -RunRelease # Deploy & Run .\run.ps1 -RunRelease # Run the installed copy .\run.ps1 -Redeploy -RunDebug [args] # redeploy, then run Debug with arguments .\run.ps1 -Redeploy -DryRun # print what would be built and launched
Observing a live run
KdpPublish uses AutoWebNav's Live Observation and Session Recording (see the AutoWebNav README), the same as JobHunt and Automata:
- The window title shows the instance's PID (
KdpPublish - PID: <n>), and the app registers itself in%LocalAppData%\MindAttic\AutoWebNav\instanceswith a local CDP port per pane:panel(preferred 9368) andboard, the KDP site (preferred 9369). - The control panel exposes
window.__awnObserve: whether a run is going, a one-line summary (selected / tracked / counts by status), the selected codes, and the panel log. - Follow it from the AutoWebNav repo:
node tools/awn-observe.mjs status kdp both panes now: run state, summary, log tail, KDP page node tools/awn-observe.mjs watch kdp live: every log line, navigation and state change node tools/awn-observe.mjs shot kdp --pane board
- Every session is recorded: everything done in the KDP pane, by you or by the automation, is saved to Downloads as
KdpPublish-session-<timestamp>.autowebnav-recording.json, rewritten as it goes and a final time when the window closes. (This replaced the Spectator Mode button.)
Status from the KDP bookshelf
Whenever the KDP pane lands on the bookshelf and no run is going, the app switches it to 50 books per page and reads each ebook row's status straight off KDP — the JSON KDP puts on each row's action links (titleId, asin, stage, liveState) and the label you see (Live, Draft, In review, Live Updates publishing). The table's Status column then shows that, matched to each book by ASIN first and titleId second: Live → Published (or Outdated when a newer version is on disk), Draft after having been live → "Draft (was live)", In review / Updates publishing → Publishing. Hover a status for KDP's raw label. Books not on the bookshelf keep the manifest's own status.
Two statuses come from what is actually known rather than local bookkeeping:
- Live (unchecked): live on KDP, but no publish of ours was ever confirmed for it, so nobody knows which version is up. (It used to say Outdated on no evidence.) The next pass reads the live file off KDP's Content page and republishes only if it is behind; after that the row says Published or Outdated from what KDP showed, and the tooltip names the file.
- Waiting (title limit): needs a brand-new KDP title while KDP's weekly limit is reached (see below).
The Version column reads vA < vB only when the last confirmed publish really is behind the file on disk. Last Published is shown in local time (the stored value is UTC).
While no run is going, the app also re-reads the bookshelf once a minute in the background (a fetch, so the KDP pane stays where it is); the header shows when it last checked ("KDP checked 14:54"). It also re-reads it right after every run. Books in review, which have no edit links, are matched by title.
KDP's weekly title-creation limit
KDP caps how many brand-new titles an account can create per format each week. It doesn't say what the number is. When you hit it, the new title's first Save and Continue brings up this modal (first hit 2026-11-19, RTR, right after CYB3 took a new draft):
Title creation limit reached — You have reached your weekly title creation limit for this format. Your limit resets on Sunday at 12:00 AM UTC. (KDP help)
The app respects it:
- While a book that needs a new title is being worked, the app watches the KDP pane for that modal. If it appears, the book is stopped, the limit is saved with its reset time (the next Sunday 00:00 UTC) in
%LocalAppData%\MindAttic\KdpPublish\title-creation-limit.json, and you get an alert. - Until the reset, every pass skips books that would need a new title (no ASIN, no titleId, no live link: the operator's own rule for a new listing) and logs which ones it skipped. Updates to live books, and drafts KDP already holds (they have a titleId), still run.
- The panel shows a banner with the reset time in local time, and those books read Waiting (title limit). The file is deleted on its own once the reset passes; delete it by hand to try sooner.
Every new title counts, drafts included, so a run that starts several new books can use the week's allowance before any of them goes live.
Publish alerts
Every change in a book's KDP status (Draft, In review, Live, an ASIN assigned) and every book's result at the end of a run (submitted, or not published and why) is written to the panel log with a bell and pushed to you through MindAttic.Psst (psst test: a sound at the desk and a text to the configured phone). psst must be on PATH; set KDPPUBLISH_NO_PSST=1 to keep alerts to the log.
One-off diagnostic launch modes
KdpPublish.exe --diagnose <CODE> [details|content|pricing]— read-only DOM snapshot of a book's KDP page (buttons, checkboxes, dialogs, banners, iframes, body text), written totools/kdp/diagnose-<CODE>-<step>-<timestamp>.json.KdpPublish.exe --scan-bookshelf— reads the real per-book status KDP's own bookshelf page displays (Live / In Review / Draft / etc.), written totools/kdp/bookshelf-scan-<timestamp>.json. Ground truth over local bookkeeping.KdpPublish.exe --crawl-categories <CODE> <level0> [level1] [...]/--probe-categories <CODE>— one-off, read-only documentation passes over KDP's live Categories modal (seeCategoryTreeCrawlerin Prose.Core).KdpPublish.exe <CODE1>,<CODE2>,...— auto-starts the same sequential reconciliation pass the panel's "Run Sequential Pass" button triggers, scoped to just these codes, once the manifest loads.
All of the above never click or type anything except the auto-run codes mode, which drives the real publish automation.
Pages in this repository
- KdpPublish — Project Bible — KdpPublish is the owner's WPF desktop tool that publishes and republishes MindAttic books on Amazon KDP, with an LLM operator driving a…
- KdpPublish — Release charter — KdpPublish is the owner's WPF desktop tool that publishes and republishes MindAttic books on Amazon KDP: a control panel next to a real…
- KdpPublish — Product specification — Place in the ecosystem (docs/ECOSYSTEM.md): a product, the writing studio's storefront: it puts the books Prose presses on sale on Kindle,…