Skip to content

Latest commit

 

History

309 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spec-driven-development

A Claude Code plugin marketplace for turning a Mermaid class diagram of a domain model into a fully implemented, tested microservice — one layer at a time.

You draw the model. The plugins generate the specs, then implement the code and tests for every layer of a Domain-Driven Design service: domain, persistence, application, REST API, and messaging.

There is no application code, build step, or test suite in this repo. Every artifact is Markdown — skills, agents, and plugin manifests — plus a small set of reference Python modules that the pipeline copies verbatim into your target repo. Claude Code loads them at runtime.

Installation

Add this marketplace and install the plugins from within Claude Code:

/plugin marketplace add voro6yov/spec-driven-development
/plugin install spec-core
/plugin install model-diagrams
/plugin install project-scaffold
/plugin install domain-spec persistence-spec application-spec rest-api-spec messaging-spec

Always install spec-core. Every spec plugin depends on it for shared naming conventions, target-location resolution, and the runtime-contract Python modules the code generators copy into your repo. There is no manifest-level dependency enforcement — a subset install that omits spec-core will break code generation. The marketplace ships them together.

The plugins

Plugin Version What it does
spec-core 0.8.0 Shared foundation: naming conventions, cross-layer target-location resolution, the update-spec / update-code orchestrators, and the reference Python modules copied into target repos. Not run directly.
project-scaffold 0.5.0 Scaffolds a fresh uv-managed microservice repo from a service name — src layout, ruff + ty, a dev Makefile, a Docker/Postgres/Liquibase test env — then initializes every spec layer.
model-diagrams 0.8.0 Scaffold, review, edit, annotate, and derive the query part of the Mermaid class diagrams that feed every spec plugin.
domain-spec 0.64.0 Generate specs for the domain package (aggregates, value objects, events, commands) and implement them with unit tests.
persistence-spec 0.77.0 Generate specs for repositories (tables, mappers, migrations, unit-of-work) and implement them with integration tests.
application-spec 0.80.0 Generate specs for application services (commands, queries, ops) and implement them with tests.
rest-api-spec 0.71.0 Generate specs for REST endpoints (serializers, request/response fields, routes) and implement them with tests.
messaging-spec 0.49.0 Generate specs for messaging (events, consumers, dispatchers) and implement them with tests.

The workflow

   ┌─ project-scaffold ─┐   scaffold repo + init all layers
   │                    │
   ▼                    │
model-diagrams          │   draw / review the Mermaid class diagram
   │                    │
   ▼                    ▼
domain-spec ──▶ persistence-spec ─┐
        └────▶ application-spec ──┼──▶ rest-api-spec
                                  └──▶ messaging-spec
  1. Scaffold the repo. @project-scaffold:project-scaffolder <service-name> creates the uv project skeleton and initializes each spec layer.

  2. Model the aggregate. Use model-diagrams to author the three Mermaid diagrams for a new aggregate and review them:

    @model-diagrams:diagrams-scaffolder <aggregate> [<docs_dir>]
    /model-diagrams:edit-diagram <diagram_file> <task>
    /model-diagrams:derive-query-part <diagram_file>
    
  3. Generate each layer. Every spec plugin exposes the same command shape — a one-time initializer plus an end-to-end generator:

    /init-domain                              # once per project
    /domain-spec:generate-domain <diagram>    # specs + code + tests
    

    The same pattern holds for persistence, application, rest-api, and messaging (/init-<layer> + /<layer>-spec:generate-<layer> <diagram>).

    Under the hood, each generate-<layer> umbrella chains two agent orchestrators — specs-generator then code-generator — which fan out to worker subagents in parallel. Either can be run alone:

    @domain-spec:specs-generator <diagram>    # specs only
    @domain-spec:code-generator <diagram>     # code only
    
  4. Propagate changes. When the diagram evolves, cascade the change across every generated layer in dependency order (skipping layers you never generated):

    /spec-core:update-specs <domain_diagram>            # regenerate specs
    /spec-core:update-code <domain_diagram> [--review]  # update source code
    

Artifact conventions

  • Spec and test artifacts live next to the diagram file in a per-plugin folder named <stem>.<layer>/ (e.g. <stem>.domain/specs.md).
  • Generated code lands in the target repo's src/<pkg>/<layer>/ tree; tests go under src/tests/.
  • All cross-plugin naming and layout rules are owned by spec-core:naming-conventions — the single source of truth.

Repository layout

.claude-plugin/marketplace.json   the marketplace manifest
plugins/
  spec-core/          shared conventions, resolvers, orchestrators, modules
  project-scaffold/   repo scaffolder
  model-diagrams/     Mermaid diagram tooling
  domain-spec/        domain layer
  persistence-spec/   persistence layer
  application-spec/   application layer
  rest-api-spec/      REST API layer
  messaging-spec/     messaging layer

Each plugins/<name>/ contains .claude-plugin/plugin.json (manifest with a version bumped on user-visible changes), agents/*.md (single-purpose subagents), and skills/<skill>/SKILL.md (reusable skills and umbrella orchestrators).

See CLAUDE.md for the detailed architecture — how the agent orchestrators fan out, how spec-core consolidates shared concerns, and the conventions to follow when editing skills and agents.

License

See LICENSE.

About

A Claude Code plugin marketplace for turning a Mermaid class diagram of a domain model into a fully implemented, tested microservice — one layer at a time.

Resources

Stars

4 stars

Watchers

0 watching

Forks

Contributors

Languages