skill-system-insight

📁 arthur0824hao/skills 📅 3 days ago
8
总安装量
3
周安装量
#34785
全站排名
安装命令
npx skills add https://github.com/arthur0824hao/skills --skill skill-system-insight

Agent 安装分布

opencode 3
gemini-cli 3
amp 2
kimi-cli 2
codex 2
github-copilot 2

Skill 文档

Skill System Insight

This skill turns sessions into structured, explainable behavioral insights (“facets”), and uses those facets to evolve a user’s Soul state over time.

The intent is pragmatic: collaborate better by learning the user’s working style, not by inventing a persona.

Architecture: Hybrid 3-Layer System

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.

Layer 2 is the ground truth. Layer 3 is a readable projection.

Data Model

  • Facets (per-session extraction): schema/facet.yaml
  • Soul state (dual matrix + counters/buffers): schema/soul-state.yaml

Storage uses the Postgres agent_memories table:

  • Facets: memory_type='episodic', category='insight-facet'
  • Soul state: memory_type='semantic', category='soul-state'

Pipeline

Trigger (manual or suggested) -> Extract Facet -> Update Matrix -> (optional) Synthesize Profile

References:

  • Facet extraction prompt: prompts/facet-extraction.md
  • Soul synthesis prompt: prompts/soul-synthesis.md
  • Extraction procedure: scripts/extract-facets.md
  • Matrix update algorithm: scripts/update-matrix.md
  • Profile regeneration procedure: scripts/synthesize-profile.md

How To Trigger

This is a manual workflow.

  • User can ask explicitly: “insight”, “extract facets”, “learn my preferences”, “update my profile”.
  • Router suggestion pattern (lightweight, non-pushy):
    • “Want me to run an insight pass to learn from this session? (stores a facet + may update your matrix)”

When the user asks (or agrees), run:

  1. scripts/extract-facets.md
  2. scripts/update-matrix.md
  3. If the synthesis trigger fires: scripts/synthesize-profile.md

Constraints (Non-Negotiable)

Transparency

Always explain what was learned and why.

  • Facets must contain evidence strings tied to concrete moments.
  • Matrix updates must add short context lines explaining each applied adjustment.

Rate limiting

Max 3 facets per user per rolling 24 hours.

If over limit: do not store a new facet. Instead, write a short note to the user summarizing what you would have captured, and ask them to pick 1 session to record.

Confidence threshold

Do not change matrix values on a single observation.

  • Threshold: 3+ similar observations in the same direction.
  • Personality step size: +/- 0.05 per qualifying adjustment.
  • Emotion baseline step size: +/- 0.1 per qualifying adjustment.

Accumulation should be tracked (buffers) so the threshold is testable and explainable.

Where Layer 1 and Layer 3 Live

  • Base profile (Layer 1): skill/skills/skill-system-soul/profiles/balanced.md
  • Synthesized user profile (Layer 3): skill/skills/skill-system-soul/profiles/<user>.md

The synthesis step should preserve the 6-section format used by balanced.md:

  1. Identity
  2. Decision Heuristics
  3. Communication Style
  4. Quality Bar
  5. Tool Preferences
  6. Anti-Patterns

Storage Pattern (agent_memories)

Example SQL templates (copy/paste and substitute values):

-- 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);

Operational Notes

  • Facet extraction should be completable in one pass. If you cannot justify an adjustment with concrete evidence, propose no adjustment.
  • Users may communicate in Chinese; treat that as a signal about comfort, not as a personality dimension.
  • Keep values clamped to [0.0, 1.0].