use-case-specification

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Use Case Specification

用例规范

Multi-turn conversation to gather use case details and produce a use case specification document.
多轮会话用于收集用例细节并生成用例规范文档。

Principles

原则

  1. One thing at a time. Each response advances exactly one decision or collects one piece of information.
  2. Confirm before proceeding. Wait for the user to approve the spec before considering this skill complete.
  3. Infer, don't interrogate. Use what's already known from the conversation. Only ask when you truly can't infer.
  1. 单次仅处理一项内容:每次回复仅推进一项决策或收集一项信息。
  2. 推进前先确认:在用户确认规范无误前,不判定本技能执行完成。
  3. 合理推断,避免反复询问:利用会话中已获取的信息,仅在确实无法推断时才发起询问。

Workflow

工作流

Step 0: Check for Existing Spec

步骤0:检查现有规范

Before starting discovery, check if a
*_use_case_spec.md
file already exists in the project. If it does, present it to the user and ask whether they want to reuse it, modify it, or start fresh.
在启动信息调研前,先检查项目中是否已存在
*_use_case_spec.md
文件。如果存在,向用户展示该文件并询问用户是否要复用、修改该文件,或是重新创建。

Phase 1: Discovery (1–3 turns)

阶段1:信息调研(1–3轮会话)

Review what is already known from the conversation so far, then identify what is still missing. You need these three things:
  • What is the problem the user is trying to solve with model customization
  • Who will use the finetuned model and in what context
  • Which success criteria can be used to evaluate how well the custom model performs compared to the base model on a test set. Success criteria must be measurable by an LLM-as-a-Judge (e.g., response accuracy, tone adherence) — not things like latency or throughput.
Guidelines:
  • Infer as much as possible from what the user has already said
  • If the user gave examples, use them to fill gaps rather than asking again
  • Only ask clarifying questions when you cannot infer the information needed for Phase 2
  • If everything is already clear, say "You've given me a clear picture. I'll put together a use case specification now." and move to Phase 2.
⏸ Wait for user after each clarifying question.
回顾当前会话中已获取的信息,识别缺失的内容。你需要收集以下三项信息:
  • 什么问题:用户希望通过模型定制解决的问题
  • 谁使用:微调后的模型的使用人群和使用场景
  • 哪些成功标准:用于评估自定义模型相比基模型在测试集上表现优劣的标准,成功标准必须可通过LLM-as-a-Judge衡量(例如回复准确率、语气符合度)——不包括延迟、吞吐量这类指标。
指导规则
  • 尽可能从用户已表述的内容中推断信息
  • 如果用户已经给出示例,直接用示例补全信息缺口,不要重复询问
  • 仅当你无法推断出阶段2所需的信息时,才发起澄清询问
  • 如果所有信息都已明确,告知用户「你提供的信息已经足够清晰,我现在将整理生成用例规范」,然后进入阶段2。
⏸ 每次发起澄清询问后等待用户回复。

Phase 2: Producing a Use Case Specification Document

阶段2:生成用例规范文档

  1. Save all generated artifacts under the project directory structure defined by the directory-management skill, if available.
  2. Synthesize the information you collected from the user into a Markdown document called [relevant_title]_use_case_spec.md containing the following fields (and only these fields):
Use case description
  - Concise problem statement + what the custom model will do
  - Field name: “Business Problem”
  - Type: String

Key stakeholders
  - Who uses the model and in what context
  - Field name: “Primary Users”
  - Type: String, comma separated if there are multiple 

Success criteria
  - A list of 3 criteria (a short name and a description) with which the user measure the success of the custom model. 
  - Field name: “Success Tenets”
  - Type: list of name-description pairs
  1. Present the use case specification in a human-readable format as follows:
I have put together a use case specification and saved it in [relevant_title]_use_case_spec.md.
A use case specification is a design principle recommended by the AWS Responsible AI Lens.
[use case in human-readable format]
Does this match your intent?
⏸ Wait for user approval.
  1. 如果有directory-management技能定义的项目目录结构,将所有生成的产物保存在对应结构下。
  2. 将从用户处收集的信息整合为Markdown文档,命名为[relevant_title]_use_case_spec.md,包含以下字段(且仅包含这些字段):
Use case description
  - Concise problem statement + what the custom model will do
  - Field name: “Business Problem”
  - Type: String

Key stakeholders
  - Who uses the model and in what context
  - Field name: “Primary Users”
  - Type: String, comma separated if there are multiple 

Success criteria
  - A list of 3 criteria (a short name and a description) with which the user measure the success of the custom model. 
  - Field name: “Success Tenets”
  - Type: list of name-description pairs
  1. 按照如下易读格式向用户展示用例规范:
我已经整理好用例规范并保存在[relevant_title]_use_case_spec.md中。
用例规范是AWS Responsible AI Lens推荐的设计原则。
[use case in human-readable format]
是否符合你的预期?
⏸ 等待用户确认。

use_case_specification Edit Protocol

use_case_specification 修改协议

  • If the user requests changes pertaining to any information covered by use_case_spec.md, you must edit it accordingly and ask for confirmation again.
  • The user can edit use_case_spec.md directly if they want to. If the user says they've updated the file directly, read it to get the latest in your context.
  • 如果用户要求修改use_case_spec.md中包含的任意信息,你必须对应修改文件内容并再次请求用户确认。
  • 用户可直接编辑use_case_spec.md文件。如果用户告知已直接更新文件,请读取文件内容更新上下文信息。