docs: add CLAUDE.md with engineering guidance for AI-assisted changes#35
Closed
hozblok wants to merge 1 commit into
Closed
docs: add CLAUDE.md with engineering guidance for AI-assisted changes#35hozblok wants to merge 1 commit into
hozblok wants to merge 1 commit into
Conversation
Lead principle: prefer obvious failures over silent acceptance of wrong-shaped input. The doc covers exception-type discipline, the breaking-change contract for public APIs, regression-test expectations, and a Don'ts list (no drive-by reformatting, no loosening type contracts for ergonomics, no bypassing safety checks). Referenced from incoming PRs that tighten input-validation contracts so the rationale lives next to the rule rather than in a single commit body. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This was referenced May 11, 2026
Owner
Author
|
Closing as obsolete. A different If any of the principles here (loud failures over silent acceptance, exception-type discipline, test-discipline rule, the Don'ts list) are still wanted, they belong as a small additive edit to the current |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
CLAUDE.mdat the repo root documenting the engineering principles AI-assisted changes should follow.Lead principle. Prefer obvious failures over silent acceptance of wrong-shaped input. If a caller passes the wrong type or shape to a public API, the wrapper must raise a clear, named exception whose message identifies both the parameter and the offending value's type — no coercion, no silent fallback, no sentinel return.
Other sections:
Exception).Incoming PR #16 (
fix/02-solver-rejects-scalar-no-vars) is being amended to follow the lead principle (replace silent scalar-coercion with a cleanTypeError); this doc should land first so that PR's body can link to it.