spec-driven-domain

Guides creation and editing of domain specs with mandatory sections, scenarios, and rule-to-code bindings.

1|Updated Jan 14, 2024
One-click install
npx skills add https://github.com/Eyhenij/rt-tools --skill spec-driven-domain-eyhenij
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spec-driven-domain
Source: https://github.com/Eyhenij/rt-tools/tree/main/.claude/skills/spec-driven-domain
Command: npx skills add https://github.com/Eyhenij/rt-tools --skill spec-driven-domain-eyhenij

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Domain specifications drift out of sync with code, scenarios get duplicate identifiers across branches, and rules are written without verifiable bindings. This Skill enforces a consistent structure for domain specs in docs/specs so that every rule is traceable to code and every scenario maps to a test. ## Core Features & Use Cases - Mandatory spec structure: Enforces the verbatim section headings (Зачем, Терминология, Правила, Контракт, Данные, and more) plus header lines for dependencies, laws, and procedures. - Rule-to-code binding: Maintains implementation.md tables that map each rule's exact text to a file:symbol anchor, with unbound rules moved to open questions. - Scenario discipline: Defines the SC-<PREFIX>-<NUMBER> scenario form, single-outcome Then clauses, coverage marks, and cross-branch number allocation to prevent identifier collisions. - Use Case: When editing a .proto file, update the touched domains' specs in the same branch, write scenarios first, then implement code and name tests by scenario identifiers before running npm run check:specs. ## Quick Start Ask the assistant to create a new domain spec in docs/specs following the spec-driven-domain pattern with its mandatory sections and initial scenarios.

Frequently Asked Questions about spec-driven-domain

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

FAQPage Schema
How do I create a new domain spec in docs/specs?

Create a directory docs/specs/<domain>/ containing spec.md, implementation.md, and scenarios.md, starting from the template at docs/specs/_template/spec.md. Include all mandatory sections verbatim and register the domain with its scenario prefix in docs/specs/README.md.

How do I bind a spec rule to code?

Write the rule as a bold-led statement in spec.md, then add a row in implementation.md mapping the exact rule text to a file:symbol anchor. Rules with no code anchor belong in Open questions as Q-<law letter>-<number> instead.

How are scenario numbers assigned across branches?

Take the largest issued number across all local and remote branches plus one, never a gap in the middle. Deleted scenario numbers stay retired, and renumbering is forbidden because the number is the only link between a scenario and its test title.

When should a domain be split into subdomains versus new domains?

Split a grown domain into subdomains, which keep the parent's contract and live in the same directory tree. Create a separate domain only when the subject is an entity of its own, since a new domain requires index registration, separate audit, and renumbering of test titles.

Why does docs-guard refuse my commit after a proto edit?

Editing a .proto file without updating the specs of the touched domains in the same branch triggers a docs-guard refusal. Update the affected domain specs alongside the proto change and run npm run check:specs before pushing.

When should this pattern not be used?

Do not use it to create a law, rule, or pattern document; that belongs to the spec-driven-rule pattern. It also does not replace session artefacts like tasks.md, which belong in the branch or PR description rather than the spec.