From 5643bb6858647df44b1d0752c92adc2d77d84f43 Mon Sep 17 00:00:00 2001 From: Alasdair McCall Date: Wed, 1 Apr 2026 12:56:54 +0100 Subject: [PATCH] Harmonise AI agent skills with cross-platform standard - Rename ios-feature-developer -> feature-developer (standardised name) - Rename mobile-security-specialist -> security-specialist (standardised name) - Update all agent cross-references to use new standardised names - Add example query/fragment/converter pattern to graphql-specialist - Add acceptance criteria example + collaboration section to spec-writer - Add collaboration section to localization-specialist - Update AGENTS.md agent table to reflect new names and paths Agents are now named consistently across iOS, Android, and Flutter: feature-orchestrator, feature-developer, graphql-specialist, localization-specialist, security-specialist, spec-writer, testing-specialist Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- ...er.agent.md => feature-developer.agent.md} | 6 ++-- .ai/agents/feature-orchestrator.agent.md | 14 ++++---- .ai/agents/graphql-specialist.agent.md | 32 ++++++++++++++++++- .ai/agents/localization-specialist.agent.md | 4 +++ ....agent.md => security-specialist.agent.md} | 4 +-- .ai/agents/spec-writer.agent.md | 12 +++++++ .ai/agents/testing-specialist.agent.md | 2 +- AGENTS.md | 6 ++-- 8 files changed, 63 insertions(+), 17 deletions(-) rename .ai/agents/{ios-feature-developer.agent.md => feature-developer.agent.md} (92%) rename .ai/agents/{mobile-security-specialist.agent.md => security-specialist.agent.md} (95%) diff --git a/.ai/agents/ios-feature-developer.agent.md b/.ai/agents/feature-developer.agent.md similarity index 92% rename from .ai/agents/ios-feature-developer.agent.md rename to .ai/agents/feature-developer.agent.md index d82bb96b..69b43682 100644 --- a/.ai/agents/ios-feature-developer.agent.md +++ b/.ai/agents/feature-developer.agent.md @@ -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'] --- @@ -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 diff --git a/.ai/agents/feature-orchestrator.agent.md b/.ai/agents/feature-orchestrator.agent.md index ec3a299c..be04596d 100644 --- a/.ai/agents/feature-orchestrator.agent.md +++ b/.ai/agents/feature-orchestrator.agent.md @@ -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/.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 @@ -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/.md Prerequisites complete: ✅ GraphQL, ✅ L10n ``` @@ -90,7 +90,7 @@ Spec: Docs/Specs/Features/.md (Testing Strategy section) ### Phase 7: Security Audit ``` -@mobile-security-specialist Audit [Feature Name]. +@security-specialist Audit [Feature Name]. Files: AlfieKit/Sources//, Core/Services// ``` @@ -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 diff --git a/.ai/agents/graphql-specialist.agent.md b/.ai/agents/graphql-specialist.agent.md index 296a7dc6..de94cf4d 100644 --- a/.ai/agents/graphql-specialist.agent.md +++ b/.ai/agents/graphql-specialist.agent.md @@ -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) diff --git a/.ai/agents/localization-specialist.agent.md b/.ai/agents/localization-specialist.agent.md index 7a8c91c6..ceb49051 100644 --- a/.ai/agents/localization-specialist.agent.md +++ b/.ai/agents/localization-specialist.agent.md @@ -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) diff --git a/.ai/agents/mobile-security-specialist.agent.md b/.ai/agents/security-specialist.agent.md similarity index 95% rename from .ai/agents/mobile-security-specialist.agent.md rename to .ai/agents/security-specialist.agent.md index 0aa97fcf..2f7c5ddd 100644 --- a/.ai/agents/mobile-security-specialist.agent.md +++ b/.ai/agents/security-specialist.agent.md @@ -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'] --- @@ -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. diff --git a/.ai/agents/spec-writer.agent.md b/.ai/agents/spec-writer.agent.md index 2cdb9c23..1a2d2f8d 100644 --- a/.ai/agents/spec-writer.agent.md +++ b/.ai/agents/spec-writer.agent.md @@ -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) diff --git a/.ai/agents/testing-specialist.agent.md b/.ai/agents/testing-specialist.agent.md index e6aa3ed5..dc4fb73d 100644 --- a/.ai/agents/testing-specialist.agent.md +++ b/.ai/agents/testing-specialist.agent.md @@ -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) diff --git a/AGENTS.md b/AGENTS.md index 7f2b7565..e5e751de 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -15,10 +15,10 @@ 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 @@ -26,7 +26,7 @@ AI tools should read the agent definition from `.ai/agents/.agent.md **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 ```