scene-capability-engine 3.6.22 → 3.6.23
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 +7 -0
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/docs/magicball-capability-iteration-ui.md +7 -0
- package/lib/commands/capability.js +46 -2
- 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.23] - 2026-03-06
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Capability inventory now applies a default homepage sort: blocked scenes first, then triad-gap priority, then value score.
|
|
14
|
+
- Magicball capability iteration docs now define the default scene inventory ordering contract.
|
|
15
|
+
|
|
10
16
|
## [3.6.22] - 2026-03-06
|
|
11
17
|
|
|
12
18
|
### Added
|
|
@@ -17,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
17
23
|
|
|
18
24
|
### Added
|
|
19
25
|
- New `sce capability inventory` command provides scene-level triad/readiness aggregation for homepage views.
|
|
26
|
+
- Capability inventory now applies default sorting: publish-ready last, then triad-gap priority, then value score.
|
|
20
27
|
- Capability catalog list/search now supports `--release-ready` and `--missing-triad` filters for pre-publish triage.
|
|
21
28
|
- Magicball capability library docs now show list-level triage filter examples.
|
|
22
29
|
|
package/README.md
CHANGED
package/README.zh.md
CHANGED
|
@@ -192,3 +192,10 @@ sce capability register --input <template.json> --json
|
|
|
192
192
|
- 发布页直接消费 `release_readiness.ready`
|
|
193
193
|
- 若为 `false`,展示 `blockers[].reason`、`blockers[].missing`、`blockers[].remediation`
|
|
194
194
|
- 默认阻断文案:`能力模板未达到发布条件`
|
|
195
|
+
|
|
196
|
+
## 10. 默认排序
|
|
197
|
+
|
|
198
|
+
- 先显示 `release_readiness_ui.publish_ready = false` 的 scene
|
|
199
|
+
- 再按 triad 缺口优先级排序:`decision_strategy` -> `business_rules` -> `entity_relation`
|
|
200
|
+
- 再按 `score_preview.value_score` 降序
|
|
201
|
+
- 最后按 `scene_id` 升序
|
|
@@ -820,6 +820,45 @@ async function listCapabilityInventorySceneIds(options = {}, dependencies = {})
|
|
|
820
820
|
return [];
|
|
821
821
|
}
|
|
822
822
|
|
|
823
|
+
function resolveCapabilityTriadPriority(entry) {
|
|
824
|
+
const missing = Array.isArray(entry && entry.release_readiness_ui && entry.release_readiness_ui.blocking_missing)
|
|
825
|
+
? entry.release_readiness_ui.blocking_missing
|
|
826
|
+
: [];
|
|
827
|
+
if (missing.includes('decision_strategy')) {
|
|
828
|
+
return 0;
|
|
829
|
+
}
|
|
830
|
+
if (missing.includes('business_rules')) {
|
|
831
|
+
return 1;
|
|
832
|
+
}
|
|
833
|
+
if (missing.includes('entity_relation')) {
|
|
834
|
+
return 2;
|
|
835
|
+
}
|
|
836
|
+
return 3;
|
|
837
|
+
}
|
|
838
|
+
|
|
839
|
+
function sortCapabilityInventoryEntries(entries) {
|
|
840
|
+
return [...(Array.isArray(entries) ? entries : [])].sort((left, right) => {
|
|
841
|
+
const leftReady = Boolean(left && left.release_readiness_ui && left.release_readiness_ui.publish_ready);
|
|
842
|
+
const rightReady = Boolean(right && right.release_readiness_ui && right.release_readiness_ui.publish_ready);
|
|
843
|
+
if (leftReady !== rightReady) {
|
|
844
|
+
return leftReady ? 1 : -1;
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
const triadDelta = resolveCapabilityTriadPriority(left) - resolveCapabilityTriadPriority(right);
|
|
848
|
+
if (triadDelta !== 0) {
|
|
849
|
+
return triadDelta;
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
const leftValue = Number(left && left.score_preview && left.score_preview.value_score || 0);
|
|
853
|
+
const rightValue = Number(right && right.score_preview && right.score_preview.value_score || 0);
|
|
854
|
+
if (leftValue !== rightValue) {
|
|
855
|
+
return rightValue - leftValue;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
return String(left && left.scene_id || '').localeCompare(String(right && right.scene_id || ''));
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
|
|
823
862
|
function filterCapabilityInventoryEntries(entries, options = {}) {
|
|
824
863
|
const normalizedMissingTriad = normalizeText(options.missingTriad || options.missing_triad).toLowerCase();
|
|
825
864
|
const releaseReadyFilter = normalizeText(options.releaseReady || options.release_ready).toLowerCase();
|
|
@@ -874,11 +913,15 @@ async function runCapabilityInventoryCommand(options = {}, dependencies = {}) {
|
|
|
874
913
|
});
|
|
875
914
|
}
|
|
876
915
|
|
|
877
|
-
const filteredScenes = filterCapabilityInventoryEntries(scenes, options);
|
|
916
|
+
const filteredScenes = sortCapabilityInventoryEntries(filterCapabilityInventoryEntries(scenes, options));
|
|
878
917
|
const payload = {
|
|
879
918
|
mode: 'capability-inventory',
|
|
880
919
|
generated_at: new Date().toISOString(),
|
|
881
920
|
scene_count: filteredScenes.length,
|
|
921
|
+
sort: {
|
|
922
|
+
strategy: 'publish_ready -> missing_triad_priority -> value_score_desc -> scene_id',
|
|
923
|
+
triad_priority: ['decision_strategy', 'business_rules', 'entity_relation']
|
|
924
|
+
},
|
|
882
925
|
scenes: filteredScenes
|
|
883
926
|
};
|
|
884
927
|
|
|
@@ -1661,5 +1704,6 @@ module.exports = {
|
|
|
1661
1704
|
enrichCapabilityTemplateForUi,
|
|
1662
1705
|
buildCapabilityReleaseReadinessUi,
|
|
1663
1706
|
filterCapabilityCatalogEntries,
|
|
1664
|
-
filterCapabilityInventoryEntries
|
|
1707
|
+
filterCapabilityInventoryEntries,
|
|
1708
|
+
sortCapabilityInventoryEntries
|
|
1665
1709
|
};
|
package/package.json
CHANGED