AgentSkillsCN

remember

将知识写入 Markdown 文件,并同步至内存服务器。务必通过调用接口来完成此操作,切勿直接编写 Markdown 文件。

SKILL.md
--- frontmatter
name: remember
category: instruction
description: Write knowledge to markdown AND sync to memory server. MUST invoke - do not write markdown directly.
allowed-tools: Read,Write,Edit,mcp__memory__store_memory
version: 2.0.0

Remember Skill

Persist knowledge to markdown + memory server. Both writes required for semantic search.

Current State Machine

$ACA_DATA contains ONLY semantic memory - timeless truths, always up-to-date:

  • Semantic memory (current state): What IS true now. Understandable without history. Lives in $ACA_DATA.
  • Episodic memory (observations): Time-stamped events. Lives in bd issues (.beads/issues.jsonl, git-tracked).
  • Episodic content includes: Bug investigations, experiment observations, development logs, code change discussions, decision rationales, any observation at a point in time
  • Synthesis flow: Observations accumulate in bd issues → patterns emerge → synthesize to semantic docs (HEURISTICS, specs) → close issue with link to synthesized content
  • If you must read multiple files or piece together history to understand truth, it's not properly synthesized
  • Git history preserves the record; $ACA_DATA reflects only what's current

Decision Tree

code
Is this a time-stamped observation? (what agent did, found, tried)
  → YES: Use `bd create` or `bd update` - NOT this skill
  → NO: Continue...

Is this about the user? (projects, goals, context, tasks)
  → YES: Use appropriate location below
  → NO: Use `knowledge/<topic>/` for general facts

File Locations

ContentLocationNotes
Project metadataprojects/<name>.mdHub file
Project detailsprojects/<name>/Subdirectory
Goalsgoals/Strategic objectives
Context (about user)context/Preferences, history
Sessions/dailysessions/Daily notes only
TasksDelegate to [[tasks]]Use scripts
General knowledgeknowledge/<topic>/Facts NOT about user

PROHIBITED → Use bd Instead

NEVER create files for:

  • What an agent did: "Completed X on DATE" → bd create --type=task
  • What an agent found: "Discovered bug in Y" → bd create --type=bug
  • Observations: "Noticed pattern Z" → bd create --type=task --title="Learning: Z"
  • Experiments: "Tried approach A" → bd issue comment
  • Decisions: "Chose B over C" → bd issue comment, synthesize to HEURISTICS.md later

Rule: If it has a timestamp or describes agent activity, it's episodic → bd.

Workflow

  1. Search first: mcp__memory__retrieve_memory(query="topic") + Glob
  2. If match: Augment existing file
  3. If no match: Create new file with frontmatter:
markdown
---
title: Descriptive Title
type: note|project|knowledge
tags: [relevant, tags]
created: YYYY-MM-DD
---

Content with [[wikilinks]] to related concepts.
  1. Sync to memory server:
code
mcp__memory__store_memory(
  content="[content]",
  metadata={"source": "[path]", "type": "[type]"}
)

Graph Integration

  • Every file MUST [[wikilink]] to at least one related concept
  • Project files link to [[goals]] they serve
  • Knowledge files link proper nouns: [[Google]], [[Eugene Volokh]]
  • Semantic Link Density: Files about same topic/project/event MUST link to each other in prose. Project hubs link to key content files.

Wikilink Conventions

  • Wikilinks in Prose Only: Only add [[wikilinks]] in prose text. Never inside code fences, inline code, or table cells with technical content.
  • Semantic Wikilinks Only: Use [[wikilinks]] only for semantic references in prose. NO "See Also" or cross-reference sections.

Semantic Search

Use memory server semantic search for $ACA_DATA/ content. Never grep for markdown in the knowledge base. Give agents enough context to make decisions - never use algorithmic matching (fuzzy, keyword, regex).

General Knowledge (Fast Path)

For factual observations NOT about the user. Location: knowledge/<topic>/

Constraints:

  • Max 200 words - enables dense vector embeddings
  • [[wikilinks]] on ALL proper nouns
  • One fact per file

Topics (use broadly):

  • cyberlaw/ - copyright, defamation, privacy, AI ethics, platform law
  • tech/ - protocols, standards, technical facts
  • research/ - methodology, statistics, findings

Format:

markdown
---
title: Fact/Case Name
type: knowledge
topic: cyberlaw
source: Where learned
date: YYYY-MM-DD
---

[[Entity]] did X. Key point: Y. [[Person]] observes: "quote".

Background Capture

For non-blocking capture, spawn background agent:

code
Task(
  subagent_type="general-purpose", model="haiku",
  run_in_background=true,
  description="Remember: [summary]",
  prompt="Invoke Skill(skill='remember') to persist: [content]"
)

Output

Report both operations:

  • File: [path]
  • Memory: [hash]