mirror of
https://github.com/basicmachines-co/basic-memory
synced 2026-06-21 13:47:35 +00:00
feat: Add research skill and /research command
New capability to research topics and save structured reports: /research command: - /research <topic> [folder] - Investigates using web search, codebase search, and existing notes - Produces structured report with findings and analysis - Saves to research/ folder by default research skill (model-invoked): - Triggers on "research", "investigate", "look into", "explore" - Gathers information from multiple sources - Synthesizes findings into actionable reports - Links to sources and related notes Report structure: - Summary and research question - Key findings with evidence - Analysis and recommendations - Open questions and sources - Observations and relations for knowledge graph 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: phernandez <paul@basicmachines.co>
This commit is contained in:
@@ -121,6 +121,22 @@ Actions:
|
||||
- `relations` - Suggest connections
|
||||
- `tags` - Review tag consistency
|
||||
|
||||
### `/research <topic> [folder]`
|
||||
|
||||
Research a topic and save a structured report to Basic Memory.
|
||||
|
||||
```
|
||||
/research MCP protocol
|
||||
/research "database migrations"
|
||||
/research "auth options" decisions
|
||||
```
|
||||
|
||||
Produces a report with:
|
||||
- Summary and key findings
|
||||
- Analysis and recommendations
|
||||
- Sources and related notes
|
||||
- Saved to `research/` folder by default
|
||||
|
||||
---
|
||||
|
||||
## Skills
|
||||
@@ -210,6 +226,24 @@ Help organize, link, and maintain the knowledge graph.
|
||||
|
||||
**Best for:** Periodic knowledge base maintenance and improving discoverability.
|
||||
|
||||
### research
|
||||
|
||||
Research topics thoroughly and produce structured reports saved to Basic Memory.
|
||||
|
||||
**Triggers when:**
|
||||
- User asks to research or investigate something
|
||||
- User wants to understand a concept or technology
|
||||
- User needs context before making a decision
|
||||
- Phrases like "research", "look into", "explore", "investigate"
|
||||
|
||||
**What it produces:**
|
||||
- Structured report with summary, findings, and analysis
|
||||
- Recommendations when applicable
|
||||
- Links to sources and related notes
|
||||
- Saved to `research/` folder
|
||||
|
||||
**Best for:** Building knowledge base through investigation and documentation.
|
||||
|
||||
---
|
||||
|
||||
## Hooks
|
||||
@@ -253,14 +287,16 @@ claude-code-plugin/
|
||||
│ ├── continue.md # /continue command
|
||||
│ ├── context.md # /context command
|
||||
│ ├── recent.md # /recent command
|
||||
│ └── organize.md # /organize command
|
||||
│ ├── organize.md # /organize command
|
||||
│ └── research.md # /research command
|
||||
├── skills/
|
||||
│ ├── knowledge-capture/
|
||||
│ ├── continue-conversation/
|
||||
│ ├── spec-driven-development/
|
||||
│ ├── edit-note/
|
||||
│ ├── edit-note-local/
|
||||
│ └── knowledge-organize/
|
||||
│ ├── knowledge-organize/
|
||||
│ └── research/
|
||||
├── hooks/
|
||||
│ └── hooks.json # Hook definitions
|
||||
├── README.md # Quick start guide
|
||||
|
||||
@@ -42,6 +42,7 @@ pipx install basic-memory
|
||||
| `/context <memory://url>` | Build context from a specific note |
|
||||
| `/recent [timeframe]` | Show recent activity |
|
||||
| `/organize [action]` | Maintain your knowledge graph |
|
||||
| `/research <topic>` | Research a topic and save a report |
|
||||
|
||||
### Examples
|
||||
|
||||
@@ -57,6 +58,9 @@ pipx install basic-memory
|
||||
|
||||
# Find orphan notes and suggest links
|
||||
/organize orphans
|
||||
|
||||
# Research a topic and save findings
|
||||
/research "MCP protocol"
|
||||
```
|
||||
|
||||
## Skills
|
||||
@@ -71,6 +75,7 @@ Skills are model-invoked - Claude uses them automatically when the context fits.
|
||||
| `edit-note` | Edits notes via MCP tools (cloud-compatible) |
|
||||
| `edit-note-local` | Edits notes as files (local installations) |
|
||||
| `knowledge-organize` | Helps organize and link notes |
|
||||
| `research` | Researches topics and produces saved reports |
|
||||
|
||||
## Hooks
|
||||
|
||||
|
||||
@@ -0,0 +1,140 @@
|
||||
---
|
||||
description: Research a topic and save a structured report to Basic Memory
|
||||
argument-hint: <topic> [folder]
|
||||
allowed-tools: mcp__basic-memory__write_note, mcp__basic-memory__search_notes, mcp__basic-memory__read_note, mcp__basic-memory__build_context, WebSearch, WebFetch, Grep, Glob, Read
|
||||
---
|
||||
|
||||
# Research
|
||||
|
||||
Research a topic thoroughly and produce a structured report saved to Basic Memory.
|
||||
|
||||
## Arguments
|
||||
|
||||
- `$1` - Topic to research (required)
|
||||
- `$2` - Folder to save report (optional, default: "research")
|
||||
|
||||
## Your Task
|
||||
|
||||
Conduct thorough research on: **$ARGUMENTS**
|
||||
|
||||
### 1. Check Existing Knowledge
|
||||
|
||||
First, see what we already know:
|
||||
```python
|
||||
mcp__basic-memory__search_notes(query="$1", project="main")
|
||||
```
|
||||
|
||||
Read any relevant existing notes to avoid duplicating research.
|
||||
|
||||
### 2. Gather Information
|
||||
|
||||
Depending on the topic, use appropriate tools:
|
||||
|
||||
**For codebase topics:**
|
||||
- Search code with Grep/Glob
|
||||
- Read relevant files
|
||||
- Check tests for examples
|
||||
|
||||
**For external topics:**
|
||||
- Use WebSearch for current information
|
||||
- Fetch documentation with WebFetch
|
||||
- Look for official sources
|
||||
|
||||
**For Basic Memory context:**
|
||||
- Build context from related notes
|
||||
- Check for prior decisions or research
|
||||
|
||||
### 3. Analyze Findings
|
||||
|
||||
Synthesize what you learned:
|
||||
- Identify key concepts
|
||||
- Note patterns and trade-offs
|
||||
- Form recommendations if applicable
|
||||
- Flag uncertainties
|
||||
|
||||
### 4. Produce Report
|
||||
|
||||
Create a structured report with this format:
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: "Research: [Topic]"
|
||||
type: research
|
||||
tags:
|
||||
- research
|
||||
- [relevant-tags]
|
||||
---
|
||||
|
||||
# Research: [Topic]
|
||||
|
||||
## Summary
|
||||
|
||||
[2-3 sentence executive summary]
|
||||
|
||||
## Research Question
|
||||
|
||||
[What we investigated and why]
|
||||
|
||||
## Key Findings
|
||||
|
||||
### [Finding 1]
|
||||
[Details and evidence]
|
||||
|
||||
### [Finding 2]
|
||||
[Details and evidence]
|
||||
|
||||
### [Finding 3]
|
||||
[Details and evidence]
|
||||
|
||||
## Analysis
|
||||
|
||||
[Synthesis, patterns, trade-offs, recommendations]
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [Areas needing more investigation]
|
||||
|
||||
## Sources
|
||||
|
||||
- [Links to sources]
|
||||
- [[Related Notes]] from Basic Memory
|
||||
|
||||
## Observations
|
||||
|
||||
- [finding] Key insight #research
|
||||
- [recommendation] Suggested approach based on research
|
||||
|
||||
## Relations
|
||||
|
||||
- researches [[Topic]]
|
||||
- relates-to [[Related Concepts]]
|
||||
```
|
||||
|
||||
### 5. Save Report
|
||||
|
||||
```python
|
||||
mcp__basic-memory__write_note(
|
||||
title="Research: $1",
|
||||
content="[report content]",
|
||||
folder="$2" or "research",
|
||||
tags=["research", ...],
|
||||
project="main"
|
||||
)
|
||||
```
|
||||
|
||||
### 6. Present Summary
|
||||
|
||||
After saving, present:
|
||||
- Key findings summary
|
||||
- Main recommendation (if applicable)
|
||||
- Where the report was saved
|
||||
- Offer to dive deeper into any aspect
|
||||
|
||||
## Examples
|
||||
|
||||
```
|
||||
/research MCP protocol
|
||||
/research "database migration patterns"
|
||||
/research "authentication options" decisions
|
||||
/research "React vs Vue" architecture
|
||||
```
|
||||
@@ -0,0 +1,213 @@
|
||||
---
|
||||
name: research
|
||||
description: Research a topic thoroughly and produce a structured report saved to Basic Memory - investigate concepts, gather context, and document findings
|
||||
---
|
||||
|
||||
# Research
|
||||
|
||||
This skill helps conduct thorough research on a topic and produces a structured report that gets saved to Basic Memory for future reference.
|
||||
|
||||
## When to Use
|
||||
|
||||
Use this skill when:
|
||||
- User asks to research or investigate something
|
||||
- User wants to understand a concept, technology, or approach
|
||||
- User needs context gathered before making a decision
|
||||
- User asks "what is...", "how does... work", "explore...", "investigate..."
|
||||
- User wants findings documented for later
|
||||
- Phrases like "research this", "look into", "find out about", "explore options for"
|
||||
|
||||
## Research Process
|
||||
|
||||
### 1. Understand the Research Question
|
||||
|
||||
Clarify what specifically to investigate:
|
||||
- What is the core question or topic?
|
||||
- What scope - broad overview or deep dive?
|
||||
- Any specific aspects to focus on?
|
||||
- What will the research inform (a decision, implementation, understanding)?
|
||||
|
||||
### 2. Gather Information
|
||||
|
||||
Use available tools to collect information:
|
||||
|
||||
**For codebase research:**
|
||||
- Search the codebase for relevant code
|
||||
- Read documentation and comments
|
||||
- Trace how things connect
|
||||
- Look at tests for usage examples
|
||||
|
||||
**For concept research:**
|
||||
- Use web search for current information
|
||||
- Fetch documentation from official sources
|
||||
- Look for examples and best practices
|
||||
- Compare alternatives if relevant
|
||||
|
||||
**For Basic Memory context:**
|
||||
```python
|
||||
# Check what we already know
|
||||
mcp__basic-memory__search_notes(
|
||||
query="topic keywords",
|
||||
project="main"
|
||||
)
|
||||
|
||||
# Build context from related notes
|
||||
mcp__basic-memory__build_context(
|
||||
url="memory://related-topic",
|
||||
depth=2,
|
||||
project="main"
|
||||
)
|
||||
```
|
||||
|
||||
### 3. Analyze and Synthesize
|
||||
|
||||
Organize findings into coherent insights:
|
||||
- Identify key concepts and how they relate
|
||||
- Note patterns, trade-offs, and considerations
|
||||
- Highlight what's most relevant to the user's needs
|
||||
- Flag uncertainties or areas needing more investigation
|
||||
|
||||
### 4. Produce the Report
|
||||
|
||||
Create a structured research report:
|
||||
|
||||
```markdown
|
||||
---
|
||||
title: "Research: [Topic]"
|
||||
type: research
|
||||
tags:
|
||||
- research
|
||||
- [topic-tags]
|
||||
---
|
||||
|
||||
# Research: [Topic]
|
||||
|
||||
## Summary
|
||||
|
||||
[2-3 sentence executive summary of findings]
|
||||
|
||||
## Research Question
|
||||
|
||||
[What we set out to understand]
|
||||
|
||||
## Key Findings
|
||||
|
||||
### [Finding 1]
|
||||
[Details, evidence, implications]
|
||||
|
||||
### [Finding 2]
|
||||
[Details, evidence, implications]
|
||||
|
||||
### [Finding 3]
|
||||
[Details, evidence, implications]
|
||||
|
||||
## Analysis
|
||||
|
||||
[Synthesis of findings - patterns, trade-offs, recommendations]
|
||||
|
||||
## Open Questions
|
||||
|
||||
- [Things that need more investigation]
|
||||
- [Uncertainties or assumptions]
|
||||
|
||||
## Sources
|
||||
|
||||
- [Where information came from]
|
||||
- [[Related Note]] - relevant prior knowledge
|
||||
|
||||
## Observations
|
||||
|
||||
- [finding] Key insight discovered #research
|
||||
- [pattern] Pattern identified during research
|
||||
- [recommendation] Suggested approach based on findings
|
||||
|
||||
## Relations
|
||||
|
||||
- researches [[Topic]]
|
||||
- informs [[Decision or Implementation]]
|
||||
- relates-to [[Related Concepts]]
|
||||
```
|
||||
|
||||
### 5. Save to Basic Memory
|
||||
|
||||
```python
|
||||
mcp__basic-memory__write_note(
|
||||
title="Research: [Topic]",
|
||||
content="[Full report content]",
|
||||
folder="research",
|
||||
tags=["research", "topic-tags"],
|
||||
project="main"
|
||||
)
|
||||
```
|
||||
|
||||
## Report Styles
|
||||
|
||||
Adjust based on the research type:
|
||||
|
||||
### Quick Investigation
|
||||
- Focused summary
|
||||
- 2-3 key findings
|
||||
- Direct recommendation
|
||||
- Saved to `research/` folder
|
||||
|
||||
### Deep Dive
|
||||
- Comprehensive analysis
|
||||
- Multiple sections
|
||||
- Detailed evidence
|
||||
- Comparison of options
|
||||
- Saved to `research/` folder
|
||||
|
||||
### Decision Support
|
||||
- Options evaluated
|
||||
- Pros/cons for each
|
||||
- Clear recommendation with rationale
|
||||
- Saved to `decisions/` or `research/` folder
|
||||
|
||||
### Technical Exploration
|
||||
- How it works
|
||||
- Architecture/design
|
||||
- Code examples
|
||||
- Integration considerations
|
||||
- Saved to `research/` folder
|
||||
|
||||
## Best Practices
|
||||
|
||||
1. **Start with what we know** - Check Basic Memory for existing context
|
||||
2. **Be thorough but focused** - Cover the topic well without tangents
|
||||
3. **Cite sources** - Link to where information came from
|
||||
4. **Be honest about uncertainty** - Flag what's unclear or needs verification
|
||||
5. **Make it actionable** - Include recommendations when appropriate
|
||||
6. **Link to related knowledge** - Connect to existing notes
|
||||
7. **Save for future reference** - Always save the report to Basic Memory
|
||||
|
||||
## Example Conversations
|
||||
|
||||
**User:** "Research how other projects handle database migrations"
|
||||
|
||||
**Claude:**
|
||||
1. Searches codebase for migration patterns
|
||||
2. Checks Basic Memory for related decisions
|
||||
3. Looks up best practices online
|
||||
4. Produces report comparing approaches
|
||||
5. Saves to `research/Database Migration Approaches.md`
|
||||
6. Presents summary with recommendation
|
||||
|
||||
**User:** "Investigate the MCP protocol"
|
||||
|
||||
**Claude:**
|
||||
1. Fetches MCP documentation
|
||||
2. Searches for examples in codebase
|
||||
3. Checks Basic Memory for prior context
|
||||
4. Produces comprehensive report on MCP
|
||||
5. Saves to `research/MCP Protocol Overview.md`
|
||||
6. Presents key concepts and how to use them
|
||||
|
||||
**User:** "Look into authentication options for the API"
|
||||
|
||||
**Claude:**
|
||||
1. Researches common auth patterns (JWT, OAuth, API keys)
|
||||
2. Checks existing codebase auth implementation
|
||||
3. Evaluates trade-offs for the use case
|
||||
4. Produces decision-support report
|
||||
5. Saves to `research/API Authentication Options.md`
|
||||
6. Recommends approach with rationale
|
||||
Reference in New Issue
Block a user