tech-stack-validator
npx skills add https://github.com/makgunay/claude-swift-skills --skill tech-stack-validator
Agent 安装分布
Skill 文档
Tech Stack Validator
Overview
Validate that the chosen technology stack can actually deliver what the PRD promises. This skill catches the expensive mistakes â the ones you discover 6 weeks into implementation when a framework doesn’t support a critical requirement.
Core principle: Every tech choice is a trade-off. The job isn’t to find the “best” stack â it’s to find the stack where the trade-offs align with the project’s priorities.
Workflow
Step 1: INGEST â Read PRD + Architecture docs, extract requirements
Step 2: CONSTRAINT MAP â Map requirements to technology constraints
Step 3: VALIDATE â Check each tech choice against constraints
Step 4: RISK SCAN â Flag deprecations, gaps, compatibility issues
Step 5: REPORT â Produce validation report with verdicts
Entry Points
- “Validate my tech stack” â User provides PRD/architecture docs â Full workflow
- “What should I build this with?” â Gather requirements interactively â Recommend stack â Validate
- “Is [framework X] the right choice for [requirement Y]?” â Focused validation on specific choice
- “Review my architecture doc” â Read doc â Steps 2-5
- “I’m deciding between X and Y” â Comparative analysis against requirements
Step 1: Ingest â Extract Requirements
From Documents
If the user provides a PRD and/or architecture document, extract these requirement categories:
PLATFORM REQUIREMENTS
âââ Target OS and minimum version (e.g., macOS 26+, iOS 18+)
âââ Device targets (Mac, iPhone, iPad, Vision Pro, Watch)
âââ Universal or platform-specific builds
âââ Apple Silicon only or Intel support needed
DISTRIBUTION REQUIREMENTS
âââ App Store (sandbox mandatory)
âââ Direct distribution (notarized, no sandbox)
âââ Both (dual binary or feature-gated)
âââ TestFlight / Enterprise distribution
FUNCTIONAL REQUIREMENTS â TECH IMPLICATIONS
âââ Local persistence â SwiftData, Core Data, SQLite, Realm, file-based
âââ Cloud sync â CloudKit, custom server, third-party BaaS
âââ Real-time collaboration â WebSockets, CloudKit sharing, custom
âââ AI/ML features â Core ML, FoundationModels, Vision, NLP
âââ Rich text editing â TextKit 2, AttributedString, custom
âââ Web content â WebKit (new WebView vs WKWebView bridge)
âââ Background processing â BGTaskScheduler, URLSession background
âââ System integration â Hotkeys, Accessibility API, pasteboard
âââ Notifications â Local, push (APNs), AlarmKit
âââ Widgets / Extensions â WidgetKit, App Intents
PERFORMANCE REQUIREMENTS
âââ Launch time budget
âââ Memory budget
âââ Search/query latency at expected data volume
âââ Animation frame rate
âââ Storage per unit of content
NON-FUNCTIONAL REQUIREMENTS
âââ Accessibility (VoiceOver, keyboard nav, Dynamic Type)
âââ Localization (RTL support, string extraction)
âââ Security (encryption at rest, keychain, network security)
âââ Privacy (privacy manifest, tracking transparency)
âââ Offline capability (full, partial, online-only)
TEAM & TIMELINE
âââ Solo developer or team size
âââ Timeline to v1.0
âââ Existing codebase or greenfield
âââ Team's framework experience
âââ Maintenance runway (who maintains this after launch?)
From Conversation
If no documents exist, ask these questions (2-3 at a time):
- What’s the app? What platform and minimum OS?
- App Store, direct distribution, or both?
- What data does it persist? Does it sync across devices?
- What system features does it need? (Hotkeys, clipboard, widgets, Siri, etc.)
- What’s the team size and timeline?
- Any existing code or starting fresh?
- Any strong preferences or constraints? (e.g., “must use SwiftUI only, no AppKit”)
Step 2: Constraint Map
Map each requirement to the technology dimensions it constrains:
Constraint Categories
| Dimension | What It Determines |
|---|---|
| Language version | Swift 6.2 features (default MainActor, @concurrent) need Xcode 26+ |
| UI framework | SwiftUI-only vs SwiftUI+AppKit bridge determines what’s possible |
| Persistence | SwiftData vs Core Data vs SQLite â each has different sync, migration, and query capabilities |
| Sync engine | CloudKit (Apple-only) vs custom server vs third-party â determines offline strategy |
| Minimum OS | Gates which frameworks/APIs are available (see availability matrix) |
| Distribution | Sandbox restrictions eliminate certain capabilities |
| Concurrency model | Swift 6 strict concurrency vs 5.x â affects every file in the project |
| Design system | Liquid Glass requires macOS 26+ / iOS 26+ |
OS Availability Matrix (Key Frameworks)
| Framework / API | macOS | iOS | Notes |
|---|---|---|---|
| SwiftUI | 10.15+ | 13+ | Feature set varies significantly by version |
| SwiftData | 14+ | 17+ | Class inheritance: 15+ / 18+ |
| @Observable | 14+ | 17+ | Replaces ObservableObject |
| NavigationSplitView | 13+ | 16+ | Replaces NavigationView |
| Liquid Glass (.glassEffect) | 26+ | 26+ | New design system, not backportable |
| FoundationModels (on-device LLM) | 26+ | 26+ | Apple Silicon with Apple Intelligence |
| WebView (SwiftUI native) | 26+ | 26+ | Replaces WKWebView bridge pattern |
| AlarmKit | â | 18+ | iOS only |
| App Intents | 13+ | 16+ | Advanced features (modes, snippets) in 26+ |
| Swift Testing | Xcode 16+ | Xcode 16+ | Replaces XCTest |
| Swift 6.2 (default MainActor) | Xcode 26 | Xcode 26 | Language-level, not OS-gated |
| GlassEffectContainer | 26+ | 26+ | Required for multiple glass effects |
| Chart3D | 26+ | 26+ | 3D charts, visionOS volumetric |
| WidgetKit | 14+ | 14+ | Accented mode: 26+ |
Sandbox Compatibility Matrix
| Capability | Sandboxed (App Store) | Direct Distribution |
|---|---|---|
| Global hotkeys (Carbon) | â ï¸ Needs entitlement | â |
| Accessibility API (AX) | â ï¸ Entitlement + user permission | â |
| CGEvent keystroke simulation | â Blocked | â (with Accessibility) |
| Clipboard read/write | â | â |
| File access (arbitrary) | â User-selected only | â |
| Network (outbound) | â ï¸ Needs entitlement | â |
| Launch at login | â SMAppService | â |
| iCloud sync | â | â |
| Keychain | â (app-scoped) | â |
| Screen recording | â | â (with permission) |
Step 3: Validate Each Choice
For every technology in the proposed stack, check:
3.1 Availability
- Is it available on the target OS version?
- If targeting multiple platforms, is it available on ALL of them?
- Are there feature gaps between OS versions? (e.g., SwiftData inheritance needs macOS 15+)
3.2 Capability
- Can this technology deliver the specific requirement?
- At the required scale? (e.g., SwiftData with 100K records â is @Query performant enough?)
- With the required latency? (e.g., full-text search in < 50ms)
3.3 Compatibility
- Does it work with the distribution model? (Sandbox restrictions?)
- Does it work with the other chosen technologies? (e.g., SwiftData + CloudKit sync â are there known limitations?)
- Does the concurrency model align? (Swift 6 strict checking + chosen frameworks)
3.4 Maturity
- Is this framework stable or still evolving rapidly?
- Are there known bugs or limitations in the current version?
- Is there sufficient documentation and community knowledge?
3.5 Maintenance
- Who maintains this dependency? (Apple framework vs third-party)
- What happens if it’s deprecated? (Migration path?)
- Does the team have experience with it?
Step 4: Risk Scan
Deprecation Risks
Check for deprecated or soon-to-be-deprecated patterns:
NavigationViewâNavigationSplitView/NavigationStackObservableObject+@Publishedâ@ObservableWKWebView+ Representable â NativeWebViewNSVisualEffectViewâNSGlassEffectView/.glassEffect()XCTestâ Swift Testing@StateObjectâ@Statewith@Observable
Common Mismatch Patterns
| PRD Says | Architecture Uses | Problem |
|---|---|---|
| “Works on macOS 14+” | Liquid Glass / .glassEffect() | Liquid Glass requires macOS 26+ |
| “App Store distribution” | CGEvent text insertion | Blocked by sandbox |
| “Offline-first with sync” | No local persistence layer | Can’t work offline without local DB |
| “< 100ms search on 50K items” | SwiftData @Query | Needs benchmarking; may need raw SQLite for complex queries |
| “Solo developer, 8 weeks” | Custom sync server + REST API | Scope exceeds timeline â use CloudKit instead |
| “Privacy-focused, no cloud” | CloudKit sync | Contradicts privacy requirement |
| “Must support Intel Macs” | FoundationModels framework | Requires Apple Silicon + Apple Intelligence |
| “Real-time collaboration” | CloudKit only | CloudKit is eventual-consistency, not real-time |
Step 5: Validation Report
Produce the report as a file. See references/report-template.md for the full template.
Report Structure
# Tech Stack Validation Report: [App Name]
## Verdict: â
GO / â ï¸ GO WITH CHANGES / â STOP
## Stack Summary
[Table of every technology choice with verdict]
## Critical Issues (Must Fix Before Starting)
[Issues that will block the project if not addressed]
## Warnings (Should Address Soon)
[Issues that will cause pain but won't block]
## Recommendations
[Suggested changes with rationale]
## Compatibility Matrix
[Full matrix of requirements vs. tech choices]
## Alternative Options Considered
[For each flagged issue, what alternatives exist]
Verdict Criteria
| Verdict | Criteria |
|---|---|
| â GO | All critical requirements met, no blocking issues, warnings are manageable |
| â ï¸ GO WITH CHANGES | 1-3 specific changes needed, but core stack is sound |
| â STOP | Fundamental mismatch â chosen stack cannot deliver PRD requirements |
Decision Frameworks
When to Use SwiftData vs Core Data vs SQLite
Need iCloud sync + simple models?
âââ SwiftData (macOS 14+ / iOS 17+)
Need complex queries + large datasets (>100K rows)?
âââ SQLite via GRDB or direct SQLite3
Need class inheritance in models?
âââ SwiftData (macOS 15+ / iOS 18+)
Need to support macOS 13 or iOS 16?
âââ Core Data
Need both complex queries AND sync?
âââ Core Data + CloudKit, or SQLite + custom sync
When to Use SwiftUI-Only vs SwiftUI + AppKit Bridge
App Store sidebar+detail app, standard controls?
âââ SwiftUI-only
Need floating panel (NSPanel)?
âââ SwiftUI + AppKit bridge
Need global hotkeys or CGEvent?
âââ SwiftUI + AppKit (AppDelegate)
Need custom window chrome or levels?
âââ SwiftUI + NSWindow/NSPanel
Need menu bar with popover?
âââ MenuBarExtra (pure SwiftUI) OR NSStatusItem + NSPopover (more control)
When to Use CloudKit vs Custom Server
Apple-only users, simple data, offline-first?
âââ CloudKit (free, built-in, handles conflicts)
Need cross-platform (Android/Web)?
âââ Custom server or Firebase/Supabase
Need real-time collaboration?
âââ Custom WebSocket server or third-party (Supabase Realtime)
Need fine-grained access control?
âââ Custom server
Solo developer, limited budget?
âââ CloudKit (zero infrastructure cost)
Interaction Style
- Be direct about risks â sugar-coating wastes the developer’s time
- Quantify when possible (“SwiftData @Query on 50K records: ~200ms” not “might be slow”)
- Always provide alternatives when flagging issues
- Distinguish between “this won’t work” (hard blocker) and “this will hurt” (soft issue)
- If the user has strong preferences, respect them but flag trade-offs clearly
- Remember that the “right” stack depends on team skills, timeline, and priorities â not just technical optimality
Key Principles
- Requirements drive choices, not preferences â “I like SwiftData” is not a justification if Core Data fits the requirements better
- Validate at the boundaries â Most tech works fine in isolation; problems emerge at integration points
- Time is a constraint â A technically superior stack that takes 6 months to learn is worse than a familiar stack that ships in 8 weeks
- Distribution gates capabilities â App Store sandbox restrictions are non-negotiable and must be checked early
- OS version is destiny â Every API has a minimum OS; the lowest target version constrains everything
- Dependencies are debt â Every third-party dependency is a maintenance commitment; prefer Apple frameworks when they’re sufficient
- Check the edges, not the middle â Basic CRUD works with anything; validate against the hardest requirements (performance, sync, offline, scale)