ln-640-pattern-evolution-auditor
Audits architectural patterns against best practices (MCP Ref, Context7, WebSearch). Maintains patterns catalog, calculates 4 scores. Output: docs/project/patterns_catalog.md. Use when user asks to: (1) Check architecture health, (2) Audit patterns before refactoring, (3) Find undocumented patterns in codebase.
npx skills add majiayu000/claude-skill-registry --skill ln-640-pattern-evolution-auditor-levnikolaevich-claude-code-skil-levnikolaevich-claude-code-skills-3 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Coordinated analysis of implemented architectural patterns against best practices, maintaining a central catalog of patterns and a health timeline. It computes four scores per pattern, detects drift against SLA thresholds, and can auto-create defect stories for architecture degradation. It coordinates multiple workers to inspect layer boundaries, API contracts, dependency graphs, and project structure, and aggregates results to identify cross-domain systemic issues. Output is written to docs/project/patterns_catalog.md and health logs, with an emphasis on documenting discovered patterns, violations, and recommended actions.
How it works
- Loads and validates the patterns catalog from docs/project/patterns_catalog.md, ensuring required sections exist and templates align.
- Uses a multi-phase workflow to discover, verify, and score patterns:
- Phase 1a Baseline Detection: load catalog, append missing sections from templates, and auto-detect baseline patterns by scanning the codebase.
- Phase 1b Adaptive Discovery: load references/pattern_library.md to seed discovery heuristics; identify additional project-specific patterns and add them as Discovered Patterns (Adaptive).
- Phase 1d Applicability Verification: for each detected pattern, verify required components via scoring_rules.md, then apply semantic checks via MCP Ref and WebSearch to exclude language idioms or built-in features.
- Phase 2 Best Practices Research: fetch best practices via MCP Ref, Context7, and WebSearch for patterns lacking current guidance.
- Phase 3 Domain Discovery + Output Setup: detect project domains and prepare an output directory under docs/project/.audit/ln-640/ with date stamping.
- Phase 4 Layer + API + Dependency Graph Audit: run domain-aware or global tasks ln-642, ln-643, ln-644, ln-645, ln-646 to collect structural and contractual data.
- Phase 5 Pattern Analysis Loop: run ln-641-pattern-analyzer on VERIFIED patterns to compute final scores.
- Worker outputs are written to per-pattern and per-domain files; Phase 6 cross-domain aggregation ingests these outputs to assess systemic issues across domains.
- The system enforces an anti-pattern: avoid direct Skill tool invocations without the Task wrapper, ensuring proper subagent context isolation.
When to use it
Use when the user asks to:
- Check architecture health
- Audit patterns before refactoring
- Find undocumented patterns in codebase
What it can touch
- Writes to: docs/project/patterns_catalog.md, docs/project/architecture_health.md, and per-domain audit reports under docs/project/.audit/ln-640/{YYYY-MM-DD}/
- Invokes workers ln-641, ln-642, ln-643, ln-644, ln-645, ln-646, and uses the Task wrapper format documented in the skill.
Caveats
- SLA-driven actions rely on Linear availability for auto-remediation; if Linear is unavailable, health details are appended to architecture_health.md with ACTION_REQUIRED marker.
- Excludes patterns that are determined to be language idioms or built-in features after semantic checks; such patterns are added to Excluded Patterns.
- Pattern status can be EXCLUDED or VERIFIED; only VERIFIED patterns proceed to cross-domain analysis.
> **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.md` with 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) - **Drift Detection:** Track score changes over time, enforce SLA thresholds - **Auto-remediation:** Create [REFACTOR] Story in Linear when architecture degrades below SLA - **Health Timeline:** Append-only log in `docs/project/architecture_health.md` ## 4-Score Model | Score | What it measures | Threshold | |-------|------------------|-----------| | **Compliance** | Industry standards, naming, tech stack conventions, layer boundaries | 70% | | **Completeness** | All comp
- Purpose & Scope
- 4-Score Model
- SLA Thresholds & Drift Detection
- Worker Invocation
- Workflow
- Phase 1a: Baseline Detection
- Phase 1b: Adaptive Discovery
- Phase 1c: Pattern Recommendations
- Phase 1d: Applicability Verification
- Phase 2: Best Practices Research
- Phase 3: Domain Discovery + Output Setup
- Phase 4: Layer Boundary + API Contract + Dependency Graph Audit
- Phase 5: Pattern Analysis Loop
- Phase 6: Cross-Domain Aggregation (File-Based)
What does the ln-640-pattern-evolution-auditor skill do?
Audits architectural patterns against best practices (MCP Ref, Context7, WebSearch). Maintains patterns catalog, calculates 4 scores. Output: docs/project/patterns_catalog.md. Use when user asks to: (1) Check architecture health, (2) Audit patterns before refactoring, (3) Find undocumented patterns in codebase.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill ln-640-pattern-evolution-auditor-levnikolaevich-claude-code-skil-levnikolaevich-claude-code-skills-3 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
