@stalfh233/omc-cli 0.4.15 → 0.4.16

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 (184) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +297 -297
  3. package/coverage/m1-coverage-manifest-v1.json +1278 -1277
  4. package/dist/args.js +0 -0
  5. package/dist/artifacts.js +0 -0
  6. package/dist/bench/call-face-eval.js +0 -0
  7. package/dist/bench/context-attribution.js +0 -0
  8. package/dist/bench/discovery-cost-eval.js +0 -0
  9. package/dist/bench/driver.js +0 -0
  10. package/dist/bench/evals.js +0 -0
  11. package/dist/bench/fake-http-server.js +0 -0
  12. package/dist/bench/instrument.js +0 -0
  13. package/dist/bench/intent-face-eval.js +40 -40
  14. package/dist/bench/run.js +0 -0
  15. package/dist/bench/scenario.js +0 -0
  16. package/dist/bench/types.js +0 -0
  17. package/dist/bi-wire.js +0 -0
  18. package/dist/bizservice-config.js +38 -13
  19. package/dist/call.js +0 -0
  20. package/dist/capability-absences.js +0 -0
  21. package/dist/capability-overview.js +2 -2
  22. package/dist/capability-shape.js +0 -0
  23. package/dist/cli-contract.js +0 -0
  24. package/dist/cli-output.js +41 -15
  25. package/dist/cli.js +22 -2
  26. package/dist/code-rules.js +0 -0
  27. package/dist/command-transport.js +0 -0
  28. package/dist/config-store.js +0 -0
  29. package/dist/context.js +0 -0
  30. package/dist/contract-consistency.js +0 -0
  31. package/dist/contract-resources.js +0 -0
  32. package/dist/coverage-consistency.js +0 -0
  33. package/dist/coverage-registry.js +0 -0
  34. package/dist/coverage.js +0 -0
  35. package/dist/data-list-filter.js +0 -0
  36. package/dist/discovery.js +0 -0
  37. package/dist/endpoints.js +2 -0
  38. package/dist/environment-policy.js +0 -0
  39. package/dist/execution-metadata.js +4 -4
  40. package/dist/fake/app.js +0 -0
  41. package/dist/fake/b2-registration.js +26 -0
  42. package/dist/fake/businessrule.js +0 -0
  43. package/dist/fake/datarule.js +0 -0
  44. package/dist/fake/dictionary.js +0 -0
  45. package/dist/fake/environment.js +0 -0
  46. package/dist/fake/field.js +0 -0
  47. package/dist/fake/form.js +0 -0
  48. package/dist/fake/index.js +0 -0
  49. package/dist/fake/list-view.js +0 -0
  50. package/dist/fake/model.js +0 -0
  51. package/dist/fake/online-js.js +0 -0
  52. package/dist/fake/report.js +0 -0
  53. package/dist/fake/routes.js +0 -0
  54. package/dist/fake/rule-lifecycle.js +0 -0
  55. package/dist/fake/runtime-data.js +0 -0
  56. package/dist/fake/state.js +0 -0
  57. package/dist/fake/workflow.js +0 -0
  58. package/dist/field-change.js +0 -0
  59. package/dist/field-families.js +0 -0
  60. package/dist/form-layout.js +0 -0
  61. package/dist/form-support.js +12 -2
  62. package/dist/goal-routes.js +0 -0
  63. package/dist/governed-execution.js +0 -0
  64. package/dist/human-summary.js +0 -0
  65. package/dist/identity.js +0 -0
  66. package/dist/intent/baseline.js +0 -0
  67. package/dist/intent/capabilities/bizservice.js +0 -0
  68. package/dist/intent/capabilities/businessrule.js +0 -0
  69. package/dist/intent/capabilities/datarule.js +0 -0
  70. package/dist/intent/capabilities/field.js +0 -0
  71. package/dist/intent/capabilities/form.js +0 -0
  72. package/dist/intent/capabilities/index.js +0 -0
  73. package/dist/intent/capabilities/listview.js +0 -0
  74. package/dist/intent/capabilities/model.js +0 -0
  75. package/dist/intent/capabilities/onlinejs.js +0 -0
  76. package/dist/intent/capabilities/report.js +0 -0
  77. package/dist/intent/capabilities/workflow.js +0 -0
  78. package/dist/intent/capability.js +0 -0
  79. package/dist/intent/cli.js +0 -0
  80. package/dist/intent/compare.js +0 -0
  81. package/dist/intent/compiler.js +0 -0
  82. package/dist/intent/dsl.js +0 -0
  83. package/dist/intent/plan-file.js +0 -0
  84. package/dist/intent/readback.js +0 -0
  85. package/dist/intent/schema.js +0 -0
  86. package/dist/intent/validation.js +0 -0
  87. package/dist/intent/yaml.js +0 -0
  88. package/dist/json-column.js +0 -0
  89. package/dist/lanes/app-contract.js +0 -0
  90. package/dist/lanes/app-coverage.js +0 -0
  91. package/dist/lanes/app.js +0 -0
  92. package/dist/lanes/apply-changes.js +14 -1
  93. package/dist/lanes/b2-registration-contract.js +5 -0
  94. package/dist/lanes/b2-registration-coverage.js +1 -0
  95. package/dist/lanes/b2-registration.js +55 -6
  96. package/dist/lanes/businessrule-contract.js +0 -0
  97. package/dist/lanes/businessrule-coverage.js +0 -0
  98. package/dist/lanes/businessrule.js +0 -0
  99. package/dist/lanes/contract-support.js +0 -0
  100. package/dist/lanes/coverage-declaration.js +0 -0
  101. package/dist/lanes/datarule-contract.js +0 -0
  102. package/dist/lanes/datarule-coverage.js +0 -0
  103. package/dist/lanes/datarule-protocol.js +0 -0
  104. package/dist/lanes/datarule.js +0 -0
  105. package/dist/lanes/dictionary-contract.js +0 -0
  106. package/dist/lanes/dictionary-coverage.js +0 -0
  107. package/dist/lanes/dictionary.js +0 -0
  108. package/dist/lanes/environment-contract.js +0 -0
  109. package/dist/lanes/environment-coverage.js +0 -0
  110. package/dist/lanes/environment.js +0 -0
  111. package/dist/lanes/field-contract.js +3 -2
  112. package/dist/lanes/field-coverage.js +0 -0
  113. package/dist/lanes/field.js +268 -172
  114. package/dist/lanes/form-contract.js +2 -2
  115. package/dist/lanes/form-coverage.js +0 -0
  116. package/dist/lanes/form.js +4 -0
  117. package/dist/lanes/lane-ids.js +0 -0
  118. package/dist/lanes/list-view-contract.js +0 -0
  119. package/dist/lanes/list-view-coverage.js +0 -0
  120. package/dist/lanes/list-view-shapes.js +0 -0
  121. package/dist/lanes/list-view.js +0 -0
  122. package/dist/lanes/meta-contract.js +0 -0
  123. package/dist/lanes/meta.js +11 -1
  124. package/dist/lanes/model-contract.js +0 -0
  125. package/dist/lanes/model-coverage.js +0 -0
  126. package/dist/lanes/model.js +1 -1
  127. package/dist/lanes/online-js-contract.js +0 -0
  128. package/dist/lanes/online-js-coverage.js +0 -0
  129. package/dist/lanes/online-js.js +0 -0
  130. package/dist/lanes/report-contract.js +0 -0
  131. package/dist/lanes/report-coverage.js +0 -0
  132. package/dist/lanes/report.js +0 -0
  133. package/dist/lanes/rule-graph.js +0 -0
  134. package/dist/lanes/rule-lifecycle-contract.js +0 -0
  135. package/dist/lanes/rule-lifecycle-coverage.js +0 -0
  136. package/dist/lanes/rule-lifecycle.js +0 -0
  137. package/dist/lanes/runtime-data-contract.js +0 -0
  138. package/dist/lanes/runtime-data-coverage.js +0 -0
  139. package/dist/lanes/runtime-data.js +0 -0
  140. package/dist/lanes/workflow-contract.js +0 -0
  141. package/dist/lanes/workflow-coverage.js +0 -0
  142. package/dist/lanes/workflow.js +2 -0
  143. package/dist/omc-core-lazy.js +6 -0
  144. package/dist/online-js-layout.js +0 -0
  145. package/dist/online-js-source.js +28 -28
  146. package/dist/package-tool.js +0 -0
  147. package/dist/package.js +0 -0
  148. package/dist/plan.js +11 -1
  149. package/dist/read.js +0 -0
  150. package/dist/redact.js +0 -0
  151. package/dist/rule-support.js +0 -0
  152. package/dist/runtime-support.js +0 -0
  153. package/dist/service-doctor.js +28 -0
  154. package/dist/session-manager.js +0 -0
  155. package/dist/session.js +38 -12
  156. package/dist/skills.js +0 -0
  157. package/dist/sqlite-warning-filter.js +27 -0
  158. package/dist/support.js +0 -0
  159. package/dist/tool-types.js +0 -0
  160. package/dist/tools.js +0 -0
  161. package/dist/usage-log.js +4 -0
  162. package/dist/wire.js +0 -0
  163. package/dist/workflow-support.js +0 -0
  164. package/dist/write-lease.js +0 -0
  165. package/dist/write-lock.js +0 -0
  166. package/dist/write.js +24 -2
  167. package/dist/zip.js +0 -0
  168. package/docs/tool-surface-map.md +42 -42
  169. package/package.json +71 -71
  170. package/skills/omc-acceptance-criteria.md +47 -47
  171. package/skills/omc-business-configuration.md +258 -257
  172. package/skills/omc-capabilities.md +197 -197
  173. package/skills/omc-capability-scouting.md +55 -55
  174. package/skills/omc-config-draft-review.md +171 -171
  175. package/skills/omc-five-piece-flow.md +35 -35
  176. package/skills/omc-glossary.md +86 -86
  177. package/skills/omc-refusals.md +110 -110
  178. package/skills/omc-requirement-analysis.md +161 -161
  179. package/skills/omc-requirement-vocabulary.md +51 -51
  180. package/skills/omc-start-here.md +82 -82
  181. package/skills/omc-tool-selection.md +119 -119
  182. package/skills/omc-write-hazards.md +88 -87
  183. package/dist/approval-token.js +0 -102
  184. package/dist/server.js +0 -92
@@ -1,51 +1,51 @@
1
- ---
2
- name: omc-requirement-vocabulary
3
- description: Chinese cue → OMC capability lookup. Disclosed reference for requirement-analysis steps 1–2.
4
- ---
5
-
6
- # Requirement Vocabulary (需求线索词表)
7
-
8
- Reference for `omc-requirement-analysis.md` step 1. A flat peer-set: match each
9
- Chinese cue in the requirement to the OMC capability it implies, then read that
10
- capability's coverage/tools/boundaries from `omc-capabilities`.
11
-
12
- ## 结构面 — structure
13
-
14
- | 中文线索 | Domain / Capability |
15
- | --- | --- |
16
- | 客户、联系人、供应商 | Customer |
17
- | 项目、合同、金额 | Project |
18
- | 产出、申报、月度、累计 | Output declaration / Cumulative amount |
19
- | 模型、对象、表、主数据 | Model |
20
- | 字段、属性、列 | Field |
21
- | 文本、长文本、数字、日期、时间、人员、部门、地址、附件、字典、关联、公式 | Field family (text-extension / numeric-logical / date-time / people-department / address-attachment / dictionary-enum / relevance / formula EXPRESSION-only) |
22
- | 表单、页面、布局、控件、必填、只读、显示 | Default form + form control binding |
23
- | 列表、视图、查询、筛选列 | List view |
24
-
25
- ## 行为面 — behavior
26
-
27
- | 中文线索 | Capability |
28
- | --- | --- |
29
- | 规则、自动、校验、触发、事件 | businessrule graph (B 平面) |
30
- | create / update / delete 事件、按钮、定时任务 | Business-rule trigger |
31
- | 通知、站内通知、站内信、消息、提醒、报警、告警、ANDON | Business-rule **MESSAGE** 动作节点(站内通知,配置能力,非二开) |
32
- | 流程、审批、工作流、节点、待办 | Workflow template |
33
- | 脚本、联动、前端行为、onLoad、onValidate、预览 | Online JS (form-level) |
34
-
35
- ## 集成面 — integration
36
-
37
- | 中文线索 | Capability |
38
- | --- | --- |
39
- | 集成、接口、服务、回调、对接外部系统 | B2 业务集成服务 (`service.register`);二开接口 = 扩展模块写 REST 接口 + RESTFUL 服务指向它;自定义协议适配器 SPI 非常规、不在支持面 |
40
- | 数据、提交、保存、删除、查记录 | M2 runtime data |
41
-
42
- ## 横切面 — landscape and boundaries
43
-
44
- Coverage status and boundaries for every capability (including 权限/子表/聚合/
45
- 上线/内联/OCR) live in **`omc-capabilities`** — its 能力索引 table and
46
- [边界] section are the authority; read the relevant section there rather than a
47
- copy here. In particular, **跨模型/子表聚合、汇总、求和是配置能力**(表单「计算」
48
- FORMULA),不要当二开。
49
-
50
- Cue → capability is a starting point, never a substitute for 定面. A cue that
51
- could name two faces is resolved by the 定面表 in the parent skill.
1
+ ---
2
+ name: omc-requirement-vocabulary
3
+ description: Chinese cue → OMC capability lookup. Disclosed reference for requirement-analysis steps 1–2.
4
+ ---
5
+
6
+ # Requirement Vocabulary (需求线索词表)
7
+
8
+ Reference for `omc-requirement-analysis.md` step 1. A flat peer-set: match each
9
+ Chinese cue in the requirement to the OMC capability it implies, then read that
10
+ capability's coverage/tools/boundaries from `omc-capabilities`.
11
+
12
+ ## 结构面 — structure
13
+
14
+ | 中文线索 | Domain / Capability |
15
+ | --- | --- |
16
+ | 客户、联系人、供应商 | Customer |
17
+ | 项目、合同、金额 | Project |
18
+ | 产出、申报、月度、累计 | Output declaration / Cumulative amount |
19
+ | 模型、对象、表、主数据 | Model |
20
+ | 字段、属性、列 | Field |
21
+ | 文本、长文本、数字、日期、时间、人员、部门、地址、附件、字典、关联、公式 | Field family (text-extension / numeric-logical / date-time / people-department / address-attachment / dictionary-enum / relevance / formula EXPRESSION-only) |
22
+ | 表单、页面、布局、控件、必填、只读、显示 | Default form + form control binding |
23
+ | 列表、视图、查询、筛选列 | List view |
24
+
25
+ ## 行为面 — behavior
26
+
27
+ | 中文线索 | Capability |
28
+ | --- | --- |
29
+ | 规则、自动、校验、触发、事件 | businessrule graph (B 平面) |
30
+ | create / update / delete 事件、按钮、定时任务 | Business-rule trigger |
31
+ | 通知、站内通知、站内信、消息、提醒、报警、告警、ANDON | Business-rule **MESSAGE** 动作节点(站内通知,配置能力,非二开) |
32
+ | 流程、审批、工作流、节点、待办 | Workflow template |
33
+ | 脚本、联动、前端行为、onLoad、onValidate、预览 | Online JS (form-level) |
34
+
35
+ ## 集成面 — integration
36
+
37
+ | 中文线索 | Capability |
38
+ | --- | --- |
39
+ | 集成、接口、服务、回调、对接外部系统 | B2 业务集成服务 (`service.register`);二开接口 = 扩展模块写 REST 接口 + RESTFUL 服务指向它;自定义协议适配器 SPI 非常规、不在支持面 |
40
+ | 数据、提交、保存、删除、查记录 | M2 runtime data |
41
+
42
+ ## 横切面 — landscape and boundaries
43
+
44
+ Coverage status and boundaries for every capability (including 权限/子表/聚合/
45
+ 上线/内联/OCR) live in **`omc-capabilities`** — its 能力索引 table and
46
+ [边界] section are the authority; read the relevant section there rather than a
47
+ copy here. In particular, **跨模型/子表聚合、汇总、求和是配置能力**(表单「计算」
48
+ FORMULA),不要当二开。
49
+
50
+ Cue → capability is a starting point, never a substitute for 定面. A cue that
51
+ could name two faces is resolved by the 定面表 in the parent skill.
@@ -1,82 +1,82 @@
1
- ---
2
- name: omc-start-here
3
- description: Onboarding router — use on first contact with the OMC CLI, or when unsure which methodology topic and command ladder a task needs. Maps a task to its topic sequence and the first commands to run.
4
- ---
5
-
6
- # Start Here (从这里开始)
7
-
8
- Router for the `omc` CLI. Two jobs: the **first-contact command ladder**, and the
9
- **task → topic map**. This package's `skills/` directory is the authoritative
10
- shipped copy; a downstream distribution snapshot is only a mirror and must not
11
- be treated as a second source. Read this, then follow the topics it names.
12
-
13
- ## 最小路径(先读这段就能开始)
14
-
15
- 1. `omc next "<目标>"`:先看返回的 `mode` 决定读/写与路径——
16
- - `read`(读回/盘点/查询/检查)→ 只给**读工具**(`field.list`/`rule.get`/`workflow.get_draft`/`data.load`…),`write:false`;这是「读回现状、为下一步或写代码取证据」的入口,别回写工具。**读全一个模型用 `model.inspect <schemaCode>`(一次拿字段/表单/列表/规则/数据规则/流程摘要),别逐面 6 次调用**;`field.list` 默认只返业务字段(`all:true` 取全)。
17
- - `whole-package`(做应用/系统、从零搭)→ 带 `intent` 块:写声明式意图文件,`omc intent validate/plan/apply/readback` 按依赖顺序合成原生结构,比逐能力拼装更省、更不易漂移;`intent: partial` 未覆盖的(应用/字典/集成/运行数据)再用 `call` 补。
18
- - `build`/`modify` → 按阶梯内联的**写工具 + 必填参数**执行。
19
- - `scout`(能不能/怎么写/是否支持)→ 先探边界(`omc-capability-scouting`),别直接写。若 `next` 返回 **`boundary`**(`match.kind:"boundary"`,如 `ocr-e-signature`/`release-prod`/`inline-coding`),说明需求**不在覆盖内**(`write:false`):如实报告、用 `omc capabilities` 核对,**不要**用相近能力伪造实现。
20
- 阶梯步骤已内联工具必填参数(`route.ladder[].tools`/`readTools`)与命中 recipe 的 `describe <tool> --example <id>`;据此直接执行——**不要再逐能力 `commands --lane`**,也不要先扫 `commands --json`/全部 `contract`/全部 `describe --full`。
21
- 方法论按 `route.readSections` 逐节读:对每条 `{topic, section}` 执行 `omc help <topic> --section "<section>"`(单节 0.4–3.4KB)。**不要 `omc help <topic>` 读整篇**(5–14KB,读一次就留在后续每一轮窗口)。
22
- 2. 写前只需读 `omc-config-draft-review`(人审门)与 `omc-five-piece-flow`(发现→草稿→权限→执行→回读);`omc-business-configuration` 按命中的能力分节读(见 `next` 的 `readSections`),不要整篇预取。
23
- 3. 环境名以 `omc doctor` 的「环境=」或 `.omc-env` 为准;工具不确定先用默认 `describe`/`--example`,只有单个工具缺形状才用 `--full`;`describe` 带 `exampleHint`/`recipeHint` 时优先 `--example`。
24
- 4. 只有工具不在 `next` 命中能力内、或要看 purpose/枚举时,才补一次 `commands --json --compact --lane <lane>`。非显然形状(规则图、流程模板、表单布局、RESTFUL)才单独 `describe --example`。
25
- 5. 键名按对象不同:模型 `schemaCode`、默认表单 `sheetCode`(可省略,默认 == 模型 code)、流程 `workflowCode`/`code`——报错会提示同义键;字段族名认不出会给「最接近的族」。
26
- 6. **写操作串行**:同一环境不要并发写;`write-lock-held` 是瞬态,等几秒重试一次即可。
27
- 7. **单个对象优先高阶编排工具**:模型+字段用 `configure_model`(一次含全部字段),表单用 `configure_form`,列表用 `listview.configure`(**默认视图已存在,省略 code 即配置它,不要 `listview.create`**)。原子工具留给单点修改。
28
- 8. 拿到 `detailArtifactId` 先 `artifact get <id> --summary` 看结构,再 `--keys/--jq` 取所需;`field.list`/`workflow.*` 默认面已给清单与节点摘要;`workflow.get_draft` 默认面已含 `edges`,改流程只需传 `activities`+`routes`。
29
- 9. 每个 section 读一次即可;同一 topic 不要反复读。
30
- 10. **复杂流程先预检角色**:读 `org.role.list`/`org.user.search`,用真实可解析对象;缺独立角色就报告阻塞,不伪造。主子表条件按规则行 `schemaCode` 回所属子模型验证。
31
- 11. **验收不只看回读**:配置后用 opt-in `npm run test:live`(`OMC_LIVE=1`),验设计器控件/条件 Set、门户字段/列表列/选项/流程;业务规则走 `data.save(workflowCode)`→`workitem.list`→`data.submit`→`data.load`。门户断言硬重载≥2次。
32
-
33
-
34
- Run in a **clean project directory** (not the OMC dev repo). Start from the goal:
35
-
36
- ```bash
37
- omc next "<目标>" # goal → ordered route (offline)
38
- omc doctor # environment name and readiness
39
- omc call discover_environment --env <env> --args '{}'
40
- omc capability <selected-id> # only the selected capability
41
- omc describe <tool> --example <recipe-id> # recipe first; default describe otherwise
42
- omc help <topic> --section "<heading>" # one methodology section, not all
43
- ```
44
-
45
- Discovery precedes every write. 预算档位见 `omc-tool-selection` 的「Discovery 成本档位」;裸 `omc commands` 是有界索引,全量目录须显式 `commands --json`。
46
-
47
- Fallback faces: `omc capabilities`, `omc capability <id-or-alias> --executable`, `omc commands --json --compact`, `omc contract <lane>`, `omc describe <tool>`.
48
-
49
- ## 1. Task → topic map
50
-
51
- | Your task | Read, in order |
52
- | --- | --- |
53
- | "能不能做 X" / 某能力覆盖什么 | `omc-capabilities`(能力总表;判"是否二开"前先自证) |
54
- | Fuzzy Chinese requirement, unknown scope | `omc-requirement-analysis` → `omc-requirement-vocabulary` |
55
- | Configure a business model end to end | `omc-config-draft-review` → `omc-business-configuration` → `omc-write-hazards` |
56
- | Unsure which tool / atom vs orchestration | `omc-tool-selection` |
57
- | About to write anything | `omc-config-draft-review` (human gate) → `omc-five-piece-flow` |
58
- | A write was refused / a status looks wrong | `omc-refusals` |
59
- | Cover a face the manifest doesn't have yet | `omc-capability-scouting` |
60
- | Decide whether the work is accepted | `omc-acceptance-criteria` |
61
- | A term is unclear | `omc-glossary` |
62
-
63
- The core loop behind all of them: **discover → draft → permission check →
64
- execute → readback/cleanup** (`omc-five-piece-flow`).
65
-
66
- ## 2. The two gates every write passes
67
-
68
- 1. **Human gate (conversational)** — `omc-config-draft-review`: present the
69
- change package in plain language and get explicit approval.
70
- 2. **Machine gate (environment)** — the profile's `writable` permission; a
71
- production environment additionally requires `confirmProduction:true` per
72
- write.
73
-
74
- There is no approval token, no `--yes`, and no self-approval switch. If a call
75
- refuses, work out which gate or boundary produced it from `omc-refusals`.
76
-
77
- ## 3. Boundaries
78
-
79
- Out-of-coverage, blocked, or unsupported faces refuse with a manifest citation —
80
- that refusal is the answer, not an obstacle to route around with another tool.
81
- Non-8.6 (or missing version evidence) fails writes closed. `uncertain` is never
82
- `ok`.
1
+ ---
2
+ name: omc-start-here
3
+ description: Onboarding router — use on first contact with the OMC CLI, or when unsure which methodology topic and command ladder a task needs. Maps a task to its topic sequence and the first commands to run.
4
+ ---
5
+
6
+ # Start Here (从这里开始)
7
+
8
+ Router for the `omc` CLI. Two jobs: the **first-contact command ladder**, and the
9
+ **task → topic map**. This package's `skills/` directory is the authoritative
10
+ shipped copy; a downstream distribution snapshot is only a mirror and must not
11
+ be treated as a second source. Read this, then follow the topics it names.
12
+
13
+ ## 最小路径(先读这段就能开始)
14
+
15
+ 1. `omc next "<目标>"`:先看返回的 `mode` 决定读/写与路径——
16
+ - `read`(读回/盘点/查询/检查)→ 只给**读工具**(`field.list`/`rule.get`/`workflow.get_draft`/`data.load`…),`write:false`;这是「读回现状、为下一步或写代码取证据」的入口,别回写工具。**读全一个模型用 `model.inspect <schemaCode>`(一次拿字段/表单/列表/规则/数据规则/流程摘要),别逐面 6 次调用**;`field.list` 默认只返业务字段(`all:true` 取全)。
17
+ - `whole-package`(做应用/系统、从零搭)→ 带 `intent` 块:写声明式意图文件,`omc intent validate/plan/apply/readback` 按依赖顺序合成原生结构,比逐能力拼装更省、更不易漂移;`intent: partial` 未覆盖的(应用/字典/集成/运行数据)再用 `call` 补。
18
+ - `build`/`modify` → 按阶梯内联的**写工具 + 必填参数**执行。
19
+ - `scout`(能不能/怎么写/是否支持)→ 先探边界(`omc-capability-scouting`),别直接写。若 `next` 返回 **`boundary`**(`match.kind:"boundary"`,如 `ocr-e-signature`/`release-prod`/`inline-coding`),说明需求**不在覆盖内**(`write:false`):如实报告、用 `omc capabilities` 核对,**不要**用相近能力伪造实现。
20
+ 阶梯步骤已内联工具必填参数(`route.ladder[].tools`/`readTools`)与命中 recipe 的 `describe <tool> --example <id>`;据此直接执行——**不要再逐能力 `commands --lane`**,也不要先扫 `commands --json`/全部 `contract`/全部 `describe --full`。
21
+ 方法论按 `route.readSections` 逐节读:对每条 `{topic, section}` 执行 `omc help <topic> --section "<section>"`(单节 0.4–3.4KB)。**不要 `omc help <topic>` 读整篇**(5–14KB,读一次就留在后续每一轮窗口)。
22
+ 2. 写前只需读 `omc-config-draft-review`(人审门)与 `omc-five-piece-flow`(发现→草稿→权限→执行→回读);`omc-business-configuration` 按命中的能力分节读(见 `next` 的 `readSections`),不要整篇预取。
23
+ 3. 环境名以 `omc doctor` 的「环境=」或 `.omc-env` 为准;工具不确定先用默认 `describe`/`--example`,只有单个工具缺形状才用 `--full`;`describe` 带 `exampleHint`/`recipeHint` 时优先 `--example`。
24
+ 4. 只有工具不在 `next` 命中能力内、或要看 purpose/枚举时,才补一次 `commands --json --compact --lane <lane>`。非显然形状(规则图、流程模板、表单布局、RESTFUL)才单独 `describe --example`。
25
+ 5. 键名按对象不同:模型 `schemaCode`、默认表单 `sheetCode`(可省略,默认 == 模型 code)、流程 `workflowCode`/`code`——报错会提示同义键;字段族名认不出会给「最接近的族」。
26
+ 6. **写操作串行**:同一环境不要并发写;`write-lock-held` 是瞬态,等几秒重试一次即可。
27
+ 7. **单个对象优先高阶编排工具**:模型+字段用 `configure_model`(一次含全部字段),表单用 `configure_form`,列表用 `listview.configure`(**默认视图已存在,省略 code 即配置它,不要 `listview.create`**)。原子工具留给单点修改。
28
+ 8. 拿到 `detailArtifactId` 先 `artifact get <id> --summary` 看结构,再 `--keys/--jq` 取所需;`field.list`/`workflow.*` 默认面已给清单与节点摘要;`workflow.get_draft` 默认面已含 `edges`,改流程只需传 `activities`+`routes`。
29
+ 9. 每个 section 读一次即可;同一 topic 不要反复读。
30
+ 10. **复杂流程先预检角色**:读 `org.role.list`/`org.user.search`,用真实可解析对象;缺独立角色就报告阻塞,不伪造。主子表条件按规则行 `schemaCode` 回所属子模型验证。
31
+ 11. **验收不只看回读**:配置后用 opt-in `npm run test:live`(`OMC_LIVE=1`),验设计器控件/条件 Set、门户字段/列表列/选项/流程;业务规则走 `data.save(workflowCode)`→`workitem.list`→`data.submit`→`data.load`。门户断言硬重载≥2次。
32
+
33
+
34
+ Run in a **clean project directory** (not the OMC dev repo). Start from the goal:
35
+
36
+ ```bash
37
+ omc next "<目标>" # goal → ordered route (offline)
38
+ omc doctor # environment name and readiness
39
+ omc call discover_environment --args '{}' # 单环境项目(.omc-env 在位)可省 --env;多环境才显式传
40
+ omc capability <selected-id> # only the selected capability
41
+ omc describe <tool> --example <recipe-id> # recipe first; default describe otherwise
42
+ omc help <topic> --section "<heading>" # one methodology section, not all
43
+ ```
44
+
45
+ Discovery precedes every write. 预算档位见 `omc-tool-selection` 的「Discovery 成本档位」;裸 `omc commands` 是有界索引,全量目录须显式 `commands --json`。
46
+
47
+ Fallback faces: `omc capabilities`, `omc capability <id-or-alias> --executable`, `omc commands --json --compact`, `omc contract <lane>`, `omc describe <tool>`.
48
+
49
+ ## 1. Task → topic map
50
+
51
+ | Your task | Read, in order |
52
+ | --- | --- |
53
+ | "能不能做 X" / 某能力覆盖什么 | `omc-capabilities`(能力总表;判"是否二开"前先自证) |
54
+ | Fuzzy Chinese requirement, unknown scope | `omc-requirement-analysis` → `omc-requirement-vocabulary` |
55
+ | Configure a business model end to end | `omc-config-draft-review` → `omc-business-configuration` → `omc-write-hazards` |
56
+ | Unsure which tool / atom vs orchestration | `omc-tool-selection` |
57
+ | About to write anything | `omc-config-draft-review` (human gate) → `omc-five-piece-flow` |
58
+ | A write was refused / a status looks wrong | `omc-refusals` |
59
+ | Cover a face the manifest doesn't have yet | `omc-capability-scouting` |
60
+ | Decide whether the work is accepted | `omc-acceptance-criteria` |
61
+ | A term is unclear | `omc-glossary` |
62
+
63
+ The core loop behind all of them: **discover → draft → permission check →
64
+ execute → readback/cleanup** (`omc-five-piece-flow`).
65
+
66
+ ## 2. The two gates every write passes
67
+
68
+ 1. **Human gate (conversational)** — `omc-config-draft-review`: present the
69
+ change package in plain language and get explicit approval.
70
+ 2. **Machine gate (environment)** — the profile's `writable` permission; a
71
+ production environment additionally requires `confirmProduction:true` per
72
+ write.
73
+
74
+ There is no approval token, no `--yes`, and no self-approval switch. If a call
75
+ refuses, work out which gate or boundary produced it from `omc-refusals`.
76
+
77
+ ## 3. Boundaries
78
+
79
+ Out-of-coverage, blocked, or unsupported faces refuse with a manifest citation —
80
+ that refusal is the answer, not an obstacle to route around with another tool.
81
+ Non-8.6 (or missing version evidence) fails writes closed. `uncertain` is never
82
+ `ok`.
@@ -1,119 +1,119 @@
1
- ---
2
- name: omc-tool-selection
3
- description: Choose the right OMC CLI tool for a goal. Use when unsure whether a task needs a high-level orchestration or a low-level atom.
4
- ---
5
-
6
- # Which Tool When (何时用哪个工具)
7
-
8
- ## Discovery 成本档位(按量级选,别一上来就点大档)
9
-
10
- 实测:一条重难业务里,agent 对**发现面**的重复读占了任务上下文的大头。先走小档,缺形状再逐级放大。
11
- (round14 已把各面瘦身,下表为当前实测。)
12
-
13
- | Face | ~size | 用途 |
14
- | --- | ---: | --- |
15
- | `omc next "<goal>"` | 2–5 KB | 目标→路线(首选) |
16
- | `omc commands --json --compact --lane <lane>` | ~1 KB | 单能力工具行(最省的枚举面) |
17
- | `omc describe <tool>` / `--example <id>` | 1.5–2.5 KB | 单工具形状 |
18
- | `omc commands` | ~8 KB | 有界索引(name/lane/kind) |
19
- | `omc commands --json --compact` | ~13 KB | 全量紧凑行 |
20
- | `omc capabilities` | ~6 KB | 14 能力总览;`next` 已给路线时可省 |
21
- | `omc commands --json` | ~20 KB | 全量目录(回退面,尽量避免) |
22
- | `omc describe <tool> --full` | 7–19 KB | 仅当 schema 需要;不再重发 recipes(用 `--example` 取可运行参数) |
23
-
24
- 裸 `omc commands` 只是索引;**全量目录必须显式 `--json`**。同一 face 不要反复读。
25
-
26
- ## Minimal-path cheat sheet(最小路径速查)
27
-
28
- 一条需求先问"它属于哪一类",直接走对应的最小调用,别一上来铺工具:
29
-
30
- | 你要做的事 | 一次调用(最小路径) |
31
- | --- | --- |
32
- | 读全**一个模型**的配置(字段/表单/列表/规则/数据规则/流程摘要) | `omc call model.inspect --args '{"schemaCode":"<m>"}'`(`all:true` 含系统字段) |
33
- | **列模型** | `omc call model.list --args '{"filter":"<词>"}'` |
34
- | 读**某条业务规则**的图 | `omc call rule.get --args '{"schemaCode":"<m>","ruleCode":"Create"}'`(不必先 list 取 id) |
35
- | 读某模型的**流程**(只知模型码) | `omc call workflow.get_draft --args '{"schemaCode":"<m>"}'` |
36
- | **改规则一个节点/分支阈值** | `omc call rule.node.update --args '{"schemaCode":"<m>","ruleCode":"Create","nodeCode":"Branch_1","patch":{...}}'`(改完 `rule.enable` 生效) |
37
- | 从零**建一个流程**并发布 | `omc call configure_workflow --args '{"schemaCode":"<m>","name":"…","code":"<wf>","template":{...}}'` |
38
- | **建模型+字段+表单+列表** | `omc call configure_model --args '{"name":"…","code":"<m>","fields":[...],"publishForm":true,"listview":{"fieldCodes":[...]}}'` |
39
- | publish 流程前**只读预检** | `omc call workflow.validate --args '{"schemaCode":"<m>"}'` |
40
- | **批量停用**某模型规则 | `omc call rule.disableMany --args '{"schemaCode":"<m>"}'`(默认含预置行;`customOnly:true` 只停自定义) |
41
- | 字段清单(去噪) | `omc call field.list --args '{"schemaCode":"<m>","published":true}'`(默认业务字段,`all:true` 取全) |
42
-
43
- **业务键优先**:`rule.get`/`datarule.update`/`datarule.delete`/`workflow.get_*` 接受业务键
44
- (schemaCode+ruleCode / schemaCode+propertyCode / schemaCode),免去先 list 取 id。
45
-
46
- **先看 `omc next` 的 `mode`**:`read` 只给读工具;`whole-package` 给 intent 声明式指引;
47
- `build`/`modify` 给写工具;`scout`(能不能/怎么写)先探边界。
48
-
49
- **纯读不必先发现**:已知读哪一面就直接 `omc call <读工具>`(上表),省掉 `next`/`discover_environment`;只有选不出工具时才用 `next`。发现仪式(`next`/`capabilities`/`discover_environment`)是写前与选不出工具时的路径。
50
-
51
- ## High layer — orchestrated CLI calls
52
-
53
- | Goal | Tool |
54
- | --- | --- |
55
- | Inspect environment health | `get_status` |
56
- | Full first look | `discover_environment` |
57
- | New model to usable state (model → field → field.publish → form.draft → form.publish) | `configure_model`(+ `listview` 参数到列表) |
58
- | Bind fields into the default form and publish | `configure_form` |
59
- | Business rule saved and enabled | `configure_rule` |
60
- | New workflow: create → update → publish (+ bind rules) | `configure_workflow` |
61
- | Health chain (config → credential → login → version family → fingerprint) | `doctor` |
62
- | Configure in-session with the human | `setup.start` → `setup.commit` |
63
-
64
- ## Low layer — atoms for fine control
65
-
66
- Reads: `environment.fingerprint`, `field.list`, `form.get`, `rule.list`,
67
- `data.list`, `data.load`, `service.get`, `app.list`, `coverage.manifest`,
68
- `workflow.get_draft`, `workflow.get_published`.
69
-
70
- Writes:
71
-
72
- - Model: `model.create`, `model.delete`
73
- - Applications: `app.create`, `app.delete` (deleting cascades its models)
74
- - Fields: `field.create`, `field.update`, `field.publish`, `field.delete`
75
- - Forms: `form.draft`, `form.publish`
76
- - Rules: `rule.save`, `rule.enable`, `rule.disable`, `rule.delete`
77
- - Workflow templates: `workflow.create`, `workflow.update`, `workflow.publish`, `workflow.bindRule`, `workflow.delete`
78
- - Online JS: 本 CLI 只**发布/回读**(`onlinejs.compose`,平台模板保真);脚本**编写**不在 CLI 范围——遵循当前项目自带的在线 JS 编写规范(若有),否则向用户/设计者索取已定稿 `source`。后端的在线开发(Java 源码)用二开扩展包,也不在本 CLI 范围
79
- - M2 data: `data.save`, `data.submit`, `data.delete`
80
- - B2 services: `service.register`, `service.delete`
81
- - List views: `listview.create`, `listview.configure`, `listview.delete`
82
-
83
- ## Decision rules
84
-
85
- 1. Default to the high layer; drop to atoms only to compose what the orchestration doesn't cover.
86
- 2. Preview any write with `dryRun:true`; it returns the plan and executes nothing.
87
- 3. `writable:false` refuses before any wire. A production write additionally requires `confirmProduction:true`.
88
- 4. Out-of-coverage desire (permissions, nested child tables, OCR, app publish)? The refusal cites the manifest entry — that is the answer. Check `coverage.manifest`.
89
- 5. If any call returns `uncertain`, stop writing and re-run discovery before the next write.
90
-
91
- ## Key-name table (同一对象在不同工具里的键名)
92
-
93
- The same object is addressed under different keys. A wrong key is dropped silently
94
- by the Tool-input gate and then reported only as `X: Required` — it never says
95
- "the field you sent was ignored". Check here first.
96
-
97
- | Object | Tools | Key |
98
- | --- | --- | --- |
99
- | Model | `model.*`, `field.*`, `form.*`, `datarule.*`, `rule.*` | `schemaCode` |
100
- | Workflow template | `workflow.get_draft`, `workflow.get_published`, `workflow.bindRule` | `workflowCode`(或 `schemaCode`,工具内部解析) |
101
- | Workflow template | `workflow.create`, `workflow.update`, `workflow.publish`, `workflow.delete` | `code`(+ `schemaCode`) |
102
- | Default form | `form.get`, `form.draft`, `form.publish`, `configure_form` | `schemaCode`(必填)+ `sheetCode`(可选,默认=schemaCode) |
103
- | Field | `field.create`, `field.update`, `field.delete` | `code` |
104
-
105
- **业务键优先(identity seam)**:多个只读/改写工具现在接受业务键,免去先 list 取 id:
106
-
107
- - `rule.get` 接受 `schemaCode + ruleCode`(返回**当前生效行**,不用先 `rule.list` 拿 id)。
108
- - `datarule.update` / `datarule.delete` 接受 `schemaCode + propertyCode(+dataRuleType)`(同一字段多条规则时必须带 `dataRuleType` 去歧义)。
109
- - `workflow.get_draft` / `workflow.get_published` 接受 `schemaCode`(不是每个模型都有流程;没有则 `exists:false`)。
110
-
111
- **按工具别名(同一对象换个键名也收)**:`workflow.create/update/publish/delete` 的 `code`
112
- 也接受 `workflowCode`;`field.create/update/delete` 的 `code` 也接受 `propertyCode`。
113
- 别名只在规范键缺失时补入,不会覆盖;它**按工具声明**(不是全局),因为同一个 `code`
114
- 在不同工具里可能指不同对象。
115
-
116
- 精确 `id` 仍然可用,旧调用不受影响。`workflowCode` 与 `code` 指同一流程:读/绑定工具用
117
- `workflowCode`,写工具用 `code`(写工具现已同时接受 `workflowCode`);读工具现在也可直接给 `schemaCode`。
118
-
119
- Fixture discipline: one-shot `omc_mcp_*` fixtures, cleaned up in reverse order, zero residue.
1
+ ---
2
+ name: omc-tool-selection
3
+ description: Choose the right OMC CLI tool for a goal. Use when unsure whether a task needs a high-level orchestration or a low-level atom.
4
+ ---
5
+
6
+ # Which Tool When (何时用哪个工具)
7
+
8
+ ## Discovery 成本档位(按量级选,别一上来就点大档)
9
+
10
+ 实测:一条重难业务里,agent 对**发现面**的重复读占了任务上下文的大头。先走小档,缺形状再逐级放大。
11
+ (round14 已把各面瘦身,下表为当前实测。)
12
+
13
+ | Face | ~size | 用途 |
14
+ | --- | ---: | --- |
15
+ | `omc next "<goal>"` | 2–5 KB | 目标→路线(首选) |
16
+ | `omc commands --json --compact --lane <lane>` | ~1 KB | 单能力工具行(最省的枚举面) |
17
+ | `omc describe <tool>` / `--example <id>` | 1.5–2.5 KB | 单工具形状 |
18
+ | `omc commands` | ~8 KB | 有界索引(name/lane/kind) |
19
+ | `omc commands --json --compact` | ~13 KB | 全量紧凑行 |
20
+ | `omc capabilities` | ~6 KB | 14 能力总览;`next` 已给路线时可省 |
21
+ | `omc commands --json` | ~20 KB | 全量目录(回退面,尽量避免) |
22
+ | `omc describe <tool> --full` | 7–19 KB | 仅当 schema 需要;不再重发 recipes(用 `--example` 取可运行参数) |
23
+
24
+ 裸 `omc commands` 只是索引;**全量目录必须显式 `--json`**。同一 face 不要反复读。
25
+
26
+ ## Minimal-path cheat sheet(最小路径速查)
27
+
28
+ 一条需求先问"它属于哪一类",直接走对应的最小调用,别一上来铺工具:
29
+
30
+ | 你要做的事 | 一次调用(最小路径) |
31
+ | --- | --- |
32
+ | 读全**一个模型**的配置(字段/表单/列表/规则/数据规则/流程摘要) | `omc call model.inspect --args '{"schemaCode":"<m>"}'`(`all:true` 含系统字段) |
33
+ | **列模型** | `omc call model.list --args '{"filter":"<词>"}'` |
34
+ | 读**某条业务规则**的图 | `omc call rule.get --args '{"schemaCode":"<m>","ruleCode":"Create"}'`(不必先 list 取 id) |
35
+ | 读某模型的**流程**(只知模型码) | `omc call workflow.get_draft --args '{"schemaCode":"<m>"}'` |
36
+ | **改规则一个节点/分支阈值** | `omc call rule.node.update --args '{"schemaCode":"<m>","ruleCode":"Create","nodeCode":"Branch_1","patch":{...}}'`(patch 后自动 save;带 `"publish":true` 则保存+发布一调完成,生效仍需 `rule.enable`) |
37
+ | 从零**建一个流程**并发布 | `omc call configure_workflow --args '{"schemaCode":"<m>","name":"…","code":"<wf>","template":{...}}'` |
38
+ | **建模型+字段+表单+列表** | `omc call configure_model --args '{"name":"…","code":"<m>","fields":[...],"publishForm":true,"listview":{"fieldCodes":[...]}}'` |
39
+ | publish 流程前**只读预检** | `omc call workflow.validate --args '{"schemaCode":"<m>"}'` |
40
+ | **批量停用**某模型规则 | `omc call rule.disableMany --args '{"schemaCode":"<m>"}'`(默认含预置行;`customOnly:true` 只停自定义) |
41
+ | 字段清单(去噪) | `omc call field.list --args '{"schemaCode":"<m>","published":true}'`(默认业务字段,`all:true` 取全) |
42
+
43
+ **业务键优先**:`rule.get`/`datarule.update`/`datarule.delete`/`workflow.get_*` 接受业务键
44
+ (schemaCode+ruleCode / schemaCode+propertyCode / schemaCode),免去先 list 取 id。
45
+
46
+ **先看 `omc next` 的 `mode`**:`read` 只给读工具;`whole-package` 给 intent 声明式指引;
47
+ `build`/`modify` 给写工具;`scout`(能不能/怎么写)先探边界。
48
+
49
+ **纯读不必先发现**:已知读哪一面就直接 `omc call <读工具>`(上表),省掉 `next`/`discover_environment`;只有选不出工具时才用 `next`。发现仪式(`next`/`capabilities`/`discover_environment`)是写前与选不出工具时的路径。
50
+
51
+ ## High layer — orchestrated CLI calls
52
+
53
+ | Goal | Tool |
54
+ | --- | --- |
55
+ | Inspect environment health | `get_status` |
56
+ | Full first look | `discover_environment` |
57
+ | New model to usable state (model → field → field.publish → form.draft → form.publish) | `configure_model`(+ `listview` 参数到列表) |
58
+ | Bind fields into the default form and publish | `configure_form` |
59
+ | Business rule saved and enabled | `configure_rule` |
60
+ | New workflow: create → update → publish (+ bind rules) | `configure_workflow` |
61
+ | Health chain (config → credential → login → version family → fingerprint) | `doctor` |
62
+ | Configure in-session with the human | `setup.start` → `setup.commit` |
63
+
64
+ ## Low layer — atoms for fine control
65
+
66
+ Reads: `environment.fingerprint`, `field.list`, `form.get`, `rule.list`,
67
+ `data.list`, `data.load`, `service.list`, `service.get`, `app.list`, `coverage.manifest`,
68
+ `workflow.get_draft`, `workflow.get_published`.
69
+
70
+ Writes:
71
+
72
+ - Model: `model.create`, `model.delete`
73
+ - Applications: `app.create`, `app.delete` (deleting cascades its models)
74
+ - Fields: `field.create`, `field.update`, `field.publish`, `field.delete`
75
+ - Forms: `form.draft`, `form.publish`
76
+ - Rules: `rule.save`, `rule.enable`, `rule.disable`, `rule.delete`
77
+ - Workflow templates: `workflow.create`, `workflow.update`, `workflow.publish`, `workflow.bindRule`, `workflow.delete`
78
+ - Online JS: 本 CLI 只**发布/回读**(`onlinejs.compose`,平台模板保真);脚本**编写**不在 CLI 范围——遵循当前项目自带的在线 JS 编写规范(若有),否则向用户/设计者索取已定稿 `source`。后端的在线开发(Java 源码)用二开扩展包,也不在本 CLI 范围
79
+ - M2 data: `data.save`, `data.submit`, `data.delete`
80
+ - B2 services: `service.register`, `service.delete`
81
+ - List views: `listview.create`, `listview.configure`, `listview.delete`
82
+
83
+ ## Decision rules
84
+
85
+ 1. Default to the high layer; drop to atoms only to compose what the orchestration doesn't cover.
86
+ 2. Preview any write with `dryRun:true`; it returns the plan and executes nothing.
87
+ 3. `writable:false` refuses before any wire. A production write additionally requires `confirmProduction:true`.
88
+ 4. Out-of-coverage desire (permissions, nested child tables, OCR, app publish)? The refusal cites the manifest entry — that is the answer. Check `coverage.manifest`.
89
+ 5. If any call returns `uncertain`, stop writing and re-run discovery before the next write.
90
+
91
+ ## Key-name table (同一对象在不同工具里的键名)
92
+
93
+ The same object is addressed under different keys. A wrong key is dropped silently
94
+ by the Tool-input gate and then reported only as `X: Required` — it never says
95
+ "the field you sent was ignored". Check here first.
96
+
97
+ | Object | Tools | Key |
98
+ | --- | --- | --- |
99
+ | Model | `model.*`, `field.*`, `form.*`, `datarule.*`, `rule.*` | `schemaCode` |
100
+ | Workflow template | `workflow.get_draft`, `workflow.get_published`, `workflow.bindRule` | `workflowCode`(或 `schemaCode`,工具内部解析) |
101
+ | Workflow template | `workflow.create`, `workflow.update`, `workflow.publish`, `workflow.delete` | `code`(+ `schemaCode`) |
102
+ | Default form | `form.get`, `form.draft`, `form.publish`, `configure_form` | `schemaCode`(必填)+ `sheetCode`(可选,默认=schemaCode) |
103
+ | Field | `field.create`, `field.update`, `field.delete` | `code` |
104
+
105
+ **业务键优先(identity seam)**:多个只读/改写工具现在接受业务键,免去先 list 取 id:
106
+
107
+ - `rule.get` 接受 `schemaCode + ruleCode`(返回**当前生效行**,不用先 `rule.list` 拿 id)。
108
+ - `datarule.update` / `datarule.delete` 接受 `schemaCode + propertyCode(+dataRuleType)`(同一字段多条规则时必须带 `dataRuleType` 去歧义)。
109
+ - `workflow.get_draft` / `workflow.get_published` 接受 `schemaCode`(不是每个模型都有流程;没有则 `exists:false`)。
110
+
111
+ **按工具别名(同一对象换个键名也收)**:`workflow.create/update/publish/delete` 的 `code`
112
+ 也接受 `workflowCode`;`field.create/update/delete` 的 `code` 也接受 `propertyCode`。
113
+ 别名只在规范键缺失时补入,不会覆盖;它**按工具声明**(不是全局),因为同一个 `code`
114
+ 在不同工具里可能指不同对象。
115
+
116
+ 精确 `id` 仍然可用,旧调用不受影响。`workflowCode` 与 `code` 指同一流程:读/绑定工具用
117
+ `workflowCode`,写工具用 `code`(写工具现已同时接受 `workflowCode`);读工具现在也可直接给 `schemaCode`。
118
+
119
+ Fixture discipline: one-shot `omc_mcp_*` fixtures, cleaned up in reverse order, zero residue.