feat: v2.0.0 - Domain-based memory + multi-plugin marketplace structure

## Domain-based Memory (v2.0.0)
- Memory split into domains (backend, frontend, database, testing, deployment, global)
- Selective loading via `paths` frontmatter - only relevant memories load
- Automatic domain detection from file paths in conversation
- Auto-generated glob patterns when creating new domains
- Cross-domain analysis in /learn:reflect

## Repository Reorganization
- Restructured for multi-plugin marketplace: plugin/ → plugins/learn/
- Marketplace renamed: romfast-tools → romfast-plugins
- Repository to be renamed on Gitea: claude-learn → claude-plugins

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Claude Agent
2026-01-06 21:45:31 +00:00
parent 30b73ac7e6
commit d6c71536e7
22 changed files with 1192 additions and 716 deletions

134
README.md
View File

@@ -1,127 +1,71 @@
# Claude Learn
# Romfast Claude Code Plugins
A Claude Code plugin for capturing lessons learned during development sessions.
A collection of Claude Code plugins by Romfast Team.
## Features
## Available Plugins
- **Automatic Detection**: Stop hook suggests capturing lessons after significant sessions
- **Pattern & Gotcha Tracking**: Structured format for reusable solutions and problems to avoid
- **Import Support**: Bring in existing memories from other formats
- **Reflection Tools**: Consolidate and promote patterns to CLAUDE.md
| Plugin | Description | Version |
|--------|-------------|---------|
| [learn](./plugins/learn/) | Domain-based memory with selective loading | 2.0.0 |
## Installation
### Option 1: Marketplace (Recommended)
### 1. Add Marketplace
Add to your `~/.claude/settings.json`:
```json
{
"plugin-marketplaces": [
"git@gitea.romfast.ro:romfast/claude-learn.git"
"git@gitea.romfast.ro:romfast/claude-plugins.git"
]
}
```
Then install:
### 2. Install Plugin
```bash
claude plugin install learn@romfast-tools
claude plugin install learn@romfast-plugins
```
### Option 2: Direct from Git
## Plugins
```bash
git clone git@gitea.romfast.ro:romfast/claude-learn.git
claude --plugin-dir /path/to/claude-learn/plugin
```
### learn
## Commands
Captures lessons learned (patterns & gotchas) during development sessions with **domain-based memory** and **selective loading**.
| Command | Description |
|---------|-------------|
| `/learn:analyze` | Analyze conversation and propose lessons |
| `/learn:analyze auto` | Auto-detect all categories |
| `/learn:analyze patterns` | Focus on patterns only |
| `/learn:analyze gotchas` | Focus on gotchas only |
| `/learn:import <file>` | Import from another memory file |
| `/learn:reflect` | Consolidate and clean up memory |
| `/learn:status` | Show memory statistics |
**Features:**
- Automatic session analysis with `/learn:analyze`
- Domain organization (backend, frontend, database, testing, etc.)
- Selective loading via `paths` frontmatter
- Import from other memory formats
- Cross-domain consolidation with `/learn:reflect`
## Usage Flow
[Full documentation →](./plugins/learn/README.md)
## Repository Structure
```
1. Work normally with Claude Code
2. Claude finishes a significant response
3. Stop Hook analyzes (15s)
4. "💡 Run /learn:analyze to capture lessons"
5. User: /learn:analyze
6. Claude lists proposals (patterns, gotchas)
7. User selects: [1, 3, all, none]
8. Claude updates .claude/rules/claude-learn-memory.md
9. Periodically: /learn:reflect for consolidation
claude-plugins/
├── .claude-plugin/
│ └── marketplace.json # Plugin registry
├── plugins/
│ └── learn/ # Learn plugin
│ ├── .claude-plugin/plugin.json
│ ├── commands/
│ ├── hooks/
│ ├── rules/
│ └── templates/
├── README.md # This file
└── CLAUDE.md # Development instructions
```
## Memory File Format
## Adding a New Plugin
The plugin creates and maintains `.claude/rules/claude-learn-memory.md` with this structure:
```markdown
# Claude Learn Memory
## Patterns
### Pattern Title
**Discovered**: 2025-01-06 (feature: user-dashboard)
**Description**: What the pattern does and when to use it
**Example** (`src/components/Dashboard.vue:45-52`):
\```vue
<template>...</template>
\```
**Tags**: vue, components, dashboard
---
## Gotchas
### Gotcha Title
**Discovered**: 2025-01-06 (feature: api-integration)
**Problem**: What went wrong
**Solution**: How to fix it
**Tags**: api, axios, error-handling
---
## Memory Statistics
- **Total Patterns**: 5
- **Total Gotchas**: 3
- **Last Session**: 2025-01-06
- **Sessions Recorded**: 8
```
## Importing Existing Memories
If you have an existing memory file (e.g., from auto-build plugin):
```bash
/learn:import .claude/rules/auto-build-memory.md
```
Supported formats:
- Markdown with `## Patterns` and `## Gotchas` sections
- JSON with `{patterns: [], gotchas: []}` structure
1. Create directory: `plugins/your-plugin/`
2. Add `.claude-plugin/plugin.json` with metadata
3. Add plugin to `marketplace.json`
4. Create commands, hooks, rules as needed
## License