Skip to content

a5c-ai/babysitter / library/specializations/code-migration-modernization/skills/legacy-code-interpreter

legacy-code-interpreter

Verified

Understand and document legacy code behavior through deep analysis and behavior characterization

FileKindSize
README.mdmarkdown1.5 KB
SKILL.mdskill md2.9 KB
# Legacy Code Interpreter Skill

## Overview

The Legacy Code Interpreter skill helps understand undocumented legacy code. It extracts business logic, characterizes behavior, and creates documentation from code analysis.

## Quick Start

### Prerequisites

- Access to legacy codebase
- Code analysis tools
- Documentation templates

### Basic Usage

1. **Identify target code**
   - Focus on critical paths
   - Start with entry points
   - Follow data flows

2. **Analyze behavior**
   - Trace execution paths
   - Document business rules
   - Identify side effects

3. **Generate documentation**
   - Create pseudo-code summaries
   - Document edge cases
   - Map dependencies

## Features

### Analysis Techniques

| Technique | Purpose | Output |
|-----------|---------|--------|
| Control Flow | Execution paths | Flow diagrams |
| Data Flow | Value tracking | Transformation maps |
| Slice Analysis | Focused analysis | Code subsets |
| Pattern Matching | Known idioms | Pattern catalog |

### Documentation Output

- Business rule catalog
- Pseudo-code summaries
- State machine diagrams
- Data flow maps

## Configuration

```json
{
  "analysisDepth": "comprehensive",
  "outputFormats": ["markdown", "diagrams"],
  "focusAreas": ["business-logic", "data-flow"],
  "documentationTemplate": "standard"
}
```

## Related Documentation

- [SKILL.md](./SKILL.md) - Full skill specification
- [Working Effectively with Legacy Code](https://www.oreilly.com/library/view/working-effectively-with/0131177052/)
receiving-code-reviewobra/superpowersUse when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementationStars: 322kUpdated Claude CodeCodexVerifiedInstall
requesting-code-reviewobra/superpowersUse when completing tasks, implementing major features, or before merging to verify work meets requirementsStars: 322kUpdated Claude CodeCodexVerifiedInstall
using-git-worktreesobra/superpowersUse when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallbackStars: 322kUpdated Claude CodeCodexVerifiedInstall
verification-before-completionobra/superpowersUse when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions alwaysStars: 322kUpdated Claude CodeCodexVerifiedInstall