scene-capability-engine 3.3.22 → 3.3.24
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 +54 -0
- package/bin/scene-capability-engine.js +10 -0
- package/docs/adoption-guide.md +8 -0
- package/docs/autonomous-control-guide.md +8 -8
- package/docs/command-reference.md +51 -2
- package/docs/errorbook-registry.md +128 -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/auto/config-schema.js +7 -7
- package/lib/commands/auto.js +2 -2
- package/lib/commands/errorbook.js +968 -4
- package/lib/commands/spec-bootstrap.js +17 -2
- package/lib/commands/spec-domain.js +217 -0
- package/lib/commands/studio.js +314 -9
- package/lib/spec/domain-modeling.js +439 -0
- package/lib/spec-gate/policy/default-policy.js +1 -0
- package/lib/spec-gate/rules/default-rules.js +8 -0
- package/package.json +3 -2
- package/template/.sce/config/errorbook-registry.json +13 -0
- package/template/.sce/steering/CORE_PRINCIPLES.md +30 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,60 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
### Added
|
|
11
|
+
- Errorbook registry health command for centralized registry governance:
|
|
12
|
+
- `sce errorbook health-registry`
|
|
13
|
+
- validates registry config readability, source/index reachability, and index bucket-to-shard resolution
|
|
14
|
+
- New script gate:
|
|
15
|
+
- `node scripts/errorbook-registry-health-gate.js`
|
|
16
|
+
- supports strict mode via `SCE_REGISTRY_HEALTH_STRICT=1`
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- `prepublishOnly` now runs `gate:errorbook-registry-health` in advisory mode before `errorbook-release` gate.
|
|
20
|
+
- Autonomous execution defaults are now hard-set to autonomous progression:
|
|
21
|
+
- `lib/auto/config-schema.js` default mode changed to `aggressive`
|
|
22
|
+
- default checkpoints now skip phase/final review pauses (`phaseCompletion=false`, `finalReview=false`)
|
|
23
|
+
- default safety confirmations for production/external/destructive are disabled in autonomous mode baseline
|
|
24
|
+
- `sce auto run/create` CLI defaults now use `--mode aggressive`
|
|
25
|
+
- Steering hard rule strengthened: when the same issue fails target validation for 2 consecutive fix rounds, the 3rd round must switch to debug-log-driven diagnosis first (no blind patching without evidence).
|
|
26
|
+
- `errorbook record` now enforces the same policy operationally:
|
|
27
|
+
- from the 3rd repeated record attempt of the same fingerprint, debug evidence becomes mandatory
|
|
28
|
+
- accepted signals include `--verification "debug: ..."`, `debug-evidence` tag, or debug trace/log references
|
|
29
|
+
- Spec workflow now enforces domain-first scene modeling:
|
|
30
|
+
- `spec bootstrap` auto-generates mandatory artifacts:
|
|
31
|
+
- `.sce/specs/<spec>/custom/problem-domain-map.md`
|
|
32
|
+
- `.sce/specs/<spec>/custom/scene-spec.md`
|
|
33
|
+
- `.sce/specs/<spec>/custom/problem-domain-chain.json`
|
|
34
|
+
- `spec gate` hard-fail rule `domain_scene_modeling` now validates both markdown structure and machine-readable chain payload:
|
|
35
|
+
- `problem/ontology/hypotheses/risks/decision_execution_path/correction_loop/verification`
|
|
36
|
+
- Added explicit domain modeling command set (also available via `sce spec domain ...` route):
|
|
37
|
+
- `sce spec-domain init --spec <id>`
|
|
38
|
+
- `sce spec-domain validate --spec <id> [--fail-on-error]`
|
|
39
|
+
- `sce spec-domain refresh --spec <id>`
|
|
40
|
+
- Studio plan/generate now consume domain modeling context for correction guidance:
|
|
41
|
+
- `sce studio plan` supports `--spec <id>` to ingest `.sce/specs/<spec>/custom/problem-domain-chain.json` deterministically
|
|
42
|
+
- when `--spec` is omitted, `plan` auto-selects the latest scene-matching chain (`scene_id`)
|
|
43
|
+
- `sce studio generate` writes chain-aware metadata and `generate` stage report at `.sce/reports/studio/generate-<job-id>.json`
|
|
44
|
+
- `sce studio verify` / `sce studio release` now include domain-chain metadata in reports and pass `spec_id` into auto errorbook failure capture
|
|
45
|
+
|
|
46
|
+
## [3.3.23] - 2026-02-27
|
|
47
|
+
|
|
48
|
+
### Added
|
|
49
|
+
- Adoption/default template coverage now includes central registry and orchestrator configs across init/adopt/upgrade flows:
|
|
50
|
+
- `.sce/config/errorbook-registry.json`
|
|
51
|
+
- `.sce/config/orchestrator.json`
|
|
52
|
+
- Adoption config classification and backup critical-file handling now include:
|
|
53
|
+
- `config/errorbook-registry.json`
|
|
54
|
+
- `config/orchestrator.json`
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
- Errorbook registry template defaults are now enabled out of the box:
|
|
58
|
+
- `enabled: true`
|
|
59
|
+
- `sources[central].enabled: true`
|
|
60
|
+
- Central registry defaults point to the official shared registry:
|
|
61
|
+
- `https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/errorbook-registry.json`
|
|
62
|
+
- `https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/errorbook-registry.index.json`
|
|
63
|
+
|
|
10
64
|
## [3.3.22] - 2026-02-27
|
|
11
65
|
|
|
12
66
|
### Added
|
|
@@ -19,6 +19,7 @@ const { registerSteeringCommands } = require('../lib/commands/steering');
|
|
|
19
19
|
const { registerSpecBootstrapCommand } = require('../lib/commands/spec-bootstrap');
|
|
20
20
|
const { registerSpecPipelineCommand } = require('../lib/commands/spec-pipeline');
|
|
21
21
|
const { registerSpecGateCommand } = require('../lib/commands/spec-gate');
|
|
22
|
+
const { registerSpecDomainCommand } = require('../lib/commands/spec-domain');
|
|
22
23
|
const { registerValueCommands } = require('../lib/commands/value');
|
|
23
24
|
const VersionChecker = require('../lib/version/version-checker');
|
|
24
25
|
const {
|
|
@@ -55,6 +56,7 @@ const program = new Command();
|
|
|
55
56
|
* - `sce spec bootstrap ...` -> `sce spec-bootstrap ...`
|
|
56
57
|
* - `sce spec pipeline ...` -> `sce spec-pipeline ...`
|
|
57
58
|
* - `sce spec gate ...` -> `sce spec-gate ...`
|
|
59
|
+
* - `sce spec domain ...` -> `sce spec-domain ...`
|
|
58
60
|
* - `sce spec create <name> ...` -> `sce create-spec <name> ...`
|
|
59
61
|
* - `sce spec <name> ...` -> `sce create-spec <name> ...` (legacy)
|
|
60
62
|
*
|
|
@@ -89,6 +91,11 @@ function normalizeSpecCommandArgs(argv) {
|
|
|
89
91
|
return normalized;
|
|
90
92
|
}
|
|
91
93
|
|
|
94
|
+
if (commandToken === 'domain') {
|
|
95
|
+
normalized.splice(commandIndex, 2, 'spec-domain');
|
|
96
|
+
return normalized;
|
|
97
|
+
}
|
|
98
|
+
|
|
92
99
|
if (commandToken === 'create') {
|
|
93
100
|
normalized.splice(commandIndex, 2, 'create-spec');
|
|
94
101
|
return normalized;
|
|
@@ -332,6 +339,9 @@ registerSpecPipelineCommand(program);
|
|
|
332
339
|
// Spec gate command
|
|
333
340
|
registerSpecGateCommand(program);
|
|
334
341
|
|
|
342
|
+
// Spec domain modeling command
|
|
343
|
+
registerSpecDomainCommand(program);
|
|
344
|
+
|
|
335
345
|
// 系统诊断命令
|
|
336
346
|
program
|
|
337
347
|
.command('doctor')
|
package/docs/adoption-guide.md
CHANGED
|
@@ -562,8 +562,16 @@ your-project/
|
|
|
562
562
|
│ │ ├── ENVIRONMENT.md
|
|
563
563
|
│ │ ├── CURRENT_CONTEXT.md
|
|
564
564
|
│ │ └── RULES_GUIDE.md
|
|
565
|
+
│ ├── config/ # Runtime/adoption baseline configs
|
|
566
|
+
│ │ ├── studio-security.json
|
|
567
|
+
│ │ ├── orchestrator.json
|
|
568
|
+
│ │ └── errorbook-registry.json
|
|
565
569
|
│ ├── tools/ # Ultrawork tools
|
|
566
570
|
│ │ └── ultrawork_enhancer.py
|
|
571
|
+
│ ├── hooks/ # Default hooks
|
|
572
|
+
│ │ ├── check-spec-on-create.sce.hook
|
|
573
|
+
│ │ ├── run-tests-on-save.sce.hook
|
|
574
|
+
│ │ └── sync-tasks-on-edit.sce.hook
|
|
567
575
|
│ ├── backups/ # Automatic backups
|
|
568
576
|
│ │ └── adopt-{timestamp}/
|
|
569
577
|
│ └── README.md
|
|
@@ -433,7 +433,7 @@ sce auto stop
|
|
|
433
433
|
|
|
434
434
|
## Execution Modes
|
|
435
435
|
|
|
436
|
-
### Conservative Mode
|
|
436
|
+
### Conservative Mode
|
|
437
437
|
|
|
438
438
|
**Best for**: Production features, critical systems, first-time users
|
|
439
439
|
|
|
@@ -479,7 +479,7 @@ sce auto stop
|
|
|
479
479
|
}
|
|
480
480
|
```
|
|
481
481
|
|
|
482
|
-
### Aggressive Mode
|
|
482
|
+
### Aggressive Mode (Default)
|
|
483
483
|
|
|
484
484
|
**Best for**: Rapid prototyping, experimental features, experienced users
|
|
485
485
|
|
|
@@ -511,13 +511,13 @@ Location: `.sce/auto/config.json`
|
|
|
511
511
|
```json
|
|
512
512
|
{
|
|
513
513
|
"version": "1.0.0",
|
|
514
|
-
"mode": "
|
|
514
|
+
"mode": "aggressive",
|
|
515
515
|
"checkpoints": {
|
|
516
516
|
"requirementsReview": false,
|
|
517
517
|
"designReview": false,
|
|
518
518
|
"tasksReview": false,
|
|
519
|
-
"phaseCompletion":
|
|
520
|
-
"finalReview":
|
|
519
|
+
"phaseCompletion": false,
|
|
520
|
+
"finalReview": false,
|
|
521
521
|
"errorThreshold": 3
|
|
522
522
|
},
|
|
523
523
|
"errorRecovery": {
|
|
@@ -527,9 +527,9 @@ Location: `.sce/auto/config.json`
|
|
|
527
527
|
"learningEnabled": true
|
|
528
528
|
},
|
|
529
529
|
"safety": {
|
|
530
|
-
"requireProductionConfirmation":
|
|
531
|
-
"requireExternalResourceConfirmation":
|
|
532
|
-
"requireDestructiveOperationConfirmation":
|
|
530
|
+
"requireProductionConfirmation": false,
|
|
531
|
+
"requireExternalResourceConfirmation": false,
|
|
532
|
+
"requireDestructiveOperationConfirmation": false,
|
|
533
533
|
"allowedOperations": [],
|
|
534
534
|
"blockedOperations": []
|
|
535
535
|
},
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> Quick reference for all `sce` commands
|
|
4
4
|
|
|
5
|
-
**Version**:
|
|
6
|
-
**Last Updated**: 2026-02-
|
|
5
|
+
**Version**: 3.3.23
|
|
6
|
+
**Last Updated**: 2026-02-27
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -57,6 +57,10 @@ sce create-spec 01-00-feature-name
|
|
|
57
57
|
|
|
58
58
|
# Bootstrap full Spec draft (requirements/design/tasks)
|
|
59
59
|
sce spec bootstrap --name 01-00-feature-name --scene scene.customer-order-inventory --non-interactive
|
|
60
|
+
# Bootstrap now also generates mandatory scene artifacts:
|
|
61
|
+
# - .sce/specs/<spec>/custom/problem-domain-map.md
|
|
62
|
+
# - .sce/specs/<spec>/custom/scene-spec.md
|
|
63
|
+
# - .sce/specs/<spec>/custom/problem-domain-chain.json (machine-readable chain model)
|
|
60
64
|
|
|
61
65
|
# Run pipeline for one Spec
|
|
62
66
|
sce spec pipeline run --spec 01-00-feature-name --scene scene.customer-order-inventory
|
|
@@ -64,6 +68,11 @@ sce spec pipeline run --spec 01-00-feature-name --scene scene.customer-order-inv
|
|
|
64
68
|
# Run gate for one Spec
|
|
65
69
|
sce spec gate run --spec 01-00-feature-name --scene scene.customer-order-inventory --json
|
|
66
70
|
|
|
71
|
+
# Maintain domain modeling artifacts explicitly
|
|
72
|
+
sce spec domain init --spec 01-00-feature-name --scene scene.customer-order-inventory --json
|
|
73
|
+
sce spec domain validate --spec 01-00-feature-name --fail-on-error --json
|
|
74
|
+
sce spec domain refresh --spec 01-00-feature-name --scene scene.customer-order-inventory --json
|
|
75
|
+
|
|
67
76
|
# Multi-Spec mode defaults to orchestrate routing
|
|
68
77
|
sce spec bootstrap --specs "spec-a,spec-b" --max-parallel 3
|
|
69
78
|
sce spec pipeline run --specs "spec-a,spec-b" --max-parallel 3
|
|
@@ -77,6 +86,11 @@ Spec session governance:
|
|
|
77
86
|
- `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
87
|
- When multiple active scenes exist, you must pass `--scene` explicitly.
|
|
79
88
|
- Multi-Spec orchestrate fallback (`--specs ...`) follows the same scene binding and writes per-spec child-session archive records.
|
|
89
|
+
- `spec bootstrap` always generates problem-domain and scene-spec artifacts to force domain-first exploration.
|
|
90
|
+
- `spec gate` now hard-fails when either of the following is missing or structurally incomplete:
|
|
91
|
+
- `.sce/specs/<spec>/custom/problem-domain-map.md`
|
|
92
|
+
- `.sce/specs/<spec>/custom/scene-spec.md`
|
|
93
|
+
- `.sce/specs/<spec>/custom/problem-domain-chain.json`
|
|
80
94
|
|
|
81
95
|
### Value Metrics
|
|
82
96
|
|
|
@@ -351,6 +365,19 @@ sce errorbook record \
|
|
|
351
365
|
sce errorbook list --status promoted --min-quality 75 --json
|
|
352
366
|
sce errorbook show <entry-id> --json
|
|
353
367
|
sce errorbook find --query "approve order timeout" --limit 10 --json
|
|
368
|
+
sce errorbook find --query "approve order timeout" --include-registry --json
|
|
369
|
+
# Prefer remote indexed search for large registry
|
|
370
|
+
sce errorbook find --query "approve order timeout" --include-registry --registry-mode remote --json
|
|
371
|
+
sce errorbook find --query "approve order timeout" --include-registry --registry-mode hybrid --json
|
|
372
|
+
|
|
373
|
+
# Export curated local entries for central registry publication
|
|
374
|
+
sce errorbook export --status promoted --min-quality 75 --out .sce/errorbook/exports/registry.json --json
|
|
375
|
+
|
|
376
|
+
# Sync central registry (GitHub raw URL or local file) to local cache
|
|
377
|
+
sce errorbook sync-registry --source https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/errorbook-registry.json --json
|
|
378
|
+
|
|
379
|
+
# Validate registry config/source/index health
|
|
380
|
+
sce errorbook health-registry --json
|
|
354
381
|
|
|
355
382
|
# Promote only after strict gate checks pass
|
|
356
383
|
sce errorbook promote <entry-id> --json
|
|
@@ -379,11 +406,17 @@ sce errorbook release-gate --min-risk high --fail-on-block --json
|
|
|
379
406
|
|
|
380
407
|
# Git managed hard gate (default in prepublish and studio release preflight)
|
|
381
408
|
node scripts/git-managed-gate.js --fail-on-violation --json
|
|
409
|
+
|
|
410
|
+
# Registry health gate (advisory by default; strict when env enabled)
|
|
411
|
+
node scripts/errorbook-registry-health-gate.js --json
|
|
412
|
+
SCE_REGISTRY_HEALTH_STRICT=1 node scripts/errorbook-registry-health-gate.js --json
|
|
382
413
|
```
|
|
383
414
|
|
|
384
415
|
Curated quality policy (`宁缺毋滥,优胜略汰`) defaults:
|
|
385
416
|
- `record` requires: `title`, `symptom`, `root_cause`, and at least one `fix_action`.
|
|
386
417
|
- Fingerprint dedup is automatic; repeated records merge evidence and increment occurrence count.
|
|
418
|
+
- Repeated-failure hard rule: from attempt `#3` of the same fingerprint (two failed rounds already happened), record must include debug evidence.
|
|
419
|
+
Recommended forms: `--verification "debug: ..."` or tag `debug-evidence` or debug trace/log file references.
|
|
387
420
|
- `promote` enforces strict gate:
|
|
388
421
|
- `root_cause` present
|
|
389
422
|
- `fix_actions` non-empty
|
|
@@ -400,6 +433,14 @@ Curated quality policy (`宁缺毋滥,优胜略汰`) defaults:
|
|
|
400
433
|
- `release-gate` also blocks when temporary mitigation policy is violated:
|
|
401
434
|
- missing exit/cleanup/deadline metadata
|
|
402
435
|
- expired mitigation deadline
|
|
436
|
+
- `export` outputs a machine-readable registry bundle from curated local entries (recommended default: `promoted`, `quality>=75`).
|
|
437
|
+
- `sync-registry` pulls external registry JSON into local cache (`.sce/errorbook/registry-cache.json`) for unified `find` retrieval.
|
|
438
|
+
- `find --include-registry --registry-mode remote` supports direct remote query for large registries (no full local sync required).
|
|
439
|
+
- Recommended for large registries: maintain a remote index file (`registry/errorbook-registry.index.json`) and shard files, then provide `index_url` in registry config.
|
|
440
|
+
- Since `v3.3.23`, `sce init` / `sce adopt` default baseline includes enabled central registry config in `.sce/config/errorbook-registry.json`.
|
|
441
|
+
- `health-registry` validates config readability, source/index accessibility, and index-to-shard resolution before release.
|
|
442
|
+
- `gate:errorbook-registry-health` runs in advisory mode by default during `prepublishOnly`.
|
|
443
|
+
Set `SCE_REGISTRY_HEALTH_STRICT=1` to fail release when registry health reports errors.
|
|
403
444
|
- `git-managed-gate` blocks release when:
|
|
404
445
|
- worktree has uncommitted changes
|
|
405
446
|
- branch has no upstream
|
|
@@ -414,6 +455,8 @@ Curated quality policy (`宁缺毋滥,优胜略汰`) defaults:
|
|
|
414
455
|
```bash
|
|
415
456
|
# Build a plan from chat/session context (scene is mandatory and becomes the primary session anchor)
|
|
416
457
|
sce studio plan --scene scene.customer-order-inventory --from-chat session-20260226 --goal "customer+order+inventory demo" --json
|
|
458
|
+
# Recommended: bind spec explicitly so Studio can ingest problem-domain-chain deterministically
|
|
459
|
+
sce studio plan --scene scene.customer-order-inventory --spec 01-00-customer-order-inventory --from-chat session-20260226 --goal "customer+order+inventory demo" --json
|
|
417
460
|
|
|
418
461
|
# Generate patch bundle metadata (scene is inherited from plan)
|
|
419
462
|
sce studio generate --target 331 --json
|
|
@@ -446,11 +489,15 @@ SCE_STUDIO_REQUIRE_AUTH=1 SCE_STUDIO_AUTH_PASSWORD=top-secret sce studio apply -
|
|
|
446
489
|
|
|
447
490
|
Stage guardrails are enforced by default:
|
|
448
491
|
- `plan` requires `--scene`; SCE binds one active primary session per scene
|
|
492
|
+
- `plan --spec <id>` (recommended) ingests `.sce/specs/<spec>/custom/problem-domain-chain.json` into studio job context
|
|
493
|
+
- when `--spec` is omitted, `plan` auto-resolves the latest matching spec chain by `scene_id` when available
|
|
449
494
|
- successful `release` auto-archives current scene session and auto-opens the next scene cycle session
|
|
450
495
|
- `generate` requires `plan`
|
|
496
|
+
- `generate` consumes the plan-stage domain-chain context and writes chain-aware metadata/report (`.sce/reports/studio/generate-<job-id>.json`)
|
|
451
497
|
- `apply` requires `generate`
|
|
452
498
|
- `verify` requires `apply`
|
|
453
499
|
- `release` requires `verify`
|
|
500
|
+
- `verify` / `release` reports and failure auto-records inherit `spec_id + domain-chain` context for better root-cause traceability
|
|
454
501
|
|
|
455
502
|
Studio gate execution defaults:
|
|
456
503
|
- `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)
|
|
@@ -530,6 +577,7 @@ Multi-agent merge governance default:
|
|
|
530
577
|
```bash
|
|
531
578
|
# One-command close-loop execution:
|
|
532
579
|
# goal -> auto master/sub decomposition -> collab metadata -> orchestration -> terminal result
|
|
580
|
+
# default behavior is enforced autonomous progression (no per-step confirmation pauses)
|
|
533
581
|
sce auto close-loop "build autonomous close-loop and master/sub orchestration"
|
|
534
582
|
# default sub-spec count is auto-selected by goal complexity (typically 3-5)
|
|
535
583
|
|
|
@@ -2036,6 +2084,7 @@ Overall Health: 2 healthy, 1 unhealthy
|
|
|
2036
2084
|
- [Cross-Tool Guide](./cross-tool-guide.md)
|
|
2037
2085
|
- [Adoption Guide](./adoption-guide.md)
|
|
2038
2086
|
- [Developer Guide](./developer-guide.md)
|
|
2087
|
+
- [Errorbook Registry Guide](./errorbook-registry.md)
|
|
2039
2088
|
|
|
2040
2089
|
---
|
|
2041
2090
|
|
|
@@ -0,0 +1,128 @@
|
|
|
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
|
+
- Since `v3.3.23`, `sce init` / `sce adopt` template baselines include this config by default (central source enabled).
|
|
91
|
+
|
|
92
|
+
## 4) Daily Workflow
|
|
93
|
+
|
|
94
|
+
1. Export curated local entries:
|
|
95
|
+
```bash
|
|
96
|
+
sce errorbook export --status promoted --min-quality 75 --out .sce/errorbook/exports/registry.json --json
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
2. Merge approved entries into central repo `registry/errorbook-registry.json`.
|
|
100
|
+
|
|
101
|
+
3. Sync central registry into local cache:
|
|
102
|
+
```bash
|
|
103
|
+
sce errorbook sync-registry --source https://raw.githubusercontent.com/heguangyong/sce-errorbook-registry/main/registry/errorbook-registry.json --json
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
4. Search local + shared entries:
|
|
107
|
+
```bash
|
|
108
|
+
sce errorbook find --query "approve order timeout" --include-registry --json
|
|
109
|
+
sce errorbook find --query "approve order timeout" --include-registry --registry-mode remote --json
|
|
110
|
+
|
|
111
|
+
# Validate central registry health (config/source/index/shard)
|
|
112
|
+
sce errorbook health-registry --json
|
|
113
|
+
# Optional strict gate in CI/release
|
|
114
|
+
SCE_REGISTRY_HEALTH_STRICT=1 node scripts/errorbook-registry-health-gate.js --json
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## 5) Governance Rules
|
|
118
|
+
|
|
119
|
+
- Publish to central registry only curated entries (recommended: `status=promoted` and `quality>=75`).
|
|
120
|
+
- Do not publish sensitive tenant/customer data.
|
|
121
|
+
- Temporary mitigation entries must remain bounded and governed (exit criteria, cleanup task, deadline).
|
|
122
|
+
- Keep central registry append-only by PR review; deprecate low-value entries through normal curation.
|
|
123
|
+
- Recommended central repo gates:
|
|
124
|
+
- `node scripts/validate-registry.js`
|
|
125
|
+
- `node scripts/check-index-coverage.js --min-coverage 85`
|
|
126
|
+
- Recommended project-side release gates:
|
|
127
|
+
- `npm run gate:errorbook-registry-health` (advisory default)
|
|
128
|
+
- `SCE_REGISTRY_HEALTH_STRICT=1 npm run gate:errorbook-registry-health` (strict)
|
|
@@ -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',
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
|
|
6
6
|
const DEFAULT_CONFIG = {
|
|
7
7
|
version: '1.0.0',
|
|
8
|
-
mode: '
|
|
8
|
+
mode: 'aggressive',
|
|
9
9
|
|
|
10
10
|
checkpoints: {
|
|
11
11
|
requirementsReview: false,
|
|
12
12
|
designReview: false,
|
|
13
13
|
tasksReview: false,
|
|
14
|
-
phaseCompletion:
|
|
15
|
-
finalReview:
|
|
14
|
+
phaseCompletion: false,
|
|
15
|
+
finalReview: false,
|
|
16
16
|
errorThreshold: 5
|
|
17
17
|
},
|
|
18
18
|
|
|
@@ -24,9 +24,9 @@ const DEFAULT_CONFIG = {
|
|
|
24
24
|
},
|
|
25
25
|
|
|
26
26
|
safety: {
|
|
27
|
-
requireProductionConfirmation:
|
|
28
|
-
requireExternalResourceConfirmation:
|
|
29
|
-
requireDestructiveOperationConfirmation:
|
|
27
|
+
requireProductionConfirmation: false,
|
|
28
|
+
requireExternalResourceConfirmation: false,
|
|
29
|
+
requireDestructiveOperationConfirmation: false,
|
|
30
30
|
allowedOperations: [],
|
|
31
31
|
blockedOperations: []
|
|
32
32
|
},
|
|
@@ -74,7 +74,7 @@ const MODE_PRESETS = {
|
|
|
74
74
|
designReview: false,
|
|
75
75
|
tasksReview: false,
|
|
76
76
|
phaseCompletion: false,
|
|
77
|
-
finalReview:
|
|
77
|
+
finalReview: false,
|
|
78
78
|
errorThreshold: 10
|
|
79
79
|
}
|
|
80
80
|
}
|
package/lib/commands/auto.js
CHANGED
|
@@ -104,7 +104,7 @@ function registerAutoCommands(program) {
|
|
|
104
104
|
auto
|
|
105
105
|
.command('run <spec-name>')
|
|
106
106
|
.description('Run Spec autonomously')
|
|
107
|
-
.option('-m, --mode <mode>', 'Execution mode (conservative|balanced|aggressive)', '
|
|
107
|
+
.option('-m, --mode <mode>', 'Execution mode (conservative|balanced|aggressive)', 'aggressive')
|
|
108
108
|
.action(async (specName, options) => {
|
|
109
109
|
try {
|
|
110
110
|
console.log(chalk.blue(`Starting autonomous execution: ${specName}`));
|
|
@@ -133,7 +133,7 @@ function registerAutoCommands(program) {
|
|
|
133
133
|
.command('create <feature-description>')
|
|
134
134
|
.description('Create and run Spec autonomously')
|
|
135
135
|
.option('-n, --name <name>', 'Spec name')
|
|
136
|
-
.option('-m, --mode <mode>', 'Execution mode', '
|
|
136
|
+
.option('-m, --mode <mode>', 'Execution mode', 'aggressive')
|
|
137
137
|
.action(async (description, options) => {
|
|
138
138
|
try {
|
|
139
139
|
const specName = options.name || generateSpecName(description);
|