scene-capability-engine 3.4.6 → 3.5.1

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.
@@ -87,6 +87,54 @@ const PROBLEM_CLOSURE_POLICY_DEFAULTS = Object.freeze({
87
87
  }
88
88
  });
89
89
 
90
+ const STUDIO_INTAKE_POLICY_DEFAULTS = Object.freeze({
91
+ schema_version: '1.0',
92
+ enabled: true,
93
+ auto_create_spec: true,
94
+ force_spec_for_studio_plan: true,
95
+ allow_manual_spec_override: false,
96
+ prefer_existing_scene_spec: true,
97
+ related_spec_min_score: 45,
98
+ allow_new_spec_when_goal_diverges: true,
99
+ divergence_similarity_threshold: 0.2,
100
+ goal_missing_strategy: 'create_for_tracking',
101
+ question_only_patterns: [
102
+ 'how', 'what', 'why', 'when', 'where', 'which', 'can', 'could', 'should', 'would',
103
+ '是否', '怎么', '如何', '为什么', '吗', '么'
104
+ ],
105
+ change_intent_patterns: [
106
+ 'implement', 'build', 'create', 'add', 'update', 'upgrade', 'refactor', 'fix', 'stabilize',
107
+ 'optimize', 'deliver', 'release', 'bootstrap', 'repair', 'patch',
108
+ '新增', '增加', '实现', '构建', '开发', '修复', '优化', '重构', '发布', '改造', '完善', '增强'
109
+ ],
110
+ spec_id: {
111
+ prefix: 'auto',
112
+ max_goal_slug_tokens: 6
113
+ },
114
+ governance: {
115
+ auto_run_on_plan: true,
116
+ require_auto_on_plan: true,
117
+ max_active_specs_per_scene: 3,
118
+ stale_days: 14,
119
+ duplicate_similarity_threshold: 0.66
120
+ },
121
+ backfill: {
122
+ enabled: true,
123
+ active_only_default: true,
124
+ default_scene_id: 'scene.sce-core',
125
+ override_file: '.sce/spec-governance/spec-scene-overrides.json',
126
+ rules: [
127
+ { id: 'moqui-core', scene_id: 'scene.moqui-core', keywords: ['moqui'] },
128
+ { id: 'orchestration', scene_id: 'scene.sce-orchestration', keywords: ['orchestrate', 'runtime', 'controller', 'batch', 'parallel'] },
129
+ { id: 'template-registry', scene_id: 'scene.sce-template-registry', keywords: ['template', 'scene-package', 'registry', 'catalog', 'scene-template'] },
130
+ { id: 'spec-governance', scene_id: 'scene.sce-spec-governance', keywords: ['spec', 'gate', 'ontology', 'governance', 'policy'] },
131
+ { id: 'quality', scene_id: 'scene.sce-quality', keywords: ['test', 'quality', 'stability', 'jest', 'coverage'] },
132
+ { id: 'docs', scene_id: 'scene.sce-docs', keywords: ['document', 'documentation', 'onboarding', 'guide'] },
133
+ { id: 'platform', scene_id: 'scene.sce-platform', keywords: ['adopt', 'upgrade', 'workspace', 'repo', 'environment', 'devops', 'release', 'github', 'npm'] }
134
+ ]
135
+ }
136
+ });
137
+
90
138
  const TAKEOVER_DEFAULTS = Object.freeze({
91
139
  autonomous: {
92
140
  enabled: true,
@@ -137,6 +185,30 @@ const TAKEOVER_DEFAULTS = Object.freeze({
137
185
  block_on_high_governance_alerts: true
138
186
  }
139
187
  },
188
+ studio_intake: {
189
+ enabled: true,
190
+ auto_create_spec: true,
191
+ force_spec_for_studio_plan: true,
192
+ allow_manual_spec_override: false,
193
+ prefer_existing_scene_spec: true,
194
+ related_spec_min_score: 45,
195
+ allow_new_spec_when_goal_diverges: true,
196
+ divergence_similarity_threshold: 0.2,
197
+ goal_missing_strategy: 'create_for_tracking',
198
+ governance: {
199
+ auto_run_on_plan: true,
200
+ require_auto_on_plan: true,
201
+ max_active_specs_per_scene: 3,
202
+ stale_days: 14,
203
+ duplicate_similarity_threshold: 0.66
204
+ },
205
+ backfill: {
206
+ enabled: true,
207
+ active_only_default: true,
208
+ default_scene_id: 'scene.sce-core',
209
+ override_file: '.sce/spec-governance/spec-scene-overrides.json'
210
+ }
211
+ },
140
212
  debug_policy: {
141
213
  prioritize_root_cause_fix: true,
142
214
  max_direct_fix_rounds_before_debug: 2,
@@ -406,6 +478,7 @@ async function applyTakeoverBaseline(projectPath = process.cwd(), options = {})
406
478
  const specDomainPolicyPath = path.join(sceRoot, 'config', 'spec-domain-policy.json');
407
479
  const problemEvalPolicyPath = path.join(sceRoot, 'config', 'problem-eval-policy.json');
408
480
  const problemClosurePolicyPath = path.join(sceRoot, 'config', 'problem-closure-policy.json');
481
+ const studioIntakePolicyPath = path.join(sceRoot, 'config', 'studio-intake-policy.json');
409
482
  const reportPath = path.join(sceRoot, 'reports', 'takeover-baseline-latest.json');
410
483
 
411
484
  const existingAdoption = await _readJsonSafe(adoptionPath, fileSystem);
@@ -415,6 +488,7 @@ async function applyTakeoverBaseline(projectPath = process.cwd(), options = {})
415
488
  const existingSpecDomainPolicy = await _readJsonSafe(specDomainPolicyPath, fileSystem);
416
489
  const existingProblemEvalPolicy = await _readJsonSafe(problemEvalPolicyPath, fileSystem);
417
490
  const existingProblemClosurePolicy = await _readJsonSafe(problemClosurePolicyPath, fileSystem);
491
+ const existingStudioIntakePolicy = await _readJsonSafe(studioIntakePolicyPath, fileSystem);
418
492
 
419
493
  const desiredAdoption = _buildAdoptionConfig(existingAdoption, nowIso, sceVersion);
420
494
  const desiredAutoConfig = _buildAutoConfig(existingAuto);
@@ -423,6 +497,7 @@ async function applyTakeoverBaseline(projectPath = process.cwd(), options = {})
423
497
  const desiredSpecDomainPolicy = _deepMerge(existingSpecDomainPolicy || {}, SPEC_DOMAIN_POLICY_DEFAULTS);
424
498
  const desiredProblemEvalPolicy = _deepMerge(existingProblemEvalPolicy || {}, PROBLEM_EVAL_POLICY_DEFAULTS);
425
499
  const desiredProblemClosurePolicy = _deepMerge(existingProblemClosurePolicy || {}, PROBLEM_CLOSURE_POLICY_DEFAULTS);
500
+ const desiredStudioIntakePolicy = _deepMerge(existingStudioIntakePolicy || {}, STUDIO_INTAKE_POLICY_DEFAULTS);
426
501
 
427
502
  const fileResults = [];
428
503
  fileResults.push(await _reconcileJsonFile(adoptionPath, desiredAdoption, {
@@ -460,6 +535,11 @@ async function applyTakeoverBaseline(projectPath = process.cwd(), options = {})
460
535
  apply,
461
536
  fileSystem
462
537
  }));
538
+ fileResults.push(await _reconcileJsonFile(studioIntakePolicyPath, desiredStudioIntakePolicy, {
539
+ projectPath,
540
+ apply,
541
+ fileSystem
542
+ }));
463
543
  fileResults.push(await _reconcileSteeringContract(projectPath, {
464
544
  apply,
465
545
  fileSystem
@@ -510,5 +590,6 @@ module.exports = {
510
590
  SPEC_DOMAIN_POLICY_DEFAULTS,
511
591
  PROBLEM_CLOSURE_POLICY_DEFAULTS,
512
592
  PROBLEM_EVAL_POLICY_DEFAULTS,
593
+ STUDIO_INTAKE_POLICY_DEFAULTS,
513
594
  applyTakeoverBaseline
514
595
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scene-capability-engine",
3
- "version": "3.4.6",
3
+ "version": "3.5.1",
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": {
@@ -0,0 +1,154 @@
1
+ {
2
+ "schema_version": "1.0",
3
+ "enabled": true,
4
+ "auto_create_spec": true,
5
+ "force_spec_for_studio_plan": true,
6
+ "allow_manual_spec_override": false,
7
+ "prefer_existing_scene_spec": true,
8
+ "related_spec_min_score": 45,
9
+ "allow_new_spec_when_goal_diverges": true,
10
+ "divergence_similarity_threshold": 0.2,
11
+ "goal_missing_strategy": "create_for_tracking",
12
+ "question_only_patterns": [
13
+ "how",
14
+ "what",
15
+ "why",
16
+ "when",
17
+ "where",
18
+ "which",
19
+ "can",
20
+ "could",
21
+ "should",
22
+ "would",
23
+ "是否",
24
+ "怎么",
25
+ "如何",
26
+ "为什么",
27
+ "吗",
28
+ "么"
29
+ ],
30
+ "change_intent_patterns": [
31
+ "implement",
32
+ "build",
33
+ "create",
34
+ "add",
35
+ "update",
36
+ "upgrade",
37
+ "refactor",
38
+ "fix",
39
+ "stabilize",
40
+ "optimize",
41
+ "deliver",
42
+ "release",
43
+ "bootstrap",
44
+ "repair",
45
+ "patch",
46
+ "新增",
47
+ "增加",
48
+ "实现",
49
+ "构建",
50
+ "开发",
51
+ "修复",
52
+ "优化",
53
+ "重构",
54
+ "发布",
55
+ "改造",
56
+ "完善",
57
+ "增强"
58
+ ],
59
+ "spec_id": {
60
+ "prefix": "auto",
61
+ "max_goal_slug_tokens": 6
62
+ },
63
+ "governance": {
64
+ "auto_run_on_plan": true,
65
+ "require_auto_on_plan": true,
66
+ "max_active_specs_per_scene": 3,
67
+ "stale_days": 14,
68
+ "duplicate_similarity_threshold": 0.66
69
+ },
70
+ "backfill": {
71
+ "enabled": true,
72
+ "active_only_default": true,
73
+ "default_scene_id": "scene.sce-core",
74
+ "override_file": ".sce/spec-governance/spec-scene-overrides.json",
75
+ "rules": [
76
+ {
77
+ "id": "moqui-core",
78
+ "scene_id": "scene.moqui-core",
79
+ "keywords": [
80
+ "moqui"
81
+ ]
82
+ },
83
+ {
84
+ "id": "orchestration",
85
+ "scene_id": "scene.sce-orchestration",
86
+ "keywords": [
87
+ "orchestrate",
88
+ "runtime",
89
+ "controller",
90
+ "batch",
91
+ "parallel"
92
+ ]
93
+ },
94
+ {
95
+ "id": "template-registry",
96
+ "scene_id": "scene.sce-template-registry",
97
+ "keywords": [
98
+ "template",
99
+ "scene-package",
100
+ "registry",
101
+ "catalog",
102
+ "scene-template"
103
+ ]
104
+ },
105
+ {
106
+ "id": "spec-governance",
107
+ "scene_id": "scene.sce-spec-governance",
108
+ "keywords": [
109
+ "spec",
110
+ "gate",
111
+ "ontology",
112
+ "governance",
113
+ "policy"
114
+ ]
115
+ },
116
+ {
117
+ "id": "quality",
118
+ "scene_id": "scene.sce-quality",
119
+ "keywords": [
120
+ "test",
121
+ "quality",
122
+ "stability",
123
+ "jest",
124
+ "coverage"
125
+ ]
126
+ },
127
+ {
128
+ "id": "docs",
129
+ "scene_id": "scene.sce-docs",
130
+ "keywords": [
131
+ "document",
132
+ "documentation",
133
+ "onboarding",
134
+ "guide"
135
+ ]
136
+ },
137
+ {
138
+ "id": "platform",
139
+ "scene_id": "scene.sce-platform",
140
+ "keywords": [
141
+ "adopt",
142
+ "upgrade",
143
+ "workspace",
144
+ "repo",
145
+ "environment",
146
+ "devops",
147
+ "release",
148
+ "github",
149
+ "npm"
150
+ ]
151
+ }
152
+ ]
153
+ }
154
+ }
@@ -18,7 +18,94 @@
18
18
  "spec_domain_policy": {
19
19
  "closed_loop_research_required": true,
20
20
  "coverage_validation_required": true,
21
- "fail_on_gap_default": true
21
+ "fail_on_gap_default": true,
22
+ "problem_contract_required": true,
23
+ "ontology_axes_required": [
24
+ "entity",
25
+ "relation",
26
+ "business_rule",
27
+ "decision_policy",
28
+ "execution_flow"
29
+ ]
30
+ },
31
+ "problem_evaluation": {
32
+ "enabled": true,
33
+ "mode": "required",
34
+ "enforce_on_stages": [
35
+ "plan",
36
+ "generate",
37
+ "apply",
38
+ "verify",
39
+ "release"
40
+ ],
41
+ "block_on_stages": [
42
+ "apply",
43
+ "release"
44
+ ],
45
+ "problem_contract_required_stages": [
46
+ "plan",
47
+ "generate",
48
+ "apply",
49
+ "verify",
50
+ "release"
51
+ ],
52
+ "problem_contract_block_stages": [
53
+ "plan",
54
+ "apply",
55
+ "release"
56
+ ],
57
+ "ontology_alignment_required_stages": [
58
+ "plan",
59
+ "generate",
60
+ "apply",
61
+ "verify",
62
+ "release"
63
+ ],
64
+ "ontology_alignment_block_stages": [
65
+ "apply",
66
+ "release"
67
+ ],
68
+ "convergence_required_stages": [
69
+ "verify",
70
+ "release"
71
+ ],
72
+ "convergence_block_stages": [
73
+ "release"
74
+ ],
75
+ "max_failed_rounds_before_debug": 2
76
+ },
77
+ "problem_closure": {
78
+ "enabled": true,
79
+ "governance_report_path": ".sce/reports/interactive-governance-report.json",
80
+ "verify": {
81
+ "require_problem_contract": true,
82
+ "require_domain_validation": true,
83
+ "require_domain_coverage": true
84
+ },
85
+ "release": {
86
+ "require_problem_contract": true,
87
+ "require_domain_validation": true,
88
+ "require_domain_coverage": true,
89
+ "require_verify_report": true,
90
+ "require_governance_report": false,
91
+ "block_on_high_governance_alerts": true
92
+ }
93
+ },
94
+ "studio_intake": {
95
+ "enabled": true,
96
+ "auto_create_spec": true,
97
+ "force_spec_for_studio_plan": true,
98
+ "prefer_existing_scene_spec": true,
99
+ "related_spec_min_score": 45,
100
+ "allow_new_spec_when_goal_diverges": true,
101
+ "divergence_similarity_threshold": 0.2,
102
+ "goal_missing_strategy": "create_for_tracking",
103
+ "governance": {
104
+ "auto_run_on_plan": true,
105
+ "max_active_specs_per_scene": 3,
106
+ "stale_days": 14,
107
+ "duplicate_similarity_threshold": 0.66
108
+ }
22
109
  },
23
110
  "debug_policy": {
24
111
  "prioritize_root_cause_fix": true,