The FAF (Foundational AI-context Format) Chrome Extension is a Manifest V3 extension designed to extract code context from web-based development environments in under 300ms. The system currently achieves 68/68 passing tests with platform detection for GitHub, Monaco, VS Code Web, and other major platforms.
Current State: Functional but requires architectural decisions before production deployment.
- Language: TypeScript 5.3 (Strict Mode - 72 violations)
- UI Framework: Migrating from React 18.2 → Svelte 4.2
- Build Tool: Vite 5.0
- Test Framework: Vitest (68/68 passing)
- Target: Chrome 110+ (Manifest V3)
| Component | React Version | Svelte Version | Reduction |
|---|---|---|---|
| UI Framework | 45KB | 10KB | -78% |
| Total Extension | ~150KB | ~100KB | -33% |
| Popup Load Time | ~200ms | ~50ms | -75% |
faf-production/
├── src/
│ ├── core/ # Framework-agnostic business logic
│ │ ├── engine.ts # Main extraction engine
│ │ ├── scorer.ts # Repository scoring (96% FAF score)
│ │ ├── types.ts # TypeScript interfaces
│ │ └── errors.ts # Error handling system
│ ├── adapters/ # Platform integrations
│ │ ├── chrome.ts # Chrome API wrappers
│ │ ├── platforms.ts # Platform detection (22 tests)
│ │ └── clipboard.ts # Clipboard operations
│ ├── ui/ # User interface
│ │ ├── popup.svelte # Main popup (converting)
│ │ ├── content.ts # Content script
│ │ └── error-notifications.ts
│ └── background/ # Service worker
│ └── service-worker.ts # Background operations
- ✅ GitHub repositories
- ✅ Monaco Editor instances
- ✅ VS Code Web
- ✅ StackBlitz projects
- ✅ CodePen/CodeSandbox
- ✅ Generic code detection
- Extracts context in <300ms (tested)
- Fallback mechanisms for DOM failures
- Repository scoring system (Monaco: 100%, React: 85%)
- 68/68 tests passing
- Platform detection: 22/22
- Chrome API adapters: 19/19
- Service worker: 10/10
- Core engine: 17/17
Severity: Medium | Impact: Development velocity
// Example issues:
- Exact optional properties: string? vs string | undefined
- Index signature access: storage.key vs storage['key']
- Missing error codes in enum
- Unused imports (6 instances)Team Decision Needed:
- Fix all 72 errors before deployment?
- Deploy with
strict: falseand fix incrementally? - Keep strict mode but suppress with @ts-ignore?
Severity: High | Impact: Performance & Bundle Size
Current State:
- React components: 2 files (popup.tsx, debug-panel.tsx)
- Svelte conversion: 50% complete
- Build pipeline: Partially configured
Team Decision Needed:
- Complete Svelte migration before v1.0?
- Ship with React and migrate in v1.1?
- Use Preact as compromise (3KB, React-compatible)?
Severity: Low | Impact: Error tracking
// Missing in FAFErrorCode enum:
- STRUCTURE_EXTRACTION_FAILED
- DEPENDENCIES_EXTRACTION_FAILED
- ENVIRONMENT_EXTRACTION_FAILEDQuestion: Where should v1.0 be deployed?
| Option | Pros | Cons |
|---|---|---|
| Chrome Web Store | Official distribution, auto-updates | Review process (3-7 days), $5 fee |
| Vercel + Sideload | Instant updates, free | Manual installation, no auto-update |
| GitHub Releases | Developer-friendly, versioned | Manual updates, limited reach |
Recommendation: Vercel for testing → Chrome Store for production
Question: Should we support non-Chromium browsers?
Current: Chrome/Edge/Brave/Opera (Chromium-based) Potential: Firefox (3% market), Safari (25% on iOS - no extensions)
Effort Required:
- Firefox: ~40 hours (different manifest format)
- Safari: ~80 hours (requires macOS, Xcode, different APIs)
Recommendation: Chrome-only for v1.0, evaluate Firefox based on user demand
Question: How do we handle mobile browsers?
Reality Check:
- Chrome Android: No extension support
- Safari iOS: Requires native app wrapper
- Alternative: Kiwi Browser (Android) supports Chrome extensions
Recommendation: Document as desktop-only, monitor mobile extension APIs
Question: Optimize for speed or browser compatibility?
| Approach | Load Time | Compatibility | Bundle Size |
|---|---|---|---|
| Vanilla JS | <50ms | 100% | Smallest |
| Svelte | <100ms | 99% | Small |
| React | <200ms | 95% | Large |
Recommendation: Svelte for best balance
// Actual measurements from tests
Platform Detection: 12ms average
Context Extraction: 287ms average
Total Operation: <300ms ✓
Bundle Size: ~150KB (with React)
Memory Usage: ~15MB activePlatform Detection: 10ms
Context Extraction: 250ms
Total Operation: <260ms
Bundle Size: ~100KB
Memory Usage: ~10MB{
"permissions": [
"activeTab", // Current tab only
"storage", // Settings persistence
"clipboardWrite" // Copy FAF to clipboard
],
"host_permissions": [] // No broad host access
}- ✅ No broad host permissions
- ✅ No external API calls
- ✅ No user data collection
⚠️ Telemetry system exists but disabled
- Core extraction engine
- Platform detection
- Test coverage
- Chrome Manifest V3 compliance
- TypeScript strict mode (72 errors)
- React → Svelte migration
- Build pipeline for production
- Missing error codes (3)
- Firefox support
- Performance monitoring
- A/B testing framework
- Analytics dashboard
- Decision: Ship with React or complete Svelte migration?
- Fix: Add missing error codes (15 min task)
- Deploy: Set up Vercel deployment pipeline
- Test: Manual testing on top 10 GitHub repos
- Complete Svelte migration if not done
- Fix TypeScript strict mode errors
- Add telemetry opt-in
- Chrome Web Store submission
- Firefox support
- Advanced scoring algorithms
- Team/Enterprise features
- API endpoint for CI/CD integration
- Is 72 TypeScript errors acceptable for v1.0?
- Should we complete Svelte migration or ship with React?
- Do we need Firefox support at launch?
- Target audience: Developers only or broader?
- Monetization: Free forever or freemium model?
- Success metric: Downloads, usage, or FAF file generations?
- Acceptable performance: <300ms or faster?
- Bundle size limit: 100KB, 200KB, or no limit?
- Update frequency: Weekly, monthly, or on-demand?
- Initial distribution: Chrome Store, GitHub, or both?
- Beta testing: Internal only or public beta?
- Version strategy: Semantic versioning or date-based?
Technical Viability: ✅ HIGH
- Core functionality works
- Good test coverage
- Performance targets met
Code Quality:
- TypeScript issues need resolution
- Framework migration incomplete
- Some technical debt
Production Readiness:
- Functional but not polished
- Needs deployment pipeline
- Missing some error handling
Recommendation:
- Fix critical TypeScript errors (not all 72)
- Complete Svelte migration for performance
- Deploy to Vercel for beta testing
- Gather feedback before Chrome Store submission
Generated: September 2, 2025 | FAF Chrome Extension v1.0.0