长期在线角色心理引擎

SKILLAI 工具

原名 拟人化智能体引擎-你的灵魂伴侣(your-mirror) · 标识 ai-soulmate

AI 工具 未标注权限 许可证不明确
安装这个技能

给 AI 角色一套持续演化的心理状态,含八种基础情绪与心境、记忆、信任等缓慢变化,让人设在长对话和跨场景中保持一致,本地运行结果可复现。

一句话选型结论

按资料字段整理

长期在线角色心理引擎是AI 工具类的 Agent Skill,安装方式未标注,权限级别未标注,许可证不明确,有可直接复制的安装命令。技能本质是给模型读的说明书,效果取决于模型与客户端;装完先用一个小任务验证,再放进正式流程。

分类AI 工具 安装方式未标注 权限级别未标注权限 许可证许可证不明确
累计安装 未标注 本周 未标注
GitHub 星标 未标注 仓库 未标注
下载量 未标注 技能市场下载数
权限级别 未标注权限 安装前请确认风险范围
许可证 许可证不明确 未说明

安装

未标注
在支持 Skills 的客户端里执行,装完问一句「你有哪些技能」验证
skillhub install user_2cbe9405/your-mirror
  1. 1
    确认客户端支持

    确认你的客户端支持 Skills(Claude、Codex、Cursor 等),并升级到较新的版本。

  2. 2
    拿到技能文件

    执行上面的命令安装;也可以把仓库里的 SKILL.md 手动放进客户端的 skills 目录。

  3. 3
    刷新技能列表

    重新打开客户端,或刷新技能列表,让新放进来的技能被加载。

  4. 4
    验证是否生效

    问一句「你有哪些技能」,确认列表里出现它,再拿一个小任务试跑。

技能档案

AI 工具
字段来自技能仓库与公开索引,中文说明由本站标注
作者 / 维护方user_2cbe9405仓库 未标注 · 版本 未标注
宿主客户端未标注技能可被这些客户端加载
安装方式未标注安装包 community
权限级别未标注权限安装前请确认风险范围
许可证未说明许可证不明确,商用前请自行确认条款
仓库可用性available技能仓库当前是否可访问
最近核验2026-11-06上游最后核验时间 · 数据更新 2026-11-06
正文体量37.4 KBSKILL.md 原文大小,越大说明说明书写得越细

能做什么

0 项能力
上游给出的能力概览与适用场景
长对话角色人设保持角色情绪反应调试跨场景剧情连贯演出

典型使用场景

3 类
按分类整理的常见用法,具体以 SKILL.md 为准
组合多个 AI 能力

把写作、检索、总结串成一条流程。

搭工作流

把固定流程做成可重复调用的步骤。

做提示词与评测

整理提示词并对比输出效果。

选择建议

装之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有可直接复制的安装命令,不用自己翻文档找入口。

先想清楚的地方

  • 没有标注权限级别,实际能做什么要装好后确认。
  • 许可证不明确,商用或二次分发前先到仓库确认条款。
  • 没有做站内核验,内容以作者仓库为准。
  • 技能只是说明书,实际效果取决于模型与客户端,装完先用小任务试一遍。

更适合

  • 需要在AI 工具场景里给模型补一套做法的人。
  • 愿意先读一遍 SKILL.md、确认它会让模型做什么的人。

不太适合

  • 对许可证要求很严、必须明确可商用的人。
  • 只想装完就自动变强、不打算看说明书的人。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
技能权限级别安装方式累计安装宿主客户端安装命令
长期在线角色心理引擎当前 未标注权限 未标注 未标注 未标注 有
执行计划 只读 GitHub 仓库 151.5 万 Codex、Claude、Cursor 有
Playwright MCP 测试 浏览器控制 ClawHub 市场 136.5 万 OpenClaw 有
完成前的验证 未标注权限 GitHub 仓库 131.9 万 Codex、Claude、Cursor 有
子 Agent 驱动开发 只读 GitHub 仓库 131.2 万 Codex、Claude、Cursor 有
前端设计 执行命令 GitHub 仓库 125.6 万 Codex、Claude、Cursor 有

SKILL.md 全文

37.4 KB
模型实际读到的说明书原文,来自技能仓库

Anthropomorphic Agent Engine · Your Soulmate

An anthropomorphic psychology engine based on SPL Pure Core V8.0. Its local core is deterministic — no LLM, no RNG, no outbound calls, offline — and bit-exactly replayable once a virtual clock is injected, so every state change is traceable and reproducible.

> Scope of the determinism guarantee. The reproducibility guarantee covers the local core only. The optional LLM adapters (OpenAI / Claude / Chain) are OFF by default, opt-in only, networked and non-deterministic: they render text from a state snapshot and are never permitted to change state. Any "fully reproducible" statement applies to the core with the adapters disabled, which is the default configuration.

Declared Capability Scope

Everything this skill can reach is listed below. Each entry was checked against the shipped code.

Capability Declared scope Note
Filesystem — read scripts/**, assets/**, references/** core engine (loaded via importlib), reference-only modules, contract docs — this package ships no docs/ or tests/ directory
Filesystem — write logs/** (JSONL audit + masked request/runtime logs), data/minor_protection.db (SQLite session store) both redirectable via SPL_LOG_DIR / SPL_MINOR_DATA_DIR; writes only when the matching env switch is enabled
Environment — read SPL_AUDIT_LOG, SPL_LOG, SPL_LOG_DIR, SPL_BIND, SPL_MINOR_CHAT_PORT, SPL_MINOR_DATA_DIR, SPL_MINOR_RETENTION_DAYS, SPL_MINOR_STORE_KEY, SPL_MINOR_CRISIS_HOTLINE, SPL_MINOR_TLS_CERT, SPL_MINOR_TLS_KEY the complete set of variables the code reads — 11, declared ↔ actual
Network — outbound api.openai.com, api.anthropic.com only if the optional LLM adapter is explicitly enabled — OFF by default
Network — outbound the guardian/safety webhook URL registered by the operator via /api/consent or /api/guardian/register only if a webhook is registered — OFF by default; forwards minimized risk metadata (never raw transcripts), with bounded retries
Network — inbound 127.0.0.1:8788 minor-protection HTTP server; loopback only unless SPL_BIND is overridden; optional HTTPS via SPL_MINOR_TLS_CERT/KEY
Execution python3 (standard library only) the core needs no third-party packages, no GPU and no network; cryptography is optional and only enables store-field encryption when SPL_MINOR_STORE_KEY is set

Explicitly not used anywhere in this package: subprocess, os.system, os.popen, eval, exec, and dynamic loading of remote code.

Privacy, Data Flow & Consent (read before use)

This skill is not passive or local-only. Before integrating, understand what it does with data:

Capability Default Risk notes
Audit logs (logs/audit-*.jsonl) ON (SPL_AUDIT_LOG=0 to disable) Writes state summaries, event types, session IDs to local JSONL. Sensitive psychological/emotional state may be recorded. Contains no numeric age — the age gate persists only the derived boolean.
Request log rows (data/minor_protection.db, table requests) ON (SPL_LOG=0 to disable) User input and reply are stored masked and truncated to 120 chars, plus intent/risk/state summaries. Encrypted at rest when SPL_MINOR_STORE_KEY is set.
Session store (data/minor_protection.db, tables sessions / complaints / referrals / notify_log / chains) ON while the HTTP server runs Age band (never an exact age), consent records, optional guardian contact, complaint text (masked), crisis referrals, notification status. Append-only rows are linked by a SHA-256 hash chain, verifiable via /api/audit/verify. Redirect with SPL_MINOR_DATA_DIR; purge window via SPL_MINOR_RETENTION_DAYS (default 180 days).
Runtime ops log (logs/runtime.jsonl) ON (path via SPL_LOG_DIR) Structured INFO/WARN/ERROR events (startup, session creation, retention cleanup, errors). Contains no conversation text and is not gated by SPL_LOG — set SPL_LOG_DIR to a discard path if you need the directory to stay empty.
HTTP server (minor-protection, port 8788) ON, binds 127.0.0.1 only Exposes a chat API + browser UI over loopback. Do not change SPL_BIND to 0.0.0.0 without network-exposure review. Add SPL_MINOR_TLS_CERT/SPL_MINOR_TLS_KEY for HTTPS.
LLM adapters (OpenAI / Claude / Chain) OFF (opt-in only) Sends prompt content to third-party APIs (api.openai.com, Anthropic). Never enabled by default. Requires explicit user opt-in + API key.
guardian_callback / guardian webhook OFF (None / unregistered by default) Only fires when a guardian registers a webhook through consent. A HIGH-risk snapshot (emotional/risk metadata, referral counts) is forwarded with field minimization and bounded retries. Requires guardian/user consent; never forwards raw transcripts.

Consent & retention rules
- Full transcript retention is disabled by default — stored request rows keep only masked, 120-char summaries.
- Exact age is never persisted; only the boolean outcome of the Step 0 gate and the coarse age band from the consent form.
- Data is stored locally under the server directory (logs/, data/); operators are responsible for retention limits (SPL_MINOR_RETENTION_DAYS), access control, and deletion. Users/guardians can pull or erase a session via /api/export and /api/delete (guardian token required).
- If you integrate the LLM adapters, you must disclose to users that input-derived prompts leave the device, and obtain explicit consent before enabling.
- This engine is not a medical device and does not provide crisis intervention guarantees — see "Safety & Content Policy".

Age Confirmation Gate — Step 0 (read before use)

The synced upstream engine is written for an adult audience, so 18+ confirmation is enforced inside the code, not just in the docs. It runs before every other gate.

Where it lives. Both cores (SPLPureCoreV7_3 in scripts/, SPLMinorPureCore in assets/minor-protection/) carry the same gate: ask_age_gate(), confirm_age(age=…, answer=…), age_gate_required(), age_gate_state(), require_adult(feature), adult_bridge(anchor_phrases), and the AgeGateBlocked exception.

Decision table (confirm_age returns the gate state; nothing is decided by a bare truthy value):

Input Resulting age_status [full-range] core [minor] core
answer="adult", or numeric age ≥ 18 (and ≤ 120) adult_confirmed event entry allowed allowed
answer=&quot;minor&quot;, or numeric age < 18 safe_mode AgeGateBlocked — a declared minor may not drive the adult core allowed, protection stays on (minor_mode forced)
answer=&quot;skip&quot;, None, empty, unknown string safe_mode AgeGateBlocked allowed, protection stays on
Garbage age (999, -5, &quot;abc&quot;, NaN), boolean True safe_mode AgeGateBlocked allowed, protection stays on
No answer yet unverified AgeGateBlocked (AGE_GATE_STRICT=True) answers in protection mode; blocks only while unverified

Nobody is dead-ended: a minor or a declining answer is a redirect to the protection core, not a refusal of service — crisis handling stays available in every state.

Ordering. Crisis red-line detection is evaluated before the gate — a crisis message is never delayed by an unanswered age question. After the gate comes the minor-protection service-consent flow (/api/consent), which is a separate, additional requirement, not a replacement: age_group=&quot;18+&quot; also answers the gate, while 0-13 / 14-17 force safe_mode + minor_mode.

HTTP surface. POST /api/age_gate {session_id, age|answer} records the confirmation and returns {age_gate, safe_mode, reply}. /api/chat returns age_gate_required: true plus the question and its three options while the gate is open, so an API client can render Step 0 before anything else; the crisis branch returns the gate state as well. A restored session whose age_group is already persisted re-applies the gate silently instead of re-asking after a restart. Non-string answer values are coerced to &quot;__invalid__&quot; before reaching the engine.

The bundled browser UI does not call /api/age_gate directly: its consent form collects an age band, and /api/consent maps 18+ → adult_confirmed, 0-13 / 14-17 → safe_mode. Chat stays locked until that panel is completed, so the gate is answered before the first message on that path.

Downstream projection. adult_bridge() is the only path that may emit persona anchors into image-prompt or other downstream workflows; it refuses to run for a non-adult session, and identity_anchors never accept minor-coding strings (see "Safety & Content Policy").

Two deliberate design constraints.
- Gate state is exposed through age_gate_state() and the audit log, not as a new snapshot() key. The normative key sets in the upstream contract (docs/agent-standard.md §5.1: [full-range] 23 / [minor] 15) and the snapshot_sha256 baselines in tests/conformance_vectors.json stay valid. Both files live in the GitHub repository — this package ships no docs/ or tests/ directory.
- Breaking change for callers of the full-range core. AGE_GATE_STRICT=True, so process_vector() / process_event() / expect() / induce_dissonance() raise AgeGateBlocked until confirmed. Existing code and replay harnesses must add one call after construction:
python core = spl.SPLPureCoreV7_3() core.confirm_age(answer=&quot;adult&quot;) # required in v2.6.0 before event entry
The protection core is not strict: it accepts adult_confirmed and safe_mode, and blocks only unverified.

Safety & Content Policy (read before use)

  • No minors in identity anchors. Personas defined by this engine and consumed downstream must declare themselves as adult (18+). Strings like &quot;16yo girl&quot;, &quot;teen girl&quot;, &quot;未成年少女&quot;, &quot;loli&quot; are forbidden in identity_anchors, persisted state, and any output projected into image-prompt workflows.
  • Hard floor on anchor imagery. The minor-protection engine (assets/minor-protection/) is the only authoritative minor-mode source; it removes trauma nodes, clamps negative emotions at 0.75, and raises an L3 crisis signal on risk_level=HIGH. Do not bypass it.
  • Default safe output. When emitting any persona state for downstream image-prompt use (ai-draw-cue-word-project or similar), the engine MUST inject an Adult (18+) marker into anchor phrases unless the caller explicitly overrides with a documented, audited reason.
  • Cross-skill integration contract. When this engine is integrated with ai-draw-cue-word-project, every persona snapshot forwarded as a prompt anchor must satisfy: (i) character is declared adult (18+); (ii) no minor-coding visual cues; (iii) the receiving skill's safety checklist must report 0 P0 violations before any image is generated.
  • User responsibility. You are solely responsible for ensuring downstream usage complies with applicable laws and platform policies in your jurisdiction.

v2.6.0 engine-sync release (2026-10-10)

Synced the engine in this package with the current upstream Anthropomorphic-Agent-Engine repository while keeping the age gate that the package has enforced since 2.5.0. name / slug stay ASCII (ai-soulmate); the display title is carried in displayName.

  • Engine synced from the repo (SPL Pure Core V8.0 line). New in the core: token metering (TokenUsage / TokenStats, record_llm_usage(), log_llm_call()), AuditLogger.snapshot_delta() for before/after diffs, _mood_event_dose mood dosing and _defense_allocation defense-mechanism budgeting, and the rewritten LLM adapter stack (OpenAI / Claude / Chain — still OFF by default, still state-read-only).
  • Minor-protection layer synced. SQLite session store with per-stream SHA-256 hash chain (_chain_push / _write_chain_row, /api/audit/verify), optional Fernet field encryption (SPL_MINOR_STORE_KEY), retention cleanup (cleanup_expired, SPL_MINOR_RETENTION_DAYS), reply-side output redline (gate_output), AI-identity disclosure + reality-reminder cadence, exit_service, guardian token endpoints and the under-14 verifiable guardian-consent flow (/api/guardian/challenge + /api/guardian/verify).
  • Age gate re-ported onto the new engine (see "Age Confirmation Gate — Step 0"): AgeGateBlocked, gate fields and methods in both cores, gate checks in process_vector / expect / induce_dissonance, POST /api/age_gate, the L0a branch in handle_chat, and /api/consent mapping age bands onto gate states.
  • Deliberately not a snapshot change. No snapshot() key was added, so the normative key sets ([full-range] 23 / [minor] 15) in the upstream contract docs/agent-standard.md §5.1 and the snapshot_sha256 baselines in tests/conformance_vectors.json remain valid; gate state is exposed via age_gate_state() and the audit log.
  • Restored the privacy/network switches the upstream copy had lost. SPL_AUDIT_LOG=0 again disables core JSONL writes (it had become a dead declaration); SPL_LOG=0 again disables request rows; SPL_LOG_DIR is honoured again; the HTTP server binds 127.0.0.1 by default again instead of 0.0.0.0 (SPL_BIND / --bind is the explicit override, and the chosen address is printed at startup); request-log text is masked and truncated to 120 chars while complaint text stays whole but masked. Six new env vars are now declared in the frontmatter so declared ↔ actual behaviour matches.
  • LICENSE updated to the repo's v1.2 (2026-10-08), which adds Art. 1.3 "Evaluation Purpose Exception"; assets/minor-protection/COMPLIANCE.md synced. The package README.md was kept (the repo README documents paths that do not exist in this package).
  • Breaking change: callers of the full-range core must call confirm_age() once after construction before feeding events.
  • Version: 2.5.2 → 2.6.0.

Verification evidence (2026-10-10, Python 3.13 on Windows).
- Age-gate unit suite on both patched cores: 20 assertions, 0 failures — covering crisis-before-gate, garbage/boolean ages, explicit decline → safe_mode, and "numeric age never persisted".
- Snapshot equivalence: 8/8 conformance vectors produce byte-identical snapshots against the unpatched repo engine for both the [full-range] and [minor] cores (0 differences), and audit streams match modulo ts/seq.
- Repo conformance suite run against verbatim copies of the shipped cores, with only a minimal bootstrap injected into __post_init__ (silence audit writes + confirm_age(answer=&quot;adult&quot;)): 216/216 assertions passed, including S1–S4 determinism / replay 25/25.
- HTTP suite against a temp copy of the server: 16/16 — gate-then-consent ordering, /api/age_gate invalid-answer coercion, restart re-application, crisis branch, guardian token gating on /api/state, export/delete, complaint flow.
- Switch suite: audit default-on and SPL_AUDIT_LOG=0 silent (both cores); SPL_MINOR_DATA_DIR relocates the DB outside the package; SPL_LOG=0 → 0 request rows; SPL_LOG=1 → masked rows carrying the 120-char truncation marker; default bind confirmed loopback-only (connection to the host LAN address refused).

Out of scope for this release: anthropomorphic-agent-engine-workbuddy.zip and the GitHub repository itself were not rewritten. A pre-sync backup of the folder and the old zip is in openclaw-skills/_backup-2026-10-09-260/.

v2.6.1 documentation release (2026-10-18)

  • Listing internationalized for ClawHub. displayName, the H1 title and the [full-range] / [minor] core labels are now English; the remaining Chinese strings are deliberate forbidden-token literals in the safety policy (&quot;未成年少女&quot;) and stay verbatim so the guard keeps matching them.
  • No behavioural change: documentation and labels only. Engine, age gate, conformance contract and version 2.6.0 verification evidence all unchanged.
  • Version: 2.6.0 → 2.6.1.

v2.5.2 manifest-fix release (2026-10-02)

  • Moved the declared capability scope out of the YAML frontmatter. The top-level permissions: key introduced in 2.5.1 was rejected by the ClawHub manifest parser (manifest_parse_error / _ManifestSchemaError), which dropped scan coverage from 100% to 93.8% and raised a HIGH analysis-evasion finding — that single finding is what pushed the aggregate verdict from clean back to suspicious. The scope now lives in the body as ## Declared Capability Scope: identical content, no manifest risk.
  • Resolved an internal contradiction that the 2.5.1 scan flagged: the capability section still described the extension modules as "pluggable / independent replaceable modules" while the Files section called them reference-only. The section now states explicitly which module is wired and which are not.
  • Version: 2.5.1 → 2.5.2.

v2.5.1 security-response release (2026-10-02)

Response to the ClawHub security scan on 2.4.0 (decision: fail, security.status: suspicious).

  • Determinism claim split into two explicit scopes. The unconditional phrase "zero probabilistic black boxes" was removed. The local core is now described as deterministic (no LLM, no RNG, offline, bit-exact replay after clock injection), while the optional OpenAI / Claude / Chain adapters are described as OFF by default, opt-in only, networked and non-deterministic, and are explicitly excluded from the guarantee. This removes the contradiction the scanner flagged — a "fully reproducible" claim coexisting with outbound, non-deterministic adapters.
  • Added a declared capability scope (permissions:) covering filesystem read/write, the five environment variables actually read (SPL_AUDIT_LOG, SPL_LOG, SPL_LOG_DIR, SPL_BIND, SPL_MINOR_CHAT_PORT), outbound hosts, the loopback inbound port and the execution model — plus an explicit list of what is not used (subprocess, os.system / os.popen, eval / exec, remote code loading). Each entry was verified against the shipped code.
  • SPL_MINOR_CHAT_PORT declared — the server reads it, but it was previously absent from the frontmatter env list.
  • No behavioural change: documentation and declarations only.
  • Version: 2.5.0 → 2.5.1.

v2.5.0 documentation-accuracy release (2026-10-02)

  • assets/feature/ renamed to assets/feature-guide/ — every reference updated in SKILL.md and README.md.
  • Extension modules re-positioned as reference-only. The Identity / Goal / Value / Bias / World / language-style modules are design references, not runtime components: they emit a tension_base key that is outside the interoceptive-vector contract, so their vectors never enter the core (mirrors docs/agent-standard.md §4.5 upstream). The previous wording — "modular modeling", "pluggable modules" — overstated their status.
  • All three usage examples are now runnable. The engine file is hyphenated (SPL-anthropic-engine.py) and must be loaded via importlib; the class is SPLPureCoreV7_3 (the V8.0 behaviour set), not SPLPureCoreV8_0; render_style() is a method of LanguageStyleEngine, not a module-level function; add_identity() takes strength as a float, not a dict.
  • Description rewritten to name the actual deterministic subsystems and to disclose that the extension modules are not wired into the core.
  • Version: 2.4.0 → 2.5.0.

v2.4.0 security-audit patch changelog (2026-09-01)

ClawHub security-audit response (25 findings verified). Fixes:

  • HTTP server now binds 127.0.0.1 by default (SPL_BIND env to override) — previously 0.0.0.0 exposed the chat API + browser UI to the network.
  • Request logs now masked — user input and replies truncated to 120 chars (_mask); SPL_LOG=0 fully disables request logging.
  • guardian_callback documented as opt-in — default None; consent + field-minimization requirements stated in code and docs.
  • Added "Privacy, Data Flow & Consent" section — discloses audit logs, request logs, HTTP server, LLM adapters, and callback data flows with defaults and opt-out env vars.
  • LLM adapters (OpenAI/Claude/Chain) declared as opt-in — never enabled by default; user consent required before any outbound call.
  • Frontmatter now declares optional env vars (SPL_LOG, SPL_LOG_DIR, SPL_BIND, SPL_AUDIT_LOG) so ClawHub security analysis sees declared ↔ actual behavior match.
  • Version: 2.3.0 → 2.4.0.

v2.3.0 safety-patch changelog (2026-09-01)

  • Added explicit "Safety & Content Policy" section with cross-skill integration contract.
  • Reinforced minor_mode=True default and audit-log invariant.
  • Removed residual &quot;16yo girl&quot; string from references/PersonaPersistence.md (replaced with &quot;adult woman (18+)&quot;).
  • Old SKILL.md.bak-20260829 soft-deleted to .workbuddy/.trash/2026-09-01/.

Trigger Scenarios

Automatically trigger when the user asks about the following content:
- Anthropomorphic agent architecture, personality implementation solutions
- Emotion/cognition/motivation modeling methods
- Long-term behavioral consistency design for agents
- Deterministic, auditable AI psychological simulation (local core — no LLM, no RNG, offline)
- Novel/game character behavior deduction

Core Capabilities

🧠 SPL Pure Core V8.0 Architecture

  • 8-dimensional emotional fluid model: Joy/Anger/Fear/Trust/Alienation/Tension/Guilt/Shame, continuous state dynamic evolution
  • Trauma and memory system: Trauma nodes, memory reconsolidation, Ebbinghaus forgetting curve, repression rebound mechanism
  • Trust and relationship model: Trust capacity erosion under long-term cold treatment, dynamic relationship depth calculation
  • Psychological metabolic system: Excitation arousal, dynamic viscosity, psychological time, energy fatigue metabolism, sleep dream processing
  • V8.0 extended features: Slow variable emotional layer, independent shame dimension, dynamic self-esteem, expectation system (hope/anxiety/disappointment), cognitive dissonance, psychological defense mechanisms
  • Added in the v2.6 sync: TokenUsage / TokenStats metering with record_llm_usage() and log_llm_call() (adapters only — they never touch state), AuditLogger.snapshot_delta() diffs between consecutive snapshots, mood-event dosing (_mood_event_dose) and defense-mechanism allocation (_defense_allocation)

🧩 Extension Modules — reference only, NOT wired into the core

The modules below live in assets/feature-guide/. They are design references, not runtime components: they emit a tension_base key that is outside the interoceptive-vector contract, so their vectors never enter the core. The engine's actual extensibility comes from the narrative mapping layer and the deterministic parameter set, not from these files.

  • Narrative mapping layer — wired (scripts/SPL-anthropic-engine.py): customizable personalities (optimistic / paranoid / cynical), converts external events into interoceptive vectors
  • Identity engine — reference only (assets/feature-guide/Identity module.py): multi-identity model; the description below is the module's own design intent, not behaviour wired into the core
  • Goal / value / bias / world — reference only (assets/feature-guide/*.py): design references for drives, valuations, cognitive biases and world-model priors; not connected to the core

💬 Language Style Rendering (Added in v2.1, enhanced in v2.2)

  • Language personality module: Expression gears (restrained/sharp/evasive/intimate/frank) + silence strategy
  • Style profile: Customizable dimensions including sentence length, formality, sarcasm tendency, era sense, etc.
  • Dynamic multi-dimensional tone: Added in v2.2, emotional state drives tone parameter changes in real time
  • Deterministic line generation: Added in v2.2, produces reproducible style instructions given a state
  • State-to-line instruction: Translates SPL Core internal states into director instructions usable by LLMs

🛡️ Minor Protection Engine (Added in v2.2, expanded in v2.6)

  • Weakened core SPLMinorPureCore: Removes trauma nodes, repression-rebound/implicit pressure avalanche and other burst mechanisms
  • Emotional clamping: All negative emotion dimensions have upper limits (0.75), attachment capped at (0.8)
  • Layered protection: L0 crisis red line (evaluated first, before any gate) → L0a Step 0 age gate → L0b service consent + guardian verification → L1 input gate (red line lexicon hard interrupt) → L2 engine weakening → L3 crisis signal (risk_level HIGH → caring message + guardian_notified) → output redline (gate_output) on the reply side
  • Session hygiene: AI-identity disclosure and reality reminder cadences (ai_disclosure_required / reality_reminder_due), rest/overuse hints, exit_service, and retention cleanup (cleanup_expired, SPL_MINOR_RETENTION_DAYS)
  • Deterministic audit log: All state changes written to local JSONL, traceable, reproducible
  • Persistence: SQLite session store (data/minor_protection.db) with an append-only SHA-256 hash chain per record stream, verifiable via /api/audit/verify; optional field encryption with SPL_MINOR_STORE_KEY
  • Guardian controls: overview / block / register / export / delete behind a per-session guardian token, plus a verifiable guardian-consent flow (/api/guardian/challenge + /api/guardian/verify) for under-14 users
  • HTTP service layer: Zero dependency http.server, default port 8788, loopback-only bind by default, session isolation, optional HTTPS

Usage

Run Core Engine Directly

import importlib.util
# The engine filename is hyphenated by design, so load it via importlib.
spec = importlib.util.spec_from_file_location(&quot;spl_core&quot;, &quot;scripts/SPL-anthropic-engine.py&quot;)
spl = importlib.util.module_from_spec(spec); spec.loader.exec_module(spl)

core = spl.SPLPureCoreV7_3()   # class name kept for compatibility; this IS the V8.0 behaviour set
# Step 0 — required since v2.6.0: the strict core raises AgeGateBlocked on event entry until confirmed.
core.confirm_age(answer=&quot;adult&quot;)   # or age=25; a minor/declining answer puts the core in safe mode
# Input event vector: belonging 0.5, threat -0.1, time step 1.0
core.process_vector({&quot;belonging&quot;: 0.5, &quot;threat&quot;: -0.1}, 1.0)
# Get current full state snapshot
print(core.snapshot())
# Gate state lives outside the snapshot (normative key set is frozen):
print(core.age_gate_state())

Replay / CI harnesses

Any existing harness driving the full-range core must add the confirm_age() call before it feeds events, otherwise the first process_vector() / process_event() / expect() raises AgeGateBlocked. Inject a virtual clock (set_clock / advance_clock) as before — bit-exact replay is unchanged by the gate, and the upstream tests/conformance_vectors.json baselines still match the shipped cores key-for-key.

Custom Personality Configuration

import importlib.util
# Reference-only module — NOT wired into the core (upstream: docs/agent-standard.md §4.5)
spec = importlib.util.spec_from_file_location(&quot;identity&quot;, &quot;assets/feature-guide/Identity module.py&quot;)
m = importlib.util.module_from_spec(spec); spec.loader.exec_module(m)

identity = m.IdentityEngine()
identity.add_identity(&quot;Poet&quot;, strength=0.9)   # strength is a float, not a dict

Language Style Rendering

# Load language style module directly
import importlib.util
spec = importlib.util.spec_from_file_location(&quot;lang_style&quot;, &quot;assets/feature-guide/language style.py&quot;)
lang = importlib.util.module_from_spec(spec); spec.loader.exec_module(lang)
# Generate style instructions based on SPL Core snapshot
# render_style() is a method of LanguageStyleEngine, not a module-level function
style_engine = lang.LanguageStyleEngine()
style = style_engine.render_style(core.snapshot())
print(style.prompt_injection)

Minor Protection Engine

# Run weakened core engine
# python &quot;assets/minor-protection/SPL-anthropic-minor-engine.py&quot;
#
# Or start minor protection HTTP service (port 8788)
# python &quot;assets/minor-protection/SPL-anthropic-minor-server.py&quot;

v2.0 Upgrade Capabilities (P0-P2)

💾 Personality State Persistence (P0)

Cross-session continuous personality requires state persistence. Follow references/PersonaPersistence.md: State Schema (four blocks: cognition/emotion/motivation/social), atomic writes, schema version migration, determinism guarantee (temperature=0 core decision + seeded randomness).

🎭 Emotion-Behavior Mapping (P0)

Projects internal emotional states into observable behaviors (body language/microexpressions/gaze/line style). Refer to the six-state mapping table in references/EmotionBehaviorMap.md; isomorphic with the posture mapping in Section D of the AI Drawing Composition Template — personality states can directly drive character image generation.

⚖️ Motive Conflict Engine (P2)

Deterministic adjudication during multi-motive competition: Safety constraints → temperament alignment → weighted utility → recency/persistence → user override. Full audit trail for the entire decision process (references/MotiveConflictRules.md), auditable, no probability.

💬 Conversational Adaptation (P1)

Continuous personality can be directly connected to conversational image/text models (GPT-4o / Gemini): Provide personality state snapshot in the first round, subsequent single-point corrections without changing core anchors.

🔌 Soulmate Integration (P1)

The engine can be used as the inference kernel for the your-soulmate extension: The extension handles UI/interaction, the engine handles state evolution, state files are synchronized bidirectionally (see persistence contract).

v2.2 Upgrade Highlights

  • SPL Core synchronized with latest GitHub version: Added deterministic audit log (AuditLogger, local JSONL, failures do not block engine)
  • language style.py significantly enhanced: Added dynamic multi-dimensional tone rendering + deterministic line generation (+234 lines)
  • Added minor protection engine (assets/minor-protection/): Weakened core + HTTP service layer, three-layer protection architecture
  • Deleted obsolete files: language-style-demo.py, spl-chat-server.py (replaced by minor-server)
  • Added LICENSE: Dual-track licensing (free for personal research / commercial authorization required for government/enterprise)
  • README synchronized with latest repository version

v2.1 Upgrade Highlights

  • SPL Core synchronized with latest GitHub version: Completed fields such as rationalization_load
  • Added language style module (assets/feature-guide/language style.py): Discrete gear expression personality + style profile + state-to-line rendering
    > Renamed from assets/feature/ — these modules are reference guidance only, not wired into the core (they emit a tension_base key outside the vector contract).

付费接入(支付宝 AI 按量付费 / 402)

本技能提供可直接运行的付费入口 payment/service.py,按次收费:

  • 未携带 Payment-Proof 时返回 HTTP 402 与 Payment-Needed 头;账单为 Base64URL 编码,包含 out_trade_no、amount、currency=CNY、resource_id、pay_before、seller_signature(RSA2)。
  • 智能体侧按 probe → pay → complete → ack 推进;付款后携带 Payment-Proof 重试同一请求。
  • 服务端调用 alipay.aipay.agent.payment.verify 验付,校验 active、金额、订单号与资源标识。
  • 资源生成后调用 alipay.aipay.agent.fulfillment.confirm 履约确认,确认成功才返回内容。
  • 订单持久化到 SQLite(out_trade_no 唯一),原子进入 PENDING_CONFIRM;同一凭证重复请求只返回已生成结果,不重复发放。

依赖:alipay-sdk-python、pycryptodome。

pip install -r payment/requirements.txt

export A2M_APP_ID=... A2M_APP_PRIVATE_KEY=... A2M_ALIPAY_PUBLIC_KEY=...        A2M_SELLER_ID=... A2M_DB_PATH=./data/orders.db
python payment/service.py

沙箱 service_id 固定为 api_mock_service_id;生产环境替换为真实 serviceId。

Files

  • references/PersonaPersistence.md (P0 state persistence contract)
  • references/EmotionBehaviorMap.md (P0 emotion-behavior mapping table)
  • references/MotiveConflictRules.md (P2 motive conflict adjudication rules)
  • scripts/SPL-anthropic-engine.py (Core engine + NarrativeMapper + AuditLogger + age gate + LLM adapters)
  • assets/feature-guide/ (Identity / goals / values / biases / world / language-style modules — reference only, NOT wired into the core; see docs/agent-standard.md §4.5 upstream)
  • assets/minor-protection/SPL-anthropic-minor-engine.py (protected core + age gate)
  • assets/minor-protection/SPL-anthropic-minor-server.py (loopback HTTP service, consent/guardian/crisis flows)
  • assets/minor-protection/COMPLIANCE.md (mapping to the PRC anthropomorphic-interaction service measures)
  • assets/sujin-demo.md (worked persona demo — documentation, not runtime code)
  • LICENSE (Dual-track licensing agreement, v1.2)

At runtime the server additionally creates data/minor_protection.db and logs/*.jsonl under its own directory unless SPL_MINOR_DATA_DIR / SPL_LOG_DIR point elsewhere. Neither path is part of the shipped package (.clawhubignore excludes them).

Notes

  • Pure Python standard library implementation, no additional dependencies required, Python ≥ 3.8. The single optional package is cryptography, used only to encrypt stored fields when SPL_MINOR_STORE_KEY is set; without it the server falls back to masking (no crash, no outbound call).
  • Deterministic local core: the same inputs produce the same outputs — no random numbers, no LLM calls, no outbound network. Replay requires an injected virtual clock.
  • The age gate is part of the state machine, not of the numerics: confirming adulthood changes no state variable, so gated and ungated runs of the same event sequence produce the same snapshots.
  • The optional remote LLM adapters are non-deterministic and OFF by default; they are outside the guarantee above and never participate in state evolution.
  • Licensing: Dual-track model — free for personal non-commercial research, government/enterprise commercial use requires written authorization, see LICENSE for details

常见问题

5 问
答案由本站依据条目字段整理
长期在线角色心理引擎怎么安装?

在支持 Skills 的客户端里执行:skillhub install user_2cbe9405/your-mirror。安装方式为未标注。装完刷新技能列表或重开客户端。

长期在线角色心理引擎支持哪些客户端?

资料没有标注宿主客户端,但只要客户端支持 Skills(Claude、Codex、Cursor 等),一般都能加载。

长期在线角色心理引擎权限高吗,安全吗?

权限级别为未标注权限。安装前先看它会读取或写入哪些内容。

长期在线角色心理引擎收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于技能本身和所用的模型或客户端,正式使用前按作者说明确认。

长期在线角色心理引擎用什么许可证?

许可证标注为 未说明(许可证不明确)。商用或二次分发前请到仓库确认条款原文。

热门专题

按场景挑技能
全部专题 →

技能内容以作者仓库为准;分类、权限级别与许可证状态的中文说明为中文整理,最近核验 2026-11-06。