spec-save-design

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Save Brainstorming Session as Design Document

将头脑风暴会话保存为设计文档

The user has previously run /spec:brainstorm. Your task is to:
  1. Locate the /spec:brainstorm invocation in the current session conversation history.
  2. Collect all user and assistant messages AFTER that command.
  3. Analyze the conversation to infer the main feature/topic being designed.
  4. Transform the brainstorming content into a cohesive design document with clear sections.
  5. Generate a short, descriptive slug (3-5 words, lowercase, hyphen-separated) from the main topic.
  6. Get the current date in YYYY-MM-DD format.
  7. Construct the filename as docs/designs/YYYY-MM-DD-<slug>.md.
  8. If a file with that name already exists, adjust by either appending a suffix like -1, -2 or a short timestamp.
  9. If the docs/designs directory does not exist, create it.
  10. Use the write tool to create the file with the generated filename and design content.
  11. At the end, print the final file path you wrote to.
If no /spec:brainstorm command is found in the history, use all messages from the beginning of the conversation instead.
The design document MUST follow this structure:
用户此前已执行/spec:brainstorm命令。 你的任务如下:
  1. 在当前会话历史中找到/spec:brainstorm的调用记录。
  2. 收集该命令之后的所有用户与助手消息。
  3. 分析对话内容,推断出正在设计的核心功能/主题。
  4. 将头脑风暴内容转化为结构清晰、章节明确的连贯设计文档。
  5. 根据核心主题生成一个简短、描述性的slug(3-5个单词,小写,连字符分隔)。
  6. 获取当前日期,格式为YYYY-MM-DD。
  7. 构造文件名:docs/designs/YYYY-MM-DD-<slug>.md。
  8. 若该文件名已存在,通过添加-1、-2这类后缀或简短时间戳进行调整。
  9. 若docs/designs目录不存在,创建该目录。
  10. 使用写入工具创建包含生成的设计内容的文件,文件名如上。
  11. 最后,输出你写入的最终文件路径。
如果在历史记录中未找到/spec:brainstorm命令,则使用会话开始以来的所有消息。
设计文档必须遵循以下结构:

[Feature Name]

[功能名称]

Date: YYYY-MM-DD
日期: YYYY-MM-DD

Context

背景

Summarize the initial idea and motivation based on the early brainstorming messages.
基于早期头脑风暴消息,总结初始想法与动机。

Discussion

讨论内容

Summarize key questions, answers, trade-offs, and explored alternatives from the conversation.
总结对话中的关键问题、答案、权衡方案及探讨过的替代选项。

Approach

实施方案

Summarize the final agreed direction and how it solves the problem.
总结最终达成共识的方向,以及该方案如何解决问题。

Architecture

架构设计

Describe technical details, components, flows, and important implementation notes if discussed.
Remember:
  • Base everything only on content after /spec:brainstorm.
  • Do not include raw chat logs; only the distilled design.${languageInstruction}
若对话中有所涉及,描述技术细节、组件、流程及重要的实现注意事项。
注意:
  • 所有内容仅基于/spec:brainstorm命令之后的对话内容。
  • 请勿包含原始聊天记录;仅保留提炼后的设计内容。${languageInstruction}