一键导入
reverse-document
Generate design or architecture documents from existing implementation. Works backwards from code/prototypes to create missing planning docs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate design or architecture documents from existing implementation. Works backwards from code/prototypes to create missing planning docs.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Creates an Architecture Decision Record (ADR) documenting a significant technical decision, its context, alternatives considered, and consequences. Every major technical choice should have an ADR.
Audits game assets for compliance with naming conventions, file size budgets, format standards, and pipeline requirements. Identifies orphaned assets, missing references, and standard violations.
Analyzes game balance data files, formulas, and configuration to identify outliers, broken progressions, degenerate strategies, and economy imbalances. Use after modifying any balance-related data or design.
Guided game concept ideation — from zero idea to a structured game concept document. Uses professional studio ideation techniques, player psychology frameworks, and structured creative exploration.
Creates a structured bug report from a description, or analyzes code to identify potential bugs. Ensures every bug report has full reproduction steps, severity assessment, and context.
Auto-generates a changelog from git commits, sprint data, and design documents. Produces both internal and player-facing versions.
| name | reverse-document |
| description | Generate design or architecture documents from existing implementation. Works backwards from code/prototypes to create missing planning docs. |
| argument-hint | <type> <path> (e.g., 'design src/gameplay/combat' or 'architecture src/core') |
| user-invocable | true |
| allowed-tools | Read, Glob, Grep, Write, Edit, Bash |
This skill analyzes existing implementation (code, prototypes, systems) and generates appropriate design or architecture documentation. Use this when:
Format: /reverse-document <type> <path>
Type options:
design → Generate a game design document (GDD section)architecture → Generate an Architecture Decision Record (ADR)concept → Generate a concept document from prototypePath: Directory or file to analyze
src/gameplay/combat/ → All combat-related codesrc/core/event-system.cpp → Specific fileprototypes/stealth-mech/ → Prototype directoryExamples:
/reverse-document design src/gameplay/magic-system
/reverse-document architecture src/core/entity-component
/reverse-document concept prototypes/vehicle-combat
Read and understand the code/prototype:
For design docs (GDD):
For architecture docs (ADR):
For concept docs (prototype analysis):
DO NOT just describe the code. ASK about intent:
Design questions:
Architecture questions:
Concept questions:
Before drafting, show what you discovered:
I've analyzed src/gameplay/combat/. Here's what I found:
MECHANICS IMPLEMENTED:
- 3-hit combo system with timing windows
- Guard-break mechanic (heavy attack vs blocking enemy)
- Stamina system (depletes on attack/dodge, regens when idle)
- Stagger system (builds up, triggers vulnerable state)
FORMULAS DISCOVERED:
- Damage = Base * (1 + StrengthScaling * Level)
- Stagger buildup = AttackStaggerValue / (Enemy.Poise * 0.5)
- Stamina cost = BaseStaminaCost * (1 - EfficiencyBonus)
UNCLEAR INTENT AREAS:
1. Stamina system — pacing or resource management?
2. Stagger — core pillar or supporting feature?
3. Damage scaling — power fantasy or needs tuning?
Before I draft the design doc, could you clarify these points?
Wait for user to clarify intent before drafting.
Based on type, use appropriate template:
| Type | Template | Output Path |
|---|---|---|
design | templates/design-doc-from-implementation.md | design/gdd/[system-name].md |
architecture | templates/architecture-doc-from-code.md | docs/architecture/[decision-name].md |
concept | templates/concept-doc-from-prototype.md | prototypes/[name]/CONCEPT.md or design/concepts/[name].md |
Draft structure:
Collaborative protocol:
I've drafted the combat system design doc based on your code and clarifications.
[Show key sections: Overview, Mechanics, Formulas, Design Intent]
ADDITIONS I MADE:
- Documented stamina as "pacing mechanic" per your clarification
- Added edge cases not in code (what if stamina hits 0 mid-combo?)
- Flagged balance concern: exponential damage scaling at high levels
SECTIONS MARKED AS INCOMPLETE:
- "Enemy AI interaction with stagger" (not fully implemented yet)
- "Weapon variety and scaling" (only sword implemented so far)
May I write this to design/gdd/combat-system.md?
Wait for approval. User may request changes before writing.
When approved, write the file with special markers:
---
status: reverse-documented
source: src/gameplay/combat/
date: 2026-02-13
verified-by: [User name]
---
# Combat System Design
> **Note**: This document was reverse-engineered from the existing implementation.
> It captures current behavior and clarified design intent. Some sections may be
> incomplete where implementation is partial or intent was unclear.
[Rest of document...]
After writing, suggest next steps:
✅ Written to design/gdd/combat-system.md
FOLLOW-UP RECOMMENDED:
1. Run /balance-check on combat formulas (exponential scaling concern)
2. Create ADR for stamina system architecture decision
3. Implement missing edge cases:
- Stamina depletion mid-combo behavior
- Stagger state during dodge
4. Extend design doc when weapon variety is implemented
Would you like me to tackle any of these now?
| If analyzing... | Use template... | Because... |
|---|---|---|
src/gameplay/* | design-doc-from-implementation.md | Gameplay mechanics → GDD |
src/core/*, src/ai/* | architecture-doc-from-code.md | Core systems → ADR |
prototypes/* | concept-doc-from-prototype.md | Experiments → concept doc |
src/networking/* | architecture-doc-from-code.md | Technical systems → ADR |
src/ui/* | design-doc-from-implementation.md | UI/UX → design spec |
User: /reverse-document design src/gameplay/combat
Agent: I'll analyze your combat implementation to create a design doc.
[Reads code, discovers mechanics, formulas]
Agent: I've analyzed src/gameplay/combat/. Here's what I found:
[Shows mechanics, formulas, unclear areas]
Before drafting, could you clarify:
1. Stamina system intent?
2. Is stagger a core pillar?
3. Damage scaling — intentional or needs tuning?
User: 1. Stamina is for pacing, prevent button mashing
2. Stagger is core — I want deliberate combat
3. Yeah, exponential is too much, should be linear
Agent: Perfect, that clarifies the vision. Let me draft the design doc.
[Shows draft with clarified intent]
May I write this to design/gdd/combat-system.md?
User: Yes, write it.
Agent: ✅ Written to design/gdd/combat-system.md
✅ Marked as [REVERSE-DOCUMENTED]
✅ Flagged damage scaling for rebalancing
Next steps:
- Update damage formula to linear scaling
- Run /balance-check to validate progression curve
- Document stagger as core pillar in game-pillars.md
This skill follows the collaborative design principle:
Never assume intent. Always ask before documenting "why".