Vertical slices

From I-Synergy/I-Synergy.Framework · View interactive version

Vertical slices is an AI agent skill from the GitHub repository I-Synergy/I-Synergy.Framework. Translates use cases and user stories into vertical slice blueprint JSON for feature-by-feature implementation. Use after solution-generator to plan each feature as a self-contained vertical slice spanning all layers. Trigger whenever the user says "vertical slice", "feature blueprint", "implement f

How to use this skill

Skill file

Vertical Slices

Translates each use case and user story into a self-contained vertical slice — a complete feature implementation spanning entity, model, domain handler, API endpoint, and test.

What Is a Vertical Slice?

A vertical slice is one feature, fully implemented across all layers. Each slice maps to exactly one Command or Query, delivers shippable value, and has no shared mutable state with other slices.

Input

| Input | Source |

|-------|--------|

| Use Cases | docs/bounded-contexts/{Domain}/use-cases.md |

| User Stories | docs/bounded-contexts/{Domain}/user-stories.md |

| Ubiquitous Language | UBIQUITOUS_LANGUAGE.md |

| Architecture Document | docs/architecture/{SolutionName}-architecture.md |

Output

For each feature:

  1. docs/slices/{Domain}/{Entity}.{Operation}/blueprint.json — implementation blueprint
  2. docs/slices/{Domain}/{Entity}.{Operation}/{Entity}.{Operation}.feature — Gherkin feature file

Blueprint JSON Format

{
  "slice": "{Entity}.{Operation}",
  "bounded_context": "{Domain}",
  "operation_type": "Command | Query",
  "entity": "{Entity}",
  "handler_class": "{Operation}{Entity}CommandHandler",
  "inputs": [
    { "name": "{PropertyName}", "type": "{CSharpType}", "required": true }
  ],
  "outputs": [
    { "name": "{PropertyName}", "type": "{CSharpType}" }
  ],
  "files_to_create": [
    "{Solution}.Domain.{Domain}/Features/{Entity}/Commands/{Operation}{Entity}/{Operation}{Entity}Command.cs",
    "{Solution}.Domain.{Domain}/Features/{Entity}/Commands/{Operation}{Entity}/{Operation}{Entity}CommandHandler.cs",
    "{Solution}.Domain.{Domain}/Features/{Entity}/Commands/{Operation}{Entity}/{Operation}{Entity}Response.cs",
    "{Solution}.Services.{Domain}/Endpoints/{Entity}/{Operation}{Entity}Endpoint.cs",
    "{Solution}.{Domain}.Tests/{Entity}/{Operation}{Entity}CommandHandlerTests.cs"
  ],
  "source": {
    "use_cases": ["UC-{Domain}-{NNN}"],
    "user_stories": ["US-{Domain}-{NNN}"],
    "acceptance_criteria": ["AC-{Domain}-{NNN}.{n}"]
  }
}

`source` — the trace

source records what the slice implements. Identifier formats and allocation rules are defined in

.ai/reference/traceability.md.

stories or use cases, and a uniform shape keeps the validator simple.

once, tagged @AC-…, in the .feature file; it is never duplicated into the blueprint.

a slice that names neither is untraceable by construction.

then tests. A reference to an unlabelled criterion is a dangling reference.

user_story string keys and a top-level free-text acceptance_criteria array of

"Given ... When ... Then ..." strings. Read those as one-element arrays and convert them to

the source form the next time the blueprint is touched; existing blueprints keep parsing and

are not rewritten in bulk.

Steps

  1. Read all use cases and user stories for each bounded context
  2. Map each use case main flow to one Command or Query
  3. For each alternate flow that introduces a distinct outcome, create a separate slice
  4. For each user story, verify it maps to at least one slice — create a slice if missing
  5. Write the blueprint JSON for each slice to docs/slices/{Domain}/{Entity}.{Operation}/, including

its source trace arrays

  1. Extract the Gherkin from the use case/story, including each scenario's @AC-… / @AF-… tag,

and write the .feature file — tags travel with their scenario and are never stripped

  1. Announce: "N vertical slice blueprints written across M bounded contexts."

Slice Naming Convention

| Operation | Handler Suffix | Example |

|-----------|---------------|---------|

| Create | CommandHandler | Create{Entity}CommandHandler |

| Update | CommandHandler | Update{Entity}CommandHandler |

| Delete | CommandHandler | Delete{Entity}CommandHandler |

| Get by ID | QueryHandler | Get{Entity}ByIdQueryHandler |

| Get list | QueryHandler | Get{Entities}ListQueryHandler |

Integration with Solution Generator

Blueprints produced by this skill are consumed by implementation agents. Each blueprint is a standalone work item — an agent can pick up a single blueprint and implement the full slice without reading any other blueprint.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.