claude_memory 0.2.0 → 0.3.0
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.
- checksums.yaml +4 -4
- data/.claude/.mind.mv2.o2N83S +0 -0
- data/.claude/CLAUDE.md +1 -0
- data/.claude/rules/claude_memory.generated.md +28 -9
- data/.claude/settings.local.json +9 -1
- data/.claude/skills/check-memory/SKILL.md +77 -0
- data/.claude/skills/improve/SKILL.md +532 -0
- data/.claude/skills/improve/feature-patterns.md +1221 -0
- data/.claude/skills/quality-update/SKILL.md +229 -0
- data/.claude/skills/quality-update/implementation-guide.md +346 -0
- data/.claude/skills/review-commit/SKILL.md +199 -0
- data/.claude/skills/review-for-quality/SKILL.md +154 -0
- data/.claude/skills/review-for-quality/expert-checklists.md +79 -0
- data/.claude/skills/setup-memory/SKILL.md +168 -0
- data/.claude/skills/study-repo/SKILL.md +307 -0
- data/.claude/skills/study-repo/analysis-template.md +323 -0
- data/.claude/skills/study-repo/focus-examples.md +327 -0
- data/CHANGELOG.md +133 -0
- data/CLAUDE.md +130 -11
- data/README.md +117 -10
- data/db/migrations/001_create_initial_schema.rb +117 -0
- data/db/migrations/002_add_project_scoping.rb +33 -0
- data/db/migrations/003_add_session_metadata.rb +42 -0
- data/db/migrations/004_add_fact_embeddings.rb +20 -0
- data/db/migrations/005_add_incremental_sync.rb +21 -0
- data/db/migrations/006_add_operation_tracking.rb +40 -0
- data/db/migrations/007_add_ingestion_metrics.rb +26 -0
- data/docs/.claude/mind.mv2.lock +0 -0
- data/docs/GETTING_STARTED.md +587 -0
- data/docs/RELEASE_NOTES_v0.2.0.md +0 -1
- data/docs/RUBY_COMMUNITY_POST_v0.2.0.md +0 -2
- data/docs/architecture.md +9 -8
- data/docs/auto_init_design.md +230 -0
- data/docs/improvements.md +557 -731
- data/docs/influence/.gitkeep +13 -0
- data/docs/influence/grepai.md +933 -0
- data/docs/influence/qmd.md +2195 -0
- data/docs/plugin.md +257 -11
- data/docs/quality_review.md +472 -1273
- data/docs/remaining_improvements.md +330 -0
- data/lefthook.yml +13 -0
- data/lib/claude_memory/commands/checks/claude_md_check.rb +41 -0
- data/lib/claude_memory/commands/checks/database_check.rb +120 -0
- data/lib/claude_memory/commands/checks/hooks_check.rb +112 -0
- data/lib/claude_memory/commands/checks/reporter.rb +110 -0
- data/lib/claude_memory/commands/checks/snapshot_check.rb +30 -0
- data/lib/claude_memory/commands/doctor_command.rb +12 -129
- data/lib/claude_memory/commands/help_command.rb +1 -0
- data/lib/claude_memory/commands/hook_command.rb +9 -2
- data/lib/claude_memory/commands/index_command.rb +169 -0
- data/lib/claude_memory/commands/ingest_command.rb +1 -1
- data/lib/claude_memory/commands/init_command.rb +5 -197
- data/lib/claude_memory/commands/initializers/database_ensurer.rb +30 -0
- data/lib/claude_memory/commands/initializers/global_initializer.rb +85 -0
- data/lib/claude_memory/commands/initializers/hooks_configurator.rb +156 -0
- data/lib/claude_memory/commands/initializers/mcp_configurator.rb +56 -0
- data/lib/claude_memory/commands/initializers/memory_instructions_writer.rb +135 -0
- data/lib/claude_memory/commands/initializers/project_initializer.rb +111 -0
- data/lib/claude_memory/commands/recover_command.rb +75 -0
- data/lib/claude_memory/commands/registry.rb +5 -1
- data/lib/claude_memory/commands/stats_command.rb +239 -0
- data/lib/claude_memory/commands/uninstall_command.rb +226 -0
- data/lib/claude_memory/core/batch_loader.rb +32 -0
- data/lib/claude_memory/core/concept_ranker.rb +73 -0
- data/lib/claude_memory/core/embedding_candidate_builder.rb +37 -0
- data/lib/claude_memory/core/fact_collector.rb +51 -0
- data/lib/claude_memory/core/fact_query_builder.rb +154 -0
- data/lib/claude_memory/core/fact_ranker.rb +113 -0
- data/lib/claude_memory/core/result_builder.rb +54 -0
- data/lib/claude_memory/core/result_sorter.rb +25 -0
- data/lib/claude_memory/core/scope_filter.rb +61 -0
- data/lib/claude_memory/core/text_builder.rb +29 -0
- data/lib/claude_memory/embeddings/generator.rb +161 -0
- data/lib/claude_memory/embeddings/similarity.rb +69 -0
- data/lib/claude_memory/hook/handler.rb +4 -3
- data/lib/claude_memory/index/lexical_fts.rb +7 -2
- data/lib/claude_memory/infrastructure/operation_tracker.rb +158 -0
- data/lib/claude_memory/infrastructure/schema_validator.rb +206 -0
- data/lib/claude_memory/ingest/content_sanitizer.rb +6 -7
- data/lib/claude_memory/ingest/ingester.rb +99 -15
- data/lib/claude_memory/ingest/metadata_extractor.rb +57 -0
- data/lib/claude_memory/ingest/tool_extractor.rb +71 -0
- data/lib/claude_memory/mcp/response_formatter.rb +331 -0
- data/lib/claude_memory/mcp/server.rb +19 -0
- data/lib/claude_memory/mcp/setup_status_analyzer.rb +73 -0
- data/lib/claude_memory/mcp/tool_definitions.rb +279 -0
- data/lib/claude_memory/mcp/tool_helpers.rb +80 -0
- data/lib/claude_memory/mcp/tools.rb +330 -320
- data/lib/claude_memory/recall/dual_query_template.rb +63 -0
- data/lib/claude_memory/recall.rb +304 -237
- data/lib/claude_memory/resolve/resolver.rb +52 -49
- data/lib/claude_memory/store/sqlite_store.rb +210 -144
- data/lib/claude_memory/store/store_manager.rb +6 -6
- data/lib/claude_memory/sweep/sweeper.rb +6 -0
- data/lib/claude_memory/version.rb +1 -1
- data/lib/claude_memory.rb +35 -3
- metadata +71 -11
- data/.claude/.mind.mv2.aLCUZd +0 -0
- data/.claude/memory.sqlite3 +0 -0
- data/.mcp.json +0 -11
- /data/docs/{feature_adoption_plan.md → plans/feature_adoption_plan.md} +0 -0
- /data/docs/{feature_adoption_plan_revised.md → plans/feature_adoption_plan_revised.md} +0 -0
- /data/docs/{plan.md → plans/plan.md} +0 -0
- /data/docs/{updated_plan.md → plans/updated_plan.md} +0 -0
|
@@ -0,0 +1,307 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: study-repo
|
|
3
|
+
description: Deep analysis of an external repository's architecture, patterns, and design decisions. Generates comprehensive influence document and updates improvements.md with prioritized recommendations.
|
|
4
|
+
agent: general-purpose
|
|
5
|
+
allowed-tools: Read, Grep, Glob, Bash
|
|
6
|
+
disable-model-invocation: false
|
|
7
|
+
argument-hint: [repo-path] [--focus=aspect]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Repository Study Skill
|
|
11
|
+
|
|
12
|
+
Deep analysis of external repositories to identify patterns, architecture decisions, and opportunities for adoption in ClaudeMemory.
|
|
13
|
+
|
|
14
|
+
## Prerequisites
|
|
15
|
+
|
|
16
|
+
Before running this skill, clone the repository you want to study:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# For public repos
|
|
20
|
+
git clone https://github.com/user/project /tmp/study-repos/project-name
|
|
21
|
+
|
|
22
|
+
# For private repos (requires gh CLI)
|
|
23
|
+
gh repo clone user/project /tmp/study-repos/project-name
|
|
24
|
+
|
|
25
|
+
# Use --depth 1 for speed (recommended)
|
|
26
|
+
git clone --depth 1 https://github.com/user/project /tmp/study-repos/project-name
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Then invoke: `/study-repo /tmp/study-repos/project-name`
|
|
30
|
+
|
|
31
|
+
**Optional Focus Mode**: Narrow analysis to specific aspect
|
|
32
|
+
```bash
|
|
33
|
+
/study-repo /tmp/study-repos/project-name --focus="MCP implementation"
|
|
34
|
+
/study-repo /tmp/study-repos/project-name --focus="testing strategy"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
See `.claude/skills/study-repo/focus-examples.md` for more examples.
|
|
38
|
+
|
|
39
|
+
## Analysis Phases
|
|
40
|
+
|
|
41
|
+
Follow these phases systematically to ensure comprehensive coverage:
|
|
42
|
+
|
|
43
|
+
### Phase 1: Repository Context (10 minutes)
|
|
44
|
+
|
|
45
|
+
**Goal**: Understand project purpose, maturity, and ecosystem
|
|
46
|
+
|
|
47
|
+
**Tasks**:
|
|
48
|
+
1. Read README.md, CHANGELOG.md, LICENSE
|
|
49
|
+
2. Examine gemspec/package.json for dependencies and metadata
|
|
50
|
+
3. Check GitHub metadata (stars, issues, PRs, contributors)
|
|
51
|
+
4. Review CI configuration (.github/workflows/, .gitlab-ci.yml)
|
|
52
|
+
5. Check documentation structure (docs/, wiki)
|
|
53
|
+
|
|
54
|
+
**Output**: Executive Summary section with:
|
|
55
|
+
- Project purpose (1-2 sentences)
|
|
56
|
+
- Key innovation (what makes it unique)
|
|
57
|
+
- Technology stack table
|
|
58
|
+
- Production readiness assessment
|
|
59
|
+
|
|
60
|
+
### Phase 2: Architecture Mapping (15 minutes)
|
|
61
|
+
|
|
62
|
+
**Goal**: Map high-level structure and module organization
|
|
63
|
+
|
|
64
|
+
**Tasks**:
|
|
65
|
+
1. Run `tree -L 3 -d` to understand directory structure
|
|
66
|
+
2. Identify entry points (bin/, exe/, main files)
|
|
67
|
+
3. Map core modules and their responsibilities
|
|
68
|
+
4. Identify data model (database schema, structs, classes)
|
|
69
|
+
5. Document dependencies between modules
|
|
70
|
+
|
|
71
|
+
**Output**: Architecture Overview section with:
|
|
72
|
+
- Data model description
|
|
73
|
+
- Design patterns identified
|
|
74
|
+
- Module organization diagram (text-based)
|
|
75
|
+
- Comparison table vs ClaudeMemory
|
|
76
|
+
|
|
77
|
+
### Phase 3: Pattern Recognition (20 minutes)
|
|
78
|
+
|
|
79
|
+
**Goal**: Identify key design patterns and conventions
|
|
80
|
+
|
|
81
|
+
**Tasks**:
|
|
82
|
+
1. Search for common patterns:
|
|
83
|
+
- Dependency injection
|
|
84
|
+
- Command pattern
|
|
85
|
+
- Repository pattern
|
|
86
|
+
- Factory pattern
|
|
87
|
+
- Observer pattern
|
|
88
|
+
2. Review naming conventions
|
|
89
|
+
3. Check error handling approaches
|
|
90
|
+
4. Examine configuration management
|
|
91
|
+
5. Identify testing patterns
|
|
92
|
+
|
|
93
|
+
**Output**: Key Components Deep-Dive with:
|
|
94
|
+
- Component purpose
|
|
95
|
+
- Code examples with file:line references
|
|
96
|
+
- Design decision rationale
|
|
97
|
+
|
|
98
|
+
### Phase 4: Code Quality Assessment (15 minutes)
|
|
99
|
+
|
|
100
|
+
**Goal**: Evaluate testing, documentation, and performance
|
|
101
|
+
|
|
102
|
+
**Tasks**:
|
|
103
|
+
1. Analyze test coverage and structure
|
|
104
|
+
2. Review documentation quality
|
|
105
|
+
3. Check for performance optimizations
|
|
106
|
+
4. Examine logging and observability
|
|
107
|
+
5. Look for code quality tools (linters, formatters)
|
|
108
|
+
|
|
109
|
+
**Output**: Comparative Analysis section with:
|
|
110
|
+
- What they do well (with evidence)
|
|
111
|
+
- What we do well (our advantages)
|
|
112
|
+
- Trade-offs table
|
|
113
|
+
|
|
114
|
+
### Phase 5: Comparative Analysis (15 minutes)
|
|
115
|
+
|
|
116
|
+
**Goal**: Compare their approach with ClaudeMemory's
|
|
117
|
+
|
|
118
|
+
**Tasks**:
|
|
119
|
+
1. For each major component, compare:
|
|
120
|
+
- Their implementation
|
|
121
|
+
- Our implementation
|
|
122
|
+
- Pros/cons of each approach
|
|
123
|
+
2. Identify areas where they excel
|
|
124
|
+
3. Identify areas where we excel
|
|
125
|
+
4. Document fundamental architectural differences
|
|
126
|
+
|
|
127
|
+
**Output**: Enhanced Comparative Analysis with:
|
|
128
|
+
- Side-by-side comparison
|
|
129
|
+
- Trade-off analysis
|
|
130
|
+
- Context for adoption decisions
|
|
131
|
+
|
|
132
|
+
### Phase 6: Adoption Opportunities (20 minutes)
|
|
133
|
+
|
|
134
|
+
**Goal**: Extract actionable recommendations with priorities
|
|
135
|
+
|
|
136
|
+
**Tasks**:
|
|
137
|
+
1. List all potential adoptions
|
|
138
|
+
2. For each, assess:
|
|
139
|
+
- Value (quantified benefit)
|
|
140
|
+
- Effort (implementation complexity)
|
|
141
|
+
- Risk (compatibility, maintenance)
|
|
142
|
+
- Fit (alignment with our architecture)
|
|
143
|
+
3. Prioritize as High ⭐ / Medium / Low
|
|
144
|
+
4. Identify features to avoid
|
|
145
|
+
5. Propose implementation phases
|
|
146
|
+
|
|
147
|
+
**Output**: Adoption Opportunities section with:
|
|
148
|
+
- High Priority ⭐ items (adopt soon)
|
|
149
|
+
- Medium Priority items (consider)
|
|
150
|
+
- Low Priority items (defer)
|
|
151
|
+
- Features to Avoid (with reasoning)
|
|
152
|
+
- Implementation Recommendations (phased plan)
|
|
153
|
+
|
|
154
|
+
## Output Format
|
|
155
|
+
|
|
156
|
+
Generate a comprehensive influence document following this structure (see `.claude/skills/study-repo/analysis-template.md` for full template):
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
# [Project Name] Analysis
|
|
160
|
+
|
|
161
|
+
*Analysis Date: YYYY-MM-DD*
|
|
162
|
+
*Repository: GitHub URL*
|
|
163
|
+
*Version/Commit: tag or SHA*
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Executive Summary
|
|
168
|
+
[Project purpose, key innovation, tech stack, maturity]
|
|
169
|
+
|
|
170
|
+
## Architecture Overview
|
|
171
|
+
[Data model, design patterns, module organization, comparison table]
|
|
172
|
+
|
|
173
|
+
## Key Components Deep-Dive
|
|
174
|
+
[Component 1, Component 2, etc. with code examples and file:line references]
|
|
175
|
+
|
|
176
|
+
## Comparative Analysis
|
|
177
|
+
[What they do well, what we do well, trade-offs]
|
|
178
|
+
|
|
179
|
+
## Adoption Opportunities
|
|
180
|
+
|
|
181
|
+
### High Priority ⭐
|
|
182
|
+
#### 1. [Feature]
|
|
183
|
+
- **Value**: [Benefit]
|
|
184
|
+
- **Evidence**: [file:line proof]
|
|
185
|
+
- **Implementation**: [Approach]
|
|
186
|
+
- **Effort**: [Estimate]
|
|
187
|
+
- **Trade-off**: [Costs]
|
|
188
|
+
- **Recommendation**: ADOPT / CONSIDER / DEFER
|
|
189
|
+
|
|
190
|
+
[Medium and Low sections follow]
|
|
191
|
+
|
|
192
|
+
### Features to Avoid
|
|
193
|
+
[With reasoning]
|
|
194
|
+
|
|
195
|
+
## Implementation Recommendations
|
|
196
|
+
[Phase 1, Phase 2, etc.]
|
|
197
|
+
|
|
198
|
+
## Architecture Decisions
|
|
199
|
+
[What to preserve, adopt, reject]
|
|
200
|
+
|
|
201
|
+
## Key Takeaways
|
|
202
|
+
[Main learnings and next steps]
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
**Critical Requirements**:
|
|
206
|
+
- All claims must include file:line references
|
|
207
|
+
- Code examples for key patterns
|
|
208
|
+
- Priority markers (⭐) on High Priority items
|
|
209
|
+
- Comparison table vs ClaudeMemory
|
|
210
|
+
- Quantified benefits where possible
|
|
211
|
+
- Clear ADOPT/CONSIDER/DEFER recommendations
|
|
212
|
+
|
|
213
|
+
## Integration with improvements.md
|
|
214
|
+
|
|
215
|
+
After creating the influence document, update `docs/improvements.md`:
|
|
216
|
+
|
|
217
|
+
1. **Extract High Priority items** (⭐ marked) from influence doc
|
|
218
|
+
2. **Format as new section**:
|
|
219
|
+
```markdown
|
|
220
|
+
## [Project Name] Study (YYYY-MM-DD)
|
|
221
|
+
|
|
222
|
+
Source: docs/influence/[project-name].md
|
|
223
|
+
|
|
224
|
+
### High Priority Recommendations
|
|
225
|
+
|
|
226
|
+
- [ ] **[Feature 1]**: [Brief description]
|
|
227
|
+
- Value: [Quantified benefit]
|
|
228
|
+
- Evidence: [file:line from their repo]
|
|
229
|
+
- Effort: [Estimate]
|
|
230
|
+
|
|
231
|
+
- [ ] **[Feature 2]**: [...]
|
|
232
|
+
```
|
|
233
|
+
3. **Append to improvements.md** preserving existing structure
|
|
234
|
+
4. **Update "Last updated" timestamp** at top of file
|
|
235
|
+
|
|
236
|
+
## Success Criteria
|
|
237
|
+
|
|
238
|
+
The analysis is complete when all of these are verified:
|
|
239
|
+
|
|
240
|
+
- ✅ `docs/influence/<project_name>.md` created with all sections
|
|
241
|
+
- ✅ Executive Summary includes project metadata and tech stack
|
|
242
|
+
- ✅ Architecture Overview has comparison table vs ClaudeMemory
|
|
243
|
+
- ✅ Key Components include code examples with file:line references
|
|
244
|
+
- ✅ All major claims have evidence citations
|
|
245
|
+
- ✅ Adoption Opportunities use ⭐ for High Priority items
|
|
246
|
+
- ✅ Each opportunity has Value/Evidence/Implementation/Effort/Trade-off
|
|
247
|
+
- ✅ Clear ADOPT/CONSIDER/DEFER recommendations given
|
|
248
|
+
- ✅ Implementation Recommendations organized in phases
|
|
249
|
+
- ✅ Trade-offs section discusses costs and risks
|
|
250
|
+
- ✅ `docs/improvements.md` updated with new dated section
|
|
251
|
+
- ✅ High priority items extracted and formatted as tasks
|
|
252
|
+
- ✅ Existing improvements.md structure preserved
|
|
253
|
+
- ✅ Console summary shows key findings
|
|
254
|
+
|
|
255
|
+
## Focus Mode
|
|
256
|
+
|
|
257
|
+
When `--focus` flag is provided, narrow the analysis:
|
|
258
|
+
|
|
259
|
+
1. **Parse focus topic** from arguments
|
|
260
|
+
2. **Filter files** to only relevant ones:
|
|
261
|
+
- For "testing": test/, spec/, .github/workflows/
|
|
262
|
+
- For "MCP": mcp/, server/, tools/
|
|
263
|
+
- For "database": schema, migrations, queries
|
|
264
|
+
- For "CLI": bin/, exe/, commands/
|
|
265
|
+
3. **Narrow exploration** to focused aspect
|
|
266
|
+
4. **Target recommendations** to focused area
|
|
267
|
+
5. **Faster execution** with reduced scope
|
|
268
|
+
|
|
269
|
+
See `.claude/skills/study-repo/focus-examples.md` for detailed examples.
|
|
270
|
+
|
|
271
|
+
## Error Handling
|
|
272
|
+
|
|
273
|
+
Handle common error cases gracefully:
|
|
274
|
+
|
|
275
|
+
- **Invalid path**: Display clear error with example usage
|
|
276
|
+
- **Empty directory**: Warn about missing files
|
|
277
|
+
- **No README**: Note absence but continue analysis
|
|
278
|
+
- **Large repo**: Suggest using `--focus` flag
|
|
279
|
+
- **Permission issues**: Check file permissions and suggest fixes
|
|
280
|
+
|
|
281
|
+
## Execution Steps
|
|
282
|
+
|
|
283
|
+
1. **Parse arguments**: Extract repo path and optional focus
|
|
284
|
+
2. **Validate path**: Check directory exists and is readable
|
|
285
|
+
3. **Detect project name**: Extract from path or .git/config
|
|
286
|
+
4. **Run analysis phases**: Follow Phase 1-6 systematically
|
|
287
|
+
5. **Generate influence doc**: Use template with collected data
|
|
288
|
+
6. **Update improvements.md**: Extract and append High Priority items
|
|
289
|
+
7. **Display summary**: Show key findings and output locations
|
|
290
|
+
8. **Exit with success**: Return 0 if complete
|
|
291
|
+
|
|
292
|
+
## Integration with /improve
|
|
293
|
+
|
|
294
|
+
The recommendations added to `docs/improvements.md` can be implemented using `/improve`:
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
# Study external project
|
|
298
|
+
/study-repo /tmp/study-repos/some-project
|
|
299
|
+
|
|
300
|
+
# Review recommendations
|
|
301
|
+
cat docs/influence/some-project.md
|
|
302
|
+
|
|
303
|
+
# Implement selected improvements
|
|
304
|
+
/improve
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
This creates a complete workflow: `/study-repo` → recommendations → `/improve` → implementation
|
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
# [Project Name] Analysis
|
|
2
|
+
|
|
3
|
+
*Analysis Date: [YYYY-MM-DD]*
|
|
4
|
+
*Repository: [GitHub URL]*
|
|
5
|
+
*Version/Commit: [tag or SHA]*
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Executive Summary
|
|
10
|
+
|
|
11
|
+
### Project Purpose
|
|
12
|
+
[1-2 sentence description of what this project does and why it exists]
|
|
13
|
+
|
|
14
|
+
### Key Innovation
|
|
15
|
+
[What makes this project unique or interesting? What novel approach does it take?]
|
|
16
|
+
|
|
17
|
+
### Technology Stack
|
|
18
|
+
- **Language**: [Primary language(s) and version]
|
|
19
|
+
- **Framework**: [Key frameworks used]
|
|
20
|
+
- **Dependencies**: [Major libraries/gems]
|
|
21
|
+
- **Database**: [If applicable]
|
|
22
|
+
- **Special Tools**: [Unique tooling, build systems, etc.]
|
|
23
|
+
|
|
24
|
+
### Production Readiness
|
|
25
|
+
- **Maturity**: [Alpha / Beta / Stable / Production-grade]
|
|
26
|
+
- **Test Coverage**: [Percentage if available, or qualitative assessment]
|
|
27
|
+
- **Documentation**: [Quality and completeness]
|
|
28
|
+
- **Community**: [GitHub stars, contributors, maintenance activity]
|
|
29
|
+
- **Known Issues**: [Critical bugs or limitations]
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Architecture Overview
|
|
34
|
+
|
|
35
|
+
### Data Model
|
|
36
|
+
[How data is structured and stored. Schema, entities, relationships.]
|
|
37
|
+
|
|
38
|
+
```ruby
|
|
39
|
+
# Example from [file:line]
|
|
40
|
+
class Example
|
|
41
|
+
# ...
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Design Patterns
|
|
46
|
+
[Key architectural patterns identified:]
|
|
47
|
+
- **Pattern 1**: [Description and usage]
|
|
48
|
+
- **Pattern 2**: [Description and usage]
|
|
49
|
+
|
|
50
|
+
### Module Organization
|
|
51
|
+
```
|
|
52
|
+
project/
|
|
53
|
+
├── core/ # [Purpose]
|
|
54
|
+
├── adapters/ # [Purpose]
|
|
55
|
+
├── infrastructure/ # [Purpose]
|
|
56
|
+
└── application/ # [Purpose]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
[Explain component relationships and boundaries]
|
|
60
|
+
|
|
61
|
+
### Comparison with ClaudeMemory
|
|
62
|
+
|
|
63
|
+
| Aspect | [Project] | ClaudeMemory | Notes |
|
|
64
|
+
|--------|-----------|--------------|-------|
|
|
65
|
+
| **Data Model** | [Their approach] | [Our approach] | [Key differences] |
|
|
66
|
+
| **Storage** | [Their tech] | [Our tech] | [Trade-offs] |
|
|
67
|
+
| **Search** | [Their method] | [Our method] | [Performance implications] |
|
|
68
|
+
| **CLI Design** | [Their pattern] | [Our pattern] | [Usability comparison] |
|
|
69
|
+
| **Testing** | [Their strategy] | [Our strategy] | [Coverage comparison] |
|
|
70
|
+
| **Error Handling** | [Their approach] | [Our approach] | [Robustness comparison] |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Key Components Deep-Dive
|
|
75
|
+
|
|
76
|
+
### Component 1: [Name]
|
|
77
|
+
|
|
78
|
+
**Purpose**: [What this component does and why it exists]
|
|
79
|
+
|
|
80
|
+
**Location**: `path/to/component/`
|
|
81
|
+
|
|
82
|
+
**Implementation**:
|
|
83
|
+
```[language]
|
|
84
|
+
# From [file:line]
|
|
85
|
+
class ComponentExample
|
|
86
|
+
def key_method
|
|
87
|
+
# Critical logic
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Design Decisions**:
|
|
93
|
+
- [Why implemented this way]
|
|
94
|
+
- [What alternatives were rejected]
|
|
95
|
+
- [Trade-offs made]
|
|
96
|
+
|
|
97
|
+
**Dependencies**: [What it depends on]
|
|
98
|
+
|
|
99
|
+
**Testing**: [How it's tested]
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### Component 2: [Name]
|
|
104
|
+
|
|
105
|
+
**Purpose**: [...]
|
|
106
|
+
|
|
107
|
+
**Location**: `path/to/component/`
|
|
108
|
+
|
|
109
|
+
**Implementation**:
|
|
110
|
+
```[language]
|
|
111
|
+
# From [file:line]
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Design Decisions**: [...]
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### Component 3: [Name]
|
|
119
|
+
|
|
120
|
+
[Repeat structure for each major component]
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Comparative Analysis
|
|
125
|
+
|
|
126
|
+
### What They Do Well
|
|
127
|
+
|
|
128
|
+
#### 1. [Feature/Approach]
|
|
129
|
+
- **Description**: [What they do]
|
|
130
|
+
- **Evidence**: [file:line references]
|
|
131
|
+
- **Why It Works**: [Analysis of benefits]
|
|
132
|
+
- **Metrics**: [Quantifiable improvements if available]
|
|
133
|
+
|
|
134
|
+
#### 2. [Feature/Approach]
|
|
135
|
+
[Repeat structure]
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### What We Do Well
|
|
140
|
+
|
|
141
|
+
#### 1. [Feature/Approach]
|
|
142
|
+
- **Description**: [What we do]
|
|
143
|
+
- **Evidence**: [file references from our codebase]
|
|
144
|
+
- **Our Advantage**: [Why our approach is strong]
|
|
145
|
+
- **Context**: [When our approach excels]
|
|
146
|
+
|
|
147
|
+
#### 2. [Feature/Approach]
|
|
148
|
+
[Repeat structure]
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### Trade-offs
|
|
153
|
+
|
|
154
|
+
| Approach | Pros | Cons | Best For |
|
|
155
|
+
|----------|------|------|----------|
|
|
156
|
+
| **Their approach to X** | [Benefits] | [Costs] | [Use cases] |
|
|
157
|
+
| **Our approach to X** | [Benefits] | [Costs] | [Use cases] |
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Adoption Opportunities
|
|
162
|
+
|
|
163
|
+
### High Priority ⭐
|
|
164
|
+
|
|
165
|
+
#### 1. [Feature Name]
|
|
166
|
+
- **Value**: [Quantified benefit - e.g., "50% faster queries", "eliminates N+1 issues"]
|
|
167
|
+
- **Evidence**: [Proof from their codebase with file:line references]
|
|
168
|
+
- **Implementation**: [High-level approach to adopt in our codebase]
|
|
169
|
+
- **Effort**: [Rough estimate in developer-days]
|
|
170
|
+
- **Trade-off**: [What we give up or risk]
|
|
171
|
+
- **Recommendation**: **ADOPT** / CONSIDER / DEFER
|
|
172
|
+
- **Integration Points**: [Which of our files/modules would change]
|
|
173
|
+
|
|
174
|
+
#### 2. [Feature Name]
|
|
175
|
+
[Same structure]
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### Medium Priority
|
|
180
|
+
|
|
181
|
+
#### 1. [Feature Name]
|
|
182
|
+
- **Value**: [Benefit]
|
|
183
|
+
- **Evidence**: [file:line]
|
|
184
|
+
- **Implementation**: [Approach]
|
|
185
|
+
- **Effort**: [Estimate]
|
|
186
|
+
- **Trade-off**: [Costs]
|
|
187
|
+
- **Recommendation**: ADOPT / **CONSIDER** / DEFER
|
|
188
|
+
- **Integration Points**: [...]
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
### Low Priority
|
|
193
|
+
|
|
194
|
+
#### 1. [Feature Name]
|
|
195
|
+
- **Value**: [Minor benefit]
|
|
196
|
+
- **Evidence**: [file:line]
|
|
197
|
+
- **Implementation**: [Approach]
|
|
198
|
+
- **Effort**: [Estimate]
|
|
199
|
+
- **Trade-off**: [Costs]
|
|
200
|
+
- **Recommendation**: ADOPT / CONSIDER / **DEFER**
|
|
201
|
+
- **Reason to Defer**: [Why not now]
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
### Features to Avoid
|
|
206
|
+
|
|
207
|
+
#### 1. [Feature Name]
|
|
208
|
+
- **What It Is**: [Description]
|
|
209
|
+
- **Why Avoid**: [Clear reasoning - complexity, maintenance burden, poor fit]
|
|
210
|
+
- **Our Alternative**: [What we have or should do instead]
|
|
211
|
+
- **Evidence**: [Issues, complexity metrics, or design conflicts]
|
|
212
|
+
|
|
213
|
+
#### 2. [Feature Name]
|
|
214
|
+
[Same structure]
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
## Implementation Recommendations
|
|
219
|
+
|
|
220
|
+
### Phase 1: [Name] (Timeframe: [e.g., 1-2 weeks])
|
|
221
|
+
|
|
222
|
+
**Goals**: [What this phase accomplishes]
|
|
223
|
+
|
|
224
|
+
**Tasks**:
|
|
225
|
+
- [ ] [Task 1 - specific and measurable]
|
|
226
|
+
- [ ] [Task 2]
|
|
227
|
+
- [ ] [Task 3]
|
|
228
|
+
|
|
229
|
+
**Success Criteria**:
|
|
230
|
+
- [How to verify phase completion]
|
|
231
|
+
- [Metrics or tests to validate]
|
|
232
|
+
|
|
233
|
+
**Risks**: [What could go wrong]
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
### Phase 2: [Name] (Timeframe: [e.g., 2-3 weeks])
|
|
238
|
+
|
|
239
|
+
**Goals**: [...]
|
|
240
|
+
|
|
241
|
+
**Tasks**:
|
|
242
|
+
- [ ] [Task 1]
|
|
243
|
+
- [ ] [Task 2]
|
|
244
|
+
|
|
245
|
+
**Success Criteria**: [...]
|
|
246
|
+
|
|
247
|
+
**Risks**: [...]
|
|
248
|
+
|
|
249
|
+
**Dependencies**: [What from Phase 1 must complete first]
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
### Phase 3: [Name] (Timeframe: [...])
|
|
254
|
+
|
|
255
|
+
[Continue for additional phases]
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Architecture Decisions
|
|
260
|
+
|
|
261
|
+
### What to Preserve
|
|
262
|
+
|
|
263
|
+
These aspects of our architecture should be maintained:
|
|
264
|
+
|
|
265
|
+
- **[Our Feature]**: [Why keep it - benefits, stability, fit]
|
|
266
|
+
- **[Our Pattern]**: [Why preserve - maintainability, clarity]
|
|
267
|
+
|
|
268
|
+
### What to Adopt
|
|
269
|
+
|
|
270
|
+
These aspects of their architecture should be integrated:
|
|
271
|
+
|
|
272
|
+
- **[Their Feature]**: [Why adopt - clear benefits outweigh costs]
|
|
273
|
+
- **[Their Pattern]**: [Why take - proven approach, better fit]
|
|
274
|
+
|
|
275
|
+
### What to Reject
|
|
276
|
+
|
|
277
|
+
These aspects of their architecture don't fit our needs:
|
|
278
|
+
|
|
279
|
+
- **[Their Feature]**: [Why reject - complexity, poor fit, better alternatives]
|
|
280
|
+
- **[Their Pattern]**: [Why avoid - maintenance burden, unclear benefits]
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Key Takeaways
|
|
285
|
+
|
|
286
|
+
### Main Learnings
|
|
287
|
+
1. [Primary insight from analysis]
|
|
288
|
+
2. [Secondary insight]
|
|
289
|
+
3. [Pattern or approach worth remembering]
|
|
290
|
+
|
|
291
|
+
### Recommended Adoption Order
|
|
292
|
+
1. **First**: [Feature] - [Why start here]
|
|
293
|
+
2. **Second**: [Feature] - [Why next]
|
|
294
|
+
3. **Third**: [Feature] - [Why later]
|
|
295
|
+
|
|
296
|
+
### Expected Impact
|
|
297
|
+
- **Performance**: [Quantified if possible]
|
|
298
|
+
- **Maintainability**: [Qualitative assessment]
|
|
299
|
+
- **Feature Completeness**: [What new capabilities we gain]
|
|
300
|
+
- **Developer Experience**: [How it improves our workflow]
|
|
301
|
+
|
|
302
|
+
### Next Actions
|
|
303
|
+
- [ ] Review findings with team
|
|
304
|
+
- [ ] Prioritize recommendations
|
|
305
|
+
- [ ] Update `docs/improvements.md`
|
|
306
|
+
- [ ] Begin Phase 1 implementation
|
|
307
|
+
- [ ] Schedule follow-up review after adoption
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## References
|
|
312
|
+
|
|
313
|
+
- **Repository**: [GitHub URL]
|
|
314
|
+
- **Documentation**: [Docs URL]
|
|
315
|
+
- **Related Issues**: [Relevant issue links]
|
|
316
|
+
- **Discussions**: [Community discussions if relevant]
|
|
317
|
+
- **Similar Projects**: [Related projects for context]
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
*Analysis completed: [DATE]*
|
|
322
|
+
*Analyst: Claude Code*
|
|
323
|
+
*Review Status: [Draft / Under Review / Approved]*
|