@stalfh233/omc-cli 0.4.15 → 0.4.17

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 (185) 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 +24 -2
  26. package/dist/code-rules.js +0 -0
  27. package/dist/command-transport.js +0 -0
  28. package/dist/config-store.js +4 -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 +48 -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 +14 -2
  155. package/dist/session.js +68 -13
  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/token-cache.js +65 -0
  160. package/dist/tool-types.js +0 -0
  161. package/dist/tools.js +0 -0
  162. package/dist/usage-log.js +4 -0
  163. package/dist/wire.js +0 -0
  164. package/dist/workflow-support.js +0 -0
  165. package/dist/write-lease.js +0 -0
  166. package/dist/write-lock.js +0 -0
  167. package/dist/write.js +24 -2
  168. package/dist/zip.js +0 -0
  169. package/docs/tool-surface-map.md +42 -42
  170. package/package.json +71 -71
  171. package/skills/omc-acceptance-criteria.md +47 -47
  172. package/skills/omc-business-configuration.md +258 -257
  173. package/skills/omc-capabilities.md +197 -197
  174. package/skills/omc-capability-scouting.md +55 -55
  175. package/skills/omc-config-draft-review.md +171 -171
  176. package/skills/omc-five-piece-flow.md +35 -35
  177. package/skills/omc-glossary.md +86 -86
  178. package/skills/omc-refusals.md +110 -110
  179. package/skills/omc-requirement-analysis.md +161 -161
  180. package/skills/omc-requirement-vocabulary.md +51 -51
  181. package/skills/omc-start-here.md +82 -82
  182. package/skills/omc-tool-selection.md +119 -119
  183. package/skills/omc-write-hazards.md +88 -87
  184. package/dist/approval-token.js +0 -102
  185. package/dist/server.js +0 -92
@@ -1,110 +1,110 @@
1
- ---
2
- name: omc-refusals
3
- description: Decode a refused or uncertain OMC result. Use when a call returns refused/uncertain, or a status looks wrong, to find what the blocker means and the correct next action. Grouped by family, not enumerated per code.
4
- ---
5
-
6
- # Refusals & Recovery (拒绝与恢复)
7
-
8
- Grouped by family. For a specific tool's exact wire and valid shapes, follow the
9
- `contract`/`describe` pointers; this page is the **meaning + next action**.
10
-
11
- Read `result.blocker` (refused) or `result.status`+`result.reason` (uncertain).
12
- `result.retryable` is advisory only — the family decides what to do.
13
-
14
- ## 1. Write permission declined
15
-
16
- - `environment-write-disabled` — the environment profile has `writable:false`.
17
- **Do not retry the same call.** Either the operator turns writes on in
18
- `omc setup`, or the write is out of bounds. Zero wire was sent.
19
- - `production-confirmation-required` — the target is production and the call
20
- omitted `confirmProduction:true`. If the human approved a production write,
21
- re-send with `confirmProduction:true`; otherwise **stop**. Zero wire was sent.
22
-
23
- ## 2. Boundary — the capability is not covered
24
-
25
- - `capability-out-of-coverage` — `result.citation` names the manifest entry and
26
- its status (`blocked` / `unsupported` / `static-only`). **The refusal is the
27
- answer.** Do not route around it with a lower-level tool; the boundary is the
28
- same. If it should be covered, use `omc-capability-scouting`.
29
- - `version-family-evidence-missing` — no version evidence could be parsed at all;
30
- writes fail closed. (A version that simply isn't 8.6 is **not** a refusal any
31
- more: OMC is built on 8.6 but accepts other versions/product lines in
32
- compatibility mode, surfacing a `versionNotice`; only truly absent evidence
33
- still fails closed.) Verify the environment's version before retrying.
34
-
35
- ## 3. Semantic preflight — the payload is malformed
36
-
37
- Refused **before any wire call**; fix the payload, don't retry as-is. The refusal
38
- usually carries `validation` entries to fix one by one.
39
-
40
- - `business-code-invalid`, `duplicate-field`, `duplicate-service`,
41
- `dictionary-create-duplicate`, `app-create-duplicate`, `model-create-duplicate`
42
- - `field-*` family gates (unaccepted family, missing relation `relativeCode`,
43
- nested child table, OCR/ELECTRONIC_SIGN)
44
- - `form-layout-invalid`, `form-fieldcodes-unknown`, `form-html-render-invalid`
45
- - `rule-graph-validation-failed`, `rule-graph-*` (node-graph dry lint)
46
- - `datarule-options-invalid`, `datarule-property-not-published`, `datarule-duplicate-property-type`
47
- - `listview-*` (columns/buttons/sorts/gantt/presentation)
48
- - `configure-model-*`, `apply-changes-tool-not-atomic`, `apply-changes-step-failed`
49
- - `bizservice-*` (required field, name length, config invalid, category/dbconnpool)
50
- - `model-type-immutable`, `model-referenced-by`
51
-
52
- ### 3b. A platform `errcode` is a SHAPE error, never a boundary
53
-
54
- `blocker:"wire-business"` + non-zero `errcode` means the payload's shape (or a
55
- referenced dependency) is wrong — **not** that the capability is unavailable.
56
- Fix the shape; never conclude 「配置表达不了 → 必须二开」 from an errcode.
57
- Known shape codes: `300010` a node resolves its input schema from `inputParam`
58
- and it is missing (BRANCH/UPDATE/CREATE/DELETE/ASSIGN/BIZ_ACTION/MESSAGE/QUERY;
59
- `prepareRuleGraph` defaults `"_input"`) or a node names a non-existent schema;
60
- `550018` a referenced field/out-param/mapping key is absent; `50000` a
61
- condition/expression/query shape is off. Compare against
62
- `omc describe <tool> --example …` and the node-graph prose, then re-save.
63
- Escalate to 二开 **only** for a real `capability-out-of-coverage` (§2).
64
-
65
- ## 4. Readback mismatch — the write landed but does not match
66
-
67
- `*-readback-failed`, `*-readback-mismatch`, `cleanup-absence-readback`,
68
- `intent-readback-mismatch`, `workflow-render-readback-invalid`.
69
-
70
- **Stop and report.** Never auto-retry, never assume success. Inspect
71
- `result.readback` / `result.verification.differences`, compare against the
72
- approved draft, and decide with the human. A second write may duplicate.
73
-
74
- ## 5. Dependency & async convergence
75
-
76
- - `model-referenced-by` — inbound relation references block the delete. Clean up
77
- **dependency-inverted**: delete referencing models first, then the referenced
78
- one.
79
- - `absent:false` + `treeNodePending:true` with `nextAction:"wait-and-recheck"` —
80
- the platform's per-column cascade is still running (40–60s). **Not a failure.**
81
- Wait ~60s and re-run; the call is idempotent and `already-absent` short-circuits.
82
-
83
- ## 6. Idempotency & replay
84
-
85
- - A repeated `requestId` with identical args returns `replay:"already-completed"`
86
- — the first write stands; treat as success, do not re-execute.
87
- - `intent-plan-tampered` — the plan file changed after planning. Re-run
88
- `intent plan`.
89
- - `intent-baseline-drifted` — the environment moved after planning. Re-run
90
- `intent plan` against the fresh baseline.
91
- - `intent-plan-environment-mismatch` — the plan targets a different environment.
92
-
93
- ## 7. Transport uncertainty — outcome unknown
94
-
95
- `status:"uncertain"` with `frozen:true` (`cli-timeout`, `batch-timeout-budget`,
96
- `wire-transport:*`). The write **may** be in flight.
97
-
98
- 1. Read back the affected resource (or `artifact get <id>` / the `requestId`).
99
- 2. Only after the outcome is established, decide whether to retry.
100
- 3. Never blind-retry — that risks a second write.
101
-
102
- `write-lock-held` — another write holds the environment lock; `owner` and
103
- `recovery` are included. Wait for it to clear (it auto-recovers when the holding
104
- process exits), then retry. This guards concurrency, not approval.
105
-
106
- ## 8. Input / target
107
-
108
- - `tool-input-invalid` — schema violation (exit 10); fix the arguments.
109
- - `dictionary-target-required`, `intent-plan-invalid` — a required selector or
110
- shape is missing; see `describe <tool>`.
1
+ ---
2
+ name: omc-refusals
3
+ description: Decode a refused or uncertain OMC result. Use when a call returns refused/uncertain, or a status looks wrong, to find what the blocker means and the correct next action. Grouped by family, not enumerated per code.
4
+ ---
5
+
6
+ # Refusals & Recovery (拒绝与恢复)
7
+
8
+ Grouped by family. For a specific tool's exact wire and valid shapes, follow the
9
+ `contract`/`describe` pointers; this page is the **meaning + next action**.
10
+
11
+ Read `result.blocker` (refused) or `result.status`+`result.reason` (uncertain).
12
+ `result.retryable` is advisory only — the family decides what to do.
13
+
14
+ ## 1. Write permission declined
15
+
16
+ - `environment-write-disabled` — the environment profile has `writable:false`.
17
+ **Do not retry the same call.** Either the operator turns writes on in
18
+ `omc setup`, or the write is out of bounds. Zero wire was sent.
19
+ - `production-confirmation-required` — the target is production and the call
20
+ omitted `confirmProduction:true`. If the human approved a production write,
21
+ re-send with `confirmProduction:true`; otherwise **stop**. Zero wire was sent.
22
+
23
+ ## 2. Boundary — the capability is not covered
24
+
25
+ - `capability-out-of-coverage` — `result.citation` names the manifest entry and
26
+ its status (`blocked` / `unsupported` / `static-only`). **The refusal is the
27
+ answer.** Do not route around it with a lower-level tool; the boundary is the
28
+ same. If it should be covered, use `omc-capability-scouting`.
29
+ - `version-family-evidence-missing` — no version evidence could be parsed at all;
30
+ writes fail closed. (A version that simply isn't 8.6 is **not** a refusal any
31
+ more: OMC is built on 8.6 but accepts other versions/product lines in
32
+ compatibility mode, surfacing a `versionNotice`; only truly absent evidence
33
+ still fails closed.) Verify the environment's version before retrying.
34
+
35
+ ## 3. Semantic preflight — the payload is malformed
36
+
37
+ Refused **before any wire call**; fix the payload, don't retry as-is. The refusal
38
+ usually carries `validation` entries to fix one by one.
39
+
40
+ - `business-code-invalid`, `duplicate-field`, `duplicate-service`,
41
+ `dictionary-create-duplicate`, `app-create-duplicate`, `model-create-duplicate`
42
+ - `field-*` family gates (unaccepted family, missing relation `relativeCode`,
43
+ nested child table, OCR/ELECTRONIC_SIGN)
44
+ - `form-layout-invalid`, `form-fieldcodes-unknown`, `form-html-render-invalid`
45
+ - `rule-graph-validation-failed`, `rule-graph-*` (node-graph dry lint)
46
+ - `datarule-options-invalid`, `datarule-property-not-published`, `datarule-duplicate-property-type`
47
+ - `listview-*` (columns/buttons/sorts/gantt/presentation)
48
+ - `configure-model-*`, `apply-changes-tool-not-atomic`, `apply-changes-step-failed`
49
+ - `bizservice-*` (required field, name length, config invalid, category/dbconnpool)
50
+ - `model-type-immutable`, `model-referenced-by`
51
+
52
+ ### 3b. A platform `errcode` is a SHAPE error, never a boundary
53
+
54
+ `blocker:"wire-business"` + non-zero `errcode` means the payload's shape (or a
55
+ referenced dependency) is wrong — **not** that the capability is unavailable.
56
+ Fix the shape; never conclude 「配置表达不了 → 必须二开」 from an errcode.
57
+ Known shape codes: `300010` a node resolves its input schema from `inputParam`
58
+ and it is missing (BRANCH/UPDATE/CREATE/DELETE/ASSIGN/BIZ_ACTION/MESSAGE/QUERY;
59
+ `prepareRuleGraph` defaults `"_input"`) or a node names a non-existent schema;
60
+ `550018` a referenced field/out-param/mapping key is absent; `50000` a
61
+ condition/expression/query shape is off. Compare against
62
+ `omc describe <tool> --example …` and the node-graph prose, then re-save.
63
+ Escalate to 二开 **only** for a real `capability-out-of-coverage` (§2).
64
+
65
+ ## 4. Readback mismatch — the write landed but does not match
66
+
67
+ `*-readback-failed`, `*-readback-mismatch`, `cleanup-absence-readback`,
68
+ `intent-readback-mismatch`, `workflow-render-readback-invalid`.
69
+
70
+ **Stop and report.** Never auto-retry, never assume success. Inspect
71
+ `result.readback` / `result.verification.differences`, compare against the
72
+ approved draft, and decide with the human. A second write may duplicate.
73
+
74
+ ## 5. Dependency & async convergence
75
+
76
+ - `model-referenced-by` — inbound relation references block the delete. Clean up
77
+ **dependency-inverted**: delete referencing models first, then the referenced
78
+ one.
79
+ - `absent:false` + `treeNodePending:true` with `nextAction:"wait-and-recheck"` —
80
+ the platform's per-column cascade is still running (40–60s). **Not a failure.**
81
+ Wait ~60s and re-run; the call is idempotent and `already-absent` short-circuits.
82
+
83
+ ## 6. Idempotency & replay
84
+
85
+ - A repeated `requestId` with identical args returns `replay:"already-completed"`
86
+ — the first write stands; treat as success, do not re-execute.
87
+ - `intent-plan-tampered` — the plan file changed after planning. Re-run
88
+ `intent plan`.
89
+ - `intent-baseline-drifted` — the environment moved after planning. Re-run
90
+ `intent plan` against the fresh baseline.
91
+ - `intent-plan-environment-mismatch` — the plan targets a different environment.
92
+
93
+ ## 7. Transport uncertainty — outcome unknown
94
+
95
+ `status:"uncertain"` with `frozen:true` (`cli-timeout`, `batch-timeout-budget`,
96
+ `wire-transport:*`). The write **may** be in flight.
97
+
98
+ 1. Read back the affected resource (or `artifact get <id>` / the `requestId`).
99
+ 2. Only after the outcome is established, decide whether to retry.
100
+ 3. Never blind-retry — that risks a second write.
101
+
102
+ `write-lock-held` — another write holds the environment lock; `owner` and
103
+ `recovery` are included. Wait for it to clear (it auto-recovers when the holding
104
+ process exits), then retry. This guards concurrency, not approval.
105
+
106
+ ## 8. Input / target
107
+
108
+ - `tool-input-invalid` — schema violation (exit 10); fix the arguments.
109
+ - `dictionary-target-required`, `intent-plan-invalid` — a required selector or
110
+ shape is missing; see `describe <tool>`.
@@ -1,161 +1,161 @@
1
- ---
2
- name: omc-requirement-analysis
3
- description: Turn a fuzzy Chinese requirement into a platform-independent Configuration Intent. Use before discovery when the ask is vague or spans domains.
4
- ---
5
-
6
- # Requirement Analysis (需求分析)
7
-
8
- Turn a fuzzy Chinese requirement into a platform-independent **Configuration
9
- Intent** before any discovery, plan, or draft.
10
-
11
- This is reasoning, not a governed tool: it reads no environment, prints no
12
- credential, and writes nothing.
13
-
14
- **Leading word: 定面** — name the face. The same Chinese word names several
15
- OMC surfaces (规则, 表单, 字段, 集成, 在线, 数据). 定面 first; everything after
16
- depends on it. This word is shared with `omc-capability-scouting`.
17
-
18
- ## Process
19
-
20
- Five moves, in order. Each ends on a completion criterion.
21
-
22
- ### 1. 定面 — name the face
23
-
24
- For every noun in the requirement, assign exactly one OMC face from the 定面表.
25
-
26
- **Done when** every ambiguous noun carries exactly one face, and every noun
27
- with no face is marked a boundary.
28
-
29
- ### 2. 归类 — capability and lane
30
-
31
- Map each face to its capability, lane, and status in the 能力表.
32
-
33
- **Done when** every face has a capability, its lane, and one status
34
- (`executable` / `partial` / `blocked` / `unsupported`).
35
-
36
- ### 3. 选路 — implementation path
37
-
38
- Choose one path per behavior, in preference order: **native** →
39
- **configuration + Online JS** → **configuration + backend extension**.
40
-
41
- **Done when** each behavior carries a path, and every non-native path names
42
- the code owner and why native cannot carry it.
43
-
44
- ### 4. 澄清 — risk-driven
45
-
46
- Ask only about unresolved details that change behavior, data, environment
47
- impact, or acceptance (see 澄清触发). A blocked or unsupported face is a
48
- **boundary** — stated, not asked. All other detail takes the established
49
- project convention.
50
-
51
- **Done when** the open-question list is emitted, or empty.
52
-
53
- ### 5. 出意图 — emit Configuration Intent
54
-
55
- Emit the intent object (see Configuration Intent).
56
-
57
- **Done when** every field is populated and `nextStep` is set.
58
-
59
- ## 定面表 — disambiguate before classifying
60
-
61
- | 需求里的词 | 面 A | 面 B | 判别 |
62
- | --- | --- | --- | --- |
63
- | 规则 | cross-model **businessrule** graph (B 平面) | 字段级控件规则 `dataRuleType` 3/4/5 | 跨模型/触发/动作 → businessrule;单字段随值必填/只读/显示 → 表单控件绑定 |
64
- | 表单 | default form **(`bizsheet`)** | list view **(`query`)** | 录入/详情/布局/控件 → default form;列表/视图/筛选列 → list view |
65
- | 字段 | model property **(`bizproperty`)** | form control binding | 结构/类型 → model field;可见/只读/必填 → form binding |
66
- | 集成 | B2 业务集成服务 **(`bizservice`,`service.register`)** | 方法体来源:原生适配器(RESTFUL→外部 API)/ 二开扩展接口(也用 RESTFUL 指向扩展端点) | 对接接口/外部系统、或需自定义 Java 方法体 → **一律用 RESTFUL 业务集成服务**(二开接口 = 扩展模块写 REST 接口 + RESTFUL 服务指向它);自定义协议适配器 SPI 是「新增一种协议类型」,非常规、且不在工具支持面 |
67
- | 在线 | form **Online JS** | 在线后端编码 | 表单脚本 → Online JS;内联后端代码 → boundary (unsupported) |
68
- | 数据 | M2 runtime data | model/field 定义 | 记录读写 → M2 data;结构 → model/field |
69
-
70
- ## 归类 — face → capability
71
-
72
- Each face maps to a capability; **read the capability's coverage, tools,
73
- recipes, and boundaries from `omc-capabilities`** — that catalogue is the prose
74
- authority (this section is a pointer, not a second copy). Read only the section
75
- you need: `omc help omc-capabilities --section "<能力>"`. At call time the
76
- coverage manifest is authoritative and the tool gate rejects out-of-coverage
77
- calls.
78
-
79
- > `blocked` / `unsupported` are **native-config** verdicts. They route the
80
- > behavior to another code owner (`config + backend extension`), they do NOT
81
- > mean the requirement is undeliverable. Compiling a blocked face into "can't
82
- > do it, leave it manual" is a failure mode — see 选路.
83
-
84
- Full Chinese cue vocabulary lives in `omc-requirement-vocabulary.md` — reach
85
- for it when a cue in step 1 is not obvious from 定面表.
86
-
87
- ## 选路 — path rules
88
-
89
- > 落点判据(配置 vs 二开、组合观)的唯一权威源是 `cpdocs-guide` 的「落点」;本节只列 OMC 侧的落点执行。
90
-
91
- - **Native configuration** owns structure and lifecycle: models, fields,
92
- forms, list views, rule graphs, workflow templates.
93
- - **Online JS** owns form interaction and presentation: visibility, labels,
94
- field linkage, preview. It *previews* a computed value; the saved value
95
- comes from native config or a backend extension.
96
- - **Backend extension** is the method-BODY source when native config cannot
97
- express the logic. Expose it the normal way: **write an interface (a REST
98
- endpoint) in the extension package, then register a `RESTFUL` service pointing
99
- at it** (`service.register`, `adapterCode:RESTFUL`, `methodConfig.url` → the
100
- extension endpoint). Do NOT use `INTERNAL` / `custom_protocol` adapters — those
101
- are platform-internal protocol mechanisms, not the way a 二开 interface is
102
- registered, and they are outside the write face. A RESTFUL service pointing at
103
- an external API is the same face.
104
- - **Business-rule action dual path**: a rule's action nodes use product-native
105
- CRUD/query nodes (no code) **or** bind an already-released BizMethod. Surface
106
- both paths; the clarification decides.
107
- - **Cannot express declaratively ⇒ `config + backend extension`, do not stop** —
108
- the code owner is a backend extension (interface in the extension package +
109
- `RESTFUL` service + BIZ_ACTION/button binding). **Do not report "blocked" and
110
- leave the value unbuilt, and do not substitute an external throwaway script.**
111
-
112
- ## 澄清触发 — ask only when
113
-
114
- - the business domain is unknown, or a noun in 定面表 stays ambiguous;
115
- - money, cumulative values, or concurrency are involved;
116
- - the requirement is environment-impacting (上线 / 发布 / 生产 / 释放冻结);
117
- - two capabilities could satisfy it and the choice changes behavior.
118
-
119
- Proceed with the convention when the detail is cosmetic (label wording,
120
- layout polish) or already implied by an established project pattern.
121
-
122
- ## Configuration Intent
123
-
124
- ```jsonc
125
- {
126
- "domains": ["customer", "project"],
127
- "capabilities": ["model", "field", "form", "businessrule", "workflow"],
128
- "intent": {
129
- "entities": [{ "name": "…", "fields": [{ "name": "…", "type": "…" }] }],
130
- "behaviors": [{ "trigger": "create|update|delete|button|system|timed|…", "action": "…" }],
131
- "integrations": [{ "kind": "native-crud|bizmethod|b2-service", "target": "…" }]
132
- },
133
- "implementationPath": "native | config+onlinejs | config+backend-extension",
134
- "risks": ["…"],
135
- "clarifications": ["…"],
136
- "acceptanceScenarios": ["…"],
137
- "nextStep": "discover_and_plan | clarify | boundary"
138
- }
139
- ```
140
-
141
- `clarify` whenever 澄清触发 fires; `boundary` when a face is out of coverage;
142
- otherwise `discover_and_plan`.
143
-
144
- ## 反模式
145
-
146
- - Classifying a noun before 定面 — e.g. mapping 规则 to `dataRuleType` when a
147
- cross-model graph was meant.
148
- - Treating 对接外部系统 as a cue to develop a custom protocol adapter SPI — that
149
- is a rare NEW PROTOTYPE, not integration. The normal path is a
150
- business-integration service (`service.register`).
151
- - Routing a saved value through Online JS.
152
- - Inventing a capability for a blocked face. Cite the boundary instead.
153
- - Emitting a plan or DTO payload here — intent stays platform-independent
154
- until discovery.
155
-
156
- ## 接续
157
-
158
- Intent feeds, in order: `discover_environment` (fingerprint + existing
159
- resources) → configuration baseline → `omc-five-piece-flow`. For a face not
160
- yet proven, use `omc-capability-scouting`. For the concrete tool to call, use
161
- `omc-tool-selection`.
1
+ ---
2
+ name: omc-requirement-analysis
3
+ description: Turn a fuzzy Chinese requirement into a platform-independent Configuration Intent. Use before discovery when the ask is vague or spans domains.
4
+ ---
5
+
6
+ # Requirement Analysis (需求分析)
7
+
8
+ Turn a fuzzy Chinese requirement into a platform-independent **Configuration
9
+ Intent** before any discovery, plan, or draft.
10
+
11
+ This is reasoning, not a governed tool: it reads no environment, prints no
12
+ credential, and writes nothing.
13
+
14
+ **Leading word: 定面** — name the face. The same Chinese word names several
15
+ OMC surfaces (规则, 表单, 字段, 集成, 在线, 数据). 定面 first; everything after
16
+ depends on it. This word is shared with `omc-capability-scouting`.
17
+
18
+ ## Process
19
+
20
+ Five moves, in order. Each ends on a completion criterion.
21
+
22
+ ### 1. 定面 — name the face
23
+
24
+ For every noun in the requirement, assign exactly one OMC face from the 定面表.
25
+
26
+ **Done when** every ambiguous noun carries exactly one face, and every noun
27
+ with no face is marked a boundary.
28
+
29
+ ### 2. 归类 — capability and lane
30
+
31
+ Map each face to its capability, lane, and status in the 能力表.
32
+
33
+ **Done when** every face has a capability, its lane, and one status
34
+ (`executable` / `partial` / `blocked` / `unsupported`).
35
+
36
+ ### 3. 选路 — implementation path
37
+
38
+ Choose one path per behavior, in preference order: **native** →
39
+ **configuration + Online JS** → **configuration + backend extension**.
40
+
41
+ **Done when** each behavior carries a path, and every non-native path names
42
+ the code owner and why native cannot carry it.
43
+
44
+ ### 4. 澄清 — risk-driven
45
+
46
+ Ask only about unresolved details that change behavior, data, environment
47
+ impact, or acceptance (see 澄清触发). A blocked or unsupported face is a
48
+ **boundary** — stated, not asked. All other detail takes the established
49
+ project convention.
50
+
51
+ **Done when** the open-question list is emitted, or empty.
52
+
53
+ ### 5. 出意图 — emit Configuration Intent
54
+
55
+ Emit the intent object (see Configuration Intent).
56
+
57
+ **Done when** every field is populated and `nextStep` is set.
58
+
59
+ ## 定面表 — disambiguate before classifying
60
+
61
+ | 需求里的词 | 面 A | 面 B | 判别 |
62
+ | --- | --- | --- | --- |
63
+ | 规则 | cross-model **businessrule** graph (B 平面) | 字段级控件规则 `dataRuleType` 3/4/5 | 跨模型/触发/动作 → businessrule;单字段随值必填/只读/显示 → 表单控件绑定 |
64
+ | 表单 | default form **(`bizsheet`)** | list view **(`query`)** | 录入/详情/布局/控件 → default form;列表/视图/筛选列 → list view |
65
+ | 字段 | model property **(`bizproperty`)** | form control binding | 结构/类型 → model field;可见/只读/必填 → form binding |
66
+ | 集成 | B2 业务集成服务 **(`bizservice`,`service.register`)** | 方法体来源:原生适配器(RESTFUL→外部 API)/ 二开扩展接口(也用 RESTFUL 指向扩展端点) | 对接接口/外部系统、或需自定义 Java 方法体 → **一律用 RESTFUL 业务集成服务**(二开接口 = 扩展模块写 REST 接口 + RESTFUL 服务指向它);自定义协议适配器 SPI 是「新增一种协议类型」,非常规、且不在工具支持面 |
67
+ | 在线 | form **Online JS** | 在线后端编码 | 表单脚本 → Online JS;内联后端代码 → boundary (unsupported) |
68
+ | 数据 | M2 runtime data | model/field 定义 | 记录读写 → M2 data;结构 → model/field |
69
+
70
+ ## 归类 — face → capability
71
+
72
+ Each face maps to a capability; **read the capability's coverage, tools,
73
+ recipes, and boundaries from `omc-capabilities`** — that catalogue is the prose
74
+ authority (this section is a pointer, not a second copy). Read only the section
75
+ you need: `omc help omc-capabilities --section "<能力>"`. At call time the
76
+ coverage manifest is authoritative and the tool gate rejects out-of-coverage
77
+ calls.
78
+
79
+ > `blocked` / `unsupported` are **native-config** verdicts. They route the
80
+ > behavior to another code owner (`config + backend extension`), they do NOT
81
+ > mean the requirement is undeliverable. Compiling a blocked face into "can't
82
+ > do it, leave it manual" is a failure mode — see 选路.
83
+
84
+ Full Chinese cue vocabulary lives in `omc-requirement-vocabulary.md` — reach
85
+ for it when a cue in step 1 is not obvious from 定面表.
86
+
87
+ ## 选路 — path rules
88
+
89
+ > 落点判据(配置 vs 二开、组合观)的唯一权威源是 `cpdocs-guide` 的「落点」;本节只列 OMC 侧的落点执行。
90
+
91
+ - **Native configuration** owns structure and lifecycle: models, fields,
92
+ forms, list views, rule graphs, workflow templates.
93
+ - **Online JS** owns form interaction and presentation: visibility, labels,
94
+ field linkage, preview. It *previews* a computed value; the saved value
95
+ comes from native config or a backend extension.
96
+ - **Backend extension** is the method-BODY source when native config cannot
97
+ express the logic. Expose it the normal way: **write an interface (a REST
98
+ endpoint) in the extension package, then register a `RESTFUL` service pointing
99
+ at it** (`service.register`, `adapterCode:RESTFUL`, `methodConfig.url` → the
100
+ extension endpoint). Do NOT use `INTERNAL` / `custom_protocol` adapters — those
101
+ are platform-internal protocol mechanisms, not the way a 二开 interface is
102
+ registered, and they are outside the write face. A RESTFUL service pointing at
103
+ an external API is the same face.
104
+ - **Business-rule action dual path**: a rule's action nodes use product-native
105
+ CRUD/query nodes (no code) **or** bind an already-released BizMethod. Surface
106
+ both paths; the clarification decides.
107
+ - **Cannot express declaratively ⇒ `config + backend extension`, do not stop** —
108
+ the code owner is a backend extension (interface in the extension package +
109
+ `RESTFUL` service + BIZ_ACTION/button binding). **Do not report "blocked" and
110
+ leave the value unbuilt, and do not substitute an external throwaway script.**
111
+
112
+ ## 澄清触发 — ask only when
113
+
114
+ - the business domain is unknown, or a noun in 定面表 stays ambiguous;
115
+ - money, cumulative values, or concurrency are involved;
116
+ - the requirement is environment-impacting (上线 / 发布 / 生产 / 释放冻结);
117
+ - two capabilities could satisfy it and the choice changes behavior.
118
+
119
+ Proceed with the convention when the detail is cosmetic (label wording,
120
+ layout polish) or already implied by an established project pattern.
121
+
122
+ ## Configuration Intent
123
+
124
+ ```jsonc
125
+ {
126
+ "domains": ["customer", "project"],
127
+ "capabilities": ["model", "field", "form", "businessrule", "workflow"],
128
+ "intent": {
129
+ "entities": [{ "name": "…", "fields": [{ "name": "…", "type": "…" }] }],
130
+ "behaviors": [{ "trigger": "create|update|delete|button|system|timed|…", "action": "…" }],
131
+ "integrations": [{ "kind": "native-crud|bizmethod|b2-service", "target": "…" }]
132
+ },
133
+ "implementationPath": "native | config+onlinejs | config+backend-extension",
134
+ "risks": ["…"],
135
+ "clarifications": ["…"],
136
+ "acceptanceScenarios": ["…"],
137
+ "nextStep": "discover_and_plan | clarify | boundary"
138
+ }
139
+ ```
140
+
141
+ `clarify` whenever 澄清触发 fires; `boundary` when a face is out of coverage;
142
+ otherwise `discover_and_plan`.
143
+
144
+ ## 反模式
145
+
146
+ - Classifying a noun before 定面 — e.g. mapping 规则 to `dataRuleType` when a
147
+ cross-model graph was meant.
148
+ - Treating 对接外部系统 as a cue to develop a custom protocol adapter SPI — that
149
+ is a rare NEW PROTOTYPE, not integration. The normal path is a
150
+ business-integration service (`service.register`).
151
+ - Routing a saved value through Online JS.
152
+ - Inventing a capability for a blocked face. Cite the boundary instead.
153
+ - Emitting a plan or DTO payload here — intent stays platform-independent
154
+ until discovery.
155
+
156
+ ## 接续
157
+
158
+ Intent feeds, in order: `discover_environment` (fingerprint + existing
159
+ resources) → configuration baseline → `omc-five-piece-flow`. For a face not
160
+ yet proven, use `omc-capability-scouting`. For the concrete tool to call, use
161
+ `omc-tool-selection`.