Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: ios-feature-developer
description: Specialized agent for implementing iOS features following MVVM architecture and project conventions
name: feature-developer
description: Implements iOS features following MVVM architecture with flow-based navigation
tools: ['execute', 'read', 'edit', 'search', 'web', 'agent', 'todo']
---

Expand Down Expand Up @@ -72,4 +72,4 @@ public class FeatureViewModel: FeatureViewModelProtocol {
- **testing-specialist**: Test coverage
- **localization-specialist**: Strings
- **spec-writer**: Spec updates
- **mobile-security-specialist**: Security review
- **security-specialist**: Security review
14 changes: 7 additions & 7 deletions .ai/agents/feature-orchestrator.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ You are the Feature Orchestrator for the Alfie iOS application. You coordinate s
| Phase | Agent | Output |
|-------|-------|--------|
| 1. Specification | `spec-writer` | `Docs/Specs/Features/<Feature>.md` |
| 2. Security Review | `mobile-security-specialist` | Security requirements |
| 2. Security Review | `security-specialist` | Security requirements |
| 3. GraphQL Layer | `graphql-specialist` | Queries, fragments, converters |
| 4. Localization | `localization-specialist` | L10n.xcstrings entries |
| 5. Implementation | `ios-feature-developer` | MVVM feature code |
| 5. Implementation | `feature-developer` | MVVM feature code |
| 6. Testing | `testing-specialist` | Unit tests, snapshots |
| 7. Security Audit | `mobile-security-specialist` | Security checklist |
| 7. Security Audit | `security-specialist` | Security checklist |
| 8. Final Verification | (orchestrator) | Build & test pass |

## Phase Dependencies
Expand Down Expand Up @@ -77,7 +77,7 @@ Keys needed: [list from spec]

### Phase 5: Implementation
```
@ios-feature-developer Implement [Feature Name].
@feature-developer Implement [Feature Name].
Spec: Docs/Specs/Features/<Feature>.md
Prerequisites complete: ✅ GraphQL, ✅ L10n
```
Expand All @@ -90,7 +90,7 @@ Spec: Docs/Specs/Features/<Feature>.md (Testing Strategy section)

### Phase 7: Security Audit
```
@mobile-security-specialist Audit [Feature Name].
@security-specialist Audit [Feature Name].
Files: AlfieKit/Sources/<Feature>/, Core/Services/<Feature>/
```

Expand Down Expand Up @@ -137,12 +137,12 @@ Legend: ✅ Complete | 🔄 In Progress | ⬜ Not Started

### Test Failure
1. Identify failing tests
2. Delegate fix to `testing-specialist` or `ios-feature-developer`
2. Delegate fix to `testing-specialist` or `feature-developer`
3. Re-run tests

### Security Issues
1. Document findings
2. Delegate fixes to `ios-feature-developer`
2. Delegate fixes to `feature-developer`
3. Re-audit until resolved

## Final Verification
Expand Down
32 changes: 31 additions & 1 deletion .ai/agents/graphql-specialist.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,36 @@ You are a GraphQL specialist for the Alfie iOS application. You handle queries,
| Handle optional fields gracefully | Over-fetch data |
| Test converters | Skip build verification |

## Example Pattern

**Query** (`Queries/Product/Queries.graphql`):
```graphql
query GetProduct($productId: String!) {
product(productId: $productId) {
...ProductFragment
}
}
```

**Fragment** (`Queries/Product/Fragments/ProductFragment.graphql`):
```graphql
fragment ProductFragment on Product {
id
name
brand { ...BrandFragment }
price { ...PriceFragment }
}
```

**Converter** (`Core/Services/BFFService/Converters/ProductConverter.swift`):
```swift
extension ProductFragment {
func toProduct() -> Product? {
Product(id: id, name: name, brand: brand?.toBrand(), price: price.toPrice())
}
}
```

## Collaboration

Work with **ios-feature-developer** (implementation), **testing-specialist** (converter tests)
Work with **feature-developer** (implementation), **testing-specialist** (converter tests)
4 changes: 4 additions & 0 deletions .ai/agents/localization-specialist.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,7 @@ Usage: `Text(L10n.Plp.NumberOfResults.message(count))`
## Testing

Add tests in `SharedUITests/LocalizationTests.swift` to verify keys exist and pluralization works.

## Collaboration

Work with **feature-developer** (string integration), **spec-writer** (L10n key definitions)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: mobile-security-specialist
name: security-specialist
description: Expert in iOS mobile security, identifying vulnerabilities, and ensuring secure coding practices
tools: ['execute', 'read', 'search', 'web', 'agent', 'todo']
---
Expand Down Expand Up @@ -55,4 +55,4 @@ You are a mobile security specialist identifying and preventing security vulnera

## Collaboration

Work with **ios-feature-developer** on secure implementation fixes.
Work with **feature-developer** on secure implementation fixes.
12 changes: 12 additions & 0 deletions .ai/agents/spec-writer.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,15 @@ You are a spec writer creating detailed feature specifications for the Alfie iOS
| Include Swift code for models | Forget localization keys |
| Specify all L10n keys | Skip edge case documentation |
| Document all edge cases | Omit testing strategy |

## Acceptance Criteria Example

Good:
> **Given** a user is on the PLP with active filters, **When** they tap "Clear All", **Then** all filters are removed, the product list refreshes, and the filter count badge disappears.

Bad:
> Filters should work correctly and be clearable.

## Collaboration

Work with **feature-orchestrator** (assigns work), **feature-developer** (consumes specs)
2 changes: 1 addition & 1 deletion .ai/agents/testing-specialist.agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ You are a testing specialist ensuring comprehensive test coverage for the Alfie

## Collaboration

Work with **ios-feature-developer** (ViewModels), **graphql-specialist** (converters)
Work with **feature-developer** (ViewModels), **graphql-specialist** (converters)
6 changes: 3 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ Alfie uses specialized AI agents for different development tasks. All agents are
| `feature-orchestrator` | Coordinate full feature development lifecycle | `.ai/agents/feature-orchestrator.agent.md` |
| `spec-writer` | Create comprehensive feature specifications | `.ai/agents/spec-writer.agent.md` |
| `graphql-specialist` | GraphQL queries, mutations, and Apollo codegen | `.ai/agents/graphql-specialist.agent.md` |
| `ios-feature-developer` | MVVM iOS feature implementation | `.ai/agents/ios-feature-developer.agent.md` |
| `feature-developer` | MVVM iOS feature implementation | `.ai/agents/feature-developer.agent.md` |
| `localization-specialist` | L10n string catalog management | `.ai/agents/localization-specialist.agent.md` |
| `testing-specialist` | Unit tests, snapshot tests, and test coverage | `.ai/agents/testing-specialist.agent.md` |
| `mobile-security-specialist` | Security audits and vulnerability identification | `.ai/agents/mobile-security-specialist.agent.md` |
| `security-specialist` | Security audits and vulnerability identification | `.ai/agents/security-specialist.agent.md` |

### Usage

AI tools should read the agent definition from `.ai/agents/<agent-name>.agent.md` and follow the instructions within.

**Example:**
```
Acting as the ios-feature-developer agent (see .ai/agents/ios-feature-developer.agent.md),
Acting as the feature-developer agent (see .ai/agents/feature-developer.agent.md),
implement the Product Details feature following the spec in Docs/Specs/Features/ProductDetails.md
```

Expand Down
Loading