scene-capability-engine 3.3.17 → 3.3.21
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 +48 -0
- package/README.md +19 -10
- package/README.zh.md +21 -11
- package/bin/scene-capability-engine.js +4 -0
- package/docs/command-reference.md +94 -12
- package/docs/release-checklist.md +6 -0
- package/docs/zh/release-checklist.md +6 -0
- package/lib/commands/errorbook.js +1244 -0
- package/lib/commands/spec-bootstrap.js +126 -51
- package/lib/commands/spec-gate.js +92 -25
- package/lib/commands/spec-pipeline.js +86 -7
- package/lib/commands/studio.js +265 -30
- package/lib/runtime/multi-spec-scene-session.js +147 -0
- package/lib/runtime/scene-session-binding.js +109 -0
- package/lib/runtime/session-store.js +475 -3
- package/package.json +4 -2
- package/template/.sce/steering/CORE_PRINCIPLES.md +26 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,54 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.3.21] - 2026-02-27
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- `git-managed-gate` now supports CI tag/detached-HEAD release workflows by default:
|
|
14
|
+
- In CI context (`CI=1` or `GITHUB_ACTIONS=1`), branch/upstream sync checks are relaxed to avoid false blocking.
|
|
15
|
+
- Local release checks remain strict (clean worktree + branch/upstream sync).
|
|
16
|
+
- Added strict CI override: `SCE_GIT_MANAGEMENT_STRICT_CI=1` (or `--strict-ci`) for full enforcement in CI.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Added CI-aware flags for `git-managed-gate`:
|
|
20
|
+
- `--ci-context` / `--no-ci-context`
|
|
21
|
+
- `--strict-ci` / `--no-strict-ci`
|
|
22
|
+
- Updated release and command documentation to clarify local-vs-CI gate behavior.
|
|
23
|
+
|
|
24
|
+
## [3.3.19] - 2026-02-26
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
- Errorbook release gate command and script:
|
|
28
|
+
- `sce errorbook release-gate --min-risk <low|medium|high> [--include-verified] [--fail-on-block]`
|
|
29
|
+
- `node scripts/errorbook-release-gate.js --fail-on-block`
|
|
30
|
+
- `package.json` script alias:
|
|
31
|
+
- `npm run gate:errorbook-release`
|
|
32
|
+
- Git managed release gate script and alias:
|
|
33
|
+
- `node scripts/git-managed-gate.js --fail-on-violation`
|
|
34
|
+
- `npm run gate:git-managed`
|
|
35
|
+
|
|
36
|
+
### Changed
|
|
37
|
+
- `prepublishOnly` now enforces git-managed gate + errorbook release gate before interactive governance checks.
|
|
38
|
+
- Studio gate failures are now auto-recorded into `.sce/errorbook` as `candidate` entries (tagged `release-blocker`) to avoid manual reminders.
|
|
39
|
+
- Studio release preflight now includes `git-managed-gate` and `errorbook-release-gate` as required gate steps when scripts are available.
|
|
40
|
+
|
|
41
|
+
## [3.3.18] - 2026-02-26
|
|
42
|
+
|
|
43
|
+
### Added
|
|
44
|
+
- Curated `errorbook` command set for high-signal failure remediation knowledge:
|
|
45
|
+
- `sce errorbook record`
|
|
46
|
+
- `sce errorbook list`
|
|
47
|
+
- `sce errorbook show <id>`
|
|
48
|
+
- `sce errorbook find --query <text>`
|
|
49
|
+
- `sce errorbook promote <id>`
|
|
50
|
+
- `sce errorbook deprecate <id> --reason <text>`
|
|
51
|
+
- `sce errorbook requalify <id> --status <candidate|verified>`
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
- Added strict curation/promotion policy to command reference (`宁缺毋滥,优胜略汰`):
|
|
55
|
+
- fingerprint-based deduplication on record
|
|
56
|
+
- promotion gate requires validated root cause, fix actions, verification evidence, ontology tags, and minimum quality score
|
|
57
|
+
|
|
10
58
|
## [3.3.17] - 2026-02-26
|
|
11
59
|
|
|
12
60
|
### Added
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
> **⚠️ Important Clarification**: `scene-capability-engine` (`sce`) is an **npm package and CLI tool** for spec-driven development.
|
|
7
7
|
> Primary command is `sce`. Compatibility aliases are preserved for migration.
|
|
8
8
|
|
|
9
|
-
**
|
|
9
|
+
**SCE (Scene Capability Engine) is an ontology-aware scene orchestration engine for AI agents** across plan, generate, patch, verify, and release workflows.
|
|
10
10
|
|
|
11
11
|
**🚀 NEW: Autonomous Control** - Let AI independently manage entire development workflows from requirements to delivery.
|
|
12
12
|
|
|
@@ -16,7 +16,7 @@ English | [简体中文](README.zh.md)
|
|
|
16
16
|
|
|
17
17
|
## What is sce?
|
|
18
18
|
|
|
19
|
-
**SCE (Scene Capability Engine) is
|
|
19
|
+
**SCE (Scene Capability Engine) is an ontology-aware scene orchestration engine for AI-assisted development.** It organizes project information into structured "Specs" (Requirements → Design → Tasks) and routes execution through plan → generate → patch → verify → release workflows.
|
|
20
20
|
|
|
21
21
|
Think of sce as a **librarian for your AI assistant** - it organizes and presents project context so your AI tool knows exactly what you're building, why, and how.
|
|
22
22
|
|
|
@@ -69,13 +69,16 @@ graph LR
|
|
|
69
69
|
# 1) Adopt sce in current repo
|
|
70
70
|
sce adopt
|
|
71
71
|
|
|
72
|
-
# 2)
|
|
73
|
-
sce
|
|
72
|
+
# 2) Open primary scene session
|
|
73
|
+
sce studio plan --scene scene.demo --from-chat session-demo --goal "demo workflow bootstrap" --json
|
|
74
74
|
|
|
75
|
-
# 3) Generate
|
|
75
|
+
# 3) Generate Spec workflow draft
|
|
76
|
+
sce spec bootstrap --name 01-00-demo-feature --scene scene.demo --non-interactive
|
|
77
|
+
|
|
78
|
+
# 4) Generate KPI input sample
|
|
76
79
|
sce value metrics sample --out ./kpi-input.json --json
|
|
77
80
|
|
|
78
|
-
#
|
|
81
|
+
# 5) Produce machine-readable KPI snapshot
|
|
79
82
|
sce value metrics snapshot --input ./kpi-input.json --json
|
|
80
83
|
```
|
|
81
84
|
|
|
@@ -559,13 +562,18 @@ sce auto schema check --json # Check autonomous archive schema compatibility
|
|
|
559
562
|
sce auto schema migrate --apply --json # Backfill/migrate schema_version for autonomous archives
|
|
560
563
|
|
|
561
564
|
# Spec workflow (recommended)
|
|
562
|
-
sce spec bootstrap --name <spec> --non-interactive
|
|
563
|
-
sce spec pipeline run --spec <spec>
|
|
564
|
-
sce spec gate run --spec <spec> --json
|
|
565
|
+
sce spec bootstrap --name <spec> --scene <scene-id> --non-interactive # Generate draft and bind as scene child session
|
|
566
|
+
sce spec pipeline run --spec <spec> --scene <scene-id> # Run pipeline and auto-archive spec child session
|
|
567
|
+
sce spec gate run --spec <spec> --scene <scene-id> --json # Run gate and auto-archive spec child session
|
|
565
568
|
sce spec bootstrap --specs "<spec-a,spec-b>" --max-parallel <N> # Multi-Spec defaults to orchestrate
|
|
566
569
|
sce spec pipeline run --specs "<spec-a,spec-b>" --max-parallel <N> # Multi-Spec defaults to orchestrate
|
|
567
570
|
sce spec gate run --specs "<spec-a,spec-b>" --max-parallel <N> # Multi-Spec defaults to orchestrate
|
|
568
571
|
|
|
572
|
+
# Spec session governance default
|
|
573
|
+
# - spec bootstrap|pipeline run|gate run must bind to an active scene primary session.
|
|
574
|
+
# - Use --scene <scene-id> explicitly when multiple active scenes exist.
|
|
575
|
+
# - Multi-Spec orchestrate fallback (--specs ...) keeps the same scene binding and archives per-spec child sessions.
|
|
576
|
+
|
|
569
577
|
# Context management
|
|
570
578
|
sce context export <spec-name> # Export context for AI tools
|
|
571
579
|
sce prompt generate <spec> <task> # Generate task-specific prompt
|
|
@@ -739,7 +747,8 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
739
747
|
```bash
|
|
740
748
|
npm install -g scene-capability-engine
|
|
741
749
|
sce adopt
|
|
742
|
-
sce
|
|
750
|
+
sce studio plan --scene scene.demo --from-chat session-demo --goal "bootstrap first feature" --json
|
|
751
|
+
sce spec bootstrap --name 01-00-my-first-feature --scene scene.demo --non-interactive
|
|
743
752
|
```
|
|
744
753
|
|
|
745
754
|
---
|
package/README.zh.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
> **⚠️ 重要说明**: `scene-capability-engine`(`sce`)是一个 **npm 包和 CLI 工具**,用于 Spec 驱动开发。
|
|
7
7
|
> 主命令为 `sce`,兼容别名保留用于迁移。
|
|
8
8
|
|
|
9
|
-
**AI
|
|
9
|
+
**SCE(场景能力引擎)是一个面向 AI Agent 的本体感知场景编排引擎**,覆盖 plan、generate、patch、verify、release 全流程。
|
|
10
10
|
|
|
11
11
|
[English](README.md) | 简体中文
|
|
12
12
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
## 什么是 sce?
|
|
16
16
|
|
|
17
|
-
**SCE
|
|
17
|
+
**SCE(场景能力引擎)是一个面向 AI 辅助开发的本体感知场景编排引擎。** 它将项目信息组织成结构化 Spec(需求 → 设计 → 任务),并通过 plan → generate → patch → verify → release 的流程路由执行。
|
|
18
18
|
|
|
19
19
|
把 sce 想象成 **AI 助手的图书管理员** - 它组织和呈现项目上下文,让你的 AI 工具准确知道你在构建什么、为什么构建以及如何构建。
|
|
20
20
|
|
|
@@ -67,13 +67,16 @@ graph LR
|
|
|
67
67
|
# 1) 在当前仓库启用 sce
|
|
68
68
|
sce adopt
|
|
69
69
|
|
|
70
|
-
# 2)
|
|
71
|
-
sce
|
|
70
|
+
# 2) 打开主场景会话
|
|
71
|
+
sce studio plan --scene scene.demo --from-chat session-demo --goal "demo workflow bootstrap" --json
|
|
72
72
|
|
|
73
|
-
# 3) 生成
|
|
73
|
+
# 3) 生成 Spec 工作流草稿
|
|
74
|
+
sce spec bootstrap --name 01-00-demo-feature --scene scene.demo --non-interactive
|
|
75
|
+
|
|
76
|
+
# 4) 生成 KPI 输入样例
|
|
74
77
|
sce value metrics sample --out ./kpi-input.json --json
|
|
75
78
|
|
|
76
|
-
#
|
|
79
|
+
# 5) 产出机器可读 KPI 快照
|
|
77
80
|
sce value metrics snapshot --input ./kpi-input.json --json
|
|
78
81
|
```
|
|
79
82
|
|
|
@@ -473,13 +476,18 @@ sce auto schema check --json # 检查自治归档 schema 兼容性
|
|
|
473
476
|
sce auto schema migrate --apply --json # 回填/迁移自治归档 schema_version
|
|
474
477
|
|
|
475
478
|
# Spec 工作流(推荐)
|
|
476
|
-
sce spec bootstrap --name <spec> --non-interactive
|
|
477
|
-
sce spec pipeline run --spec <spec>
|
|
478
|
-
sce spec gate run --spec <spec> --json
|
|
479
|
+
sce spec bootstrap --name <spec> --scene <scene-id> --non-interactive # 生成初稿并绑定 scene 子会话
|
|
480
|
+
sce spec pipeline run --spec <spec> --scene <scene-id> # 执行分阶段流程并自动归档子会话
|
|
481
|
+
sce spec gate run --spec <spec> --scene <scene-id> --json # 执行闸口并自动归档子会话
|
|
479
482
|
sce spec bootstrap --specs "<spec-a,spec-b>" --max-parallel <N> # 多 Spec 默认转 orchestrate
|
|
480
483
|
sce spec pipeline run --specs "<spec-a,spec-b>" --max-parallel <N> # 多 Spec 默认转 orchestrate
|
|
481
484
|
sce spec gate run --specs "<spec-a,spec-b>" --max-parallel <N> # 多 Spec 默认转 orchestrate
|
|
482
485
|
|
|
486
|
+
# Spec 会话治理默认规则
|
|
487
|
+
# - spec bootstrap|pipeline run|gate run 必须绑定活动中的 scene 主会话
|
|
488
|
+
# - 当存在多个活动 scene 时,必须显式传入 --scene <scene-id>
|
|
489
|
+
# - 多 Spec orchestrate 回退路径同样按 scene 绑定并写入每个 spec 的子会话归档
|
|
490
|
+
|
|
483
491
|
# 上下文管理
|
|
484
492
|
sce context export <spec-name> # 为 AI 工具导出上下文
|
|
485
493
|
sce prompt generate <spec> <task> # 生成任务特定提示
|
|
@@ -546,7 +554,8 @@ sce orchestrate run --specs "<spec列表>" --max-parallel <N> # 启动多 Agent
|
|
|
546
554
|
sce orchestrate status # 查看编排进度
|
|
547
555
|
sce orchestrate stop # 停止所有子 Agent
|
|
548
556
|
|
|
549
|
-
# 说明:当使用 --specs 调用 sce spec bootstrap/pipeline run/gate run 时,会默认转到 orchestrate
|
|
557
|
+
# 说明:当使用 --specs 调用 sce spec bootstrap/pipeline run/gate run 时,会默认转到 orchestrate 模式,
|
|
558
|
+
# 且仍要求绑定活动 scene 主会话(多活动 scene 时必须显式 --scene)
|
|
550
559
|
|
|
551
560
|
# 发布基线(CI 默认)
|
|
552
561
|
sce auto handoff preflight-check --require-pass --json # 硬门禁:preflight 不通过则阻断发布
|
|
@@ -631,7 +640,8 @@ MIT 许可证 - 详见 [LICENSE](LICENSE) 文件。
|
|
|
631
640
|
```bash
|
|
632
641
|
npm install -g scene-capability-engine
|
|
633
642
|
sce adopt
|
|
634
|
-
sce
|
|
643
|
+
sce studio plan --scene scene.demo --from-chat session-demo --goal "bootstrap first feature" --json
|
|
644
|
+
sce spec bootstrap --name 01-00-my-first-feature --scene scene.demo --non-interactive
|
|
635
645
|
```
|
|
636
646
|
|
|
637
647
|
---
|
|
@@ -817,6 +817,10 @@ registerLockCommands(program);
|
|
|
817
817
|
const { registerKnowledgeCommands } = require('../lib/commands/knowledge');
|
|
818
818
|
registerKnowledgeCommands(program);
|
|
819
819
|
|
|
820
|
+
// Errorbook commands
|
|
821
|
+
const { registerErrorbookCommands } = require('../lib/commands/errorbook');
|
|
822
|
+
registerErrorbookCommands(program);
|
|
823
|
+
|
|
820
824
|
// Studio orchestration commands
|
|
821
825
|
const { registerStudioCommands } = require('../lib/commands/studio');
|
|
822
826
|
registerStudioCommands(program);
|
|
@@ -49,17 +49,20 @@ sce doctor
|
|
|
49
49
|
### Spec Management
|
|
50
50
|
|
|
51
51
|
```bash
|
|
52
|
+
# Ensure an active scene primary session exists first
|
|
53
|
+
sce studio plan --scene scene.customer-order-inventory --from-chat session-20260226 --goal "spec delivery cycle" --json
|
|
54
|
+
|
|
52
55
|
# Legacy low-level: create spec directory only
|
|
53
56
|
sce create-spec 01-00-feature-name
|
|
54
57
|
|
|
55
58
|
# Bootstrap full Spec draft (requirements/design/tasks)
|
|
56
|
-
sce spec bootstrap --name 01-00-feature-name --non-interactive
|
|
59
|
+
sce spec bootstrap --name 01-00-feature-name --scene scene.customer-order-inventory --non-interactive
|
|
57
60
|
|
|
58
61
|
# Run pipeline for one Spec
|
|
59
|
-
sce spec pipeline run --spec 01-00-feature-name
|
|
62
|
+
sce spec pipeline run --spec 01-00-feature-name --scene scene.customer-order-inventory
|
|
60
63
|
|
|
61
64
|
# Run gate for one Spec
|
|
62
|
-
sce spec gate run --spec 01-00-feature-name --json
|
|
65
|
+
sce spec gate run --spec 01-00-feature-name --scene scene.customer-order-inventory --json
|
|
63
66
|
|
|
64
67
|
# Multi-Spec mode defaults to orchestrate routing
|
|
65
68
|
sce spec bootstrap --specs "spec-a,spec-b" --max-parallel 3
|
|
@@ -70,6 +73,11 @@ sce spec gate run --specs "spec-a,spec-b" --max-parallel 3
|
|
|
70
73
|
sce status --verbose
|
|
71
74
|
```
|
|
72
75
|
|
|
76
|
+
Spec session governance:
|
|
77
|
+
- `spec bootstrap|pipeline run|gate run` must bind to an active scene primary session (`--scene <scene-id>` or implicit binding from latest/unique active scene).
|
|
78
|
+
- When multiple active scenes exist, you must pass `--scene` explicitly.
|
|
79
|
+
- Multi-Spec orchestrate fallback (`--specs ...`) follows the same scene binding and writes per-spec child-session archive records.
|
|
80
|
+
|
|
73
81
|
### Value Metrics
|
|
74
82
|
|
|
75
83
|
```bash
|
|
@@ -152,6 +160,11 @@ sce session snapshot release-20260224 --summary "post-gate checkpoint" --payload
|
|
|
152
160
|
sce session show release-20260224 --json
|
|
153
161
|
```
|
|
154
162
|
|
|
163
|
+
Session governance defaults:
|
|
164
|
+
- `1 scene = 1 primary session` (managed by `studio plan --scene ...`)
|
|
165
|
+
- `spec` runs can bind as child sessions (`spec bootstrap|pipeline --scene <scene-id>`)
|
|
166
|
+
- successful `studio release` auto-archives current scene session and opens next cycle session
|
|
167
|
+
|
|
155
168
|
### Watch Mode
|
|
156
169
|
|
|
157
170
|
```bash
|
|
@@ -318,13 +331,73 @@ Rate-limit profiles:
|
|
|
318
331
|
- `balanced`: default profile for normal multi-agent runs
|
|
319
332
|
- `aggressive`: higher throughput with lower protection margins
|
|
320
333
|
|
|
334
|
+
### Errorbook (Curated Failure Knowledge)
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# Record curated remediation entry
|
|
338
|
+
sce errorbook record \
|
|
339
|
+
--title "Order approval queue saturation" \
|
|
340
|
+
--symptom "Approval queue backlog exceeded SLA" \
|
|
341
|
+
--root-cause "Worker pool under-provisioned and retries amplified load" \
|
|
342
|
+
--fix-action "Increase workers from 4 to 8" \
|
|
343
|
+
--fix-action "Reduce retry burst window" \
|
|
344
|
+
--verification "Load test confirms p95 < SLA threshold" \
|
|
345
|
+
--ontology "entity,relation,decision_policy" \
|
|
346
|
+
--tags "moqui,order,performance" \
|
|
347
|
+
--status verified \
|
|
348
|
+
--json
|
|
349
|
+
|
|
350
|
+
# List/show/find entries
|
|
351
|
+
sce errorbook list --status promoted --min-quality 75 --json
|
|
352
|
+
sce errorbook show <entry-id> --json
|
|
353
|
+
sce errorbook find --query "approve order timeout" --limit 10 --json
|
|
354
|
+
|
|
355
|
+
# Promote only after strict gate checks pass
|
|
356
|
+
sce errorbook promote <entry-id> --json
|
|
357
|
+
|
|
358
|
+
# Eliminate obsolete/low-value entries (curation)
|
|
359
|
+
sce errorbook deprecate <entry-id> --reason "superseded by v2 policy" --json
|
|
360
|
+
|
|
361
|
+
# Requalify deprecated entry after remediation review
|
|
362
|
+
sce errorbook requalify <entry-id> --status verified --json
|
|
363
|
+
|
|
364
|
+
# Release hard gate (default in prepublish and studio release preflight)
|
|
365
|
+
sce errorbook release-gate --min-risk high --fail-on-block --json
|
|
366
|
+
|
|
367
|
+
# Git managed hard gate (default in prepublish and studio release preflight)
|
|
368
|
+
node scripts/git-managed-gate.js --fail-on-violation --json
|
|
369
|
+
```
|
|
370
|
+
|
|
371
|
+
Curated quality policy (`宁缺毋滥,优胜略汰`) defaults:
|
|
372
|
+
- `record` requires: `title`, `symptom`, `root_cause`, and at least one `fix_action`.
|
|
373
|
+
- Fingerprint dedup is automatic; repeated records merge evidence and increment occurrence count.
|
|
374
|
+
- `promote` enforces strict gate:
|
|
375
|
+
- `root_cause` present
|
|
376
|
+
- `fix_actions` non-empty
|
|
377
|
+
- `verification_evidence` non-empty
|
|
378
|
+
- `ontology_tags` non-empty
|
|
379
|
+
- `quality_score >= 75`
|
|
380
|
+
- `deprecate` requires explicit `--reason` to preserve elimination traceability.
|
|
381
|
+
- `requalify` only accepts `candidate|verified`; `promoted` must still go through `promote` gate.
|
|
382
|
+
- `release-gate` blocks release when unresolved high-risk `candidate` entries remain.
|
|
383
|
+
- `git-managed-gate` blocks release when:
|
|
384
|
+
- worktree has uncommitted changes
|
|
385
|
+
- branch has no upstream
|
|
386
|
+
- branch is ahead/behind upstream
|
|
387
|
+
- upstream is not a GitHub/GitLab remote (when such remotes exist)
|
|
388
|
+
- If project has no GitHub/GitLab remote, gate passes by default (can hard-enforce with `--no-allow-no-remote` or `SCE_GIT_MANAGEMENT_ALLOW_NO_REMOTE=0`).
|
|
389
|
+
- In CI/tag detached-HEAD context (`CI=1` or `GITHUB_ACTIONS=1`), branch/upstream sync checks are relaxed by default.
|
|
390
|
+
Use `SCE_GIT_MANAGEMENT_STRICT_CI=1` (or `--strict-ci`) to enforce full local-level branch checks in CI.
|
|
391
|
+
|
|
321
392
|
### Studio Workflow
|
|
322
393
|
|
|
323
394
|
```bash
|
|
324
|
-
# Build a plan from chat/session context
|
|
325
|
-
sce studio plan --from-chat session-20260226 --goal "customer+order+inventory demo" --json
|
|
395
|
+
# Build a plan from chat/session context (scene is mandatory and becomes the primary session anchor)
|
|
396
|
+
sce studio plan --scene scene.customer-order-inventory --from-chat session-20260226 --goal "customer+order+inventory demo" --json
|
|
326
397
|
|
|
327
|
-
# Generate patch bundle metadata
|
|
398
|
+
# Generate patch bundle metadata (scene is inherited from plan)
|
|
399
|
+
sce studio generate --target 331 --json
|
|
400
|
+
# Optional explicit scene check (must match planned scene)
|
|
328
401
|
sce studio generate --scene scene.customer-order-inventory --target 331 --json
|
|
329
402
|
|
|
330
403
|
# Apply generated patch metadata
|
|
@@ -352,6 +425,8 @@ SCE_STUDIO_REQUIRE_AUTH=1 SCE_STUDIO_AUTH_PASSWORD=top-secret sce studio apply -
|
|
|
352
425
|
```
|
|
353
426
|
|
|
354
427
|
Stage guardrails are enforced by default:
|
|
428
|
+
- `plan` requires `--scene`; SCE binds one active primary session per scene
|
|
429
|
+
- successful `release` auto-archives current scene session and auto-opens the next scene cycle session
|
|
355
430
|
- `generate` requires `plan`
|
|
356
431
|
- `apply` requires `generate`
|
|
357
432
|
- `verify` requires `apply`
|
|
@@ -359,8 +434,9 @@ Stage guardrails are enforced by default:
|
|
|
359
434
|
|
|
360
435
|
Studio gate execution defaults:
|
|
361
436
|
- `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)
|
|
362
|
-
- `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)
|
|
437
|
+
- `release --profile standard` runs executable release preflight (npm pack dry-run, git managed gate, errorbook release gate, weekly ops gate when summary exists, release asset integrity when evidence directory exists, scene package publish-batch ontology gate, handoff capability matrix gate)
|
|
363
438
|
- `verify/release --profile strict` fails when any required gate step is skipped (for example missing manifest/evidence/scripts)
|
|
439
|
+
- Required gate failures are auto-recorded into `.sce/errorbook` as `candidate` entries (tagged `release-blocker`) for follow-up triage.
|
|
364
440
|
|
|
365
441
|
Authorization model (optional, policy-driven):
|
|
366
442
|
- Enable policy: `SCE_STUDIO_REQUIRE_AUTH=1`
|
|
@@ -1619,18 +1695,24 @@ sce --version
|
|
|
1619
1695
|
### Starting a New Feature
|
|
1620
1696
|
|
|
1621
1697
|
```bash
|
|
1698
|
+
# 0. Open a scene primary session
|
|
1699
|
+
sce studio plan --scene scene.customer-order-inventory --from-chat session-20260226 --goal "new feature delivery" --json
|
|
1700
|
+
|
|
1622
1701
|
# 1. Bootstrap spec draft
|
|
1623
|
-
sce spec bootstrap --name 01-00-my-feature --non-interactive
|
|
1702
|
+
sce spec bootstrap --name 01-00-my-feature --scene scene.customer-order-inventory --non-interactive
|
|
1624
1703
|
|
|
1625
1704
|
# 2. Run spec pipeline
|
|
1626
|
-
sce spec pipeline run --spec 01-00-my-feature
|
|
1705
|
+
sce spec pipeline run --spec 01-00-my-feature --scene scene.customer-order-inventory
|
|
1706
|
+
|
|
1707
|
+
# 3. Run spec gate
|
|
1708
|
+
sce spec gate run --spec 01-00-my-feature --scene scene.customer-order-inventory --json
|
|
1627
1709
|
|
|
1628
|
-
#
|
|
1710
|
+
# 4. Export context
|
|
1629
1711
|
sce context export 01-00-my-feature
|
|
1630
1712
|
|
|
1631
|
-
#
|
|
1713
|
+
# 5. Work on tasks...
|
|
1632
1714
|
|
|
1633
|
-
#
|
|
1715
|
+
# 6. Sync progress
|
|
1634
1716
|
sce workspace sync
|
|
1635
1717
|
```
|
|
1636
1718
|
|
|
@@ -95,12 +95,18 @@ rg -n "github.com/scene-capability-engine/sce" README.md README.zh.md docs START
|
|
|
95
95
|
```bash
|
|
96
96
|
git status -sb
|
|
97
97
|
git log --oneline -n 15
|
|
98
|
+
|
|
99
|
+
# Mandatory managed-repo gate (default in prepublish/release preflight)
|
|
100
|
+
node scripts/git-managed-gate.js --fail-on-violation --json
|
|
98
101
|
```
|
|
99
102
|
|
|
100
103
|
Verify:
|
|
101
104
|
|
|
102
105
|
- Working tree is clean.
|
|
103
106
|
- Commits are logically grouped and messages are release-ready.
|
|
107
|
+
- If GitHub/GitLab remote exists, current branch is upstream-tracked and fully synced (ahead=0, behind=0).
|
|
108
|
+
- If customer has no GitHub/GitLab, gate can be bypassed by policy (`SCE_GIT_MANAGEMENT_ALLOW_NO_REMOTE=1`, default).
|
|
109
|
+
- In CI/tag detached-HEAD contexts, branch/upstream sync checks are relaxed by default; enforce strict mode with `SCE_GIT_MANAGEMENT_STRICT_CI=1` when needed.
|
|
104
110
|
|
|
105
111
|
---
|
|
106
112
|
|
|
@@ -80,12 +80,18 @@ rg -n "github.com/scene-capability-engine/sce" README.md README.zh.md docs START
|
|
|
80
80
|
```bash
|
|
81
81
|
git status -sb
|
|
82
82
|
git log --oneline -n 15
|
|
83
|
+
|
|
84
|
+
# 强制托管门禁(prepublish/release preflight 默认执行)
|
|
85
|
+
node scripts/git-managed-gate.js --fail-on-violation --json
|
|
83
86
|
```
|
|
84
87
|
|
|
85
88
|
确认:
|
|
86
89
|
|
|
87
90
|
- 工作区干净;
|
|
88
91
|
- 提交分组清晰、提交信息可直接用于发布记录。
|
|
92
|
+
- 若配置了 GitHub/GitLab 远端:当前分支必须已设置 upstream 且与远端完全同步(ahead=0, behind=0)。
|
|
93
|
+
- 若客户确实没有 GitHub/GitLab:可通过策略放行(`SCE_GIT_MANAGEMENT_ALLOW_NO_REMOTE=1`,默认开启)。
|
|
94
|
+
- 在 CI/tag 的 detached HEAD 场景下,默认放宽分支/upstream 同步检查;如需强制严格校验,设置 `SCE_GIT_MANAGEMENT_STRICT_CI=1`。
|
|
89
95
|
|
|
90
96
|
---
|
|
91
97
|
|