@stalfh233/omc-cli 0.5.6 → 0.5.8
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.
- package/LICENSE +21 -21
- package/README.md +359 -359
- package/coverage/m1-coverage-manifest-v1.json +1414 -1414
- package/dist/approval-flow.js +0 -0
- package/dist/args.js +0 -0
- package/dist/artifacts.js +0 -0
- package/dist/batch-call.js +0 -0
- package/dist/bench/call-face-eval.js +0 -0
- package/dist/bench/context-attribution.js +0 -0
- package/dist/bench/discovery-cost-eval.js +0 -0
- package/dist/bench/driver.js +0 -0
- package/dist/bench/evals.js +0 -0
- package/dist/bench/instrument.js +0 -0
- package/dist/bench/intent-face-eval.js +40 -40
- package/dist/bench/run.js +0 -0
- package/dist/bench/scenario.js +0 -0
- package/dist/bench/types.js +0 -0
- package/dist/bi-wire.js +0 -0
- package/dist/bizservice-config.js +0 -0
- package/dist/call.js +0 -0
- package/dist/capability-absences.js +0 -0
- package/dist/capability-overview.js +0 -0
- package/dist/capability-shape.js +0 -0
- package/dist/cli-contract.js +0 -0
- package/dist/cli-output.js +0 -0
- package/dist/cli.js +31 -1
- package/dist/closest-match.js +0 -0
- package/dist/code-rules.js +0 -0
- package/dist/command-transport.js +0 -0
- package/dist/compound-writes.js +0 -0
- package/dist/compute.js +0 -0
- package/dist/config-store.js +0 -0
- package/dist/context.js +0 -0
- package/dist/contract-consistency.js +0 -0
- package/dist/contract-resources.js +0 -0
- package/dist/coverage-consistency.js +0 -0
- package/dist/coverage-registry.js +0 -0
- package/dist/coverage.js +0 -0
- package/dist/data-list-filter.js +0 -0
- package/dist/describe-cache.js +0 -0
- package/dist/discovery.js +0 -0
- package/dist/endpoints.js +0 -0
- package/dist/environment-policy.js +0 -0
- package/dist/execution-metadata.js +0 -0
- package/dist/field-add.js +314 -0
- package/dist/field-change.js +0 -0
- package/dist/field-families.js +0 -0
- package/dist/form-default.js +0 -0
- package/dist/form-layout.js +0 -0
- package/dist/form-support.js +9 -0
- package/dist/formula-lint.js +0 -0
- package/dist/goal-routes.js +28 -16
- package/dist/governed-execution.js +0 -0
- package/dist/graph.js +50 -33
- package/dist/human-summary.js +1 -1
- package/dist/identity.js +0 -0
- package/dist/intent/baseline.js +0 -0
- package/dist/intent/capabilities/bizservice.js +0 -0
- package/dist/intent/capabilities/businessrule.js +0 -0
- package/dist/intent/capabilities/datarule.js +0 -0
- package/dist/intent/capabilities/field.js +0 -0
- package/dist/intent/capabilities/form.js +0 -0
- package/dist/intent/capabilities/index.js +0 -0
- package/dist/intent/capabilities/listview.js +0 -0
- package/dist/intent/capabilities/model.js +0 -0
- package/dist/intent/capabilities/onlinejs.js +0 -0
- package/dist/intent/capabilities/report.js +0 -0
- package/dist/intent/capabilities/workflow.js +0 -0
- package/dist/intent/capability.js +0 -0
- package/dist/intent/cli.js +0 -0
- package/dist/intent/compare.js +0 -0
- package/dist/intent/compiler.js +0 -0
- package/dist/intent/dsl.js +0 -0
- package/dist/intent/plan-apply.js +0 -0
- package/dist/intent/plan-file.js +0 -0
- package/dist/intent/readback.js +0 -0
- package/dist/intent/schema.js +0 -0
- package/dist/intent/validation.js +0 -0
- package/dist/intent/yaml.js +0 -0
- package/dist/journal.js +0 -0
- package/dist/json-column.js +0 -0
- package/dist/lanes/app-contract.js +0 -0
- package/dist/lanes/app-coverage.js +0 -0
- package/dist/lanes/app.js +0 -0
- package/dist/lanes/apply-changes.js +0 -0
- package/dist/lanes/b2-registration-contract.js +0 -0
- package/dist/lanes/b2-registration-coverage.js +0 -0
- package/dist/lanes/b2-registration.js +0 -0
- package/dist/lanes/businessrule-contract.js +0 -0
- package/dist/lanes/businessrule-coverage.js +0 -0
- package/dist/lanes/businessrule.js +11 -3
- package/dist/lanes/contract-support.js +0 -0
- package/dist/lanes/coverage-declaration.js +0 -0
- package/dist/lanes/custom-page.js +0 -0
- package/dist/lanes/datarule-contract.js +0 -0
- package/dist/lanes/datarule-coverage.js +0 -0
- package/dist/lanes/datarule-protocol.js +0 -0
- package/dist/lanes/datarule.js +6 -0
- package/dist/lanes/dictionary-contract.js +0 -0
- package/dist/lanes/dictionary-coverage.js +0 -0
- package/dist/lanes/dictionary.js +0 -0
- package/dist/lanes/environment-contract.js +0 -0
- package/dist/lanes/environment-coverage.js +0 -0
- package/dist/lanes/environment.js +0 -0
- package/dist/lanes/field-contract.js +0 -0
- package/dist/lanes/field-coverage.js +0 -0
- package/dist/lanes/field.js +0 -0
- package/dist/lanes/folder-contract.js +0 -0
- package/dist/lanes/folder-coverage.js +0 -0
- package/dist/lanes/folder.js +0 -0
- package/dist/lanes/form-contract.js +0 -0
- package/dist/lanes/form-coverage.js +0 -0
- package/dist/lanes/form.js +0 -0
- package/dist/lanes/lane-ids.js +0 -0
- package/dist/lanes/list-view-contract.js +0 -0
- package/dist/lanes/list-view-coverage.js +0 -0
- package/dist/lanes/list-view-shapes.js +0 -0
- package/dist/lanes/list-view.js +6 -0
- package/dist/lanes/meta-contract.js +0 -0
- package/dist/lanes/meta.js +0 -0
- package/dist/lanes/model-contract.js +0 -0
- package/dist/lanes/model-coverage.js +0 -0
- package/dist/lanes/model.js +0 -0
- package/dist/lanes/online-js-contract.js +0 -0
- package/dist/lanes/online-js-coverage.js +0 -0
- package/dist/lanes/online-js.js +0 -0
- package/dist/lanes/org-tree.js +0 -0
- package/dist/lanes/organization-coverage.js +27 -0
- package/dist/lanes/organization.js +10 -1
- package/dist/lanes/report-contract.js +0 -0
- package/dist/lanes/report-coverage.js +0 -0
- package/dist/lanes/report.js +0 -0
- package/dist/lanes/rule-graph.js +0 -0
- package/dist/lanes/rule-lifecycle-contract.js +0 -0
- package/dist/lanes/rule-lifecycle-coverage.js +0 -0
- package/dist/lanes/rule-lifecycle.js +0 -0
- package/dist/lanes/runtime-data-contract.js +0 -0
- package/dist/lanes/runtime-data-coverage.js +0 -0
- package/dist/lanes/runtime-data.js +24 -0
- package/dist/lanes/workflow-contract.js +0 -0
- package/dist/lanes/workflow-coverage.js +0 -0
- package/dist/lanes/workflow.js +7 -2
- package/dist/mcp-graph.js +0 -0
- package/dist/model-purge.js +0 -0
- package/dist/model-record.js +0 -0
- package/dist/model-scaffold.js +0 -0
- package/dist/omc-core-lazy.js +0 -0
- package/dist/online-js-layout.js +0 -0
- package/dist/online-js-source.js +28 -28
- package/dist/package-tool.js +0 -0
- package/dist/package.js +0 -0
- package/dist/path-projection.js +19 -1
- package/dist/plan.js +0 -0
- package/dist/read.js +0 -0
- package/dist/recipes/b2-registration.js +0 -0
- package/dist/recipes/businessrule.js +0 -0
- package/dist/recipes/datarule.js +0 -0
- package/dist/recipes/dictionary.js +0 -0
- package/dist/recipes/field.js +0 -0
- package/dist/recipes/form.js +0 -0
- package/dist/recipes/list-view.js +0 -0
- package/dist/recipes/model.js +0 -0
- package/dist/recipes/online-js.js +0 -0
- package/dist/recipes/runtime-data.js +0 -0
- package/dist/recipes/shared.js +0 -0
- package/dist/recipes/workflow.js +0 -0
- package/dist/redact.js +0 -0
- package/dist/refusal-guidance.js +0 -0
- package/dist/rollback-spec.js +0 -0
- package/dist/rollback.js +0 -0
- package/dist/rule-support.js +0 -0
- package/dist/rule-when.js +4 -3
- package/dist/runtime-support.js +0 -0
- package/dist/script.js +0 -0
- package/dist/service-doctor.js +0 -0
- package/dist/session-manager.js +0 -0
- package/dist/session.js +0 -0
- package/dist/skills.js +0 -0
- package/dist/sqlite-warning-filter.js +0 -0
- package/dist/support.js +0 -0
- package/dist/token-cache.js +0 -0
- package/dist/tool-types.js +0 -0
- package/dist/tools.js +0 -0
- package/dist/usage-log.js +0 -0
- package/dist/wire.js +0 -0
- package/dist/workflow-support.js +0 -0
- package/dist/write-lease.js +0 -0
- package/dist/write-lock.js +0 -0
- package/dist/write.js +0 -0
- package/dist/zip.js +0 -0
- package/docs/images/omc-nixi/README.md +41 -41
- package/docs/omc-introduction.md +851 -851
- package/docs/tool-surface-map.md +42 -42
- package/package.json +3 -3
- package/skills/omc-acceptance-criteria.md +50 -50
- package/skills/omc-business-configuration.md +336 -335
- package/skills/omc-capabilities.md +214 -214
- package/skills/omc-capability-scouting.md +55 -55
- package/skills/omc-config-draft-review.md +175 -175
- package/skills/omc-five-piece-flow.md +35 -35
- package/skills/omc-glossary.md +86 -86
- package/skills/omc-refusals.md +129 -129
- package/skills/omc-requirement-analysis.md +161 -161
- package/skills/omc-requirement-vocabulary.md +61 -61
- package/skills/omc-start-here.md +107 -106
- package/skills/omc-tool-selection.md +119 -119
- package/skills/omc-write-hazards.md +222 -200
- package/dist/approval-token.js +0 -102
- package/dist/bench/fake-http-server.js +0 -65
- package/dist/fake/app.js +0 -45
- package/dist/fake/b2-registration.js +0 -594
- package/dist/fake/businessrule.js +0 -242
- package/dist/fake/datarule.js +0 -72
- package/dist/fake/dictionary.js +0 -108
- package/dist/fake/environment.js +0 -30
- package/dist/fake/field.js +0 -167
- package/dist/fake/form.js +0 -101
- package/dist/fake/index.js +0 -121
- package/dist/fake/list-view.js +0 -289
- package/dist/fake/model.js +0 -136
- package/dist/fake/online-js.js +0 -18
- package/dist/fake/report.js +0 -253
- package/dist/fake/routes.js +0 -47
- package/dist/fake/rule-lifecycle.js +0 -37
- package/dist/fake/runtime-data.js +0 -367
- package/dist/fake/state.js +0 -67
- package/dist/fake/workflow.js +0 -364
- package/dist/server.js +0 -92
package/skills/omc-refusals.md
CHANGED
|
@@ -1,129 +1,129 @@
|
|
|
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
|
-
child-table column that is itself a 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
|
-
`40000 调用数据库发生异常` is the **most opaque** shape code — no detail at all.
|
|
66
|
-
Line up the model's field-level config first: an `AGGREGATION` FORMULA field whose
|
|
67
|
-
`aggregation.schemaCode` points at a **child-table schema** publishes fine and then
|
|
68
|
-
makes every `data.submit`/`data.update` on that model 40000 (r18 2026-10-26 live;
|
|
69
|
-
bisect by deleting/disabling the suspect formula field, which is reversible).
|
|
70
|
-
`omc` now answers `runtime-write-db-exception` and lists the model's formula
|
|
71
|
-
fields; the fix is to aggregate a MAIN-table scalar column instead.
|
|
72
|
-
|
|
73
|
-
## 4. Readback mismatch — the write landed but does not match
|
|
74
|
-
|
|
75
|
-
`*-readback-failed`, `*-readback-mismatch`, `cleanup-absence-readback`,
|
|
76
|
-
`intent-readback-mismatch`, `workflow-render-readback-invalid`.
|
|
77
|
-
|
|
78
|
-
**Stop and report.** Never auto-retry, never assume success. Inspect
|
|
79
|
-
`result.readback` / `result.verification.differences`, compare against the
|
|
80
|
-
approved draft, and decide with the human. A second write may duplicate.
|
|
81
|
-
|
|
82
|
-
## 5. Dependency & async convergence
|
|
83
|
-
|
|
84
|
-
- `model-referenced-by` — inbound relation references block the delete. Clean up
|
|
85
|
-
**dependency-inverted**: delete referencing models first, then the referenced
|
|
86
|
-
one.
|
|
87
|
-
- `absent:false` + `treeNodePending:true` with `nextAction:"wait-and-recheck"` —
|
|
88
|
-
the platform's per-column cascade is still running (40–60s). **Not a failure.**
|
|
89
|
-
Wait ~60s and re-run; the call is idempotent and `already-absent` short-circuits.
|
|
90
|
-
|
|
91
|
-
## 6. Idempotency & replay
|
|
92
|
-
|
|
93
|
-
- A repeated `requestId` with identical args returns `replay:"already-completed"`
|
|
94
|
-
— the first write stands; treat as success, do not re-execute.
|
|
95
|
-
- `intent-plan-tampered` — the plan file changed after planning. Re-run
|
|
96
|
-
`intent plan`.
|
|
97
|
-
- `intent-baseline-drifted` — the environment moved after planning. Re-run
|
|
98
|
-
`intent plan` against the fresh baseline.
|
|
99
|
-
- `intent-plan-environment-mismatch` — the plan targets a different environment.
|
|
100
|
-
|
|
101
|
-
## 7. Transport uncertainty — outcome unknown
|
|
102
|
-
|
|
103
|
-
`status:"uncertain"` with `frozen:true` (`cli-timeout`, `batch-timeout-budget`,
|
|
104
|
-
`wire-transport:*`). The write **may** be in flight.
|
|
105
|
-
|
|
106
|
-
1. Read back the affected resource (or `artifact get <id>` / the `requestId`).
|
|
107
|
-
2. Only after the outcome is established, decide whether to retry.
|
|
108
|
-
3. Never blind-retry — that risks a second write.
|
|
109
|
-
|
|
110
|
-
`write-lock-held` — another write holds the environment lock; `owner` and
|
|
111
|
-
`recovery` are included. Retry with `--wait <ms>` (`omc call <tool> --wait 5000`,
|
|
112
|
-
`omc intent apply ... --wait 5000`): the CLI does the bounded queueing in-process,
|
|
113
|
-
so it costs no extra round trip. It also auto-recovers when the holding process
|
|
114
|
-
exits. This guards concurrency, not approval.
|
|
115
|
-
|
|
116
|
-
## 8. Runtime / gateway errors (not tool refusals, same discipline)
|
|
117
|
-
|
|
118
|
-
- `401 权限不够`(业务集成)→ 先查**前缀×鉴权**:`/openapi/**` 用 `xclient`,`/api/api/**` 用用户 token;混用必 401。对照同 adapter 既有成功服务(`service.get` 的方法 url)。
|
|
119
|
-
- `500` 且仅 `X-LowCode-EngineCode should not be empty` → 补多租户头,不是业务错误。
|
|
120
|
-
- `404 openresty` / `API 在服务端找不到` → url 层数不对(双层/三层 `/api`),按矩阵改一次,别反复试。
|
|
121
|
-
- `position` 读回整数、写入枚举名 → 读侧编码,不是没写进去。
|
|
122
|
-
- 版本证据缺失:先分 `pcServerUrl` 缺失(读取耦合,0.4.54 已修)与 `systemVersion` 真缺失(fail-closed 正确);不要伪造 8.6。
|
|
123
|
-
- `401/403` 且 body 是 HTML/空 → 网关层,不是业务拒绝;停手索要一条可运行样例,别继续改载荷。
|
|
124
|
-
|
|
125
|
-
## 9. Input / target
|
|
126
|
-
|
|
127
|
-
- `tool-input-invalid` — schema violation (exit 10); fix the arguments.
|
|
128
|
-
- `dictionary-target-required`, `intent-plan-invalid` — a required selector or
|
|
129
|
-
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
|
+
child-table column that is itself a 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
|
+
`40000 调用数据库发生异常` is the **most opaque** shape code — no detail at all.
|
|
66
|
+
Line up the model's field-level config first: an `AGGREGATION` FORMULA field whose
|
|
67
|
+
`aggregation.schemaCode` points at a **child-table schema** publishes fine and then
|
|
68
|
+
makes every `data.submit`/`data.update` on that model 40000 (r18 2026-10-26 live;
|
|
69
|
+
bisect by deleting/disabling the suspect formula field, which is reversible).
|
|
70
|
+
`omc` now answers `runtime-write-db-exception` and lists the model's formula
|
|
71
|
+
fields; the fix is to aggregate a MAIN-table scalar column instead.
|
|
72
|
+
|
|
73
|
+
## 4. Readback mismatch — the write landed but does not match
|
|
74
|
+
|
|
75
|
+
`*-readback-failed`, `*-readback-mismatch`, `cleanup-absence-readback`,
|
|
76
|
+
`intent-readback-mismatch`, `workflow-render-readback-invalid`.
|
|
77
|
+
|
|
78
|
+
**Stop and report.** Never auto-retry, never assume success. Inspect
|
|
79
|
+
`result.readback` / `result.verification.differences`, compare against the
|
|
80
|
+
approved draft, and decide with the human. A second write may duplicate.
|
|
81
|
+
|
|
82
|
+
## 5. Dependency & async convergence
|
|
83
|
+
|
|
84
|
+
- `model-referenced-by` — inbound relation references block the delete. Clean up
|
|
85
|
+
**dependency-inverted**: delete referencing models first, then the referenced
|
|
86
|
+
one.
|
|
87
|
+
- `absent:false` + `treeNodePending:true` with `nextAction:"wait-and-recheck"` —
|
|
88
|
+
the platform's per-column cascade is still running (40–60s). **Not a failure.**
|
|
89
|
+
Wait ~60s and re-run; the call is idempotent and `already-absent` short-circuits.
|
|
90
|
+
|
|
91
|
+
## 6. Idempotency & replay
|
|
92
|
+
|
|
93
|
+
- A repeated `requestId` with identical args returns `replay:"already-completed"`
|
|
94
|
+
— the first write stands; treat as success, do not re-execute.
|
|
95
|
+
- `intent-plan-tampered` — the plan file changed after planning. Re-run
|
|
96
|
+
`intent plan`.
|
|
97
|
+
- `intent-baseline-drifted` — the environment moved after planning. Re-run
|
|
98
|
+
`intent plan` against the fresh baseline.
|
|
99
|
+
- `intent-plan-environment-mismatch` — the plan targets a different environment.
|
|
100
|
+
|
|
101
|
+
## 7. Transport uncertainty — outcome unknown
|
|
102
|
+
|
|
103
|
+
`status:"uncertain"` with `frozen:true` (`cli-timeout`, `batch-timeout-budget`,
|
|
104
|
+
`wire-transport:*`). The write **may** be in flight.
|
|
105
|
+
|
|
106
|
+
1. Read back the affected resource (or `artifact get <id>` / the `requestId`).
|
|
107
|
+
2. Only after the outcome is established, decide whether to retry.
|
|
108
|
+
3. Never blind-retry — that risks a second write.
|
|
109
|
+
|
|
110
|
+
`write-lock-held` — another write holds the environment lock; `owner` and
|
|
111
|
+
`recovery` are included. Retry with `--wait <ms>` (`omc call <tool> --wait 5000`,
|
|
112
|
+
`omc intent apply ... --wait 5000`): the CLI does the bounded queueing in-process,
|
|
113
|
+
so it costs no extra round trip. It also auto-recovers when the holding process
|
|
114
|
+
exits. This guards concurrency, not approval.
|
|
115
|
+
|
|
116
|
+
## 8. Runtime / gateway errors (not tool refusals, same discipline)
|
|
117
|
+
|
|
118
|
+
- `401 权限不够`(业务集成)→ 先查**前缀×鉴权**:`/openapi/**` 用 `xclient`,`/api/api/**` 用用户 token;混用必 401。对照同 adapter 既有成功服务(`service.get` 的方法 url)。
|
|
119
|
+
- `500` 且仅 `X-LowCode-EngineCode should not be empty` → 补多租户头,不是业务错误。
|
|
120
|
+
- `404 openresty` / `API 在服务端找不到` → url 层数不对(双层/三层 `/api`),按矩阵改一次,别反复试。
|
|
121
|
+
- `position` 读回整数、写入枚举名 → 读侧编码,不是没写进去。
|
|
122
|
+
- 版本证据缺失:先分 `pcServerUrl` 缺失(读取耦合,0.4.54 已修)与 `systemVersion` 真缺失(fail-closed 正确);不要伪造 8.6。
|
|
123
|
+
- `401/403` 且 body 是 HTML/空 → 网关层,不是业务拒绝;停手索要一条可运行样例,别继续改载荷。
|
|
124
|
+
|
|
125
|
+
## 9. Input / target
|
|
126
|
+
|
|
127
|
+
- `tool-input-invalid` — schema violation (exit 10); fix the arguments.
|
|
128
|
+
- `dictionary-target-required`, `intent-plan-invalid` — a required selector or
|
|
129
|
+
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`.
|