Back to Skills

retrofit-existing

verified

Load when retrofitting framework documentation to existing code. Supports creating specs and decisions from implementations, enabling gradual framework adoption for existing projects.

View on GitHub

Marketplace

asermax-plugins

asermax/claude-plugins

Plugin

katachi

Repository

asermax/claude-plugins
1stars

katachi/skills/retrofit-existing/SKILL.md

Last Verified

January 25, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/asermax/claude-plugins/blob/main/katachi/skills/retrofit-existing/SKILL.md -a claude-code --skill retrofit-existing

Installation paths:

Claude
.claude/skills/retrofit-existing/
Powered by add-skill CLI

Instructions

# Retrofit Existing Skill

Create framework documentation from existing code.

## When to Load

Load this skill for:
- `/katachi:retrofit-spec <path>` - Create spec from existing code
- `/katachi:retrofit-design <ID>` - Create design from existing code (with integrated decision discovery)
- `/katachi:retrofit-decision <topic>` - Document existing decisions

## Dependencies

This skill requires `katachi:framework-core` to be loaded first for:
- Workflow principles
- Task management protocol
- Status tracking conventions

## Philosophy

Most projects don't start with perfect planning. The framework should:
- Meet projects where they are
- Enable gradual documentation
- Preserve existing knowledge
- Not require starting over

## Retrofit Spec Workflow

### 1. Identify Target

User provides file or module path:
- Single file: `/path/to/module.py`
- Directory: `/path/to/module/`
- Module name: `authentication`

### 2. Dispatch Codebase Analyzer

```python
Task(
    subagent_type="katachi:codebase-analyzer",
    prompt=f"""
Analyze this code to create a feature specification.

## Analysis Type
spec

## Target
{file_path}

## Project Context
{vision_content if exists else "No VISION.md found"}

Infer requirements and create a draft feature spec document.
"""
)
```

### 3. Present Draft Spec

Show the inferred spec to user:
- Highlight assumptions made
- Note areas of uncertainty
- Ask: "What needs adjustment?"

### 4. Iterate

User provides corrections:
- Clarify user story
- Adjust acceptance criteria
- Add missing scenarios
- Correct misunderstandings

### 5. Determine Feature Organization

Once spec is approved, analyze existing feature structure:
- Read `docs/feature-specs/README.md` to understand domains
- Identify which domain this capability belongs to
- Or determine if it's a new domain

Ask user:
```
"This capability appears to be [domain-related].

Should it be:
A) New sub-capability in existing domain (e.g., auth/new-feature.md)
B) New capability domain (create 

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
12643 chars