scene-capability-engine 3.3.21 → 3.3.23
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 +20 -0
- package/docs/command-reference.md +35 -0
- package/docs/errorbook-registry.md +116 -0
- package/docs/release-checklist.md +1 -0
- package/docs/zh/release-checklist.md +1 -0
- package/lib/adoption/adoption-strategy.js +2 -0
- package/lib/adoption/backup-manager.js +2 -0
- package/lib/adoption/detection-engine.js +2 -0
- package/lib/adoption/file-classifier.js +3 -1
- package/lib/adoption/smart-orchestrator.js +2 -0
- package/lib/adoption/strategy-selector.js +2 -0
- package/lib/adoption/template-sync.js +2 -0
- package/lib/commands/errorbook.js +1000 -10
- package/package.json +1 -1
- package/template/.sce/config/errorbook-registry.json +13 -0
- package/template/.sce/steering/CORE_PRINCIPLES.md +10 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [3.3.22] - 2026-02-27
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Errorbook now supports governed temporary mitigation records (stop-bleeding only):
|
|
14
|
+
- `--temporary-mitigation`
|
|
15
|
+
- `--mitigation-reason`
|
|
16
|
+
- `--mitigation-exit`
|
|
17
|
+
- `--mitigation-cleanup`
|
|
18
|
+
- `--mitigation-deadline`
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- `errorbook release-gate` now blocks release on temporary mitigation policy violations in addition to risk threshold violations:
|
|
22
|
+
- missing exit criteria / cleanup task / deadline
|
|
23
|
+
- expired mitigation deadline
|
|
24
|
+
- Steering baseline strengthened with explicit anti-workaround rules:
|
|
25
|
+
- core-path fail-fast (no silent swallow-and-continue)
|
|
26
|
+
- temporary fallback must be governed and time-bounded
|
|
27
|
+
- release must be blocked until fallback cleanup is completed
|
|
28
|
+
- Command reference and release checklists updated (EN/ZH) for temporary mitigation governance.
|
|
29
|
+
|
|
10
30
|
## [3.3.21] - 2026-02-27
|
|
11
31
|
|
|
12
32
|
### Fixed
|
|
@@ -351,6 +351,16 @@ sce errorbook record \
|
|
|
351
351
|
sce errorbook list --status promoted --min-quality 75 --json
|
|
352
352
|
sce errorbook show <entry-id> --json
|
|
353
353
|
sce errorbook find --query "approve order timeout" --limit 10 --json
|
|
354
|
+
sce errorbook find --query "approve order timeout" --include-registry --json
|
|
355
|
+
# Prefer remote indexed search for large registry
|
|
356
|
+
sce errorbook find --query "approve order timeout" --include-registry --registry-mode remote --json
|
|
357
|
+
sce errorbook find --query "approve order timeout" --include-registry --registry-mode hybrid --json
|
|
358
|
+
|
|
359
|
+
# Export curated local entries for central registry publication
|
|
360
|
+
sce errorbook export --status promoted --min-quality 75 --out .sce/errorbook/exports/registry.json --json
|
|
361
|
+
|
|
362
|
+
# Sync central registry (GitHub raw URL or local file) to local cache
|
|
363
|
+
sce errorbook sync-registry --source https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/errorbook-registry.json --json
|
|
354
364
|
|
|
355
365
|
# Promote only after strict gate checks pass
|
|
356
366
|
sce errorbook promote <entry-id> --json
|
|
@@ -361,6 +371,19 @@ sce errorbook deprecate <entry-id> --reason "superseded by v2 policy" --json
|
|
|
361
371
|
# Requalify deprecated entry after remediation review
|
|
362
372
|
sce errorbook requalify <entry-id> --status verified --json
|
|
363
373
|
|
|
374
|
+
# Record controlled temporary mitigation (stop-bleeding only, must include governance fields)
|
|
375
|
+
sce errorbook record \
|
|
376
|
+
--title "Temporary fallback for order approval lock contention" \
|
|
377
|
+
--symptom "Fallback path enabled to keep approval flow available" \
|
|
378
|
+
--root-cause "Primary lock ordering fix is in progress" \
|
|
379
|
+
--fix-action "Ship lock ordering fix and remove fallback path" \
|
|
380
|
+
--temporary-mitigation \
|
|
381
|
+
--mitigation-reason "Emergency stop-bleeding in production" \
|
|
382
|
+
--mitigation-exit "Primary path concurrency tests are green" \
|
|
383
|
+
--mitigation-cleanup "spec/remove-order-approval-fallback" \
|
|
384
|
+
--mitigation-deadline 2026-03-15T00:00:00Z \
|
|
385
|
+
--json
|
|
386
|
+
|
|
364
387
|
# Release hard gate (default in prepublish and studio release preflight)
|
|
365
388
|
sce errorbook release-gate --min-risk high --fail-on-block --json
|
|
366
389
|
|
|
@@ -380,6 +403,17 @@ Curated quality policy (`宁缺毋滥,优胜略汰`) defaults:
|
|
|
380
403
|
- `deprecate` requires explicit `--reason` to preserve elimination traceability.
|
|
381
404
|
- `requalify` only accepts `candidate|verified`; `promoted` must still go through `promote` gate.
|
|
382
405
|
- `release-gate` blocks release when unresolved high-risk `candidate` entries remain.
|
|
406
|
+
- Temporary mitigation is allowed only as stop-bleeding and must include:
|
|
407
|
+
- `mitigation_exit` (exit criteria)
|
|
408
|
+
- `mitigation_cleanup` (cleanup task/spec)
|
|
409
|
+
- `mitigation_deadline` (deadline)
|
|
410
|
+
- `release-gate` also blocks when temporary mitigation policy is violated:
|
|
411
|
+
- missing exit/cleanup/deadline metadata
|
|
412
|
+
- expired mitigation deadline
|
|
413
|
+
- `export` outputs a machine-readable registry bundle from curated local entries (recommended default: `promoted`, `quality>=75`).
|
|
414
|
+
- `sync-registry` pulls external registry JSON into local cache (`.sce/errorbook/registry-cache.json`) for unified `find` retrieval.
|
|
415
|
+
- `find --include-registry --registry-mode remote` supports direct remote query for large registries (no full local sync required).
|
|
416
|
+
- Recommended for large registries: maintain a remote index file (`registry/errorbook-registry.index.json`) and shard files, then provide `index_url` in registry config.
|
|
383
417
|
- `git-managed-gate` blocks release when:
|
|
384
418
|
- worktree has uncommitted changes
|
|
385
419
|
- branch has no upstream
|
|
@@ -2016,6 +2050,7 @@ Overall Health: 2 healthy, 1 unhealthy
|
|
|
2016
2050
|
- [Cross-Tool Guide](./cross-tool-guide.md)
|
|
2017
2051
|
- [Adoption Guide](./adoption-guide.md)
|
|
2018
2052
|
- [Developer Guide](./developer-guide.md)
|
|
2053
|
+
- [Errorbook Registry Guide](./errorbook-registry.md)
|
|
2019
2054
|
|
|
2020
2055
|
---
|
|
2021
2056
|
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Errorbook Registry Guide
|
|
2
|
+
|
|
3
|
+
This guide defines how to run a shared, cross-project `errorbook` registry as a dedicated GitHub repository.
|
|
4
|
+
|
|
5
|
+
## 1) Repository Scope
|
|
6
|
+
|
|
7
|
+
- Repository role: shared curated failure/remediation knowledge.
|
|
8
|
+
- Recommended repo name: `sce-errorbook-registry`.
|
|
9
|
+
- Keep this repository independent from scene/spec template repositories.
|
|
10
|
+
|
|
11
|
+
## 2) Recommended Repository Structure
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
sce-errorbook-registry/
|
|
15
|
+
registry/
|
|
16
|
+
errorbook-registry.json
|
|
17
|
+
README.md
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
`registry/errorbook-registry.json` should follow:
|
|
21
|
+
|
|
22
|
+
```json
|
|
23
|
+
{
|
|
24
|
+
"api_version": "sce.errorbook.registry/v0.1",
|
|
25
|
+
"generated_at": "2026-02-27T00:00:00.000Z",
|
|
26
|
+
"source": {
|
|
27
|
+
"project": "curation-pipeline",
|
|
28
|
+
"statuses": ["promoted"],
|
|
29
|
+
"min_quality": 75
|
|
30
|
+
},
|
|
31
|
+
"total_entries": 0,
|
|
32
|
+
"entries": []
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
For large registries, add an index + shard layout:
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
registry/
|
|
40
|
+
errorbook-registry.index.json
|
|
41
|
+
shards/
|
|
42
|
+
order.json
|
|
43
|
+
payment.json
|
|
44
|
+
auth.json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Example `registry/errorbook-registry.index.json`:
|
|
48
|
+
|
|
49
|
+
```json
|
|
50
|
+
{
|
|
51
|
+
"api_version": "sce.errorbook.registry-index/v0.1",
|
|
52
|
+
"generated_at": "2026-02-27T00:00:00.000Z",
|
|
53
|
+
"min_token_length": 2,
|
|
54
|
+
"token_to_bucket": {
|
|
55
|
+
"order": "order",
|
|
56
|
+
"approve": "order",
|
|
57
|
+
"payment": "payment"
|
|
58
|
+
},
|
|
59
|
+
"buckets": {
|
|
60
|
+
"order": "https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/shards/order.json",
|
|
61
|
+
"payment": "https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/shards/payment.json"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## 3) Project-Side Configuration
|
|
67
|
+
|
|
68
|
+
Create `.sce/config/errorbook-registry.json`:
|
|
69
|
+
|
|
70
|
+
```json
|
|
71
|
+
{
|
|
72
|
+
"enabled": true,
|
|
73
|
+
"search_mode": "remote",
|
|
74
|
+
"cache_file": ".sce/errorbook/registry-cache.json",
|
|
75
|
+
"sources": [
|
|
76
|
+
{
|
|
77
|
+
"name": "central",
|
|
78
|
+
"enabled": true,
|
|
79
|
+
"url": "https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/errorbook-registry.json",
|
|
80
|
+
"index_url": "https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/errorbook-registry.index.json"
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Notes:
|
|
87
|
+
- `url` must be a raw JSON URL (`raw.githubusercontent.com`) or use a local file path.
|
|
88
|
+
- `search_mode` supports `cache|remote|hybrid` (recommended: `remote` for very large registries).
|
|
89
|
+
- Local cache file is used by cache/hybrid mode.
|
|
90
|
+
|
|
91
|
+
## 4) Daily Workflow
|
|
92
|
+
|
|
93
|
+
1. Export curated local entries:
|
|
94
|
+
```bash
|
|
95
|
+
sce errorbook export --status promoted --min-quality 75 --out .sce/errorbook/exports/registry.json --json
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
2. Merge approved entries into central repo `registry/errorbook-registry.json`.
|
|
99
|
+
|
|
100
|
+
3. Sync central registry into local cache:
|
|
101
|
+
```bash
|
|
102
|
+
sce errorbook sync-registry --source https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/errorbook-registry.json --json
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
4. Search local + shared entries:
|
|
106
|
+
```bash
|
|
107
|
+
sce errorbook find --query "approve order timeout" --include-registry --json
|
|
108
|
+
sce errorbook find --query "approve order timeout" --include-registry --registry-mode remote --json
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## 5) Governance Rules
|
|
112
|
+
|
|
113
|
+
- Publish to central registry only curated entries (recommended: `status=promoted` and `quality>=75`).
|
|
114
|
+
- Do not publish sensitive tenant/customer data.
|
|
115
|
+
- Temporary mitigation entries must remain bounded and governed (exit criteria, cleanup task, deadline).
|
|
116
|
+
- Keep central registry append-only by PR review; deprecate low-value entries through normal curation.
|
|
@@ -107,6 +107,7 @@ Verify:
|
|
|
107
107
|
- If GitHub/GitLab remote exists, current branch is upstream-tracked and fully synced (ahead=0, behind=0).
|
|
108
108
|
- If customer has no GitHub/GitLab, gate can be bypassed by policy (`SCE_GIT_MANAGEMENT_ALLOW_NO_REMOTE=1`, default).
|
|
109
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.
|
|
110
|
+
- Errorbook release gate also enforces temporary mitigation governance: active fallback entries must include cleanup task + exit criteria + deadline, and must not be expired.
|
|
110
111
|
|
|
111
112
|
---
|
|
112
113
|
|
|
@@ -92,6 +92,7 @@ node scripts/git-managed-gate.js --fail-on-violation --json
|
|
|
92
92
|
- 若配置了 GitHub/GitLab 远端:当前分支必须已设置 upstream 且与远端完全同步(ahead=0, behind=0)。
|
|
93
93
|
- 若客户确实没有 GitHub/GitLab:可通过策略放行(`SCE_GIT_MANAGEMENT_ALLOW_NO_REMOTE=1`,默认开启)。
|
|
94
94
|
- 在 CI/tag 的 detached HEAD 场景下,默认放宽分支/upstream 同步检查;如需强制严格校验,设置 `SCE_GIT_MANAGEMENT_STRICT_CI=1`。
|
|
95
|
+
- Errorbook release gate 同时强制临时兜底治理:活动中的兜底记录必须包含退出条件、清理任务和截止时间,且不得过期。
|
|
95
96
|
|
|
96
97
|
---
|
|
97
98
|
|
|
@@ -113,6 +113,8 @@ class AdoptionStrategy {
|
|
|
113
113
|
'steering/CURRENT_CONTEXT.md',
|
|
114
114
|
'steering/RULES_GUIDE.md',
|
|
115
115
|
'config/studio-security.json',
|
|
116
|
+
'config/orchestrator.json',
|
|
117
|
+
'config/errorbook-registry.json',
|
|
116
118
|
'specs/SPEC_WORKFLOW_GUIDE.md',
|
|
117
119
|
'hooks/sync-tasks-on-edit.sce.hook',
|
|
118
120
|
'hooks/check-spec-on-create.sce.hook',
|
|
@@ -162,6 +162,8 @@ class DetectionEngine {
|
|
|
162
162
|
'steering/RULES_GUIDE.md',
|
|
163
163
|
'tools/ultrawork_enhancer.py',
|
|
164
164
|
'config/studio-security.json',
|
|
165
|
+
'config/orchestrator.json',
|
|
166
|
+
'config/errorbook-registry.json',
|
|
165
167
|
'README.md',
|
|
166
168
|
'ultrawork-application-guide.md',
|
|
167
169
|
'ultrawork-integration-summary.md',
|
|
@@ -63,7 +63,9 @@ class FileClassifier {
|
|
|
63
63
|
this.configPatterns = [
|
|
64
64
|
'version.json',
|
|
65
65
|
'adoption-config.json',
|
|
66
|
-
'config/studio-security.json'
|
|
66
|
+
'config/studio-security.json',
|
|
67
|
+
'config/orchestrator.json',
|
|
68
|
+
'config/errorbook-registry.json'
|
|
67
69
|
];
|
|
68
70
|
|
|
69
71
|
// Generated directory patterns
|
|
@@ -29,6 +29,8 @@ class TemplateSync {
|
|
|
29
29
|
'steering/RULES_GUIDE.md',
|
|
30
30
|
'tools/ultrawork_enhancer.py',
|
|
31
31
|
'config/studio-security.json',
|
|
32
|
+
'config/orchestrator.json',
|
|
33
|
+
'config/errorbook-registry.json',
|
|
32
34
|
'README.md',
|
|
33
35
|
'ultrawork-application-guide.md',
|
|
34
36
|
'ultrawork-integration-summary.md',
|