LogoSkills

session-learning-extractor

Extracts rules/patterns learned during sessions. Used for documenting project-specific rules

ํ•ญ๋ชฉ๋‚ด์šฉ
ToolsRead, Glob, Grep
Modelhaiku

session-learning-extractor โ€” ์ž‘์—…ํ•˜๋ฉฐ ๋ฐฐ์šด ๊ทœ์น™ ์ •๋ฆฌ ๋„์šฐ๋ฏธ#

ํ•œ๋งˆ๋””๋กœ#

ํ•œ ๋ฒˆ์˜ ์ž‘์—…(์„ธ์…˜) ๋™์•ˆ ์˜ค๊ฐ„ ๋Œ€ํ™”๋ฅผ ํ›‘์–ด์„œ, "์•ž์œผ๋กœ ์ด๋ ‡๊ฒŒ ํ•˜์ž"๊ณ  ์ •ํ•ด์ง„ ๊ทœ์น™๊ณผ ์Šต๊ด€์„ ์ž๋™์œผ๋กœ ๋ฝ‘์•„ ์ •๋ฆฌํ•ด ์ฃผ๋Š” ๋„์šฐ๋ฏธ์ž…๋‹ˆ๋‹ค. ํšŒ์˜๊ฐ€ ๋๋‚œ ๋’ค "์˜ค๋Š˜ ์šฐ๋ฆฌ๊ฐ€ ํ•ฉ์˜ํ•œ ๊ฒƒ๋“ค"์„ ๊น”๋”ํ•˜๊ฒŒ ์ •๋ฆฌํ•ด ๋‘๋Š” ์„œ๊ธฐ(ๆ›ธ่จ˜) ์—ญํ• ์ด๋ผ๊ณ  ๋ณด์‹œ๋ฉด ๋ฉ๋‹ˆ๋‹ค.

๋ˆ„๊ฐ€ยท์–ธ์ œ ์“ฐ๋‚˜์š”#

  • ์ƒˆ ์ œํ’ˆยท๊ธฐ๋Šฅ์„ ๋งŒ๋“œ๋Š” ๋„์ค‘, ์‚ฌ์šฉ์ž๊ฐ€ "ํ•ญ์ƒ ์ด๋ ‡๊ฒŒ ํ•ด", "์ด๊ฑด ํ•˜์ง€ ๋งˆ" ๊ฐ™์€ ์ง€์‹œ๋ฅผ ์—ฌ๋Ÿฌ ๋ฒˆ ํ•œ ๊ฒฝ์šฐ
  • ๊ฐ™์€ ์‹ค์ˆ˜๋‚˜ ์ˆ˜์ •์ด ๋ฐ˜๋ณต๋ผ์„œ, ๊ทธ ๊ตํ›ˆ์„ ํ”„๋กœ์ ํŠธ ๊ทœ์น™์œผ๋กœ ๋‚จ๊ธฐ๊ณ  ์‹ถ์„ ๋•Œ
  • ์ด ํ”„๋กœ์ ํŠธ์—๋งŒ ์ ์šฉ๋˜๋Š” ๊ณ ์œ ํ•œ ๋ช…๋ช…ยท๊ตฌ์กฐยท๋„๊ตฌ ์‚ฌ์šฉ๋ฒ•์„ ๊ธฐ๋ก์œผ๋กœ ๋‚จ๊ธฐ๊ณ  ์‹ถ์„ ๋•Œ

๐Ÿ‘‰ ๋ณดํ†ต ์‚ฌ๋žŒ์ด ์ง์ ‘ ๋ถ€๋ฅด๊ธฐ๋ณด๋‹ค๋Š”, ์ž‘์—… ๋งˆ๋ฌด๋ฆฌ ๋‹จ๊ณ„์—์„œ ์ž๋™์œผ๋กœ ํ˜ธ์ถœ๋˜์–ด ์ผํ•˜๋Š” ๋„์šฐ๋ฏธ์ž…๋‹ˆ๋‹ค.

๋ฌด์—‡์„ ํ•ด์ฃผ๋‚˜์š”#

๋Œ€ํ™” ์†์— ํฉ์–ด์ ธ ์žˆ๋Š” "๋ฐฐ์šด ์ "์„ ์„ธ ์ข…๋ฅ˜๋กœ ๋‚˜๋ˆ ์„œ ์ฐพ์•„๋ƒ…๋‹ˆ๋‹ค.

  • ๋ช…์‹œ์  ๊ทœ์น™ โ€” ์‚ฌ์šฉ์ž๊ฐ€ ๋ง๋กœ ์ง์ ‘ ์ •ํ•œ ๊ทœ์น™ (์˜ˆ: "ํ•ญ์ƒ ํ•ด์•ผ ํ•จ", " ์“ฐ์ง€ ๋งˆ")
  • ์•”๋ฌต์  ๊ทœ์น™ โ€” ๊ฐ™์€ ์ˆ˜์ •์ด ๋ฐ˜๋ณต๋˜๊ฑฐ๋‚˜, ์ œ์•ˆ์ด ๊ฑฐ๋ถ€๋œ ํ๋ฆ„์—์„œ ์œ ์ถ”ํ•œ ๊ทœ์น™
  • ํ”„๋กœ์ ํŠธ ๊ณ ์œ  ๊ทœ์น™ โ€” ์ด ํ”„๋กœ์ ํŠธ๋งŒ์˜ ์ด๋ฆ„ ์ง“๊ธฐยท๊ตฌ์กฐยท๋„๊ตฌ ์‚ฌ์šฉ ๋ฐฉ์‹

๊ทธ๋ฆฌ๊ณ  ๊ฐ ํ•ญ๋ชฉ๋งˆ๋‹ค ๊ทผ๊ฑฐ(์–ด๋–ค ๋Œ€ํ™”ยท์‹ค์ˆ˜์—์„œ ๋‚˜์™”๋Š”์ง€)์™€ ํ™•์‹ ๋„(high/medium/low)๋ฅผ ๋ถ™์—ฌ, ์ •ํ•ด์ง„ YAML ํ˜•์‹์œผ๋กœ ๊น”๋”ํ•˜๊ฒŒ ์ •๋ฆฌํ•ด ์ค๋‹ˆ๋‹ค. ์ถ”์ธก๋งŒ์œผ๋กœ ๋‹จ์ •ํ•˜์ง€ ์•Š๊ณ , ๋ถˆํ™•์‹คํ•œ ๊ฒƒ์€ ๋‚ฎ์€ ํ™•์‹ ๋„๋กœ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.

์•ˆ์—์„œ ๋ฌด์Šจ ์ผ์ด ๋ฒŒ์–ด์ง€๋‚˜์š”#

ํฌ๊ฒŒ ๋‹ค์„ฏ ๋‹จ๊ณ„๋กœ ์ง„ํ–‰๋ฉ๋‹ˆ๋‹ค.

  1. ๋Œ€ํ™” ํ›‘์–ด๋ณด๊ธฐ โ€” ์‚ฌ์šฉ์ž ํ”ผ๋“œ๋ฐฑ, ์ฝ”๋“œ ์ˆ˜์ • ์ด๋ ฅ, ์˜ค๋ฅ˜ยท๊ฒฝ๊ณ ๋ฅผ ๋ฝ‘์•„๋ƒ…๋‹ˆ๋‹ค.
  2. ํŒจํ„ด ๋งž์ถฐ๋ณด๊ธฐ โ€” "ํ•ญ์ƒ", "ํ•˜์ง€ ๋งˆ" ๊ฐ™์€ ๊ทœ์น™ ์‹ ํ˜ธ๋ฅผ ์ฐพ๊ณ , ๋ฐ˜๋ณต๋˜๋Š” ํŒจํ„ด์„ ๋ฌถ๊ณ , ๋ฒˆ๋ณตยท์ˆ˜์ • ํ๋ฆ„์„ ์ถ”์ ํ•ฉ๋‹ˆ๋‹ค.
  3. ํ™•์‹ ๋„ ๊ณ„์‚ฐ โ€” ๊ทผ๊ฑฐ๊ฐ€ ๋ช‡ ๋ฒˆ ๋‚˜์™”๋Š”์ง€, ์–ด๋–ค ์ข…๋ฅ˜์˜ ๊ทผ๊ฑฐ์ธ์ง€์— ๋”ฐ๋ผ high/medium/low๋ฅผ ๋งค๊น๋‹ˆ๋‹ค.
  4. ๋ถ„๋ฅ˜ํ•˜๊ธฐ โ€” ์ฝ”๋“œ ์Šคํƒ€์ผยท๊ตฌ์กฐยทํ…Œ์ŠคํŠธยท์›Œํฌํ”Œ๋กœ์šฐ ๋“ฑ์œผ๋กœ ๋‚˜๋ˆ„๊ณ , ์–ด๋””์— ์ ์šฉ๋˜๋Š”์ง€ ๊ผฌ๋ฆฌํ‘œ๋ฅผ ๋‹ต๋‹ˆ๋‹ค.
  5. ๊ฒฐ๊ณผ ์ •๋ฆฌ โ€” ์ •ํ•ด์ง„ YAML ํ˜•์‹์œผ๋กœ ์ตœ์ข… ์ •๋ฆฌํ•ฉ๋‹ˆ๋‹ค.

โš™๏ธ ์ƒ์„ธ ์˜ต์…˜ยท์‹คํ–‰ ๋ช…์„ธ (๊ฐœ๋ฐœ์ž / AI ์—์ด์ „ํŠธ์šฉ)

Role#

  1. Rule Extraction: Discover explicit/implicit rules
  2. Pattern Learning: Code patterns, workflow patterns
  3. Preference Identification: Identify user preferred styles
  4. Error Patterns: Frequent errors and their solutions

Learning Types#

1. Explicit Rules#

Rules directly mentioned by the user

SignalExample
"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

SignalExample
Repeated modificationsSame pattern modified 3+ times
ReversalsClaude suggestion rejected/modified
Lint errorsSame lint error repeated

3. Project-Specific Rules#

Rules unique to this project

TypeExample
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#

ConfidenceConditions
highExplicit mention + repeated confirmation (3+)
mediumExplicit mention or repeated confirmation (2)
lowImplicit inference (1 time)

Evidence Types#

TypeDescription
user_feedbackDirect user feedback
user_instructionUser instruction
repeated_fixRepeated code modification
lint_errorLint error fix
test_failureTest failure fix
rollbackChange reversal

Learning Categories#

CategoryContent
Code styleFormatting, naming, readability
ArchitectureLayers, modules, dependencies
BLoCState management patterns
TestingTest writing rules
WorkflowWork process
ToolsBuild, lint, MCP
GitBranch, 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 YAML

Key Rules#

  1. Evidence-based: Include evidence for all learnings
  2. State Confidence: Mark uncertain items as low
  3. Specific Examples: Include actual code examples
  4. Categorize: Clarify scope of applicability
  5. Remove Duplicates: Consolidate identical content