ln-640-pattern-evolution-auditor
БесплатноБез исполняемых скриптовНе проверенAudits architectural patterns against best practices. Maintains patterns catalog, calculates 4 scores per pattern. Output: patterns_catalog.md.
от tensology★ 17 звёзд на GitHubОб этом скилле
Paths: File paths (
shared/,references/,../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
Pattern Evolution Auditor
L2 Coordinator that analyzes implemented architectural patterns against current best practices and tracks evolution over time.
Purpose & Scope
- Maintain
docs/project/patterns_catalog.mdwith implemented patterns - Research best practices via MCP Ref, Context7, WebSearch
- Audit layer boundaries via ln-642 (detect violations, check coverage)
- Calculate 4 scores per pattern via ln-641
- Track quality trends over time (improving/stable/declining)
- Output:
docs/project/patterns_catalog.md(file-based)
4-Score Model
| Score | What it measures | Threshold |
|---|---|---|
| Compliance | Industry standards, naming, tech stack conventions, layer boundaries | 70% |
| Completeness | All components, error handling, observability, tests | 70% |
| Quality | Readability, maintainability, no smells, SOLID, no duplication | 70% |
| Implementation | Code exists, production use, integrated, monitored | 70% |
Worker Invocation
MANDATORY READ: Load shared/references/task_delegation_pattern.md.
| Worker | Purpose | Phase |
|---|---|---|
| ln-641-pattern-analyzer | Calculate 4 scores per pattern | Phase 5 |
| ln-642-layer-boundary-auditor | Detect layer violations | Phase 4 |
| ln-643-api-contract-auditor | Audit API contracts, DTOs, layer leakage | Phase 4 |
| ln-644-dependency-graph-auditor | Build dependency graph, detect cycles, validate boundaries, calculate metrics | Phase 4 |
| ln-645-open-source-replacer | Search OSS replacements for custom modules via MCP Research | Phase 4 |
| ln-646-project-structure-auditor | Audit physical structure, hygiene, naming conventions | Phase 4 |
| ln-647-env-config-auditor | Audit env var config, sync, naming, startup validation | Phase 4 |
All delegations use Agent with subagent_type: "general-purpose". Keep Phase 4 workers parallel where inputs are independent; keep ln-641 in Phase 5 because pattern scoring depends on earlier boundary and graph evidence.
Workflow
MANDATORY READ: Load shared/references/two_layer_detection.md for detection methodology.
Phase 1a: Baseline Detection
1. Load docs/project/patterns_catalog.md
IF missing → create from shared/templates/patterns_template.md
IF exists → verify template conformance:
required_sections = ["Score Legend", "Pattern Inventory", "Discovered Patterns",
"Layer Boundary Status", "API Contract Status", "Quick Wins",
"Patterns Requiring Attention", "Pattern Recommendations",
"Excluded Patterns", "Summary"]
FOR EACH section IN required_sections:
IF section NOT found in catalog:
→ Append section from shared/templates/patterns_template.md
Verify table columns match template (e.g., Recommendation in Quick Wins)
IF columns mismatch → update table headers, preserve existing data rows
2. Load docs/reference/adrs/*.md → link patterns to ADRs
Load docs/reference/guides/*.md → link patterns to Guides
3. Auto-detect baseline patterns
FOR EACH pattern IN pattern_library.md "Pattern Detection" table:
Grep(detection_keywords) on codebase
IF found but not in catalog → add as "Undocumented (Baseline)"
Phase 1b: Adaptive Discovery
MANDATORY READ: Load references/pattern_library.md — use "Discovery Heuristics" section.
Predefined patterns are a seed, not a ceiling. Discover project-specific patterns beyond the baseline.
# Structural heuristics (from pattern_library.md)
1. Class naming: Grep GoF suffixes (Factory|Builder|Strategy|Adapter|Observer|...)
2. Abstract hierarchy: ABC/Protocol with 2+ implementations → Template Method/Strategy
3. Fluent interface: return self chains → Builder
4. Registration dict: _registry + register() → Registry
5. Middleware chain: app.use/add_middleware → Chain of Responsibility
6. Event listeners: @on_event/@receiver/signal → Observer
7. Decorator wrappers: @wraps/functools.wraps → Decorator
# Document-based heuristics
8. ADR/Guide filenames + H1 headers → extract pattern names not in library
9. Architecture.md → grep pattern terminology
10. Code comments → "pattern:|@pattern|design pattern"
# Output per discovered pattern:
{name, evidence: [files], confidence: HIGH|MEDIUM|LOW, status: "Discovered"}
→ Add to catalog "Discovered Patterns (Adaptive)" section
Phase 1c: Pattern Recommendations
Suggest patterns that COULD improve architecture (advisory, NOT scored).
# Check conditions from pattern_library.md "Pattern Recommendations" table
# E.g., external API calls without retry → recommend Resilience
# E.g., 5+ constructor params → recommend Builder/Parameter Object
# E.g., direct DB access from API layer → recommend Repository
→ Add to catalog "Pattern Recommendations" section
Ph
Установить ln-640-pattern-evolution-auditor в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ln-640-pattern-evolution-auditor?
Audits architectural patterns against best practices. Maintains patterns catalog, calculates 4 scores per pattern. Output: patterns_catalog.md.
Как установить скилл ln-640-pattern-evolution-auditor?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ln-640-pattern-evolution-auditor запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic