spec-kit icon indicating copy to clipboard operation
spec-kit copied to clipboard

[Extension]: Add Data Model Diagram

Open benizzio opened this issue 5 months ago • 2 comments

Extension ID

data-model-diagram

Extension Name

Data Model Diagram

Version

0.2.2

Description

Generates Mermaid ER diagrams from Spec Kit data models after planning.

Author

Igor Benicio de Mesquita

Repository URL

https://github.com/benizzio/spec-kit-data-model-diagram

Download URL

https://github.com/benizzio/spec-kit-data-model-diagram/archive/refs/tags/v0.2.2.zip

License

MIT

Homepage (optional)

https://github.com/benizzio/spec-kit-data-model-diagram

Documentation URL (optional)

https://github.com/benizzio/spec-kit-data-model-diagram#readme

Changelog URL (optional)

https://github.com/benizzio/spec-kit-data-model-diagram/blob/main/CHANGELOG.md

Required Spec Kit Version

=0.2.0

Required Tools (optional)

None beyond Spec Kit extension support.

Number of Commands

1

Number of Hooks (optional)

1

Tags

diagram, documentation, mermaid

Key Features

  • Provides the speckit.data-model-diagram.generate command
  • Reads the active feature's data-model.md
  • Generates data-model-diagram.mmd next to the source data model
  • Produces raw Mermaid erDiagram output
  • Preserves documentary field types, arrays, nullability, and relationship-bearing attributes
  • Offers an optional after_plan hook to generate the diagram after planning

Testing Checklist

  • [x] Extension installs successfully via download URL
  • [x] All commands execute without errors
  • [x] Documentation is complete and accurate
  • [x] No security vulnerabilities identified
  • [x] Tested on at least one real project

Submission Requirements

  • [x] Valid extension.yml manifest included
  • [x] README.md with installation and usage instructions
  • [x] LICENSE file included
  • [x] GitHub release created with version tag
  • [x] All command files exist and are properly formatted
  • [x] Extension ID follows naming conventions (lowercase-with-hyphens)

Testing Details

Tested on:

  • Real Spec Kit project: https://github.com/benizzio/ghostfolio-cryptogains
  • Repository branch: main
  • Extension version: 0.2.2

Test project:

  • benizzio/ghostfolio-cryptogains, a Go-based Spec Kit project with multiple feature specifications under specs/.

Test scenarios:

  1. Installed the extension from the GitHub release archive.
  2. Ran the extension against real Spec Kit feature data models in ghostfolio-cryptogains.
  3. Generated Mermaid ER diagram files from existing data-model.md files.
  4. Verified generated data-model-diagram.mmd files were created for multiple feature specs:
    • specs/001-ghostfolio-gains-reporting/data-model-diagram.mmd
    • specs/003-store-activity-data/data-model-diagram.mmd
    • specs/005-generate-gains-report/data-model-diagram.mmd
  5. Confirmed the output contains raw Mermaid erDiagram source and preserves declared field types, arrays, nullability, and relationships.

Example Usage

# Install extension
specify extension add data-model-diagram --from https://github.com/benizzio/spec-kit-data-model-diagram/archive/refs/tags/v0.2.2.zip

# After running /speckit.plan, invoke:
/speckit.data-model-diagram.generate

Proposed Catalog Entry

**Proposed Catalog Entry**

{
  "data-model-diagram": {
    "name": "Data Model Diagram",
    "id": "data-model-diagram",
    "description": "Generates Mermaid ER diagrams from Spec Kit data models after planning.",
    "author": "Igor Benicio de Mesquita",
    "version": "0.2.2",
    "download_url": "https://github.com/benizzio/spec-kit-data-model-diagram/archive/refs/tags/v0.2.2.zip",
    "repository": "https://github.com/benizzio/spec-kit-data-model-diagram",
    "homepage": "https://github.com/benizzio/spec-kit-data-model-diagram",
    "license": "MIT",
    "requires": {
      "speckit_version": ">=0.2.0"
    },
    "provides": {
      "commands": 1,
      "hooks": 1
    },
    "tags": ["diagram", "documentation", "mermaid"],
    "verified": false,
    "downloads": 0,
    "stars": 0,
    "created_at": "2026-06-10T00:00:00Z",
    "updated_at": "2026-06-10T00:00:00Z"
  }
}

Additional Context

Spec Driven Development can induce a very high cognitive load, requiring people to deal with multiple specification documents for each feature. Because humans still need to read, understand, and refine specifications before letting agents implement the code, we need to make sure specs are easy for the people in the loop to read. This extension helps with that.

benizzio avatar Jun 10 '26 21:06 benizzio

cc @github/spec-kit-maintainers — new catalog submission for review.

github-actions[bot] avatar Jun 10 '26 21:06 github-actions[bot]

cc @github/spec-kit-maintainers — new catalog submission for review.

github-actions[bot] avatar Jun 10 '26 21:06 github-actions[bot]