66 Commits

Author SHA1 Message Date
3eccab2cf9 docs: 文档治理统一 — AGENTS.md 生命周期规则 + 模块归档 + DDL 修正
1. AGENTS.md 更新
   - water-docs: 新增 specs/ 与 docs/design/ 生命周期规则章节
   - water-backend: 更新协作引用(建设期/建成后、evidence 模块化)

2. specs/ 重复合并
   - 006-reminder-event-design 合并入 003-rev006-reminder-event-design
   - 001-rev004-accounting 删除冗余 data-model.md + contracts/
   - 002-rev005-invoice-flow 删除冗余 data-model.md + contracts/

3. evidence 按模块归档
   - 35 个 REV-004 文件归入 evidence/rev004-accounting/
   - 7 个通用 bugfix 文件归入 evidence/bugfix/ 和 bugfix/frontend/
   - 新建 rev005-invoice/、rev006-reminder/、rev007-statistics/ 目录

4. guides/ 清理
   - 14 个 REV004_*.md 移入 evidence/rev004-accounting/

5. 遗留文件处理
   - docs/research/ 归档到 Archive/06_Migration_Plans/
   - backend-check detached worktrees 清理

6. 交叉引用修复
   - 006-reminder-event-design → 003-rev006-reminder-event-design
   - docs/guides/REV004_ → docs/evidence/rev004-accounting/REV004_

7. DB 设计文档修正(01_Database_Design.md)
   - biz_invoice 明确为开票配置表,非发票记录表
   - 新增 biz_invoice_record 为发票申请/结果主表
   - 新增 biz_charge_invoice_rel 账单-发票关联说明
   - REV-005 承接口径表名全部修正

8. 发票审计证据
   - 新增 evidence/rev005-invoice/2026-06-16-invoice-document-audit.md
2026-06-16 11:47:16 +08:00
4432a33be7 spec: 分账连续阶梯重算设计文档 2026-06-12 15:21:24 +08:00
9f027b9b7c docs: 预存余额功能测试结果归档 (2026-06-10) 2026-06-10 01:47:51 +08:00
08550406ad docs(evidence): add counter settle filter bugfix verification 2026-06-09 11:33:29 +08:00
9cbd9a8b75 docs: add revenue bugfix verification evidence 2026-06-08 20:46:46 +08:00
1823213a0b docs: add revenue bugfix frontend evidence 2026-06-08 19:40:18 +08:00
97c505a01c docs: add revenue bugfix implementation plan 2026-06-08 18:01:07 +08:00
256b431add docs: add revenue bugfix first batch design 2026-06-08 17:50:01 +08:00
3bc4e4184f docs(rev004): record accountprocess real wiring evidence 2026-06-05 14:46:34 +08:00
ad2fa59232 docs: record native tag guard evidence 2026-06-05 12:47:25 +08:00
c6af582095 docs(rev004): add superpowers workspace plans and specs 2026-05-18 17:38:01 +08:00
e5baed4487 docs(rev004): add guides and handoff documents 2026-05-18 17:37:56 +08:00
fca2d54566 docs(rev004): add development evidence records 2026-05-18 17:37:51 +08:00
107bba565f docs(rev004): add formal document snapshots (RWB-01~RWB-04) 2026-05-18 17:37:36 +08:00
7ea2d5cbc9 docs(rev004): formal write-back of design documents (RWB-01~RWB-04) 2026-05-18 17:37:31 +08:00
29e2ae36a2 Refresh writtenoff formal-table smoke evidence after reliability patch
This updates the REV004 writtenoff evidence with a fresh post-patch smoke run
covering submit, detail/page query, approve/reject, DB writeback, cleanup,
and runtime shutdown on port 48094.

Constraint: Evidence must reflect the final backend patch set actually pushed for PR #77
Rejected: Leave the earlier pre-patch smoke as the last evidence point | weaker proof for the final transaction/fail-fast tightening
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If writtenoff smoke is rerun again, append a new dated subsection instead of overwriting this verification trail
Tested: Fresh jar smoke on 48094 plus direct psql cleanup/readback verification on 2026-04-17
Not-tested: No separate document export/render pipeline run for this evidence refresh
2026-04-17 14:58:44 +08:00
fccb3a7cf8 Capture writtenoff formal-table dev-db evidence for REV004
This evidence snapshot records the application-dev target database, DDL apply
and replay status, targeted verification commands, fresh-jar smoke outcomes,
and cleanup proof for the writtenoff formal-table batch.

Constraint: Evidence must remain aligned with the backend writtenoff formal-table batch and the actual application-dev database
Rejected: Fold evidence into unrelated doc updates already present in this branch | would mix scopes and obscure traceability
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Update this evidence if later writtenoff smoke is rerun on a different port or with different seeded IDs
Tested: Reviewed against backend compile/test results and direct psql cleanup verification on 2026-04-17
Not-tested: No additional doc rendering/export pipeline run for this evidence-only change
2026-04-17 14:50:06 +08:00
cbecb60aed Record bad-debt formal-table rollout evidence for REV004
This adds the rollout evidence for REV004 bad-debt formal-table work,
covering DDL application, targeted verification, fresh-jar HTTP smoke,
and cleanup proof on the application-dev database.

Constraint: Evidence scope stays limited to bad-debt formal-table rollout and should not absorb unrelated REV004 docs backlog
Rejected: Wait to document until writtenoff/price-diff formalization lands | delays a completed bad-debt evidence slice
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: If later bad-debt semantics expand beyond payState write-back, append a new evidence note instead of rewriting this rollout record
Tested: Evidence content cross-checked against compile/test/DDL/HTTP smoke outputs captured in this session
Not-tested: No doc export/render verification performed
2026-04-17 12:33:27 +08:00
ee78477e8f Record prestorage formal-table rollout evidence for REV004
This documents the prestorage formal-table rollout status, including test DB
DDL application, HTTP smoke evidence, cleanup proof, and the updated
formal-table status matrix for REV004.

Constraint: Documentation must stay scoped to prestorage formal-table evidence and status updates only
Rejected: Fold unrelated REV004 evidence backlog into this commit | would dilute the deliverable and review scope
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: When process/attachments become strict formal-first, update the status matrix and evidence instead of replacing this rollout record
Tested: Evidence file cross-checked against backend compile/test/DB/HTTP smoke outputs
Not-tested: No independent docs rendering/export verification performed
2026-04-17 10:52:11 +08:00
35f2f9b76c Record REV004 late-fee formal-table deployment and canary evidence
This documents that the formal-table deploy SQL has been applied to the
application-dev database, that the previous real-db blocker is resolved,
and that the date-mode late-fee reduce canary now passes against the
test database.

Constraint: Evidence must match the verified dev database and latest canary output
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: Keep evidence updates aligned with the exact environment and command outputs used for verification
Tested: Evidence cross-checked against psql deployment output and fresh canary pass
Not-tested: No additional business flow beyond the documented late-fee date-mode canary
2026-04-15 16:14:03 +08:00
d0ee1cbc17 Align REV004 dictionaries with current interface semantics
Document the minimal dictionary additions and field-binding rules needed to
let REV004 front-end queries and dropdowns use system-managed object and
status semantics while continuing to reuse the existing legacy reason/type
dictionaries.

Constraint: Existing dictionary taxonomy must remain stable for historical pages
Constraint: REV004 needs explicit object/status dictionaries plus a redink reason set for FE binding
Rejected: Rename legacy dictionaries into a new unified taxonomy | too broad for this delivery and risks breaking existing pages
Rejected: Keep object/status values as code-only enums | insufficient for frontend dictionary binding
Confidence: high
Scope-risk: narrow
Reversibility: clean
Directive: `payment_reason` is only a transitional binding for `WRITTENOFF_ADJUST`; introduce a dedicated writtenoff reason dictionary only when that object stabilizes long-term
Tested: Applied `sql/rev004_account_adjust_dict_seed.sql` to sw_system test DB and verified inserted dict types/data
Not-tested: Frontend page consumption against the new dictionary bindings
2026-04-07 17:53:47 +08:00
9d2ecf1cf6 docs: align planb deployment design with reviewed topology 2026-04-02 17:30:06 +08:00
5a1abd4c03 docs: update planb integrated deployment assets 2026-04-01 15:51:07 +08:00
f8b75f7771 docs: import bank api archive and openapi tooling 2026-03-27 10:12:47 +08:00
dc4d2b8655 docs: split plan b deployment guidance from pg16 dr application 2026-03-27 10:12:40 +08:00
5f20c5794c docs: add rev-004 legacy finance migration planning artifacts 2026-03-27 10:12:34 +08:00
327c74c27b docs: align sys-009 design with implementation evidence 2026-03-27 10:12:29 +08:00
6538379f1e docs: add speckit workflow and capability map guides 2026-03-27 10:12:14 +08:00
c85550ffde docs: add integrated deployment planb doc and docx 2026-03-26 18:42:53 +08:00
09b8a8e3d9 docs: record Nuoshuitong progress update
Add the Nuoshuitong documentation outputs to the project progress ledger so the documentation lane has a traceable handoff point for review and follow-on implementation work.

Constraint: Keep this update limited to governance tracking for the newly added Nuoshuitong design pack
Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:51:29 +08:00
3fee9a2c18 docs: add Nuoshuitong integration design pack
Add a Nuoshuitong documentation set covering the implementation checklist, split interface spec notes, normalized enums, and database/DDL guidance so follow-on integration can start from a consistent source of truth.

Constraint: Current phase is documentation-first and must not require backend/frontend code changes
Rejected: Merge the material directly into formal master design docs now | would broaden scope before the integration model and dialect strategy are reviewed
Directive: Treat these guides as integration-layer inputs until they are reconciled with formal technical design masters
Confidence: high
Scope-risk: moderate

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 17:50:46 +08:00
ef8834dfb9 docs: add pg16 dr resource application doc 2026-03-24 15:50:36 +08:00
09b955d0ac docs: finalize 010 bank transfer config 2026-03-24 12:04:39 +08:00
8d65d6da49 docs: align rev006 reminder design closure 2026-03-19 14:05:42 +08:00
20afae2255 docs: align rev002 billing generation evidence
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>
2026-03-18 17:52:15 +08:00
f6fd550545 docs: close rev007 statistics design alignment 2026-03-18 16:30:23 +08:00
930459abcb docs: close rev006 reminder design alignment 2026-03-18 16:04:44 +08:00
958c05d0fc docs: align module numbering with architecture 2026-03-18 15:09:59 +08:00
d8b2416f12 docs: 补齐 REV-005 作废红冲设计与任务
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 12:36:50 +08:00
19b4b749ab docs: 完善 REV-005 verify 联调准备材料
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 11:57:04 +08:00
54d7b0f569 docs: 更新 REV-005 台账并补充 SYS-002 拆解总表
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:25:40 +08:00
91f37d6622 docs: 收口 REV-005 US4 边界与验证记录
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 10:22:56 +08:00
82d307bda6 docs: 补齐 REV-005 发票闭环设计与任务台账
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-17 00:45:21 +08:00
a26f65a3d8 docs: 收口 REV-004 一期正式文档与交付闭环
统一 REV-004 一期范围、接口口径、数据库承接口径与追溯关系,
并补齐执行手册、quickstart、tasks 及治理台账,完成可执行交付闭环。
2026-03-13 15:02:29 +08:00
524865cb41 docs: 补齐SYS-002高优先接口字段定义 2026-03-12 10:22:30 +08:00
12698c0f37 docs: 同步INST模块模板与开发闭环 2026-03-12 10:01:58 +08:00
c8f0024046 docs: 同步METER模块模板与接口追溯 2026-03-11 19:12:22 +08:00
5a0488f885 docs: 同步CS模块模板与接口追溯 2026-03-11 18:39:44 +08:00
2f580f26d8 docs: 补完REV模块详细设计与追溯映射 2026-03-11 17:44:19 +08:00
69ad12837e docs: 完成P2标签化与AI抽检自动化 2026-03-11 17:29:40 +08:00