三面拆分①:surface 配置与区表 —— 归属/亮灯/旧链改写皆纯函数先测后写

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
2026-07-27 20:50:32 +08:00
co-authored by Claude Fable 5
parent ac85ecf2ea
commit e578b5bc34
6 changed files with 309 additions and 50 deletions
+79 -41
View File
@@ -22,24 +22,69 @@ export type Route =
| { k: 'llm'; id: string }
| { k: 'chan'; id: string };
/** 九功能 —— 每一项对应架构中的一件,治理台由此覆盖全部五层 */
export const GOV_ZONES = ['tasks', 'people', 'workflows', 'triggers', 'library', 'tools', 'data', 'memory', 'system'] as const;
/**
* 十一区 —— 分属两个台面(见 `surfaces.ts`):
* 设计中心定义企业(战略 → 方法 → 能力 → 对象),运营中心看企业跑。
* 触发器不再独立成区:定义并入 workflows,启停并入 tasks;
* 记忆一分为二:度量升为 cockpit 首页,活动记忆归 knowledge。
*/
export const GOV_ZONES = [
// 设计中心
'blueprint',
'workflows',
'library',
'tools',
'data',
// 运营中心
'cockpit',
'tasks',
'people',
'ledgers',
'knowledge',
'system',
] as const;
export type GovZone = (typeof GOV_ZONES)[number];
export const ZONES: ReadonlyArray<{ key: GovZone; label: string; icon: string }> = [
{ key: 'blueprint', label: '蓝图', icon: 'route' },
{ key: 'workflows', label: '流程包', icon: 'workflow' },
{ key: 'library', label: '活动库', icon: 'boxes' },
{ key: 'tools', label: '工具箱', icon: 'wrench' },
{ key: 'data', label: '数据域', icon: 'database' },
{ key: 'cockpit', label: '驾驶舱', icon: 'gauge' },
{ key: 'tasks', label: '任务', icon: 'activity' },
{ key: 'people', label: '员工', icon: 'users' },
{ key: 'workflows', label: '工作流', icon: 'workflow' },
{ key: 'triggers', label: '触发器', icon: 'zap' },
{ key: 'library', label: '活动库', icon: 'boxes' },
{ key: 'tools', label: '工具', icon: 'wrench' },
{ key: 'data', label: '数据', icon: 'database' },
{ key: 'memory', label: '记忆', icon: 'layers' },
{ key: 'ledgers', label: '台账', icon: 'database' },
{ key: 'knowledge', label: '知识库', icon: 'layers' },
{ key: 'system', label: '系统', icon: 'settings' },
];
/** 区元信息:标题 / 定位说明 / 主色 —— 说明文取自两卷规范,不是装饰 */
export const ZM: Readonly<Record<GovZone, { title: string; desc: string; accent: string; icon: string }>> = {
blueprint: {
title: '企业蓝图',
icon: 'route',
accent: 'linear-gradient(140deg,#4954e6,#232b6e)',
desc: '战略 → 方法 → 能力 → 对象:流程包决定企业以哪些流转运转,活动库决定每件事怎么干,工具箱决定系统能对世界做什么,数据域决定企业运营什么。四库的健康度与待补清单聚在这一屏——设计者看的是定义完不完整,不是今天忙不忙。',
},
cockpit: {
title: '经营驾驶舱',
icon: 'gauge',
accent: 'linear-gradient(140deg,#12b886,#0b7a5c)',
desc: '看企业今天跑得怎样:度量八指标(自主率与纠正率成对读,复合为有效自主率)+ 异常面(异常工作流、需处置件数)。指标零埋点——全部由留痕投影而来,点数字直达处置页。',
},
ledgers: {
title: '台账管理',
icon: 'database',
accent: 'linear-gradient(140deg,#245bdb,#16307a)',
desc: '行数据 · 版本 · 引用——域的 schema 在设计中心改,这里做运营动作。导航按数据域动态生成:设计侧一发布新域,运营侧自动长出一位。',
},
knowledge: {
title: '知识库',
icon: 'layers',
accent: 'linear-gradient(140deg,#f14ba9,#c92d86)',
desc: '活动记忆四层 + 技能资产 + 候选增量的回放与放行。记忆的终点是成为模型——候选增量必经回放与人放行,这里是那道人工放行口。',
},
tasks: {
title: '任务管理',
icon: 'activity',
@@ -53,40 +98,28 @@ export const ZM: Readonly<Record<GovZone, { title: string; desc: string; accent:
desc: '员工负载、岗位与授权。权限按岗位授予:客体三类 × 动作三种;停用前置检查——在途任务与待答卡须先改派完毕。',
},
workflows: {
title: '工作流管理',
title: '流程包管理',
icon: 'workflow',
accent: 'linear-gradient(140deg,#4954e6,#3a44c9)',
desc: '设计态:流程包的五要素编排(活动 · 审批点 · 网关 · 触发器 · 流程包)与版本。编排即定契约——连线即映射、画图即校验,边不闭合不得发布。工作流 = 流程包的运行时实例。',
},
triggers: {
title: '触发器配置',
icon: 'zap',
accent: 'linear-gradient(140deg,#ff8800,#de7802)',
desc: '起单时机的规则清单:周期 / 事件 / 登记三类。触发器与流程包平级——不入包结构、不随包版本,增删启停不改任何版本。',
desc: '战略——企业以哪些流转运转。五要素编排(活动 · 审批点 · 网关 · 触发器 · 流程包)与版本:编排即定契约,连线即映射、画图即校验,边不闭合不得发布。调起规则(触发器的定义)也在本区:谁调起这条流,与流程包一处维护;启停在运营中心。',
},
library: {
title: '活动库管理',
title: '活动库',
icon: 'boxes',
accent: 'linear-gradient(140deg,#0aa294,#0a6a64)',
desc: '已安装活动的资产货架:活动是任务的定义——编排引用一个活动,运行时就长出一个任务。审批点与网关是系统内置要素,零开发、不入库。业务分类 × 活动类型两维,每活动两条版本序列。',
},
tools: {
title: '工具管理',
title: '工具箱',
icon: 'wrench',
accent: 'linear-gradient(140deg,#7f3bf5,#5b21cf)',
desc: '能力目录:功能工具按效应等级分列——读类过程中自由调用,写类只登记动作意向、放行后落地。密钥只存治理台。',
desc: '能力——系统能对世界做什么。功能工具按效应等级分列:读类过程中自由调用,写类只登记动作意向、放行后落地。密钥只存治理台。',
},
data: {
title: '数据管理',
title: '数据域',
icon: 'database',
accent: 'linear-gradient(140deg,#0e9fd8,#245bdb)',
desc: '域 × 对象的承载全景:声明物化(最大化合并、只增不破坏)与调用接入(事实源在外)。数据可以自生长,权力不可以自生长。',
},
memory: {
title: '记忆管理',
icon: 'layers',
accent: 'linear-gradient(140deg,#f14ba9,#c92d86)',
desc: '度量仪表 + 进化队列:自主率与纠正率成对读,复合为有效自主率。候选增量必经回放与人放行才成为模型。',
desc: '对象——企业运营什么。域 × 对象的结构定义:声明物化(最大化合并、只增不破坏)与调用接入(事实源在外)。数据可以自生长,权力不可以自生长。行数据不在这里看——那在运营中心的台账。',
},
system: {
title: '系统管理',
@@ -96,31 +129,36 @@ export const ZM: Readonly<Record<GovZone, { title: string; desc: string; accent:
},
};
/** 区内页签:一页一个维度 —— 不把四种维度摞在同一屏 */
/**
* 区内页签:一页一个维度 —— 不把四种维度摞在同一屏。
*
* `ledgers` 的页签是**数据域**,随发布动态生成(壳层运行时铺开),故此表留空。
*/
export const TABS: Readonly<Record<GovZone, ReadonlyArray<{ key: string; label: string; ico: string }>>> = {
blueprint: [{ key: 'map', label: '企业蓝图', ico: 'route' }],
workflows: [
{ key: 'overview', label: '总览', ico: 'gauge' },
{ key: 'pkgs', label: '流程包', ico: 'boxes' },
{ key: 'rules', label: '调起规则', ico: 'zap' },
{ key: 'todo', label: '需处置', ico: 'flag' },
],
library: [{ key: 'shelf', label: '活动货架', ico: 'boxes' }],
tools: [{ key: 'catalog', label: '能力目录', ico: 'wrench' }],
data: [{ key: 'domains', label: '数据对象', ico: 'database' }],
cockpit: [{ key: 'dash', label: '驾驶舱', ico: 'gauge' }],
tasks: [
{ key: 'board', label: '运行看板', ico: 'activity' },
{ key: 'list', label: '任务', ico: 'list-checks' },
{ key: 'apr', label: '审批单', ico: 'shield-check' },
{ key: 'trg', label: '起单开关', ico: 'zap' },
{ key: 'todo', label: '需处置', ico: 'flag' },
],
people: [
{ key: 'emp', label: '员工', ico: 'users' },
{ key: 'roles', label: '岗位授权', ico: 'key' },
],
workflows: [
{ key: 'overview', label: '总览', ico: 'gauge' },
{ key: 'pkgs', label: '流程包', ico: 'boxes' },
{ key: 'todo', label: '需处置', ico: 'flag' },
],
triggers: [{ key: 'rules', label: '起单规则', ico: 'zap' }],
library: [{ key: 'shelf', label: '活动货架', ico: 'boxes' }],
tools: [{ key: 'catalog', label: '能力目录', ico: 'wrench' }],
data: [{ key: 'domains', label: '数据对象', ico: 'database' }],
memory: [
{ key: 'metrics', label: '度量仪表', ico: 'gauge' },
{ key: 'layers', label: '活动记忆', ico: 'layers' },
],
ledgers: [],
knowledge: [{ key: 'layers', label: '活动记忆', ico: 'layers' }],
system: [
{ key: 'llm', label: 'LLM 实例', ico: 'cpu' },
{ key: 'chan', label: '通道实例', ico: 'mail' },