QUICK START

Comprehensive guidelines for AI-assisted development within the Editor platform

🚀 AI Intelligence System - Quick Start

Get started with the complete closed-loop learning system in 5 minutes


Step 1: Enable Module Intelligence (1 min)

Add to apps/gograb-space/src/app/app.config.ts:

import { provideModuleIntelligence } from '@libs-ai/module-intelligence';

export const appConfig: ApplicationConfig = {
  providers: [
    provideModuleIntelligence(), // ← Add this
    // ... existing providers
  ],
};

What this does:


Step 2: Test Module Generation (2 min)

  1. Start the app: yarn dev:gograb
  2. Open AI Panel (bottom-left button)
  3. Type: "Create an ecommerce module"
  4. Click Generate

Expected console output:

[AI Panel] 🎯 Outcome tracking started
outcomeId: outcome-1734287654321-abc123
moduleId: ecommerce

Step 3: Test Drop Tracking (1 min)

  1. Drag the generated module from AI Panel
  2. Drop it on the canvas

Expected console output:

[CanvasRoot] 🎯 Outcome tracking: Module dropped
outcomeId: outcome-1734287654321-abc123
droppedRegion: section-xyz

Step 4: View Intelligence (1 min)

Open browser dev console and run:

// Get intelligence service
const intel = ng.probe(document.querySelector('lib-canvas-root')).injector.get(ng.coreTokens.ɵModuleIntelligenceHarvesterService);

// View harvested modules
console.log('Modules:', intel.intelligence());

// View stats by category
console.log('Stats:', intel.getCategoryStats());

// Get tracker
const tracker = ng.probe(document.querySelector('lib-canvas-root')).injector.get(ng.coreTokens.ɵModuleOutcomeTrackerService);

// View outcomes
console.log('Outcomes:', tracker.allOutcomes());
console.log('Stats:', tracker.getStats());

Step 5: Verify Backend (Optional)

If backend is running on port 3001:

# Check module intelligence endpoint
curl http://localhost:3001/ai-agents/module-intelligence/modules

# Check outcome stats
curl http://localhost:3001/ai-agents/module-intelligence/outcomes/stats

# Check pattern stats
curl http://localhost:3001/ai-agents/module-intelligence/patterns/stats

✅ Verification Checklist


🎯 What to Look For

Successful Harvesting

🌾 Starting module intelligence harvest
📦 Found 45 registered modules
✅ Harvested: Ecommerce (ecommerce)
✅ Harvested: Blog (blog)
✅ Harvested: Sidebar Nav (structural)
🎉 Module intelligence harvest complete

Successful Outcome Tracking

🎯 Started outcome tracking
outcomeId: outcome-xyz
moduleId: ecommerce
category: ecommerce

📍 Recorded drop event
outcomeId: outcome-xyz
region: main-content

✏️ Recorded edit event
outcomeId: outcome-xyz
editType: config

🐛 Troubleshooting

"Module intelligence not harvested"

Solution: Check that provideModuleIntelligence() is in app.config.ts

"Outcome tracker not available"

Solution: Service is optional - it's OK if not available. System degrades gracefully.

"No console messages"

Solution: Open browser dev console (F12) - messages appear there

"Backend not responding"

Solution: Start backend-ai-api: yarn serve:backend-ai


📚 Next Steps

Once basic tracking works:

  1. Generate 5-10 modules of different categories
  2. Interact with them (drop, edit, deploy)
  3. Check outcome stats (tracker.getStats())
  4. Extract patterns (patterns.extractAllPatterns())
  5. View agent routing (router.routeModuleGeneration('...'))

🌟 Expected Results

After 10 module generations:


The system is ready to learn and improve with every interaction! 🎊

For full documentation: COMPLETE-AI-INTELLIGENCE-SYSTEM.md