Document the existing REV-002 backend billing-generation path and preserve a conservative partial-implementation judgment so the design stays aligned with current code evidence. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8.7 KiB
Tasks: REV-002 开账计费与账单生成缺口补齐
Input: Design documents from /specs/005-rev002-billing-generation-gap/
Prerequisites: plan.md (required), spec.md (required), research.md, data-model.md, contracts/, quickstart.md
Validation: Validation tasks are NOT optional in this repository. Every document change task set MUST include the applicable validation and ledger-sync tasks.
Organization: Tasks are grouped by user story so each document-maintenance slice can be completed, reviewed, and validated independently.
Format: [ID] [P?] [Story] Description
- [P]: Can run in parallel (different files, no dependencies)
- [Story]: Which user story this task belongs to (e.g., US1, US2, US3)
- Include exact file paths in descriptions
Phase 1: Scope & Source Confirmation (Shared Foundation)
Purpose: Confirm the source-of-truth set, scope boundaries, and cross-document impact before editing.
- T001 Confirm target documents and target sections in
/Volumes/Dpan/github/fujian_water_biz_doc/specs/005-rev002-billing-generation-gap/spec.md - T002 Confirm authoritative sources and allowed reference inputs in
/Volumes/Dpan/github/fujian_water_biz_doc/specs/005-rev002-billing-generation-gap/plan.md - T003 [P] Confirm fixed decisions for
IF-REV-005、账单结果承接和异常语义 in/Volumes/Dpan/github/fujian_water_biz_doc/specs/005-rev002-billing-generation-gap/research.md - T004 [P] Confirm entities, contract fields, and validation commands in
/Volumes/Dpan/github/fujian_water_biz_doc/specs/005-rev002-billing-generation-gap/data-model.md,/Volumes/Dpan/github/fujian_water_biz_doc/specs/005-rev002-billing-generation-gap/contracts/rev002-billing-contract.md, and/Volumes/Dpan/github/fujian_water_biz_doc/specs/005-rev002-billing-generation-gap/quickstart.md
Phase 2: User Story 1 - 收口开账生成规则 (Priority: P1) 🎯 MVP
Goal: 补齐 REV-002 详细设计中的开账触发前提、规则来源、结果表达、特殊开账统一模型和排除项。
Independent Test: 单独评审 docs/design/02_Detailed_Design/12_REV_Detailed.md 的 REV-002 章节,应能明确账单生成入口、价格规则来源、费用组成、异常阻断语义和下游边界。
Implementation for User Story 1
- T005 [US1] Read
docs/design/00_Management/01_Project_Progress.md,docs/design/00_Management/02_Delivery_Standards.md,docs/design/00_Management/03_Task_Checklist.md, anddocs/design/02_Detailed_Design/12_REV_Detailed.mdbefore editing - T006 [US1] Update
docs/design/02_Detailed_Design/12_REV_Detailed.mdto defineREV-002billing trigger path, billing rule sources, result expression, special-billing inclusion, and explicit exclusions - T007 [US1] Sync
REV-002wording indocs/design/01_Overview/03_Summary_Design.mdonly if detailed-design terms or boundaries need matching references - T008 [US1] Run
make validate-file FILE=docs/design/02_Detailed_Design/12_REV_Detailed.mdand capture the result in work notes - T009 [US1] Run
make check-linksifdocs/design/02_Detailed_Design/12_REV_Detailed.mdheadings, anchors, or cross-document links changed and capture the result in work notes
Checkpoint: REV-002 detailed design is independently reviewable and no longer stops at summary-level billing wording.
Phase 3: User Story 2 - 统一 IF-REV-005 与数据承接口径 (Priority: P2)
Goal: 统一接口主文档和数据库主文档中的 IF-REV-005、账单结果承接和异常边界口径。
Independent Test: 单独评审 docs/design/03_Technical_Design/03_Interface_Design.md 与 docs/design/03_Technical_Design/01_Database_Design.md,应能明确请求条件、结果语义、异常阻断逻辑以及 biz_charge / biz_charge_detail 承接口径。
Implementation for User Story 2
- T010 [US2] Update
docs/design/03_Technical_Design/03_Interface_Design.mdto defineIF-REV-005request preconditions, response semantics, exception semantics, and boundary with downstream charging flow - T011 [US2] Update
docs/design/03_Technical_Design/01_Database_Design.mdto alignbiz_charge,biz_charge_detail, pricing-rule objects, and historical/special billing retention with the approvedREV-002model - T012 [P] [US2] Sync numbering, terminology, and cross-references between
docs/design/03_Technical_Design/03_Interface_Design.mdanddocs/design/03_Technical_Design/01_Database_Design.md - T013 [US2] Run
make validate-file FILE=docs/design/03_Technical_Design/03_Interface_Design.mdand capture the result in work notes - T014 [US2] Run
make validate-file FILE=docs/design/03_Technical_Design/01_Database_Design.mdand capture the result in work notes - T015 [US2] Run
make check-linksafter interface/database cross-reference updates and capture the result in work notes
Checkpoint: IF-REV-005 and database retention are independently reviewable and use one consistent billing-generation model.
Phase 4: User Story 3 - 同步治理与实现评估结论 (Priority: P3)
Goal: 在治理台账中回写 REV-002 本轮设计收口结果,并保持“部分实现”的真实实现评估。
Independent Test: 单独评审治理文档,应能明确本轮已完成的是文档收口,不是 backend 闭环实现完成,并能看到后续建议与校验记录。
Implementation for User Story 3
- T016 [US3] Update
docs/design/00_Management/15_SYS002_Requirement_Breakdown.mdto retain the部分实现judgment and add this round's design-closure result and next-step recommendation - T017 [US3] Update
docs/design/00_Management/01_Project_Progress.mdto record theREV-002documentation alignment action and validation outcome - T018 [US3] Update
docs/design/00_Management/03_Task_Checklist.mdto reflect the completedREV-002document-maintenance tasks - T019 [US3] Run
make validate-file FILE=docs/design/00_Management/15_SYS002_Requirement_Breakdown.mdand capture the result in work notes - T020 [US3] Run
make validate-file FILE=docs/design/00_Management/01_Project_Progress.mdandmake validate-file FILE=docs/design/00_Management/03_Task_Checklist.mdand capture the results in work notes
Checkpoint: Governance documents are independently reviewable and preserve the correct “部分实现” narrative.
Final Phase: Cross-Cutting Closure
Purpose: Ensure repository-wide consistency after all story slices are complete.
- T021 [P] Re-check source-of-truth alignment across
docs/design/02_Detailed_Design/12_REV_Detailed.md,docs/design/03_Technical_Design/03_Interface_Design.md,docs/design/03_Technical_Design/01_Database_Design.md, anddocs/design/00_Management/15_SYS002_Requirement_Breakdown.md - T022 [P] Re-check relative links, stable anchors, and numbering consistency across all modified files with
make check-links - T023 Prepare final summary from
/Volumes/Dpan/github/fujian_water_biz_doc/specs/005-rev002-billing-generation-gap/quickstart.mdand actual validation results, including modified files, remaining risks, and next-step suggestions
Dependencies & Execution Order
Phase Dependencies
- Phase 1: No dependencies; MUST finish before document edits
- User Story 1: Depends on Phase 1 and provides the billing-rule baseline for later phases
- User Story 2: Depends on User Story 1 wording being stable
- User Story 3: Depends on User Story 1 and User Story 2 conclusions being fixed
- Final Phase: Depends on all selected user stories being complete
Within Each User Story
- Read required governance and target docs before editing
- Complete target document edits before terminology and reference sync
- Complete content edits before validation
- Complete validation before governance ledgers are considered closed
Parallel Opportunities
T003andT004can run in parallel during foundation reviewT012can run in parallel with validation preparation once interface and database edits are draftedT021andT022can run in parallel during final closure
Implementation Strategy
- MVP first: 先完成 User Story 1,使
REV-002详细设计具备独立评审价值 - Incremental delivery: 再完成 User Story 2 收口接口与数据库,最后完成 User Story 3 的治理同步
- Validation-first closure: 每个 story 完成后立即执行对应校验,再推进下一阶段,避免跨文档口径回滚
Notes
- 本 feature 只做文档治理,不默认修改 backend 代码
- 不得新发明
IF-*编号或“特殊开账平行主表” - Archive 仅用于核对来源,不直接替代正式结论
specs/001-rev004-accounting/checklists/scope-alignment.md与本轮无关,不应纳入本 feature 变更