slice-decomposition

Classify proposed features as new slices, extensions, or shared code.

2|Updated Aug 13, 2023
One-click install
npx skills add https://github.com/NNPopov/movie-theater-tickets --skill slice-decomposition
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: slice-decomposition
Source: https://github.com/NNPopov/movie-theater-tickets/tree/main/src/clients/.claude/skills/slice-decomposition
Command: npx skills add https://github.com/NNPopov/movie-theater-tickets --skill slice-decomposition

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you decide how to organize new functionality so you do not mix independent screens, overlapping workflows, and shared code into the wrong place.

Core Features & Use Cases

  • New slice vs. extension: Decide whether a request should become its own slice or fit into an existing state machine.
  • Shared code boundaries: Identify when logic belongs in shared code and when it should stay slice-specific.
  • Architecture planning: Use it when decomposing features with multiple screens, entry points, or operations that may be triggered from different places.
  • Use Case: A team is adding an edit screen and a delete action for the same entity; this Skill helps separate the edit flow, keep delete reusable, and avoid overloading one slice.

Quick Start

Ask me whether a proposed feature should be a new slice, an extension of an existing slice, or shared code.

Frequently Asked Questions about slice-decomposition

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

FAQPage Schema
How do I decide if a new Flutter feature should be a separate slice or extend an existing state machine?

To decide on feature decomposition for a Flutter application, evaluate whether the functionality represents an independent flow or extends an existing state machine. If the feature requires isolated state management and separate multi-step workflows, create a new slice; otherwise, extend the existing slice.

What is slice decomposition in clean architecture?

Slice decomposition in clean architecture is the process of splitting features into the right slices by reasoning about independent flows, bounded contexts, and state machines. It organizes modular application architectures by ensuring independent screens and overlapping workflows remain structurally separated.

When should shared code be used instead of slice-specific logic in feature architecture?

Shared code should be used when logic needs to be triggered from multiple independent flows, whereas slice-specific logic should stay isolated within a bounded context. Evaluate if the abstraction serves a single slice or supports cross-cutting operations before promoting it to shared code.

Does this feature decomposition approach work for planning multi-step workflows with overlapping operations?

Yes, feature decomposition applies specifically to planning conversations about multi-step workflows with overlapping operations. It uses boundary-aware reasoning to separate independent flows, ensuring operations triggered from different places do not overload a single slice or mix with shared code.

What is the best way to separate an edit screen and delete action for the same entity in modular application architectures?

The best way to handle this in modular application architectures is to separate the edit flow into its own slice while keeping the delete action reusable. This prevents overloading one slice and ensures the delete operation can be triggered from different places via shared code.