scene-capability-engine 3.3.23 → 3.3.25

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.
@@ -1,6 +1,7 @@
1
1
  const fs = require('fs-extra');
2
2
  const path = require('path');
3
3
  const docsCommand = require('../../commands/docs');
4
+ const { validateSpecDomainArtifacts } = require('../../spec/domain-modeling');
4
5
 
5
6
  function createDefaultRules(projectPath = process.cwd()) {
6
7
  return [
@@ -75,6 +76,13 @@ function createDefaultRules(projectPath = process.cwd()) {
75
76
  };
76
77
  }
77
78
  },
79
+ {
80
+ id: 'domain_scene_modeling',
81
+ description: 'Verify mandatory problem-domain mind map and scene-spec artifacts',
82
+ async execute(context) {
83
+ return validateSpecDomainArtifacts(projectPath, context.specId, fs);
84
+ }
85
+ },
78
86
  {
79
87
  id: 'config_consistency',
80
88
  description: 'Verify project-level sce config baseline exists',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scene-capability-engine",
3
- "version": "3.3.23",
3
+ "version": "3.3.25",
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": {
@@ -69,11 +69,12 @@
69
69
  "report:release-ops-weekly": "node scripts/release-ops-weekly-summary.js --json",
70
70
  "gate:release-ops-weekly": "node scripts/release-weekly-ops-gate.js",
71
71
  "gate:errorbook-release": "node scripts/errorbook-release-gate.js --fail-on-block",
72
+ "gate:errorbook-registry-health": "node scripts/errorbook-registry-health-gate.js",
72
73
  "gate:git-managed": "node scripts/git-managed-gate.js --fail-on-violation",
73
74
  "gate:release-asset-integrity": "node scripts/release-asset-integrity-check.js",
74
75
  "report:release-risk-remediation": "node scripts/release-risk-remediation-bundle.js --json",
75
76
  "report:moqui-core-regression": "node scripts/moqui-core-regression-suite.js --json",
76
- "prepublishOnly": "npm run test:full && npm run test:skip-audit && npm run test:sce-tracking && npm run test:brand-consistency && npm run gate:git-managed && npm run gate:errorbook-release && npm run report:interactive-governance -- --fail-on-alert",
77
+ "prepublishOnly": "npm run test:full && npm run test:skip-audit && npm run test:sce-tracking && npm run test:brand-consistency && npm run gate:git-managed && npm run gate:errorbook-registry-health && npm run gate:errorbook-release && npm run report:interactive-governance -- --fail-on-alert",
77
78
  "publish:manual": "npm publish --access public",
78
79
  "install-global": "npm install -g .",
79
80
  "uninstall-global": "npm uninstall -g scene-capability-engine"
@@ -72,6 +72,17 @@
72
72
 
73
73
  **目标**: 用户说"开始执行 Spec XX",AI 自主完成所有任务交付功能
74
74
 
75
+ ### 4.2 强制默认自主推进(无二次确认)⚡
76
+
77
+ **核心**: 默认执行策略必须是“自主闭环推进”,不是“每步等待确认”
78
+
79
+ **默认行为**:
80
+ 1) 接到任务后直接进入:分析 → 修改 → 测试 → 修复 → 提交 → 推送(若已配置远端)
81
+ 2) 非阻断性问题(可自行定位/修复)不得暂停等待用户二次确认
82
+ 3) 仅在以下情况允许中断并请求用户介入:外部权限缺失、不可恢复致命错误、生产高风险变更、业务目标冲突
83
+
84
+ **强制要求**: 不得以“先等你确认再继续”替代执行;未形成可验证结果前不得提前结束
85
+
75
86
  ### 5. 上下文管控
76
87
 
77
88
  **主动管控避免 token 耗尽**
@@ -158,6 +169,8 @@
158
169
 
159
170
  **复杂问题定位方法**: 优先使用 debug 日志与可观测信号定位(输入、输出、关键分支、异常栈、上下文参数),先还原执行路径再下结论
160
171
 
172
+ **两轮失败强制调试规则**: 同一问题连续 2 轮修复仍未达到目标验证(测试/门禁/验收)时,必须切换到 debug 定位模式;先补充结构化 debug 日志与关键观测点,复现并固化失败证据,再进入第 3 轮修复。❌ 禁止在未接入调试证据前继续盲改
173
+
161
174
  **修复后清理要求**: 问题修复并验证通过后,必须清理临时 debug 日志、临时埋点、一次性脚本和调试开关;需要长期保留的日志必须转为可配置观测项且默认关闭
162
175
 
163
176
  **允许的临时措施**: 仅在生产止血场景可临时绕行,但必须同时给出根因修复任务、回滚条件和截止时间
@@ -189,6 +202,22 @@
189
202
 
190
203
  **目标**: 保证跨 Agent 连续性、可追溯历史、上下文可控,避免因 Agent session 长短差异导致上下文漂移
191
204
 
205
+ ### 14. 问题域思维导图 + 场景化 Spec 强制原则 🧠
206
+
207
+ **核心**: Spec 推进必须先完成“问题域思维导图”与“场景化 Spec 契约”,再进入实现与修复闭环
208
+
209
+ **硬规则**:
210
+ 1) 每个 Spec 必须具备:
211
+ - `.sce/specs/<spec>/custom/problem-domain-map.md`
212
+ - `.sce/specs/<spec>/custom/scene-spec.md`
213
+ - `.sce/specs/<spec>/custom/problem-domain-chain.json`
214
+ 2) `problem-domain-map` 必须包含:Root Problem、Mind Map、Layered Exploration Chain、Correction Loop
215
+ 3) `scene-spec` 必须包含:Scene Definition、Ontology Coverage、Decision & Execution Path、Acceptance & Gate
216
+ 4) `problem-domain-chain.json` 必须包含可机读思维链:problem/ontology/hypotheses/risks/decision_execution_path/correction_loop/verification
217
+ 5) 默认门禁强制校验上述结构,缺失即 `no-go`
218
+
219
+ **目标**: 用全局问题域视角 + 场景契约约束,减少方向性错误与盲改,提升纠偏效率
220
+
192
221
  ---
193
222
 
194
- v18.0 | 2026-02-27 | 强化根因修复与临时兜底发布门禁原则
223
+ v21.0 | 2026-03-01 | 强化“强制默认自主推进(无二次确认)”执行基线