Skip to content

rules: generalize cross-repository rules from tenferro-rs (issue #6) - #11

Merged
shinaoka merged 1 commit into
mainfrom
rules/issue-6-generalize
Aug 10, 2026
Merged

rules: generalize cross-repository rules from tenferro-rs (issue #6)#11
shinaoka merged 1 commit into
mainfrom
rules/issue-6-generalize

Conversation

@shinaoka

Copy link
Copy Markdown
Member

Summary

Generalizes the repository-neutral rules from tenferro-rs REPOSITORY_RULES.md
into the shared rules/, resolving tensor4all-agent-rules#6 and the
shared-rules prerequisite required by tensor4all-rs#566.

What is added

  • common/repository.md: Invariant Markers (// INVARIANT: + #[allow]
    rationale + false-positive ledger); API Evolution (no try_* escapes, no
    deprecated shims); Output-Update Naming Principle; File Organization;
    Work Logs And Design Records (with the PR-body link requirement and the
    rule-inventory meta-rule); Final Cross-Phase Multi-Agent Audit protocol.
  • common/performance.md: Performance-Gated Experiment Protocol; Cache
    Ownership; Complexity Budget.
  • common/docs-and-tests.md: Doc-Example policy (no ignore/no_run,
    compile_fail only for intentional failures, executable snippet sync,
    README sync mechanism); Public Result Error-Documentation Gate.
  • rust/index.md: Unsafe Code Boundary (// SAFETY: per block);
    Unit Test Organization; Debug And Enum Hygiene.
  • rust/performance.md: Uninitialized And Scratch Acquisition
    (full-overwrite contract); Threading Principles (repository-owned execution
    context).
  • rust/numerical.md: Typed Errors (classification by kind, eager/symbolic
    parity with phase as a separate axis, source() preservation, remedies).
  • rules/index.md: descriptions updated for the new sections.

All 14 checklist items from #6 plus the 4 additions required by tensor4all-rs
#566 (performance experiment protocol, work-log PR-body link, rule-inventory
meta-rule, final cross-phase audit) are covered. The existing validate-rules
CI gate (index.md link resolution) passes.

Out of scope

Repository-specific adoption (strided-rs, tenferro-rs, tensor4all-rs trimming
their local rules to references) is tracked per-repo and follows this merge.

Adds the repository-neutral rules required by tensor4all-agent-rules#6 and
tensor4all-rs#566's shared-rules prerequisite:

- common/repository.md: invariant markers (// INVARIANT + #[allow] rationale),
  API evolution (no try_* escapes, no deprecated shims), output-update naming,
  file organization, work logs with PR-body link requirement, rule-inventory
  meta-rule, and the final cross-phase multi-agent audit protocol.
- common/performance.md: performance-gated experiment protocol, cache
  ownership, complexity budget.
- common/docs-and-tests.md: doc-example policy (no ignore/no_run, compile_fail
  only, executable snippet sync, README sync) and the public Result
  error-documentation gate.
- rust/index.md: unsafe code boundary (SAFETY per block), unit test
  organization, debug/enum hygiene.
- rust/performance.md: uninitialized/scratch acquisition (full-overwrite
  contract), threading principles (repository-owned execution context).
- rust/numerical.md: typed-error classification (parity across eager/symbolic
  paths, phase as a separate axis, source() preservation, remedies).
- rules/index.md: descriptions updated for the new sections.

All 18 checklist items (14 from #6 + 4 #566 additions) are covered; the
existing validate-rules CI gate (index.md links) passes.
@shinaoka
shinaoka merged commit eed7c18 into main Aug 10, 2026
1 check passed
@shinaoka
shinaoka deleted the rules/issue-6-generalize branch August 10, 2026 07:21
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