Skip to content

[Decision] Two states in DESIGN.md §03 are dead ends: a started obligation cannot go overdue, a partly paid instalment cannot be completed #10

Closed

Description

@hotlong

维护者速读

事情:设计方案第 7 章的两张子状态机各缺一条边,卡 03 照着实现后暴露出来:

  1. 已开始的义务永远不能标记为逾期。 「未开始」可以变逾期,「进行中」不行。而卡 09 的每日任务要扫的恰恰主要是这类行。
  2. 部分付款的期次永远不能变成已付清。 partial 一条出边都没有,是个死胡同。

两条都不是实现错误——开发 agent 照文档一字不差地实现了,然后把问题提出来,没有擅自加边。改文档要你点头。

选项:

  • 1A(推荐):补上「进行中 → 逾期」。理由:「已开始但迟了」比「没开始且迟了」更糟,后者能标逾期而前者不能,说不通。
  • 1B:确认这是有意的,进行中的义务靠到期日提醒而不进逾期,并把这条写进文档,免得以后被当 bug。
  • 2A(推荐):补上「部分付款 → 已付清」,可能还要「部分付款 → 逾期」。
  • 2B:确认部分付款就是终态,余款另开一期新行;这个逻辑自洽,但必须写明。

你要做的:回两个字母,比如「1A 2A」。


The two gaps, verbatim from DESIGN.md §03

- `clm_obligation.status`:pending→in_progress/done/waived/overdue;overdue→done/waived;in_progress→done/waived
- `clm_payment_plan.status`:planned→due→partial/paid/overdue;overdue→partial/paid

Governing text: DESIGN.md §03 (the two lines above); AGENTS.md → Delivery process → a code PR never touches DESIGN.md §01–§04 without a needs-user-decision first.

Card 03 (#3, PR #9) implemented both tables literally. in_progress: ['done', 'waived'] and partial: [] are in the merged hook today, refusing anything else with 422 INVALID_STATE. Nothing is broken; the product simply cannot express two states a user will reach.

Question 1 — obligations

pending → overdue is drawn. in_progress → overdue is not. So an obligation nobody has touched can be marked late, and one someone has started cannot.

Option Consequence
1A — add the edge Card 09's daily sweep can flag every late obligation. One line in §03, one entry in the machine.
1B — confirm it is deliberate Started work is chased through its due date, never moved into arrears. Card 09 must then skip in_progress rows, and §03 has to say so, or the next reader files it as a bug.

Recommendation: 1A. The asymmetry is hard to read as intent, and the state it excludes is the more serious one.

Question 2 — payment instalments

partial has no outgoing edge at all. Elsewhere §03 marks terminal states explicitly; here it is terminal only by omission.

Option Consequence
2A — add partial → paid (and probably partial → overdue) The row settles where it started. Matches how a person describes it: "they paid half, then the rest."
2B — confirm partial is terminal The remainder is a further instalment row. Coherent, and it fits the unique (contract, seq) shape, but it must be stated — "partial" as a permanent resting state reads as a dead end.

Recommendation: 2A, or 2B stated explicitly. Either works; the silence does not.

四棱分析(两问共用,差异已注明)

实际业务需求 — 偏 A。两条都是真实会走到的路径:一份已经在做的义务照样会迟;一笔分两次付的款照样要有付清的那一刻。第二问的 B 选项是有业务原型的(按期次逐行结清,每行只结一次),所以它不是错的,只是必须说出来;第一问的 B 选项则要求「已开始的事不进逾期」,这在法务催办的语境里很难成立。

项目长远合理性 — 偏 A,但两问不同。设计文档现在自相矛盾的方式不一样:第一问是不对称(同一张表里,更轻的状态能进逾期,更重的不能),第二问是沉默(别处显式标注终态,这里靠省略)。不对称更像笔误,沉默更可能是没想完。两者都该由文档给出答案而不是留给下游卡片猜。

防 AI 写错 — 这一棱最偏 A,而且是两问里唯一有强弱之分的。卡 09 的每日任务将来要写「把逾期的行标出来」,如果 §03 保持沉默,那张卡的开发 agent 会面对一个它无权解决的矛盾:要么漏掉进行中的行(静默少报),要么自己加边(擅自扩大治理面)。两条路都坏。开发 agent 自己在报告里点了这一点,并明确说选项 C(留给卡 09 决定)是唯一要避免的。我同意:把矛盾往下游推,就是把它推给一个更没有权限、也更有压力悄悄编一个答案的位置。

创业阶段不扩散 — 中性偏 A。第一问加一条边不是新增能力面,是让已声明的能力可达。第二问的 2A 同理;2B 反而更省事(零改动),但它把「余款怎么记」这个问题从状态机挪到了业务约定上,省下的是代码不是决定。

结论:第一问四棱同向 1A。第二问 2A 与 2B 都可接受,但沉默不可接受;四棱里只有「不扩散」略微偏 2B,其余三棱要求任选其一并写进文档。

Impact if deferred

Card 09 (F13/F14 and the daily sweeps) is the consumer and is not yet dispatched. Answering before it is dispatched costs nothing; answering after means a second pass over contract.hook.ts and a §03 edit anyway. Decision card #6 (termination_reason) touches the same file and the same section — answering both together makes them one edit.

Activity

  1. zhuangjianguo commented on Sep 9, 2026

    @zhuangjianguo
    Collaborator

    裁定:1A + 2A —— 两条边都补

    维护者裁决,2026-09-09,常设决裁批第 1 批,逐字:

    第 1 批 平台的问题去平台修,业务的问题按照你的意见。

    本卡两问都是业务问题(设计方案第 3 章的两张状态表自身不完整,与平台能力无关)⇒ 按席位推荐 1A + 2A。

    • 1A:补 in_progress → overdue。已开始但迟了的义务可以被标逾期 —— 消除「更轻的状态能进逾期、更重的不能」这个不对称。
    • 2A:补 partial → paid(以及 partial → overdue)。付了一半的款可以结清,也可以转逾期 —— partial 不再是死胡同。

    Governing text(录裁前重跑):DESIGN.md §03 两行状态表(clm_obligation.status / clm_payment_plan.status);AGENTS.md → 代码 PR 不得在无 needs-user-decision 的情况下改 §01–§04。该前置条件现已满足。

    鲜度门:正文最后编辑 2026-09-07T13:25:41Z,其后本卡零评论。

    裁后执行

    1. §03 编辑(受管面,随折叠的设计文档 PR,链首 [Decision] DESIGN.md §03 requires a termination reason but declares no field for it #6):两行状态表各加边 —— in_progress→done/waived/overdue;partial→paid/overdue。
    2. 代码落地:随卡 09。合同 hook 里 in_progress: ['done','waived'] 改为含 'overdue',partial: [] 改为 ['paid','overdue']。
    3. 卡 09 的每日巡检据此写:扫逾期时包含 in_progress 行 —— 这正是本卡防错轴点名要避免的静默少报。

    状态转换:needs-user-decision → pm:queue(同一笔标签写入)。

    ⚠️ 一条随裁执行的附带要求:本卡明写「2B 也可接受,但沉默不可接受」。裁定取 2A,所以沉默问题自动消失——partial 有了出边,不再需要在文档里解释它为什么是终态。⛔ 不需要额外的文档补丁。


    Generated by Claude Code

  2. self-assigned this
    on Sep 9, 2026
  3. zhuangjianguo commented on Sep 9, 2026

    @zhuangjianguo
    Collaborator

    Claim: PM loop round 2 (seat repo:hotclm) — member of a folded family dispatch; chain head is #6.

    Session: session_01R3n3GGzobdegM4HUzah1iR
    Branch: claude/issue-6-design-rulings (shared with #6 and #14 — named for the chain head)
    Worktree: hotclm-issue-6
    Domain: repo:hotclm
    File surface: DESIGN.md §03 only — the two state-table rows
    Container & model: S, mode:subagent, model: default judgement tier
    Clause-②: no
    Thread-read: 5604409219 (this seat's ruling comment on this card, 2026-09-09T15:0xZ)
    Serial constraints cleared: see the chain-head claim on #6 for the full check and the five folding gates. In flight alongside: #39 (card 09), file-surface disjoint (src/ vs DESIGN.md).

    This card's share of the shared PR: clm_obligation.status gains in_progress → overdue; clm_payment_plan.status gains partial → paid and partial → overdue. The code half (the hook's transition map) lands in #39, so the PR here carries Refs #10, ⛔ not Fixes — this card closes when #39 lands.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions