Skip to main content

qualia_core_db/entity_view/
capability_report.rs

1//! Machine-readable capability report for design process (not marketing).
2
3use serde_json::{json, Value};
4
5/// Static capability inventory for the entity-view kernel + host expectations.
6/// Used by designers and desktop `view_capability_report`.
7pub fn entity_view_capability_report() -> Value {
8    json!({
9        "version": 1,
10        "product_frame": {
11            "name": "Qualia / Webizen mindware (whole product)",
12            "not": ["portal product", "single mindware module"],
13            "intent": "prosthetic extension of self and human life; rights-fail-closed",
14            "primary_host": "webizen-desktop (shell + studio habitat + browser + native)"
15        },
16        "module": {
17            "crate": "qualia-core-db",
18            "path": "entity_view",
19            "role": "multi-observer entity projection kernel (pure, no I/O)"
20        },
21        "capabilities": [
22            {
23                "id": "entity_id",
24                "status": "ready",
25                "summary": "Stable EntityId from URI/DID/fragment (fnv60 / q_hash)",
26                "design_use": "Same identity across flat cards, scene nodes, web locus"
27            },
28            {
29                "id": "observer_status",
30                "status": "ready",
31                "summary": "Principal|Peer|Guardian|Steward|Public|Instrument|Auditor",
32                "design_use": "Different people / roles see different wings of the same entities"
33            },
34            {
35                "id": "rights_filter",
36                "status": "ready",
37                "summary": "Pure decide_view / filter_visible — secret fail-closed, peer offered-only",
38                "design_use": "HUD must show hidden_count; never imply public=private"
39            },
40            {
41                "id": "affordance_bits",
42                "status": "ready",
43                "summary": "open/share/enter/edit packed u8 on projections",
44                "design_use": "Disable share on secret; dim enter when denied"
45            },
46            {
47                "id": "bifurcated_package",
48                "status": "ready",
49                "summary": "Private / offered / commons wings with stable digests",
50                "design_use": "Dual-layer commons vs personal representation packs"
51            },
52            {
53                "id": "fragment_attribution",
54                "status": "ready",
55                "summary": "Typed edges on fragments (illustrates, narrative, groundsIn, social…)",
56                "design_use": "STEM-in-story; not whole-corpus fiction/non-fiction only"
57            },
58            {
59                "id": "projection_flat_scene",
60                "status": "ready",
61                "summary": "FlatCard list + SceneNodeProj layout (geo pins or grid)",
62                "design_use": "Flatten / spatialize morph of same selection"
63            },
64            {
65                "id": "presentation_level",
66                "status": "ready",
67                "summary": "P0–P6 morphology level enum",
68                "design_use": "Theme packs bias flat vs immersive"
69            },
70            {
71                "id": "view_host_session",
72                "status": "ready",
73                "summary": "App-global session (observer, selection, last projection, attention URL)",
74                "design_use": "Shell, Library, Browser share one session"
75            },
76            {
77                "id": "view_project_library",
78                "status": "ready",
79                "summary": "Library disk → filter → flat+scene JSON",
80                "design_use": "Lived Memory entity view strip"
81            },
82            {
83                "id": "view_project_web_locus",
84                "status": "ready",
85                "summary": "URL → web_locus entity card",
86                "design_use": "Browser remember / select current page as entity"
87            },
88            {
89                "id": "view_morph",
90                "status": "ready",
91                "summary": "flatten | spatialize | both on last projection",
92                "design_use": "Morph controls on Library and eventually immersive stage"
93            },
94            {
95                "id": "scene_entity_id",
96                "status": "ready",
97                "summary": "webizen-render SceneNode.entity_id (+ affordance_bits)",
98                "design_use": "Pick node → select same entity as flat card"
99            },
100            {
101                "id": "circumstance_tuple",
102                "status": "partial",
103                "summary": "Circumstance struct + view_set_circumstance; session field present; path-steering not fully productised",
104                "design_use": "D6 job vs private chrome; environment presets (sanctuary/workplace/cafe)"
105            },
106            {
107                "id": "fragment_store_persist",
108                "status": "partial",
109                "summary": "Edge model + tests; not yet WAL-backed attribution store",
110                "design_use": "Show edges in mockups; persistence next"
111            },
112            {
113                "id": "learning_morph_film_mmo",
114                "status": "partial",
115                "summary": "PresentationLevel + dual projection; full film/MMO stage not productised",
116                "design_use": "Concept boards for learning morphs; capability Present only for P0-P2 path"
117            },
118            {
119                "id": "library_entity_view_ui",
120                "status": "ready",
121                "summary": "Library panel entity-view strip: observer, P0-P6, flatten/spatialize, hidden_count, select",
122                "design_use": "D3/D5/D11 live surface for polish"
123            },
124            {
125                "id": "browser_web_locus",
126                "status": "ready",
127                "summary": "Browser chrome projects URL as web_locus into shared session; remember button; entity chip",
128                "design_use": "D10 shared session across browser + Library"
129            },
130            {
131                "id": "zk_enumerated_states",
132                "status": "planned",
133                "summary": "Privacy engine HE/DP present elsewhere; ZK not wired to entity_view states",
134                "design_use": "Do not claim ZK UI yet"
135            }
136        ],
137        "desktop_commands": [
138            "view_session",
139            "view_set_observer",
140            "view_set_presentation_level",
141            "view_project_library",
142            "view_project_web_locus",
143            "view_morph",
144            "view_select",
145            "view_clear_selection",
146            "view_bifurcate_package",
147            "view_capability_report",
148            "view_set_circumstance"
149        ],
150        "surfaces": {
151            "library": "entity-view strip wired (observer, morph, project, select)",
152            "browser": "web_locus project on navigate + remember; entity chip",
153            "shell": "shares process-wide ViewSession via view_* commands"
154        },
155        "design_boards_enabled": ["D1", "D2", "D3", "D4", "D5", "D10", "D11", "D12"],
156        "design_boards_partial": ["D6", "D7", "D8", "D9"],
157        "honesty": {
158            "bifurcation_is_not_encryption": true,
159            "instruments_are_not_persons": true,
160            "commons_not_private_twin": true,
161            "morph_is_not_full_immersive_stage": true
162        }
163    })
164}
165
166#[cfg(test)]
167mod tests {
168    use super::*;
169
170    #[test]
171    fn report_lists_ready_and_partial() {
172        let v = entity_view_capability_report();
173        let caps = v["capabilities"].as_array().unwrap();
174        assert!(caps.len() >= 10);
175        assert_eq!(v["module"]["path"], "entity_view");
176        let cmds = v["desktop_commands"].as_array().unwrap();
177        assert!(cmds.iter().any(|c| c == "view_capability_report"));
178    }
179}