--- name: edu-pm-workflow description: "Product management workflow for producing PRDs, interactive HTML prototypes, flowcharts, acceptance checklists, demand analysis, and data reports. Use when the user describes a product requirement, asks for PRD/prototype/flowchart/checklist/data-analysis output, or wants to continue this PM workflow." user-invocable: true --- # PM Workflow Skill This skill turns product requirements into working artifacts: PRD HTML, interactive prototype HTML, flowchart HTML, acceptance checklist, demand analysis, and data reports. It is designed for product work across different business domains and product types. ## First Decision 1. If `.agents/workflows/` exists, do not re-initialize. Read the relevant workflow file and continue from the current project state. 2. If `.agents/workflows/` or required scripts are missing, install this skill into the project once (command below). 3. If the user explicitly asks to reinstall or update the workflow, run the same command. Runtime scripts are always refreshed; files the user has edited are kept and the new version is written to `.pm-workflow/updates/` for comparison. Replaced copies are backed up under `.handoff/skill-backups/`. Install / update — run `scripts/initialize.py` with the platform's Python. It is the single cross-platform installer; `scripts/init.sh` and `scripts/init.bat` are only thin wrappers around it for users who prefer a double-click. ```bash # macOS / Linux python3 /scripts/initialize.py --project . ``` ```bat rem Windows (py is the official launcher; there is no python3 command) py -3 \scripts\initialize.py --project . ``` Locating ``: use your file-search tool (Glob/Grep) for `**/edu-pm-workflow/scripts/initialize.py` across the project and the user's skill directories (`.agents/skills`, `~/.agents/skills`, `~/.claude/skills`, `~/.cursor/skills`). Do **not** shell out to `find` — on Windows `find` is `System32\find.exe`, a text-search tool that takes entirely different arguments, so the discovery step itself would fail before installation ever starts. ## Workflow Routing Load only the workflow needed for the user's current request: Artifacts are organized **per requirement**: each requirement gets ONE top-level folder named after it (`[需求名]/`), holding up to seven artifact subfolders — `需求文档/ 原型/ 流程图/ 原型截图/ 需求挖掘/ 验收清单/ 数据分析/` plus `沟通记录.md`. `scripts/`, the two start-service entries (`启动原型导出服务.command` on macOS, `启动原型导出服务.bat` on Windows), `.handoff/`, `关键点.md`, `.agents/` stay at the project root and are shared across requirements. **Folder ownership (applies to ALL four workflows):** Whichever workflow runs first creates `[需求名]/`. Before writing, every workflow first checks whether `[需求名]/` already exists — if so it reuses that folder and drops its output into the matching subfolder; if not it creates `[需求名]/`. PRD is **not** assumed to come first: a requirement may begin with demand discovery or data analysis, and all later steps reuse the same `[需求名]/`. Only create the subfolders actually used — never pre-create empty ones. Use an identical `[需求名]` across every workflow so all outputs land in one folder. | User intent | Read this file first | Primary output | |---|---|---| | New requirement, PRD, prototype, flowchart, continue PRD work | `.agents/workflows/edu-pm-prd.md` | `[需求名]/需求文档/[需求名]-PRD.html`, `[需求名]/原型/[需求名]-prototype.html`, `[需求名]/流程图/[需求名]-flow.html`, `[需求名]/流程图/[需求名]-screenflow.html` (交互流程图, as needed) | | Demand discovery, user needs, competitive/product insight | `.agents/workflows/edu-pm-demand.md` | `[需求名]/需求挖掘/[需求名]-需求洞察.html` | | Acceptance checklist, test checklist, launch verification | `.agents/workflows/edu-pm-acceptance.md` | `[需求名]/验收清单/[需求名]-验收清单.html` | | Metrics, BI-style analysis, report from data | `.agents/workflows/edu-pm-data-analysis.md` | `[需求名]/数据分析/[需求名]-数据分析.html` | For PRD work, treat `.agents/workflows/edu-pm-prd.md` as the authoritative project workflow. Do not use root-level `edu-pm-prd.md` if both exist. ## PRD Workflow Rules - **Confirm the requirement before writing when core information is missing; ask only focused questions.** The six-dimension completeness check has a **材料** dimension (§1.2): ask once for the tracking dictionary, design spec / brand accent, and any existing prototype screenshots — finding out at §数据埋点 that no dictionary exists means interrupting the user mid-draft or inventing field names. - **Carry the confirmation into the document.** §1.4 maps each confirmed item to its PRD location: 核心改动 → 功能清单+详细方案; 成功指标 → 需求目标表; **不做 / 范围外 → 需求概述的「范围块」**; 背景证据 → 需求背景三段式; 跨页规则 → 需求概述规则表; 待确认项 → 正文末尾清单. A "不做" that was agreed verbally but never written into the PRD does not count as confirmed. - **Copy `assets/templates/prd-content.html` and fill it in — do not hand-write the HTML skeleton.** That file already carries the right class names, table headers, `colgroup` widths, `.desc-block` structure and `data-preview` placeholders; nearly every historical defect (descriptions using `
` instead of `

`, wrong column counts, missing `colgroup`) came from rebuilding the structure from memory. - **Run `assets/scripts/validate_prd.py` before delivery and report the result honestly.** It mechanically checks: core chapters present, 项目信息/版本记录 not merged, no standalone boundary chapter, continuous chapter numbering, all six table headers and column counts, meta-table is two-column, every 详细方案 row has `data-preview` and a non-empty 原型 cell, description cells use `.desc-block` with no `
` and no multi-number cramming, snake_case tracking names with six columns, `#prdContent` contains its own `