home / skills / atman-33 / skills / detailed-design-parser
/skills/openspec/detailed-design-parser
This skill parses detailed-design.md files to extract and format file-specific changes into a detailed-design-by-file.md for easy copying.
npx playbooks add skill atman-33/skills --skill detailed-design-parserReview the files below or copy the command above to add this skill to your agents.
---
name: detailed-design-parser
description: Parses detailed-design.md files to extract and format file-specific changes for easier copying. Use this skill when the user wants to generate a `detailed-design-by-file.md` from a `detailed-design.md` file.
metadata:
short-description: Parse detailed-design.md for file changes
---
# Detailed Design Parser
This skill helps in parsing `detailed-design.md` files to extract code changes and format them into a `detailed-design-by-file.md` file. This is useful for copying file contents to other applications.
## Usage
1. Identify the `detailed-design.md` file path. It is usually located at `openspec/changes/<openspec_id>/detailed-design.md`.
2. Run the `parse_design.py` script with the path to the `detailed-design.md` file.
## Script
The script `scripts/parse_design.py` takes the input file path as an argument and generates the output file in the same directory.
```bash
python {path}/scripts/parse_design.py <path_to_detailed_design_md>
```
This skill parses detailed-design.md files and produces a file-centric view of proposed changes, formatted as detailed-design-by-file.md for easy copying. It extracts code snippets, file paths, and change blocks and organizes them by target file so reviewers and implementers can quickly apply edits. Use it when you need a clear, copy-ready breakdown of design changes per file.
The parser scans the detailed-design.md for labeled change sections and code fences, identifies the target file paths, and groups snippets under those file headers. It then writes a detailed-design-by-file.md alongside the source file with one entry per target file containing the relevant change blocks. The script is invoked with the path to the detailed-design.md and emits the output in the same directory.
What input does the script expect?
It expects a detailed-design.md containing labeled change sections and fenced code blocks; file paths should be present so the parser can group snippets correctly.
Where is the output written?
The generated detailed-design-by-file.md is written to the same directory as the source detailed-design.md file.