Skip to content

fix(trogonstack-eventmodeling): split read models by shape, not by consumer - #106

Merged
yordis merged 1 commit into
TrogonStack:mainfrom
enilsen16:enilsen16/fix-eventmodeling-read-model-shape
Oct 20, 2026
Merged

yordis merged 1 commit into
TrogonStack:mainfrom
enilsen16:enilsen16/fix-eventmodeling-read-model-shape

Conversation

@enilsen16

@enilsen16 enilsen16 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The event-modeling skills call command decision state a "read model" and say to never share read models between commands. Agents read this as "add one board read model per command", so models get far too many read models.

This change:

  • Renames "Command State Read Model" to "Command Decision State". The handler folds this state from its stream's events. It is not a read model and does not go on the board. The rule "don't share decision state between commands" stays.
  • Adds the rule for query read models: split by shape, not by consumer. Add a read model only for different fields, key or source events. Screens and processors that read the same data share one read model.
  • Adds a "No Duplicate Read Models" check to the validating skill.
  • Notes in the slicing patterns that a shared read model is preferred when the consumer reads the same shape.

Test plan

  • node scripts/validate-plugins.mjs

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d2bbfc5b-51bc-4633-b100-e19175c6d464
📥 Commits

Reviewing files that changed from the base of the PR and between 89ba333 and 7c4cbf9.

📒 Files selected for processing: 3
  • plugins/trogonstack-eventmodeling/skills/eventmodeling-designing-event-models/SKILL.md
  • plugins/trogonstack-eventmodeling/skills/eventmodeling-slicing-event-models/references/patterns.md
  • plugins/trogonstack-eventmodeling/skills/eventmodeling-validating-event-models/SKILL.md
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Use blackboards to coordinate workflow. Use blackboards to coordinate disparate facts and agents, while maintaining independence and isolation among participants. |
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…nsumer

Signed-off-by: Erik Nilsen <enilsen16@live.com>
@enilsen16
enilsen16 force-pushed the enilsen16/fix-eventmodeling-read-model-shape branch from 4ca0d3a to 7c4cbf9 Compare October 20, 2026 23:08
@enilsen16
enilsen16 marked this pull request as ready for review October 20, 2026 23:23
@cursor

cursor Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation-only updates to trogonstack-eventmodeling skills; no runtime or API behavior changes.

Overview
Clarifies event-modeling skill docs so agents stop treating per-command validation state as board read models and stop duplicating query projections per consumer.

Command decision state (not a read model): Renames Command State Read Model to Command Decision State across designing and validating skills. The text now states this state is folded inside the handler, is not drawn on the board as a read model, and the rule stays: one decision state per command, never shared.

Query read models — split by shape: Adds guidance to add read models only when fields, key, or source events differ; UI and processors that need the same data share one projection. Duplicate models with the same events and fields should be merged. The validating skill adds a No Duplicate Read Models check; slicing patterns note preferring a shared read model when consumers read the same shape.

Reviewed by Cursor Bugbot for commit 7c4cbf9. Bugbot is set up for automated code reviews on this repo. Configure here.

@yordis
yordis merged commit 7bb3e29 into TrogonStack:main Oct 20, 2026
6 of 7 checks passed
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