chore: guardrails to prevent giant files and dep-version drift #394
No reviewers
Labels
No labels
adr
automated
bug
chore
dependencies
documentation
enhancement
epic
github-actions
P1-high
P2-medium
P3-low
release
research
rust
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Slipstream/eventcore!394
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/guardrail-update-module-and-dep-consistency"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Generation guardrails arising from the review feedback on PR #390 (the
eventcore-fsbackend). Two lessons came out of that review:~1600-line lib.rs— too large to work with comfortably.crates, and a question about how versions stay consistent.
Per our review-feedback protocol, these go in their own guardrails PR. I chose
generation guardrails (rules an agent reads before writing code) over
auto-review review instructions because prevention is more token-efficient than
catching the same issues in a review round-trip and re-doing the work.
Changes
.claude/rules/module-organization.md(new) — keep source files focusedon one responsibility; split into responsibility-named modules before a file
grows monolithic;
lib.rsis a thin facade that declares modules andre-exports the public API. Includes a concrete Rust split.
.claude/rules/cargo-dependencies.md— adds a Version Consistency AcrossCrates section: match sibling crates' dependency version requirements; how
Cargo's lockfile unifies SemVer-compatible versions; and that lockstep
path-dependency versions (ADR-025) are intentional, not drift.
These would have prevented both review comments at generation time.
🤖 Generated with Claude Code
This PR introduces generation guardrails to prevent large source files and ensure dependency version consistency across crates. The changes include new guidelines for module organization and dependency management, aiming to improve code maintainability and consistency. The additions appear safe to merge as they provide clear instructions for future code generation.
Walkthrough
Module Organization Guidelines:
.claude/rules/module-organization.md.Dependency Version Consistency:
.claude/rules/cargo-dependencies.mdwith a new section on version consistency.LLM usage and cost
Estimated total USD: $0.014041 via https://api.openai.com and https://api.openai.com