scene-capability-engine 3.6.36 → 3.6.37

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 (34) hide show
  1. package/CHANGELOG.md +25 -12
  2. package/bin/scene-capability-engine.js +1 -1
  3. package/docs/331-poc-adaptation-roadmap.md +3 -3
  4. package/docs/command-reference.md +5 -5
  5. package/docs/faq.md +1 -1
  6. package/docs/interactive-customization/331-poc-sce-integration-checklist.md +3 -3
  7. package/docs/interactive-customization/moqui-interactive-template-playbook.md +4 -4
  8. package/docs/interactive-customization/phase-acceptance-evidence.md +2 -2
  9. package/docs/moqui-standard-rebuild-guide.md +6 -6
  10. package/docs/moqui-template-core-library-playbook.md +1 -1
  11. package/docs/release-checklist.md +50 -27
  12. package/docs/releases/README.md +1 -0
  13. package/docs/releases/v3.6.37.md +22 -0
  14. package/docs/steering-strategy-guide.md +7 -7
  15. package/docs/troubleshooting.md +1 -1
  16. package/docs/zh/release-checklist.md +40 -17
  17. package/docs/zh/releases/README.md +1 -0
  18. package/docs/zh/releases/v3.6.37.md +22 -0
  19. package/lib/auto/governance-summary.js +2 -2
  20. package/lib/commands/adopt.js +4 -4
  21. package/lib/commands/auto.js +3 -3
  22. package/lib/spec/bootstrap/context-collector.js +1 -1
  23. package/lib/steering/adoption-config.js +2 -2
  24. package/lib/steering/compliance-cache.js +2 -2
  25. package/lib/steering/steering-manager.js +4 -4
  26. package/lib/task/task-claimer.js +1 -2
  27. package/lib/workspace/multi/workspace-context-resolver.js +3 -3
  28. package/lib/workspace/multi/workspace-state-manager.js +0 -164
  29. package/lib/workspace/sce-tracking-audit.js +1 -1
  30. package/lib/workspace/takeover-baseline.js +1 -1
  31. package/package.json +1 -1
  32. package/template/.sce/README.md +1 -1
  33. package/template/.sce/steering/CORE_PRINCIPLES.md +1 -1
  34. package/bin/kse.js +0 -3
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- # Changelog
1
+ # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.6.37] - 2026-03-12
11
+
12
+ ### Added
13
+ - Added explicit release-environment guidance that clarifies this project publishes only from `v*` tag pushes, requires GitHub Actions secret `NPM_TOKEN`, and must bump `package.json.version` before tagging.
14
+ - Added release notes for `v3.6.37` under `docs/releases/` and `docs/zh/releases/`.
15
+
16
+ ### Changed
17
+ - Removed legacy `kse` command/content references across active code paths, templates, fixtures, watch configuration, version metadata, steering, and release documentation without preserving compatibility aliases.
18
+ - Renamed the multi-workspace directory validation API from `isValidKseDirectory` to `isValidSceDirectory` and updated the related tests.
19
+ - Renamed historical spec/template fixture paths from `kse` identifiers to `sce` identifiers, including scene package template IDs and spec-scene override references.
20
+ - Updated the branding consistency gate to fail on legacy `kse` aliases and stale social handles instead of allowing them to linger in tracked content.
21
+ - Fixed `scripts/git-managed-gate.js` on Windows by falling back to `git.cmd` / `git.exe` resolution, so `prepublishOnly` and release preflight no longer misreport a valid repository as missing git metadata.
22
+
10
23
  ### Added
11
24
  - Added `lib/auto/handoff-release-gate-history-loaders-service.js` for release-gate history entry normalization, report discovery, seed loading, and merge selection.
12
25
  - Added `lib/auto/handoff-run-service.js` for full auto-handoff orchestration outside the command layer.
@@ -278,7 +291,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
278
291
  - `state-reconcile-<tag>.json`
279
292
 
280
293
  ### Changed
281
- - Release workflow state reconciliation gate is now enforce-by-default (`KSE_RELEASE_STATE_MIGRATION_ENFORCE` defaults to `true`).
294
+ - Release workflow state reconciliation gate is now enforce-by-default (`SCE_RELEASE_STATE_MIGRATION_ENFORCE` defaults to `true`).
282
295
  - Release workflow Node runtime updated to `22.x` so sqlite-backed reconciliation can run in release pipeline.
283
296
 
284
297
  ## [3.6.7] - 2026-03-05
@@ -856,7 +869,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
856
869
  - **Interactive runtime policy + work-order default pipeline**: Added `interactive-runtime-policy-evaluate` and `interactive-work-order-build`, integrated both into `interactive-customization-loop` and `interactive-flow` (including `sce scene interactive-loop/interactive-flow` passthrough), with default `runtime_mode=ops-fix`, `runtime_environment=staging`, runtime non-allow fail gate option, and auditable work-order artifacts.
857
870
  - **Release weekly ops closed-loop summary**: Added `node scripts/release-ops-weekly-summary.js` (npm alias `npm run report:release-ops-weekly`) to aggregate handoff evidence, release-gate history, interactive governance, and matrix signals into one weekly risk/recommendation card (`weekly-ops-summary.json|.md`).
858
871
  - **Release workflow weekly ops asset publication**: `release.yml` now exports and publishes `weekly-ops-summary-<tag>.json|.md` alongside governance snapshot and Moqui release evidence assets.
859
- - **Release weekly ops hard gate**: Added `node scripts/release-weekly-ops-gate.js` (npm alias `npm run gate:release-ops-weekly`) and wired release workflow defaults to block publish when weekly ops summary risk exceeds `medium` (configurable via `KSE_RELEASE_WEEKLY_OPS_*` variables).
872
+ - **Release weekly ops hard gate**: Added `node scripts/release-weekly-ops-gate.js` (npm alias `npm run gate:release-ops-weekly`) and wired release workflow defaults to block publish when weekly ops summary risk exceeds `medium` (configurable via `SCE_RELEASE_WEEKLY_OPS_*` variables).
860
873
  - **Unified weekly+drift remediation bundle**: Added `node scripts/release-risk-remediation-bundle.js` (npm alias `npm run report:release-risk-remediation`) and wired release workflow to publish `release-risk-remediation-<tag>.json|.md|.lines` assets derived from merged gate signals.
861
874
  - **Release asset integrity hard gate**: Added `node scripts/release-asset-integrity-check.js` (npm alias `npm run gate:release-asset-integrity`) and wired `release.yml` to block publish on missing/empty core release-evidence assets, while exporting `release-asset-integrity-<tag>.json|.md`.
862
875
  - **Interactive dialogue governance baseline**: Added `node scripts/interactive-dialogue-governance.js`, baseline policy `docs/interactive-customization/dialogue-governance-policy-baseline.json`, and loop/flow integration so embedded assistants emit `allow|clarify|deny` dialogue decisions with clarification prompts before planning.
@@ -878,7 +891,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
878
891
  - **Interactive matrix signal closed-loop defaultization**: `interactive-flow` now runs a default matrix snapshot stage (`moqui-template-baseline-report`) after loop execution, persists session matrix artifacts, appends `.sce/reports/interactive-matrix-signals.jsonl`, and exposes matrix controls (`--no-matrix`, thresholds, compare baseline, signal path, fail-on-portfolio/regression/error) in both script and `sce scene interactive-flow`.
879
892
  - **Interactive approval workflow state machine**: Added `node scripts/interactive-approval-workflow.js` (status alias `npm run report:interactive-approval-status`) covering `draft/submitted/approved/rejected/executed/verified/archived` transitions, with high-risk execute blocking and append-only approval event audit JSONL.
880
893
  - **Interactive Moqui adapter stage-C baseline**: Added `lib/interactive-customization/moqui-interactive-adapter.js` plus `node scripts/interactive-moqui-adapter.js` (alias `npm run report:interactive-adapter-capabilities`) to implement unified adapter contract `capabilities/plan/validate/apply/rollback`, low-risk one-click apply (`low-risk-apply`), policy-aware controlled execution, and append-only execution records with validation snapshot + rollback reference.
881
- - **Interactive template matrix stage-D baseline**: Added `kse.scene--moqui-interactive-customization-loop--0.1.0` scene package assets (scene-package/scene manifest/template manifest), plus template sedimentation playbook, adapter extension contract schema/sample, and Domain_Pack extension flow docs for cross-stack replication.
894
+ - **Interactive template matrix stage-D baseline**: Added `sce.scene--moqui-interactive-customization-loop--0.1.0` scene package assets (scene-package/scene manifest/template manifest), plus template sedimentation playbook, adapter extension contract schema/sample, and Domain_Pack extension flow docs for cross-stack replication.
882
895
  - **Interactive governance observability + alerting**: Added `node scripts/interactive-governance-report.js` (alias `npm run report:interactive-governance`) to compute adoption/success/rollback/security-intercept/satisfaction KPIs, apply threshold alerts, and emit JSON/Markdown governance reports with `--fail-on-alert` gate behavior.
883
896
  - **Interactive governance matrix telemetry integration**: `interactive-governance-report` now consumes matrix signals by default, computes matrix pass/regression/stage-error metrics, and enforces threshold alerts for matrix trend degradation.
884
897
  - **Matrix regression gate + remediation queue automation**: Added `scripts/matrix-regression-gate.js` and `scripts/moqui-matrix-remediation-queue.js` with npm aliases (`gate:matrix-regression`, `report:matrix-remediation-queue`) so CI/release can enforce configurable regression limits and export close-loop remediation lines from matrix regressions.
@@ -901,8 +914,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
901
914
  - **Capability matrix recommendations upgrade**: `sce auto handoff capability-matrix` now also recommends baseline-driven phased one-shot remediation commands when Moqui matrix regressions appear in baseline trend comparison.
902
915
  - **Handoff profile policy abstraction (`default|moqui|enterprise`)**: `sce auto handoff run` and `sce auto handoff capability-matrix` now support `--profile` preset policies with explicit option override precedence, plus external integration contract guidance in `docs/handoff-profile-integration-guide.md`.
903
916
  - **Regression/governance recommendation unification**: `sce auto handoff regression`, `sce auto governance stats`, and governance close-loop release-gate blockers now include baseline-driven phased one-shot remediation guidance for Moqui matrix regressions.
904
- - **Release workflow matrix evidence hardening**: `test.yml` and `release.yml` now archive matrix/governance artifacts by default and support configurable matrix regression hard-gate controls via `KSE_MATRIX_REGRESSION_GATE_ENFORCE` + `KSE_MATRIX_REGRESSION_GATE_MAX`.
905
- - **Release workflow Moqui summary alignment**: `release.yml` now explicitly generates and publishes `moqui-release-summary.{json,md}` from baseline + interactive governance + evidence inputs, with optional hard-gate flag `KSE_MOQUI_RELEASE_SUMMARY_ENFORCE`.
917
+ - **Release workflow matrix evidence hardening**: `test.yml` and `release.yml` now archive matrix/governance artifacts by default and support configurable matrix regression hard-gate controls via `SCE_MATRIX_REGRESSION_GATE_ENFORCE` + `SCE_MATRIX_REGRESSION_GATE_MAX`.
918
+ - **Release workflow Moqui summary alignment**: `release.yml` now explicitly generates and publishes `moqui-release-summary.{json,md}` from baseline + interactive governance + evidence inputs, with optional hard-gate flag `SCE_MOQUI_RELEASE_SUMMARY_ENFORCE`.
906
919
  - **Release governance snapshot standalone assets**: Added `scripts/release-governance-snapshot-export.js` and wired `release.yml` to publish `governance-snapshot-<tag>.json|.md` as independent governance audit artifacts (with unavailable placeholders when evidence summary is missing).
907
920
  - **331-poc integration checklist baseline**: Added `docs/interactive-customization/331-poc-sce-integration-checklist.md` to define minimal runtime contract, default commands, gate defaults, and pass criteria for Moqui + SCE deployment.
908
921
  - **Interactive feedback ingestion helper**: Added `node scripts/interactive-feedback-log.js` (alias `npm run log:interactive-feedback`) to append structured business-user feedback events into `.sce/reports/interactive-user-feedback.jsonl` for governance sample coverage and trend stability.
@@ -1285,7 +1298,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1285
1298
  ## [1.39.0] - 2026-02-10
1286
1299
 
1287
1300
  ### Added
1288
- - **Moqui ERP Adapter**: Integrate Moqui ERP instance into KSE scene runtime
1301
+ - **Moqui ERP Adapter**: Integrate Moqui ERP instance into SCE scene runtime
1289
1302
  - `MoquiClient` — HTTP client with JWT auth lifecycle (login, refresh, re-login, logout), retry logic using Node.js built-in `http`/`https`
1290
1303
  - `MoquiAdapter` — Binding handler for `spec.erp.*` and `moqui.*` refs, entity CRUD, service invocation, screen discovery
1291
1304
  - `sce scene connect` — Test connectivity and authentication to Moqui ERP instance
@@ -2089,7 +2102,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2089
2102
  - Template management: `sce templates update`, `sce templates cache`, `sce templates guide`
2090
2103
  - Custom sources: `sce templates add-source <name> <url>`, `sce templates remove-source <name>`, `sce templates sources`
2091
2104
  - Create Spec from template: `sce spec create <name> --template <template-id>`
2092
- - Local caching for offline use (~/.kse/templates/)
2105
+ - Local caching for offline use (~/.sce/templates/)
2093
2106
  - Multi-source support with conflict resolution (source:template-id format)
2094
2107
  - Automatic variable substitution ({{SPEC_NAME}}, {{DATE}}, {{AUTHOR}}, etc.)
2095
2108
  - YAML frontmatter removal in applied templates
@@ -2186,10 +2199,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2186
2199
  - **Multi-user support**: Detects and respects `contexts/` multi-user collaboration setup
2187
2200
  - Differential backup: Only backs up violating files/directories (not entire .sce/)
2188
2201
  - Backup location: `.sce/backups/steering-cleanup-{timestamp}/`
2189
- - Version-based caching (~/.kse/steering-check-cache.json) to avoid repeated checks
2202
+ - Version-based caching (~/.sce/steering-check-cache.json) to avoid repeated checks
2190
2203
  - Performance target: <50ms per check
2191
2204
  - Clear progress messages during auto-fix
2192
- - Bypass options: `--skip-steering-check` flag and `KSE_SKIP_STEERING_CHECK` environment variable
2205
+ - Bypass options: `--skip-steering-check` flag and `SCE_SKIP_STEERING_CHECK` environment variable
2193
2206
  - Force check option: `--force-steering-check` flag
2194
2207
  - Comprehensive documentation in `.sce/README.md`
2195
2208
 
@@ -2227,7 +2240,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2227
2240
  - **Critical Principle**: Added "测试失败零容忍原则" (Zero Tolerance for Test Failures) to CORE_PRINCIPLES.md
2228
2241
  - Emphasizes "千里之堤溃于蚁穴" - never ignore any test failure
2229
2242
  - Provides clear execution standards and rationale
2230
- - Aligns with Ultrawork spirit and KSE core values
2243
+ - Aligns with Ultrawork spirit and SCE core values
2231
2244
 
2232
2245
  ### Changed
2233
2246
  - **Documentation Optimization**: Refactored CORE_PRINCIPLES.md for clarity and value density
@@ -2414,7 +2427,7 @@ rm -rf .sce/steering/workspaces
2414
2427
  - `sce workspace remove <name>` - Remove workspace from registry
2415
2428
  - `sce workspace info [name]` - Display workspace details
2416
2429
  - **Data Atomicity Architecture**
2417
- - Single source of truth: `~/.kse/workspace-state.json`
2430
+ - Single source of truth: `~/.sce/workspace-state.json`
2418
2431
  - Atomic operations for all workspace state changes
2419
2432
  - Automatic migration from legacy format
2420
2433
  - Cross-platform path handling with PathUtils
@@ -1118,7 +1118,7 @@ async function updateProjectConfig(projectName) {
1118
1118
  const skipAutoTakeover = isTakeoverAutoApplySkippedCommand(args);
1119
1119
  const skipCheck = isNoMutationCommand(args) ||
1120
1120
  args.includes('--skip-steering-check') ||
1121
- process.env.KSE_SKIP_STEERING_CHECK === '1';
1121
+ process.env.SCE_SKIP_STEERING_CHECK === '1';
1122
1122
  const forceCheck = args.includes('--force-steering-check');
1123
1123
 
1124
1124
  if (!isLegacyAllowlistedCommand) {
@@ -54,7 +54,7 @@
54
54
  - tag 发布时自动将 release notes 草稿、evidence 审阅 markdown、summary JSON 作为 GitHub Release 资产上传。
55
55
  - 无 evidence 时至少上传 fallback notes,保证发布资产结构稳定。
56
56
  20. 新增可配置发布门禁(workflow 级):
57
- - 支持通过 `KSE_RELEASE_*` 仓库变量配置 success rate/risk/ontology 阈值。
57
+ - 支持通过 `SCE_RELEASE_*` 仓库变量配置 success rate/risk/ontology 阈值。
58
58
  - 支持 advisory(默认)与 enforce(阻断发布)两种模式,且门禁在 `npm publish` 前执行。
59
59
  21. 新增 release gate 审计产物:
60
60
  - 每次 tag 发布生成 `release-gate-<tag>.json`,记录阈值、观测信号、违规项和判定结果。
@@ -87,10 +87,10 @@
87
87
  - 自动检测连续 gate 失败、高风险占比过高、短期风险占比上升。
88
88
  - 在 Release Notes 中显式给出 drift alerts,提前暴露质量恶化趋势。
89
89
  31. 漂移告警阈值参数化:
90
- - 支持通过 `KSE_RELEASE_DRIFT_*` 仓库变量调节 fail streak/high-risk share/delta 阈值。
90
+ - 支持通过 `SCE_RELEASE_DRIFT_*` 仓库变量调节 fail streak/high-risk share/delta 阈值。
91
91
  - 不同项目可按发布策略调整灵敏度,减少误报或漏报。
92
92
  32. 漂移告警阻断模式:
93
- - 新增 `KSE_RELEASE_DRIFT_ENFORCE`,可在漂移告警触发时阻断发布。
93
+ - 新增 `SCE_RELEASE_DRIFT_ENFORCE`,可在漂移告警触发时阻断发布。
94
94
  - 保留默认 advisory 模式,确保历史数据不足时不误阻断。
95
95
  33. 漂移告警审计写回 gate 报告:
96
96
  - `release.yml` 将 drift 评估结果回写到 `release-gate-<tag>.json` 的 `drift` 字段。
@@ -1574,7 +1574,7 @@ Moqui template library lexicon audit (script-level governance helper):
1574
1574
  - `node scripts/moqui-lexicon-audit.js [--manifest <path>] [--template-dir <path>] [--lexicon <path>] [--out <path>] [--markdown-out <path>] [--fail-on-gap] [--json]`: audit manifest/template capability names against canonical Moqui lexicon; reports unknown aliases and uncovered expected capabilities.
1575
1575
  - Expected capability scope uses `manifest.capabilities` first; when empty, it infers canonical expected capabilities from `manifest.templates` and emits `expected_scope` metadata (`source`, `inferred_*`, `unresolved_templates`).
1576
1576
  - By default, template capability auditing is scoped to `manifest.templates` (when matched), reducing noise from unrelated templates.
1577
- - Template scope matching normalizes `sce.scene--*` / `kse.scene--*` prefixes, so renamed template namespaces still map correctly.
1577
+ - Template scope matching normalizes `sce.scene--*` / `sce.scene--*` prefixes, so renamed template namespaces still map correctly.
1578
1578
 
1579
1579
  Moqui release summary helper (script-level consolidated gate view):
1580
1580
  - `node scripts/moqui-release-summary.js [--evidence <path>] [--baseline <path>] [--lexicon <path>] [--capability-matrix <path>] [--interactive-governance <path>] [--matrix-remediation-plan <path>] [--out <path>] [--markdown-out <path>] [--fail-on-gate-fail] [--json]`: merge handoff release-evidence + baseline + lexicon + capability-matrix + interactive-governance into one Moqui release gate summary (`passed | failed | incomplete`) with executable remediation recommendations.
@@ -2126,10 +2126,10 @@ Release workflow default:
2126
2126
  - Runs interactive flow smoke (`npm run test:interactive-flow-smoke`) in test/release test jobs.
2127
2127
  - Runs interactive governance gate by default (`interactive-governance-report --period weekly --fail-on-alert`) in test and release pipelines.
2128
2128
  - Evaluates matrix regression gate in CI/release with configurable policy:
2129
- - `KSE_MATRIX_REGRESSION_GATE_ENFORCE` (`true|false`, default advisory/disabled)
2130
- - `KSE_MATRIX_REGRESSION_GATE_MAX` (default `0`)
2129
+ - `SCE_MATRIX_REGRESSION_GATE_ENFORCE` (`true|false`, default advisory/disabled)
2130
+ - `SCE_MATRIX_REGRESSION_GATE_MAX` (default `0`)
2131
2131
  - Optional release summary hard-gate:
2132
- - `KSE_MOQUI_RELEASE_SUMMARY_ENFORCE` (`true|false`, default advisory/disabled)
2132
+ - `SCE_MOQUI_RELEASE_SUMMARY_ENFORCE` (`true|false`, default advisory/disabled)
2133
2133
  - Publishes `moqui-template-baseline.json` + `moqui-template-baseline.md` as release assets.
2134
2134
  - Publishes `moqui-release-summary.json` + `moqui-release-summary.md` as release review assets.
2135
2135
  - Publishes `interactive-governance-<tag>.json` + `interactive-governance-<tag>.md` as release evidence assets.
@@ -2138,7 +2138,7 @@ Release workflow default:
2138
2138
  - Evaluates weekly ops risk gate by default (`release-weekly-ops-gate`; default block when `risk > medium` or summary missing).
2139
2139
  - Publishes `release-risk-remediation-<tag>.json|.md|.lines` derived from unified weekly+drift gate signals.
2140
2140
  - Evaluates and publishes release asset integrity audit (`release-asset-integrity-<tag>.json|.md`) before `npm publish`.
2141
- - Enforces baseline portfolio gate by default (`KSE_MOQUI_BASELINE_ENFORCE` defaults to `true` when unset).
2141
+ - Enforces baseline portfolio gate by default (`SCE_MOQUI_BASELINE_ENFORCE` defaults to `true` when unset).
2142
2142
 
2143
2143
  ### Moqui ERP Integration
2144
2144
 
package/docs/faq.md CHANGED
@@ -682,7 +682,7 @@ sce spec bootstrap --name 03-00-ci-cd-pipeline --non-interactive
682
682
  **Ask the community:**
683
683
  - GitHub Discussions: https://github.com/heguangyong/scene-capability-engine/discussions
684
684
  - Discord: [Join our Discord](https://discord.gg/sce)
685
- - Twitter: [@kse_dev](https://twitter.com/kse_dev)
685
+ - Twitter: [@sce_dev](https://twitter.com/sce_dev)
686
686
 
687
687
  **Report issues:**
688
688
  - GitHub Issues: https://github.com/heguangyong/scene-capability-engine/issues
@@ -71,9 +71,9 @@ node scripts/matrix-regression-gate.js \
71
71
 
72
72
  Recommended GitHub Variables:
73
73
 
74
- - `KSE_MATRIX_REGRESSION_GATE_ENFORCE=true`
75
- - `KSE_MATRIX_REGRESSION_GATE_MAX=0`
76
- - `KSE_MOQUI_RELEASE_SUMMARY_ENFORCE=true` (optional hard gate for release summary `failed` state)
74
+ - `SCE_MATRIX_REGRESSION_GATE_ENFORCE=true`
75
+ - `SCE_MATRIX_REGRESSION_GATE_MAX=0`
76
+ - `SCE_MOQUI_RELEASE_SUMMARY_ENFORCE=true` (optional hard gate for release summary `failed` state)
77
77
 
78
78
  Security baseline:
79
79
 
@@ -20,10 +20,10 @@ This playbook defines how to turn validated Moqui interactive customization flow
20
20
 
21
21
  Primary package for the interactive loop:
22
22
 
23
- - `.sce/templates/scene-packages/kse.scene--moqui-interactive-customization-loop--0.1.0/scene-package.json`
24
- - `.sce/templates/scene-packages/kse.scene--moqui-interactive-customization-loop--0.1.0/scene.template.yaml`
25
- - `.sce/templates/scene-packages/kse.scene--moqui-interactive-customization-loop--0.1.0/custom/scene.yaml`
26
- - `.sce/templates/scene-packages/kse.scene--moqui-interactive-customization-loop--0.1.0/template.manifest.json`
23
+ - `.sce/templates/scene-packages/sce.scene--moqui-interactive-customization-loop--0.1.0/scene-package.json`
24
+ - `.sce/templates/scene-packages/sce.scene--moqui-interactive-customization-loop--0.1.0/scene.template.yaml`
25
+ - `.sce/templates/scene-packages/sce.scene--moqui-interactive-customization-loop--0.1.0/custom/scene.yaml`
26
+ - `.sce/templates/scene-packages/sce.scene--moqui-interactive-customization-loop--0.1.0/template.manifest.json`
27
27
 
28
28
  ## Capability Matrix Mapping
29
29
 
@@ -90,8 +90,8 @@ Scope:
90
90
 
91
91
  Evidence:
92
92
 
93
- - `.sce/templates/scene-packages/kse.scene--moqui-interactive-customization-loop--0.1.0/scene-package.json`
94
- - `.sce/templates/scene-packages/kse.scene--moqui-interactive-customization-loop--0.1.0/scene.template.yaml`
93
+ - `.sce/templates/scene-packages/sce.scene--moqui-interactive-customization-loop--0.1.0/scene-package.json`
94
+ - `.sce/templates/scene-packages/sce.scene--moqui-interactive-customization-loop--0.1.0/scene.template.yaml`
95
95
  - `docs/interactive-customization/moqui-interactive-template-playbook.md`
96
96
  - `docs/interactive-customization/adapter-extension-contract.schema.json`
97
97
  - `docs/interactive-customization/domain-pack-extension-flow.md`
@@ -84,12 +84,12 @@ Defaults: `ready>=6`, `partial<=0`, `gap<=0`.
84
84
 
85
85
  ## Default Moqui Template Matrix
86
86
 
87
- - `kse.scene--moqui-entity-model-core--0.1.0`
88
- - `kse.scene--moqui-service-contract-core--0.1.0`
89
- - `kse.scene--moqui-screen-flow-core--0.1.0`
90
- - `kse.scene--moqui-form-interaction-core--0.1.0`
91
- - `kse.scene--moqui-rule-decision-core--0.1.0`
92
- - `kse.scene--moqui-page-copilot-dialog--0.1.0`
87
+ - `sce.scene--moqui-entity-model-core--0.1.0`
88
+ - `sce.scene--moqui-service-contract-core--0.1.0`
89
+ - `sce.scene--moqui-screen-flow-core--0.1.0`
90
+ - `sce.scene--moqui-form-interaction-core--0.1.0`
91
+ - `sce.scene--moqui-rule-decision-core--0.1.0`
92
+ - `sce.scene--moqui-page-copilot-dialog--0.1.0`
93
93
 
94
94
  ## Next Step for Business Project
95
95
 
@@ -201,7 +201,7 @@ sce auto close-loop-batch .sce/auto/ontology-remediation.lines --format lines --
201
201
 
202
202
  Stage-D baseline package for the interactive business customization loop:
203
203
 
204
- - `kse.scene--moqui-interactive-customization-loop--0.1.0`
204
+ - `sce.scene--moqui-interactive-customization-loop--0.1.0`
205
205
 
206
206
  This package captures:
207
207
 
@@ -115,41 +115,48 @@ Verify:
115
115
 
116
116
  Ensure:
117
117
 
118
+ - Release automation is tag-driven, not commit-driven:
119
+ - `.github/workflows/release.yml` only triggers on `push.tags: v*`
120
+ - plain `git push` runs normal CI and does not publish npm/GitHub release
121
+ - GitHub Actions publish prerequisites are in place:
122
+ - repository secret `NPM_TOKEN` must exist and remain valid for `npm publish --access public`
123
+ - `GITHUB_TOKEN` is used by workflow for release asset/readback steps
118
124
  - `package.json` version is correct.
125
+ - `package.json` version must be greater than the currently published npm version.
119
126
  - `CHANGELOG.md` includes release-relevant entries.
120
127
  - Release notes draft exists (for example `docs/releases/vX.Y.Z.md`).
121
128
  - Optional: configure release evidence gate with repository variables (`Settings -> Secrets and variables -> Actions -> Variables`):
122
- - `KSE_RELEASE_GATE_ENFORCE`: `true|false` (default advisory, non-blocking)
123
- - `KSE_RELEASE_GATE_REQUIRE_EVIDENCE`: require `handoff-runs.json` summary
124
- - `KSE_RELEASE_GATE_REQUIRE_GATE_PASS`: require evidence gate `passed=true` (default true when evidence exists)
125
- - `KSE_RELEASE_GATE_MIN_SPEC_SUCCESS_RATE`: minimum allowed success rate percent
126
- - `KSE_RELEASE_GATE_MAX_RISK_LEVEL`: `low|medium|high|unknown` (default `unknown`)
127
- - `KSE_RELEASE_GATE_MAX_UNMAPPED_RULES`: maximum allowed unmapped ontology business rules
128
- - `KSE_RELEASE_GATE_MAX_UNDECIDED_DECISIONS`: maximum allowed undecided ontology decisions
129
- - `KSE_RELEASE_GATE_REQUIRE_SCENE_BATCH_PASS`: require scene package publish-batch gate passed (`true|false`, default `true`)
130
- - `KSE_RELEASE_GATE_MAX_SCENE_BATCH_FAILURES`: maximum allowed scene package batch failure count (default `0`)
129
+ - `SCE_RELEASE_GATE_ENFORCE`: `true|false` (default advisory, non-blocking)
130
+ - `SCE_RELEASE_GATE_REQUIRE_EVIDENCE`: require `handoff-runs.json` summary
131
+ - `SCE_RELEASE_GATE_REQUIRE_GATE_PASS`: require evidence gate `passed=true` (default true when evidence exists)
132
+ - `SCE_RELEASE_GATE_MIN_SPEC_SUCCESS_RATE`: minimum allowed success rate percent
133
+ - `SCE_RELEASE_GATE_MAX_RISK_LEVEL`: `low|medium|high|unknown` (default `unknown`)
134
+ - `SCE_RELEASE_GATE_MAX_UNMAPPED_RULES`: maximum allowed unmapped ontology business rules
135
+ - `SCE_RELEASE_GATE_MAX_UNDECIDED_DECISIONS`: maximum allowed undecided ontology decisions
136
+ - `SCE_RELEASE_GATE_REQUIRE_SCENE_BATCH_PASS`: require scene package publish-batch gate passed (`true|false`, default `true`)
137
+ - `SCE_RELEASE_GATE_MAX_SCENE_BATCH_FAILURES`: maximum allowed scene package batch failure count (default `0`)
131
138
  - Optional: tune release drift alerts in release notes:
132
139
  - Drift evaluation is executed by `scripts/release-drift-evaluate.js` in CI (history load, alert calc, gate report writeback, enforce exit code).
133
- - `KSE_RELEASE_DRIFT_ENFORCE`: `true|false` (default `false`), block publish when drift alerts are triggered
134
- - `KSE_RELEASE_DRIFT_FAIL_STREAK_MIN`: minimum consecutive failed gates to trigger alert (default `2`)
135
- - `KSE_RELEASE_DRIFT_HIGH_RISK_SHARE_MIN_PERCENT`: minimum high-risk share in latest 5 versions (default `60`)
136
- - `KSE_RELEASE_DRIFT_HIGH_RISK_SHARE_DELTA_MIN_PERCENT`: minimum short-vs-long high-risk share delta (default `25`)
137
- - `KSE_RELEASE_DRIFT_PREFLIGHT_BLOCK_RATE_MIN_PERCENT`: minimum release preflight blocked rate in latest 5 known runs (default `40`)
138
- - `KSE_RELEASE_DRIFT_HARD_GATE_BLOCK_STREAK_MIN`: minimum consecutive hard-gate preflight blocked streak (latest window, default `2`)
139
- - `KSE_RELEASE_DRIFT_PREFLIGHT_UNAVAILABLE_STREAK_MIN`: minimum consecutive release preflight unavailable streak (latest window, default `2`)
140
+ - `SCE_RELEASE_DRIFT_ENFORCE`: `true|false` (default `false`), block publish when drift alerts are triggered
141
+ - `SCE_RELEASE_DRIFT_FAIL_STREAK_MIN`: minimum consecutive failed gates to trigger alert (default `2`)
142
+ - `SCE_RELEASE_DRIFT_HIGH_RISK_SHARE_MIN_PERCENT`: minimum high-risk share in latest 5 versions (default `60`)
143
+ - `SCE_RELEASE_DRIFT_HIGH_RISK_SHARE_DELTA_MIN_PERCENT`: minimum short-vs-long high-risk share delta (default `25`)
144
+ - `SCE_RELEASE_DRIFT_PREFLIGHT_BLOCK_RATE_MIN_PERCENT`: minimum release preflight blocked rate in latest 5 known runs (default `40`)
145
+ - `SCE_RELEASE_DRIFT_HARD_GATE_BLOCK_STREAK_MIN`: minimum consecutive hard-gate preflight blocked streak (latest window, default `2`)
146
+ - `SCE_RELEASE_DRIFT_PREFLIGHT_UNAVAILABLE_STREAK_MIN`: minimum consecutive release preflight unavailable streak (latest window, default `2`)
140
147
  - Optional: tune weekly ops release gate:
141
- - `KSE_RELEASE_WEEKLY_OPS_ENFORCE`: `true|false` (default `true`)
142
- - `KSE_RELEASE_WEEKLY_OPS_REQUIRE_SUMMARY`: require weekly summary artifact (`true|false`, default `true`)
143
- - `KSE_RELEASE_WEEKLY_OPS_MAX_RISK_LEVEL`: `low|medium|high|unknown` (default `medium`)
144
- - `KSE_RELEASE_WEEKLY_OPS_MAX_GOVERNANCE_BREACHES`: optional max breach count
145
- - `KSE_RELEASE_WEEKLY_OPS_MAX_AUTHORIZATION_TIER_BLOCK_RATE_PERCENT`: max authorization-tier deny/review block rate percent (default `40`)
146
- - `KSE_RELEASE_WEEKLY_OPS_MAX_DIALOGUE_AUTHORIZATION_BLOCK_RATE_PERCENT`: max dialogue-authorization block rate percent (default `40`)
147
- - `KSE_RELEASE_WEEKLY_OPS_MAX_MATRIX_REGRESSION_RATE_PERCENT`: optional max regression-positive rate percent
148
+ - `SCE_RELEASE_WEEKLY_OPS_ENFORCE`: `true|false` (default `true`)
149
+ - `SCE_RELEASE_WEEKLY_OPS_REQUIRE_SUMMARY`: require weekly summary artifact (`true|false`, default `true`)
150
+ - `SCE_RELEASE_WEEKLY_OPS_MAX_RISK_LEVEL`: `low|medium|high|unknown` (default `medium`)
151
+ - `SCE_RELEASE_WEEKLY_OPS_MAX_GOVERNANCE_BREACHES`: optional max breach count
152
+ - `SCE_RELEASE_WEEKLY_OPS_MAX_AUTHORIZATION_TIER_BLOCK_RATE_PERCENT`: max authorization-tier deny/review block rate percent (default `40`)
153
+ - `SCE_RELEASE_WEEKLY_OPS_MAX_DIALOGUE_AUTHORIZATION_BLOCK_RATE_PERCENT`: max dialogue-authorization block rate percent (default `40`)
154
+ - `SCE_RELEASE_WEEKLY_OPS_MAX_MATRIX_REGRESSION_RATE_PERCENT`: optional max regression-positive rate percent
148
155
  - Invalid numeric values are reported as gate `config_warnings` and default threshold fallback is applied.
149
156
  - Optional: tune release asset integrity gate:
150
- - `KSE_RELEASE_ASSET_INTEGRITY_ENFORCE`: `true|false` (default `true`)
151
- - `KSE_RELEASE_ASSET_INTEGRITY_REQUIRE_NON_EMPTY`: `true|false` (default `true`)
152
- - `KSE_RELEASE_ASSET_INTEGRITY_REQUIRED_FILES`: override required asset list (comma-separated, supports `{tag}`)
157
+ - `SCE_RELEASE_ASSET_INTEGRITY_ENFORCE`: `true|false` (default `true`)
158
+ - `SCE_RELEASE_ASSET_INTEGRITY_REQUIRE_NON_EMPTY`: `true|false` (default `true`)
159
+ - `SCE_RELEASE_ASSET_INTEGRITY_REQUIRED_FILES`: override required asset list (comma-separated, supports `{tag}`)
153
160
  - Optional release-asset 0-byte guard (enabled in workflow by default):
154
161
  - `scripts/release-asset-nonempty-normalize.js` auto-fills placeholder content for optional assets such as `.lines` and `.jsonl` before GitHub Release upload.
155
162
  - Local dry-run example:
@@ -159,4 +166,20 @@ Ensure:
159
166
  - Optional local dry-run for gate history index artifact:
160
167
  - `sce auto handoff gate-index --dir .sce/reports/release-evidence --out .sce/reports/release-evidence/release-gate-history.json --json`
161
168
 
162
- Then proceed with your release workflow (tag, push, npm publish, GitHub release).
169
+ Then proceed with your release workflow:
170
+
171
+ ```bash
172
+ # 1. bump version + commit first
173
+ # 2. push branch changes
174
+ git push origin main
175
+
176
+ # 3. create and push release tag
177
+ git tag vX.Y.Z
178
+ git push origin vX.Y.Z
179
+ ```
180
+
181
+ Expected:
182
+
183
+ - `git push origin main` only runs normal CI.
184
+ - `git push origin vX.Y.Z` triggers GitHub Actions `Release` workflow.
185
+ - workflow publishes npm package and creates GitHub Release if all release gates pass.
@@ -9,6 +9,7 @@ This directory stores release-facing documents:
9
9
  ## Archived Versions
10
10
 
11
11
  - [Release checklist](../release-checklist.md)
12
+ - [v3.6.37 release notes](./v3.6.37.md)
12
13
  - [v1.46.2 release notes](./v1.46.2.md) (historical)
13
14
  - [v1.46.2 validation report](./v1.46.2-validation.md) (historical)
14
15
  - [GitHub Releases](https://github.com/heguangyong/scene-capability-engine/releases) (latest)
@@ -0,0 +1,22 @@
1
+ # v3.6.37 Release Notes
2
+
3
+ Release date: 2026-03-12
4
+
5
+ ## Highlights
6
+
7
+ - Removed legacy `kse` command/content references from active runtime paths, templates, fixtures, and release-facing documentation without keeping a compatibility bridge.
8
+ - Standardized scene package/template metadata and fixture paths on `sce` naming so generated artifacts no longer leak old `kse` identifiers.
9
+ - Fixed Windows release preflight for `scripts/git-managed-gate.js` by adding `git.cmd` / `git.exe` fallback resolution.
10
+ - Documented the actual release trigger model: only `v*` tag pushes trigger GitHub Actions release publishing, and workflow publishing depends on repository secret `NPM_TOKEN`.
11
+
12
+ ## Verification
13
+
14
+ - `npx jest tests/unit/workspace/workspace-context-resolver.test.js tests/unit/workspace/workspace-state-manager.test.js tests/unit/steering/compliance-cache.test.js tests/unit/scripts/moqui-lexicon-audit.test.js tests/unit/scripts/moqui-standard-rebuild.test.js tests/unit/scripts/moqui-metadata-extract.test.js tests/unit/task/task-claimer.test.js tests/unit/commands/auto.test.js tests/integration/auto-close-loop-cli.integration.test.js --runInBand`
15
+ - `node scripts/check-branding-consistency.js`
16
+ - `npx jest tests/unit/scripts/git-managed-gate.test.js --runInBand`
17
+
18
+ ## Release Notes
19
+
20
+ - Plain `git push` does not publish this project.
21
+ - Release automation starts only when `git push origin vX.Y.Z` triggers `.github/workflows/release.yml`.
22
+ - GitHub Actions publish requires repository secret `NPM_TOKEN`.
@@ -64,14 +64,14 @@ Detect existing steering files
64
64
 
65
65
  └─ Steering files found → Prompt for strategy
66
66
 
67
- ├─ use-kse → Backup existing → Install sce steering
67
+ ├─ use-sce → Backup existing → Install sce steering
68
68
 
69
69
  └─ use-project → Keep existing → Skip sce steering
70
70
  ```
71
71
 
72
72
  ## Rollback
73
73
 
74
- If you chose "use-kse" and want to restore your original steering files:
74
+ If you chose "use-sce" and want to restore your original steering files:
75
75
 
76
76
  ```bash
77
77
  # List available backups
@@ -100,7 +100,7 @@ Your steering strategy choice is saved in `.sce/adoption-config.json`:
100
100
  {
101
101
  "version": "1.0.0",
102
102
  "adoptedAt": "2026-01-23T10:00:00.000Z",
103
- "steeringStrategy": "use-kse",
103
+ "steeringStrategy": "use-sce",
104
104
  "steeringBackupId": "steering-2026-01-23T10-00-00-000Z",
105
105
  "multiUserMode": false,
106
106
  "lastUpdated": "2026-01-23T10:00:00.000Z"
@@ -111,7 +111,7 @@ Your steering strategy choice is saved in `.sce/adoption-config.json`:
111
111
 
112
112
  ### For New sce Users
113
113
 
114
- 1. **Choose "use-kse"** to get the full experience
114
+ 1. **Choose "use-sce"** to get the full experience
115
115
  2. Review the installed steering files to understand sce workflow
116
116
  3. Customize `ENVIRONMENT.md` for your project specifics
117
117
  4. Update `CURRENT_CONTEXT.md` as you work on different Specs
@@ -123,7 +123,7 @@ Your steering strategy choice is saved in `.sce/adoption-config.json`:
123
123
  3. Consider creating a hybrid approach:
124
124
  - Keep your core steering rules
125
125
  - Add sce-specific rules in separate files
126
- - Use file naming to control load order (e.g., `00-core.md`, `10-kse.md`)
126
+ - Use file naming to control load order (e.g., `00-core.md`, `10-sce.md`)
127
127
 
128
128
  ### For Teams
129
129
 
@@ -138,13 +138,13 @@ Your steering strategy choice is saved in `.sce/adoption-config.json`:
138
138
 
139
139
  **Solution:**
140
140
  - Check which steering strategy you chose: `cat .sce/adoption-config.json`
141
- - If "use-kse", verify sce steering files are present
141
+ - If "use-sce", verify sce steering files are present
142
142
  - If "use-project", ensure your steering files are compatible with sce
143
143
 
144
144
  ### Problem: Want to switch strategies after adoption
145
145
 
146
146
  **Solution:**
147
- 1. If currently "use-kse":
147
+ 1. If currently "use-sce":
148
148
  ```bash
149
149
  sce rollback {steering-backup-id}
150
150
  ```
@@ -1045,7 +1045,7 @@ ls -la .sce/
1045
1045
 
1046
1046
  **4. Community:**
1047
1047
  - Discord: [Join our Discord](https://discord.gg/sce)
1048
- - Twitter: [@kse_dev](https://twitter.com/kse_dev)
1048
+ - Twitter: [@sce_dev](https://twitter.com/sce_dev)
1049
1049
 
1050
1050
  ### Creating a Good Issue Report
1051
1051
 
@@ -100,28 +100,35 @@ node scripts/git-managed-gate.js --fail-on-violation --json
100
100
 
101
101
  确认:
102
102
 
103
+ - 发布自动化是基于 tag,而不是普通 commit:
104
+ - `.github/workflows/release.yml` 只在 `push.tags: v*` 时触发
105
+ - 普通 `git push` 只会跑常规 CI,不会发布 npm 包,也不会创建 GitHub Release
106
+ - GitHub Actions 发版前置条件已配置:
107
+ - 仓库 Secret `NPM_TOKEN` 必须存在且有效,workflow 会用它执行 `npm publish --access public`
108
+ - workflow 的 release 资产/回读步骤依赖 `GITHUB_TOKEN`
103
109
  - `package.json` 版本号正确;
110
+ - `package.json` 版本号必须大于 npm 当前已发布版本;
104
111
  - `CHANGELOG.md` 已记录发布相关变化;
105
112
  - 发布说明草稿已就绪(如 `docs/releases/vX.Y.Z.md`)。
106
113
  - 可选:通过仓库变量配置 release evidence 门禁(`Settings -> Secrets and variables -> Actions -> Variables`):
107
- - `KSE_RELEASE_GATE_ENFORCE`:`true|false`(默认 advisory,不阻断发布)
108
- - `KSE_RELEASE_GATE_REQUIRE_EVIDENCE`:是否要求存在 `handoff-runs.json` 摘要
109
- - `KSE_RELEASE_GATE_REQUIRE_GATE_PASS`:是否要求 evidence gate `passed=true`(有 evidence 时默认要求)
110
- - `KSE_RELEASE_GATE_MIN_SPEC_SUCCESS_RATE`:最小允许成功率(百分比)
111
- - `KSE_RELEASE_GATE_MAX_RISK_LEVEL`:`low|medium|high|unknown`(默认 `unknown`)
112
- - `KSE_RELEASE_GATE_MAX_UNMAPPED_RULES`:ontology 业务规则未映射最大允许值
113
- - `KSE_RELEASE_GATE_MAX_UNDECIDED_DECISIONS`:ontology 决策未定最大允许值
114
- - `KSE_RELEASE_GATE_REQUIRE_SCENE_BATCH_PASS`:是否要求 scene package publish-batch gate 必须通过(`true|false`,默认 `true`)
115
- - `KSE_RELEASE_GATE_MAX_SCENE_BATCH_FAILURES`:scene package batch 失败数量最大允许值(默认 `0`)
114
+ - `SCE_RELEASE_GATE_ENFORCE`:`true|false`(默认 advisory,不阻断发布)
115
+ - `SCE_RELEASE_GATE_REQUIRE_EVIDENCE`:是否要求存在 `handoff-runs.json` 摘要
116
+ - `SCE_RELEASE_GATE_REQUIRE_GATE_PASS`:是否要求 evidence gate `passed=true`(有 evidence 时默认要求)
117
+ - `SCE_RELEASE_GATE_MIN_SPEC_SUCCESS_RATE`:最小允许成功率(百分比)
118
+ - `SCE_RELEASE_GATE_MAX_RISK_LEVEL`:`low|medium|high|unknown`(默认 `unknown`)
119
+ - `SCE_RELEASE_GATE_MAX_UNMAPPED_RULES`:ontology 业务规则未映射最大允许值
120
+ - `SCE_RELEASE_GATE_MAX_UNDECIDED_DECISIONS`:ontology 决策未定最大允许值
121
+ - `SCE_RELEASE_GATE_REQUIRE_SCENE_BATCH_PASS`:是否要求 scene package publish-batch gate 必须通过(`true|false`,默认 `true`)
122
+ - `SCE_RELEASE_GATE_MAX_SCENE_BATCH_FAILURES`:scene package batch 失败数量最大允许值(默认 `0`)
116
123
  - 可选:通过仓库变量调节 Release Notes 中的漂移告警阈值:
117
124
  - CI 中漂移评估由 `scripts/release-drift-evaluate.js` 执行(历史读取、告警计算、gate 报告写回、enforce 退出码)。
118
- - `KSE_RELEASE_DRIFT_ENFORCE`:`true|false`(默认 `false`),触发 drift alert 时阻断发布
119
- - `KSE_RELEASE_DRIFT_FAIL_STREAK_MIN`:触发告警的最小连续失败次数(默认 `2`)
120
- - `KSE_RELEASE_DRIFT_HIGH_RISK_SHARE_MIN_PERCENT`:近 5 版 high 风险占比告警阈值(默认 `60`)
121
- - `KSE_RELEASE_DRIFT_HIGH_RISK_SHARE_DELTA_MIN_PERCENT`:短期相对长期 high 风险占比增量阈值(默认 `25`)
122
- - `KSE_RELEASE_DRIFT_PREFLIGHT_BLOCK_RATE_MIN_PERCENT`:近 5 版(有 preflight 信号)blocked 占比告警阈值(默认 `40`)
123
- - `KSE_RELEASE_DRIFT_HARD_GATE_BLOCK_STREAK_MIN`:hard-gate preflight 连续 blocked 告警阈值(最近窗口,默认 `2`)
124
- - `KSE_RELEASE_DRIFT_PREFLIGHT_UNAVAILABLE_STREAK_MIN`:release preflight 连续 unavailable 告警阈值(最近窗口,默认 `2`)
125
+ - `SCE_RELEASE_DRIFT_ENFORCE`:`true|false`(默认 `false`),触发 drift alert 时阻断发布
126
+ - `SCE_RELEASE_DRIFT_FAIL_STREAK_MIN`:触发告警的最小连续失败次数(默认 `2`)
127
+ - `SCE_RELEASE_DRIFT_HIGH_RISK_SHARE_MIN_PERCENT`:近 5 版 high 风险占比告警阈值(默认 `60`)
128
+ - `SCE_RELEASE_DRIFT_HIGH_RISK_SHARE_DELTA_MIN_PERCENT`:短期相对长期 high 风险占比增量阈值(默认 `25`)
129
+ - `SCE_RELEASE_DRIFT_PREFLIGHT_BLOCK_RATE_MIN_PERCENT`:近 5 版(有 preflight 信号)blocked 占比告警阈值(默认 `40`)
130
+ - `SCE_RELEASE_DRIFT_HARD_GATE_BLOCK_STREAK_MIN`:hard-gate preflight 连续 blocked 告警阈值(最近窗口,默认 `2`)
131
+ - `SCE_RELEASE_DRIFT_PREFLIGHT_UNAVAILABLE_STREAK_MIN`:release preflight 连续 unavailable 告警阈值(最近窗口,默认 `2`)
125
132
  - 可选:发布资产 0 字节防护(workflow 默认开启)
126
133
  - `scripts/release-asset-nonempty-normalize.js` 会在上传 GitHub Release 资产前,为可选 `.lines` / `.jsonl` 资产自动补齐占位内容,避免 422。
127
134
  - 本地 dry-run 示例:
@@ -131,4 +138,20 @@ node scripts/git-managed-gate.js --fail-on-violation --json
131
138
  - 可选本地预演 release gate 历史索引产物:
132
139
  - `sce auto handoff gate-index --dir .sce/reports/release-evidence --out .sce/reports/release-evidence/release-gate-history.json --json`
133
140
 
134
- 然后再执行你的正式发布流程(打 tag、push、npm publish、GitHub Release)。
141
+ 然后再执行正式发布流程:
142
+
143
+ ```bash
144
+ # 1. 先升级版本并提交
145
+ # 2. 先 push 分支代码
146
+ git push origin main
147
+
148
+ # 3. 再创建并 push 发版 tag
149
+ git tag vX.Y.Z
150
+ git push origin vX.Y.Z
151
+ ```
152
+
153
+ 预期:
154
+
155
+ - `git push origin main` 只跑常规 CI;
156
+ - `git push origin vX.Y.Z` 才会触发 GitHub Actions `Release` workflow;
157
+ - 只有 release workflow 全部门禁通过后,才会自动发布 npm 包并创建 GitHub Release。
@@ -9,6 +9,7 @@
9
9
  ## 历史版本归档
10
10
 
11
11
  - [发布检查清单](../release-checklist.md)
12
+ - [v3.6.37 发布说明](./v3.6.37.md)
12
13
  - [v1.46.2 发布说明](./v1.46.2.md)(历史归档)
13
14
  - [v1.46.2 验证报告](./v1.46.2-validation.md)(历史归档)
14
15
  - [GitHub Releases](https://github.com/heguangyong/scene-capability-engine/releases)(最新)
@@ -0,0 +1,22 @@
1
+ # v3.6.37 发布说明
2
+
3
+ 发布日期:2026-03-12
4
+
5
+ ## 重点变化
6
+
7
+ - 彻底移除了运行路径、模板、夹具和对外文档中的旧 `kse` 命令与内容,不再保留兼容桥接。
8
+ - 将 scene package / template 元数据与 fixture 路径统一到 `sce` 命名,避免新产物继续泄漏旧 `kse` 标识。
9
+ - 修复了 Windows 下 `scripts/git-managed-gate.js` 的 git 可执行文件解析问题,新增 `git.cmd` / `git.exe` 回退,避免发布前置门禁误判。
10
+ - 明确记录了真实发布方式:只有 `v*` tag push 才会触发 GitHub Actions 发版,且 workflow 发布依赖仓库 Secret `NPM_TOKEN`。
11
+
12
+ ## 验证
13
+
14
+ - `npx jest tests/unit/workspace/workspace-context-resolver.test.js tests/unit/workspace/workspace-state-manager.test.js tests/unit/steering/compliance-cache.test.js tests/unit/scripts/moqui-lexicon-audit.test.js tests/unit/scripts/moqui-standard-rebuild.test.js tests/unit/scripts/moqui-metadata-extract.test.js tests/unit/task/task-claimer.test.js tests/unit/commands/auto.test.js tests/integration/auto-close-loop-cli.integration.test.js --runInBand`
15
+ - `node scripts/check-branding-consistency.js`
16
+ - `npx jest tests/unit/scripts/git-managed-gate.test.js --runInBand`
17
+
18
+ ## 发布说明
19
+
20
+ - 普通 `git push` 不会发布本项目。
21
+ - 只有 `git push origin vX.Y.Z` 触发 `.github/workflows/release.yml` 后,才会进入自动发布流程。
22
+ - GitHub Actions 发版依赖仓库 Secret `NPM_TOKEN`。
@@ -1,4 +1,4 @@
1
- const { parseAutoHandoffGateBoolean, normalizeHandoffText } = require('./governance-signals');
1
+ const { parseAutoHandoffGateBoolean, normalizeHandoffText } = require('./governance-signals');
2
2
  const { buildMoquiRegressionRecoverySequenceLines } = require('./moqui-recovery-sequence');
3
3
 
4
4
  function deriveGovernanceRiskLevel(summary) {
@@ -575,7 +575,7 @@ function buildGovernanceRecommendations(summary) {
575
575
  }
576
576
  if (Number.isFinite(weeklyOpsConfigWarningsTotal) && weeklyOpsConfigWarningsTotal > 0) {
577
577
  recommendations.push(
578
- 'Fix invalid weekly ops threshold variables (`KSE_RELEASE_WEEKLY_OPS_*`) and rerun release gates ' +
578
+ 'Fix invalid weekly ops threshold variables (`SCE_RELEASE_WEEKLY_OPS_*`) and rerun release gates ' +
579
579
  'to clear config warnings.'
580
580
  );
581
581
  }
@@ -449,7 +449,7 @@ async function adoptInteractive(projectPath, options) {
449
449
  // Prompt for strategy
450
450
  steeringStrategy = await steeringManager.promptStrategy(detection.steeringDetection);
451
451
 
452
- if (steeringStrategy === 'use-kse') {
452
+ if (steeringStrategy === 'use-sce') {
453
453
  // Backup existing steering files
454
454
  console.log(chalk.blue('📦 Backing up existing steering files...'));
455
455
  const backupResult = await steeringManager.backupSteering(projectPath);
@@ -460,7 +460,7 @@ async function adoptInteractive(projectPath, options) {
460
460
 
461
461
  // Install sce steering files
462
462
  console.log(chalk.blue('📝 Installing sce steering files...'));
463
- const installResult = await steeringManager.installKseSteering(projectPath);
463
+ const installResult = await steeringManager.installSceSteering(projectPath);
464
464
 
465
465
  if (installResult.success) {
466
466
  console.log(chalk.green(`✅ Installed ${installResult.filesInstalled} sce steering file(s)`));
@@ -711,7 +711,7 @@ async function adoptInteractive(projectPath, options) {
711
711
  *
712
712
  * @param {string} projectPath - Project root path
713
713
  */
714
- async function setupKiroMcpConfig(projectPath) {
714
+ async function setupSceMcpConfig(projectPath) {
715
715
  const mcpConfigPath = path.join(projectPath, '.sce', 'settings', 'mcp.json');
716
716
 
717
717
  // Don't overwrite existing config
@@ -767,7 +767,7 @@ async function offerAutomationSetup(projectPath) {
767
767
 
768
768
  // If AI IDE detected, create default MCP settings
769
769
  if (toolDetection.primaryTool === 'SCE') {
770
- await setupKiroMcpConfig(projectPath);
770
+ await setupSceMcpConfig(projectPath);
771
771
  }
772
772
  } catch (toolError) {
773
773
  // Tool detection is optional, don't fail adoption if it errors
@@ -1,4 +1,4 @@
1
- /**
1
+ /**
2
2
  * Autonomous Control CLI Commands
3
3
  */
4
4
 
@@ -8615,7 +8615,7 @@ function buildAutoHandoffRunRecommendations(projectPath, result) {
8615
8615
  observabilityWeeklyOps.config_warning_positive_sessions > 0
8616
8616
  ) {
8617
8617
  push(
8618
- 'Fix invalid weekly ops threshold variables (`KSE_RELEASE_WEEKLY_OPS_*`) and rerun release gates ' +
8618
+ 'Fix invalid weekly ops threshold variables (`SCE_RELEASE_WEEKLY_OPS_*`) and rerun release gates ' +
8619
8619
  'to clear config warnings.'
8620
8620
  );
8621
8621
  }
@@ -13073,7 +13073,7 @@ function buildGovernanceCloseLoopRecommendations(finalAssessment, stopReason, st
13073
13073
  }
13074
13074
  if (reasons.some(item => `${item}`.includes('weekly-ops-config-warnings'))) {
13075
13075
  base.push(
13076
- 'Fix invalid weekly ops threshold variables (`KSE_RELEASE_WEEKLY_OPS_*`) and rerun release gates ' +
13076
+ 'Fix invalid weekly ops threshold variables (`SCE_RELEASE_WEEKLY_OPS_*`) and rerun release gates ' +
13077
13077
  'to clear config warnings.'
13078
13078
  );
13079
13079
  }
@@ -35,7 +35,7 @@ class ContextCollector {
35
35
  }
36
36
 
37
37
  _detectLanguagePreference() {
38
- const lang = `${process.env.KSE_LANG || process.env.LANG || ''}`.toLowerCase();
38
+ const lang = `${process.env.SCE_LANG || process.env.LANG || ''}`.toLowerCase();
39
39
  if (lang.includes('zh')) {
40
40
  return 'zh';
41
41
  }
@@ -60,7 +60,7 @@ class AdoptionConfig {
60
60
  /**
61
61
  * 更新 steering 策略配置
62
62
  *
63
- * @param {string} strategy - 策略 ('use-kse' | 'use-project')
63
+ * @param {string} strategy - 策略 ('use-sce' | 'use-project')
64
64
  * @param {string|null} backupId - 备份 ID(如果有)
65
65
  * @returns {Promise<boolean>} 是否成功
66
66
  */
@@ -152,7 +152,7 @@ class AdoptionConfig {
152
152
  const config = {
153
153
  version: '1.0.0',
154
154
  adoptedAt: new Date().toISOString(),
155
- steeringStrategy: options.steeringStrategy || 'use-kse',
155
+ steeringStrategy: options.steeringStrategy || 'use-sce',
156
156
  multiUserMode: options.multiUserMode || false,
157
157
  ...options
158
158
  };
@@ -21,11 +21,11 @@ class ComplianceCache {
21
21
  /**
22
22
  * Get the default cache file path
23
23
  *
24
- * @returns {string} Path to ~/.kse/steering-check-cache.json
24
+ * @returns {string} Path to ~/.sce/steering-check-cache.json
25
25
  */
26
26
  getDefaultCachePath() {
27
27
  const homeDir = os.homedir();
28
- return path.join(homeDir, '.kse', 'steering-check-cache.json');
28
+ return path.join(homeDir, '.sce', 'steering-check-cache.json');
29
29
  }
30
30
 
31
31
  /**
@@ -65,12 +65,12 @@ class SteeringManager {
65
65
  * 提示用户选择 steering 策略
66
66
  *
67
67
  * @param {Object} detection - detectSteering 的返回结果
68
- * @returns {Promise<string>} 选择的策略 ('use-kse' | 'use-project')
68
+ * @returns {Promise<string>} 选择的策略 ('use-sce' | 'use-project')
69
69
  */
70
70
  async promptStrategy(detection) {
71
71
  if (!detection.hasExistingSteering) {
72
72
  // 没有现有 steering 文件,默认使用 sce
73
- return 'use-kse';
73
+ return 'use-sce';
74
74
  }
75
75
 
76
76
  console.log('\n⚠️ Steering Conflict Detected');
@@ -94,7 +94,7 @@ class SteeringManager {
94
94
  choices: [
95
95
  {
96
96
  name: 'Use sce steering (backup existing files) - Recommended for new sce users',
97
- value: 'use-kse'
97
+ value: 'use-sce'
98
98
  },
99
99
  {
100
100
  name: 'Keep existing steering (skip sce steering) - For projects with custom steering rules',
@@ -167,7 +167,7 @@ class SteeringManager {
167
167
  * @param {string} projectPath - 项目根目录路径
168
168
  * @returns {Promise<Object>} 安装结果
169
169
  */
170
- async installKseSteering(projectPath) {
170
+ async installSceSteering(projectPath) {
171
171
  const steeringPath = path.join(projectPath, this.steeringDir);
172
172
  const templatePath = path.join(__dirname, '../../template/.sce/steering');
173
173
 
@@ -97,8 +97,7 @@ class TaskClaimer {
97
97
  return [];
98
98
  }
99
99
 
100
- // Accept both legacy and current section headers to keep existing specs readable.
101
- const markerHeaderRegex = /^\s*##\s+(?:(?:sce|kse)\s+)?Status\s+Markers\s*$/i;
100
+ const markerHeaderRegex = /^\s*##\s+(?:sce\s+)?Status\s+Markers\s*$/i;
102
101
  const sectionHeaderRegex = /^\s*##\s+/;
103
102
 
104
103
  const markerLine = lines.findIndex((line) => markerHeaderRegex.test(String(line || '')));
@@ -92,7 +92,7 @@ class WorkspaceContextResolver {
92
92
  * @param {string} dirPath - Directory path to check
93
93
  * @returns {Promise<boolean>} True if directory contains .sce/ structure
94
94
  */
95
- async isValidKseDirectory(dirPath) {
95
+ async isValidSceDirectory(dirPath) {
96
96
  try {
97
97
  const kiroPath = path.join(dirPath, '.sce');
98
98
  const exists = await fs.pathExists(kiroPath);
@@ -184,7 +184,7 @@ class WorkspaceContextResolver {
184
184
  const targetDir = currentDir || process.cwd();
185
185
 
186
186
  // Check if it's a valid sce directory
187
- const isValid = await this.isValidKseDirectory(targetDir);
187
+ const isValid = await this.isValidSceDirectory(targetDir);
188
188
  if (!isValid) {
189
189
  return false;
190
190
  }
@@ -210,7 +210,7 @@ class WorkspaceContextResolver {
210
210
 
211
211
  if (!workspace) {
212
212
  const targetDir = currentDir || process.cwd();
213
- const isValid = await this.isValidKseDirectory(targetDir);
213
+ const isValid = await this.isValidSceDirectory(targetDir);
214
214
 
215
215
  if (isValid) {
216
216
  throw new Error(
@@ -48,62 +48,20 @@ class WorkspaceStateManager {
48
48
  return path.join(homeDir, '.sce', 'workspace-state.json');
49
49
  }
50
50
 
51
- /**
52
- * Get the legacy state file path used by prior versions
53
- *
54
- * @returns {string} Path to ~/.kse/workspace-state.json
55
- */
56
- getLegacyStatePath() {
57
- const homeDir = os.homedir();
58
- return path.join(homeDir, '.kse', 'workspace-state.json');
59
- }
60
-
61
- /**
62
- * Whether state manager is operating on the default state path.
63
- *
64
- * Automatic legacy migration should only run in this mode.
65
- *
66
- * @returns {boolean}
67
- */
68
- isDefaultStatePath() {
69
- return path.resolve(this.statePath) === path.resolve(this.getDefaultStatePath());
70
- }
71
-
72
51
  /**
73
52
  * Load workspace state from disk
74
53
  *
75
- * Supports automatic migration from legacy format (workspaces.json + config.json)
76
- *
77
54
  * @returns {Promise<boolean>} True if loaded successfully
78
55
  */
79
56
  async load() {
80
57
  try {
81
- // Try loading new format
82
58
  const exists = await fs.pathExists(this.statePath);
83
-
84
59
  if (exists) {
85
60
  await this.loadNewFormat();
86
61
  this.loaded = true;
87
62
  return true;
88
63
  }
89
64
 
90
- // Migrate legacy single-file state from ~/.kse/workspace-state.json
91
- if (await this.hasLegacyStateFile()) {
92
- console.log('Migrating workspace state to new .sce directory...');
93
- await this.migrateFromLegacyStateFile();
94
- await this.loadNewFormat();
95
- this.loaded = true;
96
- return true;
97
- }
98
-
99
- // Check for legacy format and migrate
100
- if (await this.hasLegacyFiles()) {
101
- console.log('Migrating workspace configuration to new format...');
102
- await this.migrateFromLegacy();
103
- this.loaded = true;
104
- return true;
105
- }
106
-
107
65
  // Initialize empty state
108
66
  this.state = {
109
67
  version: '1.0',
@@ -160,128 +118,6 @@ class WorkspaceStateManager {
160
118
  };
161
119
  }
162
120
 
163
- /**
164
- * Check if legacy configuration files exist
165
- *
166
- * @private
167
- * @returns {Promise<boolean>}
168
- */
169
- async hasLegacyFiles() {
170
- if (!this.isDefaultStatePath()) {
171
- return false;
172
- }
173
-
174
- const homeDir = os.homedir();
175
- const legacyWorkspacesPath = path.join(homeDir, '.kse', 'workspaces.json');
176
- const legacyConfigPath = path.join(homeDir, '.kse', 'config.json');
177
-
178
- const workspacesExists = await fs.pathExists(legacyWorkspacesPath);
179
- const configExists = await fs.pathExists(legacyConfigPath);
180
-
181
- return workspacesExists || configExists;
182
- }
183
-
184
- /**
185
- * Check whether legacy single-file state exists
186
- *
187
- * @private
188
- * @returns {Promise<boolean>}
189
- */
190
- async hasLegacyStateFile() {
191
- if (!this.isDefaultStatePath()) {
192
- return false;
193
- }
194
-
195
- const legacyStatePath = this.getLegacyStatePath();
196
- return fs.pathExists(legacyStatePath);
197
- }
198
-
199
- /**
200
- * Copy legacy single-file state into the new default location.
201
- *
202
- * @private
203
- * @returns {Promise<void>}
204
- */
205
- async migrateFromLegacyStateFile() {
206
- const legacyStatePath = this.getLegacyStatePath();
207
- const stateDir = path.dirname(this.statePath);
208
- await fs.ensureDir(stateDir);
209
- await fs.copy(legacyStatePath, this.statePath);
210
- }
211
-
212
- /**
213
- * Migrate from legacy format (workspaces.json + config.json)
214
- *
215
- * @private
216
- */
217
- async migrateFromLegacy() {
218
- const homeDir = os.homedir();
219
- const legacyWorkspacesPath = path.join(homeDir, '.kse', 'workspaces.json');
220
- const legacyConfigPath = path.join(homeDir, '.kse', 'config.json');
221
-
222
- // Load legacy workspaces
223
- let legacyWorkspaces = [];
224
- if (await fs.pathExists(legacyWorkspacesPath)) {
225
- const content = await fs.readFile(legacyWorkspacesPath, 'utf8');
226
- const data = JSON.parse(content);
227
- legacyWorkspaces = data.workspaces || [];
228
- }
229
-
230
- // Load legacy config
231
- let legacyActiveWorkspace = null;
232
- let legacyPreferences = {};
233
- if (await fs.pathExists(legacyConfigPath)) {
234
- const content = await fs.readFile(legacyConfigPath, 'utf8');
235
- const data = JSON.parse(content);
236
- legacyActiveWorkspace = data.active_workspace || null;
237
- legacyPreferences = data.preferences || {};
238
- }
239
-
240
- // Merge into new format
241
- this.state.activeWorkspace = legacyActiveWorkspace;
242
- this.state.workspaces = new Map();
243
-
244
- for (const workspaceData of legacyWorkspaces) {
245
- const workspace = Workspace.fromDict(workspaceData);
246
- this.state.workspaces.set(workspace.name, workspace);
247
- }
248
-
249
- this.state.preferences = {
250
- autoDetectWorkspace: legacyPreferences.auto_detect_workspace ?? true,
251
- confirmDestructiveOperations: legacyPreferences.confirm_destructive_operations ?? true
252
- };
253
-
254
- // Save to new format
255
- await this.save();
256
-
257
- // Backup legacy files
258
- await this.backupLegacyFiles();
259
- }
260
-
261
- /**
262
- * Backup legacy configuration files
263
- *
264
- * @private
265
- */
266
- async backupLegacyFiles() {
267
- const homeDir = os.homedir();
268
- const legacyWorkspacesPath = path.join(homeDir, '.kse', 'workspaces.json');
269
- const legacyConfigPath = path.join(homeDir, '.kse', 'config.json');
270
- const timestamp = new Date().toISOString().replace(/[:.]/g, '-');
271
-
272
- if (await fs.pathExists(legacyWorkspacesPath)) {
273
- const backupPath = path.join(homeDir, '.kse', `workspaces.json.backup-${timestamp}`);
274
- await fs.copy(legacyWorkspacesPath, backupPath);
275
- await fs.remove(legacyWorkspacesPath);
276
- }
277
-
278
- if (await fs.pathExists(legacyConfigPath)) {
279
- const backupPath = path.join(homeDir, '.kse', `config.json.backup-${timestamp}`);
280
- await fs.copy(legacyConfigPath, backupPath);
281
- await fs.remove(legacyConfigPath);
282
- }
283
- }
284
-
285
121
  /**
286
122
  * Save workspace state to disk (atomic operation)
287
123
  *
@@ -4,7 +4,7 @@ const FIXTURE_ROOT = 'tests/fixtures/moqui-core-regression/workspace/.sce';
4
4
  const REQUIRED_TRACKED_FILES = [
5
5
  `${FIXTURE_ROOT}/specs/60-10-moqui-core-order-query/custom/scene-package.json`,
6
6
  `${FIXTURE_ROOT}/specs/60-10-moqui-core-order-query/custom/scene.yaml`,
7
- `${FIXTURE_ROOT}/templates/scene-packages/kse.scene--erp-order-query-read--0.1.0/scene-package.json`,
7
+ `${FIXTURE_ROOT}/templates/scene-packages/sce.scene--erp-order-query-read--0.1.0/scene-package.json`,
8
8
  ];
9
9
  const DISALLOWED_TRACKED_PREFIXES = [
10
10
  `${FIXTURE_ROOT}/reports/`,
@@ -303,7 +303,7 @@ function _buildAdoptionConfig(existing, nowIso, sceVersion) {
303
303
  adoptedAt,
304
304
  steeringStrategy: typeof base.steeringStrategy === 'string' && base.steeringStrategy.trim()
305
305
  ? base.steeringStrategy
306
- : 'use-kse',
306
+ : 'use-sce',
307
307
  multiUserMode: base.multiUserMode === true,
308
308
  runtimePolicy: {
309
309
  agent_parity_permissions: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scene-capability-engine",
3
- "version": "3.6.36",
3
+ "version": "3.6.37",
4
4
  "description": "SCE (Scene Capability Engine) - A CLI tool and npm package for spec-driven development with AI coding assistants.",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -45,7 +45,7 @@ This project uses **Spec-driven development** - a structured approach where:
45
45
 
46
46
  ### Workspace Management
47
47
  - `sce workspace create/list/switch/info/remove` — Manage multiple sce projects
48
- - Global state: `~/.kse/workspace-state.json`
48
+ - Global state: `~/.sce/workspace-state.json`
49
49
 
50
50
  ### Environment Configuration
51
51
  - `sce env list/switch/info/register/unregister/rollback/verify/run` — Multi-environment management
@@ -16,7 +16,7 @@
16
16
 
17
17
  ## ⚠️ 核心原则
18
18
 
19
- ### 0. KSE 项目接管声明 🎯
19
+ ### 0. SCE 项目接管声明 🎯
20
20
 
21
21
  **核心**: 项目已由 sce 接管,AI 拥有完全开发和管理权限
22
22
 
package/bin/kse.js DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- require('./scene-capability-engine');