VIRIM Infotech
Your AI Assisted Product Developers

vm-codebase-convention-detector

Skill detail with category, linked agents, and source metadata.

vm-codebase-convention-detector

Detects coding conventions, architectural patterns, naming standards, test organization, and shared capabilities from an existing codebase. Use when a builder sub-agent needs to generate convention-compliant code. Trigger phrases: detect conventions, scan coding patterns, identify naming conventions, find shared components.

Category: code-analysis Used by 5 agents

Source: .github/skills/code-analysis/vm-codebase-convention-detector/SKILL.md

Used By Agents

Preview

View source preview (first 3000 chars)

# vm-codebase-convention-detector

## When To Use This Skill

- Before generating code in a brownfield codebase to ensure convention alignment
- When a builder sub-agent (5a-5d) needs to detect existing patterns in Phase 2-3
- When the orchestrator needs a technology-agnostic convention scan before routing to a builder
- When reviewing generated code against existing codebase conventions

**Do NOT use this skill when:**
- The codebase is greenfield (no existing code to detect conventions from)
- Only tech stack identification is needed (use `vm-codebase-analyzer` instead)
- Security-focused analysis is needed (use security skills instead)
- Full reverse engineering is needed (use `3 - Analysis - Reverse Engineering Agent` instead)

## Unitary Function

**ONE RESPONSIBILITY:** Detect coding conventions, architectural patterns, and shared capabilities from an existing codebase and produce a structured conventions profile that builder agents use to generate compliant code.

**NOT RESPONSIBLE FOR:**
- Tech stack detection (handled by `vm-codebase-analyzer`)
- Security analysis (handled by security skills)
- Full codebase reverse engineering (handled by RE Agent)
- Generating code (handled by builder agents 5a-5d)
- Enforcing conventions (handled by Code Review Agent)

## Input

```json
{
  "repo_path": "/absolute/path/to/repository",
  "target_stack": "react | dotnet | java | python | auto-detect",
  "brownfield_context_path": "docs/codebase-analysis/brownfield-context.json",
  "scan_depth": "quick | standard"
}
```

| Parameter | Type | Required | Description |
|---|---|---|---|
| repo_path | string | MUST | Absolute path to the repository root |
| target_stack | string | SHOULD | Technology stack to focus detection on. "auto-detect" scans all |
| brownfield_context_path | string | MAY | Path to RE Agent brownfield context (enriches results if available) |
| scan_depth | string | SHOULD | "quick" scans 20 representative files; "standard" scans 50. Default: standard |

## Output

```json
{
  "generated_by": {
    "skill": "vm-codebase-convention-detector",
    "version": "1.0.0"
  },
  "detected_stack": "react | dotnet | java | python",
  "conventions": {
    "naming": {
      "files": "kebab-case | PascalCase | snake_case | camelCase",
      "classes": "PascalCase",
      "functions": "camelCase | snake_case | PascalCase",
      "variables": "camelCase | snake_case",
      "constants": "UPPER_SNAKE_CASE | PascalCase",
      "test_files": "{name}.test.tsx | {Name}Test.java | test_{name}.py | {Name}Tests.cs",
      "evidence": ["src/components/UserProfile.tsx", "src/hooks/useAuth.ts"]
    },
    "architecture": {
      "pattern": "component-based | clean-architecture | hexagonal | layered | mvt | feature-sliced",
      "directory_structure": {
        "source_root": "src/ | app/ | lib/",
        "test_root": "tests/ | src/test/ | __tests__/",
        "config_root": "config/ | settings/",
        "key_directories": []
      },
      "evidence": ["src