scene-capability-engine 3.3.15 → 3.3.16

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.3.16] - 2026-02-26
11
+
12
+ ### Added
13
+ - Studio strict gate profiles:
14
+ - `sce studio verify --profile strict`
15
+ - `sce studio release --profile strict`
16
+ - Release preflight default gates now include:
17
+ - `scene package-publish-batch --dry-run` ontology thresholds (`average >= 70`, `valid-rate >= 100`)
18
+ - `auto handoff capability-matrix --fail-on-gap`
19
+
20
+ ### Changed
21
+ - Strict profiles now fail when any required gate step is skipped.
22
+ - Orchestration rate-limit handling now adapts launch budget under sustained `429` spikes and recovers budget gradually after cooldown.
23
+ - Command reference updated for strict Studio profiles and required gate behavior.
24
+
10
25
  ## [3.3.13] - 2026-02-25
11
26
 
12
27
  ### Changed
package/README.md CHANGED
@@ -775,6 +775,6 @@ A deep conversation about AI development trends, Neo-Confucian philosophy, and s
775
775
 
776
776
  ---
777
777
 
778
- **Version**: 3.3.15
778
+ **Version**: 3.3.16
779
779
  **Last Updated**: 2026-02-26
780
780
 
package/README.zh.md CHANGED
@@ -636,7 +636,7 @@ sce spec bootstrap --name 01-00-my-first-feature --non-interactive
636
636
 
637
637
  ---
638
638
 
639
- **版本**:3.3.15
639
+ **版本**:3.3.16
640
640
  **最后更新**:2026-02-26
641
641
 
642
642
 
@@ -817,6 +817,10 @@ registerLockCommands(program);
817
817
  const { registerKnowledgeCommands } = require('../lib/commands/knowledge');
818
818
  registerKnowledgeCommands(program);
819
819
 
820
+ // Studio orchestration commands
821
+ const { registerStudioCommands } = require('../lib/commands/studio');
822
+ registerStudioCommands(program);
823
+
820
824
  // Orchestration commands
821
825
  const { registerOrchestrateCommands } = require('../lib/commands/orchestrate');
822
826
  registerOrchestrateCommands(program);
@@ -227,7 +227,7 @@ This document provides detailed architecture diagrams and explanations for Scene
227
227
  │ version.json │
228
228
  │ { │
229
229
  │ "version": "1.2.0", │
230
- │ "kseVersion": "1.2.0", │
230
+ │ "sceVersion": "1.2.0", │
231
231
  │ "createdAt": "2026-01-23T00:00:00.000Z", │
232
232
  │ "updatedAt": "2026-01-23T00:00:00.000Z", │
233
233
  │ "upgradeHistory": [ │
@@ -235,7 +235,7 @@ This document provides detailed architecture diagrams and explanations for Scene
235
235
  │ "from": "1.0.0", │
236
236
  │ "to": "1.1.0", │
237
237
  │ "timestamp": "2026-01-23T00:00:00.000Z", │
238
- │ "kseVersion": "1.1.0" │
238
+ │ "sceVersion": "1.1.0" │
239
239
  │ } │
240
240
  │ ] │
241
241
  │ } │
@@ -3,7 +3,7 @@
3
3
  > Quick reference for all `sce` commands
4
4
 
5
5
  **Version**: 2.0.0
6
- **Last Updated**: 2026-02-18
6
+ **Last Updated**: 2026-02-26
7
7
 
8
8
  ---
9
9
 
@@ -304,6 +304,66 @@ sce orchestrate stop
304
304
 
305
305
  When you pass `--specs` to `sce spec bootstrap|pipeline run|gate run`, sce now defaults to this orchestrate mode automatically.
306
306
 
307
+ ### Studio Workflow
308
+
309
+ ```bash
310
+ # Build a plan from chat/session context
311
+ sce studio plan --from-chat session-20260226 --goal "customer+order+inventory demo" --json
312
+
313
+ # Generate patch bundle metadata for a target scene
314
+ sce studio generate --scene scene.customer-order-inventory --target 331 --json
315
+
316
+ # Apply generated patch metadata
317
+ sce studio apply --patch-bundle patch-scene.customer-order-inventory-<timestamp> --json
318
+
319
+ # Record verification result
320
+ sce studio verify --profile standard --json
321
+ sce studio verify --profile strict --json
322
+
323
+ # Record release event
324
+ sce studio release --channel dev --profile standard --json
325
+ sce studio release --channel dev --profile strict --json
326
+
327
+ # Resume from latest or explicit job
328
+ sce studio resume --job <job-id> --json
329
+
330
+ # Inspect recent stage events
331
+ sce studio events --job <job-id> --limit 50 --json
332
+
333
+ # Rollback a job after apply/release
334
+ sce studio rollback --job <job-id> --reason "manual-check-failed" --json
335
+
336
+ # Enforce authorization for a protected action
337
+ SCE_STUDIO_REQUIRE_AUTH=1 SCE_STUDIO_AUTH_PASSWORD=top-secret sce studio apply --job <job-id> --auth-password top-secret --json
338
+ ```
339
+
340
+ Stage guardrails are enforced by default:
341
+ - `generate` requires `plan`
342
+ - `apply` requires `generate`
343
+ - `verify` requires `apply`
344
+ - `release` requires `verify`
345
+
346
+ Studio gate execution defaults:
347
+ - `verify --profile standard` runs executable gates (unit test script when available, interactive governance report when present, scene package publish-batch dry-run when handoff manifest exists)
348
+ - `release --profile standard` runs executable release preflight (npm pack dry-run, weekly ops gate when summary exists, release asset integrity when evidence directory exists, scene package publish-batch ontology gate, handoff capability matrix gate)
349
+ - `verify/release --profile strict` fails when any required gate step is skipped (for example missing manifest/evidence/scripts)
350
+
351
+ Authorization model (optional, policy-driven):
352
+ - Enable policy: `SCE_STUDIO_REQUIRE_AUTH=1`
353
+ - Secret env key: `SCE_STUDIO_AUTH_PASSWORD` (or override key name with `SCE_STUDIO_PASSWORD_ENV`)
354
+ - Protected actions: `apply`, `release`, `rollback`
355
+ - Per-command hard requirement: add `--require-auth`
356
+
357
+ Default policy file (recommended to commit): `.sce/config/studio-security.json`
358
+
359
+ ```json
360
+ {
361
+ "enabled": false,
362
+ "require_auth_for": ["apply", "release", "rollback"],
363
+ "password_env": "SCE_STUDIO_AUTH_PASSWORD"
364
+ }
365
+ ```
366
+
307
367
  ### Capability Matrix Utilities
308
368
 
309
369
  ```bash
@@ -441,7 +441,7 @@ Reads version.json from project.
441
441
  ```javascript
442
442
  {
443
443
  version: '1.2.0',
444
- kseVersion: '1.2.0',
444
+ sceVersion: '1.2.0',
445
445
  createdAt: '2026-01-23T00:00:00.000Z',
446
446
  updatedAt: '2026-01-23T00:00:00.000Z',
447
447
  upgradeHistory: []
@@ -73,6 +73,7 @@ class AdoptionStrategy {
73
73
  await ensureDirectory(path.join(kiroPath, 'specs'));
74
74
  await ensureDirectory(path.join(kiroPath, 'steering'));
75
75
  await ensureDirectory(path.join(kiroPath, 'tools'));
76
+ await ensureDirectory(path.join(kiroPath, 'config'));
76
77
  await ensureDirectory(path.join(kiroPath, 'backups'));
77
78
  await ensureDirectory(path.join(kiroPath, 'hooks'));
78
79
  }
@@ -111,6 +112,7 @@ class AdoptionStrategy {
111
112
  'steering/ENVIRONMENT.md',
112
113
  'steering/CURRENT_CONTEXT.md',
113
114
  'steering/RULES_GUIDE.md',
115
+ 'config/studio-security.json',
114
116
  'specs/SPEC_WORKFLOW_GUIDE.md',
115
117
  'hooks/sync-tasks-on-edit.sce.hook',
116
118
  'hooks/check-spec-on-create.sce.hook',
@@ -189,7 +191,7 @@ class FreshAdoption extends AdoptionStrategy {
189
191
  * @returns {Promise<AdoptionResult>}
190
192
  */
191
193
  async execute(projectPath, mode, options = {}) {
192
- const { kseVersion = '1.0.0', dryRun = false } = options;
194
+ const { sceVersion = '1.0.0', dryRun = false } = options;
193
195
 
194
196
  const filesCreated = [];
195
197
  const filesUpdated = [];
@@ -225,6 +227,7 @@ class FreshAdoption extends AdoptionStrategy {
225
227
  filesCreated.push('.sce/specs/');
226
228
  filesCreated.push('.sce/steering/');
227
229
  filesCreated.push('.sce/tools/');
230
+ filesCreated.push('.sce/config/');
228
231
  filesCreated.push('.sce/backups/');
229
232
  filesCreated.push('.sce/hooks/');
230
233
 
@@ -235,7 +238,7 @@ class FreshAdoption extends AdoptionStrategy {
235
238
  filesSkipped.push(...copyResult.skipped);
236
239
 
237
240
  // Create version.json
238
- const versionInfo = this.versionManager.createVersionInfo(kseVersion);
241
+ const versionInfo = this.versionManager.createVersionInfo(sceVersion);
239
242
  await this.versionManager.writeVersion(projectPath, versionInfo);
240
243
  filesCreated.push('version.json');
241
244
 
@@ -279,7 +282,7 @@ class PartialAdoption extends AdoptionStrategy {
279
282
  * @returns {Promise<AdoptionResult>}
280
283
  */
281
284
  async execute(projectPath, mode, options = {}) {
282
- const { kseVersion = '1.0.0', dryRun = false, backupId = null, force = false, resolutionMap = {} } = options;
285
+ const { sceVersion = '1.0.0', dryRun = false, backupId = null, force = false, resolutionMap = {} } = options;
283
286
 
284
287
  const filesCreated = [];
285
288
  const filesUpdated = [];
@@ -320,6 +323,7 @@ class PartialAdoption extends AdoptionStrategy {
320
323
  const specsPath = path.join(kiroPath, 'specs');
321
324
  const steeringPath = path.join(kiroPath, 'steering');
322
325
  const toolsPath = path.join(kiroPath, 'tools');
326
+ const configPath = path.join(kiroPath, 'config');
323
327
  const backupsPath = path.join(kiroPath, 'backups');
324
328
  const hooksPath = path.join(kiroPath, 'hooks');
325
329
 
@@ -337,6 +341,11 @@ class PartialAdoption extends AdoptionStrategy {
337
341
  await ensureDirectory(toolsPath);
338
342
  filesCreated.push('tools/');
339
343
  }
344
+
345
+ if (!await pathExists(configPath)) {
346
+ await ensureDirectory(configPath);
347
+ filesCreated.push('config/');
348
+ }
340
349
 
341
350
  if (!await pathExists(backupsPath)) {
342
351
  await ensureDirectory(backupsPath);
@@ -356,15 +365,15 @@ class PartialAdoption extends AdoptionStrategy {
356
365
 
357
366
  // Create or update version.json
358
367
  if (!versionExists) {
359
- const versionInfo = this.versionManager.createVersionInfo(kseVersion);
368
+ const versionInfo = this.versionManager.createVersionInfo(sceVersion);
360
369
  await this.versionManager.writeVersion(projectPath, versionInfo);
361
370
  filesCreated.push('version.json');
362
371
  } else {
363
372
  // Update existing version.json
364
373
  const versionInfo = await this.versionManager.readVersion(projectPath);
365
374
  if (versionInfo) {
366
- versionInfo['sce-version'] = kseVersion;
367
- versionInfo['template-version'] = kseVersion;
375
+ versionInfo['sce-version'] = sceVersion;
376
+ versionInfo['template-version'] = sceVersion;
368
377
  versionInfo['last-upgraded'] = new Date().toISOString();
369
378
  await this.versionManager.writeVersion(projectPath, versionInfo);
370
379
  filesUpdated.push('version.json');
@@ -411,7 +420,7 @@ class FullAdoption extends AdoptionStrategy {
411
420
  * @returns {Promise<AdoptionResult>}
412
421
  */
413
422
  async execute(projectPath, mode, options = {}) {
414
- const { kseVersion = '1.0.0', dryRun = false, backupId = null } = options;
423
+ const { sceVersion = '1.0.0', dryRun = false, backupId = null } = options;
415
424
 
416
425
  const filesCreated = [];
417
426
  const filesUpdated = [];
@@ -437,8 +446,8 @@ class FullAdoption extends AdoptionStrategy {
437
446
  const currentVersion = existingVersion['sce-version'];
438
447
 
439
448
  // Check if upgrade is needed
440
- if (!this.versionManager.needsUpgrade(currentVersion, kseVersion)) {
441
- warnings.push(`Already at version ${kseVersion} - no upgrade needed`);
449
+ if (!this.versionManager.needsUpgrade(currentVersion, sceVersion)) {
450
+ warnings.push(`Already at version ${sceVersion} - no upgrade needed`);
442
451
  return {
443
452
  success: true,
444
453
  mode: 'full',
@@ -456,7 +465,7 @@ class FullAdoption extends AdoptionStrategy {
456
465
  success: true,
457
466
  mode: 'full',
458
467
  filesCreated: [],
459
- filesUpdated: [`(dry-run) Would upgrade from ${currentVersion} to ${kseVersion}`],
468
+ filesUpdated: [`(dry-run) Would upgrade from ${currentVersion} to ${sceVersion}`],
460
469
  filesSkipped: [],
461
470
  backupId,
462
471
  errors: [],
@@ -478,7 +487,7 @@ class FullAdoption extends AdoptionStrategy {
478
487
  const updatedVersion = this.versionManager.addUpgradeHistory(
479
488
  existingVersion,
480
489
  currentVersion,
481
- kseVersion,
490
+ sceVersion,
482
491
  true
483
492
  );
484
493
  await this.versionManager.writeVersion(projectPath, updatedVersion);
@@ -315,6 +315,7 @@ class BackupManager {
315
315
  const criticalPatterns = [
316
316
  'steering/CORE_PRINCIPLES.md',
317
317
  'steering/ENVIRONMENT.md',
318
+ 'config/studio-security.json',
318
319
  'version.json',
319
320
  'adoption-config.json'
320
321
  ];
@@ -161,6 +161,7 @@ class DetectionEngine {
161
161
  'steering/CURRENT_CONTEXT.md',
162
162
  'steering/RULES_GUIDE.md',
163
163
  'tools/ultrawork_enhancer.py',
164
+ 'config/studio-security.json',
164
165
  'README.md',
165
166
  'ultrawork-application-guide.md',
166
167
  'ultrawork-integration-summary.md',
@@ -14,7 +14,7 @@ const path = require('path');
14
14
  const FileCategory = {
15
15
  TEMPLATE: 'template', // steering/, tools/, README.md
16
16
  USER_CONTENT: 'user-content', // specs/, custom files
17
- CONFIG: 'config', // version.json, adoption-config.json
17
+ CONFIG: 'config', // version.json, adoption-config.json, config/*.json
18
18
  GENERATED: 'generated' // backups/, logs/, node_modules/
19
19
  };
20
20
 
@@ -62,7 +62,8 @@ class FileClassifier {
62
62
  // Config file patterns
63
63
  this.configPatterns = [
64
64
  'version.json',
65
- 'adoption-config.json'
65
+ 'adoption-config.json',
66
+ 'config/studio-security.json'
66
67
  ];
67
68
 
68
69
  // Generated directory patterns
@@ -282,6 +282,7 @@ class SmartOrchestrator {
282
282
  'steering/ENVIRONMENT.md',
283
283
  'steering/RULES_GUIDE.md',
284
284
  'tools/ultrawork_enhancer.py',
285
+ 'config/studio-security.json',
285
286
  'README.md'
286
287
  ];
287
288
 
@@ -299,6 +300,7 @@ class SmartOrchestrator {
299
300
  '.sce/specs/',
300
301
  '.sce/steering/',
301
302
  '.sce/tools/',
303
+ '.sce/config/',
302
304
  '.sce/backups/',
303
305
  ...templateFiles.map(f => `.sce/${f}`),
304
306
  '.sce/version.json'
@@ -380,7 +382,7 @@ class SmartOrchestrator {
380
382
  });
381
383
 
382
384
  const result = await strategy.execute(projectPath, strategyMode, {
383
- kseVersion: packageJson.version,
385
+ sceVersion: packageJson.version,
384
386
  dryRun: false,
385
387
  force: !skipUpdate,
386
388
  resolutionMap
@@ -109,6 +109,7 @@ class StrategySelector {
109
109
  'steering/ENVIRONMENT.md',
110
110
  'steering/RULES_GUIDE.md',
111
111
  'tools/ultrawork_enhancer.py',
112
+ 'config/studio-security.json',
112
113
  'README.md'
113
114
  ];
114
115
 
@@ -28,6 +28,7 @@ class TemplateSync {
28
28
  'steering/ENVIRONMENT.md',
29
29
  'steering/RULES_GUIDE.md',
30
30
  'tools/ultrawork_enhancer.py',
31
+ 'config/studio-security.json',
31
32
  'README.md',
32
33
  'ultrawork-application-guide.md',
33
34
  'ultrawork-integration-summary.md',
@@ -285,7 +285,7 @@ async function adoptInteractive(projectPath, options) {
285
285
  const packageJson = require('../../package.json');
286
286
 
287
287
  const result = await adoptionStrategy.execute(projectPath, strategy, {
288
- kseVersion: packageJson.version,
288
+ sceVersion: packageJson.version,
289
289
  dryRun: true,
290
290
  force
291
291
  });
@@ -494,7 +494,7 @@ async function adoptInteractive(projectPath, options) {
494
494
  const packageJson = require('../../package.json');
495
495
 
496
496
  const result = await adoptionStrategy.execute(projectPath, strategy, {
497
- kseVersion: packageJson.version,
497
+ sceVersion: packageJson.version,
498
498
  dryRun: false,
499
499
  backupId,
500
500
  force,