apple-dev: adopt prefixed Swift naming#116
Conversation
Why: Replace legacy plus-suffixed files with a deterministic Xcode-friendly naming grammar and give SwiftData a focused workflow owner. Breaking: New app scaffolds require --file-prefix and generate prefixed source, view-model, service, domain, and test filenames. Verification: Apple Dev docs validation passed; targeted workflow and customization tests passed.
Why: Publish the Swift naming and SwiftData workflow changes as a backward-compatible feature release. Verification: Shared version inventory is aligned and Socket marketplace metadata validation passes.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (8)
📒 Files selected for processing (114)
📝 WalkthroughWalkthroughIntroduces a dedicated SwiftData workflow with documentation, customization tooling, and plugin registration; standardizes prefixed concatenated Swift filenames; updates Xcode scaffolding, structure audits, tests, and guidance; and bumps repository package and plugin versions to 8.7.0. ChangesSwiftData workflow and Apple guidance
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related PRs
Suggested labels: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cda2e8d933
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - Never use `+` filenames. Name views `GEAWhateverView.swift`, paired view models `GEAWhateverViewModel.swift`, and extracted modifiers `GEAWhateverViewModifier.swift`. | ||
| - Give independently editable or previewable components their own files; small private helpers may remain while they do not clutter focused editing. | ||
| - Prefix child components with their complete composition owner, such as `GEASettingsSheetToggleCard.swift`. | ||
| - Use `GEAApp.swift` for the lifecycle entry, `GEA.swift` for the runtime/domain value, and `GEAAppService.swift` for its main service. |
There was a problem hiding this comment.
Template the recorded Swift prefix in generated guidance
When bootstrap-xcode-app-project is run with any --file-prefix other than GEA, the scaffold creates files such as ABCApp.swift but copies this AGENTS template unchanged, so the generated repo’s durable guidance tells future agents to use GEAApp.swift/GEAAppService.swift instead of the selected prefix. That can cause subsequent edits in non-GEA projects to introduce incorrectly named files; the template needs to use the chosen prefix or a neutral placeholder that is replaced during bootstrap.
Useful? React with 👍 / 👎.
| sources_dir = repo_root / "Sources" | ||
| if sources_dir.is_dir(): | ||
| for swift_path in sorted(sources_dir.rglob("*.swift")): | ||
| if len(swift_path.stem) < 3 or not swift_path.stem[:3].isalpha() or not swift_path.stem[:3].isupper(): |
There was a problem hiding this comment.
Compare Swift filenames against one selected prefix
For repos that have already selected a prefix, this audit only checks whether each filename starts with any three uppercase letters, so a mixed-prefix tree like ABCApp.swift plus XYZContentView.swift is reported as clean even though the workflow is supposed to flag files missing the selected prefix. This makes structure_audit miss the exact drift this change advertises; derive or require one prefix for the repo and compare every project-owned Swift file against that value.
Useful? React with 👍 / 👎.
Summary
+Swift filenamesVerification
uv run pytestinplugins/apple-dev-skills: 192 passedbash .github/scripts/validate_repo_docs.shuv run scripts/validate_socket_metadata.pySummary by CodeRabbit
New Features
Documentation
Chores