Category Specific Training
Comprehensive guidelines for AI-assisted development within the Editor platform
Category-Specific Agent Training
Teaching agents specialized module generation through domain expertise
Overview
The GoGrab AI system uses specialized agents trained on specific module categories. This enables:
- Higher success rates through domain expertise
- Faster generation using proven patterns
- Better quality from category-specific knowledge
- Continuous improvement as outcomes feed back into training
Agent Specialization Matrix
| Agent | Tier | Categories | Complexity | Success Rate |
|---|---|---|---|---|
| Cursor Angular | Development | structural, layout, feature | simple, medium | 92% |
| Cursor Architecture | Development | layout, saas, ecommerce, space-management | complex, enterprise | 88% |
| Platform Module | Platform | ecommerce, blog, product-catalog, portfolio | medium, complex | 85% |
| Platform Widget | Platform | structural, saas, product-catalog | simple, medium | 90% |
Training Data Structure
Per-Agent Training Sets
Each agent receives category-specific training examples:
interface AgentTrainingExample {
agentId: string;
category: ModuleCategory;
// Pattern to learn
pattern: {
manifestStructure: object;
moduleImplementation: string;
componentStructure: string;
typesStructure: string;
};
// When to use
triggers: string[]; // Keywords
// Success metrics
successRate: number;
avgQualityScore: number;
timesUsed: number;
// Learning guidance
goodFor: string[];
badFor: string[];
requirements: string[];
}
Example: Cursor Angular Training (Structural Modules)
const CURSOR_ANGULAR_TRAINING = [
{
agentId: 'cursor-angular',
category: 'structural',
pattern: {
// From sidebar-nav module
manifestStructure: {
hasNavigation: true,
hasRoutes: false,
hasEmbeddables: false,
dataStrategy: null,
},
moduleImplementation: `
@ModuleDecorator({
id: 'sidebar-nav',
navigation: { menuItems: [...] }
})
export class SidebarNavModule implements BrowserModuleContract {
// ... implementation
}
`,
},
triggers: ['sidebar', 'navigation', 'menu', 'nav'],
successRate: 0.95,
goodFor: ['simple navigation', 'menu systems', 'sidebars'],
badFor: ['complex forms', 'data tables'],
requirements: ['navigation definition', 'menu items'],
},
{
agentId: 'cursor-angular',
category: 'layout',
pattern: {
// From header-content-footer module
manifestStructure: {
hasNavigation: false,
hasRoutes: true,
hasEmbeddables: false,
dataStrategy: null,
},
},
triggers: ['layout', 'template', 'header footer', 'page structure'],
successRate: 0.92,
goodFor: ['page templates', 'layout structure'],
badFor: ['business logic', 'data operations'],
},
];
Example: Cursor Architecture Training (Complex Modules)
const CURSOR_ARCHITECTURE_TRAINING = [
{
agentId: 'cursor-architecture',
category: 'ecommerce',
pattern: {
// From ecommerce module
manifestStructure: {
hasNavigation: true,
hasRoutes: true,
hasEmbeddables: true, // ProductCardWidget, MiniCartWidget
hasActions: true,
dataStrategy: {
storage: {
primary: 'hybrid',
collections: {
products: { sync: 'eager' },
cart: { sync: 'immediate' },
orders: { sync: 'guaranteed' },
},
},
},
},
moduleImplementation: `
// Multi-service architecture
- ProductService (catalog management)
- CartService (shopping cart with flash-persistence)
- OrderService (order processing)
// Models in models/ (platform-agnostic)
- Product, Cart, Order interfaces
// Components
- ProductListComponent
- CartComponent
- CheckoutComponent
// Embeddables
- ProductCardWidget
- MiniCartWidget
`,
},
triggers: ['shop', 'ecommerce', 'cart', 'products', 'checkout'],
successRate: 0.88,
goodFor: ['online stores', 'marketplaces', 'b2b commerce'],
badFor: ['simple content sites', 'portfolios'],
requirements: [
'Product models with pricing',
'Cart service with persistence',
'Payment integration structure',
'Order management system',
],
},
];
Training Data Sources
1. Module Intelligence (AI Metadata)
Extracted from manifest.metadata.ai:
- Description, capabilities, keywords
- Use cases and example prompts
- Complexity and setup time
- Flutter-ready status
2. Outcome Tracking
Real-world success/failure data:
- Drop rate (did user use it?)
- Edit count (how many changes?)
- Build success (did it compile?)
- Deployment (production-ready?)
- User satisfaction signals
3. Pattern Library
Extracted patterns from successful modules:
- Code structure templates
- Key features that work
- Anti-patterns to avoid
- Reusability guidelines
Training Loop
1. Module Generated
↓
2. Outcome Tracked (drop, edit, build, deploy)
↓
3. Quality Score Calculated (0-100)
↓
4. Pattern Extracted (if score ≥ 70)
↓
5. Agent Training Data Updated
↓
6. Next Generation Improved
Category-Specific Guidelines
Structural Modules (Navigation)
Characteristics:
- Simple, focused on UI navigation
- No complex business logic
- Fast to implement (5-10 min)
Key Patterns:
- MenuItems with routes
- Platform-agnostic nav models
- Responsive design
- Accessibility (ARIA)
Success Signals:
- Drop rate > 90%
- Edit count < 2
- Build success 100%
Ecommerce Modules
Characteristics:
- Complex, multi-service architecture
- Data persistence required
- Multiple embeddables
- Payment integration points
Key Patterns:
- Product/Cart/Order services
- Flash-persisted cart state
- Widget composition (ProductCard, MiniCart)
- Inventory tracking
- Multi-currency support
Success Signals:
- Drop rate > 70%
- Edit count < 5
- Build success > 90%
- Deployed to production
Blog Modules
Characteristics:
- Content-focused
- Medium complexity
- Categories & tags
- SEO considerations
Key Patterns:
- Post list/detail views
- Category management
- Markdown support
- Author attribution
- Comment system (optional)
Success Signals:
- Drop rate > 80%
- Edit count < 3
- Build success > 95%
Real-Time Pattern Learning
As modules are generated and outcomes tracked, the system automatically:
Identifies Successful Patterns
- Success rate ≥ 70%
- Quality score ≥ 70
- Used as template ≥ 3 times
Extracts Pattern Features
- Code structure
- Key capabilities
- Success factors
Updates Agent Training
- Adds to category-specific examples
- Adjusts trigger keywords
- Updates success metrics
Identifies Anti-Patterns
- Failure rate > 50%
- Consistent user deletion
- Build failures
Removes/Updates Bad Patterns
- Marks as anti-pattern
- Updates "badFor" guidance
- Reduces training weight
Integration with MCP
Module outcomes are reported to MCP via handleModuleOutcome():
const outcome = {
outcomeId: 'outcome-123',
moduleId: 'ecommerce',
category: 'ecommerce',
wasDropped: true,
editCount: 2,
buildSuccess: true,
deployedToProduction: true,
qualityScore: 85,
originalPrompt: 'Create an online store',
};
await handleModuleOutcome(outcome);
// → Converts to MCP decision
// → Reports outcome
// → Extracts learnings
// → Updates agent training
Training Metrics
Track training effectiveness:
interface TrainingMetrics {
agentId: string;
category: ModuleCategory;
// Performance
totalGenerations: number;
successfulGenerations: number;
successRate: number;
// Quality
avgQualityScore: number;
avgEditCount: number;
avgTimeToProduction: number;
// Patterns
patternsUsed: number;
newPatternsLearned: number;
antiPatternsIdentified: number;
// Improvement over time
successRateTrend: number[]; // Last 10 generations
qualityScoreTrend: number[];
}
Best Practices
For Cursor Angular Agent
DO:
- ✅ Use standalone components (Angular 20)
- ✅ OnPush change detection
- ✅ Signal-based state
- ✅ Separate .ts/.html/.scss files
- ✅ Platform-agnostic models
DON'T:
- ❌ NgModules
- ❌ Constructor injection (use
inject()) - ❌ Inline templates
- ❌ Promises (use RxJS)
For Cursor Architecture Agent
DO:
- ✅ Multi-service architecture
- ✅ Flash-persisted state (
autoFlashState) - ✅ Data strategies defined
- ✅ Repository pattern for data access
- ✅ Embeddable widgets
DON'T:
- ❌ Monolithic services
- ❌ Direct localStorage usage
- ❌ Tight coupling
- ❌ Missing error handling
Continuous Improvement
The system improves over time through:
Outcome Feedback Loop
- Every generation teaches the system
- Successes become patterns
- Failures become anti-patterns
Cross-Tier Intelligence Transfer
- Cursor agents learn from Platform agents
- Platform agents learn from Space agents
- Best practices bubble up
Pattern Mining
- Automated pattern extraction
- Multi-dimensional analysis
- Sequential, contextual, outcome patterns
Predictive Intelligence
- ML-based outcome prediction
- Confidence scoring
- Risk assessment
Related Documentation
Result: Each agent becomes an expert in its specialized categories, learning from every generation to produce higher quality modules faster.