Files
JX-BPOS/docs/PROGRESS.md
T

68 lines
3.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 实施进度(主 Agent 维护)
> 里程碑序见 编码规范 §15。每个里程碑先立骨架(index / contract / port / CONTRACT.md + 空测试)
> 再填实现;门禁从 M0 起全绿,红了先修门禁再前进。
## 状态总览
| 里程碑 | 内容 | 状态 |
|---|---|---|
| M0 | 工作区骨架 + 五道门禁 + 环境自举 | ✅ 完成 |
| M1 | `@contracts` 首版、`event`、`ledger`、`org`、`llm` | ✅ 完成 |
| M2 | `memory`、`toolbox`、`channel`、`message` | ✅ 完成 |
| M3 | `interaction`、`human-tool`、`release`、`activity-registry`、`@sfeel` | 🟡 3/5(`@sfeel` · `human-tool` · `release` 已落) |
| M4 | `skill-engine`、`loop-engine`、`flow-engine`、`task` | ⬜ 未开始 |
| M5 | `process`、`trigger`、`@activity-sdk` + 首个样例活动 | ⬜ 未开始 |
| M6 | 前端:工作台五要素 → 治理台九功能;`minute`、`report` | ⬜ 未开始 |
## 常用命令
```bash
pnpm gates # gen:tiers → typecheck → lint → depcruise → api:check → test(五道门禁)
pnpm db:up # docker compose 起 PG16(四 schema 由 db/init 建)
pnpm db:generate # drizzle-kit 生成 sys schema 迁移
pnpm db:migrate # 应用迁移
pnpm db:seed # 播种五岗位五员工(登录者 = 冯兵)
pnpm dev:api # tsup watch + node dist/main.js(:8787)
pnpm dev:web # vite(:5173,/api 反代到 8787)
```
契约变更后:`pnpm api:check --update && git add api-report`(§12.4)。
## 已完成的落点
**M0** — pnpm workspaces / tsconfig 双工程 / eslint flat / dependency-cruiser
(基线八条 + JCAI 增补,tier-order 由 `tools/module-tiers.json` 生成)/ 契约快照只留契约面 /
docker-compose PG16 + 四 schema。
**M1** — `@contracts` 九文件首版;四个 L1 模块各带 index / contract / port / CONTRACT.md /
domain 零 mock 测试;app 层 Hono 服务、鉴权中间件、DI 装配、drizzle 迁移、AES-256-GCM 凭证密封。
已验证:种子播种、岗位授权(BD 被拒 / PM 放行)、LLM 四元绑定密钥不外泄、
ledger 对真实 PG 的 schema 自生长与写三分。
**M2** — 四个 L2 模块:`memory`(任务记忆四性质 / 活动记忆四层 / 任务日志两级投影 / 度量)、
`toolbox`(注册两审 / 效应等级 / 白名单 / `ToolInvoker` 第二条缝)、
`channel`(入站归一 → 系统写 → 数据事件;出站与关联记录)、`message`(通知 / 跨任务征答 / 死信 / 无主兜底)。
app 侧接上派发器(advisory lock 串行 + 消费幂等)与 `/api/ingest` 模拟通道。
已验证:一封无主 RFQ 邮件入站 → 归属解析 no-match → 事件落库 → 兜底落到 OP 岗位李元初的消息要素。
**M3(进行中)** — `@sfeel` 全套(lexer / parser / evaluate / static-check,32 测试);
`human-tool` 三规矩机检 + 工单两模式 + 对话卡族 + 到达面两路 + 驳回重答;
`release` 落地预检五项 + 幂等落地 + 落地收敛才发射输出口。
剩 `interaction`(对话流单入口 / 视图区推送 / SSE)与 `activity-registry`(活动库两审 / 资产版本进化管线)。
## 待接的占位(详见 docs/debt.md)
- `container.ts` 两个占位端口:`InFlightWorkProbe`(M4)、`TriggerMatcher`(M5)
- 条件求值 `passthroughEvaluator`(M3 接 `@sfeel`)
- 派发器的消费者表为空(M4 任务 / M5 触发器)
- pg-boss 已装未用(M5 定时作业)
## 已建 ADR
编码规范 §14 已占 001–006,新 ADR 自 **007** 续(README 写「从 005 续」是笔误):
- ADR-007 工具链与门禁的落地形态
- ADR-008 投递队列:`sys.event_delivery` 是队列本体,pg-boss 只管定时
- ADR-009 凭证加密:AES-256-GCM + `JCAI_SECRET_KEY`