aitable-workflow-cli 0.1.28 → 0.1.29-beta.1790736949347

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/assistant/assets/index-BA6il19d.css +1 -0
  2. package/dist/assistant/assets/{index-B3LvYfRW.js → index-BMzAOp70.js} +31 -31
  3. package/dist/assistant/index.html +2 -2
  4. package/dist/chunk-BBP5RVFU.js +15 -0
  5. package/dist/cli.js +180 -73
  6. package/dist/{config-ui-server-4SVD42Z3.js → config-ui-server-UWELHUH4.js} +1 -1
  7. package/dist/web/assets/index-Bnmnydwk.css +1 -0
  8. package/dist/web/assets/index-Dbs1xWB9.js +331 -0
  9. package/dist/web/index.html +2 -2
  10. package/dist/web/install.ps1 +173 -0
  11. package/dist/web/install.sh +188 -0
  12. package/package.json +3 -3
  13. package/templates/ai-native-sdlc/.env.example +11 -0
  14. package/templates/ai-native-sdlc/aitable-workflow.config.yml +47 -0
  15. package/templates/ai-native-sdlc/coding-agents.config.json +17 -0
  16. package/templates/ai-native-sdlc/docs/plans/2026-09-15-ai-native-sdlc-dual-staff-implementation-plan.md +150 -0
  17. package/templates/ai-native-sdlc/docs/plans/2026-09-15-ai-native-sdlc-dual-staff.md +213 -0
  18. package/templates/ai-native-sdlc/docs/plans/2026-09-16-domain-role-notification-routing.md +36 -0
  19. package/templates/ai-native-sdlc/docs/plans/2026-09-16-execution-resume-and-cr-loop.md +29 -0
  20. package/templates/ai-native-sdlc/docs/plans/2026-09-16-project-handoff.md +148 -0
  21. package/templates/ai-native-sdlc/docs/plans/2026-09-17-prd-code-context-and-readable-prompts.md +37 -0
  22. package/templates/ai-native-sdlc/docs/plans/2026-09-21-plan-merge-sync-and-agent-source.md +19 -0
  23. package/templates/ai-native-sdlc/docs/plans/2026-09-21-sdlc-base-ref-and-review-notification.md +18 -0
  24. package/templates/ai-native-sdlc/docs/plans/2026-09-29-borrow-from-joe-design.md +943 -0
  25. package/templates/ai-native-sdlc/lib/artifacts.ts +126 -0
  26. package/templates/ai-native-sdlc/lib/recipe-config.ts +34 -0
  27. package/templates/ai-native-sdlc/lib/recipe-helpers.ts +595 -0
  28. package/templates/ai-native-sdlc/npmrc +1 -0
  29. package/templates/ai-native-sdlc/package.json +19 -0
  30. package/templates/ai-native-sdlc/profile/profile.yml +115 -0
  31. package/templates/ai-native-sdlc/setup/module-config.seed.json +37 -0
  32. package/templates/ai-native-sdlc/test/artifacts.test.ts +72 -0
  33. package/templates/ai-native-sdlc/test/recipe-helpers.test.ts +931 -0
  34. package/templates/ai-native-sdlc/tsconfig.json +17 -0
  35. package/templates/ai-native-sdlc/workflows/.gitkeep +3 -0
  36. package/templates/ai-native-sdlc/workflows/execution/automations/blocked-questions-dev.json +91 -0
  37. package/templates/ai-native-sdlc/workflows/execution/automations/blocked-questions.json +91 -0
  38. package/templates/ai-native-sdlc/workflows/execution/automations/cr-review-dev.json +80 -0
  39. package/templates/ai-native-sdlc/workflows/execution/automations/cr-review.json +81 -0
  40. package/templates/ai-native-sdlc/workflows/execution/automations/resume-answers.json +42 -0
  41. package/templates/ai-native-sdlc/workflows/execution/automations/spec-review-dev.json +138 -0
  42. package/templates/ai-native-sdlc/workflows/execution/recipes/coding.recipe.ts +161 -0
  43. package/templates/ai-native-sdlc/workflows/execution/recipes/prd-review.recipe.ts +200 -0
  44. package/templates/ai-native-sdlc/workflows/execution/recipes/prd.recipe.ts +163 -0
  45. package/templates/ai-native-sdlc/workflows/execution/recipes/review.recipe.ts +257 -0
  46. package/templates/ai-native-sdlc/workflows/execution/recipes/spec-review.recipe.ts +242 -0
  47. package/templates/ai-native-sdlc/workflows/execution/recipes/spec.recipe.ts +173 -0
  48. package/templates/ai-native-sdlc/workflows/execution/workflow.yml +79 -0
  49. package/templates/ai-native-sdlc/workflows/intake/automations/accept-intake.json +101 -0
  50. package/templates/ai-native-sdlc/workflows/intake/recipes/classify-module.recipe.ts +133 -0
  51. package/templates/ai-native-sdlc/workflows/intake/recipes/create-change.recipe.ts +94 -0
  52. package/templates/ai-native-sdlc/workflows/intake/recipes/mechanical-deduplicate.recipe.ts +33 -0
  53. package/templates/ai-native-sdlc/workflows/intake/workflow.yml +62 -0
  54. package/templates/ai-native-sdlc/workspaces/dev/AGENTS.md +69 -0
  55. package/templates/ai-native-sdlc/workspaces/pm/AGENTS.md +48 -0
  56. package/templates/ai-native-sdlc/workspaces/reviewer/AGENTS.md +79 -0
  57. package/dist/assistant/assets/index-CCEHOkkJ.css +0 -1
  58. package/dist/chunk-YDJTCQW4.js +0 -15
  59. package/dist/web/assets/index-DPc2WOdp.css +0 -1
  60. package/dist/web/assets/index-HTw8K38o.js +0 -332
@@ -0,0 +1,115 @@
1
+ # Profile v2 —— 空脚手架
2
+ #
3
+ # 场景配置的唯一事实源,双轴并列:
4
+ # roles.* = 身份轴(这个角色是谁、能做什么、记得什么、受什么约束)
5
+ # workflows.* = 部署轴(toolkit_config / event_sources / steps)
6
+ #
7
+ # 两轴都由「设计」一步按需求生成。**别把部署配置写进 roles**:
8
+ # triggers / event_sources / conditions / 工具白名单 / 数据边界都属于 workflows 段。
9
+ #
10
+ # 引用语法(只有整值 ref 生效,嵌在字符串里不会被解析):
11
+ # ${roles.<path>} 加载期展开,来源是本文件
12
+ # ${env.X} 运行期活读 .env / process.env
13
+ # ${config.X} 运行期活读 aitable-workflow.config.yml 的点路径
14
+ # ${globalVar.X} 运行期活读 recipe 发布态;**首轮发布前为空,消费方必须能降级**
15
+
16
+ schema_version: 2
17
+
18
+ meta:
19
+ label: "AI Native SDLC 双数字员工协作台"
20
+ description: "PM 与 Dev 在同一条变更流水中接力,Git 工件和 CR 是阶段门禁。"
21
+
22
+ roles:
23
+ pm:
24
+ name: PM
25
+ persona: "你是负责需求分诊、意图澄清、PRD 设计与前序工件审阅的 PM。"
26
+ guardrails:
27
+ - id: durable-output
28
+ rule: "结论必须写入 Git 工件或 AI 表格字段,不能只留在对话中。"
29
+ severity: critical
30
+ dev:
31
+ name: Dev
32
+ persona: "你是负责技术方案、编码实现与代码评审处理的 Dev。"
33
+ guardrails:
34
+ - id: allowed-repositories
35
+ rule: "只能操作 workflow 部署配置中的 Dev 仓库白名单。"
36
+ severity: critical
37
+ reviewer:
38
+ name: Reviewer
39
+ persona: "你是独立的代码审查者,负责以对抗性思维审查 PRD、技术方案和代码实现。你的职责是找出缺陷和风险,而不是确认正确性。"
40
+ guardrails:
41
+ - id: adversarial-mindset
42
+ rule: "假设被审查对象有缺陷,你的任务是找到它。对每条评论,先理解评审者的意图,再决定修复方案;如果认为评论有误,给出有理有据的反驳而非盲目修改。"
43
+ severity: critical
44
+ - id: evidence-based
45
+ rule: "每个结论必须有代码级证据(文件路径 + 行号 + 实际输出)。禁止使用模糊表述。"
46
+ severity: critical
47
+
48
+ workflows:
49
+ intake:
50
+ toolkit_config:
51
+ messaging: { robot_creds: "${env.DINGTALK_ROBOTS?}" }
52
+ steps:
53
+ classify_module:
54
+ module_config:
55
+ mode: owned
56
+ # 留空 + autoCreate:setup 在项目的 Base 内新建模块配置表并回填。
57
+ baseId: ""
58
+ tableId: ""
59
+ create_change:
60
+ execution_tracker:
61
+ base_id: { ref: "workflow:execution.tracker.base_id" }
62
+ table_id: { ref: "workflow:execution.tracker.table_id" }
63
+ execution:
64
+ # YAML anchor 是作者侧的单一仓库定义;alias 在 profile loader 前展开,steps 只消费完整结构。
65
+ repositories:
66
+ pm_artifacts: &pm_artifacts
67
+ url: "git@gitlab.alibaba-inc.com:xule-test/ai-staff.git"
68
+ default_branch: origin/master
69
+ we_notable: &we_notable
70
+ url: "git@gitlab.alibaba-inc.com:alidocs/we-notable.git"
71
+ default_branch: origin/master
72
+ commands:
73
+ - bin: pnpm
74
+ args: ["install", "--frozen-lockfile"]
75
+ timeout_ms: 1200000
76
+ lippi_notable: &lippi_notable
77
+ url: "git@gitlab.alibaba-inc.com:alidocs/lippi-doc-notable.git"
78
+ default_branch: origin/master
79
+ toolkit_config:
80
+ messaging: { robot_creds: "${env.DINGTALK_ROBOTS?}" }
81
+ git:
82
+ default_branch: origin/master
83
+ steps:
84
+ prd:
85
+ pm_repository: *pm_artifacts
86
+ business_repositories: [*we_notable, *lippi_notable]
87
+ prd_review:
88
+ pm_repository: *pm_artifacts
89
+ spec:
90
+ pm_repository: *pm_artifacts
91
+ dev_repositories: [*we_notable, *lippi_notable]
92
+ spec_review:
93
+ dev_repositories: [*we_notable, *lippi_notable]
94
+ coding:
95
+ dev_repositories: [*we_notable, *lippi_notable]
96
+ review:
97
+ dev_repositories: [*we_notable, *lippi_notable]
98
+ intake_tracker:
99
+ base_id: { ref: "workflow:intake.tracker.base_id" }
100
+ table_id: { ref: "workflow:intake.tracker.table_id" }
101
+
102
+ # roles:
103
+ # <role-id>: # ← 设计阶段填写,键名即 role id
104
+ # name: ""
105
+ # persona:
106
+ # file: prompts/<role-id>.md
107
+ # knowledge_scope:
108
+ # kb_collections: []
109
+ # guardrails: []
110
+
111
+ # workflows:
112
+ # <workflow-id>: # ← 设计阶段填写,键名必须与 workflow.yml 的 meta.id 一致
113
+ # toolkit_config: {}
114
+ # event_sources: {}
115
+ # steps: {}
@@ -0,0 +1,37 @@
1
+ [
2
+ {
3
+ "模块名称": "数据源与同步",
4
+ "模块说明": "接三方数据、导入导出、iPaaS 连接器、同步链路",
5
+ "典型例子": "从 MySQL 定时同步;大 XLSX 导入失败"
6
+ },
7
+ {
8
+ "模块名称": "插件与扩展",
9
+ "模块说明": "字段装饰器、边栏插件、脚本、酷应用、addon",
10
+ "典型例子": "AI 字段插件不更新;沙箱通信报错"
11
+ },
12
+ {
13
+ "模块名称": "AI 能力与知识",
14
+ "模块说明": "AI 字段、LLM 调用、知识库编译回流、RAG 问答",
15
+ "典型例子": "AI 生成列不准;知识回流没闭环"
16
+ },
17
+ {
18
+ "模块名称": "前端与交互",
19
+ "模块说明": "视图与表格渲染、移动端、交互体验、设计还原",
20
+ "典型例子": "移动端列宽;看板拖拽卡顿"
21
+ },
22
+ {
23
+ "模块名称": "协作与权限",
24
+ "模块说明": "分享、协作者权限、评论、可见性",
25
+ "典型例子": "外部成员只读;评论 @ 不到人"
26
+ },
27
+ {
28
+ "模块名称": "平台与运维",
29
+ "模块说明": "OpenAPI、HSF、性能、稳定性、监控巡检、部署",
30
+ "典型例子": "scanSheetRecord 超时;OpenAPI 限流"
31
+ },
32
+ {
33
+ "模块名称": "其他·未分模块",
34
+ "模块说明": "判不准、跨多模块、全新方向",
35
+ "典型例子": "先挂这里,后续再拆"
36
+ }
37
+ ]
@@ -0,0 +1,72 @@
1
+ import assert from "node:assert/strict";
2
+ import test from "node:test";
3
+ import { readFileSync } from "node:fs";
4
+ import { resolve } from "node:path";
5
+ import {
6
+ artifactAbsPath,
7
+ artifactName,
8
+ artifactPath,
9
+ changeDir,
10
+ stageBranchName,
11
+ } from "../lib/artifacts.js";
12
+
13
+ test("变更工件目录与命名集中定义,供各阶段 recipe 复用", () => {
14
+ assert.equal(changeDir("CHG-1"), "changes/CHG-1");
15
+
16
+ assert.equal(artifactName("prd"), "01-prd.md");
17
+ assert.equal(artifactName("spec"), "02-spec.md");
18
+ assert.equal(artifactName("coding"), "03-coding.md");
19
+ assert.equal(artifactName("review"), "04-review.md");
20
+
21
+ assert.equal(artifactPath("prd", "CHG-1"), "changes/CHG-1/01-prd.md");
22
+ assert.equal(artifactPath("review", "CHG-1"), "changes/CHG-1/04-review.md");
23
+
24
+ assert.equal(
25
+ artifactAbsPath("coding", "/tmp/wt", "CHG-1"),
26
+ "/tmp/wt/changes/CHG-1/03-coding.md",
27
+ );
28
+ assert.equal(stageBranchName("spec", "CHG-1"), "CHG-1-2-spec");
29
+ });
30
+
31
+ test("各阶段 recipe 不再硬编码工件路径,只从 artifacts 模块取名", () => {
32
+ const recipes = [
33
+ "prd",
34
+ "prd-review",
35
+ "spec",
36
+ "coding",
37
+ "review",
38
+ ] as const;
39
+ for (const name of recipes) {
40
+ const source = readFileSync(
41
+ resolve(`workflows/execution/recipes/${name}.recipe.ts`),
42
+ "utf8",
43
+ );
44
+ assert.ok(
45
+ !/changes\/\$\{id\}|0\d-(prd|spec|coding|review)\.md/.test(source),
46
+ `${name}.recipe.ts 仍硬编码了工件路径`,
47
+ );
48
+ }
49
+ });
50
+
51
+ test("coding 工件使用解析器约定的精确改动内容标题", () => {
52
+ const source = readFileSync(
53
+ resolve("workflows/execution/recipes/coding.recipe.ts"),
54
+ "utf8",
55
+ );
56
+ assert.match(source, /写入以下章节[\s\S]*?\n## 改动内容\n/);
57
+ assert.doesNotMatch(source, /## 改动内容(面向评审者说明实际行为、关键文件与风险)/);
58
+ });
59
+
60
+ test("PM 与 Dev 规程声明 Aone 和钉钉文档链接的只读解析方式", () => {
61
+ for (const file of ["workspaces/pm/AGENTS.md", "workspaces/dev/AGENTS.md"]) {
62
+ const source = readFileSync(resolve(file), "utf8");
63
+ assert.match(source, /a1 project workitem get <id> --format json/);
64
+ assert.match(source, /dws doc info --node/);
65
+ assert.match(source, /dws doc read --node/);
66
+ assert.match(source, /只读/);
67
+ }
68
+ const profile = readFileSync(resolve("profile/profile.yml"), "utf8");
69
+ assert.match(profile, /pm:\n\s+name: PM\n\s+persona: "你是负责需求分诊/);
70
+ assert.match(profile, /dev:\n\s+name: Dev\n\s+persona: "你是负责技术方案/);
71
+ assert.doesNotMatch(profile, /prompts\/(pm|dev)\.md/);
72
+ });