附录 D
附录 D:提示词模板
为常见的 PM 工作流复制并改编这些提示词。[方括号]中的占位符需要你提供输入。详细上下文和示例见相关章节。
调查提示词
在 plan 模式(--permission-mode plan)中使用这些进行安全探索。
架构与功能
架构概览
Explain this codebase's architecture to a product manager. Cover the main components, how data flows through the system, key abstractions, and where business logic lives. Skip implementation details—focus on concepts.
功能实现
How does [feature name] work in this application? Specifically:
- What triggers it (user action, scheduled job, external event)?
- What data does it read and write?
- What external services does it call?
- What are the success and failure paths?
关键文件
I need to understand the [feature] feature. What are the five most important files I should know about? For each file, explain what it owns and why it matters.
数据与行为
数据访问
What user data does the [feature] feature access? Show me which database tables or API endpoints it reads from, what fields it uses, and whether it writes anything back.
边缘情况调查
What happens when [condition] occurs during [process]? Walk me through the code path, error handling, and user-facing behavior.
行为解释
Users report that [observed behavior]. Why does this happen? Is it intentional or a bug?
Bug 调查
症状转译
A user reports: "[paste exact complaint]"
Translate this into technical terms. What components might be involved? What should I investigate first?
代码区域识别
I'm investigating a user-reported issue: [one-sentence summary]
Which code areas should I examine? List relevant files, functions, and data flows.
问题层级识别
A user experiences [symptom]. Help me determine if this is likely:
- Frontend (UI, client-side state, browser)
- Backend (API, server logic, processing)
- Data (database, cache, data integrity)
- Integration (third-party services, external APIs)
- Infrastructure (network, hosting, configuration)
Explain your reasoning.
配置调查
What configuration controls [feature]? Show me feature flags, environment variables, and settings that affect its behavior.
访问控制调查
How are permissions checked for [feature]? Show me where access is validated and what roles or conditions are required.
生成提示词
在 acceptEdits 模式中使用这些进行文件创建。
需求与故事
用户故事生成
Generate user stories for the [feature name] feature in docs/user-stories/[feature-name].md.
For each story, include:
- User story in standard format (As a… I want… So that…)
- Acceptance criteria (Given/When/Then)
- Edge cases and error states
- Dependencies on other features
Reference the codebase for technical constraints.
PRD 生成
Create a PRD for [feature name] in docs/prds/[feature-name].md.
Include: Problem statement, success metrics, user stories, scope (in/out), technical considerations, open questions.
Reference existing implementation patterns in this codebase.
用户画像生成
Based on the research materials in [research folder], create persona documents in docs/personas/.
For each distinct user type, include: Name, role, goals, frustrations, key behaviors, quotes from research.
文档
变更日志生成
Generate a changelog entry for version [X.Y.Z] by reviewing git commits since [last version tag].
Format for external users: focus on benefits, not implementation. Group by: New Features, Improvements, Bug Fixes.
README 更新
Review and update README.md to reflect recent changes. Ensure the getting started instructions, feature list, and examples match current behavior.
Bug 报告生成
Based on my investigation, generate a bug report including:
- Summary (one sentence)
- Steps to reproduce
- Expected vs. actual behavior
- Affected code areas (files, functions)
- Hypothesis on root cause
- Suggested investigation path for engineering
分析提示词
使用这些进行综合和洞察生成。
反馈与研究
主题识别
Read all feedback in [feedback folder] and identify the top 10-15 themes that appear repeatedly.
For each theme: Name, description, frequency (how many mentions), representative quotes (3-5 verbatim examples).
反馈分类
Classify feedback in [feedback folder] into these categories: [category 1], [category 2], [category 3], [Other].
Create a summary showing count per category, sentiment breakdown, and notable patterns.
访谈综合
Read interview transcripts in [interview folder] and synthesize patterns across interviews.
Identify: Common pain points, unmet needs, workarounds users have created, emotional reactions, feature requests (explicit and implied).
洞察到行动映射
Review the theme report in [report file] and map each major theme to potential product actions.
For each theme suggest: Quick wins, larger initiatives, and things to monitor but not act on yet.
市场与竞争
竞争对手档案
Research [Competitor Name] using web search and create a profile in research/competitors/[competitor-name].md.
Include: Company overview, target market, core features, pricing model, positioning, strengths, weaknesses, recent news.
竞争矩阵
Based on competitor profiles in research/competitors/, create a comparison matrix in research/competitors/competitive-matrix.md.
Compare: Target audience, pricing, key features, integrations, differentiators.
定价分析
Research [Competitor Name]'s pricing and create a breakdown in research/pricing/[competitor-name]-pricing.md.
Include: Pricing model (per seat, usage, flat), tier structure, feature gates, published prices, discounting patterns if known.
市场规模
Help me size the market for [product/category] using TAM/SAM/SOM. Create research/market-sizing/market-size.md.
For each level, document: Methodology, data sources, assumptions, calculation, confidence level.
验证与审计
PRD 审计
Review [PRD file] for completeness. Check:
- Clear problem statement with evidence
- Measurable success metrics
- User stories with acceptance criteria
- Explicit scope boundaries
- Technical considerations addressed
- Dependencies identified
- Open questions listed
Flag gaps and suggest improvements.
文档审计
Compare documentation in docs/ to current codebase. Identify:
- Outdated information
- Missing documentation for implemented features
- Incorrect examples or code snippets
- Broken internal references
用户画像验证
Review personas in docs/personas/ against source research in [research folder].
For each persona, verify: Claims are supported by research, quotes are accurate, no invented details.
快速定制指南
通过添加约束使提示词更具体:
- "Focus on the user-facing behavior, not internal implementation"
- "Keep the output under 500 words"
- "Format as a table for easy scanning"
- "Include file paths for all code references"
通过要求制品使提示词更彻底:
- "Save the analysis to [specific file path]"
- "Include a summary section at the top"
- "List your assumptions explicitly"
- "Rate your confidence in each finding"
为复杂工作流串联提示词:
- 运行调查提示词以收集上下文
- 使用 /compact 总结发现
- 在上下文建立后运行生成提示词