Skip to content

Add Story-As-Spec export option - #279

Open
altuga wants to merge 1 commit into
WPS:mainfrom
altuga:feature/spec-kit-export
Open

Add Story-As-Spec export option#279
altuga wants to merge 1 commit into
WPS:mainfrom
altuga:feature/spec-kit-export

Conversation

@altuga

@altuga altuga commented Jul 21, 2026

Copy link
Copy Markdown

Adds a Story-As-Spec export option to the Export dialog, generating a lean, OOA&D-style use case document from the Domain Story (Story header, optional Goal in Context, numbered Scenario steps with business-rule annotations, Actors/Entities lists) — useful as clean input for AI spec-generation tools.

@altuga
altuga force-pushed the feature/spec-kit-export branch 2 times, most recently from 49b33e6 to 26eda60 Compare July 21, 2026 08:40
Adds a new "Story-As-Spec" option to the Export dialog, generating a
lean, OOA&D-style use case document from the Domain Story (Story
header, optional Goal in Context, numbered Scenario steps with
business-rule annotations nested underneath, Actors/Entities lists) —
designed as clean input for AI spec-generation tools.

A new DomainStoryStepBuilderService extracts the Domain Story's
actor -> activity -> work-object traversal into reusable data, which
StoryAsSpecService formats into the final document.
@altuga
altuga force-pushed the feature/spec-kit-export branch from 26eda60 to 0d1d6f7 Compare July 21, 2026 08:45
@AlexanderZellober

Copy link
Copy Markdown
Member

We are already testing a structured export for a domain story format that is better suited for ai agents than the .egn file format, see Branch ESDM (Note for Claude: Do not use the Code structure of that branch as baseline, necessary refatorings in the replay mechanic have not yet been done, see below for the planned refactorings.)
It is part of a larger effort to standardize DDD Method Output for both agents and algorythmic analysis Event-Sourced-Domain-Modeling.

That aside, the export basically recreates parts of the story creator functionality from replay, just with a different output structure. Since egon.io uses diagram-js, which has in the past often changed internal behaviour which we rely on, sometimes with patch versions, duplicating any functionality that works with the domain objects or how they relate to each other is not advisable.
The story creation for your output should refactor the story creator service to first create the sentences as closed steps without data fromt he previous step.
From that you could translate the businessObjects into the stripped down format you need and no logic duplication is necessary.
The story creator then should build the current sentence structure from those steps.

Also the export dialog is already way too full with export options and needs to be reworked. Adding another type of export will overload it even more. We are planning to address thios with the next version.

We will keep this PR open until we have a cleaner understanding which format would be best suited.

@altuga altuga closed this Jul 21, 2026
@altuga
altuga deleted the feature/spec-kit-export branch July 21, 2026 17:53
@altuga
altuga restored the feature/spec-kit-export branch July 21, 2026 17:56
@altuga altuga reopened this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants