write-persistence-scenarios

Writes persistence scenarios covering create, update, and delete operations from business events.

Updated Sep 4, 2026
One-click install
npx skills add https://github.com/nakamori-naoya/bdd-discovery-and-formulation-plugins --skill write-persistence-scenarios-nakamori-naoya
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: write-persistence-scenarios
Source: https://github.com/nakamori-naoya/bdd-discovery-and-formulation-plugins/tree/main/plugins/bdd-discovery-and-formulation/internal/write-persistence-scenarios
Command: npx skills add https://github.com/nakamori-naoya/bdd-discovery-and-formulation-plugins --skill write-persistence-scenarios-nakamori-naoya

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Before designing a relational data model, teams often jump straight to tables without clarifying what business facts must be created, updated, or deleted and why. This Skill turns existing business scenarios and business events into explicit persistence scenarios, so data modeling starts from verified business grounds rather than guesses. ## Core Features & Use Cases - Persistence Scenario Authoring: Writes each scenario with actor, pre-state, business event, conditions, business decision, resulting facts, next state, history, and retention conditions. - Three-Operation Coverage Check: Records create, update, and delete as covered or not-applicable with reasons, distinguishing business cancellation from physical deletion. - Condition Matrix Validation: Pipes a condition matrix JSON via stdin to scripts/scenario_matrix.py, which reports violations as JSON lines with exit codes 0 (clean), 1 (violations), or 2 (unreadable input). - Use Case: Given order placement, cancellation, and refund business scenarios, produce confirmed persistence scenarios that a data modeling step can consume without unverified assumptions. ## Quick Start Using these business events and scenarios, write the persistence scenarios covering create, update, and delete before we start data modeling.

Frequently Asked Questions about write-persistence-scenarios

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write persistence scenarios before data modeling?▼

Derive each scenario from a business event and record actor, pre-state, conditions, business decision, resulting facts, next state, history, and retention conditions. Cover create, update, and delete explicitly, marking each as covered or not-applicable with a business reason.

What is the difference between business cancellation and physical deletion?▼

Business cancellation, expiration, or termination is an update that appends a new fact, not a deletion. Physical deletion is only allowed when the business defines that the retention reason is exhausted, and the two must never be mixed in scenarios.

How does the scenario matrix validation script work?▼

Pipe a condition matrix JSON to python3 scripts/scenario_matrix.py check via standard input. It prints violations as JSON lines and exits with 0 for clean, 1 for violations, or 2 when the input is empty or not valid JSON.

What inputs are required before writing persistence scenarios?▼

You need a grounded list of business events, related roles, and existing business scenarios or logical design documents held in the same context. Without these inputs the skill stops and reports what is missing rather than inventing judgments.

What happens when some scenarios remain unconfirmed?▼

Unconfirmed scenarios are passed to data modeling marked as assumed or unknown, with the confirmation contact recorded. Hypothesis-dependent records must be explicitly labeled as hypotheses in the logical model.