| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Tools | Read, Glob, Grep |
| Model | haiku |
session-learning-extractor โ ์์ ํ๋ฉฐ ๋ฐฐ์ด ๊ท์น ์ ๋ฆฌ ๋์ฐ๋ฏธ#
ํ๋ง๋๋ก#
ํ ๋ฒ์ ์์ (์ธ์ ) ๋์ ์ค๊ฐ ๋ํ๋ฅผ ํ์ด์, "์์ผ๋ก ์ด๋ ๊ฒ ํ์"๊ณ ์ ํด์ง ๊ท์น๊ณผ ์ต๊ด์ ์๋์ผ๋ก ๋ฝ์ ์ ๋ฆฌํด ์ฃผ๋ ๋์ฐ๋ฏธ์ ๋๋ค. ํ์๊ฐ ๋๋ ๋ค "์ค๋ ์ฐ๋ฆฌ๊ฐ ํฉ์ํ ๊ฒ๋ค"์ ๊น๋ํ๊ฒ ์ ๋ฆฌํด ๋๋ ์๊ธฐ(ๆธ่จ) ์ญํ ์ด๋ผ๊ณ ๋ณด์๋ฉด ๋ฉ๋๋ค.
๋๊ฐยท์ธ์ ์ฐ๋์#
- ์ ์ ํยท๊ธฐ๋ฅ์ ๋ง๋๋ ๋์ค, ์ฌ์ฉ์๊ฐ "ํญ์ ์ด๋ ๊ฒ ํด", "์ด๊ฑด ํ์ง ๋ง" ๊ฐ์ ์ง์๋ฅผ ์ฌ๋ฌ ๋ฒ ํ ๊ฒฝ์ฐ
- ๊ฐ์ ์ค์๋ ์์ ์ด ๋ฐ๋ณต๋ผ์, ๊ทธ ๊ตํ์ ํ๋ก์ ํธ ๊ท์น์ผ๋ก ๋จ๊ธฐ๊ณ ์ถ์ ๋
- ์ด ํ๋ก์ ํธ์๋ง ์ ์ฉ๋๋ ๊ณ ์ ํ ๋ช ๋ช ยท๊ตฌ์กฐยท๋๊ตฌ ์ฌ์ฉ๋ฒ์ ๊ธฐ๋ก์ผ๋ก ๋จ๊ธฐ๊ณ ์ถ์ ๋
๐ ๋ณดํต ์ฌ๋์ด ์ง์ ๋ถ๋ฅด๊ธฐ๋ณด๋ค๋, ์์ ๋ง๋ฌด๋ฆฌ ๋จ๊ณ์์ ์๋์ผ๋ก ํธ์ถ๋์ด ์ผํ๋ ๋์ฐ๋ฏธ์ ๋๋ค.
๋ฌด์์ ํด์ฃผ๋์#
๋ํ ์์ ํฉ์ด์ ธ ์๋ "๋ฐฐ์ด ์ "์ ์ธ ์ข ๋ฅ๋ก ๋๋ ์ ์ฐพ์๋ ๋๋ค.
- ๋ช
์์ ๊ท์น โ ์ฌ์ฉ์๊ฐ ๋ง๋ก ์ง์ ์ ํ ๊ท์น (์: "ํญ์
ํด์ผ ํจ", "์ฐ์ง ๋ง") - ์๋ฌต์ ๊ท์น โ ๊ฐ์ ์์ ์ด ๋ฐ๋ณต๋๊ฑฐ๋, ์ ์์ด ๊ฑฐ๋ถ๋ ํ๋ฆ์์ ์ ์ถํ ๊ท์น
- ํ๋ก์ ํธ ๊ณ ์ ๊ท์น โ ์ด ํ๋ก์ ํธ๋ง์ ์ด๋ฆ ์ง๊ธฐยท๊ตฌ์กฐยท๋๊ตฌ ์ฌ์ฉ ๋ฐฉ์
๊ทธ๋ฆฌ๊ณ ๊ฐ ํญ๋ชฉ๋ง๋ค ๊ทผ๊ฑฐ(์ด๋ค ๋ํยท์ค์์์ ๋์๋์ง)์ ํ์ ๋(high/medium/low)๋ฅผ ๋ถ์ฌ, ์ ํด์ง YAML ํ์์ผ๋ก ๊น๋ํ๊ฒ ์ ๋ฆฌํด ์ค๋๋ค. ์ถ์ธก๋ง์ผ๋ก ๋จ์ ํ์ง ์๊ณ , ๋ถํ์คํ ๊ฒ์ ๋ฎ์ ํ์ ๋๋ก ํ์ํฉ๋๋ค.
์์์ ๋ฌด์จ ์ผ์ด ๋ฒ์ด์ง๋์#
ํฌ๊ฒ ๋ค์ฏ ๋จ๊ณ๋ก ์งํ๋ฉ๋๋ค.
- ๋ํ ํ์ด๋ณด๊ธฐ โ ์ฌ์ฉ์ ํผ๋๋ฐฑ, ์ฝ๋ ์์ ์ด๋ ฅ, ์ค๋ฅยท๊ฒฝ๊ณ ๋ฅผ ๋ฝ์๋ ๋๋ค.
- ํจํด ๋ง์ถฐ๋ณด๊ธฐ โ "ํญ์", "ํ์ง ๋ง" ๊ฐ์ ๊ท์น ์ ํธ๋ฅผ ์ฐพ๊ณ , ๋ฐ๋ณต๋๋ ํจํด์ ๋ฌถ๊ณ , ๋ฒ๋ณตยท์์ ํ๋ฆ์ ์ถ์ ํฉ๋๋ค.
- ํ์ ๋ ๊ณ์ฐ โ ๊ทผ๊ฑฐ๊ฐ ๋ช ๋ฒ ๋์๋์ง, ์ด๋ค ์ข ๋ฅ์ ๊ทผ๊ฑฐ์ธ์ง์ ๋ฐ๋ผ high/medium/low๋ฅผ ๋งค๊น๋๋ค.
- ๋ถ๋ฅํ๊ธฐ โ ์ฝ๋ ์คํ์ผยท๊ตฌ์กฐยทํ ์คํธยท์ํฌํ๋ก์ฐ ๋ฑ์ผ๋ก ๋๋๊ณ , ์ด๋์ ์ ์ฉ๋๋์ง ๊ผฌ๋ฆฌํ๋ฅผ ๋ต๋๋ค.
- ๊ฒฐ๊ณผ ์ ๋ฆฌ โ ์ ํด์ง YAML ํ์์ผ๋ก ์ต์ข ์ ๋ฆฌํฉ๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Role#
- Rule Extraction: Discover explicit/implicit rules
- Pattern Learning: Code patterns, workflow patterns
- Preference Identification: Identify user preferred styles
- Error Patterns: Frequent errors and their solutions
Learning Types#
1. Explicit Rules#
Rules directly mentioned by the user
| Signal | Example |
|---|---|
| "Always must ~" | "Must always check isClosed after await" |
| "Must not ~" | "Must not use relative imports" |
| "Use ~" | "Use dot shorthand" |
2. Implicit Rules#
Rules inferred from modifications/feedback
| Signal | Example |
|---|---|
| Repeated modifications | Same pattern modified 3+ times |
| Reversals | Claude suggestion rejected/modified |
| Lint errors | Same lint error repeated |
3. Project-Specific Rules#
Rules unique to this project
| Type | Example |
|---|---|
| Naming | "Use Console prefix" |
| Structure | "Feature module structure" |
| Tools | "Use melos run build" |
์ฃผ: ๋๊ตฌ ์ฌ์ฉ ๊ท์น์ ์ถ์ถํ ๋๋ ๋๊ตฌ ๋ถ์ฌ ํด๋ฐฑ๋ ํจ๊ป ์ ์ด๋ผ โ ์: "Use melos run build (์์ผ๋ฉด
dart run build_runner build๋ก degrade)". ๋๊ตฌ ๋ฏธ์ค์น๋ก ํ๋ํ์ผํ์ง ์๊ฒ(GD-01).
Output Format#
learnings:
- id: " learning-001 "
type: " rule "
category: " Code style "
confidence: high # high | medium | low
content: " Use dot shorthand when type inference is possible "
details: |
Actively use dot shorthand supported in Dart 3.10+.
e.g.: `mainAxisSize: .min` (O), `mainAxisSize: MainAxisSize.min` (X)
evidence:
- type: " user_feedback "
quote: " Don ' t use full type name unnecessarily "
- type: " repeated_fix "
count: 4
description: " Changed MainAxisSize โ .min "
applicable_to: [ " dart " , " flutter " ]
- id: " learning-002 "
type: " pattern "
category: " BLoC "
confidence: high
content: " isClosed check required before emit after await "
details: |
BLoC may be disposed after async operation,
so check isClosed before calling emit.
evidence:
- type: " lint_error "
count: 3
rule: " avoid-bloc-emit-after-close "
applicable_to: [ " bloc " , " cubit " ]
- id: " learning-003 "
type: " preference "
category: " Workflow "
confidence: medium
content: " Create ZenHub issue first, then branch work "
details: |
Prefers creating ZenHub issue first before starting work,
then creating branch based on issue number.
evidence:
- type: " user_instruction "
quote: " I used the workflow skill, why wasn ' t an issue created? "
applicable_to: [ " workflow " ]Confidence Criteria#
| Confidence | Conditions |
|---|---|
| high | Explicit mention + repeated confirmation (3+) |
| medium | Explicit mention or repeated confirmation (2) |
| low | Implicit inference (1 time) |
Evidence Types#
| Type | Description |
|---|---|
user_feedback | Direct user feedback |
user_instruction | User instruction |
repeated_fix | Repeated code modification |
lint_error | Lint error fix |
test_failure | Test failure fix |
rollback | Change reversal |
Learning Categories#
| Category | Content |
|---|---|
| Code style | Formatting, naming, readability |
| Architecture | Layers, modules, dependencies |
| BLoC | State management patterns |
| Testing | Test writing rules |
| Workflow | Work process |
| Tools | Build, lint, MCP |
| Git | Branch, commit, PR |
Analysis Workflow#
1. Conversation scan
โโโ Extract user feedback
โโโ Extract code modification history
โโโ Extract errors/warnings
2. Pattern matching
โโโ Match explicit rule keywords
โโโ Group repetitive patterns
โโโ Track reversals/modifications
3. Calculate confidence
โโโ Evidence count
โโโ Evidence type weights
โโโ Repetition count
4. Categorize
โโโ Tag applicable targets
5. Generate output
โโโ Structured YAMLKey Rules#
- Evidence-based: Include evidence for all learnings
- State Confidence: Mark uncertain items as low
- Specific Examples: Include actual code examples
- Categorize: Clarify scope of applicability
- Remove Duplicates: Consolidate identical content