stacks-domain-modeling

Builds and sharpens a Stacks project's domain language through CONTEXT.md glossaries and ADRs.

625|19|Updated Apr 26, 2022
One-click install
npx skills add https://github.com/stacksjs/stacks --skill stacks-domain-modeling
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: stacks-domain-modeling
Source: https://github.com/stacksjs/stacks/tree/main/storage/framework/defaults/ai/skills/stacks-domain-modeling
Command: npx skills add https://github.com/stacksjs/stacks --skill stacks-domain-modeling

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

In a Stacks app, a domain term becomes the model name, table name, route URI, event name, and component name all at once, so a badly settled term means a rename across five layers later. This Skill actively challenges fuzzy or overloaded terms, stress-tests domain relationships with concrete scenarios, and records the resulting glossary and architecture decisions before they go stale.

Core Features & Use Cases

  • Term sharpening and conflict detection: Challenges user language that conflicts with the existing CONTEXT.md glossary and proposes precise canonical terms for vague or overloaded words.
  • Code cross-referencing: Verifies stated domain behavior against app/Models, relationship declarations, model events, and routes, surfacing contradictions between language and code.
  • CONTEXT.md and ADR authoring: Maintains an opinionated project glossary and writes concise, sequentially numbered ADRs under docs/adr/ only when decisions are hard to reverse, surprising, and involve real trade-offs.
  • Use Case: While designing a billing feature, the user says "account" loosely; the Skill asks whether they mean Customer or User, checks the existing models, updates CONTEXT.md with the resolved term, and offers an ADR recording that Ordering and Billing communicate via domain events rather than synchronous HTTP.

Quick Start

Ask the assistant to use the stacks-domain-modeling skill to review the term "subscription" in your Stacks project, reconcile it with the existing models, and record the decision in CONTEXT.md or an ADR.

Frequently Asked Questions about stacks-domain-modeling

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

FAQPage Schema
How do I create a domain glossary for a Stacks project?

Create a CONTEXT.md file at the repository root listing project-specific terms with one or two sentence definitions and an _Avoid_ list of rejected synonyms. Update it inline whenever a term is resolved during design discussions, keeping it free of implementation details like file paths or schemas.

When should I write an architecture decision record?

Write an ADR only when a decision is hard to reverse, surprising without context, and the result of a real trade-off between alternatives. Store ADRs in docs/adr/ with sequential numbering like 0001-slug.md, keeping each one as short as a single paragraph when that suffices.

How do I handle multiple bounded contexts in one repository?

Add a CONTEXT-MAP.md at the root listing each context, where its CONTEXT.md lives, and how contexts relate through events or shared types. Only reach for this when the app genuinely has separate languages, not merely because it has many models.

What if my code disagrees with the domain glossary?

Treat the mismatch as a bug in one of the two and say which should move. Check app/Models, belongsTo/hasMany declarations, model events, and routes as a second source of truth, then either rename the code or fix the glossary entry.

What decisions do not belong in an ADR?

Skip anything easy to reverse, unsurprising, or lacking a real alternative. Routine library choices and obvious implementations do not qualify; ADRs are for architectural shape, integration patterns, lock-in technology choices, and deliberate deviations from the obvious path.