npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yrwang45/document-based-development-workflow

v1.2.0

Published

基于完整文档的开发阶段控制工作流 - 细粒度、边界明确、清晰可控地生成代码 | Document-driven development workflow with fine-grained control

Readme

Document-Based Development Workflow

  ██╗███████╗██╗  ██╗   ██╗████████╗███████╗██╗  ██╗
  ██║██╔════╝██║  ╚██╗ ██╔╝╚══██╔══╝██╔════╝██║ ██╔╝
  ██║█████╗  ██║   ╚████╔╝    ██║   █████╗  █████╔╝
  ██║██╔══╝  ██║    ╚██╔╝     ██║   ██╔══╝  ██╔═██╗
  ██║██║     ███████╗██║      ██║   ███████╗██║  ██╗
  ╚═╝╚═╝     ╚══════╝╚═╝      ╚═╝   ╚══════╝╚═╝  ╚═╝

基于完整文档的开发阶段控制工作流

细粒度、边界明确、清晰可控地生成代码

npm version License: MIT

🚀 快速开始

使用 npx 安装(推荐)

npx @yrwang45/document-based-development-workflow

交互式安装向导会引导你完成以下步骤:

  1. 选择语言 - 简体中文 / English
  2. 选择安装方式
    • 安装到 .claude/commands/ - 自动创建 Claude Code 命令
    • 安装到 BMAD 工作流目录 - 集成到 BMAD 系统
    • 自定义安装路径 - 灵活选择安装位置
  3. 选择目录 - 指定工作流文件和命令文件的安装位置
  4. 确认安装 - 查看安装路径并确认

手动安装

npm install -g @yrwang45/document-based-development-workflow
dbd-workflow

🎯 安装选项

选项 1:安装到 Claude Code(推荐)

  • 自动在 .claude/commands/ 创建启动命令
  • 工作流文件安装到指定目录
  • 可直接使用 /document-based-development 命令

选项 2:安装到 BMAD 系统

  • 安装到 _bmad-output/bmb-creations/workflows/
  • 可选择是否创建 .claude 命令
  • 完全集成到 BMAD 工作流系统

选项 3:自定义安装

  • 灵活选择任意安装路径
  • 可选择是否创建 .claude 命令
  • 适合特殊项目结构

✨ 工作流特点

  • 细粒度控制 - Story 级别的开发和日志追踪
  • 边界明确 - Epic → Story 两层循环结构
  • 文档驱动 - 基于 PRD、Epic/Stories、架构文档
  • 完全可追溯 - 详细的开发日志记录
  • 渐进式架构 - 复杂中间件延迟引入策略
  • 可继续 - 支持跨会话恢复
  • Git 集成 - 自动提交(可选)

📋 前置要求

必需文档

  • PRD(产品需求文档)- 定义产品功能和需求
  • Epic/Stories(史诗和用户故事)- 详细的开发任务列表
  • 架构设计(技术架构文档)- 技术栈、系统架构

可选文档

  • UX 设计 - 用户体验和界面设计

文档命名规范

格式:日期-文件名称-版本号.md

示例:2026-03-05-PRD-v1.0.md

🔄 工作流程

1. 文档验证 → 检查 PRD、Epic/Stories、架构文档
2. Epic 循环 → 遍历所有 Epic
3. Story 执行 → 生成代码、测试、提交
4. Epic 审查 → 集成测试、风险评估、报告
5. 项目完成 → 生成 README、最终验证
6. 最终优化 → 优化开发日志

📦 输出物

  • 项目代码 - 完整可运行的项目
  • 开发日志 - Story 级别和 Epic 级别的详细记录
  • README - 包含延迟组件清单的完整文档
  • 测试套件 - 单元测试和集成测试

🏗️ 渐进式架构策略

工作流采用渐进式架构思维:

  • 🔧 优先实现核心功能
  • 🔧 复杂中间件通过接口抽象延迟引入
  • 🔧 让 AI 专注于当前编码内容
  • 🔧 所有延迟组件都有清晰的接口定义

中间件复杂度评估

  • 简单依赖:数据库(PostgreSQL/MySQL)→ 直接实现
  • ⚠️ 中等复杂:缓存(Redis)、消息队列 → 评估延迟
  • 🔴 高复杂度:搜索引擎(Elasticsearch)、流处理 → 延迟引入

🔧 使用方式

在 Claude Code 中使用

安装后,在 Claude Code 中运行:

/document-based-development

在 BMAD 系统中使用

工作流会自动集成到 BMAD 系统中,按照标准 BMAD 工作流方式调用。

📁 工作流结构

document-based-development/
├── workflow.md                    # 主工作流配置
├── steps-c/                       # 创建模式步骤(7个文件)
│   ├── step-01-init.md           # 初始化与文档验证
│   ├── step-01b-continue.md      # 继续逻辑
│   ├── step-02-epic-loop.md      # Epic 循环控制
│   ├── step-03-story-execution.md # Story 执行(核心)
│   ├── step-04-epic-review.md    # Epic 完成报告
│   ├── step-05-project-completion.md # 项目完成
│   └── step-06-final-polish.md   # 最终优化
├── data/                          # 共享数据
│   ├── middleware-complexity-criteria.md
│   ├── git-safety-protocols.md
│   └── code-generation-guidelines.md
└── templates/                     # 模板
    ├── dev-log-template.md
    └── readme-template.md

🔐 Git 安全协议

工作流遵循严格的 Git 安全协议:

  • ✅ 永远不更新 git config
  • ✅ 永远不运行破坏性命令
  • ✅ 永远不跳过 hooks
  • ✅ 总是创建新提交
  • ✅ 按名称添加特定文件
  • ✅ 永远不提交敏感文件

📖 文档

🤝 贡献

欢迎提交 Issue 和 Pull Request!

📄 许可证

MIT License

👤 作者

yrwang45

🙏 致谢

本工作流基于 BMAD(Business Model Agile Development)框架构建。


让文档驱动开发变得简单、可控、可追溯

Made with ❤️ by yrwang45