Repository navigation
fix(rename): keep links to the template's GitHub repos and the agent's name - #156
Merged
Merged
Conversation
…s name The rename treated every NativeAppTemplate spelling as the product name, including github.com/nativeapptemplate/<repo> links and the name nativeapptemplate-agent, so generated docs pointed at dead repos such as github.com/orangebaton/OrangeBaton-iOS and a nonexistent orangebaton-agent. rename.rb now masks those spans (PROTECTED_REFERENCE: any github.com/nativeapptemplate[/<repo>/...] link incl. the SSH form, and nativeapptemplate-agent[-mcp]) with placeholders before substituting file contents and restores them after, so nothing inside them is renamed. Path renames are unchanged. nativeapptemplate.com domains and emails still become the app's own. Layer 1 skips tokens inside the same spans (src/validation/protected-references.ts) so it doesn't flag them. Closes #155 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr
This was referenced Oct 18, 2026
Merged
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.
Summary
The rename turned references to the template's own repos into dead links in generated apps (
github.com/nativeapptemplate/NativeAppTemplate-iOS→github.com/orangebaton/OrangeBaton-iOS,.../nativeapptemplateapi/issues→.../orange_baton_api/issues, "nativeapptemplate-agent" → "orangebaton-agent").scripts/ruby/rename.rb:PROTECTED_REFERENCEmatchesgithub.com/nativeapptemplate(also the SSH formgithub.com:nativeapptemplate) plus any/<repo>/<path>up to whitespace,),], quotes,<,>or a backtick, and the bare namenativeapptemplate-agent/nativeapptemplate-agent-mcp.rename_contentswaps those spans for private-use-codepoint placeholders, runs the usual substitution, and puts them back. The spans come out byte-for-byte unchanged, including any Shop/ItemTag in a URL path. Only file contents are masked. Path renames still userename_alland behave as before.nativeapptemplate.comdomains and emails. They still become the app's own (support@orangebaton.com).src/validation/layer1.ts): skips matches that fall inside the same spans (src/validation/protected-references.ts, which mirrors the Ruby pattern). It allows only these exact forms, notnativeapptemplatein general. For example,github.com/nativeapptemplatefoo/...is still flagged.docs/SUBSTRATE-CONTRACT.mdand the "Rename the skeleton" step in README.Tests
/blob/...,/issues,/pull/12,.git, SSH, Markdown and SVG contexts; the bare agent name and-mcp; mixed lines; anItemTagpath segment inside a protected URL; anativeapptemplate.comdomain and email that must still be renamed. Layer 1 must accept the output.rename_allin place ofrename_content, and the Layer 1 span check removed): all three new tests failed.Sanity check
I ran rename.rb (Orange Baton plan) on temp copies of the paid API, iOS and Android substrates. All 31
github.com/nativeapptemplate/...links and the 29nativeapptemplate-agentmentions survive unchanged. There is noorangebaton-agentand nogithub.com/orange...in the output, and nonativeapptemplate.comis left. On that output, Layer 1 reports 0 findings with the change and 23 without it.Closes #155
🤖 Generated with Claude Code
https://claude.ai/code/session_01UZJxUoubntzu7Ec7DPVfAr