Jump to content

KdpPublish/BIBLE

From MindAttic Docs

KdpPublish — Project Bible

Single source of truth for what KdpPublish IS, is NOT, and the rules that keep it coherent. README says how to build and run it; this says how to think about it. The finish line lives in docs/RELEASE.md.

1. The one sentence

KdpPublish is the owner's WPF desktop tool that publishes and republishes MindAttic books on Amazon KDP, with an LLM operator driving a real KDP browser pane while the owner watches and signs off.

2. The product promise

  • Every MindAttic book that should be on Kindle is on Kindle, at the version on disk.
  • The panel's Status column tells the truth: it is read off KDP's own bookshelf, not local bookkeeping.
  • Nothing is published without the owner's sign-off, and every status change reaches the owner (panel log + Psst).
  • KDP's own limits (the weekly title-creation limit) are respected, not fought.

3. What it is NOT

  • Not the publishing logic: the KDP store, manifest builder and operator tools live in Prose.Core (the Prose repo) and are consumed as a vendored package.
  • Not a book editor or exporter: manuscripts, covers and exports come from Prose / MindAttic.Export (ePub\MindAttic\<universe>\<CODE>).
  • Not a headless service: it is a desktop app with a visible browser pane; diagnostic modes are read-only.
  • Not a general KDP client for other accounts or other stores.

4. Architecture canon

 MainWindow (panel: checklist, sign-off, log)      WebView2 pane on kdp.amazon.com
        │                                                   ▲
        ▼                                                   │ AutoWebNav (CDP, observation, recording)
 KdpOperatorService + KdpTools/*  (Prose.Core) ────────────┘
        │
        ▼
 Prose DB (manifest, Nodes.Asin/PublishUrl, kdp.newbook.<CODE> plans)  ──► GLMZ wiki Amazon links

4.1 Projects

  • KdpPublish/ — the WPF app (App.xaml.cs startup and command-line modes; MainWindow.xaml.cs panel; MainWindow.ShelfWatch.cs bookshelf re-read; MainWindow.CreationLimit.cs weekly limit; WebView2KdpBrowser.cs the browser adapter).
  • lib/local-packages/ — vendored Prose.Core, AutoWebNav, MindAttic.* packages (NuGet.config).
  • run.ps1 / run.bat — the shared MindAttic run menu; deploys to R:\MindAttic\Apps\KdpPublish.

4.2 Domain model

  • Book — one manuscript with a code (e.g. CYB3), a version on disk, a KDP titleId and an ASIN.
  • Bookshelf row — KDP's own record (titleId, asin, stage, liveState, label).
  • Status — Published, Outdated, Publishing, Draft, Draft (was live), Live (unchecked), Waiting (title limit).
  • Title-creation limit — KDP's weekly cap on new titles, stored in %LocalAppData%\MindAttic\KdpPublish\title-creation-limit.json until Sunday 00:00 UTC.

4.3 Key services

  • Sequential reconciliation pass (panel button or KdpPublish.exe CODE1,CODE2).
  • Bookshelf scan (every minute while idle, and after each run) mapping KDP labels to Status by ASIN, then titleId.
  • Publish alerts through MindAttic.Psst (KDPPUBLISH_NO_PSST=1 silences them).
  • Diagnostic launch modes: --diagnose, --scan-bookshelf, --crawl-categories, --probe-categories.

5. The Laws

Inherits MindAttic.HouseRules.md by reference.

  1. Publishing is a real, external change on Amazon. Never drive the app behind the owner; observe with awn-observe and read.
  2. KDP's bookshelf is ground truth; local bookkeeping never overrides it.
  3. Publishing logic changes go to Prose.Core in the Prose repo, then are re-vendored here.
  4. Respect KDP's weekly limits; skip and wait rather than retry.
  5. Diagnostic modes never click or type.

6. Verified state

See docs/RELEASE.md §6: deployed on R: (757d5ae), live bookshelf status and Psst alerts (KP-T29), weekly title limit respected (KP-T30), 20 of 23 GLMZ Series 1 books live or submitted on 2026-11-19.

7. Active frontier

docs/RELEASE.md: MS-39 "KdpPublish GLMZ Series 1 on Kindle".

8. Quality bar

A change builds clean (dotnet build KdpPublish\KdpPublish.csproj -c Release), is redeployed with run.ps1 -Redeploy, and, when it touches publishing, is watched through one real run with the owner present.

9. Glossary

  • GLMZ — the owner's book universe; Series 1 is its first 23 books.
  • ASIN — Amazon's product id; a book is "on sale" once it has one and is Live.
  • titleId — KDP's internal id for a title, assigned when a draft is created.
  • Operator — the LLM tool-calling loop that drives the KDP pane.
Part of KdpPublish.
From KdpPublish/docs/BIBLE.md via MindAttic.Docs; synced automatically, so edit the repo, not this page.