Engineering
pattern-detection avatar

pattern-detection

Analyze and identify codebase patterns (naming, architecture, testing) to maintain consistency and enforce standards during development.

Introduction

The pattern-detection skill functions as a dedicated codebase analyst within The Agentic Startup framework. It systematically discovers, verifies, and documents recurring conventions across four core pillars: Naming, Architecture, Testing, and Organization. By performing a multi-file survey, the agent identifies intentional practices versus accidental drift, ensuring that new code integrates seamlessly into the existing repository ecosystem.

  • Automated Surveying: Analyzes 3-5 representative files per module to detect naming conventions (kebab/PascalCase), architectural layering (MVC/Hexagonal), and test file placement strategies.

  • Conflict Resolution: Automatically surfaces inconsistencies, such as diverging naming styles or import orders, and provides actionable recommendations based on documented style guides or project-wide prevalence.

  • Evidence-Based Reporting: Generates a structured PatternReport containing confirmed patterns, identified conflicts, and implementation recommendations with explicit file-line references.

  • Tooling-Aware Decisions: Prioritizes patterns reinforced by linter configurations (ESLint, Prettier) or existing CONTRIBUTING.md guidelines to maintain technical governance.

  • Context-Specific Guidance: Tailors advice based on the specific directory or feature being modified, ensuring that local conventions are respected even when global standards are ambiguous.

  • Ideal for developers onboarding to a new codebase, performing code reviews, or implementing new features where strict consistency is required.

  • Usage involves passing a file, directory, or module path as an argument; the agent then scans related files to build a comprehensive state of the codebase's 'DNA'.

  • Constraints include a requirement for multi-file verification—the agent will refuse to declare a pattern based on a single instance to prevent false positives.

  • Emphasizes consistency over personal preference; the agent prefers the established project pattern even if it is not a standard industry best practice.

  • Highly effective when used in conjunction with the /specify or /implement commands to ensure new implementation plans align with existing architectural constraints.

Repository Stats

Stars
265
Forks
39
Open Issues
0
Language
Shell
Default Branch
main
Sync Status
Idle
Last Synced
Apr 29, 2026, 12:21 PM
View on GitHub