scene-capability-engine 3.6.38 → 3.6.44
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 +63 -0
- package/bin/scene-capability-engine.js +42 -2
- package/docs/command-reference.md +27 -0
- package/docs/developer-guide.md +1 -1
- package/docs/document-governance.md +22 -2
- package/docs/releases/README.md +6 -0
- package/docs/releases/v3.6.39.md +24 -0
- package/docs/releases/v3.6.40.md +19 -0
- package/docs/releases/v3.6.41.md +20 -0
- package/docs/releases/v3.6.42.md +19 -0
- package/docs/releases/v3.6.43.md +17 -0
- package/docs/releases/v3.6.44.md +17 -0
- package/docs/spec-collaboration-guide.md +1 -1
- package/docs/state-migration-reconciliation-runbook.md +76 -0
- package/docs/state-storage-tiering.md +104 -0
- package/docs/zh/releases/README.md +6 -0
- package/docs/zh/releases/v3.6.39.md +24 -0
- package/docs/zh/releases/v3.6.40.md +19 -0
- package/docs/zh/releases/v3.6.41.md +20 -0
- package/docs/zh/releases/v3.6.42.md +19 -0
- package/docs/zh/releases/v3.6.43.md +17 -0
- package/docs/zh/releases/v3.6.44.md +17 -0
- package/lib/adoption/adoption-logger.js +1 -1
- package/lib/adoption/adoption-strategy.js +29 -29
- package/lib/adoption/detection-engine.js +16 -13
- package/lib/adoption/smart-orchestrator.js +3 -3
- package/lib/adoption/strategy-selector.js +19 -15
- package/lib/adoption/template-sync.js +3 -3
- package/lib/auto/autonomous-engine.js +5 -5
- package/lib/auto/handoff-release-gate-history-loaders-service.js +24 -4
- package/lib/auto/handoff-run-service.js +37 -0
- package/lib/backup/backup-system.js +10 -10
- package/lib/collab/collab-manager.js +8 -5
- package/lib/collab/dependency-manager.js +1 -1
- package/lib/commands/adopt.js +2 -2
- package/lib/commands/auto.js +239 -97
- package/lib/commands/collab.js +10 -4
- package/lib/commands/docs.js +8 -2
- package/lib/commands/scene.js +78 -18
- package/lib/commands/status.js +3 -3
- package/lib/commands/studio.js +8 -0
- package/lib/commands/watch.js +10 -1
- package/lib/governance/config-manager.js +16 -0
- package/lib/governance/diagnostic-engine.js +2 -1
- package/lib/governance/validation-engine.js +3 -2
- package/lib/repo/config-manager.js +2 -2
- package/lib/runtime/session-store.js +8 -0
- package/lib/spec/bootstrap/context-collector.js +5 -4
- package/lib/spec-gate/rules/default-rules.js +8 -8
- package/lib/state/sce-state-store.js +265 -0
- package/lib/state/state-migration-manager.js +27 -2
- package/lib/state/state-storage-policy.js +179 -0
- package/lib/upgrade/migration-engine.js +5 -5
- package/lib/upgrade/migrations/1.0.0-to-1.1.0.js +3 -3
- package/lib/utils/tool-detector.js +4 -4
- package/lib/utils/validation.js +6 -6
- package/lib/watch/action-executor.js +10 -1
- package/lib/watch/event-debouncer.js +3 -0
- package/lib/watch/file-watcher.js +51 -10
- package/lib/watch/watch-manager.js +10 -1
- package/lib/workspace/multi/workspace-context-resolver.js +3 -3
- package/lib/workspace/multi/workspace-registry.js +3 -3
- package/lib/workspace/multi/workspace-state-manager.js +3 -3
- package/lib/workspace/spec-delivery-audit.js +553 -0
- package/lib/workspace/takeover-baseline.js +11 -0
- package/package.json +5 -1
- package/template/.sce/config/state-storage-policy.json +165 -0
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": "1.0",
|
|
3
|
+
"strategy": "selective-sqlite-advancement",
|
|
4
|
+
"tiers": {
|
|
5
|
+
"file-source": {
|
|
6
|
+
"description": "Canonical file-backed storage for low-cardinality config, raw evidence, audit streams, and recovery-oriented payloads."
|
|
7
|
+
},
|
|
8
|
+
"sqlite-index": {
|
|
9
|
+
"description": "SQLite index/registry layer for file-backed resources that need high-frequency filtering, sorting, and cross-run aggregation."
|
|
10
|
+
},
|
|
11
|
+
"derived-sqlite-projection": {
|
|
12
|
+
"description": "Disposable SQLite projection rebuilt from canonical files for append-only streams with query pressure."
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"admission": {
|
|
16
|
+
"required_signals": [
|
|
17
|
+
"cross-run or cross-session query pressure is proven",
|
|
18
|
+
"file scans are materially weaker than indexed filtering/sorting",
|
|
19
|
+
"sqlite content remains rebuildable from a canonical source",
|
|
20
|
+
"operator diagnostics and reconcile path are defined before rollout"
|
|
21
|
+
],
|
|
22
|
+
"deny_if_any": [
|
|
23
|
+
"resource is the only copy of raw audit or evidence payload",
|
|
24
|
+
"resource is low-cardinality personal workspace or preference state",
|
|
25
|
+
"human-readable diff and manual recovery are more valuable than query speed",
|
|
26
|
+
"migration would introduce silent source-of-truth cutover"
|
|
27
|
+
],
|
|
28
|
+
"future_candidate_checklist": [
|
|
29
|
+
"identify canonical source path or stream",
|
|
30
|
+
"document expected query patterns and consumers",
|
|
31
|
+
"define rebuild and reconcile semantics",
|
|
32
|
+
"define release gate or audit behavior for drift states",
|
|
33
|
+
"document why existing file-only storage is insufficient"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"component_scope": [
|
|
37
|
+
{
|
|
38
|
+
"component_id": "collab.agent-registry",
|
|
39
|
+
"tier": "sqlite-index",
|
|
40
|
+
"canonical_source": "file",
|
|
41
|
+
"source_path": ".sce/config/agent-registry.json",
|
|
42
|
+
"sqlite_tables": ["agent_runtime_registry"],
|
|
43
|
+
"rationale": "Registry-style lookup with repeated status and capability queries."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"component_id": "runtime.timeline-index",
|
|
47
|
+
"tier": "sqlite-index",
|
|
48
|
+
"canonical_source": "file",
|
|
49
|
+
"source_path": ".sce/timeline/index.json",
|
|
50
|
+
"sqlite_tables": ["timeline_snapshot_registry"],
|
|
51
|
+
"rationale": "Timeline index benefits from filtered and cross-session reads while file snapshots remain recoverable source artifacts."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"component_id": "runtime.scene-session-index",
|
|
55
|
+
"tier": "sqlite-index",
|
|
56
|
+
"canonical_source": "file",
|
|
57
|
+
"source_path": ".sce/session-governance/scene-index.json",
|
|
58
|
+
"sqlite_tables": ["scene_session_cycle_registry"],
|
|
59
|
+
"rationale": "Scene/session lookups have query pressure and consistency checks but still rely on file session payloads."
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"component_id": "errorbook.entry-index",
|
|
63
|
+
"tier": "sqlite-index",
|
|
64
|
+
"canonical_source": "file",
|
|
65
|
+
"source_path": ".sce/errorbook/index.json",
|
|
66
|
+
"sqlite_tables": ["errorbook_entry_index_registry"],
|
|
67
|
+
"rationale": "Promoted errorbook registry queries benefit from indexed status and quality filtering."
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"component_id": "errorbook.incident-index",
|
|
71
|
+
"tier": "sqlite-index",
|
|
72
|
+
"canonical_source": "file",
|
|
73
|
+
"source_path": ".sce/errorbook/staging/index.json",
|
|
74
|
+
"sqlite_tables": ["errorbook_incident_index_registry"],
|
|
75
|
+
"rationale": "Incident staging state requires queryable triage views without replacing raw incident artifacts."
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"component_id": "governance.spec-scene-overrides",
|
|
79
|
+
"tier": "sqlite-index",
|
|
80
|
+
"canonical_source": "file",
|
|
81
|
+
"source_path": ".sce/spec-governance/spec-scene-overrides.json",
|
|
82
|
+
"sqlite_tables": ["governance_spec_scene_override_registry"],
|
|
83
|
+
"rationale": "Override lookups are registry-like and join naturally with other governance indexes."
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"component_id": "governance.scene-index",
|
|
87
|
+
"tier": "sqlite-index",
|
|
88
|
+
"canonical_source": "file",
|
|
89
|
+
"source_path": ".sce/spec-governance/scene-index.json",
|
|
90
|
+
"sqlite_tables": ["governance_scene_index_registry"],
|
|
91
|
+
"rationale": "Scene governance summaries are better served by indexed counts and status filters."
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"component_id": "release.evidence-runs-index",
|
|
95
|
+
"tier": "sqlite-index",
|
|
96
|
+
"canonical_source": "file",
|
|
97
|
+
"source_path": ".sce/reports/release-evidence/handoff-runs.json",
|
|
98
|
+
"sqlite_tables": ["release_evidence_run_registry"],
|
|
99
|
+
"rationale": "Release evidence run summaries need fast historical querying while release assets remain file-backed."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"component_id": "release.gate-history-index",
|
|
103
|
+
"tier": "sqlite-index",
|
|
104
|
+
"canonical_source": "file",
|
|
105
|
+
"source_path": ".sce/reports/release-evidence/release-gate-history.json",
|
|
106
|
+
"sqlite_tables": ["release_gate_history_registry"],
|
|
107
|
+
"rationale": "Gate history is registry-shaped and queried by tag, pass/fail, and drift metrics."
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"resource_rules": [
|
|
111
|
+
{
|
|
112
|
+
"rule_id": "workspace-personal-state",
|
|
113
|
+
"tier": "file-source",
|
|
114
|
+
"explicit_paths": ["~/.sce/workspace-state.json"],
|
|
115
|
+
"derived_projection_allowed": false,
|
|
116
|
+
"source_replacement_allowed": false,
|
|
117
|
+
"rationale": "Personal workspace selection and preferences are low-cardinality, atomic, and not worth migrating into SQLite."
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"rule_id": "append-only-report-streams",
|
|
121
|
+
"tier": "file-source",
|
|
122
|
+
"path_patterns": [".sce/reports/**/*.jsonl"],
|
|
123
|
+
"derived_projection_allowed": true,
|
|
124
|
+
"source_replacement_allowed": false,
|
|
125
|
+
"rationale": "Raw governance and evidence streams must stay append-only files; projection is allowed only for query acceleration."
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"rule_id": "append-only-audit-streams",
|
|
129
|
+
"tier": "file-source",
|
|
130
|
+
"path_patterns": [".sce/audit/**/*.jsonl"],
|
|
131
|
+
"derived_projection_allowed": true,
|
|
132
|
+
"source_replacement_allowed": false,
|
|
133
|
+
"rationale": "Audit streams remain canonical evidence and should never become SQLite-only write paths."
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"rule_id": "timeline-snapshot-payloads",
|
|
137
|
+
"tier": "file-source",
|
|
138
|
+
"path_patterns": [".sce/timeline/snapshots/**"],
|
|
139
|
+
"derived_projection_allowed": false,
|
|
140
|
+
"source_replacement_allowed": false,
|
|
141
|
+
"rationale": "Timeline snapshots are recovery-oriented payload artifacts, not registry data."
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"rule_id": "session-payload-artifacts",
|
|
145
|
+
"tier": "file-source",
|
|
146
|
+
"path_patterns": [".sce/session-governance/sessions/**"],
|
|
147
|
+
"derived_projection_allowed": false,
|
|
148
|
+
"source_replacement_allowed": false,
|
|
149
|
+
"rationale": "Session payloads must stay file-backed for recovery, archive, and manual debugging."
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"rule_id": "release-evidence-assets",
|
|
153
|
+
"tier": "file-source",
|
|
154
|
+
"path_patterns": [
|
|
155
|
+
".sce/reports/release-evidence/**/*.json",
|
|
156
|
+
".sce/reports/release-evidence/**/*.md",
|
|
157
|
+
".sce/reports/release-evidence/**/*.jsonl",
|
|
158
|
+
".sce/reports/release-evidence/**/*.lines"
|
|
159
|
+
],
|
|
160
|
+
"derived_projection_allowed": true,
|
|
161
|
+
"source_replacement_allowed": false,
|
|
162
|
+
"rationale": "Release evidence assets remain portable files even when selected summary indexes are mirrored into SQLite."
|
|
163
|
+
}
|
|
164
|
+
]
|
|
165
|
+
}
|