Loading...
Loading...
Observe user interaction patterns, extract per-session facets, update a dual-matrix soul state, and periodically synthesize a personalized Soul profile for better collaboration.
npx skill4agent add arthur0824hao/skills skill-system-insightLayer 1: Base Profile (balanced.md)
- Static skeleton: section format + safety/quality defaults.
Layer 2: Dual Matrix (soul-state)
- Personality Matrix (slow/stable): openness, directness, autonomy, rigor, warmth
- Emotion Matrix (faster baseline): patience, enthusiasm, caution, empathy
Layer 3: Synthesized Profile (user.md)
- Periodically regenerated from Layer 1 + Layer 2 + accumulated facets.schema/facet.yamlschema/soul-state.yamlagent_memoriesmemory_type='episodic'category='insight-facet'memory_type='semantic'category='soul-state'Trigger (manual or suggested) -> Extract Facet -> Update Matrix -> (optional) Synthesize Profileprompts/facet-extraction.mdprompts/soul-synthesis.mdscripts/extract-facets.mdscripts/update-matrix.mdscripts/synthesize-profile.mdscripts/extract-facets.mdscripts/update-matrix.mdscripts/synthesize-profile.mdskill/skills/skill-system-soul/profiles/balanced.mdskill/skills/skill-system-soul/profiles/<user>.mdbalanced.md-- Store a facet
SELECT store_memory(
'episodic',
'insight-facet',
ARRAY['session:ses_xxx', 'user:arthu'],
'Session Facet: <brief_summary>',
'<full facet YAML as text>',
'{"session_type": "...", "outcome": "..."}',
'insight-agent',
'ses_xxx',
5.0
);
-- Store/update matrix state
SELECT store_memory(
'semantic',
'soul-state',
ARRAY['user:arthu', 'matrix'],
'Soul State: arthu',
'<full soul-state YAML as text>',
'{"total_insights": 0, "last_updated": "..."}',
'insight-agent',
NULL,
9.0
);
-- Query recent facets
SELECT * FROM search_memories('insight-facet user:arthu', NULL, NULL, NULL, NULL, 0.0, 50);{
"schema_version": "2.0",
"id": "skill-system-insight",
"version": "1.0.0",
"capabilities": ["insight-extract", "insight-matrix-update", "insight-synthesize"],
"effects": ["db.read", "db.write", "fs.write"],
"operations": {
"extract-facets": {
"description": "Extract a per-session facet from transcript. Rate limited to 3/24h per user.",
"input": {
"session_id": { "type": "string", "required": true, "description": "Session to analyze" },
"user": { "type": "string", "required": true, "description": "User handle" }
},
"output": {
"description": "Facet YAML stored to agent_memories",
"fields": { "status": "ok | error", "memory_id": "integer" }
},
"entrypoints": {
"agent": "Follow scripts/extract-facets.md procedure (no executable script)"
}
},
"update-matrix": {
"description": "Update dual matrix from stored facet with confidence gating.",
"input": {
"user": { "type": "string", "required": true, "description": "User handle" }
},
"output": {
"description": "Updated soul-state YAML stored to agent_memories",
"fields": { "status": "ok | error", "values_changed": "boolean" }
},
"entrypoints": {
"agent": "Follow scripts/update-matrix.md procedure"
}
},
"synthesize-profile": {
"description": "Regenerate Layer 3 Soul profile from matrix + recent facets.",
"input": {
"user": { "type": "string", "required": true, "description": "User handle" }
},
"output": {
"description": "User profile written to skill-system-soul/profiles/<user>.md",
"fields": { "status": "ok | error", "profile_path": "string" }
},
"entrypoints": {
"agent": "Follow scripts/synthesize-profile.md procedure"
}
}
},
"stdout_contract": {
"last_line_json": false,
"note": "Agent-executed procedures; output is structured YAML stored to DB, not stdout."
}
}