scene-capability-engine 3.0.7 → 3.1.0

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 (51) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/docs/331-poc-adaptation-roadmap.md +21 -2
  3. package/docs/331-poc-dual-track-integration-guide.md +10 -6
  4. package/docs/331-poc-weekly-delivery-checklist.md +15 -0
  5. package/docs/README.md +6 -0
  6. package/docs/command-reference.md +279 -5
  7. package/docs/handoff-profile-integration-guide.md +88 -0
  8. package/docs/interactive-customization/331-poc-sce-integration-checklist.md +148 -0
  9. package/docs/interactive-customization/README.md +354 -0
  10. package/docs/interactive-customization/adapter-extension-contract.md +55 -0
  11. package/docs/interactive-customization/adapter-extension-contract.sample.json +59 -0
  12. package/docs/interactive-customization/adapter-extension-contract.schema.json +192 -0
  13. package/docs/interactive-customization/change-intent.schema.json +72 -0
  14. package/docs/interactive-customization/change-plan.sample.json +41 -0
  15. package/docs/interactive-customization/change-plan.schema.json +125 -0
  16. package/docs/interactive-customization/cross-industry-replication-guide.md +49 -0
  17. package/docs/interactive-customization/dialogue-governance-policy-baseline.json +49 -0
  18. package/docs/interactive-customization/domain-pack-extension-flow.md +71 -0
  19. package/docs/interactive-customization/execution-record.schema.json +62 -0
  20. package/docs/interactive-customization/governance-alert-playbook.md +51 -0
  21. package/docs/interactive-customization/governance-report-template.md +46 -0
  22. package/docs/interactive-customization/governance-threshold-baseline.json +14 -0
  23. package/docs/interactive-customization/guardrail-policy-baseline.json +27 -0
  24. package/docs/interactive-customization/high-risk-action-catalog.json +22 -0
  25. package/docs/interactive-customization/moqui-adapter-interface.md +40 -0
  26. package/docs/interactive-customization/moqui-context-provider.sample.json +72 -0
  27. package/docs/interactive-customization/moqui-copilot-context-contract.json +50 -0
  28. package/docs/interactive-customization/moqui-copilot-integration-guide.md +100 -0
  29. package/docs/interactive-customization/moqui-interactive-template-playbook.md +94 -0
  30. package/docs/interactive-customization/non-technical-usability-report.md +57 -0
  31. package/docs/interactive-customization/page-context.sample.json +73 -0
  32. package/docs/interactive-customization/page-context.schema.json +150 -0
  33. package/docs/interactive-customization/phase-acceptance-evidence.md +110 -0
  34. package/docs/interactive-customization/runtime-mode-policy-baseline.json +99 -0
  35. package/docs/moqui-template-core-library-playbook.md +71 -0
  36. package/docs/release-checklist.md +29 -4
  37. package/docs/security-governance-default-baseline.md +53 -0
  38. package/docs/starter-kit/README.md +50 -0
  39. package/docs/starter-kit/handoff-manifest.starter.json +32 -0
  40. package/docs/starter-kit/handoff-profile-ci.sample.yml +53 -0
  41. package/docs/starter-kit/release.workflow.sample.yml +41 -0
  42. package/docs/zh/README.md +12 -0
  43. package/lib/auto/moqui-recovery-sequence.js +62 -0
  44. package/lib/commands/auto.js +325 -42
  45. package/lib/commands/scene.js +837 -0
  46. package/lib/data/moqui-capability-lexicon.json +14 -1
  47. package/lib/interactive-customization/change-plan-gate-core.js +201 -0
  48. package/lib/interactive-customization/index.js +9 -0
  49. package/lib/interactive-customization/moqui-interactive-adapter.js +732 -0
  50. package/lib/orchestrator/orchestration-engine.js +64 -6
  51. package/package.json +28 -2
@@ -0,0 +1,50 @@
1
+ # SCE Release-Ready Starter Kit
2
+
3
+ This starter kit is the default baseline for onboarding an external project (including Moqui-based solutions) into SCE without project-specific flags.
4
+
5
+ ## Included Assets
6
+
7
+ - `handoff-manifest.starter.json`: minimal manifest contract that works with `sce auto handoff` and `sce scene package-publish-batch`.
8
+ - `release.workflow.sample.yml`: GitHub Actions sample for release-gate + weekly ops evidence publication.
9
+ - `handoff-profile-ci.sample.yml`: profile-based intake pipeline sample (`default|moqui|enterprise`).
10
+ - profile fixture references (for validation/testing):
11
+ - `tests/fixtures/handoff-profile-intake/default/*`
12
+ - `tests/fixtures/handoff-profile-intake/moqui/*`
13
+ - `tests/fixtures/handoff-profile-intake/enterprise/*`
14
+
15
+ ## Quick Start
16
+
17
+ 1. Prepare your manifest using `handoff-manifest.starter.json` as baseline.
18
+ 2. Run default intake pipeline:
19
+
20
+ ```bash
21
+ npx sce auto handoff capability-matrix --manifest docs/handoffs/handoff-manifest.json --profile moqui --fail-on-gap --json
22
+ npx sce auto handoff run --manifest docs/handoffs/handoff-manifest.json --profile moqui --json
23
+ node scripts/release-ops-weekly-summary.js --json
24
+ ```
25
+
26
+ 3. Wire release workflow using `release.workflow.sample.yml` sections:
27
+ - release-gate history index
28
+ - governance snapshot export
29
+ - weekly ops summary export
30
+ 4. Optional: use `handoff-profile-ci.sample.yml` to run profile-based intake against external projects.
31
+
32
+ ## Default Acceptance
33
+
34
+ - `scene package publish-batch` gate passes.
35
+ - capability lexicon unknown count is zero.
36
+ - release preflight is not blocked for hard-gate profiles.
37
+ - weekly ops summary risk is not `high` unless explicitly approved.
38
+
39
+ ## Profile Recommendation
40
+
41
+ - `default`: generic strict baseline intake.
42
+ - `moqui`: preferred profile for Moqui template sedimentation.
43
+ - `enterprise`: production rollout profile (release preflight hard-gate enabled).
44
+
45
+ ## Default Evidence Set
46
+
47
+ - `.kiro/reports/release-evidence/handoff-runs.json`
48
+ - `.kiro/reports/release-evidence/release-gate-history.json`
49
+ - `.kiro/reports/release-evidence/governance-snapshot-<tag>.json`
50
+ - `.kiro/reports/release-evidence/weekly-ops-summary-<tag>.json`
@@ -0,0 +1,32 @@
1
+ {
2
+ "timestamp": "2026-02-20T00:00:00.000Z",
3
+ "source_project": "E:/workspace/your-project",
4
+ "specs": [
5
+ {
6
+ "id": "60-10-example-capability-spec",
7
+ "status": "completed",
8
+ "scene_package": ".kiro/specs/60-10-example-capability-spec/custom/scene-package.json",
9
+ "scene_manifest": ".kiro/specs/60-10-example-capability-spec/custom/scene.yaml"
10
+ }
11
+ ],
12
+ "templates": [
13
+ "sce.scene--example-capability-template--0.1.0"
14
+ ],
15
+ "capabilities": [
16
+ "example-capability-a",
17
+ "example-capability-b"
18
+ ],
19
+ "known_gaps": [],
20
+ "ontology_validation": {
21
+ "status": "passed",
22
+ "quality_score": 90,
23
+ "business_rules": {
24
+ "total": 1,
25
+ "mapped": 1
26
+ },
27
+ "decision_logic": {
28
+ "total": 1,
29
+ "resolved": 1
30
+ }
31
+ }
32
+ }
@@ -0,0 +1,53 @@
1
+ name: Handoff Intake (Profile)
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ inputs:
6
+ profile:
7
+ description: "handoff profile: default|moqui|enterprise"
8
+ required: true
9
+ default: "moqui"
10
+ manifest:
11
+ description: "handoff manifest path"
12
+ required: true
13
+ default: "docs/handoffs/handoff-manifest.json"
14
+
15
+ jobs:
16
+ handoff-intake:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v3
20
+
21
+ - uses: actions/setup-node@v3
22
+ with:
23
+ node-version: "20.x"
24
+ cache: "npm"
25
+
26
+ - run: npm ci
27
+
28
+ - name: Validate capability matrix (profile scoped)
29
+ shell: bash
30
+ run: |
31
+ set -euo pipefail
32
+ PROFILE="${{ github.event.inputs.profile }}"
33
+ MANIFEST="${{ github.event.inputs.manifest }}"
34
+ npx sce auto handoff capability-matrix \
35
+ --manifest "${MANIFEST}" \
36
+ --profile "${PROFILE}" \
37
+ --fail-on-gap \
38
+ --json
39
+
40
+ - name: Execute handoff run (profile scoped)
41
+ shell: bash
42
+ run: |
43
+ set -euo pipefail
44
+ PROFILE="${{ github.event.inputs.profile }}"
45
+ MANIFEST="${{ github.event.inputs.manifest }}"
46
+ npx sce auto handoff run \
47
+ --manifest "${MANIFEST}" \
48
+ --profile "${PROFILE}" \
49
+ --json
50
+
51
+ - name: Build weekly ops summary
52
+ run: node scripts/release-ops-weekly-summary.js --json
53
+
@@ -0,0 +1,41 @@
1
+ name: Release Starter (SCE)
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*"
7
+
8
+ jobs:
9
+ publish:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+
14
+ - uses: actions/setup-node@v3
15
+ with:
16
+ node-version: "20.x"
17
+ cache: "npm"
18
+
19
+ - run: npm ci
20
+ - run: npm test -- --runInBand
21
+ - run: node scripts/interactive-governance-report.js --period weekly --fail-on-alert --json
22
+
23
+ - name: Build release evidence cards
24
+ shell: bash
25
+ run: |
26
+ set -euo pipefail
27
+ TAG="${GITHUB_REF_NAME}"
28
+ NOTES_DIR=".kiro/reports/release-evidence"
29
+ mkdir -p "${NOTES_DIR}"
30
+
31
+ node scripts/release-ops-weekly-summary.js \
32
+ --out "${NOTES_DIR}/weekly-ops-summary-${TAG}.json" \
33
+ --markdown-out "${NOTES_DIR}/weekly-ops-summary-${TAG}.md" \
34
+ --json
35
+
36
+ RELEASE_TAG="${TAG}" \
37
+ RELEASE_EVIDENCE_SUMMARY_FILE="${NOTES_DIR}/release-evidence-summary-${TAG}.json" \
38
+ RELEASE_GOVERNANCE_SNAPSHOT_JSON="${NOTES_DIR}/governance-snapshot-${TAG}.json" \
39
+ RELEASE_GOVERNANCE_SNAPSHOT_MD="${NOTES_DIR}/governance-snapshot-${TAG}.md" \
40
+ node scripts/release-governance-snapshot-export.js
41
+
package/docs/zh/README.md CHANGED
@@ -190,6 +190,12 @@
190
190
  - 主从编排与门禁增强
191
191
  - 跨轮次回归与发布治理集成
192
192
 
193
+ ### [Handoff Profile Integration Guide](../handoff-profile-integration-guide.md)
194
+ **外部项目接入规范(英文)** - `default|moqui|enterprise` 三档 handoff profile 契约
195
+ - profile 默认策略与显式参数覆盖规则
196
+ - 外部项目 manifest/evidence 最小要求
197
+ - 从 `moqui` 到 `enterprise` 的分阶段上线建议
198
+
193
199
  ### [Value 可观测指南](value-observability-guide.md)
194
200
  **KPI 量化交付指南** - 快照、基线、趋势、门禁证据
195
201
  - 周度 KPI 快照生成
@@ -207,6 +213,12 @@
207
213
  - 测试、命令冒烟、打包检查
208
214
  - 文档一致性和 Git 准备状态
209
215
 
216
+ ### [安全治理默认基线](../security-governance-default-baseline.md)
217
+ **默认安全控制(英文)** - 上下文脱敏、审批策略、发布审计证据最小集合
218
+
219
+ ### [发布即用 Starter Kit](../starter-kit/README.md)
220
+ **外部项目接入脚手架(英文)** - handoff manifest 样例与 release workflow 样例
221
+
210
222
  ### [发布归档](releases/README.md)
211
223
  **历史发布入口** - 集中查看发布说明与验证报告
212
224
  - 版本化发布说明
@@ -0,0 +1,62 @@
1
+ 'use strict';
2
+
3
+ const DEFAULT_CLUSTER_GOALS_ARG = '.kiro/auto/matrix-remediation.capability-clusters.json';
4
+ const DEFAULT_BASELINE_ARG = '.kiro/reports/release-evidence/moqui-template-baseline.json';
5
+ const DEFAULT_CLUSTER_PHASED_ALIAS = 'npm run run:matrix-remediation-clusters-phased -- --json';
6
+ const DEFAULT_CLUSTER_BATCH_ALIAS = 'npm run run:matrix-remediation-clusters';
7
+ const DEFAULT_BASELINE_PHASED_ALIAS = 'npm run run:matrix-remediation-from-baseline -- --json';
8
+
9
+ function buildMoquiRegressionRecoverySequenceLines(options = {}) {
10
+ const clusterGoalsArg = options.clusterGoalsArg || DEFAULT_CLUSTER_GOALS_ARG;
11
+ const baselineArg = options.baselineArg || DEFAULT_BASELINE_ARG;
12
+ const clusterPhasedCommand = options.clusterPhasedCommand
13
+ || `node scripts/moqui-matrix-remediation-phased-runner.js --cluster-goals ${clusterGoalsArg} --json`;
14
+ const clusterBatchCommand = options.clusterBatchCommand
15
+ || `sce auto close-loop-batch ${clusterGoalsArg} --format json --batch-parallel 1 --batch-agent-budget 2 --batch-retry-until-complete --json`;
16
+ const baselinePhasedCommand = options.baselinePhasedCommand
17
+ || `node scripts/moqui-matrix-remediation-phased-runner.js --baseline ${baselineArg} --json`;
18
+ const clusterPhasedAlias = options.clusterPhasedAlias || DEFAULT_CLUSTER_PHASED_ALIAS;
19
+ const clusterBatchAlias = options.clusterBatchAlias || DEFAULT_CLUSTER_BATCH_ALIAS;
20
+ const baselinePhasedAlias = options.baselinePhasedAlias || DEFAULT_BASELINE_PHASED_ALIAS;
21
+
22
+ const includeLabel = options.includeLabel !== false;
23
+ const includeStep1Alias = options.includeStep1Alias !== false;
24
+ const includeStep1Fallback = options.includeStep1Fallback !== false;
25
+ const includeStep1FallbackAlias = options.includeStep1FallbackAlias !== false;
26
+ const includeStep2Alias = options.includeStep2Alias !== false;
27
+
28
+ const wrapCommands = options.wrapCommands === true;
29
+ const withPeriod = options.withPeriod === true;
30
+ const formatCommand = command => (wrapCommands ? `\`${command}\`` : command);
31
+ const suffix = withPeriod ? '.' : '';
32
+ const lines = [];
33
+
34
+ if (includeLabel) {
35
+ lines.push('Moqui regression recovery sequence (recommended):');
36
+ }
37
+ lines.push(`Step 1 (Cluster phased): ${formatCommand(clusterPhasedCommand)}${suffix}`);
38
+ if (includeStep1Alias) {
39
+ lines.push(`Step 1 alias: ${formatCommand(clusterPhasedAlias)}${suffix}`);
40
+ }
41
+ if (includeStep1Fallback) {
42
+ lines.push(`Step 1 fallback (cluster batch): ${formatCommand(clusterBatchCommand)}${suffix}`);
43
+ }
44
+ if (includeStep1FallbackAlias) {
45
+ lines.push(`Step 1 fallback alias: ${formatCommand(clusterBatchAlias)}${suffix}`);
46
+ }
47
+ lines.push(`Step 2 (Baseline phased): ${formatCommand(baselinePhasedCommand)}${suffix}`);
48
+ if (includeStep2Alias) {
49
+ lines.push(`Step 2 alias: ${formatCommand(baselinePhasedAlias)}${suffix}`);
50
+ }
51
+
52
+ return lines;
53
+ }
54
+
55
+ module.exports = {
56
+ DEFAULT_CLUSTER_GOALS_ARG,
57
+ DEFAULT_BASELINE_ARG,
58
+ DEFAULT_CLUSTER_PHASED_ALIAS,
59
+ DEFAULT_CLUSTER_BATCH_ALIAS,
60
+ DEFAULT_BASELINE_PHASED_ALIAS,
61
+ buildMoquiRegressionRecoverySequenceLines
62
+ };