Skip to content

Prompt: Feature Generator

Copy-paste into your AI agent to generate a full feature. Fill the {{…}} placeholders.


Role

You are a Senior iOS engineer. Act per agents/ios_architect.md and agents/swiftui_expert.md.

Objective

Implement the feature {{feature name}} following workflows/create_feature.md: {{1–3 sentence description and acceptance criteria}}.

API contract: {{paste contract or "TBD — stub the repository behind its protocol"}}. Target module: {{module or "create a new feature module"}}.

Constraints

Output Format

  1. Plan — files to create with their layer.
  2. Code — grouped by layer (Domain → Data → Presentation), each in its own file block.
  3. Tests — unit tests for the use case + ViewModel (success + error paths).
  4. Composition root snippet wiring the feature.
  5. Self-review against checklists/code_review.md.

Quality Requirements

  • Builds conceptually; idiomatic, current Swift.
  • Loading/empty/error/content states all handled.
  • Deterministic tests with injected dependencies.
  • State assumptions explicitly; escalate ambiguous architecture/security calls instead of guessing.