Commit Graph
2 Commits
Author SHA1 Message Date
Jesse_ChenandClaude Opus 5 e4788dfc00 docs(tasks): 换掉两条增长冻结口径 + page.tsx 状态下沉第一簇 + C1 提前
产品 2026-09-15 三项拍板,落成两份新单与两处既有单的修订:

- 新增 TASK-freeze-metric-change-20260915(无 BUG 号,后面两单的前置):
  两条冻结余量已用完(page.tsx 1951/1951 余 0;api server 11334/11363 余 29),
  冻结从「逼新代码往外走」退化成拦路。实证:page.tsx 行数砍 59% 但 Home()
  的 useState 从 56 涨到 66;api server 225 个类方法只有 12 处真碰 HTTP。
  主门换成耦合指标,行数降为粗护栏;同时推翻 §6「参数式 hook 内部保持
  0 个 React hook」——那正是状态搬不走的原因。
- 新增 TASK-home-state-lowering-20260915(无 BUG 号):先搬 rectification*
  那 15 个 state 进已经是 dynamic 子树的校正面,Home() useState 66 → ≤53。
  零行为变化;串行在 freeze-metric-change + C2 + R3 之后。
- 修订 TASK-consultation-external-evidence-cache-20260915:依赖反转,C1 排在
  API server 拆解之前(它动模块级函数,拆解动类方法);补「不得新增类方法、
  行数余量仅 29」的硬红线。
- 修订 TASK-api-server-decomposition-20260916:串行依赖加 C1 与
  freeze-metric-change;__new__ 计数按 grep 的 4 计(原文 3 是文件数);
  阶段 4 收尾口径改写;基线 11,314 → 11,334。

纯文档推送,不触发门禁、不发布镜像、不部署。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-15 23:15:37 +00:00
Jesse_ChenandClaude Opus 5 4cacea8eb1 docs(tasks): brief the api server decomposition
The line-count cap is nearly spent (11314 of 11363), but counting lines
misreads the problem. Three call sites outside the HTTP layer reach the
business logic by doing JyotishAPIHandler.__new__ on an uninitialised
handler — consultation_workflow_service twice, which is what MCP calls,
plus the golden capture and the offline accuracy report. The declared
"shared boundary" module imports back into the monolith, so the
dependency arrow points the wrong way and new logic has nowhere to land
except that class.

Four phases: remove the __new__ backdoor, extract the remaining methods
over 150 lines, replace the 72-branch elif dispatch with a table, then
re-freeze the baseline with a 50-line allowance instead of 300. Pure
relocation; the 3841-line security suite is the safety net and none of
its assertions may change. Serial after the qizheng brief, which owns
the file until it merges.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
2026-09-15 07:19:05 +00:00