feat: expand Swift/Apple support with reviewer, build resolver, and iOS workflow skills#1289
feat: expand Swift/Apple support with reviewer, build resolver, and iOS workflow skills#1289chris-yyau wants to merge 3 commits intoaffaan-m:mainfrom
Conversation
- swift-reviewer: reviews Swift code for concurrency safety, SwiftUI correctness, protocol-oriented design, actor isolation, and Apple platform conventions - swift-build-resolver: fixes Swift/Xcode/SPM build errors, compiler diagnostics, and package resolution failures Addresses affaan-m#912 (Swift/Apple support parity). Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
- ios-architecture: MVVM with SwiftUI, Clean Architecture layering, Coordinator navigation, module boundaries, dependency injection - ios-testing: Swift Testing framework, XCTest, UI tests, snapshot testing, mock/spy patterns, test organization Catalog counts updated (49 agents, 183 skills). Addresses affaan-m#912 (Swift/Apple support parity). Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (4)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughThis PR adds two Swift-focused agents ( Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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.
Pull request overview
Expands ECC’s Swift/Apple workflow surface by adding Swift-specific reviewer and build-resolver agents plus two iOS workflow skills (architecture + testing), and synchronizes catalog counts in the READMEs.
Changes:
- Added
swift-reviewerandswift-build-resolveragents for Swift/iOS review and build error resolution workflows. - Added
ios-architectureandios-testingskills covering end-to-end iOS app architecture and testing practices. - Updated agent/skill catalog counts in English + zh-CN documentation.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| agents/swift-reviewer.md | New Swift/iOS code review agent (concurrency, SwiftUI, architecture, platform conventions). |
| agents/swift-build-resolver.md | New Swift/Xcode/SPM build error resolver agent with diagnostic/resolution workflow. |
| skills/ios-architecture/SKILL.md | New iOS architecture skill (layering, MVVM, coordinators, modules, DI). |
| skills/ios-testing/SKILL.md | New iOS testing skill (Swift Testing, XCTest UI tests, snapshots, organization). |
| README.md | Updated catalog counts (agents/skills). |
| README.zh-CN.md | Updated catalog counts (agents/skills). |
| docs/zh-CN/README.md | Updated catalog counts (agents/skills). |
| AGENTS.md | Updated catalog counts (agents/skills). |
| docs/zh-CN/AGENTS.md | Updated catalog counts (agents/skills). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
agents/swift-reviewer.md
Outdated
|
|
||
| ### SwiftUI (HIGH) | ||
|
|
||
| - **`@State` on reference types** — `@State` is designed for value types; use `@Observable` for classes |
There was a problem hiding this comment.
The checklist item "@State on reference types" is inaccurate for this repo’s SwiftUI guidance: swiftui-patterns explicitly recommends using an @Observable class stored in @State for owned models. As written, the agent may incorrectly flag correct @Observable + @State usage; consider narrowing this to legacy ObservableObject cases (or explicitly exempt @Observable models).
| - **`@State` on reference types** — `@State` is designed for value types; use `@Observable` for classes | |
| - **`@State` on legacy/non-observable reference types** — Avoid storing plain classes or owned `ObservableObject` in `@State`; owned `@Observable` models in `@State` are valid |
| Use `swift-snapshot-testing` for visual regression: | ||
|
|
||
| ```swift | ||
| import SnapshotTesting |
There was a problem hiding this comment.
This Swift Testing snapshot example uses @Test(...) but doesn’t import the Swift Testing module, so the snippet won’t compile as shown. Add import Testing (or rewrite this example as an XCTest-based snapshot test for consistency).
| import SnapshotTesting | |
| import SnapshotTesting | |
| import Testing |
agents/swift-build-resolver.md
Outdated
| # Check for version conflicts | ||
| swift package resolve 2>&1 | grep -i "error\|conflict\|incompatible" | ||
|
|
||
| # Show available versions of a package |
There was a problem hiding this comment.
The comment "Show available versions of a package" is misleading here: swift package dump-package only prints the current package manifest/dependencies, not remote available versions/tags. Either adjust the description to match the command output or replace it with a command that actually inspects remote tags/versions for a dependency.
| # Show available versions of a package | |
| # Show package manifest dependencies |
There was a problem hiding this comment.
Actionable comments posted: 6
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@AGENTS.md`:
- Line 3: Update the "Available Agents" table to include the two new agents
referenced in the PR: add rows for swift-reviewer and swift-build-resolver with
consistent columns and brief descriptions matching the existing style, and
verify the top-level agent count (49) matches the table entries; ensure the new
rows follow the same formatting/ordering conventions as other agents in the
catalog so they appear in the visible index.
In `@agents/swift-reviewer.md`:
- Around line 75-79: The guidance incorrectly discourages using `@State` with
reference types; update the rule text to state that with iOS 17+ Observation you
may store `@Observable` (observation-based) classes in `@State`, and reserve
`@StateObject` for legacy ObservableObject classes — change any mention of "avoid
`@State` on reference types" to explicitly allow `@State` for `@Observable` types and
add a short note referencing migration from ObservableObject to `@Observable` for
clarity (mention symbols `@State`, `@Observable`, `@StateObject`, ObservableObject,
and "migration guide" to locate the relevant docs).
In `@docs/zh-CN/AGENTS.md`:
- Line 3: The summary and agent list are inconsistent: the summary says 49
agents but the "available agents" section is missing the newly added
swift-reviewer and swift-build-resolver entries; add those two agent entries
(swift-reviewer, swift-build-resolver) into the "可用智能体" list and update the
top-line count from 49 to 51 (and any other counts or index references in the
document that assume 49) so the summary and list remain consistent with the
added agents.
In `@README.md`:
- Line 239: The README contains inconsistent inventory numbers — update all
references to the same canonical counts by replacing the hardcoded sentence
"That's it! You now have access to 49 agents, 183 skills, and 79 legacy command
shims." and any other occurrences (e.g., the "What's New v1.10.0" bullet and the
"agents/ tree count") so they all reflect the single source of truth; pick the
authoritative source (a single variable, script output, or documented canonical
numbers) and use it to normalize every count string in the README so all
mentions match exactly.
In `@skills/ios-architecture/SKILL.md`:
- Around line 11-290: Add two top-level Markdown headings "How It Works" and
"Examples" to the document and move the existing explanatory and example content
into them: place the architecture explanation and patterns (the "Layered
Architecture" diagram and the "Presentation Layer", "Domain Layer", "Data
Layer", "MVVM with SwiftUI", "Navigation", "Module Boundaries", "Dependency
Injection", and "Anti-Patterns" sections) under "How It Works", and group
concrete code snippets and usage examples (the ViewModel, View binding,
Coordinator, DependencyContainer composition, and any sample package layout/DI
examples) under "Examples"; ensure the existing top-level "When to Use" header
remains unchanged and that the new headers are top-level (##) to satisfy the
required skill format.
In `@skills/ios-testing/SKILL.md`:
- Around line 11-318: The markdown is missing top-level "How It Works" and
"Examples" sections; add a "How It Works" heading and move the explanations of
Swift Testing, Mocking Strategy, ViewModel Testing, UI Testing, Snapshot
Testing, Test Organization, Coverage, and Anti-Patterns under it, and add an
"Examples" heading containing the concrete test snippets (Basic Test,
Parameterized Tests, Suites, Traits, XCUITest, Snapshot Testing) so the file
includes clear "When to Use", "How It Works", and "Examples" sections; update
any table-of-contents or ordering so the headings appear in that sequence and
keep existing content unchanged except for relocating it under the new headings.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 65a51d4f-f7c2-4fd8-a35a-16f5bb817fca
📒 Files selected for processing (9)
AGENTS.mdREADME.mdREADME.zh-CN.mdagents/swift-build-resolver.mdagents/swift-reviewer.mddocs/zh-CN/AGENTS.mddocs/zh-CN/README.mdskills/ios-architecture/SKILL.mdskills/ios-testing/SKILL.md
| # Everything Claude Code (ECC) — Agent Instructions | ||
|
|
||
| This is a **production-ready AI coding plugin** providing 47 specialized agents, 181 skills, 79 commands, and automated hook workflows for software development. | ||
| This is a **production-ready AI coding plugin** providing 49 specialized agents, 183 skills, 79 commands, and automated hook workflows for software development. |
There was a problem hiding this comment.
Count updated, but new Swift agents are missing from the visible agent catalog.
The file now states 49 agents, but this doc’s “Available Agents” table does not list swift-reviewer or swift-build-resolver. Please add them to keep this index aligned with the PR’s new capabilities.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` at line 3, Update the "Available Agents" table to include the two
new agents referenced in the PR: add rows for swift-reviewer and
swift-build-resolver with consistent columns and brief descriptions matching the
existing style, and verify the top-level agent count (49) matches the table
entries; ensure the new rows follow the same formatting/ordering conventions as
other agents in the catalog so they appear in the visible index.
| ``` | ||
|
|
||
| **That's it!** You now have access to 47 agents, 181 skills, and 79 legacy command shims. | ||
| **That's it!** You now have access to 49 agents, 183 skills, and 79 legacy command shims. |
There was a problem hiding this comment.
README now contains contradictory inventory numbers.
This line says 49 agents / 183 skills, but the same file still includes older counts (e.g., the “What’s New v1.10.0” bullet and agents/ tree count). Please normalize all count references to one source of truth.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@README.md` at line 239, The README contains inconsistent inventory numbers —
update all references to the same canonical counts by replacing the hardcoded
sentence "That's it! You now have access to 49 agents, 183 skills, and 79 legacy
command shims." and any other occurrences (e.g., the "What's New v1.10.0" bullet
and the "agents/ tree count") so they all reflect the single source of truth;
pick the authoritative source (a single variable, script output, or documented
canonical numbers) and use it to normalize every count string in the README so
all mentions match exactly.
Greptile SummaryAdds two Swift agents ( The only finding is in Confidence Score: 5/5Safe to merge; the single remaining finding is a P2 style suggestion on example code in a documentation skill file All four new content files are well-structured and follow established agent/skill patterns. The only finding (missing @mainactor on @suite test structs in ios-testing/SKILL.md) is a P2 documentation quality issue that does not block the feature. Catalog counts are consistent across all updated files. skills/ios-testing/SKILL.md — both @suite test structs should be annotated @mainactor to model correct Swift 6 concurrency Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[swift-reviewer agent] -->|Step 1| B[git diff: identify .swift files]
B -->|Step 2| C[Check Package.swift / .xcodeproj\nRead CLAUDE.md / detect platform]
C --> D{Critical security\nissue found?}
D -->|Yes| E[Escalate to security-reviewer\nSTOP]
D -->|No| F[Step 3: Read changed files\nApply checklist]
F --> G[CRITICAL: Concurrency + Security\nHIGH: SwiftUI + Architecture\nMEDIUM: Idioms + Platform\nLOW: Performance]
G -->|Step 4| H[Report findings\n>80% confidence only]
H --> I{CRITICAL or HIGH\nissues found?}
I -->|Yes| J[Verdict: BLOCK]
I -->|No| K[Verdict: APPROVE]
Reviews (2): Last reviewed commit: "fix(agents,skills): address bot review f..." | Re-trigger Greptile |
There was a problem hiding this comment.
11 issues found across 9 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="agents/swift-build-resolver.md">
<violation number="1" location="agents/swift-build-resolver.md:26">
P1: `swift test` failures are masked as "tests not runnable," which can hide real regressions.</violation>
<violation number="2" location="agents/swift-build-resolver.md:35">
P2: Shell examples use `<placeholder>` tokens that Bash interprets as redirection, causing pasted commands to fail.</violation>
<violation number="3" location="agents/swift-build-resolver.md:35">
P2: Hard-coded iOS simulator name in diagnostic command is brittle and can fail on environments without that exact device.</violation>
<violation number="4" location="agents/swift-build-resolver.md:80">
P2: Troubleshooting docs claim to show available package versions, but the command only dumps local manifest/dependencies, which is misleading for version-conflict diagnosis.</violation>
</file>
<file name="skills/ios-testing/SKILL.md">
<violation number="1" location="skills/ios-testing/SKILL.md:117">
P2: Documentation recommends `@unchecked Sendable` on mutable mocks/spies without synchronization, enabling unsafe concurrent access and flaky tests.</violation>
<violation number="2" location="skills/ios-testing/SKILL.md:254">
P2: Missing `import Testing` — this snippet uses `@Test(...)` from the Swift Testing framework but only imports `SnapshotTesting` and `SwiftUI`, so it won't compile as shown.</violation>
</file>
<file name="agents/swift-reviewer.md">
<violation number="1" location="agents/swift-reviewer.md:75">
P1: The checklist item "`@State` on reference types" is inaccurate for iOS 17+ Observation. With the `@Observable` macro, storing an `@Observable` class in `@State` is Apple's recommended pattern (per their migration guide). As written, the agent would incorrectly flag valid `@Observable` + `@State` usage. Narrow this to legacy `ObservableObject` cases or explicitly exempt `@Observable` models.</violation>
</file>
<file name="AGENTS.md">
<violation number="1" location="AGENTS.md:3">
P2: AGENTS.md updates agent totals to 49 but does not add the new Swift agents to the Available Agents table, leaving the document internally inconsistent.</violation>
</file>
<file name="skills/ios-architecture/SKILL.md">
<violation number="1" location="skills/ios-architecture/SKILL.md:195">
P2: `Destination: Hashable` uses `case detail(Item)` without stating that `Item` must be `Hashable`, making the example easy to copy into a non-compiling state.</violation>
</file>
<file name="README.zh-CN.md">
<violation number="1" location="README.zh-CN.md:109">
P2: README.zh-CN updates capability counts but omits Swift in setup/discovery sections, creating misleading installation and feature documentation.</violation>
</file>
<file name="docs/zh-CN/README.md">
<violation number="1" location="docs/zh-CN/README.md:212">
P2: Updated aggregate counts in zh-CN README conflict with stale detailed inventory (agents/skills list not synchronized).</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
| ``` | ||
|
|
||
| **完成!** 你现在可以使用 47 个代理、181 个技能和 79 个命令。 | ||
| **完成!** 你现在可以使用 49 个代理、183 个技能和 79 个命令。 |
There was a problem hiding this comment.
P2: README.zh-CN updates capability counts but omits Swift in setup/discovery sections, creating misleading installation and feature documentation.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At README.zh-CN.md, line 109:
<comment>README.zh-CN updates capability counts but omits Swift in setup/discovery sections, creating misleading installation and feature documentation.</comment>
<file context>
@@ -106,7 +106,7 @@ cp -r everything-claude-code/rules/perl ~/.claude/rules/
-完成! 你现在可以使用 47 个代理、181 个技能和 79 个命令。
+完成! 你现在可以使用 49 个代理、183 个技能和 79 个命令。
multi-* 命令需要额外配置
</file context>
</details>
<a href="https://www.cubic.dev/action/fix/violation/03660dd5-a52a-4b2a-9493-3ffc9d7ff6d9" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://cubic.dev/buttons/fix-with-cubic-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://cubic.dev/buttons/fix-with-cubic-light.svg">
<img alt="Fix with Cubic" src="https://cubic.dev/buttons/fix-with-cubic-dark.svg">
</picture>
</a>
| ``` | ||
|
|
||
| **搞定!** 你现在可以使用 47 个智能体、181 项技能和 79 个命令了。 | ||
| **搞定!** 你现在可以使用 49 个智能体、183 项技能和 79 个命令了。 |
There was a problem hiding this comment.
P2: Updated aggregate counts in zh-CN README conflict with stale detailed inventory (agents/skills list not synchronized).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/zh-CN/README.md, line 212:
<comment>Updated aggregate counts in zh-CN README conflict with stale detailed inventory (agents/skills list not synchronized).</comment>
<file context>
@@ -209,7 +209,7 @@ npx ecc-install typescript
-搞定! 你现在可以使用 47 个智能体、181 项技能和 79 个命令了。
+搞定! 你现在可以使用 49 个智能体、183 项技能和 79 个命令了。
</file context>
</details>
<a href="https://www.cubic.dev/action/fix/violation/8f2eb360-8681-4984-85d5-b1fdc47e6085" target="_blank" rel="noopener noreferrer" data-no-image-dialog="true">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://cubic.dev/buttons/fix-with-cubic-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://cubic.dev/buttons/fix-with-cubic-light.svg">
<img alt="Fix with Cubic" src="https://cubic.dev/buttons/fix-with-cubic-dark.svg">
</picture>
</a>
swift-reviewer: - Fix @State guidance for iOS 17+ @observable (was incorrectly flagging valid usage) - Merge Step 2b into Step 2 to fix numbering gap swift-build-resolver: - Remove || echo fallback that masks swift test failures - Fix misleading "show available versions" comment (dump-package shows local manifest) - Add OS=latest to simulator destination for portability ios-testing: - Add missing import Testing to snapshot test example - Add justification comment for @unchecked Sendable on test mocks ios-architecture: - Add How It Works and Examples section headers for skill format compliance - Add Hashable constraint comment on Destination enum AGENTS.md + zh-CN/AGENTS.md: - Add swift-reviewer and swift-build-resolver to Available Agents tables Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
|
ECC bundle files are already tracked in this repository. Skipping generation of another bundle PR. |
Summary
Expands Swift/Apple support toward parity with Kotlin, Python, and TypeScript workflows, as requested in #912.
Agents (2 new):
swift-reviewer— Reviews Swift code for concurrency safety (data races, Sendable violations, actor isolation), SwiftUI correctness (@State/@StateObject misuse, recomposition traps), protocol-oriented design, and Apple platform conventionsswift-build-resolver— Fixes Swift/Xcode/SPM build errors, compiler diagnostics, package resolution failures, and SwiftLint violationsSkills (2 new):
ios-architecture— MVVM with SwiftUI, Clean Architecture layering, Coordinator navigation, module boundaries, dependency injection patternsios-testing— Swift Testing framework, XCTest, UI tests, snapshot testing, mock/spy patterns, parameterized tests, test organizationHow This Fills the Gap (#912)
swift-reviewer(matches kotlin-reviewer pattern)swift-build-resolver(matches kotlin-build-resolver pattern)ios-architecture— end-to-end app architectureswift-protocol-di-testing(DI focus)ios-testing— full testing workflow with Swift Testing, XCTest, UI tests, snapshotsBuilds on the existing Swift foundation:
rules/swift/*,swiftui-patterns,swift-concurrency-6-2,swift-protocol-di-testing,swift-actor-persistence,foundation-models-on-device,liquid-glass-design.Files
agents/swift-reviewer.md(189 lines)agents/swift-build-resolver.md(130 lines)skills/ios-architecture/SKILL.md(290 lines)skills/ios-testing/SKILL.md(318 lines)Test plan
npx markdownlint-clion all 4 new files — cleannode tests/run-all.js— 1763/1763 tests passnode scripts/ci/catalog.js --writeswift-revieweron a Swift project — verify checklist coverageswift-build-resolveron a failing SPM build — verify diagnostic workflowCloses #912
Generated with Claude Code
via Happy
Summary by cubic
Adds two Swift agents and two iOS skills to expand Apple platform support toward parity, addressing #912. Polishes instructions and updates catalog counts to 49 agents and 183 skills.
New Features
swift-reviewer(concurrency/SwiftUI/actor isolation review),swift-build-resolver(Xcode/SPM/compiler/SwiftLint build fixes).ios-architecture(MVVM, Clean Architecture, Coordinator, DI),ios-testing(Swift Testing, XCTest, UI/snapshot tests, mocks).Bug Fixes
swift-reviewer: corrected iOS 17@Observable+@Stateguidance; fixed step numbering.swift-build-resolver: removed masking ofswift testfailures; clarifieddump-packagecomment; added OS=latest to simulator destination.ios-testing: added missingimport Testingin snapshot example; justified@unchecked Sendableon test mocks.ios-architecture: added required section headers; notedHashablerequirement on navigation enum.Written for commit 9b184ad. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation