Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (scene-capability-engine) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
SCE - Scene Capability Engine
SCE is a scene-governed execution and governance engine for AI-native software delivery.
It turns open-ended agent work into a controlled path from goal -> scene -> spec -> task -> patch -> verify -> release.
English | 简体中文
What SCE Solves
AI agents can generate code quickly, but they also drift, over-create context, lose execution history, and hide risky decisions inside long sessions.
SCE provides the missing control layer:
Scene-governed context: one primary session per scene, many specs per scene, many tasks per spec.Spec-first execution: requirements, design, tasks, and gates stay attached to the work, not buried in chat history.Bounded autonomous delivery: agents can runclose-loop,close-loop-program, andclose-loop-controllerwith retry, fallback, and governance policies.Recoverable local history: timeline snapshots, task refs, and SQLite-backed state keep work recoverable even before Git push.Release-grade governance: validation gates, handoff evidence, git management checks, and errorbook-driven learning prevent silent regressions.
Core Model
SCE organizes agent work using one stable hierarchy:
session -> scene -> spec -> task -> eventsceneis the continuity boundaryspecis the governed work packagetaskis the smallest user-facing execution uniteventremains the raw audit stream behind the task view
This gives you a predictable way to manage long-running agent work without relying on fragile chat context alone.
Major Capabilities
1. Scene + Spec Governance
- Automatic goal intake and spec binding/creation during
studio plan - Scene portfolio governance for existing and new specs
- Scene/spec/task contracts stored under
.sce/ - Historical spec-scene backfill for older projects
2. Studio Execution Flow
studio plan -> generate -> apply -> verify -> release- Structured task stream for frontend or IDE integration
- Task refs (
SS.PP.TT) for lookup and rerun - Auth lease model for protected write operations
3. Autonomous Delivery
sce auto close-loopsce auto close-loop-batchsce auto close-loop-programsce auto close-loop-controller- Built-in retry, fallback-chain, governance replay, and anomaly-aware adaptation
4. Problem Closure and Errorbook
- Problem-domain map, chain, contract, and closure gate
- Incident staging before promotion to the long-term errorbook
- Local + registry-backed errorbook workflow
- Default rule: after repeated failed attempts, debug evidence is required
5. Local Timeline and SQLite State
- Timeline save/list/show/restore/push commands
- SQLite-backed task/event/session state
- Deterministic task references and rerun support
- File-to-SQLite migration and reconciliation tooling
6. Capability and Scene Assetization
- Scene/capability inventory and governance views
- Capability extraction, evaluation, and publication workflow
- Scene runtime and ontology-oriented execution support
- Moqui-oriented capability validation and handoff baselines
Quick Start
Install
npm install -g scene-capability-engineAdopt into a project
sce adoptStart a scene-governed workflow
sce studio plan --scene scene.demo --from-chat session-demo --goal "bootstrap first feature" --json
sce spec bootstrap --name 01-00-first-feature --scene scene.demo --non-interactive
sce spec pipeline run --spec 01-00-first-feature --scene scene.demoRun autonomous delivery
sce auto close-loop "deliver customer + order + inventory baseline"Recommended Usage Paths
Feature Delivery
sce studio plan --scene scene.customer-order --from-chat session-20260308 --goal "optimize checkout" --json
sce spec bootstrap --name 02-00-checkout-optimization --scene scene.customer-order --non-interactive
sce spec gate run --spec 02-00-checkout-optimization --scene scene.customer-order --jsonProgram-Scale Autonomous Delivery
sce auto close-loop-program "stabilize order lifecycle and release governance" --program-govern-until-stable --jsonTimeline Safety
sce timeline save --summary "before risky refactor"
sce timeline list --limit 20
sce timeline restore <snapshot-id>Protected Write Flow
sce auth grant --scope studio:* --reason "apply approved patch" --auth-password <password> --json
sce auth status --jsonDefault Governance Behavior
SCE is opinionated by default.
studio planruns intake and scene/spec governance unless policy explicitly allows bypass.verifyandreleaseenforce problem-closure and related gates when a spec is bound.- Autonomous program execution applies gate evaluation, fallback-chain logic, governance replay, and auto-remediation.
- State persistence prefers SQLite, not ad hoc local caches.
- Release validation defaults to integration test coverage via
npm run test:releasefor faster publish feedback.
Key Integration Points
For IDEs, AI shells, or custom frontends, the most important SCE surfaces are:
sce studio plan|generate|apply|verify|releasesce studio events --openhands-events <path>sce task ref|show|rerunsce timeline save|list|show|restoresce capability inventorysce auth grant|status|revoke- SQLite state at
.sce/state/sce-state.sqlite
MagicBall-specific integration surfaces now also include:
sce app bundle list|show|registersce app registry status|configure|sync*sce app runtime show|releases|install|activatesce app engineering show|attach|hydrate|activatesce mode application|ontology|engineering homesce pm requirement|tracking|planning|change|issue ... --jsonsce ontology er|br|dl ... --jsonsce ontology triad summary --jsonsce assurance resource|logs|backup|config ... --json
Demo remote registries:
magicball-app-bundle-registrymagicball-app-service-catalog- demo app key:
customer-order-demo
Documentation
Start here:
- Quick Start
- Quick Start with AI Tools
- Command Reference
- Autonomous Control Guide
- Scene Runtime Guide
- Multi-Agent Coordination Guide
- Errorbook Registry Guide
- Documentation Hub
Moqui and capability-focused docs:
Community
Scan the QR code and note sce to join the WeChat group.
License
MIT. See LICENSE.
Version: 3.6.34 Last Updated: 2026-03-08