ragtime-cli 0.2.2__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of ragtime-cli might be problematic. Click here for more details.
- {ragtime_cli-0.2.2/ragtime_cli.egg-info → ragtime_cli-0.2.4}/PKG-INFO +179 -42
- ragtime_cli-0.2.4/README.md +327 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/pyproject.toml +1 -1
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4/ragtime_cli.egg-info}/PKG-INFO +179 -42
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/ragtime_cli.egg-info/SOURCES.txt +2 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/cli.py +657 -7
- ragtime_cli-0.2.4/src/commands/create-pr.md +389 -0
- ragtime_cli-0.2.4/src/commands/generate-docs.md +325 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/commands/pr-graduate.md +7 -2
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/config.py +19 -0
- ragtime_cli-0.2.2/README.md +0 -190
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/LICENSE +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/ragtime_cli.egg-info/dependency_links.txt +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/ragtime_cli.egg-info/entry_points.txt +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/ragtime_cli.egg-info/requires.txt +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/ragtime_cli.egg-info/top_level.txt +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/setup.cfg +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/__init__.py +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/commands/audit.md +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/commands/handoff.md +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/commands/import-docs.md +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/commands/recall.md +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/commands/remember.md +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/commands/save.md +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/commands/start.md +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/db.py +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/indexers/__init__.py +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/indexers/docs.py +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/mcp_server.py +0 -0
- {ragtime_cli-0.2.2 → ragtime_cli-0.2.4}/src/memory.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ragtime-cli
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Local-first memory and RAG system for Claude Code - semantic search over code, docs, and team knowledge
|
|
5
5
|
Author-email: Bret Martineau <bretwardjames@gmail.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -37,8 +37,12 @@ Local-first memory and RAG system for Claude Code. Semantic search over code, do
|
|
|
37
37
|
- **Memory Storage**: Store structured knowledge with namespaces, types, and metadata
|
|
38
38
|
- **Semantic Search**: Query memories and docs with natural language
|
|
39
39
|
- **Cross-Branch Sync**: Share context with teammates before PRs merge
|
|
40
|
+
- **Convention Checking**: Verify code follows team standards before PRs
|
|
41
|
+
- **Doc Generation**: Generate documentation from code (stubs or AI-powered)
|
|
42
|
+
- **Debug Tools**: Verify index integrity, inspect similarity scores
|
|
40
43
|
- **MCP Server**: Native Claude Code integration
|
|
41
|
-
- **Claude Commands**: Pre-built `/remember`, `/recall`, `/
|
|
44
|
+
- **Claude Commands**: Pre-built `/remember`, `/recall`, `/create-pr`, `/generate-docs` commands
|
|
45
|
+
- **ghp-cli Integration**: Auto-context when starting issues
|
|
42
46
|
|
|
43
47
|
## Installation
|
|
44
48
|
|
|
@@ -52,6 +56,9 @@ pip install ragtime-cli
|
|
|
52
56
|
# Initialize in your project
|
|
53
57
|
ragtime init
|
|
54
58
|
|
|
59
|
+
# Index your docs
|
|
60
|
+
ragtime index
|
|
61
|
+
|
|
55
62
|
# Store a memory
|
|
56
63
|
ragtime remember "Auth uses JWT with 15-min expiry" \
|
|
57
64
|
--namespace app \
|
|
@@ -63,6 +70,9 @@ ragtime search "authentication" --namespace app
|
|
|
63
70
|
|
|
64
71
|
# Install Claude commands
|
|
65
72
|
ragtime install --workspace
|
|
73
|
+
|
|
74
|
+
# Check for updates
|
|
75
|
+
ragtime update --check
|
|
66
76
|
```
|
|
67
77
|
|
|
68
78
|
## CLI Commands
|
|
@@ -94,19 +104,75 @@ ragtime search "how does auth work" --namespace app --limit 10
|
|
|
94
104
|
|
|
95
105
|
# Reindex memory files
|
|
96
106
|
ragtime reindex
|
|
107
|
+
|
|
108
|
+
# Audit docs for missing frontmatter
|
|
109
|
+
ragtime audit docs/
|
|
110
|
+
ragtime audit docs/ --fix # Interactively add frontmatter
|
|
111
|
+
ragtime audit docs/ --json # Machine-readable output
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Documentation Generation
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Generate doc stubs from code
|
|
118
|
+
ragtime generate src/ --stubs
|
|
119
|
+
|
|
120
|
+
# Specify output location
|
|
121
|
+
ragtime generate src/ --stubs -o docs/api
|
|
122
|
+
|
|
123
|
+
# Python only
|
|
124
|
+
ragtime generate src/ --stubs -l python
|
|
125
|
+
|
|
126
|
+
# Include private methods
|
|
127
|
+
ragtime generate src/ --stubs --include-private
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Debug & Verification
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Debug a search query (show similarity scores)
|
|
134
|
+
ragtime debug search "authentication"
|
|
135
|
+
ragtime debug search "auth" --show-vectors
|
|
136
|
+
|
|
137
|
+
# Find similar documents
|
|
138
|
+
ragtime debug similar docs/auth/jwt.md
|
|
139
|
+
|
|
140
|
+
# Index statistics by namespace/type
|
|
141
|
+
ragtime debug stats
|
|
142
|
+
ragtime debug stats --by-namespace
|
|
143
|
+
ragtime debug stats --by-type
|
|
144
|
+
|
|
145
|
+
# Verify index integrity
|
|
146
|
+
ragtime debug verify
|
|
97
147
|
```
|
|
98
148
|
|
|
99
149
|
### Cross-Branch Sync
|
|
100
150
|
|
|
101
151
|
```bash
|
|
102
|
-
# Sync teammate
|
|
103
|
-
ragtime sync
|
|
152
|
+
# Sync all teammate branch memories
|
|
153
|
+
ragtime sync
|
|
104
154
|
|
|
105
|
-
#
|
|
155
|
+
# Auto-prune stale synced folders
|
|
156
|
+
ragtime sync --auto-prune
|
|
157
|
+
|
|
158
|
+
# Manual prune
|
|
106
159
|
ragtime prune --dry-run
|
|
107
160
|
ragtime prune
|
|
108
161
|
```
|
|
109
162
|
|
|
163
|
+
### Daemon (Auto-Sync)
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Start background sync daemon
|
|
167
|
+
ragtime daemon start --interval 5m
|
|
168
|
+
|
|
169
|
+
# Check status
|
|
170
|
+
ragtime daemon status
|
|
171
|
+
|
|
172
|
+
# Stop daemon
|
|
173
|
+
ragtime daemon stop
|
|
174
|
+
```
|
|
175
|
+
|
|
110
176
|
### Claude Integration
|
|
111
177
|
|
|
112
178
|
```bash
|
|
@@ -118,48 +184,47 @@ ragtime install --global
|
|
|
118
184
|
|
|
119
185
|
# List available commands
|
|
120
186
|
ragtime install --list
|
|
121
|
-
```
|
|
122
187
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
Add to your Claude config (`.mcp.json`):
|
|
126
|
-
|
|
127
|
-
```json
|
|
128
|
-
{
|
|
129
|
-
"mcpServers": {
|
|
130
|
-
"ragtime": {
|
|
131
|
-
"command": "ragtime-mcp",
|
|
132
|
-
"args": ["--path", "."]
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
188
|
+
# Set up ghp-cli hooks
|
|
189
|
+
ragtime setup-ghp
|
|
136
190
|
```
|
|
137
191
|
|
|
138
|
-
Available tools:
|
|
139
|
-
- `remember` - Store a memory
|
|
140
|
-
- `search` - Semantic search
|
|
141
|
-
- `list_memories` - List with filters
|
|
142
|
-
- `get_memory` - Get by ID
|
|
143
|
-
- `store_doc` - Store document verbatim
|
|
144
|
-
- `forget` - Delete memory
|
|
145
|
-
- `graduate` - Promote branch → app
|
|
146
|
-
- `update_status` - Change memory status
|
|
147
|
-
|
|
148
192
|
## Storage Structure
|
|
149
193
|
|
|
150
194
|
```
|
|
151
|
-
.
|
|
152
|
-
├──
|
|
195
|
+
.ragtime/
|
|
196
|
+
├── config.yaml # Configuration
|
|
197
|
+
├── CONVENTIONS.md # Team rules (checked by /create-pr)
|
|
198
|
+
├── app/{component}/ # Graduated app knowledge (tracked)
|
|
153
199
|
│ └── {id}-{slug}.md
|
|
154
|
-
├── team/
|
|
200
|
+
├── team/ # Team conventions (tracked)
|
|
155
201
|
│ └── {id}-{slug}.md
|
|
156
|
-
├──
|
|
157
|
-
│
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
202
|
+
├── branches/
|
|
203
|
+
│ ├── {branch-slug}/ # Your branch (tracked in git)
|
|
204
|
+
│ │ ├── context.md
|
|
205
|
+
│ │ └── {id}-{slug}.md
|
|
206
|
+
│ └── .{branch-slug}/ # Synced from teammates (gitignored, dot-prefix)
|
|
207
|
+
├── archive/branches/ # Archived completed branches (tracked)
|
|
208
|
+
└── index/ # ChromaDB vector store (gitignored)
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
## Configuration
|
|
212
|
+
|
|
213
|
+
`.ragtime/config.yaml`:
|
|
214
|
+
|
|
215
|
+
```yaml
|
|
216
|
+
docs:
|
|
217
|
+
paths: ["docs", ".ragtime"]
|
|
218
|
+
patterns: ["**/*.md"]
|
|
219
|
+
exclude: ["**/node_modules/**"]
|
|
220
|
+
|
|
221
|
+
code:
|
|
222
|
+
paths: ["."]
|
|
223
|
+
languages: ["python", "typescript", "dart"]
|
|
224
|
+
|
|
225
|
+
conventions:
|
|
226
|
+
files: [".ragtime/CONVENTIONS.md"]
|
|
227
|
+
also_search_memories: true
|
|
163
228
|
```
|
|
164
229
|
|
|
165
230
|
## Memory Format
|
|
@@ -174,7 +239,7 @@ type: architecture
|
|
|
174
239
|
component: auth
|
|
175
240
|
confidence: high
|
|
176
241
|
status: active
|
|
177
|
-
added: '
|
|
242
|
+
added: '2025-01-31'
|
|
178
243
|
author: bretwardjames
|
|
179
244
|
---
|
|
180
245
|
|
|
@@ -200,6 +265,7 @@ Sessions are stored in Redis, not cookies.
|
|
|
200
265
|
| `decision` | Why we chose X over Y |
|
|
201
266
|
| `convention` | Team standards |
|
|
202
267
|
| `pattern` | Reusable approaches |
|
|
268
|
+
| `integration` | External service connections |
|
|
203
269
|
| `context` | Session handoff |
|
|
204
270
|
|
|
205
271
|
## Claude Commands
|
|
@@ -212,8 +278,79 @@ After `ragtime install --workspace`:
|
|
|
212
278
|
| `/recall` | Search memories |
|
|
213
279
|
| `/handoff` | Save session context |
|
|
214
280
|
| `/start` | Resume work on an issue |
|
|
215
|
-
| `/pr
|
|
216
|
-
| `/
|
|
281
|
+
| `/create-pr` | Check conventions, graduate memories, create PR |
|
|
282
|
+
| `/generate-docs` | AI-powered documentation generation from code |
|
|
283
|
+
| `/import-docs` | Migrate existing docs to memories |
|
|
284
|
+
| `/pr-graduate` | Curate branch knowledge (fallback if forgot before PR) |
|
|
285
|
+
| `/audit` | Find duplicates/conflicts in memories |
|
|
286
|
+
|
|
287
|
+
## MCP Server
|
|
288
|
+
|
|
289
|
+
Add to your Claude config (`.mcp.json`):
|
|
290
|
+
|
|
291
|
+
```json
|
|
292
|
+
{
|
|
293
|
+
"mcpServers": {
|
|
294
|
+
"ragtime": {
|
|
295
|
+
"command": "ragtime-mcp",
|
|
296
|
+
"args": ["--path", "."]
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
Available tools:
|
|
303
|
+
- `remember` - Store a memory
|
|
304
|
+
- `search` - Semantic search
|
|
305
|
+
- `list_memories` - List with filters
|
|
306
|
+
- `get_memory` - Get by ID
|
|
307
|
+
- `store_doc` - Store document verbatim
|
|
308
|
+
- `forget` - Delete memory
|
|
309
|
+
- `graduate` - Promote branch → app
|
|
310
|
+
- `update_status` - Change memory status
|
|
311
|
+
|
|
312
|
+
## ghp-cli Integration
|
|
313
|
+
|
|
314
|
+
If you use [ghp-cli](https://github.com/bretwardjames/ghp-cli):
|
|
315
|
+
|
|
316
|
+
```bash
|
|
317
|
+
# Register ragtime hooks
|
|
318
|
+
ragtime setup-ghp
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
This auto-creates `context.md` from issue details when you run `ghp start`.
|
|
322
|
+
|
|
323
|
+
## Workflow
|
|
324
|
+
|
|
325
|
+
### Starting Work
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
ghp start 123 # Creates branch + context.md
|
|
329
|
+
# or
|
|
330
|
+
ragtime new-branch 123 # Just the context
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
### During Development
|
|
334
|
+
|
|
335
|
+
```bash
|
|
336
|
+
/remember "API uses rate limiting" # Capture insights
|
|
337
|
+
/handoff # Save progress for later
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### Before PR
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
/create-pr
|
|
344
|
+
# 1. Checks code against CONVENTIONS.md
|
|
345
|
+
# 2. Reviews branch memories
|
|
346
|
+
# 3. Graduates selected memories to app/
|
|
347
|
+
# 4. Commits knowledge with code
|
|
348
|
+
# 5. Creates PR
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
### After Merge
|
|
352
|
+
|
|
353
|
+
Graduated knowledge is already in the PR. Run `ragtime prune` to clean up synced folders.
|
|
217
354
|
|
|
218
355
|
## License
|
|
219
356
|
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
# ragtime-cli
|
|
2
|
+
|
|
3
|
+
Local-first memory and RAG system for Claude Code. Semantic search over code, docs, and team knowledge.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- **Memory Storage**: Store structured knowledge with namespaces, types, and metadata
|
|
8
|
+
- **Semantic Search**: Query memories and docs with natural language
|
|
9
|
+
- **Cross-Branch Sync**: Share context with teammates before PRs merge
|
|
10
|
+
- **Convention Checking**: Verify code follows team standards before PRs
|
|
11
|
+
- **Doc Generation**: Generate documentation from code (stubs or AI-powered)
|
|
12
|
+
- **Debug Tools**: Verify index integrity, inspect similarity scores
|
|
13
|
+
- **MCP Server**: Native Claude Code integration
|
|
14
|
+
- **Claude Commands**: Pre-built `/remember`, `/recall`, `/create-pr`, `/generate-docs` commands
|
|
15
|
+
- **ghp-cli Integration**: Auto-context when starting issues
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pip install ragtime-cli
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Quick Start
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Initialize in your project
|
|
27
|
+
ragtime init
|
|
28
|
+
|
|
29
|
+
# Index your docs
|
|
30
|
+
ragtime index
|
|
31
|
+
|
|
32
|
+
# Store a memory
|
|
33
|
+
ragtime remember "Auth uses JWT with 15-min expiry" \
|
|
34
|
+
--namespace app \
|
|
35
|
+
--type architecture \
|
|
36
|
+
--component auth
|
|
37
|
+
|
|
38
|
+
# Search memories
|
|
39
|
+
ragtime search "authentication" --namespace app
|
|
40
|
+
|
|
41
|
+
# Install Claude commands
|
|
42
|
+
ragtime install --workspace
|
|
43
|
+
|
|
44
|
+
# Check for updates
|
|
45
|
+
ragtime update --check
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## CLI Commands
|
|
49
|
+
|
|
50
|
+
### Memory Storage
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# Store a memory
|
|
54
|
+
ragtime remember "content" --namespace app --type architecture --component auth
|
|
55
|
+
|
|
56
|
+
# List memories
|
|
57
|
+
ragtime memories --namespace app --type decision
|
|
58
|
+
|
|
59
|
+
# Graduate branch memory to app
|
|
60
|
+
ragtime graduate <memory-id>
|
|
61
|
+
|
|
62
|
+
# Delete a memory
|
|
63
|
+
ragtime forget <memory-id>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Search & Indexing
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Index docs
|
|
70
|
+
ragtime index --type docs
|
|
71
|
+
|
|
72
|
+
# Semantic search
|
|
73
|
+
ragtime search "how does auth work" --namespace app --limit 10
|
|
74
|
+
|
|
75
|
+
# Reindex memory files
|
|
76
|
+
ragtime reindex
|
|
77
|
+
|
|
78
|
+
# Audit docs for missing frontmatter
|
|
79
|
+
ragtime audit docs/
|
|
80
|
+
ragtime audit docs/ --fix # Interactively add frontmatter
|
|
81
|
+
ragtime audit docs/ --json # Machine-readable output
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Documentation Generation
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Generate doc stubs from code
|
|
88
|
+
ragtime generate src/ --stubs
|
|
89
|
+
|
|
90
|
+
# Specify output location
|
|
91
|
+
ragtime generate src/ --stubs -o docs/api
|
|
92
|
+
|
|
93
|
+
# Python only
|
|
94
|
+
ragtime generate src/ --stubs -l python
|
|
95
|
+
|
|
96
|
+
# Include private methods
|
|
97
|
+
ragtime generate src/ --stubs --include-private
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Debug & Verification
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
# Debug a search query (show similarity scores)
|
|
104
|
+
ragtime debug search "authentication"
|
|
105
|
+
ragtime debug search "auth" --show-vectors
|
|
106
|
+
|
|
107
|
+
# Find similar documents
|
|
108
|
+
ragtime debug similar docs/auth/jwt.md
|
|
109
|
+
|
|
110
|
+
# Index statistics by namespace/type
|
|
111
|
+
ragtime debug stats
|
|
112
|
+
ragtime debug stats --by-namespace
|
|
113
|
+
ragtime debug stats --by-type
|
|
114
|
+
|
|
115
|
+
# Verify index integrity
|
|
116
|
+
ragtime debug verify
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Cross-Branch Sync
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Sync all teammate branch memories
|
|
123
|
+
ragtime sync
|
|
124
|
+
|
|
125
|
+
# Auto-prune stale synced folders
|
|
126
|
+
ragtime sync --auto-prune
|
|
127
|
+
|
|
128
|
+
# Manual prune
|
|
129
|
+
ragtime prune --dry-run
|
|
130
|
+
ragtime prune
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Daemon (Auto-Sync)
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# Start background sync daemon
|
|
137
|
+
ragtime daemon start --interval 5m
|
|
138
|
+
|
|
139
|
+
# Check status
|
|
140
|
+
ragtime daemon status
|
|
141
|
+
|
|
142
|
+
# Stop daemon
|
|
143
|
+
ragtime daemon stop
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Claude Integration
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
# Install Claude commands to workspace
|
|
150
|
+
ragtime install --workspace
|
|
151
|
+
|
|
152
|
+
# Install globally
|
|
153
|
+
ragtime install --global
|
|
154
|
+
|
|
155
|
+
# List available commands
|
|
156
|
+
ragtime install --list
|
|
157
|
+
|
|
158
|
+
# Set up ghp-cli hooks
|
|
159
|
+
ragtime setup-ghp
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Storage Structure
|
|
163
|
+
|
|
164
|
+
```
|
|
165
|
+
.ragtime/
|
|
166
|
+
├── config.yaml # Configuration
|
|
167
|
+
├── CONVENTIONS.md # Team rules (checked by /create-pr)
|
|
168
|
+
├── app/{component}/ # Graduated app knowledge (tracked)
|
|
169
|
+
│ └── {id}-{slug}.md
|
|
170
|
+
├── team/ # Team conventions (tracked)
|
|
171
|
+
│ └── {id}-{slug}.md
|
|
172
|
+
├── branches/
|
|
173
|
+
│ ├── {branch-slug}/ # Your branch (tracked in git)
|
|
174
|
+
│ │ ├── context.md
|
|
175
|
+
│ │ └── {id}-{slug}.md
|
|
176
|
+
│ └── .{branch-slug}/ # Synced from teammates (gitignored, dot-prefix)
|
|
177
|
+
├── archive/branches/ # Archived completed branches (tracked)
|
|
178
|
+
└── index/ # ChromaDB vector store (gitignored)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Configuration
|
|
182
|
+
|
|
183
|
+
`.ragtime/config.yaml`:
|
|
184
|
+
|
|
185
|
+
```yaml
|
|
186
|
+
docs:
|
|
187
|
+
paths: ["docs", ".ragtime"]
|
|
188
|
+
patterns: ["**/*.md"]
|
|
189
|
+
exclude: ["**/node_modules/**"]
|
|
190
|
+
|
|
191
|
+
code:
|
|
192
|
+
paths: ["."]
|
|
193
|
+
languages: ["python", "typescript", "dart"]
|
|
194
|
+
|
|
195
|
+
conventions:
|
|
196
|
+
files: [".ragtime/CONVENTIONS.md"]
|
|
197
|
+
also_search_memories: true
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## Memory Format
|
|
201
|
+
|
|
202
|
+
Memories are markdown files with YAML frontmatter:
|
|
203
|
+
|
|
204
|
+
```markdown
|
|
205
|
+
---
|
|
206
|
+
id: abc123
|
|
207
|
+
namespace: app
|
|
208
|
+
type: architecture
|
|
209
|
+
component: auth
|
|
210
|
+
confidence: high
|
|
211
|
+
status: active
|
|
212
|
+
added: '2025-01-31'
|
|
213
|
+
author: bretwardjames
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
Auth uses JWT tokens with 15-minute expiry for security.
|
|
217
|
+
Sessions are stored in Redis, not cookies.
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
## Namespaces
|
|
221
|
+
|
|
222
|
+
| Namespace | Purpose |
|
|
223
|
+
|-----------|---------|
|
|
224
|
+
| `app` | How the codebase works (architecture, decisions) |
|
|
225
|
+
| `team` | Team conventions and standards |
|
|
226
|
+
| `user-{name}` | Individual preferences |
|
|
227
|
+
| `branch-{name}` | Work-in-progress context |
|
|
228
|
+
|
|
229
|
+
## Memory Types
|
|
230
|
+
|
|
231
|
+
| Type | Description |
|
|
232
|
+
|------|-------------|
|
|
233
|
+
| `architecture` | System design, patterns |
|
|
234
|
+
| `feature` | How features work |
|
|
235
|
+
| `decision` | Why we chose X over Y |
|
|
236
|
+
| `convention` | Team standards |
|
|
237
|
+
| `pattern` | Reusable approaches |
|
|
238
|
+
| `integration` | External service connections |
|
|
239
|
+
| `context` | Session handoff |
|
|
240
|
+
|
|
241
|
+
## Claude Commands
|
|
242
|
+
|
|
243
|
+
After `ragtime install --workspace`:
|
|
244
|
+
|
|
245
|
+
| Command | Purpose |
|
|
246
|
+
|---------|---------|
|
|
247
|
+
| `/remember` | Capture knowledge mid-session |
|
|
248
|
+
| `/recall` | Search memories |
|
|
249
|
+
| `/handoff` | Save session context |
|
|
250
|
+
| `/start` | Resume work on an issue |
|
|
251
|
+
| `/create-pr` | Check conventions, graduate memories, create PR |
|
|
252
|
+
| `/generate-docs` | AI-powered documentation generation from code |
|
|
253
|
+
| `/import-docs` | Migrate existing docs to memories |
|
|
254
|
+
| `/pr-graduate` | Curate branch knowledge (fallback if forgot before PR) |
|
|
255
|
+
| `/audit` | Find duplicates/conflicts in memories |
|
|
256
|
+
|
|
257
|
+
## MCP Server
|
|
258
|
+
|
|
259
|
+
Add to your Claude config (`.mcp.json`):
|
|
260
|
+
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"mcpServers": {
|
|
264
|
+
"ragtime": {
|
|
265
|
+
"command": "ragtime-mcp",
|
|
266
|
+
"args": ["--path", "."]
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
Available tools:
|
|
273
|
+
- `remember` - Store a memory
|
|
274
|
+
- `search` - Semantic search
|
|
275
|
+
- `list_memories` - List with filters
|
|
276
|
+
- `get_memory` - Get by ID
|
|
277
|
+
- `store_doc` - Store document verbatim
|
|
278
|
+
- `forget` - Delete memory
|
|
279
|
+
- `graduate` - Promote branch → app
|
|
280
|
+
- `update_status` - Change memory status
|
|
281
|
+
|
|
282
|
+
## ghp-cli Integration
|
|
283
|
+
|
|
284
|
+
If you use [ghp-cli](https://github.com/bretwardjames/ghp-cli):
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
# Register ragtime hooks
|
|
288
|
+
ragtime setup-ghp
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
This auto-creates `context.md` from issue details when you run `ghp start`.
|
|
292
|
+
|
|
293
|
+
## Workflow
|
|
294
|
+
|
|
295
|
+
### Starting Work
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
ghp start 123 # Creates branch + context.md
|
|
299
|
+
# or
|
|
300
|
+
ragtime new-branch 123 # Just the context
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### During Development
|
|
304
|
+
|
|
305
|
+
```bash
|
|
306
|
+
/remember "API uses rate limiting" # Capture insights
|
|
307
|
+
/handoff # Save progress for later
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### Before PR
|
|
311
|
+
|
|
312
|
+
```bash
|
|
313
|
+
/create-pr
|
|
314
|
+
# 1. Checks code against CONVENTIONS.md
|
|
315
|
+
# 2. Reviews branch memories
|
|
316
|
+
# 3. Graduates selected memories to app/
|
|
317
|
+
# 4. Commits knowledge with code
|
|
318
|
+
# 5. Creates PR
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### After Merge
|
|
322
|
+
|
|
323
|
+
Graduated knowledge is already in the PR. Run `ragtime prune` to clean up synced folders.
|
|
324
|
+
|
|
325
|
+
## License
|
|
326
|
+
|
|
327
|
+
MIT
|