feat(learn): Minimalist memory format v3.0 - 60% size reduction
BREAKING CHANGE: New compact entry format
- Header: `## {P|G}: {Title}` (P=Pattern, G=Gotcha)
- Metadata: `@YYYY-MM-DD #tag1 #tag2 | source:confidence[:reinforced]`
- Max 3 inline tags, no separators, no statistics section
Removed verbose fields: Discovered, Source, Confidence, Trigger
Statistics now calculated dynamically by /learn:status
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,60 +1,17 @@
|
||||
---
|
||||
paths: {DOMAIN_PATTERNS}
|
||||
---
|
||||
# Claude Learn: {DOMAIN_NAME}
|
||||
<!-- paths: {DOMAIN_PATTERNS} -->
|
||||
|
||||
# Claude Learn Memory: {DOMAIN_NAME}
|
||||
|
||||
Patterns și Gotchas pentru domeniul **{DOMAIN_NAME}**.
|
||||
|
||||
---
|
||||
|
||||
## Patterns
|
||||
|
||||
<!--
|
||||
Format pentru patterns:
|
||||
|
||||
### Titlu Descriptiv
|
||||
**Discovered**: YYYY-MM-DD (feature: context)
|
||||
**Source**: explicit | **Confidence**: high | **Reinforced**: 0
|
||||
**Trigger**: "fraza originală care a declanșat salvarea"
|
||||
**Description**: Descriere clară a pattern-ului
|
||||
|
||||
**Example** (`file:lines`):
|
||||
```language
|
||||
cod exemplu
|
||||
<!-- Format minimalist v3.0
|
||||
## P: Titlu pattern (max 60 char)
|
||||
@YYYY-MM-DD #tag1 #tag2 | source:confidence[:reinforced]
|
||||
Descriere concisă 1-2 propoziții.
|
||||
```lang
|
||||
cod opțional
|
||||
```
|
||||
|
||||
**Tags**: tag1, tag2, tag3
|
||||
|
||||
---
|
||||
## G: Titlu gotcha
|
||||
@YYYY-MM-DD #tag1 #tag2 | source:confidence
|
||||
**P**: Problema scurtă
|
||||
**S**: Soluția scurtă
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
## Gotchas
|
||||
|
||||
<!--
|
||||
Format pentru gotchas:
|
||||
|
||||
### Titlu Descriptiv
|
||||
**Discovered**: YYYY-MM-DD (feature: context)
|
||||
**Source**: explicit | **Confidence**: high | **Reinforced**: 0
|
||||
**Trigger**: "fraza originală care a declanșat salvarea"
|
||||
**Problem**: Ce a mers prost
|
||||
**Solution**: Cum s-a rezolvat
|
||||
|
||||
**Tags**: tag1, tag2
|
||||
|
||||
---
|
||||
-->
|
||||
|
||||
---
|
||||
|
||||
## Domain Statistics
|
||||
|
||||
- **Total Patterns**: 0
|
||||
- **Total Gotchas**: 0
|
||||
- **Total Reinforcements**: 0
|
||||
- **Last Session**: -
|
||||
- **Sessions Recorded**: 0
|
||||
- **Last Cleanup**: -
|
||||
|
||||
@@ -1,77 +1,34 @@
|
||||
{
|
||||
"format_version": "3.0",
|
||||
"pattern": {
|
||||
"title": "",
|
||||
"discovered": "",
|
||||
"feature": "",
|
||||
"domain": "",
|
||||
"description": "",
|
||||
"example": {
|
||||
"file": "",
|
||||
"lines": "",
|
||||
"language": "",
|
||||
"code": ""
|
||||
},
|
||||
"tags": [],
|
||||
"type": "P",
|
||||
"title": "max 60 char, imperativ",
|
||||
"date": "YYYY-MM-DD",
|
||||
"tags": ["max", "3", "tags"],
|
||||
"source": "explicit|inferred|repeated",
|
||||
"confidence": "high|medium|low",
|
||||
"confidence": "high|med|low",
|
||||
"reinforced": 0,
|
||||
"last_reinforced": "",
|
||||
"trigger": ""
|
||||
"description": "1-2 propoziții",
|
||||
"example": "opțional, cod cu ```lang"
|
||||
},
|
||||
"gotcha": {
|
||||
"title": "",
|
||||
"discovered": "",
|
||||
"feature": "",
|
||||
"domain": "",
|
||||
"problem": "",
|
||||
"solution": "",
|
||||
"tags": [],
|
||||
"type": "G",
|
||||
"title": "max 60 char",
|
||||
"date": "YYYY-MM-DD",
|
||||
"tags": ["max", "3", "tags"],
|
||||
"source": "explicit|inferred|repeated",
|
||||
"confidence": "high|medium|low",
|
||||
"confidence": "high|med|low",
|
||||
"reinforced": 0,
|
||||
"last_reinforced": "",
|
||||
"trigger": ""
|
||||
},
|
||||
"statistics": {
|
||||
"total_patterns": 0,
|
||||
"total_gotchas": 0,
|
||||
"total_reinforcements": 0,
|
||||
"last_session": "",
|
||||
"sessions_recorded": 0,
|
||||
"last_cleanup": ""
|
||||
"problem": "scurt",
|
||||
"solution": "scurt"
|
||||
},
|
||||
"metadata_format": "@{date} #{tag1} #{tag2} | {source}:{confidence}[:{reinforced}]",
|
||||
"domains": {
|
||||
"backend": {
|
||||
"patterns": ["src/api/**/*.ts", "src/server/**/*.ts", "services/**/*"]
|
||||
},
|
||||
"frontend": {
|
||||
"patterns": ["src/components/**/*.tsx", "src/pages/**/*.tsx", "**/*.css"]
|
||||
},
|
||||
"database": {
|
||||
"patterns": ["src/db/**/*.ts", "migrations/**/*.ts", "**/*.sql"]
|
||||
},
|
||||
"testing": {
|
||||
"patterns": ["**/*.test.ts", "**/*.spec.ts", "tests/**/*"]
|
||||
},
|
||||
"deployment": {
|
||||
"patterns": ["Dockerfile", "docker-compose.yml", "**/*.yml", "infra/**/*"]
|
||||
},
|
||||
"global": {
|
||||
"patterns": []
|
||||
}
|
||||
},
|
||||
"_metadata_fields": {
|
||||
"source": {
|
||||
"explicit": "Utilizatorul a cerut explicit salvarea (ține minte, remember)",
|
||||
"inferred": "Dedus din conversație (eroare rezolvată, pattern detectat)",
|
||||
"repeated": "Corecție repetată de 2+ ori pe același subiect"
|
||||
},
|
||||
"confidence": {
|
||||
"high": "Semnal puternic (comandă explicită, corecție repetată)",
|
||||
"medium": "Semnal moderat (preferință inferată, referință istorică)",
|
||||
"low": "Semnal slab (one-time fix posibil util)"
|
||||
},
|
||||
"reinforced": "Numărul de ori când entry-ul a fost folosit/validat în sesiuni ulterioare",
|
||||
"trigger": "Fraza originală care a declanșat salvarea (pentru audit/cleanup)"
|
||||
"backend": ["src/api/**/*.ts", "src/server/**/*.ts", "services/**/*"],
|
||||
"frontend": ["src/components/**/*.tsx", "src/pages/**/*.tsx", "**/*.css"],
|
||||
"database": ["src/db/**/*.ts", "migrations/**/*.ts", "**/*.sql"],
|
||||
"testing": ["**/*.test.ts", "**/*.spec.ts", "tests/**/*"],
|
||||
"deployment": ["Dockerfile", "docker-compose.yml", "**/*.yml", "infra/**/*"],
|
||||
"global": []
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user