prd-init

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

PRD 文档包初始化

PRD Document Package Initialization

功能说明

Function Description

此 skill 用于在新项目中快速初始化 PRD 文档包结构。
This skill is used to quickly initialize the PRD document package structure in new projects.

目录结构

Directory Structure

prd-init/
├── SKILL.md          # 主入口
├── commands/         # 子命令
│   └── init.md       # 初始化命令
├── templates/        # 模板文件
│   ├── README.md     # README模板
│   ├── PRD_INDEX.md  # PRD索引模板
│   └── CHANGELOG.md  # 变更日志模板
├── config/           # 配置文件
│   └── config.json   # 配置信息
└── scripts/          # 辅助脚本
    └── utils.js      # 工具函数
prd-init/
├── SKILL.md          # Main entry
├── commands/         # Subcommands
│   └── init.md       # Initialization command
├── templates/        # Template files
│   ├── README.md     # README template
│   ├── PRD_INDEX.md  # PRD index template
│   └── CHANGELOG.md  # Changelog template
├── config/           # Configuration files
│   └── config.json   # Configuration information
└── scripts/          # Auxiliary scripts
    └── utils.js      # Utility functions

子命令

Subcommands

init

init

  • 功能:初始化 PRD 文档包结构
  • 路径
    commands/init.md
  • 描述:创建完整的 PRD 文档包目录结构和基础文件
  • Function: Initialize the PRD document package structure
  • Path:
    commands/init.md
  • Description: Create a complete PRD document package directory structure and basic files

配置文件

Configuration Files

配置文件位于
config/config.json
,包含以下内容:
  • 技能基本信息
  • 模板文件路径
  • 子命令配置
  • 默认命令设置
  • 变量定义
The configuration file is located at
config/config.json
and includes the following content:
  • Basic skill information
  • Template file paths
  • Subcommand configurations
  • Default command settings
  • Variable definitions

模板文件

Template Files

模板文件位于
templates/
目录:
  • README.md
    - 项目说明文档模板
  • PRD_INDEX.md
    - PRD模块总集索引模板
  • CHANGELOG.md
    - 版本变更日志模板
Template files are located in the
templates/
directory:
  • README.md
    - Project description document template
  • PRD_INDEX.md
    - PRD module collection index template
  • CHANGELOG.md
    - Version changelog template

辅助脚本

Auxiliary Scripts

辅助脚本位于
scripts/
目录:
  • utils.js
    - 工具函数,包含日期处理、文件操作等通用功能
Auxiliary scripts are located in the
scripts/
directory:
  • utils.js
    - Utility functions, including general functions such as date processing and file operations

工作流程

Workflow

  1. 检测命令:如果没有指定命令,默认执行
    init
    命令
  2. 执行命令:根据指定的命令执行相应的功能
  3. 使用模板:读取模板文件,替换变量生成最终文档
  4. 创建结构:在指定位置创建 PRD 文档包结构
  1. Command Detection: If no command is specified, the
    init
    command is executed by default
  2. Command Execution: Execute the corresponding function according to the specified command
  3. Template Usage: Read template files, replace variables to generate final documents
  4. Structure Creation: Create the PRD document package structure at the specified location

使用方法

Usage Methods

  1. 调用
    prd-init
    skill
  2. 按照提示输入目标位置
  3. 系统自动创建 PRD 文档包结构
  4. 完成后可以使用
    prd-suite
    skill 生成具体内容
  1. Call the
    prd-init
    skill
  2. Enter the target location as prompted
  3. The system automatically creates the PRD document package structure
  4. After completion, you can use the
    prd-suite
    skill to generate specific content

注意事项

Notes

  • 支持相对路径和绝对路径
  • 如果目标位置不存在,会自动创建
  • 所有文件使用 UTF-8 编码
  • 日期格式为 YYYY-MM-DD
  • Supports relative and absolute paths
  • If the target location does not exist, it will be automatically created
  • All files use UTF-8 encoding
  • Date format is YYYY-MM-DD