sdma

Applies category theory, coalgebra, and information theory to formal domain modeling and architecture analysis.

10|2|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/nrdxp/predicate --skill sdma-nrdxp
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdma
Source: https://github.com/nrdxp/predicate/tree/main/skills/sdma
Command: npx skills add https://github.com/nrdxp/predicate --skill sdma-nrdxp

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Choosing the wrong mathematical formalism for a domain model is a primary driver of architectural debt, and informal data migrations often destroy semantic meaning. This Skill provides a prescriptive methodology for selecting and applying the correct formalism — category theory, coalgebra, linear logic, session types, or information theory — to domain modeling, schema migration, protocol verification, and architectural entropy measurement. ## Core Features & Use Cases - Functorial Data Migration: Apply adjoint functors (Δ, Σ, Π) to migrate and merge database schemas without semantic loss, treating schemas as categories. - Olog Construction: Build ontological graphs with strict construction rules (singular noun phrases, functional morphisms, commutative diagrams) to make domain knowledge verifiable. - Behavioral & Protocol Verification: Use coalgebraic bisimulation for behavioral equivalence and session types for deadlock-free multi-party protocol compliance. - Architectural Entropy Metrics: Compute SEIC (Structural Entropy Index of a Community) with null-model analysis to detect centralization and architectural fragility. - Use Case: When merging two microservice databases, model both schemas as categories, define a schema mapping functor, and use the pullback/pushforward functors to migrate data while provably preserving relationships. ## Quick Start Use the sdma skill to model my order-processing domain as an olog and recommend the right formalism for verifying its payment protocol.

Frequently Asked Questions about sdma

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

FAQPage Schema
How do I choose the right mathematical formalism for domain modeling?

Use the SDMA decision matrix: coalgebra for evolving hidden state, linear logic for non-duplicable resources, category theory for cross-database migration, session types for multi-party protocols, and information theory for resilience analysis. The principle of minimal representation governs the final choice — pick the simplest formalism that faithfully captures the domain's structure.

How do I migrate database schemas without losing semantic meaning?

Model each schema as a category with tables as objects and foreign keys as morphisms, then apply the three adjoint migration functors. Use Δ (pullback) for reformatting and views, Σ (left pushforward) for merging datasets, and Π (right pushforward) for constraint enforcement across schema boundaries.

What is an olog and when should I use one?

An olog (ontology log) is a categorical knowledge representation where objects are singular indefinite noun phrases, morphisms are functional relationships, and facts are commutative diagrams. Use ologs for domain modeling and knowledge representation where business rules must be verifiable as path equations.

When should I use coalgebra instead of algebra for modeling?

Use coalgebra when the problem involves hidden internal state, potentially infinite behavior like streams or protocols, or when behavioral equivalence matters more than structural identity. Use algebra when constructing finite data structures like lists, trees, and algebraic data types.

How do I measure architectural centralization and fragility?

Compute the Structural Entropy Index of a Community (SEIC), defined as the Shannon entropy of the degree distribution divided by log₂ of the community size. Values near 1 indicate decentralized resilient structure, while values near 0 indicate hub-dominated fragility; compare against Maslov-Sneppen null models to distinguish deliberate design from random growth.

What are the limitations of ologs for complex business rules?

Ologs only express simple path equalities and cannot handle quantified logic like 'for all employees there exists a manager.' For first-order constraints use hyperdoctrines with quantifiers as adjoints, and for provability reasoning use triposes over the Effective Topos.