Skip to content

Commit 52a5283

Browse files
dadachiclaude
andauthored
contributing: link to rename-safety contract (#57)
Add a Rename safety section to CONTRIBUTING.md linking to the canonical SUBSTRATE-CONTRACT.md in the agent repo. Includes a quick rule of thumb (avoid "a" / "an" before Shop / Shopkeeper / ItemTag) and a Rails-flavored failure-mode example (OpenAPI summaries and test descriptors). Mirrors the section added to the iOS substrate in nativeapptemplate/NativeAppTemplate-Free-iOS#67. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent d31f779 commit 52a5283

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,16 @@ This project uses [RuboCop with the Rails Omakase style](https://github.com/rail
5555
- Use fixtures (`test/fixtures/`) for test data.
5656
- Mock external HTTP calls with WebMock.
5757

58+
## Rename safety
59+
60+
This substrate is consumed by [`nativeapptemplate-agent`](https://github.com/nativeapptemplate/nativeapptemplate-agent), which mechanically renames `Shop`, `Shopkeeper`, and `ItemTag` (and all their case forms — PascalCase, snake_case, camelCase, flat, UPPER_SNAKE, humanized lower/title/sentence × singular/plural) to user-chosen target words. Some patterns that read fine in this repo break when renamed.
61+
62+
Before merging changes that touch user-facing strings, OpenAPI summaries, test descriptors, or comments mentioning domain entities, read the [substrate rename-safety contract](https://github.com/nativeapptemplate/nativeapptemplate-agent/blob/main/docs/SUBSTRATE-CONTRACT.md).
63+
64+
**Quick rule of thumb:** avoid `"a"` / `"an"` directly preceding `Shop`, `Shopkeeper`, or `ItemTag` (or their humanized forms) — write self-contained or article-free phrasings instead.
65+
66+
**Failure mode this prevents:** an OpenAPI summary like `"Get an item tag"` or a test descriptor like `test "destroy deletes an item_tag"` reads correctly here but produces `"Get an patient"` / `"destroy deletes an patient"` after the rename pipeline substitutes a consonant-starting word like `Patient`.
67+
5868
## Development Setup
5969

6070
See [README.md](README.md) for full setup instructions.

0 commit comments

Comments
 (0)