infer-design-patterns-from-code

Infer design patterns from scan-index.json into a design-patterns.yaml catalogue.

3|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/kapilvirenahuja/garura --skill infer-design-patterns-from-code
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: infer-design-patterns-from-code
Source: https://github.com/kapilvirenahuja/garura/tree/main/core/components/skills/infer-design-patterns-from-code
Command: npx skills add https://github.com/kapilvirenahuja/garura --skill infer-design-patterns-from-code

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It extracts and catalogs likely design patterns from a brownfield repository so the pattern catalogue matches what’s actually implemented in code and architecture artifacts.

Core Features & Use Cases

  • Pattern inference from scans: Reads scan-index.json and identifies architectural/design patterns from naming suffixes, framework idioms, and directory-layer trees.
  • Scoped, evidence-based outputs: Produces a structured design-patterns.yaml with system, layer, component, and cross-cutting scopes, each backed by concrete evidence paths.
  • Architecture-aware validation: Cross-checks inferred component patterns against physical-architecture runtime tiers and records resolution trace + decision manifest for auditability.

Quick Start

Ask the agent to run infer-design-patterns-from-code during /codify to generate architecture/design-patterns.yaml from scan-index.json and the logical/physical architecture proposals.

Frequently Asked Questions about infer-design-patterns-from-code

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

FAQPage Schema
How do I extract design patterns from an existing brownfield codebase?▼

Extract design patterns from a brownfield codebase by mapping scan-index signals like naming suffix counts, framework idioms, and directory layering into canonical patterns with evidence. This generates a structured design-patterns.yaml artifact cataloging what is actually implemented.

Can I infer architecture patterns from directory structure and naming conventions?▼

Yes, you can infer architecture patterns by analyzing directory-layer trees and naming suffix counts from scan-index data. This maps structural codebase evidence into scoped component and cross-cutting patterns backed by concrete file paths.

How do I document clean architecture patterns already present in my source code?▼

Document existing clean architecture patterns by running an inference scan during codify bootstrap to consume architecture proposals. It generates a design-patterns.yaml file with system, layer, component, and cross-cutting scopes backed by evidence.

Does pattern inference validate inferred component patterns against runtime tiers?▼

Yes, pattern inference cross-checks inferred component patterns against physical-architecture runtime tiers. It records a resolution trace and decision manifest to ensure deterministic mapping and provide full auditability for architecture documentation.

What are the limitations of inferring design patterns from code scans?▼

The limitation is that pattern inference relies entirely on scan-index.json signals and existing architecture proposals, meaning it cannot deduce patterns from unscanned directories or missing logical and physical architecture grounding proposals.