Domain Logic Pattern Selector for Openclaw

A specialized architectural advisor that routes enterprise subsystems to the optimal domain logic pattern based on Martin Fowler's PEAA principles.

quochungto
v1.0.0
Apr 21, 2026
0
362
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install bookforge-domain-logic-pattern-selector

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install bookforge-domain-logic-pattern-selector using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Domain Logic Pattern Selector?

The domain-logic-pattern-selector is a strategic tool designed for software architects and senior engineers to determine the most effective way to organize business logic within a subsystem. Based on the authoritative patterns from Martin Fowler's Patterns of Enterprise Application Architecture, it evaluates the trade-offs between Transaction Script, Domain Model, and Table Module patterns.

By analyzing factors such as domain complexity, team object-oriented (OO) experience, and the technical stack, this skill helps developers avoid common architectural pitfalls like transaction script sprawl or the anemic domain model. It ensures that the chosen architecture matches the complexity-vs-effort curve, preventing technical debt from accumulating as the application grows.

Domain Logic Pattern Selector Use Cases

  • Designing a new greenfield module and deciding on the foundational business logic structure.
  • Refactoring legacy code where Transaction Scripts have grown into unmanageable god-classes.
  • Diagnosing and fixing an anemic domain model where classes lack encapsulation and behavior.
  • Evaluating the necessity and thickness of a Service Layer for multi-client applications.
  • Determining the applicability of the Table Module pattern in .NET environments using RecordSets.

How Domain Logic Pattern Selector Works

  1. Classification: The skill first classifies the subsystem's complexity into Low (CRUD), Moderate (multi-step rules), or High (algorithmic/frequent changes) bands.
  2. Routing Matrix Application: It applies a routing matrix that cross-references complexity with team OO expertise and the specific platform (e.g., .NET vs. JVM).
  3. Service Layer Evaluation: It determines if a Service Layer is required based on client types and transactional needs, then recommends a thickness (Facade, Operation Script, or Controller-Entity).
  4. Anti-Pattern Check: The process identifies potential risks like logic leakage into stored procedures or bloated domain models.
  5. Decision Record Generation: It produces a final Markdown record including the rationale, migration path, and an implementation code sketch.

Domain Logic Pattern Selector Setup

To use this Openclaw Skills asset, ensure you have the Openclaw CLI installed and the bookforge-skills repository cloned.

# Navigate to your project directory
cd my-enterprise-app

# Invoke the skill using the Openclaw CLI
openclaw run domain-logic-pattern-selector --input "subsystem_description.txt"

Domain Logic Pattern Selector Data Schema & Taxonomy

The skill organizes its output into a structured Decision Record with the following taxonomy:

Component Description
Classification Maps the system to complexity, team experience, and stack categories.
Primary Pattern The selected architectural pattern with detailed rationale.
Service Layer Decision on layer thickness (None, Thin, or Thick).
Anti-Pattern Watch Specific risks and observable warning signs to monitor.
Implementation Sketch Pseudocode or language-idiomatic structural skeleton.

Domain Logic Pattern Selector Advanced Features

  • Complexity-vs-Effort Mapping: Automatically adjusts recommendations based on Fowler's cost curves for long-term maintainability.
  • Refactoring Pathfinding: Provides specific directions for migrating from Transaction Scripts to rich Domain Models.
  • Platform-Specific Optimization: Tailors advice for .NET (RecordSets) vs. Java (POJOs/Data Mappers) environments.
  • Multi-Agent Interoperability: Can trigger secondary selectors for data-source patterns or distribution boundaries if architectural gaps are identified.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*