agentleFS
TechopolisTechopolis/swift-agents/.github/copilot-instructions.md

swift-agents

Copilot instructions38 starsChanged 9 months agoMITView on GitHub

Before proceeding with any task involving Swift code, SwiftUI views, UIKit views, async/await, actors, Sendable, @MainActor, Foundation Models, MLX, Core ML, coremltools, model conversion, MLXLLM, MLXVLM, MLXLMCommon, LLMModelFactory, ChatSession, GenerateParameters, LoRA, Hugging Face models, Keychain, CryptoKit, biometric auth, App Store submission, testing, SwiftData, @Model, ModelContainer, @Query, persistence, schema migration, visionOS, RealityKit, ARKit, immersive spaces, spatial computing, StoreKit, in-app purchases, subscriptions, Product, Transaction, performance profiling, Instruments, MetricKit, hang detection, launch time, memory optimization, Meta Wearables DAT, or any iOS/macOS/visionOS application code:

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

15 rules. About 0 are common, 13 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈13

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Do NOT write SwiftUI code without mobile-a11y-specialist review

    line 7
  2. Distinctive:

    Do NOT write concurrent code without concurrency-specialist review

    line 8
  3. Distinctive:

    Do NOT handle credentials or encryption without swift-security-specialist review

    line 9
  4. Distinctive:

    Do NOT submit to App Store without app-review-guardian review

    line 10
  5. Distinctive:

    Do NOT convert or optimize ML models without coreml-specialist review

    line 11
  6. Distinctive:

    Do NOT use MLX Swift, MLXLLM, or MLXVLM without mlx-specialist review

    line 12
  7. Distinctive:

    Do NOT write SwiftData models or queries without swiftdata-specialist review

    line 13
  8. Distinctive:

    Do NOT build visionOS or RealityKit features without visionos-specialist review

    line 14
  9. Distinctive:

    Do NOT implement in-app purchases without storekit-specialist review

    line 15
  10. Distinctive:

    Do NOT optimize performance without performance-specialist review

    line 16
  11. Distinctive:

    NEVER create mock, placeholder, or stub implementations.

    line 21
  12. Distinctive:

    Use built-in SwiftUI features instead of building custom replacements.

    line 22
  13. Very specific:

    Use .searchable, .refreshable, PhotosPicker, ShareLink, SubscriptionStoreView, .confirmationDialog.

    line 26
  14. Very specific:

    Use Swift compiler synthesis (Codable, Equatable, Hashable) instead of manual implementations.

    line 27
  15. Distinctive:

    If the task does not involve any Swift or Apple platform code, proceed normally.

    line 29

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

Swift Agents — Copilot Instructions

Before proceeding with any task involving Swift code, SwiftUI views, UIKit views, async/await, actors, Sendable, @MainActor, Foundation Models, MLX, Core ML, coremltools, model conversion, MLXLLM, MLXVLM, MLXLMCommon, LLMModelFactory, ChatSession, GenerateParameters, LoRA, Hugging Face models, Keychain, CryptoKit, biometric auth, App Store submission, testing, SwiftData, @Model, ModelContainer, @Query, persistence, schema migration, visionOS, RealityKit, ARKit, immersive spaces, spatial computing, StoreKit, in-app purchases, subscriptions, Product, Transaction, performance profiling, Instruments, MetricKit, hang detection, launch time, memory optimization, Meta Wearables DAT, or any iOS/macOS/visionOS application code:

  1. Switch to the swift-lead agent
  2. The swift-lead will determine which specialist agents are needed
  3. Do NOT write SwiftUI code without mobile-a11y-specialist review
  4. Do NOT write concurrent code without concurrency-specialist review
  5. Do NOT handle credentials or encryption without swift-security-specialist review
  6. Do NOT submit to App Store without app-review-guardian review
  7. Do NOT convert or optimize ML models without coreml-specialist review
  8. Do NOT use MLX Swift, MLXLLM, or MLXVLM without mlx-specialist review
  9. Do NOT write SwiftData models or queries without swiftdata-specialist review
  10. Do NOT build visionOS or RealityKit features without visionos-specialist review
  11. Do NOT implement in-app purchases without storekit-specialist review
  12. Do NOT optimize performance without performance-specialist review

Critical Rules

  • For NEW projects or features: Enter plan mode FIRST. Design architecture before writing code.
  • NEVER create mock, placeholder, or stub implementations. All code must be real and functional.
  • Use built-in SwiftUI features instead of building custom replacements.
  • Settings screens MUST use Form { Section { Toggle/Picker/Stepper } }. Not custom VStacks.
  • macOS preferences MUST use the Settings { } scene. Not a custom window.
  • Persistence MUST use @AppStorage for UserDefaults. Not manual UserDefaults.standard calls.
  • Use .searchable, .refreshable, PhotosPicker, ShareLink, SubscriptionStoreView, .confirmationDialog.
  • Use Swift compiler synthesis (Codable, Equatable, Hashable) instead of manual implementations.

If the task does not involve any Swift or Apple platform code, proceed normally.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.