- 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
238 lines
8.9 KiB
JavaScript
238 lines
8.9 KiB
JavaScript
/* eslint-disable */
|
|
/**
|
|
* 本文件由 tools/gen-depcruise-tiers.ts 从 tools/module-tiers.json 生成。
|
|
* 请勿手改 —— 改层级请改 module-tiers.json 与 编码规范.md §4,然后 pnpm gen:tiers。
|
|
*/
|
|
module.exports = [
|
|
{
|
|
"name": "tier-order-activity-registry",
|
|
"comment": "模块 activity-registry(L4)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/activity-registry/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(flow-engine|loop-engine|minute|process|release|report|skill-engine|task|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-channel",
|
|
"comment": "模块 channel(L2)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/channel/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|flow-engine|human-tool|interaction|loop-engine|memory|message|minute|process|release|report|skill-engine|task|toolbox|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-event",
|
|
"comment": "模块 event(L1)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/event/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|channel|flow-engine|human-tool|interaction|ledger|llm|loop-engine|memory|message|minute|org|process|release|report|skill-engine|task|toolbox|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-flow-engine",
|
|
"comment": "模块 flow-engine(L5)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/flow-engine/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(loop-engine|minute|process|report|task|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-human-tool",
|
|
"comment": "模块 human-tool(L3)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/human-tool/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|flow-engine|interaction|loop-engine|minute|process|release|report|skill-engine|task|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-interaction",
|
|
"comment": "模块 interaction(L3)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/interaction/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|flow-engine|human-tool|loop-engine|minute|process|release|report|skill-engine|task|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-ledger",
|
|
"comment": "模块 ledger(L1)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/ledger/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|channel|event|flow-engine|human-tool|interaction|llm|loop-engine|memory|message|minute|org|process|release|report|skill-engine|task|toolbox|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-llm",
|
|
"comment": "模块 llm(L1)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/llm/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|channel|event|flow-engine|human-tool|interaction|ledger|loop-engine|memory|message|minute|org|process|release|report|skill-engine|task|toolbox|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-loop-engine",
|
|
"comment": "模块 loop-engine(L5)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/loop-engine/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(flow-engine|minute|process|report|task|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-memory",
|
|
"comment": "模块 memory(L2)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/memory/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|channel|flow-engine|human-tool|interaction|loop-engine|message|minute|process|release|report|skill-engine|task|toolbox|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-message",
|
|
"comment": "模块 message(L2)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/message/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|channel|flow-engine|human-tool|interaction|loop-engine|memory|minute|process|release|report|skill-engine|task|toolbox|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-minute",
|
|
"comment": "模块 minute(L8)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/minute/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(report)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-org",
|
|
"comment": "模块 org(L1)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/org/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|channel|event|flow-engine|human-tool|interaction|ledger|llm|loop-engine|memory|message|minute|process|release|report|skill-engine|task|toolbox|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-process",
|
|
"comment": "模块 process(L7)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/process/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(minute|report|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-release",
|
|
"comment": "模块 release(L4)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/release/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|flow-engine|loop-engine|minute|process|report|skill-engine|task|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-report",
|
|
"comment": "模块 report(L8)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/report/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(minute)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-skill-engine",
|
|
"comment": "模块 skill-engine(L4)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/skill-engine/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|flow-engine|loop-engine|minute|process|release|report|task|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-task",
|
|
"comment": "模块 task(L6)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/task/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(minute|process|report|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-toolbox",
|
|
"comment": "模块 toolbox(L2)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/toolbox/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(activity-registry|channel|flow-engine|human-tool|interaction|loop-engine|memory|message|minute|process|release|report|skill-engine|task|trigger)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "tier-order-trigger",
|
|
"comment": "模块 trigger(L7)只准依赖更低层级模块;同层互需一律 port + app 装配(编码规范 §4 / §5.2)",
|
|
"severity": "error",
|
|
"from": {
|
|
"path": "^apps/api/src/modules/trigger/"
|
|
},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/(minute|process|report)/"
|
|
}
|
|
},
|
|
{
|
|
"name": "module-registered-in-tiers",
|
|
"comment": "modules/ 下的每个模块必须登记在 tools/module-tiers.json(编码规范 §16)",
|
|
"severity": "error",
|
|
"from": {},
|
|
"to": {
|
|
"path": "^apps/api/src/modules/([^/]+)/",
|
|
"pathNot": "^apps/api/src/modules/(activity-registry|channel|event|flow-engine|human-tool|interaction|ledger|llm|loop-engine|memory|message|minute|org|process|release|report|skill-engine|task|toolbox|trigger)/"
|
|
}
|
|
}
|
|
];
|