data-oriented-architecture

Establishes a standardized approach for designing registry-based object systems.

11|5|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/rbergman/dark-matter-marketplace --skill data-oriented-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: data-oriented-architecture
Source: https://github.com/rbergman/dark-matter-marketplace/tree/main/plugins/architecture/skills/data-oriented-architecture
Command: npx skills add https://github.com/rbergman/dark-matter-marketplace --skill data-oriented-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps eliminate fragile type-dispatch logic by encouraging registry-based polymorphism and data/behavior separation. The centralized registry maps entity types to concrete definitions, improving extensibility and maintainability.

Core Features & Use Cases

  • Registry-Based Polymorphism: central registry mapping type to behavior.
  • Capability Composition: optional capabilities to avoid deep inheritance and marker interfaces.
  • Layered Definition Interfaces: Base, Domain, and Concrete definitions to compose behavior.
  • Context Objects: bundle related parameters into context for stable APIs.
  • Infrastructure-First Development: prioritize building the registry and dispatch infrastructure before domain code.

Quick Start

Identify existing type-dispatch patterns in your codebase, create a registry mapping entity types to definitions, replace switches with registry lookups, and apply capability composition to enable optional behaviors.

Frequently Asked Questions about data-oriented-architecture

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

FAQPage Schema
How do I replace fragile switch statements with registry-based polymorphism?

Registry-based polymorphism replaces fragile switch statements by mapping entity types to concrete definitions in a centralized registry, allowing behavior dispatch through lookups. This improves extensibility and maintainability for systems with multiple entity variants.

What is the best way to build an extensible plugin architecture without deep inheritance?

An extensible plugin architecture avoids deep inheritance by using capability composition with optional capabilities. This pattern maps types to definitions in a registry, allowing you to add isolated behaviors without marker interfaces or complex class hierarchies.

How do I separate data from behavior when managing multiple entity variants?

Separate data from behavior by defining a Definition interface and creating a type-to-definition registry. Layered Base, Domain, and Concrete definition interfaces compose behavior while keeping entity data distinct from dispatch logic.

When should I use context objects in a type-dispatch architecture?

Use context objects in type-dispatch architecture to bundle related parameters together, ensuring stable APIs. Context objects pass required data to registry definitions during lookups, preventing signature changes when new parameters are added.

Does registry-based polymorphism support extending frameworks with new entity types?

Registry-based polymorphism supports extending frameworks by adding new entity types without modifying existing switch logic. You map new types to their definitions in the centralized registry, enabling infrastructure-first development for scalable systems.

What are the limitations of using a centralized registry for type-dispatch?

A centralized registry for type-dispatch requires building infrastructure before domain code, adding initial architectural overhead. It is best suited for systems with multiple similar entity variants rather than simple, static logic with few types.