pattern-governance

Discover recurring code patterns and generate ADRs with agent directives.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/phillippelevidad/ai-led-engineering --skill pattern-governance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pattern-governance
Source: https://github.com/phillippelevidad/ai-led-engineering/tree/main/skills/pattern-governance
Command: npx skills add https://github.com/phillippelevidad/ai-led-engineering --skill pattern-governance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill solves the problem of architectural drift and inconsistent implementation patterns across a codebase, which often leads to bugs, increased review burden, and unpredictable AI-generated code.

Core Features & Use Cases

  • Pattern Inventory: Automatically discovers and counts recurring code patterns using deterministic structural analysis.
  • ADR Generation: Produces ready-to-adopt, AI-oriented Architecture Decision Records (ADRs) that define canonical defaults.
  • Agent Directives: Generates explicit ALWAYS/NEVER/PREFERRED/FORBIDDEN instructions that ensure future AI agents converge on the same standards.
  • Use Case: Use this when you need to standardize how your team handles repository access, DTO validation, or module structure to ensure all future code contributions follow a single, predictable pattern.

Quick Start

Use the pattern-governance skill to analyze the repository and generate a canonical ADR for the repository access pattern.

Frequently Asked Questions about pattern-governance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize code patterns and eliminate architectural drift in my repository?

Architectural drift happens when divergent code patterns emerge across modules, leading to bugs and unpredictable AI-generated code. This skill detects those competing implementations and produces explicit agent directives to ensure future code contributions converge on a single standard.

What is the best way to generate ADRs for existing codebase patterns?

To generate AI-oriented ADRs from your codebase, analyze specific modules or the whole repository to discover recurring implementations. This produces ready-to-adopt Architecture Decision Records that define canonical defaults for future code generation.

How do I stop AI coding agents from generating inconsistent code patterns across my codebase?

You can stop AI agents from generating inconsistent code by generating explicit ALWAYS/NEVER/PREFERRED/FORBIDDEN agent directives. These instructions ensure future AI-assisted refactoring converges on the same architectural standards defined in your ADRs.

Can I analyze specific modules for divergent code implementations instead of the whole repository?

Yes, you can analyze specific modules to detect architectural drift. The skill operates on either whole repositories or targeted modules to identify competing or divergent implementation approaches within the defined scope.

When do I need to establish canonical defaults for repository access patterns?

You need to establish canonical defaults when recurring implementations diverge, causing increased review burden and unpredictable code generation. Generating ADRs for repository access or DTO validation patterns ensures all future code contributions follow a single, predictable standard.