LogoSkills

session-duplicate-checker

Checks and resolves duplicate/conflicting document updates. Used for final cleanup in Phase 2

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

session-duplicate-checker โ€” ๋ฌธ์„œ ์ •๋ฆฌ ๋‹ด๋‹น ๊ฒ€์ˆ˜์›#

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

์—ฌ๋Ÿฌ ๋ช…์ด ๋”ฐ๋กœ๋”ฐ๋กœ ์จ๋‚ธ ํšŒ์˜๋ก์„ ํ•œ ์‚ฌ๋žŒ์ด ๋ชจ์•„, ๊ฐ™์€ ๋‚ด์šฉ์€ ํ•ฉ์น˜๊ณ  ์„œ๋กœ ์–ด๊ธ‹๋‚˜๋Š” ๋‚ด์šฉ์€ ๊ตํ†ต์ •๋ฆฌํ•ด์„œ ๊น”๋”ํ•œ ์ตœ์ข…๋ณธ ํ•˜๋‚˜๋กœ ๋งŒ๋“ค์–ด ์ฃผ๋Š” ๊ฒ€์ˆ˜์›์ž…๋‹ˆ๋‹ค.

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

  • ์„ธ์…˜ ๋งˆ๋ฌด๋ฆฌ ์ •๋ฆฌ ์ž‘์—…์˜ 2๋‹จ๊ณ„(Phase 2) ๋งˆ์ง€๋ง‰ ์ฒญ์†Œ ์‹œ์ ์— ์ž๋™์œผ๋กœ ๋™์ž‘ํ•ฉ๋‹ˆ๋‹ค.
  • ์•ž์„  1๋‹จ๊ณ„์—์„œ 4๊ฐœ์˜ ๋„์šฐ๋ฏธ(๋ฌธ์„œ ์—…๋ฐ์ดํŠธยท์ž๋™ํ™” ํƒ์ง€ยทํ•™์Šต ์ถ”์ถœยทํ›„์† ์ž‘์—… ์ œ์•ˆ)๊ฐ€ ์ œ๊ฐ๊ฐ ๋‚ด๋†“์€ ๊ฒฐ๊ณผ๋ฅผ ํ•˜๋‚˜๋กœ ํ•ฉ์ณ์•ผ ํ•  ๋•Œ ์“ฐ์ž…๋‹ˆ๋‹ค.

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

  • ์ค‘๋ณต ์ œ๊ฑฐ: ์—ฌ๋Ÿฌ ๋„์šฐ๋ฏธ๊ฐ€ ๋˜‘๊ฐ™์ด ์ œ์•ˆํ•œ ๋‚ด์šฉ์„ ํ•˜๋‚˜๋กœ ํ•ฉ์นฉ๋‹ˆ๋‹ค.
  • ์ถฉ๋Œ ํ•ด๊ฒฐ: ์„œ๋กœ ๋ฐ˜๋Œ€๋˜๋Š” ์ œ์•ˆ(์˜ˆ: ํ•œ์ชฝ์€ "์•ž์—", ํ•œ์ชฝ์€ "๋’ค์—")์„ ์ •ํ•ด์ง„ ์šฐ์„ ์ˆœ์œ„์— ๋”ฐ๋ผ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค.
  • ์ผ๊ด€์„ฑ ์œ ์ง€: ๊ธฐ์กด ๋ฌธ์„œ์˜ ์Šคํƒ€์ผ๊ณผ ๊ทœ์น™(CLAUDE.md ๋“ฑ)์„ ๊นจ๋œจ๋ฆฌ์ง€ ์•Š๋„๋ก ๋งž์ถฅ๋‹ˆ๋‹ค.
  • ์ตœ์ข… ๋ณ€๊ฒฝ์•ˆ ์ •๋ฆฌ: ์‹ค์ œ๋กœ ์–ด๋–ค ํŒŒ์ผ์˜ ์–ด๋А ๋ถ€๋ถ„์„ ์–ด๋–ป๊ฒŒ ๊ณ ์น ์ง€ ๋ฏธ๋ฆฌ๋ณด๊ธฐ์™€ ํ•จ๊ป˜ ์ •๋ฆฌํ•ด ์ค๋‹ˆ๋‹ค. ์˜ˆ: CLAUDE.md, .claude/rules/bloc-patterns.md.

์–ด๋–ป๊ฒŒ ์“ฐ๋‚˜์š”#

์ด ์—์ด์ „ํŠธ๋Š” ์„ธ์…˜ ์ •๋ฆฌ ํ๋ฆ„ ์•ˆ์—์„œ ์ž๋™์œผ๋กœ ํ˜ธ์ถœ๋˜๋ฉฐ, 1๋‹จ๊ณ„ ๋„์šฐ๋ฏธ 4๊ฐœ์˜ ๊ฒฐ๊ณผ๋ฅผ ์ž…๋ ฅ์œผ๋กœ ๋ฐ›์•„ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค. ๋ณ„๋„์˜ ์˜ต์…˜ ํ”Œ๋ž˜๊ทธ๋Š” ์—†์Šต๋‹ˆ๋‹ค.

# ์ž…๋ ฅ์œผ๋กœ ๋“ค์–ด์˜ค๋Š” 1๋‹จ๊ณ„(Phase 1) ๊ฒฐ๊ณผ 4์ข…
doc-updater          # ๋ฌธ์„œ ์—…๋ฐ์ดํŠธ ์ œ์•ˆ
automation-scout     # ์ž๋™ํ™” ํŒจํ„ด ์ œ์•ˆ
learning-extractor   # ํ•™์Šตํ•œ ๋‚ด์šฉ
followup-suggester   # ํ›„์† ์ž‘์—… ์ œ์•ˆ

์ฒ˜๋ฆฌ๊ฐ€ ๋๋‚˜๋ฉด ์•„๋ž˜์ฒ˜๋Ÿผ "๋ช‡ ๊ฐœ๋ฅผ ํ•ฉ์น˜๊ณ  ๋ช‡ ๊ฐœ์˜ ์ถฉ๋Œ์„ ํ•ด๊ฒฐํ–ˆ๋Š”์ง€" ์š”์•ฝ๊ณผ ์ตœ์ข… ๋ณ€๊ฒฝ์•ˆ์ด ์ •๋ฆฌ๋˜์–ด ๋‚˜์˜ต๋‹ˆ๋‹ค.

deduplication_result:
  summary:
    total_inputs: 15
    duplicates_found: 3
    duplicates_merged: 3
    conflicts_found: 1
    conflicts_resolved: 1

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

  1. ๋ชจ์œผ๊ธฐ โ€” 1๋‹จ๊ณ„ ๋„์šฐ๋ฏธ 4๊ฐœ์˜ ๊ฒฐ๊ณผ๋ฅผ ํ•œ๊ณณ์— ๋ชจ์๋‹ˆ๋‹ค.
  2. ํ˜•์‹ ํ†ต์ผ โ€” ์ œ๊ฐ๊ฐ์ธ ํ˜•์‹์„ ํ•˜๋‚˜์˜ ํ†ต์ผ๋œ ๋ชจ์–‘์œผ๋กœ ๋ฐ”๊ฟ‰๋‹ˆ๋‹ค.
  3. ์ค‘๋ณต ์ฐพ๊ธฐ โ€” ์™„์ „ํžˆ ๊ฐ™์€ ๊ฒƒ, ํ‘œํ˜„๋งŒ ๋‹ค๋ฅธ ๊ฒƒ, ์ผ๋ถ€๋งŒ ๊ฒน์น˜๋Š” ๊ฒƒ์„ ๋ชจ๋‘ ๊ฐ€๋ ค๋ƒ…๋‹ˆ๋‹ค(์œ ์‚ฌ๋„ ๊ธฐ์ค€ 0.8).
  4. ์ถฉ๋Œ ์ฐพ๊ธฐ โ€” ์ •๋ฐ˜๋Œ€ ๋‚ด์šฉ์ด๋‚˜ ์šฐ์„ ์ˆœ์œ„๊ฐ€ ์–ด๊ธ‹๋‚˜๋Š” ํ•ญ๋ชฉ์„ ์ฐพ์Šต๋‹ˆ๋‹ค.
  5. ์ •๋ฆฌํ•˜๊ธฐ โ€” ์ค‘๋ณต์€ ํ•ฉ์น˜๊ณ , ์ถฉ๋Œ์€ ์ •ํ•ด์ง„ ์šฐ์„ ์ˆœ์œ„๋กœ ๊ฒฐ์ •ํ•ฉ๋‹ˆ๋‹ค(๊ธฐ์กด ๊ทœ์น™์ด ์šฐ์„ ).
  6. ๊ฒ€์ˆ˜ โ€” ์ฒดํฌ๋ฆฌ์ŠคํŠธ๋กœ ์ผ๊ด€์„ฑยท๋งํฌยท๋ฌธ๋ฒ•์„ ํ™•์ธํ•ฉ๋‹ˆ๋‹ค.
  7. ์ตœ์ข…์•ˆ ๋งŒ๋“ค๊ธฐ โ€” ์–ด๋–ค ํŒŒ์ผ์„ ์–ด๋–ป๊ฒŒ ๊ณ ์น ์ง€ ์ตœ์ข… ๋ณ€๊ฒฝ์•ˆ์„ ๋‚ด๋†“์Šต๋‹ˆ๋‹ค.

์ถฉ๋Œ์ด ์ƒ๊ธฐ๋ฉด ๋‹ค์Œ ์ˆœ์„œ๋กœ ๋ˆ„๊ตฌ ๋ง์ด ๋งž๋Š”์ง€ ์ •ํ•ฉ๋‹ˆ๋‹ค: โ‘  ๊ธฐ์กด CLAUDE.md ๊ทœ์น™ โ†’ โ‘ก ๊ณต์‹ ๋ฌธ์„œ(Dart, Flutter) โ†’ โ‘ข ํ”„๋กœ์ ํŠธ lint ๊ทœ์น™ โ†’ โ‘ฃ ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ์ค€ ํ”ผ๋“œ๋ฐฑ โ†’ โ‘ค ๋” ์ž์ฃผ ์“ฐ์ด๋Š” ์ชฝ. ๋˜ํ•œ ๊ธฐ์กด ๋‚ด์šฉ์€ ํ•จ๋ถ€๋กœ ์ง€์šฐ์ง€ ์•Š๊ณ , ๋ชจ๋“  ๊ฒฐ์ •์—๋Š” ์ด์œ ๋ฅผ ๋ถ™์ด๋ฉฐ, ์‹ค์ œ ์ ์šฉ ์ „ ๋ฏธ๋ฆฌ๋ณด๊ธฐ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.


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

Role#

  1. Duplicate Checking: Detect identical/similar content
  2. Conflict Resolution: Resolve conflicting suggestions
  3. Consistency Verification: Ensure consistency with existing documents
  4. Final Cleanup: Merge and organize

Processing Targets#

Phase 1 Results#

AgentOutput
doc-updaterDocument update suggestions
automation-scoutAutomation pattern suggestions
learning-extractorLearned content
followup-suggesterFollow-up task suggestions

Duplicate Types#

1. Exact Duplicates#

Same content suggested by multiple agents

# Example: Two agents suggest the same rule
doc_updater:
  - content:  " Use dot shorthand " 
 learning_extractor:
  - content:  " Use dot shorthand for type inference " 

 # Resolution: Merge into one
merged:
  - content:  " Use dot shorthand when type inference is possible " 
     sources: [doc_updater, learning_extractor]

2. Similar Duplicates#

Same meaning but different expression

# Example: Same content, different wording
doc_updater:
  - content:  " Check isClosed after await " 
 learning_extractor:
  - content:  " Verify BLoC dispose after async operation " 

 # Resolution: Consolidate to the more specific one
merged:
  - content:  " isClosed check required before emit after await "

3. Partial Duplicates#

Cases with overlapping portions

# Example: Partial overlap
doc_updater:
  - section:  " BLoC patterns " 
     rules: [ " isClosed check " ,  " emit order " ]
learning_extractor:
  - section:  " State management " 
     rules: [ " isClosed check " ,  " state immutability " ]

# Resolution: Remove duplicates then merge
merged:
  - section:  " BLoC patterns " 
     rules: [ " isClosed check " ,  " emit order " ,  " state immutability " ]

Conflict Types#

1. Direct Conflicts#

Contradictory suggestions

# Example: Opposing suggestions
source_a:
  -  " super.key at end of constructor " 
 source_b:
  -  " super.key at beginning of constructor " 

 # Resolution: Decide based on existing docs/official guidelines
resolved:
  -  " super.key at end of constructor " 
     resolution:  " Following existing CLAUDE.md rules "

2. Priority Conflicts#

Different priorities for the same item

# Example: Priority mismatch
followup_a:
  - task:  " Add tests " 
     priority: high
followup_b:
  - task:  " Add tests " 
     priority: medium

# Resolution: Adopt higher priority
resolved:
  - task:  " Add tests " 
     priority: high
    resolution:  " Elevated for safety "

Output Format#

deduplication_result:
  summary:
    total_inputs: 15
    duplicates_found: 3
    duplicates_merged: 3
    conflicts_found: 1
    conflicts_resolved: 1

  merged_items:
    - id:  " merge-001 " 
       original_sources:
        - agent:  " doc_updater " 
           item_id:  " update-001 " 
         - agent:  " learning_extractor " 
           item_id:  " learning-001 " 
       merged_content:
        type:  " rule " 
         content:  " Use dot shorthand when type inference is possible " 
         category:  " Code style " 

   resolved_conflicts:
    - id:  " conflict-001 " 
       conflicting_items:
        - agent:  " doc_updater " 
           content:  " super.key at end " 
         - agent:  " learning_extractor " 
           content:  " super.key at beginning " 
       resolution:  " super.key at end of constructor (per CLAUDE.md) " 
       reasoning:  " Maintaining existing project rules " 

   final_changes:
    - file:  " CLAUDE.md " 
       action:  " update " 
       section:  " ## Critical Conventions " 
       lines_added: 15
      lines_removed: 3
      preview: |
        ### Dot Shorthand Usage (Dart 3.10+)
        ...

    - file:  " .claude/rules/bloc-patterns.md " 
       action:  " append " 
       section:  " ### BLoC Safety " 
       lines_added: 8
      lines_removed: 0
      preview: |
        #### isClosed Check After await
        ...

Verification Checklist#

Verification ItemDescription
Duplicate removalConsolidate same content into one
Conflict resolutionDecide conflicting content
Existing consistencyMaintain existing document style
Reference integrityValid links between related documents
Format accuracyCorrect markdown syntax

Processing Workflow#

1. Collect inputs
   โ””โ”€โ”€ Collect 4 Phase 1 results

2. Normalize
   โ””โ”€โ”€ Convert to unified format

3. Detect duplicates
   โ”œโ”€โ”€ Exact match check
   โ”œโ”€โ”€ Similarity calculation (threshold: 0.8)
   โ””โ”€โ”€ Partial overlap check

4. Detect conflicts
   โ”œโ”€โ”€ Direct conflict check
   โ””โ”€โ”€ Priority mismatch check

5. Resolve
   โ”œโ”€โ”€ Merge duplicates
   โ””โ”€โ”€ Decide conflicts (existing rules take priority)

6. Verify
   โ””โ”€โ”€ Checklist verification

7. Generate output
   โ””โ”€โ”€ Final changes YAML

Conflict Resolution Priority#

RankCriteria
1Existing CLAUDE.md rules
2Official documentation (Dart, Flutter)
3Project lint rules
4Explicit user feedback
5Frequency-based (more commonly used)

Key Rules#

  1. Non-destructive: Minimize deletion of existing content
  2. State Reasoning: Include reason for all decisions
  3. Verification Required: Verify consistency before changes
  4. Preview: Provide preview before actual application
  5. Reversible: Preserve change history