M0: 工作区骨架 + 五道门禁 + 环境自举

- pnpm workspaces / tsconfig 双工程(node · web)/ 路径别名(§11.1)
- eslint flat(§11.3 + §12.5 可机检项)/ dependency-cruiser 基线八条 + JCAI 增补(§11.4)
- tools/module-tiers.json + gen-depcruise-tiers.ts 生成 tier-order 逐层规则
- tools/api-report.mjs 契约快照只留契约面(ADR-005)
- docker-compose(PG16)+ db/init 四 schema;种子数据五岗位五员工冻结为常量
- docs/debt.md · docs/adr/ADR-005

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
JCAI Main Agent
2026-07-27 00:18:58 +08:00
co-authored by Claude Opus 5
commit 7cd664af3a
50 changed files with 9052 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
/**
* @utils —— 纯函数,零依赖(编码规范 §2 / §5.1:叶子包)。
* 无业务语义;有业务语义的东西不属于这里。
*/
/** 穷尽性检查:switch 漏分支时编译期报错 */
export declare function assertNever(value: never, message?: string): never;
/** 类型守卫:滤掉 null / undefined */
export declare function isDefined<T>(value: T | null | undefined): value is T;
/** 按键分组 */
export declare function groupBy<T, K extends string>(items: readonly T[], key: (item: T) => K): Record<K, T[]>;
/** 稳定排序的键值对遍历(避免 Object.keys 顺序依赖) */
export declare function sortedEntries<V>(record: Readonly<Record<string, V>>): Array<[string, V]>;