Skip to content

Commit 66a2acc

Browse files
authored
Update /walk-space to use graphiti MCP (#1614)
1 parent 80c76e6 commit 66a2acc

File tree

1 file changed

+80
-73
lines changed

1 file changed

+80
-73
lines changed

.claude/commands/walk-space.md

Lines changed: 80 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# CommonTools Space Mapping Workflow
22

3+
**INSTRUCTIONS FOR AI AGENT**: When the `/walk-space` command is invoked, execute the steps in this workflow to map a CommonTools space. Do not explain the workflow - actually run the commands and store data in the memory knowledge graph.
4+
35
## Overview
46

5-
This workflow enables semantic mapping and change tracking of CommonTools spaces using the murmur fragment system. It creates a searchable knowledge graph of charm states, relationships, and evolution over time.
7+
This workflow enables semantic mapping and change tracking of CommonTools spaces using the memory MCP knowledge graph system. It creates a searchable knowledge graph of charm states, relationships, and evolution over time.
68

79
## Core Concepts
810

@@ -21,10 +23,10 @@ This workflow enables semantic mapping and change tracking of CommonTools spaces
2123
### 1. Initial Space Discovery
2224

2325
```bash
24-
# List all charms in the space
26+
# First, list all charms in the space
2527
./dist/ct charm ls --identity ~/dev/.ct.key --api-url https://toolshed.saga-castor.ts.net/ --space [space-name]
2628

27-
# Generate visual map (optional)
29+
# Optionally generate visual map
2830
./dist/ct charm map --identity ~/dev/.ct.key --api-url https://toolshed.saga-castor.ts.net/ --space [space-name]
2931
./dist/ct charm map --identity ~/dev/.ct.key --api-url https://toolshed.saga-castor.ts.net/ --space [space-name] --format dot
3032
```
@@ -41,36 +43,40 @@ For each charm discovered:
4143
# Additional fields as needed based on charm type
4244
```
4345

44-
### 3. Create Semantic Fragments
46+
### 3. Create Knowledge Graph Entries
4547

46-
Use `mcp__murmur__record_fragment` with these patterns:
48+
Use `mcp__memory__add_memory` to build the knowledge graph:
4749

4850
#### Individual Charm Documentation
49-
- **Title**: "Charm: [Name] ([Type])"
50-
- **Type**: "reference"
51-
- **Tags**: ["charm", "type", "space-name", ...content-tags]
52-
- **Body**: Include charm ID, type, purpose, content summary, technical details
53-
- **Priority**: "medium"
54-
55-
#### Space Relationships
56-
- **Title**: "Space Relationships: [space-name]"
57-
- **Type**: "documentation"
58-
- **Tags**: ["relationships", "connections", "data-flow", "space-name"]
59-
- **Body**: Document all charm connections, data flows, and dependencies
60-
- **Priority**: "medium"
51+
- **Name**: "Charm: [Name] ([Type])"
52+
- **Episode Body**: Include charm ID, type, purpose, content summary, technical details, connections
53+
- **Source**: "text" or "json" (for structured charm data)
54+
- **Source Description**: "charm [type] in [space-name]"
55+
- **Group ID**: "[space-name]"
56+
57+
#### Space Relationships (JSON Format)
58+
- **Name**: "Space Relationships: [space-name] @ [timestamp]"
59+
- **Episode Body**: JSON string containing charm connections and data flows
60+
```json
61+
{
62+
"space": "space-name",
63+
"timestamp": "ISO-timestamp",
64+
"relationships": [
65+
{"source": "charm-id-1", "target": "charm-id-2", "type": "data-flow"},
66+
{"source": "charm-id-2", "target": "charm-id-3", "type": "connection"}
67+
]
68+
}
69+
```
70+
- **Source**: "json"
71+
- **Source Description**: "relationship mapping for [space-name]"
72+
- **Group ID**: "[space-name]"
6173

6274
#### Space Snapshot
63-
- **Title**: "Space Snapshot: [space-name] @ [ISO-timestamp]"
64-
- **Type**: "reference"
65-
- **Tags**: ["snapshot", "change-tracking", "space-name", "baseline"]
66-
- **Priority**: "high"
67-
- **Metadata**: {
68-
"snapshot_time": "ISO-timestamp",
69-
"charm_count": N,
70-
"is_baseline": true/false,
71-
"previous_snapshot": "fragment-id"
72-
}
73-
- **Body**: Complete state of all charms, connections, and metadata
75+
- **Name**: "Space Snapshot: [space-name] @ [ISO-timestamp]"
76+
- **Episode Body**: Complete state of all charms, connections, and metadata
77+
- **Source**: "json"
78+
- **Source Description**: "complete snapshot of [space-name]"
79+
- **Group ID**: "[space-name]"
7480

7581
### 4. Iterative Monitoring
7682

@@ -86,16 +92,12 @@ On subsequent scans:
8692
- Note new or removed connections
8793

8894
3. **Document changes**
89-
Use `mcp__murmur__record_fragment`:
90-
- **Title**: "Space Changes: [space-name] @ [ISO-timestamp]"
91-
- **Type**: "documentation"
92-
- **Tags**: ["changes", "space-name", "update"]
93-
- **Metadata**: {
94-
"previous_snapshot_id": "fragment-id",
95-
"change_time": "ISO-timestamp"
96-
}
97-
- **Body**: Detailed list of all changes detected
98-
- **Priority**: "medium"
95+
Use `mcp__memory__add_memory`:
96+
- **Name**: "Space Changes: [space-name] @ [ISO-timestamp]"
97+
- **Episode Body**: Detailed list of all changes detected, including added/removed charms, modified content
98+
- **Source**: "text"
99+
- **Source Description**: "changes detected in [space-name]"
100+
- **Group ID**: "[space-name]"
99101

100102
4. **Create new snapshot**
101103
- Reference previous snapshot
@@ -105,57 +107,60 @@ On subsequent scans:
105107
### 5. Search and Analysis
106108

107109
#### Find specific charms
108-
Use the murmur fragment tools:
110+
Use the memory MCP tools:
109111

110-
- **Semantic search**: `mcp__murmur__search_fragments_similar`
112+
- **Semantic search for nodes**: `mcp__memory__search_memory_nodes`
111113
- Query: "dog pet border collie"
112114
- Query: "page recipe outliner component"
115+
- Group IDs: ["[space-name]"]
113116

114-
- **Tag-based search**: `mcp__murmur__list_fragments`
115-
- Parameters: `tags=["snapshot", "space-name"]`
117+
- **Search for facts/relationships**: `mcp__memory__search_memory_facts`
118+
- Query: "data flow connections"
119+
- Group IDs: ["[space-name]"]
116120

117121
#### Track evolution
118-
- **Get all snapshots**: `mcp__murmur__list_fragments`
119-
- Parameters: `tags=["snapshot", "space-name"], type="reference"`
120-
- Sort by creation date to see chronological progression
122+
- **Get recent episodes**: `mcp__memory__get_episodes`
123+
- Group ID: "[space-name]"
124+
- Last N: 10 (to see recent snapshots)
121125

122-
- **Find all changes**: `mcp__murmur__list_fragments`
123-
- Parameters: `tags=["changes", "space-name"], type="documentation"`
126+
- **Search for changes**: `mcp__memory__search_memory_nodes`
127+
- Query: "changes modifications updates snapshot"
128+
- Group IDs: ["[space-name]"]
124129

125-
## Fragment Schema Guidelines
130+
## Memory Episode Guidelines
126131

127132
### Essential Fields
128-
- **Title**: Consistent naming pattern for easy identification
129-
- **Body**: Structured content with clear sections
130-
- **Type**: `reference` for states, `documentation` for analysis
131-
- **Tags**: Enable filtering and categorization
132-
- **Priority**: `high` for snapshots, `medium` for changes
133-
- **Metadata**: Machine-readable data for automation
134-
135-
### Tagging Strategy
136-
- Always include space name
137-
- Add content-specific tags (pet, recipe-type, etc.)
138-
- Use temporal tags for time-based queries
139-
- Include relationship tags (connected-to, uses, etc.)
133+
- **Name**: Consistent naming pattern for easy identification (include type in name)
134+
- **Episode Body**: Structured content (text or JSON)
135+
- **Source**: "text" for narratives, "json" for structured data, "message" for conversations
136+
- **Source Description**: Descriptive context including content type and space
137+
- **Group ID**: Single identifier per space (like a tag, but only one allowed)
138+
139+
### Group ID Strategy
140+
- Use `[space-name]` as the single group ID for all content related to that space
141+
- Differentiate content types through:
142+
- **Name patterns**: Include type ("Charm:", "Snapshot:", "Changes:", "Reflection:")
143+
- **Source descriptions**: Be specific about what kind of data it is
144+
- **Episode body structure**: Use consistent formats for each type
140145

141146
## Example Implementation Flow
142147

143148
### Initial Space Mapping
144149
1. List charms using `ct charm ls`
145150
2. For each charm:
146151
- Use `ct charm get` to extract data
147-
- Create charm fragment with `mcp__murmur__record_fragment`
148-
3. Document relationships with `mcp__murmur__record_fragment` (type: documentation)
149-
4. Create baseline snapshot with `mcp__murmur__record_fragment` (type: reference, metadata includes is_baseline: true)
152+
- Add to knowledge graph with `mcp__memory__add_memory` (group: "[space-name]")
153+
3. Document relationships with `mcp__memory__add_memory` (source: "json", group: "[space-name]")
154+
4. Create baseline snapshot with `mcp__memory__add_memory` (source: "json", group: "[space-name]")
150155

151156
### Subsequent Scans
152157
1. List charms again with `ct charm ls`
153158
2. Extract current data for comparison
154-
3. Search previous snapshot: `mcp__murmur__search_fragments_by_title` or `mcp__murmur__list_fragments`
159+
3. Search previous data: `mcp__memory__search_memory_nodes` or `mcp__memory__get_episodes` (group: "[space-name]")
155160
4. If changes detected:
156-
- Record changes with `mcp__murmur__record_fragment` (type: documentation)
157-
- Create new snapshot with `mcp__murmur__record_fragment` (reference previous snapshot ID)
158-
- Update existing charm fragments with `mcp__murmur__update_fragment`
161+
- Record changes with `mcp__memory__add_memory` (group: "[space-name]")
162+
- Create new snapshot with `mcp__memory__add_memory` (group: "[space-name]")
163+
- Add updated charm states to graph (new episodes build on existing knowledge)
159164

160165
## Benefits
161166

@@ -181,7 +186,8 @@ Enable AI agents to contribute meaningful content to spaces by analyzing user da
181186
### Workflow for Content Reflection
182187

183188
1. **Analyze existing content**
184-
- Use `mcp__murmur__search_fragments_similar` to find all content about specific topics
189+
- Use `mcp__memory__search_memory_nodes` to find all entities about specific topics
190+
- Use `mcp__memory__search_memory_facts` to understand relationships
185191
- Extract actual user data from charm fields (not just metadata)
186192
- Focus on what the user has written, not technical implementation
187193

@@ -210,11 +216,12 @@ Enable AI agents to contribute meaningful content to spaces by analyzing user da
210216
```
211217

212218
4. **Document the reflection**
213-
Create a fragment recording the AI contribution:
214-
- Title: "AI Reflection: [Topic] @ [timestamp]"
215-
- Type: "documentation"
216-
- Tags: ["ai-reflection", "space-name", "topic"]
217-
- Include charm ID and key insights
219+
Add to knowledge graph recording the AI contribution:
220+
- Name: "AI Reflection: [Topic] @ [timestamp]"
221+
- Episode Body: Include charm ID, key insights, observations, questions
222+
- Source: "text"
223+
- Source Description: "ai reflection on [topic] in [space-name]"
224+
- Group ID: "[space-name]"
218225

219226
### Reflection Content Guidelines
220227

0 commit comments

Comments
 (0)