ai-native-core 0.2.2 → 0.2.3

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.
@@ -33,8 +33,10 @@
33
33
 
34
34
  ## SDD 流程(不可变)
35
35
 
36
+ - 完整流程:explore(复杂需求推荐)→ propose → confirm → apply
36
37
  - 禁止跳过 spec 阶段直接写实现代码
37
38
  - 禁止 design.md 缺少 ASCII 页面骨架图
39
+ - 复杂需求(新模块、架构变更)应先 explore 再 propose,禁止跳过 explore 直接 propose
38
40
 
39
41
  ## 技术栈一致性(不可变)
40
42
 
@@ -106,9 +106,14 @@ paradigm_detection = true
106
106
  # SDD 门禁(Spec-Driven Development)
107
107
  # =============================================================================
108
108
  [sdd]
109
+ # 完整流程:explore(可选)→ propose → confirm → apply
109
110
  # 是否强制 spec-before-code
110
111
  enforced = true
111
112
 
113
+ # 复杂需求是否推荐先 explore(探索需求、澄清边界)
114
+ # 设为 true 时,AI 会在 propose 前主动建议 explore
115
+ recommend_explore = true
116
+
112
117
  # 是否要求 design.md 包含 ASCII wireframe
113
118
  require_ascii_wireframe = true
114
119
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-native-core",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "让任何项目拥有 AI Native 开发能力的运行时框架",
5
5
  "keywords": [
6
6
  "ai-native",
@@ -32,6 +32,21 @@ function run(args) {
32
32
  return { pass: fs.existsSync(p), detail: fs.existsSync(p) ? 'initialized' : 'NOT INITIALIZED' };
33
33
  }, results);
34
34
 
35
+ // Phase 1.5 — SDD check
36
+ const sddTool = config.sdd?.tool || config.ai_tools?.sdd_tool;
37
+ if (sddTool && sddTool !== 'none') {
38
+ console.log('Phase 1.5 — SDD 门禁');
39
+ check('sdd-tool-configured', () => {
40
+ const dir = path.join(root, 'openspec', 'changes');
41
+ const ok = fs.existsSync(dir) && fs.readdirSync(dir).length > 0;
42
+ return { pass: ok || sddTool !== 'openspec', detail: sddTool + (ok ? ' ✓' : ' (spec 目录为空)') };
43
+ }, results);
44
+ check('sdd-gate', () => {
45
+ const enforced = config.sdd?.enforced !== false;
46
+ return { pass: enforced, detail: enforced ? 'enforced' : '⚠ disabled' };
47
+ }, results);
48
+ }
49
+
35
50
  // Phase 2
36
51
  console.log('Phase 2 — 代码质量');
37
52
  check('lint', () => tryExec('pnpm lint || npm run lint || true', root), results);