mcpField

hackathon-doc-writer

github.com/bernieweb3文档处理42 次安装
代码仓库

关于 hackathon-doc-writer

面向黑客松项目生成结构化 ADR、PRD 和功能规格文档的技能。它按文档类型套用共享模板,并标出尚未补全的部分。

主要功能

  1. 01生成 ADR、PRD 和功能规格
  2. 02套用对应的共享模板
  3. 03将缺失内容标为 TBD
  4. 04为功能规格编写可测试的验收条件

适用场景

  1. 01记录已确定的 MVP 范围
  2. 02记录架构决策
  3. 03在实现前编写功能规格

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/bernieweb3/hackathon-ai-devkit --skill hackathon-doc-writer

安装后在 Claude Code 中输入/hackathon-doc-writer确认已加载。

详细介绍

hackathon-doc-writer

目标

使用适当的模板,为黑客松项目生成结构化技术文档(ADR、PRD、功能规格说明)。


触发条件

在以下情况使用此技能:

  • MVP 范围已确定,需要在 PRD 中记录
  • 已做出架构决策,需要记录在 ADR 中
  • 某项具体功能在开始实现前需要正式规格说明
  • 在第 4 阶段(项目规划)调用,此时 hackathon-scope-cutter 已完成
  • 实施期间做出新的架构决策时,可随时再次调用

输入

输入类型必填描述
document_typeenum是以下之一:ADR、PRD、feature-spec
project_titlestring是项目名称
problem_statementstring是要解决的核心问题
mvp_featuresstring[]是来自 hackathon-scope-cutter 的 MVP 功能列表
tech_stackstring[]是使用的技术
architecture_decisionsobject[]否用于 ADR:包含背景和理由的决策列表
feature_namestring否用于 feature-spec:具体功能的名称
constraintsstring[]否技术或产品约束

输出

输出描述
document完整填写的 Markdown 文档
document_type生成的文档类型
missing_fields因缺少输入而无法完成的章节

规则

  1. 使用 ../hackathon-shared-resources/templates/ 目录中对应的模板作为输出结构。
  2. 不得省略模板中的任何章节;缺少信息时使用 [TBD]。
  3. 语言应直接、便于快速浏览,不要添加冗余段落。
  4. 对于 ADR:每份文档只记录一项架构决策。
  5. 对于 PRD:即使是估算值,也要包含成功指标。
  6. 对于 feature-spec:包含可测试的验收条件。
  7. 在 missing_fields 输出中标记所有 [TBD] 章节。

输出格式

document_type: "<ADR|PRD|feature-spec>"

missing_fields:
  - "<section name>"

document: |
  <Full Markdown document content>

示例

输入:

document_type: "ADR"
project_title: "AnchorAI"
problem_statement: "How might we provide always-available emotional support for college students?"
mvp_features:
  - "GPT-4 emotional check-in conversation"
  - "Session memory"
tech_stack: ["Python", "FastAPI", "React", "OpenAI API", "Redis"]
architecture_decisions:
  - title: "Session memory storage"
    context: "Need to persist conversation summaries between sessions"
    options: ["Redis (in-memory)", "SQLite (file)", "OpenAI conversation history API"]
    decision: "Redis"
    rationale: "Fastest to set up; sufficient for demo; team familiar with it"

输出:

document_type: "ADR"
missing_fields: []
document: |
  # ADR-001: Session Memory Storage

  **Date:** 2025-06-14
  **Status:** Accepted

  ## Context
  AnchorAI must recall emotional context from past user sessions to deliver its core wow factor.
  Memory must persist across browser refreshes for the demo.

  ## Decision
  Use Redis as an in-process session store keyed by a hardcoded demo user ID.

  ## Consequences
  - Positive: Setup takes <30 minutes; team knows Redis well
  - Negative: Data is lost on server restart; not production-ready
  - Risk: Redis unavailable on demo machine → mitigation: fallback to in-memory dict

上下文文件

知识库
  • ../hackathon-shared-resources/knowledge/hackathon-reference-architecture.md
  • ../hackathon-shared-resources/knowledge/hackathon-mvp-strategy.md
模板
  • ../hackathon-shared-resources/templates/ADR-template.md
  • ../hackathon-shared-resources/templates/PRD-template.md
  • ../hackathon-shared-resources/templates/feature-spec-template.md
操作手册
  • ../hackathon-shared-resources/playbooks/hackathon-workflow.md

评论

支持 Markdown