scene-capability-engine 3.5.2 → 3.6.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 +28 -0
- package/README.md +14 -4
- package/README.zh.md +14 -4
- package/bin/scene-capability-engine.js +2 -0
- package/docs/command-reference.md +23 -4
- package/docs/release-checklist.md +3 -3
- package/docs/zh/release-checklist.md +3 -3
- package/lib/commands/studio.js +246 -59
- 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 +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.6.2] - 2026-03-04
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Release default test gate now runs integration tests only (`npm run test:release`) for faster online publish verification.
|
|
14
|
+
- `prepublishOnly` now uses `test:release` instead of `test:full`.
|
|
15
|
+
- GitHub `release.yml` test job now runs integration-only release tests and skips coverage in release path.
|
|
16
|
+
- Studio task-stream schema now includes normalized task-intent fields (`title_norm`, `raw_request`, `sub_goals`, `acceptance_criteria`, `needs_split`, `confidence`) while preserving existing task fields for compatibility.
|
|
17
|
+
- Added version CLI integration coverage (`tests/integration/version-cli.integration.test.js`) to ensure `--version` output remains deterministic and package-aligned.
|
|
18
|
+
|
|
19
|
+
## [3.6.0] - 2026-03-04
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
- SQLite-backed SCE state store (`.sce/state/sce-state.sqlite`) for scene/spec/task-ref/event runtime governance.
|
|
23
|
+
- Hierarchical task reference registry (`SS.PP.TT`) persisted in SQLite (`task_ref_registry` table).
|
|
24
|
+
- New task reference commands:
|
|
25
|
+
- `sce task ref --scene <scene-id> --spec <spec-id> --task <task-id> --json`
|
|
26
|
+
- `sce task show --ref <SS.PP.TT> --json`
|
|
27
|
+
- `sce task rerun --ref <SS.PP.TT> [--dry-run] --json`
|
|
28
|
+
- New module: `lib/task/task-ref-registry.js`.
|
|
29
|
+
- New state-store unit tests for sqlite-only backend enforcement and fallback gating.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
- Studio task-stream payload now includes `taskRef` at root level and `task.ref` in `task` object.
|
|
33
|
+
- Studio `task.summary` now carries task reference context for UI traceability.
|
|
34
|
+
- Studio event stream persistence switched to SQLite (`studio_event_stream`) as the single source of truth.
|
|
35
|
+
- CLI now registers a dedicated `task` command group (`claim/unclaim/list/status/ref/show/rerun`).
|
|
36
|
+
- State backend selection now enforces sqlite-only runtime policy (no legacy file backend branch).
|
|
37
|
+
|
|
10
38
|
## [3.5.2] - 2026-03-03
|
|
11
39
|
|
|
12
40
|
### Added
|
package/README.md
CHANGED
|
@@ -129,19 +129,29 @@ SCE is tool-agnostic and works with Codex, Claude Code, Cursor, Windsurf, VS Cod
|
|
|
129
129
|
- `sce workspace takeover-apply --json`
|
|
130
130
|
|
|
131
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`
|
|
132
|
+
- IDs: `sessionId`, `sceneId`, `specId`, `taskId`, `taskRef`, `eventId`
|
|
133
|
+
- Task: `task.task_ref`, `task.title_norm`, `task.raw_request`, `task.goal`, `task.sub_goals`, `task.acceptance_criteria`, `task.needs_split`, `task.confidence`, `task.status`, `task.summary` (3-line), `task.handoff`, `task.next_action`
|
|
134
134
|
- File refs: `task.file_changes[]` with `path`, `line`, `diffRef`
|
|
135
135
|
- Command logs: `task.commands[]` with `cmd`, `exit_code`, `stdout`, `stderr`, `log_path`
|
|
136
136
|
- Errors: `task.errors[]` with `message`, `error_bundle` (copy-ready)
|
|
137
137
|
- Evidence: `task.evidence[]`
|
|
138
138
|
- Raw audit stream: `event[]` (and `studio events` keeps `events[]` compatibility field)
|
|
139
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
|
|
140
148
|
|
|
141
149
|
---
|
|
142
150
|
|
|
143
151
|
## Important Version Changes
|
|
144
152
|
|
|
153
|
+
- `3.6.2`: Added release-level version integration tests (`tests/integration/version-cli.integration.test.js`) and switched release default verification to integration-only gate (`npm run test:release`) for faster publish feedback.
|
|
154
|
+
- `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.
|
|
145
155
|
- `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
156
|
- `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.
|
|
147
157
|
- `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.
|
|
@@ -191,5 +201,5 @@ MIT. See [LICENSE](LICENSE).
|
|
|
191
201
|
|
|
192
202
|
---
|
|
193
203
|
|
|
194
|
-
**Version**: 3.
|
|
195
|
-
**Last Updated**: 2026-03-
|
|
204
|
+
**Version**: 3.6.2
|
|
205
|
+
**Last Updated**: 2026-03-04
|
package/README.zh.md
CHANGED
|
@@ -129,19 +129,29 @@ SCE 对工具无锁定,可接入 Codex、Claude Code、Cursor、Windsurf、VS
|
|
|
129
129
|
- `sce workspace takeover-apply --json`
|
|
130
130
|
|
|
131
131
|
Studio 任务流输出契约(默认):
|
|
132
|
-
- ID 字段:`sessionId`、`sceneId`、`specId`、`taskId`、`eventId`
|
|
133
|
-
- 任务主体:`task.goal`、`task.status`、`task.summary`(固定三行)、`task.handoff`、`task.next_action`
|
|
132
|
+
- ID 字段:`sessionId`、`sceneId`、`specId`、`taskId`、`taskRef`、`eventId`
|
|
133
|
+
- 任务主体:`task.task_ref`、`task.title_norm`、`task.raw_request`、`task.goal`、`task.sub_goals`、`task.acceptance_criteria`、`task.needs_split`、`task.confidence`、`task.status`、`task.summary`(固定三行)、`task.handoff`、`task.next_action`
|
|
134
134
|
- 文件引用:`task.file_changes[]`(`path`、`line`、`diffRef`)
|
|
135
135
|
- 命令执行:`task.commands[]`(`cmd`、`exit_code`、`stdout`、`stderr`、`log_path`)
|
|
136
136
|
- 错误复制:`task.errors[]`(`message`、`error_bundle`,可直接复制给 AI 修复)
|
|
137
137
|
- 证据引用:`task.evidence[]`
|
|
138
138
|
- 原始审计流:`event[]`(`studio events` 同时保留 `events[]` 兼容字段)
|
|
139
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 不可用,任务引用/事件持久化会快速失败
|
|
140
148
|
|
|
141
149
|
---
|
|
142
150
|
|
|
143
151
|
## 重要版本变更
|
|
144
152
|
|
|
153
|
+
- `3.6.2`:新增发布版本号集成测试(`tests/integration/version-cli.integration.test.js`),并将发布默认验证切换为仅 integration 门禁(`npm run test:release`),加速发布反馈。
|
|
154
|
+
- `3.6.0`:新增分层任务引用(`taskRef`,格式 `SS.PP.TT`),持久化到 SQLite 状态库 `.sce/state/sce-state.sqlite`;新增 `sce task ref/show/rerun` 用于引用查询与可重放执行。
|
|
145
155
|
- `3.5.2`:新增 Studio 任务流输出契约(`sessionId/sceneId/specId/taskId/eventId`、结构化 `task.*` 字段、`event[]` 审计流),并新增 OpenHands 原始事件桥接能力:`sce studio events --openhands-events <path>`。
|
|
146
156
|
- `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 的场景映射。
|
|
147
157
|
- `3.5.0`:新增 Studio 目标自动 intake + 场景 spec 组合治理(`sce studio intake`、`sce studio portfolio`),并默认启用 intake 策略基线与治理快照产物,控制场景内 spec 无序增长。
|
|
@@ -191,5 +201,5 @@ MIT,见 [LICENSE](LICENSE)。
|
|
|
191
201
|
|
|
192
202
|
---
|
|
193
203
|
|
|
194
|
-
**版本**:3.
|
|
195
|
-
**最后更新**:2026-03-
|
|
204
|
+
**版本**:3.6.2
|
|
205
|
+
**最后更新**: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');
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
> Quick reference for all `sce` commands
|
|
4
4
|
|
|
5
5
|
**Version**: 3.5.2
|
|
6
|
-
**Last Updated**: 2026-03-
|
|
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
|
|
@@ -570,14 +586,17 @@ SCE_STUDIO_REQUIRE_AUTH=1 SCE_STUDIO_AUTH_PASSWORD=top-secret sce studio apply -
|
|
|
570
586
|
```
|
|
571
587
|
|
|
572
588
|
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`
|
|
589
|
+
- root IDs: `sessionId`, `sceneId`, `specId`, `taskId`, `taskRef`, `eventId`
|
|
590
|
+
- `task.task_ref`, `task.title_norm`, `task.raw_request`, `task.goal`, `task.sub_goals`, `task.acceptance_criteria`, `task.needs_split`, `task.confidence`, `task.status`, `task.summary` (fixed 3-line summary), `task.handoff`, `task.next_action`
|
|
575
591
|
- `task.file_changes[]`: `path`, `line`, `diffRef`
|
|
576
592
|
- `task.commands[]`: `cmd`, `exit_code`, `stdout`, `stderr`, `log_path`
|
|
577
593
|
- `task.errors[]`: `message`, `error_bundle` (copy-ready diagnostic bundle)
|
|
578
594
|
- `task.evidence[]`: structured evidence references
|
|
579
595
|
- `event[]`: raw audit event stream (`studio events` also keeps legacy `events[]` for compatibility)
|
|
580
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`
|
|
581
600
|
|
|
582
601
|
Stage guardrails are enforced by default:
|
|
583
602
|
- `plan` requires `--scene`; SCE binds one active primary session per scene
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
## 1. Functional Verification
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
#
|
|
11
|
-
npm run test:
|
|
10
|
+
# Default release test gate (integration-only)
|
|
11
|
+
npm run test:release
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# Optional full regression suite (unit + integration + properties)
|
|
14
14
|
npm run test:full
|
|
15
15
|
|
|
16
16
|
# Guardrail: fail on newly introduced .skip tests
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
## 1. 功能验证
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
#
|
|
11
|
-
npm run test:
|
|
10
|
+
# 默认发布测试门禁(仅 integration)
|
|
11
|
+
npm run test:release
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# 可选全量回归(unit + integration + properties)
|
|
14
14
|
npm run test:full
|
|
15
15
|
|
|
16
16
|
# 防回归:禁止新增 .skip 测试
|