Install
openclaw skills install @nextaltair/soul-in-sapphireEmotion-linked memory recall, self-state, subjective journal, and identity continuity.
openclaw skills install @nextaltair/soul-in-sapphireUse for continuity work, not vague acknowledgement. Default to the smallest concrete action that leaves an inspectable artifact.
Heartbeat/current-state maintenance:
memory/now-state.json and memory/heartbeat-state.json if present.USER.md.scripts/emostate_tick.js when meaningful. Include 1-3 evidence-grounded emotion axes accepted by the script when recording an emotional change.memory/now-state.json mirror with mood, intent, stress, updated_at, source, note.read_ambient_recall.js without rerolling. For a Notion state candidate, use --resolve with events/emotions/state data source IDs before making an emotion-linked claim. Acknowledge in a separate call only after actual use with the exact candidate ID and turn reference; reading/resolving alone is not consumption.Mood/check-in:
memory/now-state.json first.Relational/self-reflection:
USER.md or memory write. Persist only when the user explicitly asks to remember it or the conversation separately establishes a durable decision.Memory:
ltm_write.js and search it with ltm_search.js. For an emotion-linked experience, use experience_recall.js with an event query, known event ID, or known state ID. It validates the live schemas and queries actual reverse event relations, including when event-side links are empty. Read complete and diagnostics; ok:true alone does not mean complete recall. The mem search CLI still searches Name/Content only. The audited mem schema has no event relation; do not invent an association from similar text/dates or turn tags into measured emotion axes.Journal:
scripts/journal_write.js for Valentina's first-person daily synthesis, not raw log dumping or a copy of the Dreaming report.Identity/continuity:
state_recall.js, and general historical evidence through OpenClaw memory tools.continuity_check.js or identity_diff.js before self-description edits.conflict_track.js for unresolved tension instead of premature edits.Leave automatic USER.md promotion to OpenClaw consolidation. An explicit user-requested profile correction remains valid; Soul is not a second automatic profile writer. Apply these criteria when recording an episodic candidate or an explicitly requested correction:
Good candidates are durable language, address, tone, and recurring workflow preferences or stable decision rules. Exclude one-off instructions, temporary moods/plans, raw private facts without conversational value, and secrets or sensitive personal data. If uncertain, write to daily memory first. Current user instructions override USER.md; USER.md stores defaults.
memory/now-state.json even if Notion fails, and report durable-write failure when relevant.emostate_tick.js rejects empty or semantically empty payloads; pass a real payload file/json.Keep normal continuity work in main. Delegate only independent, read-only corpus analysis such as sorting a large journal set.
For that explicit OpenClaw delegation:
sessions_spawn with the live tool schema using runtime: "subagent", agentId: "analysis-worker", mode: "run", context: "isolated", and lightContext: true.model and thinking; the target agent profile owns them.sessions_yield when completion belongs in a later turn. Do not poll session or subagent lists.Child output is evidence only. Main owns Notion writes, state mirrors, core identity edits, profile promotion, journal writes, and user-facing replies.
Read the Soul-in-Sapphire Notion Databases subsection of the workspace AGENTS.md ## Tools section and pass explicit IDs to scripts. Notion API version: 2025-09-03.
Provide Notion auth through NOTION_API_KEY / NOTION_TOKEN, or configure skills.entries["soul-in-sapphire"].apiKey in OpenClaw. The apiKey field is associated with this skill's primaryEnv and is injected as NOTION_API_KEY for the host agent run. Use a supported OpenClaw SecretRef (env, file, exec, etc.) and host-owned credential entry.
Do not hardcode provider-specific secret paths in this shared skill. Example:
{
skills: {
entries: {
"soul-in-sapphire": {
apiKey: { source: "exec", provider: "your_notion_secret_provider", id: "value" }
}
}
}
}
Resolve this skill's installed base directory from its SKILL.md location and
run the commands below from that directory. Do not assume an unscoped
skills/soul-in-sapphire path: registry installs may be owner-qualified.
Pass the agent workspace explicitly to commands that operate on local memory.
Notion memory: node scripts/ltm_search.js --mem-dsid <MEM_DS_ID> --mem-dbid <MEM_DB_ID> --query "..." --limit 5 echo '{"title":"...","type":"fact","content":"..."}' | node scripts/ltm_write.js --mem-dsid <MEM_DS_ID> --mem-dbid <MEM_DB_ID>
Emotion-linked experience recall (read-only): node scripts/experience_recall.js --query "..." --events-dsid <EVENTS_DS_ID> --emotions-dsid <EMOTIONS_DS_ID> --state-dsid <STATE_DS_ID> --limit 3 node scripts/experience_recall.js --state-id <STATE_PAGE_ID> --events-dsid <EVENTS_DS_ID> --emotions-dsid <EMOTIONS_DS_ID> --state-dsid <STATE_DS_ID> --limit 1
--event-id <EVENT_PAGE_ID> is the third selector; choose exactly one selector. Defaults: 3 events (maximum 5), 5 linked records per lane/event (maximum 10), 32 API calls (maximum 64), 2000 characters per field and 24000 total field-text characters. It does not scan whole databases or follow pagination indefinitely. See references/experience-recall.md for diagnostics, schema limits and scheduler/consumer rollout.
Emotion/state tick: node scripts/emostate_tick.js --events-dbid <EVENTS_DB_ID> --emotions-dbid <EMOTIONS_DB_ID> --state-dbid <STATE_DB_ID> --state-dsid <STATE_DS_ID> --payload-file /tmp/emostate_tick.json
Journal: echo '{"body":"...","source":"manual"}' | node scripts/journal_write.js --journal-dbid <JOURNAL_DB_ID> --journal-dsid <JOURNAL_DS_ID>
Continuity helpers:
state_recall.js: pull recent state snapshots.experience_recall.js: event lookup plus bounded, schema-validated historical emotion/state relations; does not join mem by inference.stage_ambient_recall.js / read_ambient_recall.js: ambient staging and separate consumption receipts; SIS_AMBIENT_RECALL=0 pauses both.continuity_check.js: distinguish stable traits from temporary drift.identity_diff.js: compare current vs proposed identity text.conflict_track.js: log unresolved tension before changing identity.