scene-capability-engine 3.6.32 → 3.6.36

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.
Files changed (83) hide show
  1. package/CHANGELOG.md +86 -1
  2. package/README.md +119 -122
  3. package/README.zh.md +123 -121
  4. package/bin/scene-capability-engine.js +11 -0
  5. package/docs/README.md +21 -32
  6. package/docs/auto-refactor-index.md +384 -0
  7. package/docs/command-reference.md +94 -2
  8. package/docs/magicball-adaptation-task-checklist-v1.md +385 -0
  9. package/docs/magicball-app-bundle-sqlite-and-command-draft.md +539 -0
  10. package/docs/magicball-capability-iteration-api.md +2 -0
  11. package/docs/magicball-capability-iteration-ui.md +2 -0
  12. package/docs/magicball-capability-library.md +2 -0
  13. package/docs/magicball-cli-invocation-examples.md +336 -0
  14. package/docs/magicball-frontend-state-and-command-mapping.md +244 -0
  15. package/docs/magicball-integration-doc-index.md +137 -0
  16. package/docs/magicball-integration-issue-tracker.md +218 -0
  17. package/docs/magicball-mode-home-and-ontology-empty-state-playbook.md +249 -0
  18. package/docs/magicball-sce-adaptation-guide.md +203 -0
  19. package/docs/magicball-three-mode-alignment-plan.md +551 -0
  20. package/docs/magicball-ui-surface-checklist.md +126 -0
  21. package/docs/magicball-write-auth-adaptation-guide.md +328 -0
  22. package/docs/refactor-completion-roadmap.md +116 -0
  23. package/docs/zh/README.md +27 -30
  24. package/docs/zh/refactor-completion-roadmap.md +116 -0
  25. package/lib/app/registry-config.js +73 -0
  26. package/lib/app/registry-sync-service.js +228 -0
  27. package/lib/auto/archive-schema-service.js +276 -0
  28. package/lib/auto/archive-summary.js +60 -0
  29. package/lib/auto/batch-goal-input-service.js +543 -0
  30. package/lib/auto/batch-output.js +201 -0
  31. package/lib/auto/batch-summary-storage-service.js +110 -0
  32. package/lib/auto/close-loop-batch-service.js +116 -0
  33. package/lib/auto/close-loop-controller-service.js +287 -0
  34. package/lib/auto/close-loop-program-service.js +283 -0
  35. package/lib/auto/close-loop-recovery-service.js +191 -0
  36. package/lib/auto/close-loop-session-storage-service.js +50 -0
  37. package/lib/auto/controller-lock-service.js +55 -0
  38. package/lib/auto/controller-output.js +32 -0
  39. package/lib/auto/controller-queue-service.js +127 -0
  40. package/lib/auto/controller-session-storage-service.js +105 -0
  41. package/lib/auto/governance-advisory-service.js +208 -0
  42. package/lib/auto/governance-close-loop-service.js +411 -0
  43. package/lib/auto/governance-maintenance-presenter.js +162 -0
  44. package/lib/auto/governance-maintenance-service.js +112 -0
  45. package/lib/auto/governance-session-presenter.js +70 -0
  46. package/lib/auto/governance-session-storage-service.js +198 -0
  47. package/lib/auto/governance-signals.js +139 -0
  48. package/lib/auto/governance-stats-presenter.js +337 -0
  49. package/lib/auto/governance-stats-service.js +115 -0
  50. package/lib/auto/governance-summary.js +703 -0
  51. package/lib/auto/handoff-capability-matrix-service.js +281 -0
  52. package/lib/auto/handoff-evidence-review-service.js +251 -0
  53. package/lib/auto/handoff-release-evidence-service.js +190 -0
  54. package/lib/auto/handoff-release-gate-history-loaders-service.js +502 -0
  55. package/lib/auto/handoff-release-gate-history-service.js +257 -0
  56. package/lib/auto/handoff-reporting-service.js +1407 -0
  57. package/lib/auto/handoff-run-service.js +486 -0
  58. package/lib/auto/handoff-snapshots-service.js +645 -0
  59. package/lib/auto/observability-service.js +132 -0
  60. package/lib/auto/output-writer.js +34 -0
  61. package/lib/auto/program-auto-remediation-service.js +130 -0
  62. package/lib/auto/program-diagnostics.js +138 -0
  63. package/lib/auto/program-governance-helpers.js +306 -0
  64. package/lib/auto/program-governance-loop-service.js +413 -0
  65. package/lib/auto/program-output.js +106 -0
  66. package/lib/auto/program-summary.js +183 -0
  67. package/lib/auto/recovery-memory-service.js +684 -0
  68. package/lib/auto/recovery-selection-service.js +52 -0
  69. package/lib/auto/retention-policy.js +98 -0
  70. package/lib/auto/session-persistence-service.js +106 -0
  71. package/lib/auto/session-presenter.js +105 -0
  72. package/lib/auto/session-prune-service.js +190 -0
  73. package/lib/auto/session-query-service.js +249 -0
  74. package/lib/auto/spec-protection.js +141 -0
  75. package/lib/commands/app.js +911 -0
  76. package/lib/commands/assurance.js +212 -0
  77. package/lib/commands/auto.js +1091 -11063
  78. package/lib/commands/mode.js +321 -0
  79. package/lib/commands/ontology.js +415 -0
  80. package/lib/commands/pm.js +422 -0
  81. package/lib/ontology/seed-profiles.js +160 -0
  82. package/lib/state/sce-state-store.js +3369 -1200
  83. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- # Changelog
1
+ # Changelog
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
@@ -7,6 +7,91 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Added
11
+ - Added `lib/auto/handoff-release-gate-history-loaders-service.js` for release-gate history entry normalization, report discovery, seed loading, and merge selection.
12
+ - Added `lib/auto/handoff-run-service.js` for full auto-handoff orchestration outside the command layer.
13
+ - Added `lib/auto/recovery-memory-service.js` for recovery-memory persistence, scope resolution, pruning, and remediation-action selection.
14
+ - Added `lib/auto/batch-goal-input-service.js` for batch goal file loading, semantic decomposition, and summary-resume restoration.
15
+ - Added `lib/auto/handoff-reporting-service.js` for handoff regression/evidence reporting and markdown rendering.
16
+ - Added dedicated unit coverage in `tests/unit/auto/handoff-release-gate-history-loaders-service.test.js`, `tests/unit/auto/handoff-run-service.test.js`, `tests/unit/auto/recovery-memory-service.test.js`, `tests/unit/auto/batch-goal-input-service.test.js`, and `tests/unit/auto/handoff-reporting-service.test.js`.
17
+
18
+ ### Changed
19
+ - Moved `runAutoHandoff` out of `lib/commands/auto.js`, leaving the command layer as a thin dependency-injected wrapper.
20
+ - Moved recovery-memory persistence and remediation-selection flow out of `lib/commands/auto.js`, leaving close-loop recover commands on service-backed wrappers.
21
+ - Moved batch goal input/resume flow out of `lib/commands/auto.js`, including goal-file parsing, semantic decomposition, and summary-based resume assembly.
22
+ - Moved handoff regression/evidence rendering flow out of `lib/commands/auto.js`, leaving report commands on service-backed wrappers.
23
+ - Completed the high-value `auto-handoff` extraction round by splitting snapshot, release-gate loader, and run orchestration boundaries into dedicated services.
24
+
25
+ ## [3.6.34] - 2026-03-08
26
+
27
+ ### Added
28
+ - Added 'docs/refactor-completion-roadmap.md' and 'docs/zh/refactor-completion-roadmap.md' to capture the completed refactor scope and next roadmap.
29
+ - Added 'lib/auto/handoff-capability-matrix-service.js' for handoff capability matrix policy/recommendation/build orchestration.
30
+ - Added 'lib/auto/handoff-release-evidence-service.js' for handoff release-evidence load/merge/report persistence.
31
+ - Added 'lib/auto/handoff-evidence-review-service.js' for evidence snapshots, review-report assembly, and release-draft context resolution.
32
+ - Added 'lib/auto/handoff-release-gate-history-service.js' for release gate history index assembly and markdown rendering.
33
+
34
+ ### Changed
35
+ - Completed a coherent 'auto-handoff' refactor round across capability matrix, release evidence, evidence review, and release gate history subdomains.
36
+ - Updated README/docs hub version markers to '3.6.34'.
37
+
38
+ ## [3.6.33] - 2026-03-08
39
+
40
+ ### Added
41
+ - Added 'docs/auto-refactor-index.md' to track safe 'auto.js' extraction boundaries, cutover status, and validation gates.
42
+
43
+ ### Changed
44
+ - Cut over mainline 'runCloseLoopController' to 'lib/auto/close-loop-controller-service.js' through dependency injection from 'lib/commands/auto.js'.
45
+ - Cut over mainline 'executeCloseLoopBatch' to 'lib/auto/close-loop-batch-service.js' through dependency injection from 'lib/commands/auto.js'.
46
+ - Cut over mainline 'buildAutoObservabilitySnapshot' to 'lib/auto/observability-service.js' through dependency injection from 'lib/commands/auto.js'.
47
+ - Cut over mainline 'executeCloseLoopProgramGoal' to 'lib/auto/close-loop-program-service.js' through dependency injection from 'lib/commands/auto.js'.
48
+ - Cut over program summary helpers (`KPI`, coordination, recovery merge, failure-source indexing) to 'lib/auto/program-summary.js'.
49
+ - Cut over program KPI/audit writers to 'lib/auto/program-output.js'.
50
+ - Cut over batch/program/recover summary console presenter to 'lib/auto/batch-output.js'.
51
+ - Cut over program gate policy/fallback evaluation, anomaly patching, and failure-signature normalization to 'lib/auto/program-governance-helpers.js'.
52
+ - Cut over program governance replay/recover orchestration to 'lib/auto/program-governance-loop-service.js'.
53
+ - Cut over program gate auto-remediation and spec-prune side effects to 'lib/auto/program-auto-remediation-service.js'.
54
+ - Cut over shared JSON/text output writers to 'lib/auto/output-writer.js'.
55
+ - Removed dead duplicate controller queue helper definitions from 'lib/commands/auto.js' after the controller cutover stabilized.
56
+ - Wired controller queue/lock/output helpers into stable command and service boundaries with dedicated controller unit coverage and guarded integration validation.
57
+ - Added dedicated batch-service unit coverage for summary assembly, program-mode diagnostics, and spec-session budget hard-fail handling.
58
+ - Added dedicated observability-service unit coverage and kept command-layer observability snapshot behavior under existing auto command tests.
59
+ - Added dedicated close-loop-program-service unit coverage for recovery, gate, output, and governance-disabled flow behavior.
60
+ - Added dedicated program-summary unit coverage for KPI snapshots, coordination summaries, recovery merge behavior, and failure-source indexing.
61
+ - Added dedicated program-output unit coverage for KPI/audit payload persistence while keeping command-level file output tests green.
62
+ - Added dedicated batch-output unit coverage and kept command-level close-loop presentation flows green.
63
+ - Added dedicated program-governance-helper unit coverage and kept command/integration gate-fallback behavior green.
64
+ - Added dedicated program-governance-loop unit coverage and kept command/integration governance replay behavior green.
65
+ - Added dedicated program-auto-remediation unit coverage and kept command/integration remediation behavior green.
66
+ - Added dedicated output-writer unit coverage and kept command/integration output-file behavior green.
67
+ - Cut over handoff capability matrix policy/recommendation/build flow to 'lib/auto/handoff-capability-matrix-service.js'.
68
+ - Added dedicated handoff-capability-matrix-service unit coverage and kept command/integration handoff matrix flows green.
69
+ - Cut over handoff release-evidence load/merge/report flow to 'lib/auto/handoff-release-evidence-service.js'.
70
+ - Added dedicated handoff-release-evidence-service unit coverage and kept command/integration evidence flows green.
71
+ - Cut over handoff evidence snapshot/review-report/draft-context flow to 'lib/auto/handoff-evidence-review-service.js'.
72
+ - Added dedicated handoff-evidence-review-service unit coverage and kept command/integration review flows green.
73
+ - Cut over handoff release gate history index/markdown flow to 'lib/auto/handoff-release-gate-history-service.js'.
74
+ - Added dedicated handoff-release-gate-history-service unit coverage and kept command/integration gate-index flows green.
75
+ - Cut over handoff baseline / scene-batch / capability-coverage snapshots to 'lib/auto/handoff-snapshots-service.js'.
76
+ - Added dedicated handoff-snapshots-service unit coverage and kept command/integration handoff run and matrix flows green.
77
+ - Continued service-layer extraction by moving recovery-cycle orchestration into 'lib/auto/close-loop-recovery-service.js' with dedicated unit coverage.
78
+ - Continued service-layer extraction by moving latest recoverable summary/controller selection into 'lib/auto/recovery-selection-service.js' with dedicated unit coverage.
79
+ - Continued service-layer extraction by moving archive schema check/migrate logic into 'lib/auto/archive-schema-service.js' with dedicated unit coverage.
80
+ - Continued service-layer extraction by moving close-loop session read logic into 'lib/auto/close-loop-session-storage-service.js' with dedicated unit coverage.
81
+ - Continued service-layer extraction by moving batch summary read/load logic into 'lib/auto/batch-summary-storage-service.js' with dedicated unit coverage.
82
+ - Continued service-layer extraction by moving controller session read/load logic into 'lib/auto/controller-session-storage-service.js' with dedicated unit coverage.
83
+ - Continued service-layer extraction by moving governance session read/load/persist logic into 'lib/auto/governance-session-storage-service.js' with dedicated unit coverage.
84
+ - Continued service-layer extraction by moving batch/controller session persistence into 'lib/auto/session-persistence-service.js' with dedicated unit coverage.
85
+ - Continued service-layer extraction by moving close-loop/batch/controller prune orchestration into 'lib/auto/session-prune-service.js' with dedicated unit coverage.
86
+ - Continued service-layer extraction by moving close-loop/controller/governance session query orchestration into 'lib/auto/session-query-service.js' with dedicated unit coverage.
87
+ - Continued service-layer extraction by moving governance advisory recovery/controller execution into 'lib/auto/governance-advisory-service.js' with dedicated unit coverage.
88
+ - Continued service-layer extraction by moving 'buildAutoGovernanceStats' into 'lib/auto/governance-stats-service.js' with dedicated unit coverage.
89
+ - Continued service-layer extraction by moving 'runAutoGovernanceCloseLoop' into 'lib/auto/governance-close-loop-service.js' with dedicated unit coverage.
90
+ - Started service-layer extraction by moving 'runAutoGovernanceMaintenance' into 'lib/auto/governance-maintenance-service.js' with dedicated unit coverage.
91
+ - Completed the planned 'auto.js' governance cutover set: 'governance-signals', governance session/stats presenters, 'governance-maintenance-presenter', 'program-diagnostics', and extracted 'governance-summary' from command mainline.
92
+ - Cut over shared 'retention-policy', 'spec-protection', and 'session-presenter' helpers into 'lib/commands/auto.js' mainline after passing unit and guarded integration validation.
93
+ - Cut over shared 'archive-summary' helpers into 'lib/commands/auto.js' mainline after passing unit and guarded integration validation.
94
+
10
95
  ## [3.6.32] - 2026-03-07
11
96
 
12
97
  ### Fixed
package/README.md CHANGED
@@ -1,203 +1,200 @@
1
- # SCE - Scene Capability Engine
1
+ # SCE - Scene Capability Engine
2
2
 
3
3
  [![npm version](https://badge.fury.io/js/scene-capability-engine.svg)](https://badge.fury.io/js/scene-capability-engine)
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
 
6
- **SCE is a scene capability orchestration engine for AI-native software delivery.**
7
- It provides a deterministic path from `goal -> scene -> spec -> patch -> verify -> release`.
6
+ **SCE is a scene-governed execution and governance engine for AI-native software delivery.**
7
+ It turns open-ended agent work into a controlled path from `goal -> scene -> spec -> task -> patch -> verify -> release`.
8
8
 
9
9
  English | [简体中文](README.zh.md)
10
10
 
11
11
  ---
12
12
 
13
- ## Why SCE
13
+ ## What SCE Solves
14
14
 
15
- SCE is designed for teams that want AI agents to deliver software end-to-end without losing control.
15
+ AI agents can generate code quickly, but they also drift, over-create context, lose execution history, and hide risky decisions inside long sessions.
16
16
 
17
- - Keep delivery aligned to requirements through Spec-first workflows.
18
- - Scale from single-task execution to multi-agent program orchestration.
19
- - Prevent silent drift with mandatory gates, ontology checks, and release evidence.
20
- - Preserve local work history with timeline snapshots, not just Git pushes.
17
+ SCE provides the missing control layer:
18
+
19
+ - `Scene-governed context`: one primary session per scene, many specs per scene, many tasks per spec.
20
+ - `Spec-first execution`: requirements, design, tasks, and gates stay attached to the work, not buried in chat history.
21
+ - `Bounded autonomous delivery`: agents can run `close-loop`, `close-loop-program`, and `close-loop-controller` with retry, fallback, and governance policies.
22
+ - `Recoverable local history`: timeline snapshots, task refs, and SQLite-backed state keep work recoverable even before Git push.
23
+ - `Release-grade governance`: validation gates, handoff evidence, git management checks, and errorbook-driven learning prevent silent regressions.
21
24
 
22
25
  ---
23
26
 
24
- ## Core Capabilities
25
-
26
- | Capability | What SCE Provides | Outcome |
27
- | --- | --- | --- |
28
- | Scene + Spec model | Scene-governed sessions and Spec lifecycle (`requirements/design/tasks`) | Stable context across long AI runs |
29
- | Auto intake + Spec governance | Goal intent detection, auto spec bind/create, scene portfolio governance | Automatic scene-to-spec tracking with bounded spec growth |
30
- | Studio workflow | `studio plan -> generate -> apply -> verify -> release` | Structured chat-to-release execution |
31
- | Autonomous delivery | `auto close-loop`, `close-loop-program`, `close-loop-controller` | Unattended bounded convergence |
32
- | Multi-agent orchestration | DAG scheduling, retries, 429 adaptive parallel control | Reliable parallel execution at scale |
33
- | Domain/ontology governance | problem-domain chain + scene template + gate validation | Fewer semantic regressions |
34
- | Problem closure loop | problem-domain map + chain + `problem-contract` + closure gate | Root-cause-first fixes with bounded convergence |
35
- | Problem evaluation routing | Stage-level risk/evidence/readiness scoring with mandatory policy | Adaptive execution strategy with guarded apply/release |
36
- | Local timeline safety | `timeline save/auto/list/show/restore/push` + key-event auto checkpoints | Recoverable local history |
37
- | Errorbook-driven repair | Local + registry-backed error patterns and release gates | Faster diagnosis and safer fixes |
38
- | Release governance | Git-managed gate, errorbook gate, handoff preflight, tag pipeline | Auditable, reproducible releases |
27
+ ## Core Model
28
+
29
+ SCE organizes agent work using one stable hierarchy:
30
+
31
+ - `session -> scene -> spec -> task -> event`
32
+ - `scene` is the continuity boundary
33
+ - `spec` is the governed work package
34
+ - `task` is the smallest user-facing execution unit
35
+ - `event` remains the raw audit stream behind the task view
36
+
37
+ This gives you a predictable way to manage long-running agent work without relying on fragile chat context alone.
39
38
 
40
39
  ---
41
40
 
42
- ## 3-Minute Quick Start
41
+ ## Major Capabilities
42
+
43
+ ### 1. Scene + Spec Governance
44
+ - Automatic goal intake and spec binding/creation during `studio plan`
45
+ - Scene portfolio governance for existing and new specs
46
+ - Scene/spec/task contracts stored under `.sce/`
47
+ - Historical spec-scene backfill for older projects
48
+
49
+ ### 2. Studio Execution Flow
50
+ - `studio plan -> generate -> apply -> verify -> release`
51
+ - Structured task stream for frontend or IDE integration
52
+ - Task refs (`SS.PP.TT`) for lookup and rerun
53
+ - Auth lease model for protected write operations
54
+
55
+ ### 3. Autonomous Delivery
56
+ - `sce auto close-loop`
57
+ - `sce auto close-loop-batch`
58
+ - `sce auto close-loop-program`
59
+ - `sce auto close-loop-controller`
60
+ - Built-in retry, fallback-chain, governance replay, and anomaly-aware adaptation
61
+
62
+ ### 4. Problem Closure and Errorbook
63
+ - Problem-domain map, chain, contract, and closure gate
64
+ - Incident staging before promotion to the long-term errorbook
65
+ - Local + registry-backed errorbook workflow
66
+ - Default rule: after repeated failed attempts, debug evidence is required
67
+
68
+ ### 5. Local Timeline and SQLite State
69
+ - Timeline save/list/show/restore/push commands
70
+ - SQLite-backed task/event/session state
71
+ - Deterministic task references and rerun support
72
+ - File-to-SQLite migration and reconciliation tooling
73
+
74
+ ### 6. Capability and Scene Assetization
75
+ - Scene/capability inventory and governance views
76
+ - Capability extraction, evaluation, and publication workflow
77
+ - Scene runtime and ontology-oriented execution support
78
+ - Moqui-oriented capability validation and handoff baselines
43
79
 
80
+ ---
81
+
82
+ ## Quick Start
83
+
84
+ ### Install
44
85
  ```bash
45
- # 1) Install
46
86
  npm install -g scene-capability-engine
87
+ ```
47
88
 
48
- # 2) Adopt in your project
89
+ ### Adopt into a project
90
+ ```bash
49
91
  sce adopt
92
+ ```
50
93
 
51
- # 3) Open a primary scene session
94
+ ### Start a scene-governed workflow
95
+ ```bash
52
96
  sce studio plan --scene scene.demo --from-chat session-demo --goal "bootstrap first feature" --json
53
-
54
- # 4) Bootstrap and run one Spec
55
97
  sce spec bootstrap --name 01-00-first-feature --scene scene.demo --non-interactive
56
98
  sce spec pipeline run --spec 01-00-first-feature --scene scene.demo
57
99
  ```
58
100
 
59
- For autonomous execution:
60
-
101
+ ### Run autonomous delivery
61
102
  ```bash
62
103
  sce auto close-loop "deliver customer + order + inventory baseline"
63
104
  ```
64
105
 
65
106
  ---
66
107
 
67
- ## Recommended Workflows
108
+ ## Recommended Usage Paths
68
109
 
69
- ### 1) Feature Delivery (default)
110
+ ### Feature Delivery
70
111
  ```bash
71
- sce studio plan --scene scene.customer-order --from-chat session-20260302 --goal "optimize checkout"
112
+ sce studio plan --scene scene.customer-order --from-chat session-20260308 --goal "optimize checkout" --json
72
113
  sce spec bootstrap --name 02-00-checkout-optimization --scene scene.customer-order --non-interactive
73
- sce spec domain coverage --spec 02-00-checkout-optimization --json
74
114
  sce spec gate run --spec 02-00-checkout-optimization --scene scene.customer-order --json
75
115
  ```
76
116
 
77
- ### 2) Program-Scale Autonomous Delivery
117
+ ### Program-Scale Autonomous Delivery
78
118
  ```bash
79
119
  sce auto close-loop-program "stabilize order lifecycle and release governance" --program-govern-until-stable --json
80
120
  ```
81
121
 
82
- ### 3) Local History Safety (timeline)
122
+ ### Timeline Safety
83
123
  ```bash
84
124
  sce timeline save --summary "before risky refactor"
85
125
  sce timeline list --limit 20
86
126
  sce timeline restore <snapshot-id>
87
- sce timeline push origin main
88
127
  ```
89
128
 
90
- ### 4) Release Baseline
129
+ ### Protected Write Flow
91
130
  ```bash
92
- sce auto handoff preflight-check --require-pass --json
93
- git tag -a vX.Y.Z -m "vX.Y.Z"
94
- git push origin vX.Y.Z
131
+ sce auth grant --scope studio:* --reason "apply approved patch" --auth-password <password> --json
132
+ sce auth status --json
95
133
  ```
96
134
 
97
135
  ---
98
136
 
99
- ## Default Problem-Solving Loop
137
+ ## Default Governance Behavior
100
138
 
101
- SCE now enforces a domain-closed diagnosis and repair route by default:
139
+ SCE is opinionated by default.
102
140
 
103
- 1. Scope the problem first with scene artifacts (`problem-domain-map.md`, `scene-spec.md`, `problem-domain-chain.json`, `problem-contract.json`).
104
- 2. Keep trial-and-error history in incident staging (`.sce/errorbook/staging/incidents/`) to avoid repeating failed attempts.
105
- 3. Use problem evaluation to prioritize likely impact areas before applying/releasing changes.
106
-
107
- Hard rule defaults:
108
- - After two failed rounds on the same problem fingerprint, debug evidence is required in subsequent attempts.
109
- - `studio verify/release` run `problem-closure-gate` by default when a spec is bound.
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`).
141
+ - `studio plan` runs intake and scene/spec governance unless policy explicitly allows bypass.
142
+ - `verify` and `release` enforce problem-closure and related gates when a spec is bound.
143
+ - Autonomous program execution applies gate evaluation, fallback-chain logic, governance replay, and auto-remediation.
144
+ - State persistence prefers SQLite, not ad hoc local caches.
145
+ - Release validation defaults to integration test coverage via `npm run test:release` for faster publish feedback.
113
146
 
114
147
  ---
115
148
 
116
- ## AI Agent Compatibility
117
-
118
- SCE is tool-agnostic and works with Codex, Claude Code, Cursor, Windsurf, VS Code Copilot, and other CLI-capable agents.
119
-
120
- - Runtime context is managed by `.sce/` (not IDE-specific hidden folders).
121
- - Session governance is scene-first: `1 scene = 1 primary session`.
122
- - Spec work is attached as child sessions and auto-archived.
123
- - Startup now auto-detects adopted projects and aligns takeover baseline defaults automatically.
124
- - Multi-agent anti-429 runtime now supports deterministic retry spread and machine-readable `rate-limit:decision` telemetry (`rateLimitRetrySpreadMs`, `rateLimitLaunchHoldPollMs`, `rateLimitDecisionEventThrottleMs`).
125
- - Problem evaluation policy is enabled by default (`.sce/config/problem-eval-policy.json`) and evaluates every Studio stage.
126
- - Problem closure policy is enabled by default (`.sce/config/problem-closure-policy.json`) and blocks verify/release bypass when required domain/problem evidence is missing.
127
- - Error handling now follows a full incident loop by default: every record attempt is staged first and auto-closed on verified/promoted outcomes.
128
- - You can inspect or force-align baseline explicitly:
129
- - `sce workspace takeover-audit --json`
130
- - `sce workspace takeover-apply --json`
131
-
132
- Studio task-stream output contract (default):
133
- - IDs: `sessionId`, `sceneId`, `specId`, `taskId`, `taskRef`, `eventId`
134
- - 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`
135
- - File refs: `task.file_changes[]` with `path`, `line`, `diffRef`
136
- - Command logs: `task.commands[]` with `cmd`, `exit_code`, `stdout`, `stderr`, `log_path`
137
- - Errors: `task.errors[]` with `message`, `error_bundle` (copy-ready)
138
- - Evidence: `task.evidence[]`
139
- - Raw audit stream: `event[]` (and `studio events` keeps `events[]` compatibility field)
140
- - OpenHands bridge: `sce studio events --openhands-events <path>` maps OpenHands raw events into the same task contract (`source_stream=openhands`)
141
- - Hierarchical task reference operations:
142
- - `sce task ref --scene <scene-id> --spec <spec-id> --task <task-id> --json`
143
- - `sce task show --ref <SS.PP.TT> --json`
144
- - `sce task rerun --ref <SS.PP.TT> [--dry-run] --json`
145
- - Runtime governance state store policy:
146
- - SQLite-only backend (`.sce/state/sce-state.sqlite`)
147
- - In-memory fallback only in `NODE_ENV=test` or when `SCE_STATE_ALLOW_MEMORY_FALLBACK=1`
148
- - Outside those conditions, unavailable SQLite support fails fast for task-ref/event persistence
149
- - Gradual file-to-sqlite migration tooling:
150
- - `sce state plan --json`
151
- - `sce state doctor --json`
152
- - `sce state migrate --all --apply --json`
153
- - `sce state reconcile --all --apply --json` (doctor -> migrate -> doctor one-shot)
154
- - `sce state export --out .sce/reports/state-migration/state-export.latest.json --json`
155
- - reconciliation gate: `npm run gate:state-migration-reconciliation`
156
- - release workflow defaults to enforce mode for state reconciliation gate and runs reconcile before publish
157
- - runtime reads now prefer sqlite indexes for timeline/scene-session views when indexed data exists
158
- - `state doctor` now emits `summary` and runtime diagnostics (`runtime.timeline`, `runtime.scene_session`) with read-source and consistency status
159
- - migratable components now include runtime + errorbook + spec-governance + release evidence indexes (`errorbook.entry-index`, `errorbook.incident-index`, `governance.spec-scene-overrides`, `governance.scene-index`, `release.evidence-runs-index`, `release.gate-history-index`)
160
- - Write authorization lease model (SQLite-backed):
161
- - policy file: `.sce/config/authorization-policy.json`
162
- - grant lease: `sce auth grant --scope studio:* --reason "<reason>" --auth-password <password> --json`
163
- - inspect/revoke: `sce auth status --json` / `sce auth revoke --lease <lease-id> --json`
164
- - protected writes accept `--auth-lease <lease-id>` on `studio apply/release/rollback` and `task rerun`
149
+ ## Key Integration Points
165
150
 
166
- ---
151
+ For IDEs, AI shells, or custom frontends, the most important SCE surfaces are:
152
+
153
+ - `sce studio plan|generate|apply|verify|release`
154
+ - `sce studio events --openhands-events <path>`
155
+ - `sce task ref|show|rerun`
156
+ - `sce timeline save|list|show|restore`
157
+ - `sce capability inventory`
158
+ - `sce auth grant|status|revoke`
159
+ - SQLite state at `.sce/state/sce-state.sqlite`
160
+
161
+ MagicBall-specific integration surfaces now also include:
167
162
 
168
- ## Important Version Changes
163
+ - `sce app bundle list|show|register`
164
+ - `sce app registry status|configure|sync*`
165
+ - `sce app runtime show|releases|install|activate`
166
+ - `sce app engineering show|attach|hydrate|activate`
167
+ - `sce mode application|ontology|engineering home`
168
+ - `sce pm requirement|tracking|planning|change|issue ... --json`
169
+ - `sce ontology er|br|dl ... --json`
170
+ - `sce ontology triad summary --json`
171
+ - `sce assurance resource|logs|backup|config ... --json`
169
172
 
170
- - `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.
171
- - `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.
172
- - `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>`.
173
- - `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.
174
- - `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.
175
- - `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.
176
- - `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
- - `3.4.4`: Added `SCE_GIT_MANAGEMENT_ALLOW_UNTRACKED=1` / `--allow-untracked`; release workflow uses it for npm publish after generating release evidence artifacts.
178
- - `3.4.3`: Introduced mandatory problem evaluation across Studio stages (`plan/generate/apply/verify/release`) with policy file `.sce/config/problem-eval-policy.json` and stage report artifacts.
179
- - `3.4.2`: Errorbook incident flow moved to full staging closed-loop (attempt history, incident inspection, resolved archive).
180
- - `3.4.1`: Added workspace takeover baseline automation (`takeover-audit` / `takeover-apply`) and startup alignment defaults.
173
+ Demo remote registries:
174
+ - `magicball-app-bundle-registry`
175
+ - `magicball-app-service-catalog`
176
+ - demo app key: `customer-order-demo`
181
177
 
182
178
  ---
183
179
 
184
- ## Documentation Map
180
+ ## Documentation
185
181
 
186
182
  Start here:
187
183
 
188
184
  - [Quick Start](docs/quick-start.md)
185
+ - [Quick Start with AI Tools](docs/quick-start-with-ai-tools.md)
189
186
  - [Command Reference](docs/command-reference.md)
190
187
  - [Autonomous Control Guide](docs/autonomous-control-guide.md)
191
188
  - [Scene Runtime Guide](docs/scene-runtime-guide.md)
192
- - [Value Observability Guide](docs/value-observability-guide.md)
193
189
  - [Multi-Agent Coordination Guide](docs/multi-agent-coordination-guide.md)
194
190
  - [Errorbook Registry Guide](docs/errorbook-registry.md)
195
191
  - [Documentation Hub](docs/README.md)
196
192
 
197
- Moqui-focused:
193
+ Moqui and capability-focused docs:
198
194
 
199
195
  - [Moqui Template Core Library Playbook](docs/moqui-template-core-library-playbook.md)
200
196
  - [Moqui Standard Rebuild Guide](docs/moqui-standard-rebuild-guide.md)
197
+ - [SCE Capability Matrix Roadmap](docs/sce-capability-matrix-roadmap.md)
201
198
 
202
199
  ---
203
200
 
@@ -218,5 +215,5 @@ MIT. See [LICENSE](LICENSE).
218
215
 
219
216
  ---
220
217
 
221
- **Version**: 3.6.32
222
- **Last Updated**: 2026-03-05
218
+ **Version**: 3.6.34
219
+ **Last Updated**: 2026-03-08