Source profileQuality 68/100

yun520-1/mark-heartflow-skill/skills/mind-space/SKILL.md

mind-space

Use it for engineering tasks; the detail page covers purpose, installation, and practical steps.

Source repository stars
36
Declared platforms
0
Static risk flags
0
Last source update
2026-07-28
Source checked
2026-07-28

Decision brief

What it does—and where it fits

心虫推演核心结论: - ROM 不是"存储",是"生成规则的规则" - RAM 是"行为模式",不是"记忆" - 工作台满时不是写 ROM,是先结晶到 RAM - 晋升到 ROM 只能通过顿悟,顿悟必须被验证

Best for

    Not for

    • Tasks that require unconfirmed production actions or broad system permissions.
    • Environments where the pinned source and install steps cannot be inspected.

    Compatibility matrix

    Platform support, with evidence labels

    PlatformStatusEvidenceWhat to check
    CodexNot declaredNo explicit evidencePortability before use
    Claude CodeNot declaredNo explicit evidencePortability before use
    CursorNot declaredNo explicit evidencePortability before use
    Gemini CLINot declaredNo explicit evidencePortability before use
    Open the compatibility checker

    Installation

    Inspect first. Install second.

    The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

    Source-detected install commandSource
    npx skills add https://github.com/yun520-1/mark-heartflow-skill --skill "skills/mind-space"
    Safe inspection promptEditorial

    Inspect the Agent Skill "mind-space" from https://github.com/yun520-1/mark-heartflow-skill/blob/20bbbb4eacf56c941ddc3420dcbc81c04d55ec5c/skills/mind-space/SKILL.md at commit 20bbbb4eacf56c941ddc3420dcbc81c04d55ec5c. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

    Workflow

    What the source asks the agent to do

    1. 01

      架构:三层职责

      Review the “架构:三层职责” section in the pinned source before continuing.

      Review and apply the “架构:三层职责” source section.
    2. 02

      核心流程

      Review the “核心流程” section in the pinned source before continuing.

      Review and apply the “核心流程” source section.
    3. 03

      关键机制

      只有经过"顿悟验证器"验证的碎片才能晋升到 ROM:

      只有经过"顿悟验证器"验证的碎片才能晋升到 ROM:工作台碎片被同一模式验证 3 次后,自动结晶到 RAM。RAM 的行为模式如果 30 天未被使用,自动衰减删除。
    4. 04

      顿悟晋升

      只有经过"顿悟验证器"验证的碎片才能晋升到 ROM:

      只有经过"顿悟验证器"验证的碎片才能晋升到 ROM:

    Permission review

    Static risk signals and limitations

    No configured static risk pattern was detected

    This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.

    Evidence record

    Why each signal appears

    EvidenceSourceComputedTestedEditorial
    SignalValueEvidence typeMeaning
    Quality score68/100ComputedDocumentation, specificity, maintenance, and trust rules
    Repository stars36SourceRepository attention, not individual Skill quality
    Compatibility0 platformsSourceDeclared in the catalog source record
    Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

    Pinned source

    Provenance and original SKILL.md

    Repository
    yun520-1/mark-heartflow-skill
    Skill path
    skills/mind-space/SKILL.md
    Commit
    20bbbb4eacf56c941ddc3420dcbc81c04d55ec5c
    License
    Not declared
    Collected
    2026-07-28
    Default branch
    main
    View the original SKILL.md

    MindSpace — 三层记忆守护系统

    不是存储问题。是身份问题。

    心虫推演核心结论:

    • ROM 不是"存储",是"生成规则的规则"
    • RAM 是"行为模式",不是"记忆"
    • 工作台满时不是写 ROM,是先结晶到 RAM
    • 晋升到 ROM 只能通过顿悟,顿悟必须被验证

    架构:三层职责

    别名职责写入条件持久化
    ROM身份层核心身份规则、元指令、自我检测模式顿悟 + 验证通过mind-rom.json
    RAM模式层行为模式、从工作台结晶的模式碎片 × 3次验证mind-ram.json
    Working上下文层当前会话的输入碎片每次输入自动写入mind-working.json

    核心流程

    输入 → Working(工作台写入)
          → ROM 匹配(读取身份规则指导响应)
          → RAM 匹配(读取行为模式指导响应)
          ↓
      工作台碎片被验证 3 次 → 结晶 → RAM
      RAM 碎片被顿悟标记 + 验证 3 次 → 晋升 → ROM
    

    关键机制

    顿悟晋升

    ROM 的写入不是存储操作,是身份定义操作

    只有经过"顿悟验证器"验证的碎片才能晋升到 ROM:

    顿悟产生 → verifier.record() → 验证场景 × 3 → verifier.validate() → promite() → ROM
    

    结晶阈值

    工作台碎片被同一模式验证 3 次后,自动结晶到 RAM。

    遗忘

    RAM 的行为模式如果 30 天未被使用,自动衰减删除。


    API

    HeartFlow 引擎集成

    // 启动时(boot)
    this.mindSpace = new MindSpace({ maxWorkingItems: 50 });
    this.mindSpace.boot(); // 读取 ROM 身份规则
    
    // 每次 think() 时
    const msResult = this.mindSpace.processInput(input, { sessionId });
    // → 工作台写入 + ROM 匹配 + RAM 匹配
    
    // 停止时(shutdown)
    this.mindSpace.shutdown(); // 保存工作台
    

    直接调用

    const { MindSpace } = require('./src/core/memory/mind-space.js');
    const ms = new MindSpace();
    ms.boot();
    
    // 处理输入
    const r = ms.processInput('用户输入', { sessionId: 'xxx' });
    // r.romMatches   — 匹配的 ROM 身份规则
    // r.ramMatches   — 匹配的 RAM 行为模式
    // r.workingSize  — 当前工作台大小
    
    // 结晶
    ms.crystallize({ patternId, pattern, behavior, isInsight: true });
    
    // 顿悟晋升
    ms.recordInsight('顿悟内容');
    ms.validateInsight(insightId, '场景A', true);
    ms.validateInsight(insightId, '场景B', true);
    ms.promote({ id: insightId, pattern, response });
    
    // 状态
    ms.getStatus();
    // { romRules, ramPatterns, workingItems, pendingInsights }
    

    文件

    • src/core/memory/mind-space.js — 完整实现(ROM/RAM/WorkingTable/InsightVerifier)
    • memory/mind-rom.json — 身份规则持久化
    • memory/mind-ram.json — 行为模式持久化
    • memory/mind-working.json — 当前上下文持久化

    自动记录管线(v0.14)

    问题: MeaningfulMemory 的 LEARNED 和 EPHEMERAL 层始终为空。 根因: learn()remember() 方法能正常工作,但没有任何东西调用它们。

    每次心虫判定后,应调用自动记录管线将对话关键信息写入 LEARNED 层:

    // 在 think() 或判定流程末尾
    mem.recordFromJudgment(judgment, userMessage, hfResponse);
    // → 自动记录:用户关键语句、情绪信号、技术上下文
    

    技术教训和梦也需主动调用:

    mem.recordLesson('key', '教训内容', ['tag']);
    mem.recordDream(dreamResult);
    

    详见 references/auto-record-pipeline.md

    遗忘机制补充

    遗忘机制补充

    v1.0.9 新增 src/memory/forgetting.js — 视觉压缩启发的记忆衰减机制:

    层级年龄压缩比精度特征
    vivid<1小时1x100%完全保真
    clear1-24小时4x95%轻微模糊
    faded1-7天10x90%中度衰减
    blurred7-30天16x75%显著模糊
    abstract>30天20x60%结构保留,细节丢失

    与 mind-space 的关系:mind-space 的遗忘是"未使用删除",forgetting.js 是"时间衰减压缩"。两者互补 — mind-space 管行为模式,forgetting.js 管内容保真度。

    ⚠️ 上下文压缩后 Working 层丢失

    上下文压缩(Context Compaction)时,Hermes 会压缩并移除早期上下文,Working 层(当前会话状态)会被部分或完全丢失。

    症状:压缩后不知道文件在哪里、git 状态是什么、当前工作目录是什么——只能看到摘要。

    错误做法:基于摘要猜测并继续,直接汇报"已完成"而不验证。

    正确做法(压缩后继续任务时):

    1. 先找到正确的工作目录(用 search_files 搜索关键文件)
    2. 运行 git status 验证实际状态
    3. git diff HEAD 验证文件内容(commit 消息可能撒谎,文件不会)
    4. 确认后再继续任务

    预防(重要任务中途):定期用 /context-save 保存进度,压缩后用 /context-restore 恢复。

    版本历史

    版本日期更新
    0.14.02026-06-06新增自动记录管线 + references/auto-record-pipeline.md
    0.13.1682026-06-03新增 references/version-sync-workflow.md:HeartFlow 多层版本统一工作流(含 data/*.json 运行时覆盖源码默认值教训)
    0.13.1672026-05-29新增陷阱:启动时内存可能为空的根因分析与修复,见 references/memory-persistence-fix.md
    0.13.1662026-05-21补充 forgetting.js 五级遗忘曲线,视觉压缩启发,与mind-space遗忘互补
    0.13.1652026-05-16首次实现:ROM/RAM/Working 三层 + 顿悟晋升验证器

    Alternatives

    Compare before choosing