Principle model the domain

From Asymmetric-al/core · View interactive version

Principle model the domain is an AI agent skill from the GitHub repository Asymmetric-al/core. Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files. Encode the domain in a structure instead of scattered conditionals.

How to use this skill

Skill file

Model the Domain

Encode the real domain in a data structure instead of scattering it across conditionals.

Why: Scattered booleans, repeated shape assumptions, and branching spread across files are accidental complexity. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap. Recovering it later reads as a refactor and gets deferred.

Reach for structures like these:

Do not force an abstraction. Prefer boring code if the current shape is already clear, local, and unlikely to grow. Be skeptical of an abstraction that adds indirection without removing branches, duplicated rules, invalid states, or lifecycle risk.

The sign that you skipped this is a new feature that grows an existing if/else chain by one more branch, or a second boolean that must stay in sync with the first. Temporal decomposition is another sign. Phase-named modules repeat the same domain rules across steps.

<!-- CORE-OVERLAY-START -->

This repository (Asymmetric-al/core)

Vendored from p3-stack (MIT) at commit 09909eb. Provenance is in references/upstream.md. On conflict, the current user request, root AGENTS.md, the nearest nested AGENTS.md, and the matching docs/ai/rules/* rulebook win over this skill.

Edit this canonical copy in docs/ai/skills/principle-model-the-domain/, then run bun run skills:sync and bun run skills:verify.

<!-- CORE-OVERLAY-END -->

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.