Day 4 fix: iOS + Android product-slug rename (symmetric with Rails)#10
Merged
Day 4 fix: iOS + Android product-slug rename (symmetric with Rails)#10
Conversation
Extends PR #9's Rails fix to the mobile workers. iOS generated project now ships with slug-scoped bundle ID + Xcode target + product name; Android generated project ships with slug-scoped applicationId, namespace, and Kotlin package path. - src/slug.ts: extract slugToPascal() — pure function, used by all three workers' buildProductRenamePairs. - src/agents/workers/rails.ts: import slugToPascal from ../../slug. - src/agents/workers/ios.ts: synthesize product pairs {NativeAppTemplateFree -> <Slug>Free, NativeAppTemplate -> <Slug>} and prepend to the domain plan. `NativeAppTemplateFree` runs first so `com.nativeapptemplate.nativeapptemplatefree`'s longer token gets replaced before the shorter prefix. - src/agents/workers/android.ts: same pair set (iOS and Android both have the `NativeAppTemplateFree` package suffix). Verified on clinic-queue spec: iOS: xcodeproj: ClinicQueue.xcodeproj bundle: com.clinicqueue.ClinicQueueFree.ios... product name: ClinicQueue zero NativeAppTemplate / nativeapptemplate leftovers Android: namespace + applicationId: com.clinicqueue.clinicqueuefree package dirs: app/src/main/kotlin/com/clinicqueue/clinicqueuefree/ zero leftovers Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
"Free" was a vestige of the substrate being the MIT free edition;
the generated project has no paid counterpart so the suffix added
no information. `App` matches the standard `com.org.app` Android
package convention and reads naturally in iOS bundle IDs.
Verified on clinic-queue:
iOS bundle: com.clinicqueue.ClinicQueueApp.ios...
Android: applicationId/namespace com.clinicqueue.clinicqueueapp
package dir .../com/clinicqueue/clinicqueueapp/
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Extends PR #9's Rails product rename to the two mobile workers. After this PR, all three generated projects are fully slug-scoped — no substrate product tokens leak into iOS bundle IDs, Xcode target names, Android
applicationId, namespaces, or Kotlin package directories.src/slug.ts— extractslugToPascal(). Pure function, reused by all three workers.src/agents/workers/rails.ts— now importsslugToPascalinstead of defining it inline. No behavior change.src/agents/workers/ios.tsandsrc/agents/workers/android.ts— each synthesizes two product-rename pairs:NativeAppTemplateFree → <Slug>Free(runs first — longer token incom.nativeapptemplate.nativeapptemplatefree)NativeAppTemplate → <Slug>(general brand/target)Why the order matters
com.nativeapptemplate.nativeapptemplatefreehas the flat tokennativeapptemplatefreeat the end. Our flat-lowercase pattern requires a non-letter (or uppercase) boundary, sonativeapptemplatealone won't match insidenativeapptemplatefree(followed byf). RunningNativeAppTemplateFree → <Slug>Freefirst replaces that full suffix token; the remainingcom.nativeapptemplatethen matches the shorter pair on its own.Verified on clinic-queue spec
iOS
ClinicQueue.xcodeproj(wasNativeAppTemplate.xcodeproj)com.clinicqueue.ClinicQueueFree.ios...PRODUCT_NAME = ClinicQueueNativeAppTemplate/nativeapptemplateleftovers in.swift,.pbxproj,.plist,.stringsAndroid
namespace = "com.clinicqueue.clinicqueuefree"(app + model modules)applicationId = "com.clinicqueue.clinicqueuefree"app/src/main/kotlin/com/clinicqueue/clinicqueuefree/…(bothcom/subdirs renamed, deepest-first).kt,.kts,.xml,.gradleRegression
npm run ci— 5/5 green (stub mode)What remains (not in this PR)
xcodebuild/./gradlew assembleDebugon generated projects. Day-5 Layer-2 work.Test plan
npm run ci— 5/5 green