From arthur0824hao-skills
Deprecated compatibility shim for observe-and-evolve flows. skill-system-soul is now the canonical owner; this skill remains as a redirect surface for existing commands, docs, and tests.
npx claudepluginhub arthur0824hao/skills --plugin document-skillsThis skill uses the workspace's default tool permissions.
Deprecated compatibility surface. `skill-system-soul` is now the canonical owner of observe/evolve behavior, but this skill remains available so existing `insight` routes, docs, and tests do not break during the merge window.
SKILL.behavior.yamlSKILL.spec.yamlmigrate-v2-durable-evolution.sqlprompts/clinical-organism-review.mdprompts/evolution-planning.mdprompts/facet-extraction.mdprompts/recipe-evolution.mdprompts/soul-synthesis.mdschema/evolution-plan.yamlschema/evolution-snapshot.yamlschema/facet.yamlschema/soul-state.yamlscripts/evolution_proposal.pyscripts/evolve-recipes.mdscripts/evolve-soul.mdscripts/extract-facets.mdscripts/insight_bundle_b012.pyscripts/list-versions.mdscripts/rollback.mdscripts/synthesize-profile.mdCreates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Deprecated compatibility surface. skill-system-soul is now the canonical owner of observe/evolve behavior, but this skill remains available so existing insight routes, docs, and tests do not break during the merge window.
Unified OBSERVE → EVOLVE engine for user adaptation.
This skill turns sessions into structured behavioral insights ("facets"), uses those facets to maintain a dual-matrix soul state, and periodically evolves soul profiles and workflow recipes — all versioned and rollbackable.
Phase 1 — OBSERVE
Extract facets → Update matrix buffers → (optional) Trigger synthesis
Phase 2 — EVOLVE
Read accumulated data → Plan evidence-backed changes → Apply with versioning → Snapshot for audit/rollback
Phase 1 produces raw signal. Phase 2 consumes it to make durable changes.
The evolve lifecycle can run through an arena comparison loop:
session -> facets -> evolve proposals -> arena A/B -> merge suggestion
The arena stage only emits recommendations. It never auto-switches profiles and never auto-merges changes.
Layer 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.
- Every regeneration creates a versioned snapshot.
Layer 2 is the ground truth. Layer 3 is a readable, versioned projection.
schema/facet.yamlschema/soul-state.yamlschema/evolution-plan.yamlschema/evolution-snapshot.yamlStorage uses the Postgres agent_memories table and typed sub-tables:
memory_type='episodic', category='insight-facet' → typed table: insight_facetsmemory_type='semantic', category='soul-state' → typed table: soul_statesmemory_type='episodic', category='evolution-snapshot' → typed table: evolution_snapshotsTyped functions (dual-write to both typed table and agent_memories):
insert_insight_facet(user, session_id, yaml, ...) → stores facetupsert_soul_state(user, yaml, personality, emotion, ...) → stores/updates soul stateget_soul_state(user) → reads from soul_statesget_recent_facets(user, limit) → reads from insight_facetsinsert_evolution_snapshot(user, version_tag, target, ...) → stores versioned snapshotget_evolution_history(user, limit) → reads from evolution_snapshotsTrigger (manual or suggested) → Extract Facet → Update Matrix → (optional) Synthesize Profile
References:
prompts/facet-extraction.mdprompts/soul-synthesis.mdscripts/extract-facets.mdscripts/update-matrix.mdscripts/synthesize-profile.mdThis is a manual workflow.
When the user asks (or agrees), run:
scripts/extract-facets.mdscripts/update-matrix.mdscripts/synthesize-profile.mdTrigger (manual or scheduled) → Read facets + matrix → Plan evolution → Safety check → Apply → Snapshot
References:
prompts/evolution-planning.mdprompts/recipe-evolution.mdprompts/clinical-organism-review.mdscripts/evolve-soul.mdscripts/evolve-recipes.mdscripts/list-versions.mdscripts/rollback.mdFormat: v{N}_{target}_{timestamp}
Example: v3_soul_20260211
Algorithm: N = 1 + max(existing N) for the same user+target. Start at N=1 if none exist.
Insight now includes a compatibility procedure clinical-organism-review for BH/SK body-map triage.
The procedure emits review rows with required fields:
body_part, technical_surface, tissue_classmaturity (mature | prototype | embryonic | waste | retired)current_pain, evidencedisposition (keep | grow | merge | retire | archive | excrete | bundle)owner, close_gateHard constraint: diagnosis is not progress. Any pain finding without containment + repair + verification must remain close_gate=pain_mapped.
Use: prompts/clinical-organism-review.md
evolution_snapshots + agent_memories)../skill-system-soul/profiles/<user>.md../skill-system-workflow/recipes/*.yamlAll runtime settings (rate limits, thresholds, step sizes, approval gates) are in config/insight.yaml.
Config is the single source of truth. Values below are documentation defaults — if they differ from config/, config/ wins.
See: ../../config/insight.yaml
Always explain what was learned and why.
observe.max_facets_per_day facets per user per rolling 24 hours.
evolve.max_passes_per_day evolution pass per day per user (across all targets).
evolution-snapshot date as the limiter.Do not change matrix values on a single observation.
observe.confidence_threshold+ similar observations in the same direction.observe.personality_step per qualifying adjustment.observe.emotion_step per qualifying adjustment.Accumulation tracked in buffers for testability and explainability.
evolve.approval_drift_threshold) require explicit user approval before applying.../skill-system-soul/profiles/balanced.md../skill-system-soul/profiles/<user>.mdThe synthesis step preserves the 6-section format:
Example SQL templates:
-- 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
);
-- Store evolution snapshot (typed — dual-writes to agent_memories)
SELECT insert_evolution_snapshot(
'<user>', '<version_tag>', '<target>', '<trigger>',
'<changes JSONB>', '<snapshot_data>', '<full YAML>',
NULL, 'insight-agent'
);
-- Query recent facets
SELECT * FROM search_memories('insight-facet user:arthu', NULL, NULL, NULL, NULL, 0.0, 50);
-- List evolution history
SELECT * FROM get_evolution_history('<user>', 50);
{
"schema_version": "2.0",
"id": "skill-system-insight",
"version": "2.2.0",
"capabilities": [
"insight-issue-routing", "insight-session-facets", "insight-extract", "insight-matrix-update", "insight-synthesize",
"evolution-proposal-draft",
"evolution-arena-loop",
"clinical-organism-review",
"evolution-soul", "evolution-recipes", "evolution-list", "evolution-rollback"
],
"effects": ["db.read", "db.write", "fs.read", "fs.write"],
"operations": {
"route-issue-draft": {
"description": "Route findings into a draft issue target based on tags/category without creating issues.",
"input": {
"finding": { "type": "object", "required": true, "description": "Finding payload with tags/category/evidence/impact/suggested_direction" },
"project_repo": { "type": "string", "required": true, "description": "Current project repository owner/name" },
"skill_system_repo": { "type": "string", "required": true, "description": "Skill-system repository owner/name" }
},
"output": {
"description": "Draft routing payload",
"fields": { "status": "ok | error", "target_repo": "string", "draft_command": "string" }
},
"entrypoints": {
"agent": "Use scripts/insight_bundle_b012.py route-issue-draft"
}
},
"extract-session-facets": {
"description": "Session-end facet extraction to soul-state memories via mem.py DB path or pending fallback.",
"input": {
"user": { "type": "string", "required": true, "description": "User handle" },
"session_id": { "type": "string", "required": true, "description": "Session id" },
"facets": { "type": "array", "required": true, "description": "Facet entries: {dimension, value, confidence, evidence}" }
},
"output": {
"description": "Extraction and storage summary",
"fields": { "status": "ok | blocked | error", "stored_count": "integer", "skipped_low_confidence": "integer", "skipped_rate_limit": "integer" }
},
"entrypoints": {
"agent": "Use scripts/insight_bundle_b012.py extract-session-facets"
}
},
"evolve-proposals": {
"description": "Generate non-destructive evolution proposals from soul-state facets with daily-pass safety.",
"input": {
"user": { "type": "string", "required": true, "description": "User handle" }
},
"output": {
"description": "Proposal-only evolve output",
"fields": { "status": "ok | blocked | error", "proposals": "array", "reason": "string" }
},
"entrypoints": {
"agent": "Use scripts/insight_bundle_b012.py evolve-proposals"
}
},
"evolve-arena-loop": {
"description": "Run proposal -> arena -> merge-suggestion flow using current profile versus mutated proposal candidates.",
"input": {
"user": { "type": "string", "required": true, "description": "User handle" },
"task": { "type": "string", "required": true, "description": "Task label" },
"current_profile": { "type": "string", "required": true, "description": "Current active profile" },
"proposals": { "type": "array", "required": true, "description": "Evolution proposals to evaluate" },
"metrics": { "type": "object", "required": true, "description": "Per-candidate arena metrics" }
},
"output": {
"description": "Arena and merge suggestion report",
"fields": { "arena_runs": "array", "merge_suggestions": "array", "auto_merge": "false" }
},
"entrypoints": {
"agent": "Use scripts/insight_bundle_b012.py evolve-arena-loop"
}
},
"clinical-organism-review": {
"description": "Classify BH/SK surfaces with maturity/disposition and repair-oriented close gates.",
"input": {
"review_scope": { "type": "string", "required": true, "description": "Review target label such as sk, bh, or bundle-id" },
"surfaces": { "type": "array", "required": true, "description": "Reviewed surfaces with evidence and proposed dispositions" },
"evidence_sources": { "type": "array", "required": false, "description": "Optional source artifacts or body-map references" }
},
"output": {
"description": "Clinical review rows with close gate status",
"fields": { "status": "ok | blocked | error", "rows": "array", "closeable_rows": "integer", "pain_mapped_rows": "integer" }
},
"entrypoints": {
"agent": "Follow prompts/clinical-organism-review.md"
}
},
"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"
}
},
"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. Creates versioned snapshot.",
"input": {
"user": { "type": "string", "required": true, "description": "User handle" }
},
"output": {
"description": "User profile written to skill-system-soul/profiles/<user>.md with version snapshot",
"fields": { "status": "ok | error", "profile_path": "string", "version_tag": "string" }
},
"entrypoints": {
"agent": "Follow scripts/synthesize-profile.md then scripts/evolve-soul.md snapshot step"
}
},
"evolve-soul": {
"description": "Evolve soul profile from accumulated insight data. Creates versioned snapshot.",
"input": {
"user": { "type": "string", "required": true, "description": "User handle" }
},
"output": {
"description": "Evolution result with version tag",
"fields": { "version_tag": "string", "changes": "array", "profile_path": "string" }
},
"entrypoints": {
"agent": "Follow scripts/evolve-soul.md procedure"
}
},
"evolve-recipes": {
"description": "Evolve workflow recipes based on effectiveness data from insight facets.",
"input": {
"user": { "type": "string", "required": true, "description": "User handle" }
},
"output": {
"description": "Recipe evolution result with version tag",
"fields": { "version_tag": "string", "recipes_changed": "array" }
},
"entrypoints": {
"agent": "Follow scripts/evolve-recipes.md procedure"
}
},
"list-versions": {
"description": "List all evolution snapshots for a user.",
"input": {
"user": { "type": "string", "required": true },
"target": { "type": "string", "required": false, "description": "Filter: soul | recipe | all" }
},
"output": {
"description": "Array of version snapshots",
"fields": { "versions": "array of {tag, target, timestamp, summary}" }
},
"entrypoints": {
"agent": "Follow scripts/list-versions.md procedure"
}
},
"rollback": {
"description": "Restore a previous evolution version.",
"input": {
"user": { "type": "string", "required": true },
"version_tag": { "type": "string", "required": true, "description": "Version tag to restore" }
},
"output": {
"description": "Rollback result",
"fields": { "status": "ok | error", "restored_from": "string" }
},
"entrypoints": {
"agent": "Follow scripts/rollback.md procedure"
}
}
},
"stdout_contract": {
"last_line_json": true,
"note": "The b012 helper script emits pretty-printed JSON to stdout for routing, facet extraction, and evolve proposals."
}
}