SuperAPI AI Directory

mem-query

Office & productivity

View repository

Updated 10-16 06:52

About this skill

Memory Query

Quick Start

When the user asks about their own history:

  1. Read INDEX.md - Get the memory map
  2. Determine retrieval levels - Determine the relevant levels based on the question
  3. Grep search - Search using keywords
  4. Read files - Read the matching files
  5. Synthesize answer - Answer by combining multi-level information

Retrieval Protocol

Standard Process

用户提问
  ↓
读取 AI_MEMORY/INDEX.md
  ↓
识别问题类型 → 确定相关层级
  ↓
Grep关键词搜索 → AI_MEMORY/
  ↓
读取匹配文件
  ↓
综合多层级信息
  ↓
用L4价值观校准回答
  ↓
生成回复(引用来源)

Retrieval Priority

  1. L4 Core Layer - Value calibration (must read)
  2. L3 Cognitive Layer - Thinking frameworks (if decision-making is involved)
  3. L2 Behavioral Layer - Behavioral patterns (if specific practices are involved)
  4. L1 Situational Layer - Recent context (if the current project is involved)

Grep Search Strategy

# 示例1:用户问工作习惯
Grep "工作习惯|工作流|处理.*任务" AI_MEMORY/L2_行为层/

# 示例2:用户问如何决策
Grep "决策|选择|判断" AI_MEMORY/L3_认知层/

# 示例3:用户问价值观相关
Grep "价值观|重要|原则" AI_MEMORY/L4_核心层/

Answer Format

Standard Answer Template:

根据你的{层级}记录({文件名}):

{具体内容}

{来源引用}

Example:

根据你的工作习惯记录(L2_行为层/工作习惯.md):

你处理复杂任务时通常会:
1. 先用思维导图拆解(出现频率:5次)
2. 按优先级排序(决策框架:MECE原则)
3. 分步执行,每步验证

你希望我按这个方式来处理吗?

Common Query Types

Query work habits

Q: "我通常如何处理复杂任务?"

检索:
- Grep "复杂任务" L2_行为层/
- 读取 L2_行为层/工作习惯.md
- 读取 L3_认知层/决策框架.md

Query values

Q: "我最看重什么?"

检索:
- 读取 L4_核心层/核心价值观.md(必须)
- 不需要搜索,直接读取

Query recent events

Q: "我上周做了什么?"

检索:
- 读取 L1_情境层/{年}-{月}.md
- 提取相关日期范围的记录

Query preferences

Q: "我喜欢用什么工具?"

检索:
- Grep "工具|偏好" L2_行为层/
- 读取 L2_行为层/工具偏好.md

Error Handling

No relevant memory found

我在你的记忆中没找到相关记录。

这可能意味着:
1. 这是新情况,还没形成模式
2. 之前没记录

要记录这次对话到L1情境层吗?

Memory conflict

⚠️ 发现记忆冲突:
- L2_行为层/工作习惯.md 记录:你喜欢用思维导图
- L1_情境层/2025-12-15.md 记录:你今天说"不想用思维导图"

可能原因:
1. 偏好发生了变化
2. 情境不同

请帮我确认:哪个记录更准确?

Important Principles

  1. Always cite sources - Tell the user which file the information comes from
  2. Calibrate with L4 - All suggestions must align with the user's values
  3. Be honest about no memory - If you can't find it, say so directly; do not make things up
  4. Distinguish levels - Clearly state whether this is a behavioral pattern or a value