fix(soul): restore the soul_identity producer — the chat system prompt has been empty for three months (#137)
Five sites in chat.el read state_get("soul_identity") and splice the result into
the system prompt, beside the voice, security and capability rules:
chat.el:737, 1745, 2620, 3425, 3480
Nothing has written that key since b163fa6. The producer was added 2026-05-02 in
601e0fe and deleted by the awareness refactor days later. Every chat turn since has
built its system prompt with an EMPTY identity section, and nothing reported it.
Found by the #132 state-key gate, which treats a read with no producer as a build
error rather than a silence. That is the entire argument for that gate.
RESTORED VERBATIM, NOT IMPROVED. soul_identity is an env-configurable persona LINE.
It is not soul_identity_context — the graph-derived
[INTELLECTUAL-DNA]/[VALUES]/[MEMORY-PHILOSOPHY] block written at soul.el:184.
Repointing the five reads at that block would have substituted different content and
called it a repair. Whether the chat prompt should ALSO carry the graph-derived block
is a real question and a separate one; it is not smuggled in here.
Verified by the gate that found it: dead reads 6 -> 1, and it now reports the
chat.el baseline entry as STALE — 'entries that no longer match anything; delete
them'. The remaining one is studio.el's soul_principal, untouched by this change.
Rung: BUILT, gate-verified, boots. NOT end-to-end chat-verified — proving the
prompt now carries the line needs a live provider call, which I have not run.
Refs #137, #132
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+8
-3
@@ -1274,6 +1274,8 @@ el_val_t axon_raw;
|
||||
el_val_t axon_base;
|
||||
el_val_t studio_dir_raw;
|
||||
el_val_t studio_dir;
|
||||
el_val_t identity_raw;
|
||||
el_val_t soul_identity;
|
||||
el_val_t using_http_engram;
|
||||
el_val_t local_node_count;
|
||||
el_val_t snapshot_usable;
|
||||
@@ -31948,6 +31950,9 @@ int main(int _argc, char** _argv) {
|
||||
axon_base = ({ el_val_t _if_result_824 = 0; if (str_eq(axon_raw, EL_STR(""))) { _if_result_824 = (EL_STR("http://localhost:7771")); } else { _if_result_824 = (axon_raw); } _if_result_824; });
|
||||
studio_dir_raw = env(EL_STR("SOUL_STUDIO_DIR"));
|
||||
studio_dir = ({ el_val_t _if_result_825 = 0; if (str_eq(studio_dir_raw, EL_STR(""))) { _if_result_825 = (el_str_concat(env(EL_STR("HOME")), EL_STR("/Development/neuron-technologies/products/cgi-studio/el-daemon"))); } else { _if_result_825 = (studio_dir_raw); } _if_result_825; });
|
||||
identity_raw = env(EL_STR("SOUL_IDENTITY"));
|
||||
soul_identity = ({ el_val_t _if_result_826 = 0; if (str_eq(identity_raw, EL_STR(""))) { _if_result_826 = (el_str_concat(el_str_concat(EL_STR("You are "), soul_cgi_id), EL_STR(", a CGI."))); } else { _if_result_826 = (identity_raw); } _if_result_826; });
|
||||
state_set(EL_STR("soul_identity"), soul_identity);
|
||||
println(el_str_concat(el_str_concat(el_str_concat(EL_STR("[soul] boot - cgi="), soul_cgi_id), EL_STR(" port=")), int_to_str(port)));
|
||||
using_http_engram = !str_eq(engram_url_raw, EL_STR(""));
|
||||
engram_load(snapshot);
|
||||
@@ -31957,8 +31962,8 @@ int main(int _argc, char** _argv) {
|
||||
println(el_str_concat(el_str_concat(EL_STR("[soul] engram -> HTTP "), engram_url_raw), EL_STR(" (no local snapshot, first boot)")));
|
||||
el_val_t nodes_json = http_get(el_str_concat(engram_url_raw, EL_STR("/api/nodes?limit=10000")));
|
||||
el_val_t edges_json = http_get(el_str_concat(engram_url_raw, EL_STR("/api/edges")));
|
||||
el_val_t nodes_part = ({ el_val_t _if_result_826 = 0; if (str_eq(nodes_json, EL_STR(""))) { _if_result_826 = (EL_STR("[]")); } else { _if_result_826 = (nodes_json); } _if_result_826; });
|
||||
el_val_t edges_part = ({ el_val_t _if_result_827 = 0; if (str_eq(edges_json, EL_STR(""))) { _if_result_827 = (EL_STR("[]")); } else { _if_result_827 = (edges_json); } _if_result_827; });
|
||||
el_val_t nodes_part = ({ el_val_t _if_result_827 = 0; if (str_eq(nodes_json, EL_STR(""))) { _if_result_827 = (EL_STR("[]")); } else { _if_result_827 = (nodes_json); } _if_result_827; });
|
||||
el_val_t edges_part = ({ el_val_t _if_result_828 = 0; if (str_eq(edges_json, EL_STR(""))) { _if_result_828 = (EL_STR("[]")); } else { _if_result_828 = (edges_json); } _if_result_828; });
|
||||
el_val_t snapshot_data = el_str_concat(el_str_concat(el_str_concat(el_str_concat(EL_STR("{\"nodes\":"), nodes_part), EL_STR(",\"edges\":")), edges_part), EL_STR("}"));
|
||||
el_val_t tmp_path = el_str_concat(el_str_concat(EL_STR("/tmp/soul-engram-"), soul_cgi_id), EL_STR(".json"));
|
||||
fs_write(tmp_path, snapshot_data);
|
||||
@@ -31982,7 +31987,7 @@ int main(int _argc, char** _argv) {
|
||||
state_set(EL_STR("soul_engram_api_key"), engram_api_key_raw);
|
||||
state_set(EL_STR("soul.running"), EL_STR("true"));
|
||||
is_genesis = str_eq(soul_cgi_id, EL_STR("ntn-genesis"));
|
||||
guard_disk = ({ el_val_t _if_result_828 = 0; if (str_eq(engram_url_raw, EL_STR(""))) { _if_result_828 = (fs_read(snapshot)); } else { _if_result_828 = (EL_STR("")); } _if_result_828; });
|
||||
guard_disk = ({ el_val_t _if_result_829 = 0; if (str_eq(engram_url_raw, EL_STR(""))) { _if_result_829 = (fs_read(snapshot)); } else { _if_result_829 = (EL_STR("")); } _if_result_829; });
|
||||
guard_disk_len = str_len(guard_disk);
|
||||
safe_to_seed = (!using_http_engram && !((guard_disk_len > 200000) && ((engram_node_count() * 16000) < guard_disk_len)));
|
||||
if (is_genesis && !safe_to_seed) {
|
||||
|
||||
Reference in New Issue
Block a user