Skip to content

Commit 8fa58fd

Browse files
authored
Merge pull request #50 from serradura/docs/no-breaking-changes-policy
docs: state no-breaking-API-changes policy
2 parents 31e2173 + 4a4ecd0 commit 8fa58fd

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

CLAUDE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
Notes for AI assistants working in `u-attributes`.
44

5+
## Golden rule: no breaking API changes — ever
6+
7+
`u-attributes` is a runtime dependency of [`u-case`](https://github.com/serradura/u-case), whose own public API is frozen. **The same compromise applies here:** the public API and runtime contracts of `u-attributes` won't break. Every change must keep existing code working — both for direct users of the gem and for `u-case` (and everything that transitively depends on it).
8+
9+
Major version bumps are reserved for dependency-floor changes (dropping a Ruby or `activemodel` version from the supported matrix) per SemVer. They do **not** signal a behavior break.
10+
11+
If a task as stated would require a breaking change to honor it, stop and surface that — propose a backward-compatible path, or flag that the request can't be satisfied without violating this rule. Don't ship the break.
12+
513
## How to work in this repo
614

715
### 1. Think before coding

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
</p>
1414
</p>
1515

16+
> [!IMPORTANT]
17+
> **No breaking API changes — ever.** `u-attributes` is a runtime dependency of [`u-case`](https://github.com/serradura/u-case), whose own public API is frozen — so the same compromise applies here. The gem's role is to remain a stable, backward-compatible foundation for every project (directly or transitively) that depends on it.
18+
>
19+
> Major version bumps signal only that a Ruby or `activemodel` version was dropped from the supported matrix — per SemVer, a dependency-floor change. Your code keeps working.
20+
1621
`u-attributes` lets you define classes whose instances expose attribute readers but no setters. Mutation goes through [`#with_attribute`](#with_attribute) / [`#with_attributes`](#with_attributes), which return a new instance — you transform the object instead of modifying it.
1722

1823
## Why u-attributes? <!-- omit in toc -->

0 commit comments

Comments
 (0)