home / skills / chachamaru127 / claude-code-harness / memory

memory skill

/skills/memory

This skill manages SSOT, memory, and cross-tool search to preserve decisions and enable seamless project knowledge reuse.

npx playbooks add skill chachamaru127/claude-code-harness --skill memory

Review the files below or copy the command above to add this skill to your agents.

Files (7)
SKILL.md
3.9 KB
---
name: memory
description: "Manage SSOT, memory, and cross-tool memory search. Guardian of decisions.md and patterns.md. Use when user mentions memory, SSOT, decisions.md, patterns.md, merging, migration, SSOT promotion, sync memory, save learnings, memory search, claude-mem, past decisions, record this, or cursor-mem integration. Do NOT load for: implementation work, reviews, ad-hoc notes, or in-session logging."
description-en: "Manage SSOT, memory, and cross-tool memory search. Guardian of decisions.md and patterns.md. Use when user mentions memory, SSOT, decisions.md, patterns.md, merging, migration, SSOT promotion, sync memory, save learnings, memory search, claude-mem, past decisions, record this, or cursor-mem integration. Do NOT load for: implementation work, reviews, ad-hoc notes, or in-session logging."
description-ja: "SSOTと記憶を管理し、ツール横断の記憶検索を提供。decisions.mdとpatterns.mdの守護者です。Use when user mentions memory, SSOT, decisions.md, patterns.md, merging, migration, SSOT promotion, sync memory, save learnings, memory search, claude-mem, past decisions, record this, or cursor-mem integration. Do NOT load for: implementation work, reviews, ad-hoc notes, or in-session logging."
allowed-tools: ["Read", "Write", "Edit", "Bash", "mcp__harness__harness_mem_*", "mcp__claude-mem__*"]
argument-hint: "[ssot|sync|migrate|search|record]"
context: fork
---

# Memory Skills

メモリとSSOT管理を担当するスキル群です。

## 機能詳細

| 機能 | 詳細 |
|------|------|
| **SSOT初期化** | See [references/ssot-initialization.md](references/ssot-initialization.md) |
| **Plans.mdマージ** | See [references/plans-merging.md](references/plans-merging.md) |
| **移行処理** | See [references/workflow-migration.md](references/workflow-migration.md) |
| **プロジェクト仕様同期** | See [references/sync-project-specs.md](references/sync-project-specs.md) |
| **メモリ→SSOT昇格** | See [references/sync-ssot-from-memory.md](references/sync-ssot-from-memory.md) |
| **記憶検索(Cursor連携)** | See [references/cursor-mem-search.md](references/cursor-mem-search.md) |

## Unified Harness Memory(共通DB)

Claude Code / Codex / OpenCode 共通の記録・検索は `harness_mem_*` MCP を優先する。

- 検索: `harness_mem_search`, `harness_mem_timeline`, `harness_mem_get_observations`
- 注入: `harness_mem_resume_pack`
- 記録: `harness_mem_record_checkpoint`, `harness_mem_finalize_session`, `harness_mem_record_event`

## Claude Code 自動メモリとの関係(D22)

Harness の SSOT メモリ(Layer 2)は Claude Code の自動メモリ(Layer 1)と共存します。
自動メモリは汎用的な学習を暗黙的に記録し、SSOT はプロジェクト固有の意思決定を明示的に管理します。
Layer 1 の知見がプロジェクト全体に重要な場合、`/memory ssot` で Layer 2 に昇格してください。

詳細: [D22: 3層メモリアーキテクチャ](../../.claude/memory/decisions.md#d22-3層メモリアーキテクチャ)

## 実行手順

1. ユーザーのリクエストを分類
2. 上記の「機能詳細」から適切な参照ファイルを読む
3. その内容に従って実行

## SSOT昇格

メモリシステム(Claude-mem / Serena)から重要な学びをSSOTに永続化します。

- "**Save what we learned**" → [references/sync-ssot-from-memory.md](references/sync-ssot-from-memory.md)
- "**Promote decisions to SSOT**" → [references/sync-ssot-from-memory.md](references/sync-ssot-from-memory.md)

## 記憶検索(Cursor連携)

CursorからClaude-memを活用し、セッション間の知識を引き継ぎます。

- "**過去の判断を確認したい**" → [references/cursor-mem-search.md](references/cursor-mem-search.md)
- "**この実装パターンを記録して**" → [references/cursor-mem-search.md](references/cursor-mem-search.md)

Overview

This skill manages a single source of truth (SSOT) for project decisions, cross-tool memory search, and promotion of important learnings into persistent project memory. It is the guardian of decisions.md and patterns.md and orchestrates migrations, merges, and syncs between ephemeral auto-memory and project SSOT. Use it when you need to record, promote, or query project-level knowledge across sessions. Do not use it for implementation work, ad-hoc notes, code reviews, or in-session logging.

How this skill works

The skill classifies user requests and follows targeted procedures to read the appropriate reference guidance (SSOT initialization, plans merging, workflow migration, sync, or cursor memory search). It performs SSOT promotion by extracting important learnings from auto-memory layers and writing them into decisions.md or patterns.md as canonical records. For searches, it queries integrated cursor/Claude-mem stores to return relevant past decisions and patterns, then offers promotion or sync actions when findings are project-relevant.

When to use it

  • When you mention memory, SSOT, or SSOT promotion
  • When you ask to save learnings, record decisions, or promote insights to decisions.md or patterns.md
  • When you request memory search across sessions (cursor-mem / Claude-mem)
  • When you need to merge or migrate SSOT/plans or sync project specs
  • When you ask about merging, migration, or SSOT promotion workflows

Best practices

  • Frame requests as project-level decisions or learnings rather than implementation details
  • Give context: which project, scope, and why the learning matters for future decisions
  • Use explicit commands: “Promote to SSOT”, “Save what we learned”, or “Search past decisions” to trigger correct flows
  • Confirm expected destination file (decisions.md or patterns.md) before promotion
  • Avoid invoking this skill for ephemeral notes, live code reviews, or in-session logging

Example use cases

  • Promote a recurring architectural choice to decisions.md so future runs reuse it
  • Search past decisions about CI/CD or release cadence across sessions using cursor-mem
  • Merge multiple plan drafts into a single SSOT-backed plans.md
  • Migrate legacy workflow notes into the SSOT structure during project onboarding
  • Sync updated project specifications from source files into the canonical SSOT

FAQ

What counts as suitable content for SSOT promotion?

Project-level, enduring decisions or patterns that affect future work and multiple contributors. Avoid transient implementation details.

How does memory search handle relevance?

It queries integrated cursor/Claude-mem stores and ranks results by project scope and recentness, then surfaces candidates for promotion to SSOT.