M6(3/n): minute 与 report —— L8 两个模块补齐

minute(纪要):工作台五要素里唯一的主动动作。
  纪要本身不产生责任,唯一通往责任的路是决议经登记触发起单 —— 登记人即来源。
  正文可续、决议只增;同一决议不重复起单(起单一刻已有一条带来源的流在跑)。

report(汇报):日/周/月/年对任务日志的聚合投影,零手工汇报。
  未提交的草案每次取回都重算 —— 汇报是投影不是账本,提交那刻才固定为事实快照。
  度量八指标落在这里(§4 注:度量是只读投影,不设独立模块):
  自主率 / 纠正率 / 有效自主率 / 打扰率 / 断点率 / DMN 覆盖率 / 单位成本 / 终态分布。
  口径全部挂归侧标签与事件流,零埋点;单位成本的分母只认放行通过。
  周窗口以周一为首日,按 UTC 切分(单组织单时区)。

FactSource 只读 memory 与 task,一行都不另记 —— 五要素同源。

gates: tsc / eslint / depcruise(305 模块)/ api-report / 377 测试 全绿
日报已在真实系统上由 A1 任务日志聚合出来,含治理干预两行

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
2026-07-27 03:39:10 +08:00
co-authored by Claude Opus 5
parent a9cd6d10c7
commit a60acb2e02
37 changed files with 5495 additions and 2 deletions
+33
View File
@@ -0,0 +1,33 @@
/**
* module: minute 的外部所需(编码规范 §10.1)。
* 「port 声明本模块需要外界提供什么」—— 由 app 层注入,模块自己不认实现。
*/
import type { StaffId } from '@contracts';
import type { Minute } from './internal/domain/minute.ts';
export type MinuteStore = {
list(limit: number): Promise<Minute[]>;
get(minuteId: string): Promise<Minute | undefined>;
save(minute: Minute): Promise<void>;
};
/** 登记起单 —— app 注入 `process`(L7):经调用接口调起流程包,不碰流程内部 */
export type RegistrationGateway = {
start(input: {
processPackageId: string;
subject: string;
data: Record<string, unknown>;
/** 来源:登记人 */
byId: StaffId;
}): Promise<{
workflowId: string;
}>;
};
export type MinuteDeps = {
readonly store: MinuteStore;
readonly registration: RegistrationGateway;
readonly ids: {
next(): string;
};
readonly clock: {
now(): Date;
};
};