scene-capability-engine 3.5.0 → 3.5.2
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 +30 -0
- package/README.md +16 -2
- package/README.zh.md +16 -2
- package/docs/command-reference.md +32 -4
- package/lib/commands/studio.js +862 -28
- package/lib/spec/related-specs.js +10 -2
- package/lib/spec/scene-binding-overrides.js +115 -0
- package/lib/studio/spec-intake-governor.js +328 -5
- package/lib/workspace/takeover-baseline.js +25 -0
- package/package.json +1 -1
- package/template/.sce/config/studio-intake-policy.json +86 -0
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.5.2] - 2026-03-03
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Studio task-stream contract in command JSON payloads:
|
|
14
|
+
- root IDs: `sessionId`, `sceneId`, `specId`, `taskId`, `eventId`
|
|
15
|
+
- normalized task payload: `task.goal`, `task.status`, `task.summary`, `task.handoff`, `task.next_action`
|
|
16
|
+
- UI-ready arrays: `task.file_changes[]`, `task.commands[]`, `task.errors[]`, `task.evidence[]`
|
|
17
|
+
- raw audit passthrough: `event[]` (with `studio events` keeping `events[]` compatibility)
|
|
18
|
+
- OpenHands bridge for task stream:
|
|
19
|
+
- `sce studio events --openhands-events <path>`
|
|
20
|
+
- supports `.json`/`.jsonl` raw OpenHands events ingestion and maps to SCE task contract fields
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- `studio verify/release` now persist `gate_steps` in stage metadata so command execution details can be surfaced in `task.commands[]` and `task.errors[]`.
|
|
24
|
+
|
|
25
|
+
## [3.5.1] - 2026-03-03
|
|
26
|
+
|
|
27
|
+
### Added
|
|
28
|
+
- Studio historical scene backfill command:
|
|
29
|
+
- `sce studio backfill-spec-scenes`
|
|
30
|
+
- supports active-only/default batch backfill and writes `.sce/spec-governance/spec-scene-overrides.json`
|
|
31
|
+
- optionally refreshes governance artifacts after apply
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
- Studio intake/governance policy is now stricter by default:
|
|
35
|
+
- `allow_manual_spec_override=false` blocks `--manual-spec` bypass unless explicitly enabled
|
|
36
|
+
- `governance.require_auto_on_plan=true` blocks `--no-spec-governance` bypass unless explicitly enabled
|
|
37
|
+
- Spec governance and related-spec lookup now read scene override mappings from `.sce/spec-governance/spec-scene-overrides.json`.
|
|
38
|
+
- Takeover/adoption baseline now provisions the stricter intake policy and backfill defaults.
|
|
39
|
+
|
|
10
40
|
## [3.5.0] - 2026-03-02
|
|
11
41
|
|
|
12
42
|
### Added
|
package/README.md
CHANGED
|
@@ -108,6 +108,8 @@ Hard rule defaults:
|
|
|
108
108
|
- After two failed rounds on the same problem fingerprint, debug evidence is required in subsequent attempts.
|
|
109
109
|
- `studio verify/release` run `problem-closure-gate` by default when a spec is bound.
|
|
110
110
|
- `studio plan` auto-runs goal intake (`bind existing spec` or `create spec`) and writes scene portfolio governance snapshots by default.
|
|
111
|
+
- `studio plan --manual-spec` and `--no-spec-governance` are blocked by default policy; use policy overrides only when absolutely necessary.
|
|
112
|
+
- Historical specs can be scene-governed incrementally via `sce studio backfill-spec-scenes --apply` (writes `.sce/spec-governance/spec-scene-overrides.json`).
|
|
111
113
|
|
|
112
114
|
---
|
|
113
115
|
|
|
@@ -126,10 +128,22 @@ SCE is tool-agnostic and works with Codex, Claude Code, Cursor, Windsurf, VS Cod
|
|
|
126
128
|
- `sce workspace takeover-audit --json`
|
|
127
129
|
- `sce workspace takeover-apply --json`
|
|
128
130
|
|
|
131
|
+
Studio task-stream output contract (default):
|
|
132
|
+
- IDs: `sessionId`, `sceneId`, `specId`, `taskId`, `eventId`
|
|
133
|
+
- Task: `task.goal`, `task.status`, `task.summary` (3-line), `task.handoff`, `task.next_action`
|
|
134
|
+
- File refs: `task.file_changes[]` with `path`, `line`, `diffRef`
|
|
135
|
+
- Command logs: `task.commands[]` with `cmd`, `exit_code`, `stdout`, `stderr`, `log_path`
|
|
136
|
+
- Errors: `task.errors[]` with `message`, `error_bundle` (copy-ready)
|
|
137
|
+
- Evidence: `task.evidence[]`
|
|
138
|
+
- Raw audit stream: `event[]` (and `studio events` keeps `events[]` compatibility field)
|
|
139
|
+
- OpenHands bridge: `sce studio events --openhands-events <path>` maps OpenHands raw events into the same task contract (`source_stream=openhands`)
|
|
140
|
+
|
|
129
141
|
---
|
|
130
142
|
|
|
131
143
|
## Important Version Changes
|
|
132
144
|
|
|
145
|
+
- `3.5.2`: Introduced task-stream output contract for Studio commands (`sessionId/sceneId/specId/taskId/eventId`, structured `task.*` fields, `event[]` audit stream) and added OpenHands raw-event bridge via `sce studio events --openhands-events <path>`.
|
|
146
|
+
- `3.5.1`: Enforced stricter Studio intake defaults (`--manual-spec` and `--no-spec-governance` blocked unless policy override), added historical spec scene backfill command (`sce studio backfill-spec-scenes`) and persisted override mapping (`.sce/spec-governance/spec-scene-overrides.json`) for portfolio/related-spec alignment.
|
|
133
147
|
- `3.5.0`: Added Studio automatic goal intake + scene spec portfolio governance (`sce studio intake`, `sce studio portfolio`), including default intake policy baseline and governance artifacts for bounded scene spec growth.
|
|
134
148
|
- `3.4.6`: Added default `problem-closure-gate` + `problem-contract` baseline and strengthened mandatory problem evaluation dimensions (`problem_contract`/`ontology_alignment`/`convergence`) for verify/release convergence control.
|
|
135
149
|
- `3.4.5`: `git-managed-gate` now treats worktree checks as advisory in default relaxed CI mode (`CI/GITHUB_ACTIONS`, non-strict), preventing false release blocking.
|
|
@@ -177,5 +191,5 @@ MIT. See [LICENSE](LICENSE).
|
|
|
177
191
|
|
|
178
192
|
---
|
|
179
193
|
|
|
180
|
-
**Version**: 3.5.
|
|
181
|
-
**Last Updated**: 2026-03-
|
|
194
|
+
**Version**: 3.5.2
|
|
195
|
+
**Last Updated**: 2026-03-03
|
package/README.zh.md
CHANGED
|
@@ -108,6 +108,8 @@ SCE 默认按“问题域闭环”推进诊断与修复:
|
|
|
108
108
|
- 同一问题指纹失败两轮后,后续尝试必须补充 debug 证据。
|
|
109
109
|
- 当 spec 绑定时,`studio verify/release` 默认执行 `problem-closure-gate`。
|
|
110
110
|
- `studio plan` 默认执行目标 intake(自动绑定已有 spec 或新建 spec),并自动写入 scene 维度的 spec 治理快照。
|
|
111
|
+
- 默认策略会阻断 `studio plan --manual-spec` 与 `--no-spec-governance`(仅在确有必要且策略显式放开时可绕过)。
|
|
112
|
+
- 历史 spec 可通过 `sce studio backfill-spec-scenes --apply` 分批回填到 scene 治理映射(写入 `.sce/spec-governance/spec-scene-overrides.json`)。
|
|
111
113
|
|
|
112
114
|
---
|
|
113
115
|
|
|
@@ -126,10 +128,22 @@ SCE 对工具无锁定,可接入 Codex、Claude Code、Cursor、Windsurf、VS
|
|
|
126
128
|
- `sce workspace takeover-audit --json`
|
|
127
129
|
- `sce workspace takeover-apply --json`
|
|
128
130
|
|
|
131
|
+
Studio 任务流输出契约(默认):
|
|
132
|
+
- ID 字段:`sessionId`、`sceneId`、`specId`、`taskId`、`eventId`
|
|
133
|
+
- 任务主体:`task.goal`、`task.status`、`task.summary`(固定三行)、`task.handoff`、`task.next_action`
|
|
134
|
+
- 文件引用:`task.file_changes[]`(`path`、`line`、`diffRef`)
|
|
135
|
+
- 命令执行:`task.commands[]`(`cmd`、`exit_code`、`stdout`、`stderr`、`log_path`)
|
|
136
|
+
- 错误复制:`task.errors[]`(`message`、`error_bundle`,可直接复制给 AI 修复)
|
|
137
|
+
- 证据引用:`task.evidence[]`
|
|
138
|
+
- 原始审计流:`event[]`(`studio events` 同时保留 `events[]` 兼容字段)
|
|
139
|
+
- OpenHands 桥接:`sce studio events --openhands-events <path>` 可将 OpenHands 原始事件映射为同一 task 契约(`source_stream=openhands`)
|
|
140
|
+
|
|
129
141
|
---
|
|
130
142
|
|
|
131
143
|
## 重要版本变更
|
|
132
144
|
|
|
145
|
+
- `3.5.2`:新增 Studio 任务流输出契约(`sessionId/sceneId/specId/taskId/eventId`、结构化 `task.*` 字段、`event[]` 审计流),并新增 OpenHands 原始事件桥接能力:`sce studio events --openhands-events <path>`。
|
|
146
|
+
- `3.5.1`:默认强化 Studio intake 治理(`--manual-spec`、`--no-spec-governance` 在未显式放开策略时会被阻断),新增历史 spec 场景回填命令 `sce studio backfill-spec-scenes`,并写入 `.sce/spec-governance/spec-scene-overrides.json` 以统一 portfolio 与 related-spec 的场景映射。
|
|
133
147
|
- `3.5.0`:新增 Studio 目标自动 intake + 场景 spec 组合治理(`sce studio intake`、`sce studio portfolio`),并默认启用 intake 策略基线与治理快照产物,控制场景内 spec 无序增长。
|
|
134
148
|
- `3.4.6`:新增默认 `problem-closure-gate` + `problem-contract` 基线,并强化问题评估强制维度(`problem_contract`/`ontology_alignment`/`convergence`),提升 verify/release 收敛控制。
|
|
135
149
|
- `3.4.5`:`git-managed-gate` 在默认 CI 放宽模式下(`CI/GITHUB_ACTIONS` 且非 strict)对工作区变更改为告警,不再误阻断发布。
|
|
@@ -177,5 +191,5 @@ MIT,见 [LICENSE](LICENSE)。
|
|
|
177
191
|
|
|
178
192
|
---
|
|
179
193
|
|
|
180
|
-
**版本**:3.5.
|
|
181
|
-
**最后更新**:2026-03-
|
|
194
|
+
**版本**:3.5.2
|
|
195
|
+
**最后更新**:2026-03-03
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> Quick reference for all `sce` commands
|
|
4
4
|
|
|
5
|
-
**Version**: 3.5.
|
|
6
|
-
**Last Updated**: 2026-03-
|
|
5
|
+
**Version**: 3.5.2
|
|
6
|
+
**Last Updated**: 2026-03-03
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -523,8 +523,6 @@ Curated quality policy (`宁缺毋滥,优胜略汰`) defaults:
|
|
|
523
523
|
sce studio plan --scene scene.customer-order-inventory --from-chat session-20260226 --goal "customer+order+inventory demo" --json
|
|
524
524
|
# Recommended: bind spec explicitly so Studio can ingest problem-domain-chain deterministically
|
|
525
525
|
sce studio plan --scene scene.customer-order-inventory --spec 01-00-customer-order-inventory --from-chat session-20260226 --goal "customer+order+inventory demo" --json
|
|
526
|
-
# Disable auto intake for emergency/manual mode
|
|
527
|
-
sce studio plan --scene scene.customer-order-inventory --from-chat session-20260226 --goal "customer+order+inventory demo" --manual-spec --json
|
|
528
526
|
|
|
529
527
|
# Analyze intake decision only (no write by default)
|
|
530
528
|
sce studio intake --scene scene.customer-order-inventory --from-chat session-20260226 --goal "optimize checkout retry flow" --json
|
|
@@ -552,6 +550,8 @@ sce studio resume --job <job-id> --json
|
|
|
552
550
|
|
|
553
551
|
# Inspect recent stage events
|
|
554
552
|
sce studio events --job <job-id> --limit 50 --json
|
|
553
|
+
# Map OpenHands raw events into the same task-stream contract
|
|
554
|
+
sce studio events --job <job-id> --openhands-events ./openhands-events.json --json
|
|
555
555
|
|
|
556
556
|
# Rollback a job after apply/release
|
|
557
557
|
sce studio rollback --job <job-id> --reason "manual-check-failed" --json
|
|
@@ -560,22 +560,42 @@ sce studio rollback --job <job-id> --reason "manual-check-failed" --json
|
|
|
560
560
|
sce studio portfolio --json
|
|
561
561
|
sce studio portfolio --scene scene.customer-order-inventory --strict --json
|
|
562
562
|
|
|
563
|
+
# Backfill historical spec scene bindings into override map (active-only by default)
|
|
564
|
+
sce studio backfill-spec-scenes --apply --json
|
|
565
|
+
# Backfill a bounded batch from unassigned scene and refresh governance snapshot
|
|
566
|
+
sce studio backfill-spec-scenes --scene scene.unassigned --limit 20 --apply --json
|
|
567
|
+
|
|
563
568
|
# Enforce authorization for a protected action
|
|
564
569
|
SCE_STUDIO_REQUIRE_AUTH=1 SCE_STUDIO_AUTH_PASSWORD=top-secret sce studio apply --job <job-id> --auth-password top-secret --json
|
|
565
570
|
```
|
|
566
571
|
|
|
572
|
+
Studio JSON output now includes a stable UI-oriented task stream contract (in addition to existing `job_*` fields):
|
|
573
|
+
- root IDs: `sessionId`, `sceneId`, `specId`, `taskId`, `eventId`
|
|
574
|
+
- `task.goal`, `task.status`, `task.summary` (fixed 3-line summary), `task.handoff`, `task.next_action`
|
|
575
|
+
- `task.file_changes[]`: `path`, `line`, `diffRef`
|
|
576
|
+
- `task.commands[]`: `cmd`, `exit_code`, `stdout`, `stderr`, `log_path`
|
|
577
|
+
- `task.errors[]`: `message`, `error_bundle` (copy-ready diagnostic bundle)
|
|
578
|
+
- `task.evidence[]`: structured evidence references
|
|
579
|
+
- `event[]`: raw audit event stream (`studio events` also keeps legacy `events[]` for compatibility)
|
|
580
|
+
- `studio events --openhands-events <path>` switches `source_stream=openhands` and maps OpenHands raw events to the same task contract fields.
|
|
581
|
+
|
|
567
582
|
Stage guardrails are enforced by default:
|
|
568
583
|
- `plan` requires `--scene`; SCE binds one active primary session per scene
|
|
569
584
|
- `plan` runs auto intake by default (`.sce/config/studio-intake-policy.json`):
|
|
570
585
|
- detect goal intent (`change_request` vs `analysis_only`)
|
|
571
586
|
- resolve spec via explicit binding / scene latest / related specs / auto-create
|
|
572
587
|
- auto-create spec artifacts when no suitable spec is found and policy requires tracking
|
|
588
|
+
- `plan --manual-spec` is blocked by default (`allow_manual_spec_override=false`)
|
|
589
|
+
- `plan --no-spec-governance` is blocked by default (`governance.require_auto_on_plan=true`)
|
|
573
590
|
- `plan --spec <id>` (recommended) ingests `.sce/specs/<spec>/custom/problem-domain-chain.json` into studio job context
|
|
574
591
|
- when `--spec` is omitted, `plan` auto-resolves the latest matching spec chain by `scene_id` when available
|
|
575
592
|
- `plan` auto-searches related historical specs by `scene + goal` and writes top candidates into job metadata (`source.related_specs`)
|
|
576
593
|
- `plan` auto-runs scene spec governance snapshot and writes:
|
|
577
594
|
- `.sce/spec-governance/scene-portfolio.latest.json`
|
|
578
595
|
- `.sce/spec-governance/scene-index.json`
|
|
596
|
+
- historical spec scene backfill can be managed via:
|
|
597
|
+
- `sce studio backfill-spec-scenes --apply`
|
|
598
|
+
- writes `.sce/spec-governance/spec-scene-overrides.json`
|
|
579
599
|
- successful `release` auto-archives current scene session and auto-opens the next scene cycle session
|
|
580
600
|
- `generate` requires `plan`
|
|
581
601
|
- `generate` consumes the plan-stage domain-chain context and writes chain-aware metadata/report (`.sce/reports/studio/generate-<job-id>.json`)
|
|
@@ -657,13 +677,21 @@ Studio intake policy file (default, recommended to commit): `.sce/config/studio-
|
|
|
657
677
|
"enabled": true,
|
|
658
678
|
"auto_create_spec": true,
|
|
659
679
|
"force_spec_for_studio_plan": true,
|
|
680
|
+
"allow_manual_spec_override": false,
|
|
660
681
|
"prefer_existing_scene_spec": true,
|
|
661
682
|
"related_spec_min_score": 45,
|
|
662
683
|
"governance": {
|
|
663
684
|
"auto_run_on_plan": true,
|
|
685
|
+
"require_auto_on_plan": true,
|
|
664
686
|
"max_active_specs_per_scene": 3,
|
|
665
687
|
"stale_days": 14,
|
|
666
688
|
"duplicate_similarity_threshold": 0.66
|
|
689
|
+
},
|
|
690
|
+
"backfill": {
|
|
691
|
+
"enabled": true,
|
|
692
|
+
"active_only_default": true,
|
|
693
|
+
"default_scene_id": "scene.sce-core",
|
|
694
|
+
"override_file": ".sce/spec-governance/spec-scene-overrides.json"
|
|
667
695
|
}
|
|
668
696
|
}
|
|
669
697
|
```
|