/konductor:sop-k-codebase-analysisfrom Konductor
Analyzes codebase architecture, design patterns, SOLID principles, dependencies, and technical debt. Produces a structured markdown report with Mermaid diagrams. Use for onboarding, refactoring planning, or architecture reviews.
Ships in Konductor. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This SOP performs comprehensive codebase analysis covering architecture, design principles, patterns, and technical debt. It produces a structured markdown report with Mermaid diagrams. Use focus_areas=all for onboarding a newcomer to an unfamiliar codebase (full breadth); use a narrower focus_areas selection (e.g. architecture,dependencies,debt) when the goal is a specific architecture review or refactoring-planning pass — see the focus_areas parameter below for the full list of selectable sections.
Use this SOP when joining an unfamiliar codebase, before major refactoring, during architecture reviews, or when assessing technical debt.
This SOP differs from the analyze SOP, which performs pre-implementation context gathering across multiple research agents. Codebase analysis produces a comprehensive architectural assessment document with SOLID evaluation, design pattern identification, and technical debt scoring — it's a deep-dive reference document, not a pre-task research step.
codebase-analysis.md): Where to write the analysis reportall): Comma-separated list of areas to focus on: architecture, solid, patterns, dependencies, security, performance, testing, debt, or all| focus_area value | Corresponding Step |
|---|---|
| architecture | Step 3: Architecture Analysis |
| solid | Step 4: SOLID Principles Evaluation |
| patterns | Step 5: Design Patterns Analysis |
| dependencies | Step 6: Dependencies & Integrations |
| testing | Step 7: Code Quality Assessment |
| security | Step 8: Security & Performance |
| performance | Step 8: Security & Performance |
| debt | Step 9: Technical Debt Assessment |
| all | Steps 2-9 (all sections) |
Constraints for parameter acquisition:
codebase_path exists before proceedingValidate paths, set defaults, and determine which analysis sections to run.
Constraints:
You MUST resolve codebase_path to an absolute path
You MUST verify codebase_path exists and contains source files
You MUST parse focus_areas into a list and validate each value against the allowed set: architecture, solid, patterns, dependencies, security, performance, testing, debt
If focus_areas is all, You MUST run all analysis sections (Steps 2–9)
If focus_areas is not all, You MUST only run the selected analysis sections and skip the rest
You MUST create the output file immediately with a header to enable incremental writes:
# Codebase Analysis: {project_name}
Date: {current_date}
Scope: {focus_areas}
You MUST NOT proceed if codebase_path does not exist or contains no source files
Expected Output: Confirmed parameters (resolved path, output file, focus areas list) and initialized output file
Survey the codebase to understand its structure, languages, frameworks, and entry points.
Constraints:
You MUST scan the directory tree and identify:
package.json, pom.xml, Cargo.toml, Config, requirements.txt, etc.)make, npm, cargo, gradle, maven, etc.)You MUST generate a Mermaid diagram showing the high-level directory/module structure:
graph TD
Root --> ModuleA
Root --> ModuleB
ModuleA --> SubModule1
You MUST save findings to output_file under ## Codebase Map
You MUST NOT traverse node_modules, .git, build, dist, target, or other generated directories
Expected Output: Codebase map section appended to output file with language breakdown, framework list, entry points, and Mermaid structure diagram
Analyze the system's architectural layers, component boundaries, and dependency flow.
Constraints:
You MUST identify:
You MUST generate a Mermaid dependency graph showing component relationships:
graph LR
API --> Service
Service --> Repository
Repository --> Database
Service --> ExternalAPI
You MUST include file path references for each identified layer/component
You MUST save findings to output_file under ## Architecture Overview
You MUST NOT modify any source files
Expected Output: Architecture analysis section appended to output file with architectural style, layer identification, dependency graph (Mermaid), and file path references
Evaluate adherence to each SOLID principle with concrete examples from the code.
Constraints:
output_file under ## SOLID Principles EvaluationExpected Output: SOLID evaluation section appended to output file with per-principle rating, code examples with file paths, and recommendations
Identify Gang of Four and architectural patterns in use across the codebase.
Constraints:
output_file under ## Design Patterns IdentifiedExpected Output: Design patterns section appended to output file with categorized patterns, file path references, and correctness assessment
Analyze external dependencies, internal integrations, and API contracts.
Constraints:
You MUST catalog:
You MUST flag:
You MUST generate a Mermaid integration diagram:
graph TD
Service --> DynamoDB
Service --> SQS
Service --> ExternalAPI
Frontend --> Service
You MUST save findings to output_file under ## Dependencies & Integrations
Expected Output: Dependencies section appended to output file with dependency catalog, integration diagram (Mermaid), and flagged issues
Assess error handling, logging, and testing strategy.
Constraints:
output_file under ## Code Quality AssessmentExpected Output: Code quality section appended to output file with per-area ratings, specific findings with file paths, and recommendations
Assess security mechanisms and performance considerations.
Constraints:
output_file under ## Security & PerformanceExpected Output: Security and performance section appended to output file with per-area ratings, specific findings with file paths, and recommendations
Identify technical debt indicators and rate their severity.
Constraints:
output_file under ## Technical DebtExpected Output: Technical debt section appended to output file with categorized debt items, severity ratings, and file path references
Compile all findings into the final structured report with an executive summary and prioritized recommendations.
Constraints:
You MUST ensure the final report in output_file follows this structure:
# Codebase Analysis: {project_name}
Date: [date]
Scope: [focus areas analyzed]
## Executive Summary
## Codebase Map (with Mermaid diagram)
## Architecture Overview (with Mermaid diagram)
## SOLID Principles Evaluation
## Design Patterns Identified
## Dependencies & Integrations (with Mermaid diagram)
## Code Quality Assessment
## Security & Performance
## Technical Debt
## Recommendations (prioritized)
The Executive Summary MUST be 3–5 sentences covering: overall health, biggest strengths, most critical issues
The Recommendations section MUST be a prioritized list (P0–P2) with:
If focus_areas was not all, You MUST only include sections for the selected areas
You MUST inform the user of the output file location and the top 3 recommendations
You MUST NOT print the full report in your response — reference the file
Expected Output: Complete report written to output_file, with a summary message to the user containing the file path and top 3 prioritized recommendations
Solution: Use focus_areas to analyze one area at a time (e.g., focus_areas=architecture,dependencies). Run multiple passes and the incremental writes to output_file will accumulate findings across runs.
Solution: The analysis will still proceed but the Dependencies & Integrations section will note that no manifest was found. Check for non-standard dependency files (e.g., Makefile, BUILD, WORKSPACE) and point codebase_path to the correct root.
Solution: Simplify by grouping related components into subgraphs. Focus on top-level module relationships rather than individual file dependencies. Use graph TD for hierarchical layouts and graph LR for flow-based layouts.
Solution: For functional or procedural codebases, the SOLID evaluation adapts the principles: Single Responsibility applies to modules/functions, Open/Closed applies to extension points, and Dependency Inversion applies to module boundaries. The evaluation will note when principles are less applicable.
Solution: Pattern detection is heuristic-based. If a pattern is misidentified, check the file path reference and verify manually. The analysis will note confidence level when patterns are ambiguous.
$ARGUMENTS
What SKILL.md sets; muted values are Claude Code's defaults
101 skills in this plugin
/about-konductorGets a new user from nothing to a working Konductor session — install the CLI, start the orchestrator, and describe real work in plain language. Covers the real `konductor` CLI command surface, example orchestrator prompts, and the agent/skill/SOP model. Use when a user asks "what is Konductor", "how do I install this", "what can I ask it", or "what's the difference between an agent, a skill, and a SOP"./adr-generatorProduces a complete inline ADR (Context, Decision, Status, Alternatives, Consequences). Use when a significant design decision is identified during design doc creation, when an engineer asks to document a decision as an ADR, or when an existing ADR is incomplete (missing alternatives, consequences, or status). Trigger phrases — "generate an ADR for this decision", "document this as an architecture decision record", "create an ADR for choosing X over Y"./adversarial-code-reviewnpx claudepluginhub aws-solutions/konductor --plugin konductorOther plugins' skills for the same job