13 KiB
Step 3 Implementation Plan: Functional Completion by Requirement Domain
Purpose
Implement Ver1 Step 3 from docs/ver1/ver1.md by completing all in-scope V1 functional requirements in a practical, user-first order while preserving:
- personal-scale operation
- single-operator workflow
- private-network deployment assumptions
- low operational overhead
- clean architecture boundaries
Primary governing docs:
docs/ver1/ver1.md(Step 3 objective and sequencing)docs/architecture.md(module boundaries, workflow, simplicity guardrails)docs/requirements.md(REQ-0 through REQ-12 traceability)docs/error_handling.md(error contract across boundaries)docs/intent.md(verbatim transcription policy and prompt curation)docs/ver1/ver1-step1-2-carry-forward-checklist.md(Step 1/2 carry-forward integration)docs/ver1/ver1-step2-error-path-inventory.md(failure-path coverage visibility)
MCP Resources Reviewed and Applied
All resources on john-stream-mcp were reviewed. Step 3 applies the following guidance directly:
-
resource://skills/nicegui/document- modular page registration
- one-way dependency flow (
ui/api -> services -> infra) - async-first UI responsiveness expectations
-
resource://skills/nicegui-ui-customization/document- reusable UI component extraction for repeated patterns
- in-flight guards and explicit success/failure user feedback
- event-driven updates over ad-hoc polling
-
resource://skills/fastapi-async-sqlalchemy-modernization/document- explicit transaction/session boundaries
- deterministic resource ownership and cleanup continuity from Step 1
- incremental migration strategy with rollback-aware checkpoints
-
resource://skills/pydantic-settings/document- typed configuration as single source of runtime truth
- explicit source precedence and environment-safe defaults
-
resource://skills/python-logging-dictconfig/document- centralized startup-only logging configuration
- named logger discipline and boundary-level structured fields
-
resource://skills/pytesting/document- deterministic test structure and marker discipline
- behavior-first tests with clear fast-path and full-suite validation
-
resource://skills/fastapi-uv-docker/document- health endpoint and runtime startup/shutdown hygiene
- compose/deployment readiness constraints relevant to functional completion
-
resource://skills/python-typing/document- modern typing updates where touched by Step 3 work
-
resource://skills/ruff-linting-formating/document- maintain lint/format consistency in all modified modules
-
resource://prompts/greenfield-architecture/document
- explicit staged delivery with tradeoff-aware sequencing and test strategy
resource://prompts/pytest-scaffold/documentresource://prompts/pytest-fill-scaffold/document
- structure-first test planning, then deterministic implementation fill-in
Resources reviewed but not directly in Step 3 execution scope (no changes required now):
copilot-customization,mcp-details,vscode-configuration,zensical-docs- prompts:
authoring,mcp-consumer-repo-shim
Step 3 Success Criteria
Step 3 is complete when:
- All Step 3-targeted requirement slices are implemented and verified.
- Functional behavior is available through UI/API where required.
- Core data integrity and state transitions are deterministic.
- Error behavior follows
docs/error_handling.mdcontracts. - Carry-forward Step 1/2 items mapped to Step 3 are updated with evidence.
Requirement-Slice Execution Model (Applied to Every Slice)
For each slice, execute this sequence:
- Confirm contract/schema and boundary ownership.
- Implement service/domain logic.
- Implement persistence/state transitions.
- Integrate API and/or UI behavior.
- Add/update unit + integration + targeted end-to-end tests.
- Update docs and traceability artifacts.
Definition of done per slice:
- behavior is functional
- tests pass in intended marker lanes
- error pathways are classified and surfaced correctly
- requirement traceability is updated with evidence
Detailed Workstreams
Workstream A — Functional Baseline Audit and Slice Backlog Lock
Goals
- establish exact Step 3 functional delta from current implementation
- lock a practical slice backlog before coding
Tasks
- Build Step 3 requirement matrix (REQ -> current status -> gap -> target slice).
- Map each gap to one of these domains:
- Upload and lifecycle integrity
- Review and revision history
- Search over accepted transcripts
- Export workflows
- Prompt asset management behavior
- API/UI parity and status visibility
- Align each slice with architecture boundary ownership and persistence strategy.
- Link open carry-forward items from checklist:
- CF-A1, CF-A3 (architecture continuity in Step 3)
- CF-C1, CF-C2 (traceability/execution continuity)
Deliverables
- Step 3 requirement-slice matrix (appendix in this doc or separate artifact)
- prioritized slice backlog with owner and validation method
Exit Criteria
- every Step 3 slice maps to REQ IDs and a validation method
- no ambiguous ownership remains for in-scope slices
Workstream B — Core End-User Flows (Upload -> Transcribe -> Review)
Related Requirements
- REQ-0, REQ-1, REQ-2, REQ-3, REQ-4, REQ-5, REQ-6, REQ-12
Goals
- guarantee end-to-end reliability and usability of the primary user flow
- ensure review experience supports transcript acceptance and correction
Tasks
- Validate and close any lifecycle-state gaps:
- enforce valid transitions (
queued -> processing -> transcribed/failed/completed) - ensure transition visibility in UI/API
- enforce valid transitions (
- Review experience completion:
- transcript detail display stability
- failure detail readability and actionability
- acceptance/edit path for human review
- Ensure prompt-asset integration remains file-based and auditable:
- one prompt per Markdown file
- prompt selection/usage traceability in job outcomes (if available in model)
- Confirm worker/UI interactions remain responsive under long-running jobs:
- in-flight guards
- clear status refresh behavior
Deliverables
- complete end-user flow behavior with stable lifecycle visibility
- test coverage for happy path and failure path
Exit Criteria
- user can run upload -> process -> review reliably
- failed and successful outcomes are both actionable and traceable
Workstream C — Revision History and Provenance Completion
Related Requirements
- REQ-3, REQ-4, REQ-5, REQ-11
Goals
- finalize immutable transcript revision behavior and provenance consistency
Tasks
- Define/confirm revision invariants:
- append-only revision history
- clear current/accepted revision indicator
- Persist revision events consistently through service layer boundaries.
- Ensure UI/API expose revision timeline and selected revision details.
- Align error handling for revision conflicts and missing resources.
Deliverables
- revision-history feature completeness
- provenance and history read-path coverage
Exit Criteria
- transcript edits produce deterministic revision records
- previous revisions remain inspectable
Workstream D — Search Completion (Accepted Transcript Scope)
Related Requirements
- REQ-0, REQ-5, REQ-11
Goals
- provide practical search over accepted transcripts for personal corpus usage
Tasks
- Finalize searchable scope and indexing rules (accepted/current text only).
- Implement service-backed search query behavior.
- Expose search in UI/API with clear result metadata (document/job/revision context).
- Add guardrails for empty/no-result/error scenarios with actionable messaging.
Deliverables
- functional search pathway with deterministic results for accepted text
Exit Criteria
- operator can find transcripts reliably by text queries
- no-result and error states are clear and non-silent
Workstream E — Export Completion
Related Requirements
- REQ-0, REQ-4, REQ-5, REQ-11
Goals
- deliver practical export of transcript data for personal archive use
Tasks
- Finalize export contract (format, included fields, scope filters).
- Implement export service with deterministic data mapping.
- Add UI/API trigger path and user-visible completion/failure feedback.
- Validate export integrity against persisted source-of-record entities.
Deliverables
- end-to-end export capability with operator-visible outcomes
Exit Criteria
- export output is complete, consistent, and usable for downstream personal archive workflows
Workstream F — API/UI Parity and Interaction Hardening
Related Requirements
- REQ-5 plus cross-cutting REQ-2/3/4
Goals
- ensure UI and API expose coherent feature behavior and error contracts
Tasks
- Verify API/UI parity matrix for each Step 3 slice.
- Standardize interaction behavior:
- loading and in-flight states
- success/failure notifications
- stable error_id visibility where user-facing
- Ensure route/page modules remain composition-focused (business logic in services).
Deliverables
- API/UI parity checklist with resolved gaps
Exit Criteria
- no major flow exists in one interface with conflicting semantics in the other
Workstream G — Carry-Forward Integration During Step 3
Goals
- close Step 1/2 follow-ups that are Step 3-owned
Tasks
- Update checklist item CF-A1 as Step 3 slices touch runtime resources.
- Update checklist item CF-A3 with lightweight boundary enforcement evidence.
- Update CF-C1/CF-C2 traceability mapping with Step 3 outcomes.
Deliverables
- updated
docs/ver1/ver1-step1-2-carry-forward-checklist.mdevidence entries
Exit Criteria
- Step 3-owned carry-forward items are either completed or explicitly routed with evidence
Test and Validation Plan
Apply pytesting guidance with deterministic, behavior-focused coverage.
Validation Lanes
- Structure/collection:
uv run pytest --collect-only -q
- Fast feedback lane:
uv run pytest -m unit -q
- Main verification lane:
uv run pytest -m "not external" -q
- Full suite:
uv run pytest -q
Required Coverage Areas
- lifecycle transition invariants
- revision history invariants
- search query behavior and result mapping
- export integrity and failure handling
- UI interaction guards and actionable failure feedback
- API envelope and status consistency for new/changed flows
Test Design Rules
- one behavior target per test
- minimize heavy mocking; prefer real-path behavior checks where practical
- keep markers explicit and strict
Logging, Error, and Config Guardrails for Step 3 Changes
-
Logging
- keep centralized startup logging config (
dictConfig) as canonical - include required error fields at boundary failures (
error_id,category,operation, identifiers where available)
- keep centralized startup logging config (
-
Error handling
- preserve taxonomy stability from
docs/error_handling.md - map any new failure pathways into existing categories
- surface actionable suggestions in UI/API
- preserve taxonomy stability from
-
Configuration
- use typed settings and avoid ad-hoc env reads in business modules
- keep environment behavior explicit and documented
Implementation Order (Detailed)
- Workstream A: audit and backlog lock
- Workstream B: core flow completion
- Workstream C: revision/provenance completion
- Workstream D: search completion
- Workstream E: export completion
- Workstream F: API/UI parity hardening
- Workstream G: carry-forward integration updates
- Full validation pass + docs/traceability updates
Deliverables
- Step 3 requirement-slice matrix with REQ mapping and evidence links
- implemented Step 3 functional slices across service/persistence/API/UI
- updated tests and passing validation lanes
- updated carry-forward checklist entries (
CF-A1,CF-A3,CF-C1,CF-C2as applicable) - Step 3 results document (
docs/ver1/ver1-step3-results.md)
Risks and Mitigations
-
Risk: Scope creep from optional enhancements during feature completion
- Mitigation: enforce REQ-mapped slice backlog and defer non-REQ enhancements
-
Risk: Functional parity drift between UI and API
- Mitigation: maintain parity matrix and verify both surfaces per slice
-
Risk: Data-model changes introduce migration surprises
- Mitigation: coordinate with Step 4 runbook expectations early and test on representative data
-
Risk: Reliability regressions while adding functionality
- Mitigation: run full error-path regression checks and keep Step 2 contracts intact
Step 3 Completion Checklist
- Step 3 requirement-slice matrix completed and linked to REQ IDs.
- Core end-user flow is functionally complete and verified.
- Revision history/provenance behavior is complete and test-covered.
- Search over accepted transcripts is complete and test-covered.
- Export flow is complete and test-covered.
- API/UI parity checklist has no unresolved high-impact gaps.
- Step 3-owned carry-forward items are updated with evidence.
- Validation lanes pass (
collect-only, unit, non-external, full). docs/ver1/ver1-step3-results.mdis created with evidence and residual follow-ups.
Handoff to Step 4
Step 3 completion enables Step 4 (Data Model and Migration Safety) with:
- finalized functional domain behavior
- stable persistence expectations
- traceable requirement evidence
- clarified migration-impact surface