ragtime-cli 0.2.18__py3-none-any.whl → 0.3.1__py3-none-any.whl
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.
- {ragtime_cli-0.2.18.dist-info → ragtime_cli-0.3.1.dist-info}/METADATA +61 -28
- ragtime_cli-0.3.1.dist-info/RECORD +16 -0
- src/cli.py +872 -106
- src/config.py +17 -1
- src/indexers/docs.py +86 -8
- ragtime_cli-0.2.18.dist-info/RECORD +0 -26
- src/commands/audit.md +0 -151
- src/commands/create-pr.md +0 -389
- src/commands/generate-docs.md +0 -325
- src/commands/handoff.md +0 -176
- src/commands/import-docs.md +0 -259
- src/commands/pr-graduate.md +0 -192
- src/commands/recall.md +0 -175
- src/commands/remember.md +0 -168
- src/commands/save.md +0 -10
- src/commands/start.md +0 -206
- {ragtime_cli-0.2.18.dist-info → ragtime_cli-0.3.1.dist-info}/WHEEL +0 -0
- {ragtime_cli-0.2.18.dist-info → ragtime_cli-0.3.1.dist-info}/entry_points.txt +0 -0
- {ragtime_cli-0.2.18.dist-info → ragtime_cli-0.3.1.dist-info}/licenses/LICENSE +0 -0
- {ragtime_cli-0.2.18.dist-info → ragtime_cli-0.3.1.dist-info}/top_level.txt +0 -0
src/commands/handoff.md
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Save current context to branch memory for session continuity
|
|
3
|
-
allowed-tools: Bash, Read, Write, mcp__ragtime__remember
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Save Context for Handoff
|
|
7
|
-
|
|
8
|
-
Capture the current session's context into the branch's `context.md` so the next session (or another developer) can pick up seamlessly.
|
|
9
|
-
|
|
10
|
-
The context lives permanently in `.claude/memory/branches/{branch}/context.md` - no cleanup needed.
|
|
11
|
-
|
|
12
|
-
<!-- ═══════════════════════════════════════════════════════════════════════════
|
|
13
|
-
CUSTOMIZABLE: Adjust the context template, add project-specific sections,
|
|
14
|
-
modify the commit message format, etc.
|
|
15
|
-
═══════════════════════════════════════════════════════════════════════════ -->
|
|
16
|
-
|
|
17
|
-
## Step 1: Gather Current State
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
BRANCH=$(git branch --show-current)
|
|
21
|
-
ISSUE_NUM=$(echo "$BRANCH" | grep -oE '[0-9]+' | head -1)
|
|
22
|
-
DEVNAME=$(gh api user --jq '.login' 2>/dev/null || git config user.name | tr ' ' '-' | tr '[:upper:]' '[:lower:]')
|
|
23
|
-
TIMESTAMP=$(date +%Y-%m-%d)
|
|
24
|
-
|
|
25
|
-
echo "Branch: $BRANCH"
|
|
26
|
-
echo "Issue: #$ISSUE_NUM"
|
|
27
|
-
echo "Developer: $DEVNAME"
|
|
28
|
-
|
|
29
|
-
# Get recent commits on this branch
|
|
30
|
-
echo ""
|
|
31
|
-
echo "=== Recent Commits ==="
|
|
32
|
-
git log main..HEAD --oneline 2>/dev/null || git log -10 --oneline
|
|
33
|
-
|
|
34
|
-
# Get current changes
|
|
35
|
-
echo ""
|
|
36
|
-
echo "=== Uncommitted Changes ==="
|
|
37
|
-
git status --short
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
## Step 2: Summarize Session Context
|
|
41
|
-
|
|
42
|
-
Based on the conversation, create a summary that includes:
|
|
43
|
-
|
|
44
|
-
1. **What This Branch Does** - High-level purpose
|
|
45
|
-
2. **Current State** - What's been done, recent commits
|
|
46
|
-
3. **What's Left To Do** - Remaining tasks, in priority order
|
|
47
|
-
4. **Testing Status** - What's been tested, what hasn't
|
|
48
|
-
5. **Known Issues / Lessons Learned** - Gotchas for the next session
|
|
49
|
-
6. **Architecture Decisions** - Why things were done a certain way
|
|
50
|
-
7. **Next Steps** - Specific instructions for resuming
|
|
51
|
-
|
|
52
|
-
## Step 3: Write to Branch Context
|
|
53
|
-
|
|
54
|
-
<!-- ═══════════════════════════════════════════════════════════════════════════
|
|
55
|
-
RAGTIME CORE - DO NOT MODIFY
|
|
56
|
-
The file path and frontmatter format must match ragtime's expectations.
|
|
57
|
-
═══════════════════════════════════════════════════════════════════════════ -->
|
|
58
|
-
|
|
59
|
-
Write to `.claude/memory/branches/{branch-slug}/context.md`:
|
|
60
|
-
|
|
61
|
-
```markdown
|
|
62
|
-
---
|
|
63
|
-
id: context
|
|
64
|
-
namespace: branch-{branch}
|
|
65
|
-
type: context
|
|
66
|
-
status: active
|
|
67
|
-
added: '{date}'
|
|
68
|
-
author: {devname}
|
|
69
|
-
issue: '#{issue_num}'
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Branch: {branch}
|
|
73
|
-
|
|
74
|
-
### What This Branch Does
|
|
75
|
-
|
|
76
|
-
{summary}
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## CURRENT STATE (as of {date})
|
|
81
|
-
|
|
82
|
-
{current state details}
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## WHAT'S LEFT TO DO
|
|
87
|
-
|
|
88
|
-
{prioritized task list}
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## TESTING STATUS
|
|
93
|
-
|
|
94
|
-
### Tested and Working:
|
|
95
|
-
{list}
|
|
96
|
-
|
|
97
|
-
### Not Yet Tested:
|
|
98
|
-
{list}
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## KNOWN ISSUES / LESSONS LEARNED
|
|
103
|
-
|
|
104
|
-
{numbered list}
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## ARCHITECTURE DECISIONS
|
|
109
|
-
|
|
110
|
-
{bullet points}
|
|
111
|
-
|
|
112
|
-
---
|
|
113
|
-
|
|
114
|
-
## NEXT STEPS FOR NEW SESSION
|
|
115
|
-
|
|
116
|
-
{specific instructions}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
<!-- ═══════════════════════════════════════════════════════════════════════════ -->
|
|
120
|
-
|
|
121
|
-
<!-- CUSTOMIZABLE: Add project-specific sections to the context template -->
|
|
122
|
-
|
|
123
|
-
## Step 4: Index the Context
|
|
124
|
-
|
|
125
|
-
After writing the file, ensure it's indexed:
|
|
126
|
-
|
|
127
|
-
```
|
|
128
|
-
mcp__ragtime__remember:
|
|
129
|
-
content: "{summary of context for search}"
|
|
130
|
-
namespace: "branch-{branch}"
|
|
131
|
-
type: "context"
|
|
132
|
-
issue: "#{issue_num}"
|
|
133
|
-
source: "handoff"
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
## Step 5: Commit and Push
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
BRANCH=$(git branch --show-current)
|
|
140
|
-
BRANCH_SLUG=$(echo "$BRANCH" | tr '/' '-')
|
|
141
|
-
ISSUE_NUM=$(echo "$BRANCH" | grep -oE '[0-9]+' | head -1)
|
|
142
|
-
|
|
143
|
-
# Block pushes to main/master
|
|
144
|
-
if [ "$BRANCH" = "main" ] || [ "$BRANCH" = "master" ]; then
|
|
145
|
-
echo "❌ ERROR: Cannot push directly to $BRANCH"
|
|
146
|
-
exit 1
|
|
147
|
-
fi
|
|
148
|
-
|
|
149
|
-
git add ".claude/memory/branches/$BRANCH_SLUG/context.md"
|
|
150
|
-
git commit -m "docs(context): update branch context for session continuity
|
|
151
|
-
|
|
152
|
-
Relates to #$ISSUE_NUM
|
|
153
|
-
|
|
154
|
-
Co-Authored-By: Claude <noreply@anthropic.com>"
|
|
155
|
-
|
|
156
|
-
git push -u origin "$BRANCH"
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## Step 6: Confirm Handoff Complete
|
|
160
|
-
|
|
161
|
-
```
|
|
162
|
-
✅ Handoff Complete
|
|
163
|
-
|
|
164
|
-
- Context saved to: .claude/memory/branches/{branch}/context.md
|
|
165
|
-
- Committed and pushed to remote
|
|
166
|
-
- Ready for next session or another developer
|
|
167
|
-
|
|
168
|
-
To resume: Start a new session and say "continue on this branch"
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Notes
|
|
172
|
-
|
|
173
|
-
- The context.md file lives permanently with the branch - no cleanup needed
|
|
174
|
-
- Each `/handoff` overwrites the previous context.md (it's always current state)
|
|
175
|
-
- On `/start`, Claude reads the branch's context.md to resume
|
|
176
|
-
- When syncing from teammate branches, their context.md comes along too
|
src/commands/import-docs.md
DELETED
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Migrate existing docs into ragtime memory structure with AI-assisted classification
|
|
3
|
-
allowed-arguments: path to docs folder (e.g., /import-docs docs/)
|
|
4
|
-
allowed-tools: Bash, Read, Write, Edit, AskUserQuestion
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Import Docs
|
|
8
|
-
|
|
9
|
-
Analyze an existing docs folder and migrate content into the ragtime memory structure.
|
|
10
|
-
|
|
11
|
-
**Usage:**
|
|
12
|
-
- `/import-docs docs/` - Analyze docs folder and create memories
|
|
13
|
-
- `/import-docs` - Interactive mode, asks for path
|
|
14
|
-
|
|
15
|
-
## Overview
|
|
16
|
-
|
|
17
|
-
This command helps teams that have existing documentation migrate into ragtime's structured memory system. It:
|
|
18
|
-
|
|
19
|
-
1. Scans all markdown files using `ragtime audit --json`
|
|
20
|
-
2. Analyzes each document's content to classify properly
|
|
21
|
-
3. Determines what should become memories vs. stay as indexed docs
|
|
22
|
-
4. Creates memories in `.ragtime/app/` or `.ragtime/team/` as appropriate
|
|
23
|
-
|
|
24
|
-
## Step 1: Get the Docs Path
|
|
25
|
-
|
|
26
|
-
**If `$ARGUMENTS` provided:**
|
|
27
|
-
- Use it as the docs path
|
|
28
|
-
|
|
29
|
-
**If no arguments:**
|
|
30
|
-
- Ask: "What docs folder should I analyze? (e.g., docs/, documentation/)"
|
|
31
|
-
|
|
32
|
-
## Step 2: Run Audit
|
|
33
|
-
|
|
34
|
-
Run the ragtime audit command to get a structured view of all docs:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
ragtime audit {docs_path} --json
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Parse the JSON output to get the list of files and initial suggestions.
|
|
41
|
-
|
|
42
|
-
## Step 3: Analyze Documents
|
|
43
|
-
|
|
44
|
-
For each document (or batch), read the content and classify:
|
|
45
|
-
|
|
46
|
-
### Classification Questions
|
|
47
|
-
|
|
48
|
-
For each doc, determine:
|
|
49
|
-
|
|
50
|
-
1. **Is this memory-worthy or just reference?**
|
|
51
|
-
- Memory-worthy: Contains decisions, patterns, architecture insights, conventions
|
|
52
|
-
- Reference: API docs, changelogs, auto-generated content, raw specs
|
|
53
|
-
|
|
54
|
-
2. **What type of knowledge is it?**
|
|
55
|
-
- `architecture` - How systems/components work
|
|
56
|
-
- `decision` - Why we chose X over Y (look for "we decided", "because", trade-off discussion)
|
|
57
|
-
- `convention` - Team rules, coding standards, process docs
|
|
58
|
-
- `pattern` - Reusable solutions, "how to do X"
|
|
59
|
-
- `integration` - How external services connect
|
|
60
|
-
- `feature` - Feature documentation
|
|
61
|
-
|
|
62
|
-
3. **What namespace?**
|
|
63
|
-
- `app` - Technical knowledge about this codebase
|
|
64
|
-
- `team` - Team conventions, process, standards
|
|
65
|
-
|
|
66
|
-
4. **What component?** (infer from path and content)
|
|
67
|
-
|
|
68
|
-
5. **Should this doc be split?**
|
|
69
|
-
- Large docs with multiple distinct sections may become multiple memories
|
|
70
|
-
- Each memory should be focused on ONE concept
|
|
71
|
-
|
|
72
|
-
### Classification Hints
|
|
73
|
-
|
|
74
|
-
Look for signals in the content:
|
|
75
|
-
|
|
76
|
-
| Signal | Likely Type |
|
|
77
|
-
|--------|-------------|
|
|
78
|
-
| "We decided to..." | decision |
|
|
79
|
-
| "Always do X when Y" | convention |
|
|
80
|
-
| "The {system} works by..." | architecture |
|
|
81
|
-
| "To implement X, follow these steps..." | pattern |
|
|
82
|
-
| "Integrates with {service} via..." | integration |
|
|
83
|
-
| ADR format, numbered decisions | decision |
|
|
84
|
-
| API endpoints, request/response | architecture |
|
|
85
|
-
| Setup instructions, onboarding | convention |
|
|
86
|
-
|
|
87
|
-
## Step 4: Choose Migration Strategy
|
|
88
|
-
|
|
89
|
-
Ask the user:
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
How should I handle the original docs?
|
|
93
|
-
|
|
94
|
-
1. **Memories only** - Create memories in .ragtime/, leave original docs unchanged
|
|
95
|
-
2. **Frontmatter only** - Add frontmatter to original docs for better indexing, no memories
|
|
96
|
-
3. **Both** - Add frontmatter to originals AND create memories for key insights (recommended)
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Based on their choice, adjust what the migration plan includes.
|
|
100
|
-
|
|
101
|
-
## Step 5: Generate Migration Plan
|
|
102
|
-
|
|
103
|
-
Create a migration plan based on the user's strategy choice:
|
|
104
|
-
|
|
105
|
-
```
|
|
106
|
-
## Migration Plan
|
|
107
|
-
|
|
108
|
-
### Will Add Frontmatter (if strategy includes frontmatter)
|
|
109
|
-
|
|
110
|
-
| File | Namespace | Type | Component |
|
|
111
|
-
|------|-----------|------|-----------|
|
|
112
|
-
| docs/auth/JWT_DESIGN.md | app | architecture | auth |
|
|
113
|
-
| docs/CODING_STANDARDS.md | team | convention | - |
|
|
114
|
-
| ... | | | |
|
|
115
|
-
|
|
116
|
-
### Will Create Memories (if strategy includes memories)
|
|
117
|
-
|
|
118
|
-
| File | Type | Namespace | Component | Notes |
|
|
119
|
-
|------|------|-----------|-----------|-------|
|
|
120
|
-
| docs/auth/JWT_DESIGN.md | architecture | app | auth | Split into 2 memories |
|
|
121
|
-
| docs/CODING_STANDARDS.md | convention | team | - | Full doc |
|
|
122
|
-
| ... | | | | |
|
|
123
|
-
|
|
124
|
-
### Will Index Only (no memory, just frontmatter or skip)
|
|
125
|
-
|
|
126
|
-
These stay as searchable docs but don't become memories:
|
|
127
|
-
- docs/CHANGELOG.md (reference)
|
|
128
|
-
- docs/api/endpoints.md (reference, auto-generated)
|
|
129
|
-
- ...
|
|
130
|
-
|
|
131
|
-
### Will Skip (Z files)
|
|
132
|
-
|
|
133
|
-
- docs/archive/old-stuff.md (outdated)
|
|
134
|
-
- ...
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
## Step 6: Get Approval
|
|
138
|
-
|
|
139
|
-
Present the plan and ask:
|
|
140
|
-
|
|
141
|
-
```
|
|
142
|
-
I've analyzed {total} docs:
|
|
143
|
-
- {X} will become memories in .ragtime/
|
|
144
|
-
- {Y} will be indexed as reference docs
|
|
145
|
-
- {Z} will be skipped
|
|
146
|
-
|
|
147
|
-
Review the plan above. Should I:
|
|
148
|
-
1. Proceed with all
|
|
149
|
-
2. Let me adjust some classifications
|
|
150
|
-
3. Show me a specific file's analysis
|
|
151
|
-
4. Cancel
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
## Step 7: Execute Migration
|
|
155
|
-
|
|
156
|
-
### If adding frontmatter to originals:
|
|
157
|
-
|
|
158
|
-
For each doc that needs frontmatter, prepend:
|
|
159
|
-
|
|
160
|
-
```yaml
|
|
161
|
-
---
|
|
162
|
-
namespace: {app|team}
|
|
163
|
-
type: {type}
|
|
164
|
-
component: {if applicable}
|
|
165
|
-
---
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
This makes the original docs index better with `ragtime index`.
|
|
169
|
-
|
|
170
|
-
### If creating memories:
|
|
171
|
-
|
|
172
|
-
1. **Extract the key content** - Don't copy the whole doc verbatim unless it's focused. Extract the essential knowledge.
|
|
173
|
-
|
|
174
|
-
2. **Write the memory file** to `.ragtime/app/{component}/{id}-{slug}.md` or `.ragtime/team/{id}-{slug}.md`:
|
|
175
|
-
|
|
176
|
-
```yaml
|
|
177
|
-
---
|
|
178
|
-
id: {8-char-uuid}
|
|
179
|
-
namespace: {app|team}
|
|
180
|
-
type: {type}
|
|
181
|
-
component: {if applicable}
|
|
182
|
-
confidence: medium
|
|
183
|
-
confidence_reason: import-docs
|
|
184
|
-
source: import-docs
|
|
185
|
-
status: active
|
|
186
|
-
added: {today}
|
|
187
|
-
migrated_from: {original-file-path}
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
{extracted content}
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
3. **For split documents**, create multiple focused memories with related IDs.
|
|
194
|
-
|
|
195
|
-
## Step 8: Reindex
|
|
196
|
-
|
|
197
|
-
After all memories are created:
|
|
198
|
-
|
|
199
|
-
```bash
|
|
200
|
-
ragtime reindex
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
## Step 9: Summary
|
|
204
|
-
|
|
205
|
-
Summarize based on what was done:
|
|
206
|
-
|
|
207
|
-
```
|
|
208
|
-
## Migration Complete
|
|
209
|
-
|
|
210
|
-
### Frontmatter Added (if applicable)
|
|
211
|
-
Updated {X} docs with frontmatter for better indexing.
|
|
212
|
-
|
|
213
|
-
### Memories Created (if applicable)
|
|
214
|
-
Created {Y} memories:
|
|
215
|
-
- {N} architecture in app/
|
|
216
|
-
- {N} conventions in team/
|
|
217
|
-
- {N} decisions in app/
|
|
218
|
-
- ...
|
|
219
|
-
|
|
220
|
-
Next steps:
|
|
221
|
-
- Run 'ragtime index' to update the search index
|
|
222
|
-
- Review memories with: ragtime memories --namespace app
|
|
223
|
-
- Search with: ragtime search "your query"
|
|
224
|
-
- Edit any misclassified content in .ragtime/ or docs/
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
## Tips
|
|
228
|
-
|
|
229
|
-
- **Don't over-migrate**: Not every doc needs to be a memory. Reference docs are fine as indexed content.
|
|
230
|
-
- **Preserve originals**: This creates memories FROM docs, doesn't delete originals.
|
|
231
|
-
- **Review component inference**: The path-based component detection may need adjustment.
|
|
232
|
-
- **Batch by folder**: For large doc sets, consider migrating one folder at a time.
|
|
233
|
-
|
|
234
|
-
## Example Session
|
|
235
|
-
|
|
236
|
-
```
|
|
237
|
-
User: /import-docs docs/
|
|
238
|
-
|
|
239
|
-
Claude: I'll analyze your docs folder...
|
|
240
|
-
|
|
241
|
-
Running: ragtime audit docs/ --json
|
|
242
|
-
|
|
243
|
-
Found 45 markdown files. Let me analyze each one...
|
|
244
|
-
|
|
245
|
-
[Analyzes docs/auth/JWT_DESIGN.md]
|
|
246
|
-
This is an architecture doc about JWT implementation. Key insights:
|
|
247
|
-
- 15-minute access token expiry
|
|
248
|
-
- Refresh token rotation strategy
|
|
249
|
-
- Why we chose asymmetric keys
|
|
250
|
-
|
|
251
|
-
I'll create 1 memory in app/auth/ for this.
|
|
252
|
-
|
|
253
|
-
[Continues for other files...]
|
|
254
|
-
|
|
255
|
-
## Migration Plan
|
|
256
|
-
...
|
|
257
|
-
|
|
258
|
-
Proceed? (yes/adjust/cancel)
|
|
259
|
-
```
|
src/commands/pr-graduate.md
DELETED
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Graduate branch knowledge to app after PR merge (fallback)
|
|
3
|
-
allowed-tools: Bash, mcp__ragtime__search, mcp__ragtime__graduate, mcp__ragtime__update_status, mcp__ragtime__remember, AskUserQuestion
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# PR Graduate: Curate Branch Knowledge (Post-Merge)
|
|
7
|
-
|
|
8
|
-
> **Preferred workflow:** Use `/create-pr` instead - it graduates memories *before*
|
|
9
|
-
> creating the PR so knowledge is committed alongside code.
|
|
10
|
-
>
|
|
11
|
-
> Use this command only if you already merged without graduating.
|
|
12
|
-
|
|
13
|
-
After a PR is merged, review branch memories and decide what becomes permanent app knowledge.
|
|
14
|
-
|
|
15
|
-
**This is a human-in-the-loop process** - you curate which memories graduate.
|
|
16
|
-
|
|
17
|
-
<!-- ═══════════════════════════════════════════════════════════════════════════
|
|
18
|
-
CUSTOMIZABLE: Adjust the curation workflow, add project-specific
|
|
19
|
-
graduation criteria, modify the summary format, etc.
|
|
20
|
-
═══════════════════════════════════════════════════════════════════════════ -->
|
|
21
|
-
|
|
22
|
-
## Process Overview
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
For EACH branch memory:
|
|
26
|
-
|
|
27
|
-
✅ Graduate → Copy to app namespace with high confidence
|
|
28
|
-
📚 Keep → Leave in branch (reference/history)
|
|
29
|
-
❌ Abandon → Mark as abandoned (noise, superseded)
|
|
30
|
-
|
|
31
|
-
Branch memories are preserved - nothing is deleted.
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
## Step 1: Get the Branch
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
BRANCH=$(git branch --show-current)
|
|
38
|
-
BRANCH_SLUG=$(echo "$BRANCH" | tr '/' '-')
|
|
39
|
-
ISSUE_NUM=$(echo "$BRANCH" | grep -oE '[0-9]+' | head -1)
|
|
40
|
-
|
|
41
|
-
echo "Branch: $BRANCH"
|
|
42
|
-
echo "Issue: #$ISSUE_NUM"
|
|
43
|
-
|
|
44
|
-
# Check if PR was merged
|
|
45
|
-
gh pr list --head "$BRANCH" --state merged --json number,title
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Step 2: Gather Branch Memories
|
|
49
|
-
|
|
50
|
-
<!-- ═══════════════════════════════════════════════════════════════════════════
|
|
51
|
-
RAGTIME CORE - DO NOT MODIFY
|
|
52
|
-
═══════════════════════════════════════════════════════════════════════════ -->
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
mcp__ragtime__search:
|
|
56
|
-
query: "decisions patterns architecture"
|
|
57
|
-
namespace: "branch-{branch}"
|
|
58
|
-
limit: 50
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
<!-- ═══════════════════════════════════════════════════════════════════════════ -->
|
|
62
|
-
|
|
63
|
-
## Step 3: Present Memories for Curation
|
|
64
|
-
|
|
65
|
-
Display each memory with options:
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
───────────────────────────────────────────
|
|
69
|
-
📋 BRANCH MEMORY CURATION
|
|
70
|
-
───────────────────────────────────────────
|
|
71
|
-
|
|
72
|
-
Branch: {branch}
|
|
73
|
-
Total memories found: {count}
|
|
74
|
-
|
|
75
|
-
For each memory, choose:
|
|
76
|
-
✅ Graduate - Promote to app knowledge (high confidence)
|
|
77
|
-
📚 Keep - Leave in branch for reference
|
|
78
|
-
❌ Abandon - Mark as noise/superseded
|
|
79
|
-
|
|
80
|
-
───────────────────────────────────────────
|
|
81
|
-
|
|
82
|
-
**Memory 1 of {count}:**
|
|
83
|
-
|
|
84
|
-
"{memory content preview - first 200 chars}..."
|
|
85
|
-
|
|
86
|
-
Type: {type} | Added: {date}
|
|
87
|
-
|
|
88
|
-
What should happen to this memory?
|
|
89
|
-
1. ✅ Graduate to app
|
|
90
|
-
2. 📚 Keep in branch
|
|
91
|
-
3. ❌ Mark as abandoned
|
|
92
|
-
4. 👀 Show full content
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## Step 4: Process Each Memory
|
|
96
|
-
|
|
97
|
-
<!-- ═══════════════════════════════════════════════════════════════════════════
|
|
98
|
-
RAGTIME CORE - DO NOT MODIFY
|
|
99
|
-
═══════════════════════════════════════════════════════════════════════════ -->
|
|
100
|
-
|
|
101
|
-
### If ✅ Graduate:
|
|
102
|
-
|
|
103
|
-
```
|
|
104
|
-
mcp__ragtime__graduate:
|
|
105
|
-
memory_id: "{id}"
|
|
106
|
-
confidence: "high"
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
This creates a copy in `app/` namespace and marks the original as graduated.
|
|
110
|
-
|
|
111
|
-
### If 📚 Keep:
|
|
112
|
-
|
|
113
|
-
No action needed - memory stays in branch namespace for reference.
|
|
114
|
-
|
|
115
|
-
### If ❌ Abandon:
|
|
116
|
-
|
|
117
|
-
```
|
|
118
|
-
mcp__ragtime__update_status:
|
|
119
|
-
memory_id: "{id}"
|
|
120
|
-
status: "abandoned"
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
<!-- ═══════════════════════════════════════════════════════════════════════════ -->
|
|
124
|
-
|
|
125
|
-
## Step 5: Handle Context Document
|
|
126
|
-
|
|
127
|
-
The branch's `context.md` is a full document, not individual memories:
|
|
128
|
-
|
|
129
|
-
```
|
|
130
|
-
The context.md contains the full development context.
|
|
131
|
-
|
|
132
|
-
Options:
|
|
133
|
-
1. **Extract key insights** - I'll identify valuable patterns to graduate
|
|
134
|
-
2. **Keep as reference** - Leave it in branch history
|
|
135
|
-
3. **Skip** - Context was just for session continuity
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
If extracting: Identify the most valuable insights and present for approval before graduating.
|
|
139
|
-
|
|
140
|
-
## Step 6: Summary
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
───────────────────────────────────────────
|
|
144
|
-
✅ PR GRADUATION COMPLETE
|
|
145
|
-
───────────────────────────────────────────
|
|
146
|
-
|
|
147
|
-
Branch: {branch}
|
|
148
|
-
|
|
149
|
-
Memories processed: {total}
|
|
150
|
-
✅ Graduated to app: {count}
|
|
151
|
-
📚 Kept in branch: {count}
|
|
152
|
-
❌ Marked abandoned: {count}
|
|
153
|
-
|
|
154
|
-
Graduated knowledge now searchable via:
|
|
155
|
-
/recall {topic} --namespace app
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
## Quick Mode
|
|
159
|
-
|
|
160
|
-
For simpler PRs, offer quick mode:
|
|
161
|
-
|
|
162
|
-
```
|
|
163
|
-
Found {count} branch memories.
|
|
164
|
-
|
|
165
|
-
Options:
|
|
166
|
-
1. **Review each** - Curate one by one (recommended)
|
|
167
|
-
2. **Quick mode** - I'll propose which to graduate
|
|
168
|
-
3. **Graduate all** - Promote everything
|
|
169
|
-
4. **Keep all** - Leave everything in branch
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
Quick mode generates a proposal:
|
|
173
|
-
|
|
174
|
-
```
|
|
175
|
-
## Quick Mode Proposal
|
|
176
|
-
|
|
177
|
-
**Recommend Graduate:**
|
|
178
|
-
- "Auth uses JWT with 15-min expiry" ← architecture insight
|
|
179
|
-
- "Redis chosen for session storage" ← key decision
|
|
180
|
-
|
|
181
|
-
**Recommend Keep:**
|
|
182
|
-
- "Debugging: token refresh issue" ← development context
|
|
183
|
-
|
|
184
|
-
Approve? (yes/edit/review-each)
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
## Notes
|
|
188
|
-
|
|
189
|
-
- Branch memories stay forever (history) - only status changes
|
|
190
|
-
- Graduated memories get `source: "pr-graduate"` and high confidence
|
|
191
|
-
- Abandoned memories are excluded from default searches
|
|
192
|
-
- Use `/recall --namespace branch-{name}` to see branch history
|