← Back to Pull requests

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

Closed
unknown closed this pull request without merging on Oct 20, 2026 23:23 UTC
View on GitHub
unknown unknown commented on Oct 20, 2026 23:08 UTC
Author

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
  • <!-- codesmith:footer -->
    ---
    <a href="https://app.blacksmith.sh/TrogonStack/codesmith/agentskills/pr/106?autoLogin=true&ref=codesmith_pr_footer"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-light-v3.svg"><img alt="View with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/view-with-codesmith-dark-v3.svg"></picture></a> <a href="https://backend.blacksmith.sh/track/enable-autofix?expires=1795129691&installation_model_id=437969&pr_number=106&ref=codesmith_pr_footer&repository=TrogonStack%2Fagentskills&return_to=https%3A%2F%2Fgithub.com%2FTrogonStack%2Fagentskills%2Fpull%2F106&signature=85143d7a7cd7e0cba92eb8142669648abb7653f5ced076fe33f843c411ecbe3c"><picture><source media="(prefers-color-scheme: dark)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"><source media="(prefers-color-scheme: light)" srcset="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-light.svg"><img alt="Autofix with [code]smith" src="https://pr-comments-assets.blacksmith.sh/codesmith/autofix-with-codesmith-dark.svg"></picture></a>
    <sup>Need help on this PR? Tag <code>@codesmith-bot</code> with what you need.</sup>

    <!-- codesmith:autofix:disabled -->
    <!-- /codesmith:footer -->

    Diff: 300 lines (+225 / -75) across 3 files Reviewer: yordis Review duration: 15m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 300 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.341
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #106"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.1% (MEDIUM) · Higher = larger blast radius
    40.1%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 17.3% · Safe to merge
    17.3%