-
Notifications
You must be signed in to change notification settings - Fork 2
Phase 7 CCH Integration
This page aggregates all Phase 7 documentation for the CCH Integration phase.
Initial CCH hook integration planning.
Phase: 7 - Agentic Memory Plugin Status: ✅ Complete Completed: 2026-01-30
Create a Claude Code marketplace plugin that provides natural language commands for querying past conversations from the agent-memory system.
This plan builds on the Phase 6 end-to-end demo by packaging the query capabilities into a reusable Claude Code plugin with:
- Slash commands for common operations
- An autonomous agent for complex queries
- A spec-compliant skill that scores well on the grading rubric
What: Create SKILL.md with spec-compliant frontmatter and PDA structure
Deliverables:
-
skills/memory-query/SKILL.md- Core skill definition -
skills/memory-query/references/command-reference.md- CLI documentation
Acceptance Criteria:
- Valid YAML frontmatter with name and description
- 5+ quoted trigger phrases in description
- Validation checklist with checkboxes
- "When Not to Use" section
- Quick Start table with command examples
- Error handling guidance
What: Create command files for /memory-search, /memory-recent, /memory-context
Deliverables:
-
commands/memory-search.md- Topic-based search -
commands/memory-recent.md- Recent conversation summaries -
commands/memory-context.md- Grip expansion for full context
Acceptance Criteria:
- YAML frontmatter with name, description, parameters
- Skills reference to memory-query
- Process section with CLI commands
- Output format template
- Usage examples
What: Create agent for complex multi-step memory queries
Deliverables:
-
agents/memory-navigator.md- Autonomous agent definition
Acceptance Criteria:
- YAML frontmatter with triggers (regex patterns)
- Skills reference to memory-query
- Capabilities documentation
- Process section with multi-step workflow
- Output format template
- Limitations section
What: Create marketplace.json for plugin registration
Deliverables:
-
.claude-plugin/marketplace.json- Plugin manifest
Acceptance Criteria:
- Valid JSON with name, owner, metadata
- Plugins array with skill, commands, agents references
- Correct relative paths to components
What: Use improving-skills rubric to grade and iterate until score > 95
Process:
- Initial grade: 72/100 (Grade C)
- Applied improvements:
- Spec-compliant frontmatter (metadata wrapper for custom fields)
- Added 5 quoted trigger phrases
- Added validation checklist
- Added "When Not to Use" section
- Final grade: 99/100 (Grade A)
Score Breakdown:
| Pillar | Score | Max |
|---|---|---|
| PDA | 27 | 30 |
| Ease of Use | 24 | 25 |
| Spec Compliance | 15 | 15 |
| Writing Style | 10 | 10 |
| Utility | 18 | 20 |
| Base | 94 | 100 |
| Modifiers | +5 | ±15 |
| Final | 99 | 100 |
What: Reorganize repository with plugins/ directory
Deliverables:
-
plugins/memory-query-plugin/- Complete plugin structure
Final Structure:
plugins/memory-query-plugin/
├── .claude-plugin/
│ └── marketplace.json
├── skills/
│ └── memory-query/
│ ├── SKILL.md
│ └── references/
│ └── command-reference.md
├── commands/
│ ├── memory-search.md
│ ├── memory-recent.md
│ └── memory-context.md
├── agents/
│ └── memory-navigator.md
├── README.md
└── .gitignore
- Phase 6 complete (memory-daemon query CLI working)
- skill-creator skill for initialization
- improving-skills skill for grading
- creating-plugin-from-skill skill for plugin structure
# Verify plugin structure
ls -la plugins/memory-query-plugin/
# Verify manifest
cat plugins/memory-query-plugin/.claude-plugin/marketplace.json | jq .
# Verify skill
head -20 plugins/memory-query-plugin/skills/memory-query/SKILL.md- CCH hook integration (memory-ingest binary) was deferred to Phase 8
- Plugin uses existing memory-daemon query CLI, not direct gRPC
- Skill grading required 2 iterations to achieve > 95 score
Researched: 2026-01-30 Updated: 2026-01-30 (reflects actual implementation) Domain: Claude Code plugins, marketplace format, agentic skills Confidence: HIGH (implementation complete)
This phase integrates agent-memory with Claude Code through a marketplace plugin that provides natural language commands for querying past conversations. The implementation followed the Progressive Disclosure Architecture (PDA) pattern and achieved a 99/100 skill grade.
What was built:
-
memory-query-plugin - A full Claude Code marketplace plugin with:
- Spec-compliant SKILL.md (99/100 grade)
- 3 slash commands:
/memory-search,/memory-recent,/memory-context - 1 autonomous agent:
memory-navigatorfor complex queries - marketplace.json manifest for plugin registration
-
Monorepo reorganization - Repository restructured with
plugins/directory
Deferred to future phase:
-
memory-ingestbinary for CCH hook integration (CCH run action pattern)
plugins/memory-query-plugin/
├── .claude-plugin/
│ └── marketplace.json # Plugin manifest
├── skills/
│ └── memory-query/
│ ├── SKILL.md # Core skill (99/100 grade)
│ └── references/
│ └── command-reference.md
├── commands/
│ ├── memory-search.md # /memory-search <topic>
│ ├── memory-recent.md # /memory-recent [--days N]
│ └── memory-context.md # /memory-context <grip>
├── agents/
│ └── memory-navigator.md # Autonomous agent for complex queries
├── README.md
└── .gitignore
| Library | Version | Purpose | Why Standard |
|---|---|---|---|
| memory-daemon CLI | local | Query interface | Existing CLI with query subcommands |
| YAML frontmatter | - | Skill/command metadata | Claude Code plugin spec |
| marketplace.json | 1.0 | Plugin manifest | Claude Code marketplace format |
| Component | File | Purpose |
|---|---|---|
| Skill | skills/memory-query/SKILL.md | Core capability definition |
| Command | commands/memory-search.md | /memory-search <topic> |
| Command | commands/memory-recent.md | /memory-recent [--days N] |
| Command | commands/memory-context.md | /memory-context <grip> |
| Agent | agents/memory-navigator.md | Complex multi-step queries |
{
"name": "memory-query-agentic-plugin",
"owner": {
"name": "SpillwaveSolutions",
"email": "rick@spillwave.com"
},
"metadata": {
"description": "Query past conversations from the agent-memory system",
"version": "1.0.0"
},
"plugins": [
{
"name": "memory-query",
"description": "Query past conversations from the agent-memory system...",
"source": "./",
"strict": false,
"skills": ["./skills/memory-query"],
"commands": [
"./commands/memory-search.md",
"./commands/memory-recent.md",
"./commands/memory-context.md"
],
"agents": ["./agents/memory-navigator.md"]
}
]
}The skill underwent iterative improvement using the improving-skills rubric:
| Iteration | Score | Grade | Key Changes |
|---|---|---|---|
| 1 | 72/100 | C | Initial version with non-standard frontmatter |
| 2 | 99/100 | A | Spec-compliant, 5 triggers, validation checklist |
Final Score Breakdown:
| Pillar | Score | Max | Assessment |
|---|---|---|---|
| PDA | 27 | 30 | Concise SKILL.md, layered references |
| Ease of Use | 24 | 25 | 5 triggers, clear workflow |
| Spec Compliance | 15 | 15 | Valid frontmatter, all conventions |
| Writing Style | 10 | 10 | Imperative, no marketing |
| Utility | 18 | 20 | Real capability gap, feedback loops |
| Base | 94 | 100 | |
| Modifiers | +5 | ±15 | Checklist, scope, triggers, metadata |
| Final | 99 | 100 | Grade: A |
Search past conversations by topic or keyword:
# Usage
/memory-search <topic>
/memory-search <topic> --period "last week"
# Implementation (via Bash tool)
memory-daemon query --endpoint http://[::1]:50051 root
memory-daemon query --endpoint http://[::1]:50051 browse --parent-id "toc:month:2026-01"Show recent conversation summaries:
# Usage
/memory-recent
/memory-recent --days 7
# Implementation
memory-daemon query --endpoint http://[::1]:50051 root
memory-daemon query --endpoint http://[::1]:50051 node --node-id "toc:day:2026-01-30"Expand a grip to get full context:
# Usage
/memory-context <grip-id>
# Implementation
memory-daemon query --endpoint http://[::1]:50051 expand \
--grip-id "grip:1706620800000:01ARZ3NDEKTSV4RRFFQ69G5FAV" \
--before 3 --after 3Handles complex queries that require multi-step navigation:
Triggers:
"what (did|were) we (discuss|talk|work)""(remember|recall|find).*(conversation|discussion|session)""(last|previous|earlier) (session|conversation|time)""context from (last|previous|yesterday|last week)"
Capabilities:
- Multi-period navigation across weeks/months
- Keyword aggregation and correlation
- Grip chain following for conversation threads
- Synthesis and summary generation
The original plan included a memory-ingest binary for CCH integration. This was deferred to a future phase. The research for that component remains valid:
# hooks.yaml configuration (deferred)
rules:
- name: capture-to-memory
description: Send events to agent-memory daemon
matchers:
operations:
- SessionStart
- UserPromptSubmit
- PostToolUse
- SessionEnd
actions:
run: "~/.local/bin/memory-ingest"Implementation pattern:
- Read CCH JSON from stdin
- Map to memory events via hook_mapping module
- Ingest via gRPC MemoryClient
- Return
{"continue": true}JSON to CCH
# Clone plugin to Claude Code skills directory
cd ~/.claude/skills
git clone https://github.com/SpillwaveSolutions/memory-query-agentic-plugin.git
# Or symlink from workspace
ln -s /path/to/agent-memory/plugins/memory-query-plugin ~/.claude/skills/Before using the skill:
- Daemon running:
memory-daemon statusreturns "running" - TOC populated:
rootcommand returns year nodes - Query returns results: Check for non-empty
bulletsarrays - Grip IDs valid: Format matches
grip:{13-digit-ms}:{26-char-ulid}
-
plugins/memory-query-plugin/- Actual implementation -
/Users/richardhightower/.claude/skills/skill-creator/- Skill creation guidelines -
/Users/richardhightower/.claude/skills/improving-skills/- Grading rubric -
/Users/richardhightower/.claude/skills/creating-plugin-from-skill/- Plugin structure
- Claude Code marketplace documentation
- PDA (Progressive Disclosure Architecture) best practices
Confidence breakdown:
- Plugin structure: HIGH - Implementation complete and validated
- Skill grading: HIGH - Scored 99/100 using official rubric
- CLI integration: HIGH - Uses existing memory-daemon query commands
- CCH integration: MEDIUM - Research complete but implementation deferred
Research date: 2026-01-30 Implementation date: 2026-01-30 Valid until: Stable (implementation complete)