@aiready/pattern-detect
v0.12.2
Published
Semantic duplicate pattern detection for AI-generated code - finds similar implementations that waste AI context tokens
Downloads
3,913
Readme
@aiready/pattern-detect
AIReady Spoke: Semantic duplicate pattern detection for AI-generated code.
Overview
AI models often suffer from "semantic confusion" when multiple variants of the same logic exist in the codebase. The Pattern Detect analyzer helps you identify these duplicates and consolidate them into reusable components.
🏛️ Architecture
🎯 USER
│
▼
🎛️ @aiready/cli (orchestrator)
│ │ │ │ │ │ │ │ │
▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼
[PAT] [CTX] [CON] [AMP] [DEP] [DOC] [SIG] [AGT] [TST]
│ │ │ │ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
│
▼
🏢 @aiready/core
Legend:
PAT = pattern-detect ★ CTX = context-analyzer
CON = consistency AMP = change-amplification
DEP = deps-health DOC = doc-drift
SIG = ai-signal-clarity AGT = agent-grounding
TST = testability ★ = YOU ARE HEREFeatures
- Semantic Duplication: Detects code blocks that perform the same task with different syntax.
- Context Waste: Identifies how much duplicate code is bloat for AI context windows.
- Refactoring Suggestions: Recommends extraction points for shared utilities.
Installation
pnpm add @aiready/pattern-detectUsage
aiready scan . --tools pattern-detectLicense
MIT
