Component Identifier
by @quochungto
Decompose a system into well-defined components using structured discovery techniques. Use this skill whenever the user is designing a new system from requir...
clawhub install bookforge-component-identifierπ About This Skill
name: component-identifier description: Decompose a system into well-defined components using structured discovery techniques. Use this skill whenever the user is designing a new system from requirements, breaking down a monolith into modules, deciding how to organize code into packages/services, asking "what components should this system have?", or struggling with component granularity β even if they don't use the word "component." version: 1.0.0 homepage: https://github.com/bookforge-ai/bookforge-skills/tree/main/books/fundamentals-of-software-architecture/skills/component-identifier metadata: {"openclaw":{"emoji":"π","homepage":"https://github.com/bookforge-ai/bookforge-skills"}} status: draft depends-on: - architecture-characteristics-identifier source-books: - id: fundamentals-of-software-architecture title: "Fundamentals of Software Architecture" authors: ["Mark Richards", "Neal Ford"] chapters: [8] tags: [software-architecture, architecture, components, decomposition, modularity, domain-driven-design] execution: tier: 1 mode: full inputs: - type: none description: "System requirements, user stories, or domain description β the skill guides discovery from there" tools-required: [Read, Write] tools-optional: [Grep, Glob] mcps-required: [] environment: "Any agent environment. If a codebase exists, can analyze existing component structure."
Component Identifier
When to Use
You're designing a system and need to figure out what the building blocks should be β what components, modules, or services to create and how they relate. Typical situations:
UserManager, OrderManager instead of real componentsBefore starting, verify:
architecture-characteristics-identifier first β characteristics affect component division.Context & Input Gathering
Input Sufficiency Check
The skill needs to know WHO uses the system and WHAT they do. Without actors and actions, component identification is guesswork.
Check the user's prompt for:
Required Context (must have β ask if missing)
Observable Context (gather from environment)
architecture-characteristics-identifier
β Reveals: which parts need different quality attributesDefault Assumptions
Sufficiency Threshold
SUFFICIENT when: system purpose + at least 3 actors + at least 5 workflows are known
PROCEED WITH DEFAULTS when: system purpose is known but actors/workflows are sparse
MUST ASK when: system purpose is unclear or no workflows are stated
Process
Step 1: Choose Partitioning Style
ACTION: Decide between technical partitioning (layers) and domain partitioning (workflows).
WHY: This is the most fundamental decision β it determines the shape of everything else. Technical partitioning (Presentation β Business Rules β Persistence) was the standard for decades, but domain partitioning (organized by business workflows) has become the industry standard for both monoliths and microservices. Domain partitioning makes it easier to migrate to distributed architecture later, aligns with how the business thinks, and produces components with higher functional cohesion.
| Style | Organizes by | Best for | Watch out for | |-------|-------------|----------|--------------| | Technical | Layers: presentation, business, persistence | Simple CRUD apps, teams familiar with layered patterns | Domains smeared across layers, hard to migrate | | Domain | Workflows: order processing, inventory, shipping | Modern apps, microservice-ready, cross-functional teams | Customization code appears in multiple places |
IF the user hasn't specified β recommend domain partitioning with explanation. IF the user has an existing technically-partitioned system β note the trade-offs of restructuring.
Step 2: Identify Actors and Actions
ACTION: List all actors (users, roles, external systems) and map their actions.
WHY: Components should align with what users DO, not what data exists. The Actor/Actions approach (from the Rational Unified Process) starts from real usage patterns, not database tables. This prevents the Entity Trap β the most common component identification mistake. If you start from "what data do we store?", you get UserManager, OrderManager (an ORM, not an architecture). If you start from "what do users do?", you get PlaceOrder, ProcessPayment, ManageInventory (real workflows).
Alternative: For event-heavy systems, use Event Storming instead β map domain events first, then group into components.
Output a table:
| Actor | Actions |
|-------|---------|
| Customer | Browse catalog, place order, track delivery, submit review |
| Store owner | Manage inventory, set prices, view reports |
| Payment system | Process payment, issue refund |
Step 3: Map Actions to Initial Components
ACTION: Group related actions into candidate components. Each component should represent a cohesive workflow.
WHY: The goal is a coarse-grained substrate β not the final design. The likelihood of getting the perfect design on the first attempt is "disparagingly small" (the book's words). What you're building is a starting hypothesis to iterate on. Grouping related actions ensures each component has a clear, unified purpose β high functional cohesion.
Rules for grouping:
Step 4: Assign Requirements to Components
ACTION: Map each requirement/user story to the component that handles it. Look for mismatches.
WHY: This is the validation step β if a requirement doesn't fit cleanly into any component, either the requirement spans too many concerns or the component boundaries are wrong. Requirements that force you to touch 3+ components for a single user action indicate the wrong granularity.
Watch for:
Step 5: Analyze Architecture Characteristics Per Component
ACTION: Check if different components need different quality attributes. Components with different characteristics may need to be in different deployment units (quanta).
WHY: This is where component identification connects to quantum analysis. If the Order Processing component needs high elasticity (flash sales) but the Reporting component needs only batch processing, they have different characteristic profiles. This difference suggests they should be separate quanta β which drives the monolith vs distributed decision. Without this step, you might design components that look clean but can't be deployed or scaled appropriately.
IF components have uniform characteristics β they can stay in one deployment unit (monolith is fine).
IF components have different characteristics β flag for architecture-quantum-analyzer. These may become separate quanta.
Step 6: Check for the Entity Trap
ACTION: Review the component design for signs of the Entity Trap anti-pattern.
WHY: The Entity Trap is the #1 component identification mistake. It happens when the architect creates components that mirror database entities (UserManager, OrderManager, ProductManager) with CRUD operations instead of real workflow components. This produces an ORM, not an architecture β high coupling, low cohesion, no clear behavior boundaries. The fix is to refocus on workflows: "what does the system DO?" not "what does it STORE?"
Detection checklist:
[Entity]Manager or [Entity]ServiceIF Entity Trap detected β restructure around workflows using Step 2's actors/actions.
Step 7: Assess Granularity and Iterate
ACTION: Evaluate whether each component is the right size. Restructure if needed.
WHY: There is no formula for the right granularity β it requires iterative refinement. Too fine-grained = too much communication between components (chatty architecture). Too coarse-grained = too many responsibilities per component (bloated modules). The sweet spot is components where each handles one cohesive workflow without excessive external calls.
Signs of wrong granularity:
This step feeds back to Step 3 β iterate until stable.
Inputs
architecture-characteristics-identifier or user input)Outputs
Component Identification Report
# Component Design: {System Name}Partitioning Style
{Domain / Technical} β {reasoning}Actors and Actions
| Actor | Actions |
|-------|---------|
| {actor} | {action1, action2, action3} |Identified Components
| Component | Responsibility | Key actions | Architecture characteristics |
|-----------|---------------|-------------|----------------------------|
| {name} | {what it does} | {actions it handles} | {relevant -ilities} |Requirement Mapping
| Requirement/Story | Component(s) | Notes |
|-------------------|-------------|-------|
| {requirement} | {component} | {any concerns} |Entity Trap Check
{Pass / Warning} β {reasoning}Granularity Assessment
{Assessment of component sizing β any too fine or too coarse?}Characteristic Variance
| Component | Primary characteristic | Differs from others? |
|-----------|---------------------|:---:|
| {component} | {characteristic} | Yes/No |{If variance detected: flag for quantum analysis}
Component Relationship Map
{Text diagram showing how components communicate and depend on each other}
Key Principles
Examples
Scenario: Online auction system (Going, Going, Gone) Trigger: "We're building an online auction platform. What components do we need?" Process: Asked about actors β identified Bidder, Auctioneer, System Admin. Mapped actions: Bidder (view items, place bids, track bids), Auctioneer (create auction, start/stop, manage items), Admin (manage users, view reports). Grouped into components: BidCapture, BidTracking, AuctionSession, ItemManagement, UserManagement, Reporting. Analyzed characteristics β discovered BidCapture needs different characteristics for bidders (high elasticity) vs auctioneers (high reliability). Split BidCapture into BidderCapture + AuctioneerCapture. Entity Trap check: passed β components are workflow-based, not entity-based. Flagged characteristic variance for quantum analysis. Output: 7 components with characteristic analysis showing the BidderCapture/AuctioneerCapture split and quantum implications.
Scenario: Detecting the Entity Trap Trigger: "Here's our current design: UserManager, OrderManager, ProductManager, PaymentManager. Each handles CRUD for its entity. Does this look right?" Process: Immediately identified the Entity Trap β all components are [Entity]Manager with CRUD operations. This is an ORM, not an architecture. Asked about actors and workflows: who uses this system and what do they do? Discovered workflows: "browse catalog and place order" (spans Product + Order + Payment), "process payment and update inventory" (spans Payment + Product). Restructured around workflows: OrderProcessing (browse β select β checkout), PaymentProcessing (charge β confirm β receipt), InventoryManagement (stock β reorder β catalog), UserAuthentication. Entity Trap check: resolved. Output: Restructured from 4 entity-based to 4 workflow-based components with explanation of why the original design was an Entity Trap.
Scenario: Greenfield with sparse requirements Trigger: "We're building an employee scheduling app for a hospital. That's all I know so far." Process: Insufficient information β asked clarifying questions one at a time: (1) "Who are the main users?" β nurses, doctors, HR admin, department heads. (2) "What are the key things these users do?" β request shifts, swap shifts, approve PTO, generate compliance reports, view schedules. (3) "Are there parts with different performance/availability needs?" β yes, the schedule viewer needs to be always-on (nurses check between rounds) but reporting is weekly batch. Used Actor/Actions to identify: ShiftScheduling, ShiftSwapping, PTOManagement, ComplianceReporting, ScheduleViewing. Flagged ScheduleViewing vs ComplianceReporting as having different availability characteristics. Output: 5 components with input gathering process documented, showing how asking the right questions leads to better component design.
References
License
This skill is licensed under CC-BY-SA-4.0. Source: BookForge β Fundamentals of Software Architecture by Mark Richards, Neal Ford.
Related BookForge Skills
Install related skills from ClawhHub:
clawhub install bookforge-architecture-characteristics-identifierOr install the full book set from GitHub: bookforge-skills
β‘ When to Use
π‘ Examples
Scenario: Online auction system (Going, Going, Gone) Trigger: "We're building an online auction platform. What components do we need?" Process: Asked about actors β identified Bidder, Auctioneer, System Admin. Mapped actions: Bidder (view items, place bids, track bids), Auctioneer (create auction, start/stop, manage items), Admin (manage users, view reports). Grouped into components: BidCapture, BidTracking, AuctionSession, ItemManagement, UserManagement, Reporting. Analyzed characteristics β discovered BidCapture needs different characteristics for bidders (high elasticity) vs auctioneers (high reliability). Split BidCapture into BidderCapture + AuctioneerCapture. Entity Trap check: passed β components are workflow-based, not entity-based. Flagged characteristic variance for quantum analysis. Output: 7 components with characteristic analysis showing the BidderCapture/AuctioneerCapture split and quantum implications.
Scenario: Detecting the Entity Trap Trigger: "Here's our current design: UserManager, OrderManager, ProductManager, PaymentManager. Each handles CRUD for its entity. Does this look right?" Process: Immediately identified the Entity Trap β all components are [Entity]Manager with CRUD operations. This is an ORM, not an architecture. Asked about actors and workflows: who uses this system and what do they do? Discovered workflows: "browse catalog and place order" (spans Product + Order + Payment), "process payment and update inventory" (spans Payment + Product). Restructured around workflows: OrderProcessing (browse β select β checkout), PaymentProcessing (charge β confirm β receipt), InventoryManagement (stock β reorder β catalog), UserAuthentication. Entity Trap check: resolved. Output: Restructured from 4 entity-based to 4 workflow-based components with explanation of why the original design was an Entity Trap.
Scenario: Greenfield with sparse requirements Trigger: "We're building an employee scheduling app for a hospital. That's all I know so far." Process: Insufficient information β asked clarifying questions one at a time: (1) "Who are the main users?" β nurses, doctors, HR admin, department heads. (2) "What are the key things these users do?" β request shifts, swap shifts, approve PTO, generate compliance reports, view schedules. (3) "Are there parts with different performance/availability needs?" β yes, the schedule viewer needs to be always-on (nurses check between rounds) but reporting is weekly batch. Used Actor/Actions to identify: ShiftScheduling, ShiftSwapping, PTOManagement, ComplianceReporting, ScheduleViewing. Flagged ScheduleViewing vs ComplianceReporting as having different availability characteristics. Output: 5 components with input gathering process documented, showing how asking the right questions leads to better component design.