reverse-document

Generate design and architecture documents from existing code and prototypes.

Updated Apr 10, 2026
One-click install
npx skills add https://github.com/polsegu/Claude-Code-Game-Dev --skill reverse-document-polsegu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: reverse-document
Source: https://github.com/polsegu/Claude-Code-Game-Dev/tree/main/.claude/skills/reverse-document
Command: npx skills add https://github.com/polsegu/Claude-Code-Game-Dev --skill reverse-document-polsegu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When implementation exists without planning artifacts, it is hard to understand the original design intent, architecture decisions, and missing edge-case behavior. This Skill reverse-engineers code and prototypes to produce clear, reviewable design documents and architecture records that capture both what the system does and the rationale behind it.

Core Features & Use Cases

  • Implementation analysis: Reads code and prototype folders to identify mechanics, state machines, formulas, and system interactions.
  • Document generation: Produces GDD sections, ADRs, or concept documents using templates and a defined output structure.
  • Clarification-first workflow: Surfaces unclear intent areas and asks targeted questions before drafting to avoid incorrect assumptions.
  • Collaborative write-out: Presents findings and drafts, waits for approval, and can write templated markdown files into the repository when authorized.
  • Use cases: Formalize a prototyped mechanic, onboard to an undocumented codebase, or capture architecture decisions after implementation.

Quick Start

Run the reverse-document command with a type and path, for example: /reverse-document design src/gameplay/combat

Frequently Asked Questions about reverse-document

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

FAQPage Schema
How do I generate architecture decision records from existing source code?

You can generate design documents from an undocumented codebase by analyzing source files to extract mechanics, state machines, and system interactions, then producing templated markdown outputs that capture the original design intent for review.

How do I create design docs from a prototype folder without prior planning artifacts?

Creating design docs from a prototype folder involves analyzing the implementation to identify mechanics and formulas, surfacing unclear intent areas through targeted questions, and drafting formal concept documents or GDD sections using templates.

Can I reverse-engineer code to extract game mechanics and formulas into a game design document?

Yes, you can extract game mechanics and formulas into a GDD by analyzing prototype folders or individual files to identify system interactions and state machines, then generating templated markdown game design sections ready for collaborative writing.

Does the design document generation workflow require manual approval before writing files into the repository?

Yes, the document generation workflow presents findings and drafts for your approval, and only writes templated markdown files into the repository when explicitly authorized during the collaborative write-out process.

What is the best way to onboard to an undocumented codebase and capture missing architecture decisions?

The best way to onboard to an undocumented codebase is to reverse-engineer the implementation artifacts, extracting architecture patterns and system interactions to produce formal design documents and architecture records that capture the rationale behind the system.

When should I use reverse-engineering to produce design documents instead of writing them from scratch?

You should use reverse-engineering to produce design documents when implementation exists without planning artifacts, making it hard to understand original design intent, architecture decisions, and missing edge-case behavior that need formalization.