scene-capability-engine 3.5.1 → 3.6.0
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 +34 -0
- package/README.md +22 -2
- package/README.zh.md +22 -2
- package/bin/scene-capability-engine.js +2 -0
- package/docs/command-reference.md +34 -3
- package/lib/commands/studio.js +882 -58
- package/lib/commands/task.js +630 -68
- package/lib/state/sce-state-store.js +594 -0
- package/lib/task/task-ref-registry.js +139 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,40 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.6.0] - 2026-03-04
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- SQLite-backed SCE state store (`.sce/state/sce-state.sqlite`) for scene/spec/task-ref/event runtime governance.
|
|
14
|
+
- Hierarchical task reference registry (`SS.PP.TT`) persisted in SQLite (`task_ref_registry` table).
|
|
15
|
+
- New task reference commands:
|
|
16
|
+
- `sce task ref --scene <scene-id> --spec <spec-id> --task <task-id> --json`
|
|
17
|
+
- `sce task show --ref <SS.PP.TT> --json`
|
|
18
|
+
- `sce task rerun --ref <SS.PP.TT> [--dry-run] --json`
|
|
19
|
+
- New module: `lib/task/task-ref-registry.js`.
|
|
20
|
+
- New state-store unit tests for sqlite-only backend enforcement and fallback gating.
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
- Studio task-stream payload now includes `taskRef` at root level and `task.ref` in `task` object.
|
|
24
|
+
- Studio `task.summary` now carries task reference context for UI traceability.
|
|
25
|
+
- Studio event stream persistence switched to SQLite (`studio_event_stream`) as the single source of truth.
|
|
26
|
+
- CLI now registers a dedicated `task` command group (`claim/unclaim/list/status/ref/show/rerun`).
|
|
27
|
+
- State backend selection now enforces sqlite-only runtime policy (no legacy file backend branch).
|
|
28
|
+
|
|
29
|
+
## [3.5.2] - 2026-03-03
|
|
30
|
+
|
|
31
|
+
### Added
|
|
32
|
+
- Studio task-stream contract in command JSON payloads:
|
|
33
|
+
- root IDs: `sessionId`, `sceneId`, `specId`, `taskId`, `eventId`
|
|
34
|
+
- normalized task payload: `task.goal`, `task.status`, `task.summary`, `task.handoff`, `task.next_action`
|
|
35
|
+
- UI-ready arrays: `task.file_changes[]`, `task.commands[]`, `task.errors[]`, `task.evidence[]`
|
|
36
|
+
- raw audit passthrough: `event[]` (with `studio events` keeping `events[]` compatibility)
|
|
37
|
+
- OpenHands bridge for task stream:
|
|
38
|
+
- `sce studio events --openhands-events <path>`
|
|
39
|
+
- supports `.json`/`.jsonl` raw OpenHands events ingestion and maps to SCE task contract fields
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
- `studio verify/release` now persist `gate_steps` in stage metadata so command execution details can be surfaced in `task.commands[]` and `task.errors[]`.
|
|
43
|
+
|
|
10
44
|
## [3.5.1] - 2026-03-03
|
|
11
45
|
|
|
12
46
|
### Added
|
package/README.md
CHANGED
|
@@ -128,10 +128,30 @@ SCE is tool-agnostic and works with Codex, Claude Code, Cursor, Windsurf, VS Cod
|
|
|
128
128
|
- `sce workspace takeover-audit --json`
|
|
129
129
|
- `sce workspace takeover-apply --json`
|
|
130
130
|
|
|
131
|
+
Studio task-stream output contract (default):
|
|
132
|
+
- IDs: `sessionId`, `sceneId`, `specId`, `taskId`, `taskRef`, `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
|
+
- Hierarchical task reference operations:
|
|
141
|
+
- `sce task ref --scene <scene-id> --spec <spec-id> --task <task-id> --json`
|
|
142
|
+
- `sce task show --ref <SS.PP.TT> --json`
|
|
143
|
+
- `sce task rerun --ref <SS.PP.TT> [--dry-run] --json`
|
|
144
|
+
- Runtime governance state store policy:
|
|
145
|
+
- SQLite-only backend (`.sce/state/sce-state.sqlite`)
|
|
146
|
+
- In-memory fallback only in `NODE_ENV=test` or when `SCE_STATE_ALLOW_MEMORY_FALLBACK=1`
|
|
147
|
+
- Outside those conditions, unavailable SQLite support fails fast for task-ref/event persistence
|
|
148
|
+
|
|
131
149
|
---
|
|
132
150
|
|
|
133
151
|
## Important Version Changes
|
|
134
152
|
|
|
153
|
+
- `3.6.0`: Added hierarchical task references (`taskRef`, format `SS.PP.TT`) backed by SQLite state store `.sce/state/sce-state.sqlite`, plus new task commands (`sce task ref/show/rerun`) for reference lookup and deterministic rerun.
|
|
154
|
+
- `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>`.
|
|
135
155
|
- `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.
|
|
136
156
|
- `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.
|
|
137
157
|
- `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.
|
|
@@ -180,5 +200,5 @@ MIT. See [LICENSE](LICENSE).
|
|
|
180
200
|
|
|
181
201
|
---
|
|
182
202
|
|
|
183
|
-
**Version**: 3.
|
|
184
|
-
**Last Updated**: 2026-03-
|
|
203
|
+
**Version**: 3.6.0
|
|
204
|
+
**Last Updated**: 2026-03-04
|
package/README.zh.md
CHANGED
|
@@ -128,10 +128,30 @@ SCE 对工具无锁定,可接入 Codex、Claude Code、Cursor、Windsurf、VS
|
|
|
128
128
|
- `sce workspace takeover-audit --json`
|
|
129
129
|
- `sce workspace takeover-apply --json`
|
|
130
130
|
|
|
131
|
+
Studio 任务流输出契约(默认):
|
|
132
|
+
- ID 字段:`sessionId`、`sceneId`、`specId`、`taskId`、`taskRef`、`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
|
+
- 分层任务引用操作:
|
|
141
|
+
- `sce task ref --scene <scene-id> --spec <spec-id> --task <task-id> --json`
|
|
142
|
+
- `sce task show --ref <SS.PP.TT> --json`
|
|
143
|
+
- `sce task rerun --ref <SS.PP.TT> [--dry-run] --json`
|
|
144
|
+
- 运行时治理状态库策略:
|
|
145
|
+
- 仅支持 SQLite 后端(`.sce/state/sce-state.sqlite`)
|
|
146
|
+
- 仅在 `NODE_ENV=test` 或 `SCE_STATE_ALLOW_MEMORY_FALLBACK=1` 时允许内存回退
|
|
147
|
+
- 在上述条件之外若 SQLite 不可用,任务引用/事件持久化会快速失败
|
|
148
|
+
|
|
131
149
|
---
|
|
132
150
|
|
|
133
151
|
## 重要版本变更
|
|
134
152
|
|
|
153
|
+
- `3.6.0`:新增分层任务引用(`taskRef`,格式 `SS.PP.TT`),持久化到 SQLite 状态库 `.sce/state/sce-state.sqlite`;新增 `sce task ref/show/rerun` 用于引用查询与可重放执行。
|
|
154
|
+
- `3.5.2`:新增 Studio 任务流输出契约(`sessionId/sceneId/specId/taskId/eventId`、结构化 `task.*` 字段、`event[]` 审计流),并新增 OpenHands 原始事件桥接能力:`sce studio events --openhands-events <path>`。
|
|
135
155
|
- `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 的场景映射。
|
|
136
156
|
- `3.5.0`:新增 Studio 目标自动 intake + 场景 spec 组合治理(`sce studio intake`、`sce studio portfolio`),并默认启用 intake 策略基线与治理快照产物,控制场景内 spec 无序增长。
|
|
137
157
|
- `3.4.6`:新增默认 `problem-closure-gate` + `problem-contract` 基线,并强化问题评估强制维度(`problem_contract`/`ontology_alignment`/`convergence`),提升 verify/release 收敛控制。
|
|
@@ -180,5 +200,5 @@ MIT,见 [LICENSE](LICENSE)。
|
|
|
180
200
|
|
|
181
201
|
---
|
|
182
202
|
|
|
183
|
-
**版本**:3.
|
|
184
|
-
**最后更新**:2026-03-
|
|
203
|
+
**版本**:3.6.0
|
|
204
|
+
**最后更新**:2026-03-04
|
|
@@ -23,6 +23,7 @@ const { registerSpecDomainCommand } = require('../lib/commands/spec-domain');
|
|
|
23
23
|
const { registerSpecRelatedCommand } = require('../lib/commands/spec-related');
|
|
24
24
|
const { registerTimelineCommands } = require('../lib/commands/timeline');
|
|
25
25
|
const { registerValueCommands } = require('../lib/commands/value');
|
|
26
|
+
const { registerTaskCommands } = require('../lib/commands/task');
|
|
26
27
|
const VersionChecker = require('../lib/version/version-checker');
|
|
27
28
|
const {
|
|
28
29
|
findLegacyKiroDirectories,
|
|
@@ -943,6 +944,7 @@ registerOrchestrateCommands(program);
|
|
|
943
944
|
|
|
944
945
|
// Value realization and observability commands
|
|
945
946
|
registerValueCommands(program);
|
|
947
|
+
registerTaskCommands(program);
|
|
946
948
|
|
|
947
949
|
// Template management commands
|
|
948
950
|
const templatesCommand = require('../lib/commands/templates');
|
|
@@ -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-04
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -181,10 +181,26 @@ sce task claim <spec-name> <task-id>
|
|
|
181
181
|
# Unclaim a task
|
|
182
182
|
sce task unclaim <spec-name> <task-id>
|
|
183
183
|
|
|
184
|
-
#
|
|
184
|
+
# List claimed tasks
|
|
185
|
+
sce task list <spec-name>
|
|
185
186
|
sce task status <spec-name>
|
|
187
|
+
|
|
188
|
+
# Resolve or create hierarchical task reference (scene.spec.task)
|
|
189
|
+
sce task ref --scene <scene-id> --spec <spec-id> --task <task-id> --json
|
|
190
|
+
|
|
191
|
+
# Show task mapping from hierarchical ref
|
|
192
|
+
sce task show --ref <SS.PP.TT> --json
|
|
193
|
+
|
|
194
|
+
# Rerun by hierarchical ref (dry-run preview)
|
|
195
|
+
sce task rerun --ref <SS.PP.TT> --dry-run --json
|
|
186
196
|
```
|
|
187
197
|
|
|
198
|
+
Task references and studio runtime events are persisted in SQLite state store:
|
|
199
|
+
- `.sce/state/sce-state.sqlite`
|
|
200
|
+
- Backend policy: SQLite only (no file-backend mode).
|
|
201
|
+
- In-memory fallback is restricted to `NODE_ENV=test` or `SCE_STATE_ALLOW_MEMORY_FALLBACK=1`.
|
|
202
|
+
- If SQLite runtime support is unavailable outside fallback conditions, `task ref/show/rerun` and `studio events` persistence operations fail fast.
|
|
203
|
+
|
|
188
204
|
### Context & Prompts
|
|
189
205
|
|
|
190
206
|
```bash
|
|
@@ -550,6 +566,8 @@ sce studio resume --job <job-id> --json
|
|
|
550
566
|
|
|
551
567
|
# Inspect recent stage events
|
|
552
568
|
sce studio events --job <job-id> --limit 50 --json
|
|
569
|
+
# Map OpenHands raw events into the same task-stream contract
|
|
570
|
+
sce studio events --job <job-id> --openhands-events ./openhands-events.json --json
|
|
553
571
|
|
|
554
572
|
# Rollback a job after apply/release
|
|
555
573
|
sce studio rollback --job <job-id> --reason "manual-check-failed" --json
|
|
@@ -567,6 +585,19 @@ sce studio backfill-spec-scenes --scene scene.unassigned --limit 20 --apply --js
|
|
|
567
585
|
SCE_STUDIO_REQUIRE_AUTH=1 SCE_STUDIO_AUTH_PASSWORD=top-secret sce studio apply --job <job-id> --auth-password top-secret --json
|
|
568
586
|
```
|
|
569
587
|
|
|
588
|
+
Studio JSON output now includes a stable UI-oriented task stream contract (in addition to existing `job_*` fields):
|
|
589
|
+
- root IDs: `sessionId`, `sceneId`, `specId`, `taskId`, `taskRef`, `eventId`
|
|
590
|
+
- `task.goal`, `task.status`, `task.summary` (fixed 3-line summary), `task.handoff`, `task.next_action`
|
|
591
|
+
- `task.file_changes[]`: `path`, `line`, `diffRef`
|
|
592
|
+
- `task.commands[]`: `cmd`, `exit_code`, `stdout`, `stderr`, `log_path`
|
|
593
|
+
- `task.errors[]`: `message`, `error_bundle` (copy-ready diagnostic bundle)
|
|
594
|
+
- `task.evidence[]`: structured evidence references
|
|
595
|
+
- `event[]`: raw audit event stream (`studio events` also keeps legacy `events[]` for compatibility)
|
|
596
|
+
- `studio events --openhands-events <path>` switches `source_stream=openhands` and maps OpenHands raw events to the same task contract fields.
|
|
597
|
+
- hierarchical task reference lookup/rerun:
|
|
598
|
+
- `sce task show --ref <SS.PP.TT> --json`
|
|
599
|
+
- `sce task rerun --ref <SS.PP.TT> [--dry-run] --json`
|
|
600
|
+
|
|
570
601
|
Stage guardrails are enforced by default:
|
|
571
602
|
- `plan` requires `--scene`; SCE binds one active primary session per scene
|
|
572
603
|
- `plan` runs auto intake by default (`.sce/config/studio-intake-policy.json`):
|