# Local Authoring-System Prototype This prototype reads a Scrivener project, checks the project structure, builds an exact package preview, and can send a confirmed package to the temporary OpenRouter drafting model. When Scrivener is closed, accepting a generated draft for editing creates three records in the project: - an immutable initial draft in `Authoring System → Drafting Archive → Accepted for Editing`; - an editable working copy in the same folder; and - the exact package snapshot in `Authoring System → Drafting Archive → Package Snapshots`. An outright rejected draft writes nothing. A separate, explicit final-accept action copies the saved working copy into its paired Manuscript scene. Every write checks `Files/user.lock`; close the project in Scrivener first. Before a structural archive write, the prototype places a recoverable binder/checksum backup in `Files/authoring-backups`. Run from `Authoring_System`: ```sh python3 prototype/app.py ``` Then open [http://127.0.0.1:8765](http://127.0.0.1:8765). To point it at another project: ```sh python3 prototype/app.py --project /absolute/path/to/Book.scriv ``` The app currently binds scene/brief pairs by their visible `Scene X` labels. A later phase will persist UUID bindings in a sidecar, so later renaming does not break relationships.