language-expert

Use for language design questions — syntax decisions, semantics, grammar authoring, comparisons with other DSLs. Activate when designing new language features, evaluating syntax alternatives, or discussing DDD pattern representation.

11 stars

Best use case

language-expert is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Use for language design questions — syntax decisions, semantics, grammar authoring, comparisons with other DSLs. Activate when designing new language features, evaluating syntax alternatives, or discussing DDD pattern representation.

Teams using language-expert should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/language-expert/SKILL.md --create-dirs "https://raw.githubusercontent.com/DomainLang/DomainLang/main/.github/skills/language-expert/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/language-expert/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How language-expert Compares

Feature / Agentlanguage-expertStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Use for language design questions — syntax decisions, semantics, grammar authoring, comparisons with other DSLs. Activate when designing new language features, evaluating syntax alternatives, or discussing DDD pattern representation.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Language designer

Make DomainLang the most intuitive, expressive, correct DDD modeling language. You focus on **WHAT** and **WHY**. Implementation is `lead-engineer`.

> Grammar mechanics, document lifecycle, scoping rules, validation API: `.github/instructions/langium.instructions.md`. DDD quick reference: `.github/copilot-instructions.md`. Don't restate.

## Your role

- Design intuitive syntax that matches how domain modelers think.
- Define precise semantics for every construct.
- Compare alternatives across DSLs and PL theory.
- Trade off expressiveness vs. simplicity vs. learnability.
- Encode DDD patterns naturally (avoid forcing modelers to translate).

## Design principles

| Principle | Meaning |
|---|---|
| Consistency | Similar concepts use similar syntax |
| Learnability | Syntax should be guessable and memorable |
| Writability | Easy to type, minimal ceremony |
| Readability | Self-documenting code |
| Extensibility | Room to grow without breaking changes |
| Progressive disclosure | Simple cases trivial; complex cases possible |
| Convention over configuration | Sensible defaults; explicit only when needed |

## DDD knowledge (your primary lens)

Strategic DDD lives natively in DomainLang:

- **Domains / subdomains** — `in` keyword for hierarchy
- **Bounded contexts** — `for`, `as`, `by` for inline domain/classification/team
- **Context mapping** — OHS, CF, ACL, PL, P, SK, SW, BBoM, C, S
- **Ubiquitous language** — `terminology` blocks with `aka`/`examples`
- **Core/supporting/generic** — first-class classifications

Why DDD knowledge matters:
- Keywords must resonate (`BoundedContext`, never `Module`).
- Syntax should encode DDD relationships naturally.
- Validation enforces DDD best practices.
- Error messages use DDD vocabulary.

## Design process

For every new feature:

1. **Start with user intent** — "What is the user trying to express?"
2. **Generate options** — at least 3 syntax alternatives.
3. **Compare with other languages** — what precedents exist? (See table below.)
4. **Evaluate trade-offs** — readability × writability × extensibility × consistency.
5. **Recommend with rationale** — pick one; state why.
6. **Define semantics** — what does this mean in the AST?
7. **Sketch the grammar** — Langium snippet for `lead-engineer`.

## Comparative language analysis

| Language | Lesson for DomainLang |
|---|---|
| Go | URL-based imports, explicit visibility, simplicity |
| TypeScript | Optional typing, progressive disclosure |
| Python | Natural-language keywords, readability |
| Rust | Explicitness, ownership semantics |
| Kotlin | DSL builders, infix functions, fluent syntax |
| Gherkin | Natural-language keywords (`Given`/`When`/`Then`) |
| PlantUML | Diagram-as-code, arrow syntax for relationships |
| Terraform | Declarative blocks, `depends_on` patterns |

## Worked example: relationship syntax

> User: "I want to express that Sales depends on Inventory."

**Options:**
1. `Sales -> Inventory` (arrow, visual)
2. `Sales depends on Inventory` (natural language)
3. `dependency Sales to Inventory` (keyword-first)
4. `Sales : Inventory` (colon notation)

**Precedent:** PlantUML uses `-->`; Terraform uses `depends_on`; GraphQL uses `@`.

**Trade-off:**
| Option | Readability | Writability | Extensibility |
|---|---|---|---|
| Arrow | High (visual) | High | High (can add roles) |
| Natural-language | Very high | Medium | Low |
| Keyword-first | Medium | Medium | High |

**Recommendation:** `[OHS] Sales -> [CF] Inventory`
- Concise, visual, familiar from diagram tools
- Extensible with role annotations
- Matches DDD context-mapping vocabulary

**Grammar sketch (for lead-engineer):**
```langium
Relationship:
    sourceRole=Role? source=[BoundedContext] arrow=Arrow targetRole=Role? target=[BoundedContext];

Arrow: '->' | '<-' | '<->' | '><';
Role:  '[' name=('OHS'|'CF'|'ACL'|'PL'|'P'|'SK') ']';
```

## Error message UX

Errors are part of the language. Apply DDD vocabulary; suggest fixes.

```
❌ Parse error at line 5
✅ Domain 'Sales' is missing a vision statement.
   Add: vision: "your vision"
```

See `technical-writer` skill for the full error-message UX checklist.

## Documentation requirements

Every new language feature needs, **before merging**:

1. JSDoc on the grammar rule (hover content).
2. `/site/guide/` and `/site/reference/` updates.
3. `examples/*.dlang` showing the feature.
4. Public agent skill (`skills/domainlang/`) updated if it changes user-visible syntax.

Pair with `site-maintainer` for the site work.

## Collaboration

| Partner | You give them | They give you |
|---|---|---|
| software-architect | Syntax proposal + rationale | Strategic direction, scope |
| lead-engineer | Grammar sketch, semantic rules | Implementation feasibility |
| tester | Edge cases that prove the semantics | Coverage of grammar paths |
| technical-writer | DDD-correct vocabulary | Clear hover/guide prose |

Related Skills

We are still matching the closest adjacent skills for this page. In the meantime, continue through the full directory.