scene-capability-engine 3.6.18 → 3.6.19
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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/docs/command-reference.md +1 -0
- package/docs/magicball-capability-iteration-api.md +2 -2
- package/docs/magicball-capability-iteration-ui.md +6 -0
- package/docs/magicball-capability-library.md +21 -0
- package/lib/commands/capability.js +37 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.6.19] - 2026-03-06
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Capability map/register payloads now expose `release_readiness` with structured blocking reasons for publish UI.
|
|
14
|
+
- Magicball capability docs now define release blocker rendering for capability publish pages.
|
|
15
|
+
|
|
10
16
|
## [3.6.18] - 2026-03-06
|
|
11
17
|
|
|
12
18
|
### Added
|
package/README.md
CHANGED
package/README.zh.md
CHANGED
|
@@ -1897,6 +1897,7 @@ Schema references:
|
|
|
1897
1897
|
### Capability Library Reuse (query -> match -> use)
|
|
1898
1898
|
|
|
1899
1899
|
`catalog/list/search/show/match/use` responses now include `ontology_core` and `ontology_core_ui` so UI can render triad readiness directly.
|
|
1900
|
+
`capability map/register` responses now include `release_readiness` so UI can render blocking reasons before publish.
|
|
1900
1901
|
|
|
1901
1902
|
```bash
|
|
1902
1903
|
# List capability templates
|
|
@@ -87,7 +87,7 @@ sce capability map --input <candidate_file> --mapping <ontology_file> \
|
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
响应:
|
|
90
|
-
- 返回 `capability-map` payload,重点消费 `template.ontology_core`
|
|
90
|
+
- 返回 `capability-map` payload,重点消费 `template.ontology_core` 与 `release_readiness`
|
|
91
91
|
|
|
92
92
|
---
|
|
93
93
|
|
|
@@ -112,7 +112,7 @@ sce capability register --input <template_file> --risk-level <level> --difficult
|
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
响应:
|
|
115
|
-
- 返回 `capability-register` payload,重点消费 `ontology_core`(入库 triad 审核结果)
|
|
115
|
+
- 返回 `capability-register` payload,重点消费 `ontology_core` 与 `release_readiness`(入库 triad 审核结果)
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
@@ -180,3 +180,9 @@ sce capability register --input <template.json> --json
|
|
|
180
180
|
- `ontology_core_ui.missing`
|
|
181
181
|
- `summary.ontology_triads_ready`
|
|
182
182
|
- `summary.ontology_missing_triads`
|
|
183
|
+
|
|
184
|
+
## 9. 发布阻断提示
|
|
185
|
+
|
|
186
|
+
- 发布页直接消费 `release_readiness.ready`
|
|
187
|
+
- 若为 `false`,展示 `blockers[].reason`、`blockers[].missing`、`blockers[].remediation`
|
|
188
|
+
- 默认阻断文案:`能力模板未达到发布条件`
|
|
@@ -145,3 +145,24 @@ sce capability use --template <template-id> --spec <spec-id> --apply --json
|
|
|
145
145
|
---
|
|
146
146
|
|
|
147
147
|
若需要“自动落地写入 spec 任务”的强制执行模式,可以在后续版本加 `--apply` 开关。
|
|
148
|
+
|
|
149
|
+
### release_readiness(发布阻断原因)
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"ready": false,
|
|
153
|
+
"blockers": [
|
|
154
|
+
{
|
|
155
|
+
"id": "ontology-core-triads",
|
|
156
|
+
"severity": "blocking",
|
|
157
|
+
"reason": "missing required ontology triads",
|
|
158
|
+
"missing": ["decision_strategy"],
|
|
159
|
+
"missing_labels": ["decision_strategy"],
|
|
160
|
+
"remediation": [
|
|
161
|
+
"补齐实体关系(entities + relations)",
|
|
162
|
+
"补齐业务规则(business_rules)",
|
|
163
|
+
"补齐决策策略(decisions)"
|
|
164
|
+
]
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
```
|
|
@@ -439,6 +439,31 @@ function enrichCapabilityTemplateForUi(template) {
|
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
441
|
|
|
442
|
+
function buildCapabilityReleaseReadiness(templateCandidate) {
|
|
443
|
+
const enriched = enrichCapabilityTemplateForUi(templateCandidate || {});
|
|
444
|
+
const blockers = [];
|
|
445
|
+
if (!enriched.ontology_core.ready) {
|
|
446
|
+
blockers.push({
|
|
447
|
+
id: 'ontology-core-triads',
|
|
448
|
+
severity: 'blocking',
|
|
449
|
+
reason: 'missing required ontology triads',
|
|
450
|
+
missing: enriched.ontology_core.missing,
|
|
451
|
+
missing_labels: enriched.ontology_core_ui.missing_labels,
|
|
452
|
+
remediation: [
|
|
453
|
+
'补齐实体关系(entities + relations)',
|
|
454
|
+
'补齐业务规则(business_rules)',
|
|
455
|
+
'补齐决策策略(decisions)'
|
|
456
|
+
]
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
return {
|
|
460
|
+
ready: blockers.length === 0,
|
|
461
|
+
blockers,
|
|
462
|
+
ontology_core: enriched.ontology_core,
|
|
463
|
+
ontology_core_ui: enriched.ontology_core_ui
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
|
|
442
467
|
async function loadSceneIndexFromFile(projectPath, fileSystem) {
|
|
443
468
|
const indexPath = path.join(projectPath, '.sce', 'spec-governance', 'scene-index.json');
|
|
444
469
|
if (!await fileSystem.pathExists(indexPath)) {
|
|
@@ -861,7 +886,8 @@ async function runCapabilityMapCommand(options = {}, dependencies = {}) {
|
|
|
861
886
|
generated_at: new Date().toISOString(),
|
|
862
887
|
input: inputPath,
|
|
863
888
|
mapping: mappingPath || null,
|
|
864
|
-
template: templateCandidate
|
|
889
|
+
template: templateCandidate,
|
|
890
|
+
release_readiness: buildCapabilityReleaseReadiness(templateCandidate)
|
|
865
891
|
};
|
|
866
892
|
|
|
867
893
|
const outputPath = normalizeText(options.out) || buildDefaultTemplatePath(sceneId);
|
|
@@ -895,6 +921,15 @@ async function runCapabilityRegisterCommand(options = {}, dependencies = {}) {
|
|
|
895
921
|
if (!templateCandidate || !templateCandidate.template_id) {
|
|
896
922
|
throw new Error('template_id missing in capability template candidate');
|
|
897
923
|
}
|
|
924
|
+
const releaseReadiness = buildCapabilityReleaseReadiness(templateCandidate);
|
|
925
|
+
if (!releaseReadiness.ready) {
|
|
926
|
+
const error = new Error(`capability register blocked: ${releaseReadiness.blockers.map((item) => item.reason).join('; ')}`);
|
|
927
|
+
error.code = 'CAPABILITY_REGISTER_BLOCKED';
|
|
928
|
+
error.details = {
|
|
929
|
+
release_readiness: releaseReadiness
|
|
930
|
+
};
|
|
931
|
+
throw error;
|
|
932
|
+
}
|
|
898
933
|
const ontologySummary = assertCoreOntologySummary(
|
|
899
934
|
buildCoreOntologySummary(templateCandidate.ontology_scope),
|
|
900
935
|
'capability template'
|
|
@@ -919,6 +954,7 @@ async function runCapabilityRegisterCommand(options = {}, dependencies = {}) {
|
|
|
919
954
|
template_id: templateCandidate.template_id,
|
|
920
955
|
output_dir: exportDir,
|
|
921
956
|
ontology_core: ontologySummary,
|
|
957
|
+
release_readiness: releaseReadiness,
|
|
922
958
|
files: [
|
|
923
959
|
path.join(exportDir, 'capability-template.json'),
|
|
924
960
|
path.join(exportDir, 'template-registry.json')
|
package/package.json
CHANGED