Skip to content

rules: add genericity, best-practice, and self-review rules#10

Merged
shinaoka merged 3 commits intomainfrom
rules/genericity-and-best-practices
Mar 11, 2026
Merged

rules: add genericity, best-practice, and self-review rules#10
shinaoka merged 3 commits intomainfrom
rules/genericity-and-best-practices

Conversation

@shinaoka
Copy link
Copy Markdown
Member

@shinaoka shinaoka commented Mar 11, 2026

Summary

  • Add KISS, DRY, Single Source of Truth, Abstraction, Layering, Separation of Concerns, fix-root-causes, and no-speculative-backward-compatibility to ai/common-agent-rules.md as core principles
  • Add Backend and Scalar Type Genericity and Generic Test Patterns guidance to ai/numerical-rust-rules.md
  • Require reloading the full coding ruleset before creating any new plan
  • Require planning toward a cleaner end-state instead of ad hoc extensions
  • Require reloading the full coding ruleset again before pushing or creating a PR
  • Mirror the plan-time guidance in AGENTS.md so the repo-local entrypoint stays aligned with shared rules

Test plan

  • cargo fmt --all --check
  • cargo clippy --workspace
  • cargo test --release --workspace
  • cargo llvm-cov --workspace --release --json --output-path coverage.json
  • python3 scripts/check-coverage.py coverage.json
  • cargo doc --workspace --no-deps
  • python3 scripts/check-docs-site.py

Generated with Codex

- common-agent-rules.md: add KISS, DRY, Single Source of Truth,
  Abstraction, Layering, Separation of Concerns, fix-root-causes,
  and no-speculative-backward-compatibility as core principles;
  consolidate duplicate Design Principles section
- numerical-rust-rules.md: add Backend and Scalar Type Genericity
  section covering TypeId dispatch, hardcoded backends, scalar
  conversion naming, and macro-based deduplication; add Generic
  Test Patterns section; remove duplication with common rules
- createpr.md: add self-review step against rule files before PR

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shinaoka shinaoka enabled auto-merge (squash) March 11, 2026 11:30
@shinaoka shinaoka merged commit a23f9b6 into main Mar 11, 2026
5 checks passed
@shinaoka shinaoka deleted the rules/genericity-and-best-practices branch March 11, 2026 12:47
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.

1 participant