Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

eventmodeling-elaborating-scenarios事件建模阐述场景

Agent Skill

eventmodeling-elaborating-scenarios 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

490

周安装

20

GitHub Stars

公开资料未说明

下载量

157
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:eventmodeling-elaborating-scenarios(事件建模阐述场景)
来源仓库:https://github.com/trogonstack/agentskills
仓库路径:skills/eventmodeling-elaborating-scenarios
安装命令:
npx skills add https://github.com/trogonstack/agentskills --skill eventmodeling-elaborating-scenarios
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/trogonstack/agentskills --skill eventmodeling-elaborating-scenarios

简介

eventmodeling-elaborating-scenarios 扩展核心业务流程的详细场景用例。

  • 涵盖正常路径、异常处理与状态违规等多种情况。
  • 帮助识别隐藏的业务规则与边界条件,减少上线后缺陷。
  • 适用于测试用例编写前的充分场景准备阶段。
  • 输出可作为验收标准,支撑前后端联调与自动化测试设计。

SKILL.md

Elaborating Scenarios

Interview Phase (Optional)

When to Interview: Skip if the user has already specified: scenario coverage depth (happy path + validation + state violations), known edge cases to include, and stakeholders available for review. Interview when coverage goals are unclear or edge cases haven't been identified.

Interview Strategy: Align on scenario depth and coverage strategy to avoid under-specification or excessive documentation. Identify stakeholders who can validate business rules.

Critical Questions

When scenario coverage is uncertain:

  1. Scenario Depth & Coverage Goals (Impact: Determines scope—happy path only vs. comprehensive coverage)

- Question: "How comprehensive should scenario coverage be? (A) Happy path + basic validation, (B) All command variations, (C) Comprehensive including edge cases and error paths" - Why it matters: Affects time investment and implementation complexity; production code needs (C), design validation might use (A) or (B) - Follow-up triggers: If (C) → ask "How many scenarios per command is reasonable?"; if (A) → clarify MVP vs. production distinction

  1. Known Edge Cases & Business Rules (Impact: Ensures critical scenarios aren't missed)

- Question: "What specific edge cases or business rules are critical to test? (e.g., 'order cancellation within 24 hours', 'payment decline recovery')" - Why it matters: Business rules often generate overlooked scenarios; edge cases reveal missing events - Follow-up triggers: For each rule → ask "What scenarios demonstrate this rule? What happens when it's violated?"

  1. Testing & Automation Strategy (Impact: Shapes scenario detail and executable format)

- Question: "Will these scenarios be: (A) Automated tests, (B) Manual QA reference, (C) Documentation only?" - Why it matters: Automated tests need precise Given/When/Then; documentation can be more narrative - Follow-up triggers: If (A) → ask about test framework; if (B) → ask about QA process

  1. Stakeholder Review & Validation (Impact: Determines who validates business logic correctness)

- Question: "Who will review and validate scenarios? (A) Product Owner, (B) QA/Tester, (C) Multiple roles, (D) Engineering only?" - Why it matters: Multi-role review catches business logic errors; single role may miss perspective - Follow-up triggers: If (A) only → ask "Will PO have time for detailed review?"; if (C) → plan review workshop

Interview Flow

Conditional Entry:

If user has provided:
  - Clear scenario coverage goals (happy path + validation + state violations)
  - AND identified edge cases or known business rules to test
  - AND specified who will review/validate scenarios

Then: Skip interview, proceed directly to scenario elaboration

Else: Conduct interview

Phase 1: Coverage Planning (Questions 1-2)

  • Determine depth (happy path vs. comprehensive)
  • Identify critical edge cases to cover
  • Establish coverage priorities

Phase 2: Implementation & Review (Questions 3-4)

  • Decide on automation vs. documentation
  • Confirm stakeholder availability
  • Plan review workflow

Capturing Interview Findings

Append findings to the project's event modeling file:

File: .trogonai/interviews/[project-name]/EVENTMODELING.md

Use Write tool to add/update this section:

## 9. Scenarios (eventmodeling-elaborating-scenarios)

### Coverage Goals
[From Q1: Happy path / Comprehensive / Deep]

### Critical Edge Cases
[From Q2]
- Edge case 1: [Case] → [Why important]
- Edge case 2: [Case] → [Why important]

### Business Rules Requiring Scenarios
[From Q2]
- Rule 1: [Statement] → Success + Failure scenarios
- Rule 2: [Statement] → Success + Failure scenarios

### Testing Strategy
[From Q3: Automated / Manual / Documentation]

### Review & Validation
[From Q4: Who reviews, when, workflow]

### Key Scenario Specifications
[GWT format scenarios for critical commands and views]

---

## Validation & Completeness

### Validated
- [ ] All fields traced (completeness check)
- [ ] Events are immutable
- [ ] State projections deterministic
- [ ] Model ready for code generation

**Validation Date**: [Date]

Update Interview Trail:

| 9 | eventmodeling-elaborating-scenarios |  [today] | Scenario coverage, testing strategy, edge cases |

At this point, EVENTMODELING.md is complete and ready for implementation!


Workshop Facilitation Guide

Context: Scenarios are created in a collaborative workshop with multiple stakeholders. Use this approach for rapid, real-time scenario creation:

Before the Workshop

Participants (required roles):

  • Product Owner/Domain Expert: Knows business rules, priorities, edge cases
  • Developer: Technical feasibility, implementation concerns
  • QA/Tester: Test coverage, edge cases, error scenarios
  • Facilitator: Keeps pace, ensures shared understanding, captures scenarios

Setup:

  • Whiteboard or collaborative tool (Miro, Figma, etc.)
  • Sticky notes or digital cards for scenarios
  • Previously completed steps: Events timeline and system boundaries
  • Timer for time-boxing per command/view

During Workshop (Per Command/View)

Rapid Cycle (15-20 min per command):

  1. Happy Path First: "What's the normal success case?" (Product Owner leads)

- Facilitator writes scenario live - All roles review in real-time - Adjust based on feedback

  1. Validation Failures: "What could go wrong with inputs?" (Developer/QA)

- Common: invalid format, missing fields, invalid references - Quick scenarios, add to board

  1. State Violations: "What if system is in wrong state?" (Domain Expert)

- Example: "Can't confirm if already confirmed" - These are business rules, often overlooked

  1. Alternative Paths: "Are there other ways this could work?" (Product Owner)

- Different paths through the same command - Different outcomes based on business logic

  1. Error Handling: "What if external systems fail?" (Developer)

- Payment decline, inventory unavailable - Recovery/retry scenarios

  1. Compensation: "Can this be undone?" (Domain Expert)

- Cancellation, reversal, refund flows - Often reveal missing events

Review Style:

  • Each scenario read aloud by facilitator
  • Quick check: "Is this right?" (Everyone nods or speaks up)
  • Move forward—don't perfect, iterate later
  • Target: 3-5 scenarios per command, 10-20 minutes per command

Multi-Role Review

As scenarios are written, ensure each role checks:

  • Product Owner: "Is this the right business behavior?"
  • Developer: "Can we implement this? Need system state? Edge cases?"
  • QA: "Can we test this? Is it clear enough?"
  • Facilitator: "Do we have enough detail for coding?"

Common Workshop Mistakes to Avoid

Perfectionism: Don't spend 30 minutes on one scenario. Capture and move. Missing roles: One person can't represent all perspectives. Too technical: Use domain language, not code. Adjust in implementation. Incomplete givens: "Given an order" is too vague. Specify state. Unclear events: Every scenario must show what event is produced (or why not).

Tips for Rapid Creation

Use templates: Have sticky note templates with Given/When/Then pre-printed Parallel work: Different people write different scenarios simultaneously Capture edge cases: When someone says "What if...?" → immediately capture as scenario Reference past decisions: Point to event timeline and boundary diagrams Record decisions: Why did we choose this behavior? (Helps implementers later)

Workflow

For each command and view, write scenarios in Given-When-Then format:

1. Command Scenarios (Given-When-Then)

Specify command behavior:

Feature: Order Creation

Scenario: Create order successfully
Given a customer with ID "cust-123"
And products exist with IDs ["prod-1", "prod-2"]
And customer has valid shipping address
When the customer creates an order with items:
    | productId | quantity | unitPrice |
    | prod-1    | 2        | 50.00    |
    | prod-2    | 1        | 30.00    |
Then the order should be created with status "Draft"
And the total should be calculated as 130.00
And an "OrderCreated" event is produced with:
    | field | value |
    | orderId | {uuid} |
    | customerId | cust-123 |
    | items | [...] |
    | total | 130.00 |
    | status | Draft |

Scenario: Reject order with invalid customer
Given a customer ID "invalid-cust"
And no customer exists with that ID
When the customer tries to create an order
Then the command should be rejected
And the rejection reason is "Customer not found"
And no event is produced

Scenario: Reject order with empty items
Given a customer with ID "cust-123"
And an empty items list []
When the customer tries to create an order
Then the command should be rejected
And the rejection reason is "Order must contain items"
And no event is produced

Scenario: Reject order with invalid address
Given a customer with ID "cust-123"
And an incomplete shipping address (missing city)
When the customer tries to create an order
Then the command should be rejected
And the rejection reason is "Invalid shipping address"
And no event is produced

2. Command Scenarios - State Validation

Specify how stream state affects command:

Feature: Order Confirmation

Scenario: Confirm order in Draft state
Given an order "order-456" in Draft state
And OrderCreated event exists
And no OrderConfirmed event exists
When the customer confirms the order with payment method "card"
Then the order should be confirmed
And an "OrderConfirmed" event is produced with:
    | field | value |
    | orderId | order-456 |
    | paymentMethod | card |
    | confirmedAt | {timestamp} |

Scenario: Reject confirming already-confirmed order
Given an order "order-456" in Confirmed state
And OrderConfirmed event already exists
When the customer tries to confirm the order again
Then the command should be rejected
And the rejection reason is "Order already confirmed"
And no OrderConfirmed event is produced

Scenario: Reject confirming cancelled order
Given an order "order-456" in Cancelled state
And OrderCancelled event exists
When the customer tries to confirm the order
Then the command should be rejected
And the rejection reason is "Cannot confirm cancelled order"
And no event is produced

3. View Scenarios (Given-When-Then)

Specify how read models display data:

Feature: Order Status View

Scenario: Display order after creation
Given an OrderCreated event with:
    | field | value |
    | orderId | order-789 |
    | customerId | cust-123 |
    | items | [{...}] |
    | total | 150.00 |
When the OrderStatusView processes this event
Then the view should display:
    | field | value |
    | Order ID | order-789 |
    | Status | Draft |
    | Total | $150.00 |
    | Items | 3 products |
    | Created | {date} |

Scenario: Update status after confirmation
Given an OrderCreated event already processed
And OrderStatusView showing status "Draft"
When an OrderConfirmed event is received with:
    | field | value |
    | orderId | order-789 |
    | confirmedAt | 2024-12-31T10:00:00Z |
Then the view should update to display:
    | field | value |
    | Status | Confirmed |
    | Confirmed Date | 12/31/2024 10:00 AM |

Scenario: Accumulate payment information
Given OrderConfirmed event processed (status=Confirmed)
When a PaymentAuthorized event arrives with:
    | field | value |
    | orderId | order-789 |
    | paymentId | pay-123 |
    | authCode | AUTH-456 |
Then the view should accumulate:
    | field | value |
    | Payment ID | pay-123 |
    | Auth Code | AUTH-456 |
    | Payment Status | Authorized |

4. Error Path Scenarios

Specify how system handles failures:

Feature: Payment Authorization Failure

Scenario: Handle declined payment
Given an order "order-001" in Confirmed state
And customer initiates payment
When the payment gateway declines the card
Then a PaymentFailed event is produced with:
    | field | value |
    | orderId | order-001 |
    | reason | Card declined |
    | timestamp | {now} |

Scenario: Update order view on payment failure
Given OrderStatusView shows status "Confirmed"
When PaymentFailed event arrives for order-001
Then the view should update:
    | field | value |
    | Payment Status | Failed |
    | Failure Reason | Card declined |
    | Retry Available | Yes |

Scenario: Allow retry after payment failure
Given a PaymentFailed event exists
And order status is still "Confirmed"
When customer retries payment
Then the new AuthorizePayment command is accepted
And can produce new PaymentAuthorized event

5. Compensation Scenarios

Specify rollback/cancellation flows:

Feature: Order Cancellation

Scenario: Cancel order in Draft state
Given an order "order-555" in Draft state
And only OrderCreated event exists
When customer cancels the order with reason "Changed mind"
Then an OrderCancelled event is produced with:
    | field | value |
    | orderId | order-555 |
    | reason | Changed mind |
    | cancelledAt | {timestamp} |

Scenario: Cannot cancel completed order
Given an order "order-555" in Delivered state
And DeliveryConfirmed event exists
When customer tries to cancel
Then the command should be rejected
And the rejection reason is "Cannot cancel delivered order"

Scenario: Trigger compensation on cancellation
Given an order in Confirmed state
And PaymentAuthorized event exists
When OrderCancelled event is produced
Then a RefundPayment command should be automatically triggered
And RefundInitiated event should follow

Output Format

Present as:

# Scenarios: [Domain Name]

## Commands

### Command: CreateOrder

**Description**: Customer creates a new order with items and shipping address.

#### Scenario 1: Successful Order Creation

Given a customer with ID "cust-123" And products ["prod-1", "prod-2"] exist in catalog And the shipping address is valid When the customer creates an order: | customerId | cust-123 | | items | [{productId: prod-1, qty: 2}, {productId: prod-2, qty: 1}] | | shippingAddress | {street, city, state, zip} | Then the command succeeds And an "OrderCreated" event is produced with all input data And the order status is "Draft"


#### Scenario 2: Reject with Invalid Customer

Given a customer ID "invalid" that doesn't exist When the customer tries to create an order Then the command is rejected And the error is "Customer not found" And no event is produced


[Continue for each scenario]

---

### Command: ConfirmOrder

**Description**: Customer confirms order and selects payment method.

#### Scenario 1: Confirm Draft Order

Given an order in "Draft" state And OrderCreated event exists When the customer confirms with paymentMethod="card" Then an "OrderConfirmed" event is produced And the order status becomes "Confirmed"


#### Scenario 2: Prevent Duplicate Confirmation

Given an order already in "Confirmed" state And OrderConfirmed event already exists When the customer tries to confirm again Then the command is rejected And the error is "Order already confirmed" And no new event is produced


---

## Views

### View: OrderStatusView

**Description**: Real-time order status display showing accumulated event data.

#### Scenario 1: Initial Display After Creation

Given an OrderCreated event with id, customer, items, total, address When the view processes this event Then the view displays: - Order ID: order-123 - Status: Draft - Total: $150.00 - Items: 3 products - Customer: cust-456


#### Scenario 2: Update on Confirmation

Given the view displaying status="Draft" When an OrderConfirmed event arrives Then the view updates to: - Status: Confirmed - Confirmed At: {timestamp} - Payment Method: (from event)


#### Scenario 3: Accumulate Payment Data

Given status="Confirmed" When PaymentAuthorized event arrives Then the view shows: - Payment Status: Authorized - Auth Code: (from event) - Payment ID: (from event)


---

## Error Paths

### Scenario: Payment Decline

Given an order in "Confirmed" state When payment gateway declines Then PaymentFailed event is produced And OrderStatusView updates to show: - Payment Status: Failed - Retry Available: true


---

## Compensation Flows

### Scenario: Order Cancellation with Refund

Given an order in "Confirmed" state And PaymentAuthorized event exists When OrderCancelled event is produced Then a RefundPayment command is triggered And RefundInitiated event follows And inventory reservation is released

Quality Checklist

  • Every command has success scenario
  • Every command has failure scenarios
  • Every command has state-validation scenarios
  • State preconditions are explicit (Given)
  • Actions are clear (When)
  • Outcomes are verifiable (Then)
  • Event data is specified
  • Rejection reasons are clear
  • Every view has update scenarios
  • Alternative paths documented
  • Compensation flows specified
  • Error handling explicit
  • Workshop facilitation approach documented
  • All stakeholder roles (PO, Dev, QA, Domain Expert) perspectives captured
  • Rapid time-boxing used (15-20 min per command)
  • Edge cases suggested by participants captured
  • Why behind business rules documented (not just the what)

Gherkin Best Practices

Good:
Given an order in "Draft" state
When the customer confirms the order
Then the status changes to "Confirmed"

Bad:
Given order
When stuff happens
Then it works

Good:
And an OrderConfirmed event is produced with:
    | field | value |
    | orderId | order-123 |

Bad:
And an event is produced

Good:
Then the command is rejected
And the error is "Customer not found"

Bad:
Then there's an error

Scenario Organization

  1. Happy Path: Successful execution
  2. Validation Failures: Invalid inputs
  3. State Violations: Wrong pre-conditions
  4. Duplicate Actions: Already processed
  5. Alternative Paths: Different branches
  6. Error Handling: Failures and recovery
  7. Compensation: Rollback and cleanup

Key Principles

  1. One Scenario = One Test: Each scenario is testable
  2. Explicit Preconditions: State is clear in "Given"
  3. Clear Actions: "When" describes user/processor action
  4. Verifiable Outcomes: "Then" checks results
  5. Event-Centric: Every scenario produces or updates events
  6. Business Language: Use domain terms, not technical jargon

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

37.18%
按下载量换算58

Claude

30.31%
按下载量换算48

Cursor

17.62%
按下载量换算28

Gemini CLI

9.57%
按下载量换算15

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills