p-story-analysis

A set of rules for turning a product request into a clear, checkable plan. It covers gathering context, splitting work into smaller features, checking technical feasibility, and recording risks and acceptance criteria.

In plain words
What is it for?
Use it when receiving a new requirement or a change request, estimating technical work, identifying dependencies and risks, and preparing a requirements checklist for confirmation.
Why use it?
It reduces misunderstandings caused by vague or incomplete requirements. It also makes important decisions, limits, measurements, and approvals explicit before implementation.

Cursor rule

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/xyzbit/ai-coding/p-story-analysis
Clone the repo
git clone --depth 1 https://github.com/xyzbit/AI-Coding
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 650 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00005 $0.00650
Opus 5 $0.00003 $0.00325
Sonnet 5 $0.00001 $0.00130
Haiku 4.5 $0.00001 $0.00065

Measured 2d ago against content hash 1445e22ff270, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

p-story-analysis scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

cursor/rules/plan/p-story-analysis.mdc · 87 lines

What it actually says

需求分析规则 (Story Analysis Guidelines)

规则目的

本规则旨在指导需求分析过程,确保需求的完整性、准确性和可执行性。

触发条件

当遇到以下情况时,应执行本规则:

  1. 收到新的需求文档或需求变更
  2. 需要进行需求分析和确认
  3. 需要进行技术可行性评估

核心步骤

1. 需求收集与理解

  • 必要信息收集

    • 业务背景和目标
    • 核心业务流程
    • 功能需求清单
    • 非功能性需求(性能、安全等)
    • 约束条件和限制
  • 关键指标确认

    • 业务指标(如转化率、使用率)
    • 技术指标(如响应时间、并发量)
    • 质量指标(如可用性、稳定性)

2. 需求分析流程

  • 需求分解

    1. 将大需求拆分为可独立交付的小功能点
    2. 识别功能点之间的依赖关系
    3. 确定功能点的优先级
    
  • 技术可行性评估

    1. 评估现有系统架构的支持程度
    2. 识别技术难点和风险点
    

3. 沟通确认机制

  • 必须确认项

    1. 模糊描述必须量化(例如:
       - "提升性能" → "API响应时间≤200ms"
       - "优化体验" → "操作步骤减少50%")
    2. 技术方案的风险点和应对措施
    3. 资源需求和时间预估
    
  • 输出文档要求

    《需求确认清单》,包含:
       - 功能点列表
       - 具体指标要求
       - 验收标准
       - 假设条件
    

4. 风险管理

  • 风险评估维度
    1. 技术风险
       - 技术可行性
       - 性能瓶颈
       - 安全隐患
    2. 业务风险
       - 需求变更可能性
       - 业务规则冲突
       - 用户接受度
    

验收标准

  1. 需求文档完整性检查表
  2. 技术方案评审通过
  3. 产品方(用户)确认签字
  4. 风险评估报告评审通过

注意事项

  1. 严禁对需求进行主观臆断,
  2. 所有关键决策必须进行确认
  3. 定期同步需求变更和进展状态
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 87 lines · 5 tokens per session scan A 1445e22ff270

Subscribe to this mod's changes

p-story-analysis is a cursor rule published in the GitHub repository xyzbit/AI-Coding (21 stars, last pushed 10mo ago), licensed Apache-2.0. It adds 5 tokens to every session and 650 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.