# MANIFEST: ReadingList
updated:     2026-10-23T17:47:26+00:00
state:       approved
blocks:      5

applied_specs: |
  ARCHITECTURE.md sha256=513564d05020d87c4d59bcbd40b693fe2aae86fabff2f44b9c436731980f5168 commit=942ba0a3d68958ecfb606a596100a435607a41b1 applied_by=block-1 applied_at=2026-10-23T17:50:38+00:00 build_sha256=c89fb11d093fd7165947db6df4e9dfddbf19932e8b458a78b0d1aa20a266d577
  ARCHITECTURE_compact.md sha256=7614f1a820c404cfaeedd71209a63bedc12cb4d0351e8be0cb2be29d951c5648 commit=332bc5031810b5b54ceef26115db24b2c5afdcaf applied_by=block-5 applied_at=2026-10-23T18:08:28+00:00 build_sha256=7614f1a820c404cfaeedd71209a63bedc12cb4d0351e8be0cb2be29d951c5648
  DATABASE.md sha256=ba3f2fb135480b34230597f018171e86cdb4992a5e13d7aed20ccb12d8eb8581 commit=942ba0a3d68958ecfb606a596100a435607a41b1 applied_by=block-2 applied_at=2026-10-23T17:53:06+00:00 build_sha256=be90c3aba02e109270a1d1635217bd168d824e0ce5e671c62e213fe42de6cac0 database_operations=FEATURE-BOOK-001:c15416b5501a07a6ecd9b51d27880581ce3609054878467071f55489b6df02a9;FEATURE-BOOK-002:9a8d25741aad0dd6da8170c9f1183f4671abc6dfe1875c3ac713599dfbb77c0c;FEATURE-BOOK-003:4b212443622d25bd4c84487f7786d64b1227a48b153fdde49424cced6d8f70a0;FEATURE-BOOK-004:865faee51edd16a9b6be67d505e4b58b41a143bc15bd9e29e0d46305429d6b4b
  DATABASE_compact.md sha256=8583fbc89e2bb99c6e517fe0b3e92ec0461c5fc136b47d823a728a22cc39458d commit=bf1cf61968588105dba58d10b66459ce4d91715a applied_by=block-5 applied_at=2026-10-23T18:08:28+00:00 build_sha256=8583fbc89e2bb99c6e517fe0b3e92ec0461c5fc136b47d823a728a22cc39458d
  FEATURE-AddBook.md sha256=d048b011738c77dd006b3d3d533f86231f9daa5768b198d854afdae2a6e49060 commit=942ba0a3d68958ecfb606a596100a435607a41b1 applied_by=block-3 applied_at=2026-10-23T18:02:06+00:00 build_sha256=cb737cf2b66333b2d4b51ca9c94fe37e73a9b8ca7fea27bda5e9458801cfefd8
  FEATURE-AppShell.md sha256=43f5184cbf1a7bf12983459f20271da67574d24e554a4a7818c2e823c4cbf3a2 commit=942ba0a3d68958ecfb606a596100a435607a41b1 applied_by=block-2 applied_at=2026-10-23T17:53:06+00:00 build_sha256=2a7347e76ecadbcb9ebbe71144062f23d6b283faa756062b40d1966cd52a7ad2
  FEATURE-ListBooks.md sha256=71524ca3c312a8c0b542203979c9c98f34a26158847e861e75b0662fce8dc42e commit=942ba0a3d68958ecfb606a596100a435607a41b1 applied_by=block-3 applied_at=2026-10-23T18:02:06+00:00 build_sha256=ab33245bf6211b91533ae852b34c596c43f336efee61fdfcf2c47f71f8ff9bef
  FEATURE-RejectEmptyFields.md sha256=b4cdb6a79e491e602e67e1e396287f8d31b9ad0c97fdb8574edb9ae22b05524c commit=942ba0a3d68958ecfb606a596100a435607a41b1 applied_by=block-3 applied_at=2026-10-23T18:02:06+00:00 build_sha256=d8628a1e9cbed9523c48b16907961a7ea069daa936ef61187c8614c43f7f52c3
  FEATURE-RemoveBook.md sha256=1087b4c1ccc51e556f8ede2337cac9802a8ac90d7c8ff91da59c656c7505bd6c commit=942ba0a3d68958ecfb606a596100a435607a41b1 applied_by=block-3 applied_at=2026-10-23T18:02:06+00:00 build_sha256=105217b9e14428b6cb8849c822b255174a62665494560702a248ab28b6915d6c
  FEATURE-TestRunner.md sha256=1fdcdbc2e300742f1ee55535319cb4516b949d3b5e1995a8ccf221b3b0178709 commit=942ba0a3d68958ecfb606a596100a435607a41b1 applied_by=block-5 applied_at=2026-10-23T18:08:28+00:00 build_sha256=cd389e713ed085dee54df56e400fd41107485833a85b935f1f65d39062862422
  SCREEN-ReadingList.md sha256=39b85e01809b5b8af4c74d04026349f84706184441d2c59520096bfd6e2d4f65 commit=942ba0a3d68958ecfb606a596100a435607a41b1 applied_by=block-4 applied_at=2026-10-23T18:05:20+00:00 build_sha256=6e5792b6b6277be8c1e30fa6c48e678e8ed0cda620d71cdc2c58587ef952c813
## story 1: Stand up the Python project tree, environment, dependency manifest, and pytest runner.
id:           architecture
finding: ADVISORY: implemented, not verified — no governed acceptance command covers this story. Declare one in ACCEPTANCE.json to gate it.
evidence: evidence/block-1.md
summary:      Stand up the Python project tree, environment, dependency manifest, and pytest runner.
type:         foundational
kind:         capability
phase:        1
block:        1
implements:   ARCHITECTURE.md
instructions: |
  Create the Python foundation per TECHNOLOGY_STACK.md: pyproject.toml with Flask and pytest, committed uv.lock, .venv created by uv venv, tests/ directory with conftest.py, and a pytest configuration that runs from the application root.

  Document module ownership: routes call services, services call db.<table>.<verb>(...) on the generated persistence package, templates live under app_server/templates.
stack:        python.md
stack_mode:   builder
size:         3976
provides:     project tree, pytest -q
acceptance:   yes
state: closed/implemented

## story 2: Declare the books table and its repository operations.
id:           database
finding: ADVISORY: implemented, not verified — no governed acceptance command covers this story. Declare one in ACCEPTANCE.json to gate it.
evidence: evidence/block-2.md
summary:      Declare the books table and its repository operations.
type:         foundational
kind:         capability
phase:        1
block:        2
implements:   DATABASE.md
context:      ARCHITECTURE.md
instructions: |
  Drydock generates the persistence package from DATABASE.md; write no persistence code.

  Declare a books table with an autoincrementing integer primary key, non-null title, and non-null author. books.list returns rows ordered by id ascending, which is the order added.
stack:        persistence.md, sqlite.md, python.md
stack_mode:   builder
size:         13191
provides:     books.create, books.get, books.list, books.delete
depends:      architecture
acceptance:   yes
state: closed/implemented

## story 3: Provide the Flask application factory, shared page layout, and web_client test fixture.
id: app-shell
finding: ADVISORY: implemented, not verified — no governed acceptance command covers this story. Declare one in ACCEPTANCE.json to gate it.
evidence: evidence/block-2.md
summary: Provide the Flask application factory, shared page layout, and web_client test fixture.
type: foundational
kind: capability
phase: 1
block: 2
implements: FEATURE-AppShell.md
context: ARCHITECTURE_compact.md, DATABASE_compact.md
stack: python.md, flask.md
stack_mode: builder
size: 7735
provides: create_app, app_server.testing.web_client, GET /health
instructions: |
  Implement app_server/__init__.py create_app() per the Foundation Contract, app_server/testing.py web_client(), a base HTML template with minimal CSS, and a GET /health route returning 200.
  
  The factory opens the database through open_database using the configured DSN and registers blueprints from later stories; it invents no other routes.
acceptance: yes
depends: architecture, database
state: closed/implemented

## story 4: Add a book with a title and author and persist it.
id: add-book
finding: ADVISORY: implemented, not verified — no governed acceptance command covers this story. Declare one in ACCEPTANCE.json to gate it.
evidence: evidence/block-3.md
summary: Add a book with a title and author and persist it.
type: service
kind: capability
phase: 2
block: 3
implements: FEATURE-AddBook.md
covers: BOOK-LIST-001, TEST-COVERAGE-001
accepts: st-002
context: ARCHITECTURE_compact.md, DATABASE_compact.md
stack: python.md, flask.md
stack_mode: consumer
size: 8038
provides: POST /books
consumes: books.create, books.get
instructions: |
  Implement a book service add function and POST /books accepting JSON with title and author. A valid submission returns 201 with the stored book (id, title, author) and persists it via books.create.
  
  Write pytest tests under tests/ covering the add behavior, including a round trip read-back.
acceptance: yes
depends: app-shell
state: closed/implemented

## story 5: List books in the order they were added.
id: list-books
finding: ADVISORY: implemented, not verified — no governed acceptance command covers this story. Declare one in ACCEPTANCE.json to gate it.
evidence: evidence/block-3.md
summary: List books in the order they were added.
type: service
kind: capability
phase: 2
block: 3
implements: FEATURE-ListBooks.md
covers: BOOK-LIST-003, TEST-COVERAGE-002
accepts: st-003
context: ARCHITECTURE_compact.md, DATABASE_compact.md
stack: python.md, flask.md
stack_mode: consumer
size: 7844
provides: GET /books
consumes: books.list
instructions: |
  Implement GET /books returning 200 with a JSON array of books ordered by insertion (id ascending) via books.list. An empty list returns an empty array.
  
  Write pytest tests adding several books and asserting the returned order equals the order submitted.
acceptance: yes
depends: add-book
state: closed/implemented

## story 6: Remove a book so it no longer appears in the list.
id: remove-book
finding: ADVISORY: implemented, not verified — no governed acceptance command covers this story. Declare one in ACCEPTANCE.json to gate it.
evidence: evidence/block-3.md
summary: Remove a book so it no longer appears in the list.
type: service
kind: capability
phase: 2
block: 3
implements: FEATURE-RemoveBook.md
covers: BOOK-LIST-004, TEST-COVERAGE-003
accepts: st-004
context: ARCHITECTURE_compact.md, DATABASE_compact.md
stack: python.md, flask.md
stack_mode: consumer
size: 8234
provides: DELETE /books/{book_id}
consumes: books.delete, books.get, GET /books
instructions: |
  Implement DELETE /books/{book_id}: 204 when the book existed and is deleted, 404 for an unknown id. A removed book must never reappear in later reads.
  
  Write pytest tests for removal, absence on the next list read, preserved order of remaining books, and the unknown-id 404.
acceptance: yes
depends: add-book, list-books
state: closed/implemented

## story 7: Reject a submission with an empty title or author with a clear error.
id: reject-empty-fields
finding: ADVISORY: implemented, not verified — no governed acceptance command covers this story. Declare one in ACCEPTANCE.json to gate it.
evidence: evidence/block-3.md
summary: Reject a submission with an empty title or author with a clear error.
type: service
kind: capability
phase: 2
block: 3
implements: FEATURE-RejectEmptyFields.md
covers: BOOK-LIST-002, TEST-COVERAGE-004
accepts: st-005
context: ARCHITECTURE_compact.md, DATABASE_compact.md
stack: python.md, flask.md
stack_mode: consumer
size: 8592
provides: validate_book_input
consumes: POST /books
instructions: |
  Add validation in the service layer used by POST /books. A missing, empty, or whitespace-only title or author is rejected with status 400 and a JSON body carrying a clear human-readable error naming the offending field. Nothing is stored on rejection.
  
  Write pytest tests for empty title, empty author, both empty, and whitespace-only values, asserting status and that the list is unchanged.
acceptance: yes
depends: add-book
state: closed/implemented

## story 8: Render the reading list page with an add form, error display, and remove buttons.
id: screen-reading-list
finding: ADVISORY: implemented, not verified — no governed acceptance command covers this story. Declare one in ACCEPTANCE.json to gate it.
evidence: evidence/block-4.md
summary: Render the reading list page with an add form, error display, and remove buttons.
type: service
kind: capability
phase: 3
block: 4
implements: SCREEN-ReadingList.md
context: ARCHITECTURE_compact.md, DATABASE_compact.md
stack: python.md, flask.md
stack_mode: consumer
size: 9355
provides: GET /, POST /add, POST /remove/{book_id}
consumes: GET /books, POST /books, DELETE /books/{book_id}
instructions: |
  GET / renders books in the order added with a title and author add form and a remove button per book. POST /add processes the form through the book service: success redirects (303) to /; empty title or author re-renders the page with status 400 and a visible error message. POST /remove/{book_id} removes the book and redirects (303) to /.
  
  Write pytest tests for each page route.
acceptance: yes
depends: add-book, reject-empty-fields, list-books, remove-book
state: closed/implemented

## story 9: Provide bin/test.sh and prove the complete suite passes end to end.
id: test-runner
finding: ADVISORY: implemented, not verified — no governed acceptance command covers this story. Declare one in ACCEPTANCE.json to gate it.
evidence: evidence/block-5.md
summary: Provide bin/test.sh and prove the complete suite passes end to end.
type: feature
kind: test harness
phase: 4
block: 5
implements: FEATURE-TestRunner.md
covers: TEST-COVERAGE-005
accepts: st-001, st-006
context: ARCHITECTURE_compact.md, DATABASE_compact.md
stack: python.md
stack_mode: consumer
size: 7543
provides: bin/test.sh
instructions: |
  Create a POSIX sh bin/test.sh runnable as sh bin/test.sh from the application root. It activates .venv when present, runs pytest -q, and exits with pytest's exit status, zero only when every test passes.
  
  Run sh bin/test.sh and sh sources/full_test.sh and preserve command, exit code, stdout, and stderr as evidence. Confirm tests exist for add, ordered listing, removal, and empty title or author rejection.
acceptance: yes
depends: architecture, database, app-shell, add-book, reject-empty-fields, list-books, remove-book, screen-reading-list
state: closed/implemented
