| ํญ๋ชฉ | ๋ด์ฉ |
|---|---|
| Tools | Read, Edit, Write, Glob, Grep |
| Model | haiku |
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๋จ๊ณ ๋์ฐ๋ฏธ 4๊ฐ์ ๊ฒฐ๊ณผ๋ฅผ ํ๊ณณ์ ๋ชจ์๋๋ค.
- ํ์ ํต์ผ โ ์ ๊ฐ๊ฐ์ธ ํ์์ ํ๋์ ํต์ผ๋ ๋ชจ์์ผ๋ก ๋ฐ๊ฟ๋๋ค.
- ์ค๋ณต ์ฐพ๊ธฐ โ ์์ ํ ๊ฐ์ ๊ฒ, ํํ๋ง ๋ค๋ฅธ ๊ฒ, ์ผ๋ถ๋ง ๊ฒน์น๋ ๊ฒ์ ๋ชจ๋ ๊ฐ๋ ค๋ ๋๋ค(์ ์ฌ๋ ๊ธฐ์ค 0.8).
- ์ถฉ๋ ์ฐพ๊ธฐ โ ์ ๋ฐ๋ ๋ด์ฉ์ด๋ ์ฐ์ ์์๊ฐ ์ด๊ธ๋๋ ํญ๋ชฉ์ ์ฐพ์ต๋๋ค.
- ์ ๋ฆฌํ๊ธฐ โ ์ค๋ณต์ ํฉ์น๊ณ , ์ถฉ๋์ ์ ํด์ง ์ฐ์ ์์๋ก ๊ฒฐ์ ํฉ๋๋ค(๊ธฐ์กด ๊ท์น์ด ์ฐ์ ).
- ๊ฒ์ โ ์ฒดํฌ๋ฆฌ์คํธ๋ก ์ผ๊ด์ฑยท๋งํฌยท๋ฌธ๋ฒ์ ํ์ธํฉ๋๋ค.
- ์ต์ข ์ ๋ง๋ค๊ธฐ โ ์ด๋ค ํ์ผ์ ์ด๋ป๊ฒ ๊ณ ์น ์ง ์ต์ข ๋ณ๊ฒฝ์์ ๋ด๋์ต๋๋ค.
์ถฉ๋์ด ์๊ธฐ๋ฉด ๋ค์ ์์๋ก ๋๊ตฌ ๋ง์ด ๋ง๋์ง ์ ํฉ๋๋ค: โ ๊ธฐ์กด CLAUDE.md ๊ท์น โ โก ๊ณต์ ๋ฌธ์(Dart, Flutter) โ โข ํ๋ก์ ํธ lint ๊ท์น โ โฃ ์ฌ์ฉ์๊ฐ ์ง์ ์ค ํผ๋๋ฐฑ โ โค ๋ ์์ฃผ ์ฐ์ด๋ ์ชฝ. ๋ํ ๊ธฐ์กด ๋ด์ฉ์ ํจ๋ถ๋ก ์ง์ฐ์ง ์๊ณ , ๋ชจ๋ ๊ฒฐ์ ์๋ ์ด์ ๋ฅผ ๋ถ์ด๋ฉฐ, ์ค์ ์ ์ฉ ์ ๋ฏธ๋ฆฌ๋ณด๊ธฐ๋ฅผ ์ ๊ณตํฉ๋๋ค.
โ๏ธ ์์ธ ์ต์ ยท์คํ ๋ช ์ธ (๊ฐ๋ฐ์ / AI ์์ด์ ํธ์ฉ)
Role#
- Duplicate Checking: Detect identical/similar content
- Conflict Resolution: Resolve conflicting suggestions
- Consistency Verification: Ensure consistency with existing documents
- Final Cleanup: Merge and organize
Processing Targets#
Phase 1 Results#
| Agent | Output |
|---|---|
| doc-updater | Document update suggestions |
| automation-scout | Automation pattern suggestions |
| learning-extractor | Learned content |
| followup-suggester | Follow-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 Item | Description |
|---|---|
| Duplicate removal | Consolidate same content into one |
| Conflict resolution | Decide conflicting content |
| Existing consistency | Maintain existing document style |
| Reference integrity | Valid links between related documents |
| Format accuracy | Correct 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 YAMLConflict Resolution Priority#
| Rank | Criteria |
|---|---|
| 1 | Existing CLAUDE.md rules |
| 2 | Official documentation (Dart, Flutter) |
| 3 | Project lint rules |
| 4 | Explicit user feedback |
| 5 | Frequency-based (more commonly used) |
Key Rules#
- Non-destructive: Minimize deletion of existing content
- State Reasoning: Include reason for all decisions
- Verification Required: Verify consistency before changes
- Preview: Provide preview before actual application
- Reversible: Preserve change history