dld-retrofit

Analyze existing codebases to generate DLD decision records and annotations.

4|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/jimutt/dld-kit --skill dld-retrofit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dld-retrofit
Source: https://github.com/jimutt/dld-kit/tree/main/.claude/skills/dld-retrofit
Command: npx skills add https://github.com/jimutt/dld-kit --skill dld-retrofit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill helps you integrate Decision-Linked Development (DLD) into an existing codebase by automatically inferring and documenting the rationale behind the code's current structure and behavior.

Core Features & Use Cases

  • Codebase Analysis: Identifies key components, tech stack, and architectural patterns.
  • Decision Generation: Creates structured decision records (Markdown files with YAML frontmatter) for foundational system aspects and implementation details.
  • Annotation: Adds @decision annotations to relevant code sections for traceability.
  • Use Case: You have a legacy system with no documentation. Running /dld-retrofit will analyze the code, generate initial decision records explaining why certain architectural choices were made, and add annotations, providing a starting point for understanding and maintaining the system.

Quick Start

Use the dld-retrofit skill to analyze the current codebase and generate initial decision records.

Frequently Asked Questions about dld-retrofit

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

FAQPage Schema
How do I document design decisions in a legacy codebase with no existing documentation?

To document design decisions in a legacy codebase, you can automatically infer architectural rationale by analyzing existing code structure and generating decision records with traceable code annotations.

What is Decision-Linked Development and how does it apply to existing code?

Decision-Linked Development for existing code involves analyzing project structure to identify core domain models and implementation choices, then generating structured decision records and code annotations for traceability.

How do I generate decision records from existing source code automatically?

You can generate decision records automatically by analyzing project files via a configuration file, which infers foundational system aspects and implementation details to create structured Markdown files with YAML frontmatter.

Can I add traceability annotations to code to explain architectural choices?

Yes, you can add traceability annotations to code by analyzing the codebase to infer architectural rationale and automatically inserting decision annotations into relevant code sections.

Do I need a specific configuration file to analyze project structure for refactoring?

Yes, analyzing project structure for refactoring requires a configuration file to define the scope, allowing the tool to parse existing code files and infer the rationale behind implementation-level choices.

What are the limitations of automatically inferring rationale from legacy code?

Inferring rationale from legacy code relies on analyzing existing structural patterns and implementation choices, meaning the generated decision records serve as a starting point rather than a definitive historical account of architectural decisions.