JSPM

  • Created
  • Published
  • Downloads 241
  • Score
    100M100P100Q114457F
  • License MIT

Complete AI coding agent harness for React Native and Expo development

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (erne-universal) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    ๐Ÿ—๏ธ ERNE โ€” Everything React Native & Expo

    The complete AI coding agent harness for React Native and Expo โ€” 11 specialized agents, adaptive stack detection, multi-agent orchestration, and a pixel-art dashboard. Every config is generated to match your exact project setup.

    npm version GitHub stars License: MIT PRs Welcome


    โšก Quick Start

    Prerequisite: Claude Code is required for the full experience (11 agents, pipeline orchestration, dashboard, hooks). Other IDEs receive adaptive rules and configuration โ€” see IDE Support.

    npx erne-universal init

    This will:

    1. ๐Ÿ” Deep-scan your project โ€” detects 15 stack dimensions (state management, navigation, styling, lists, images, forms, storage, testing, build system, component style, monorepo, New Architecture, and more)
    2. ๐ŸŽš๏ธ Let you choose a hook profile (minimal / standard / strict)
    3. ๐Ÿ”Œ Select MCP integrations (simulator control, GitHub, etc.)
    4. โš™๏ธ Generate adaptive configuration โ€” selects from 24 variant templates matched to your exact stack (Zustand vs Redux, Expo Router vs React Navigation, NativeWind vs StyleSheet, etc.)

    ๐Ÿ“ฆ What's Included

    Component Count Description
    ๐Ÿค– Agents 11 Specialized AI agents for architecture, development, review, testing, UI, native, orchestration
    ๐Ÿ”€ Agent variants 9 Stack-adaptive agent configurations (StyleSheet vs NativeWind, Zustand vs Redux, etc.)
    โšก Commands 19 Slash commands for every React Native workflow
    ๐Ÿ“ Rule layers 5 Conditional rules: common, expo, bare-rn, native-ios, native-android
    ๐ŸŽฏ Rule variants 15 Stack-specific rules selected by deep detection (state, navigation, styling, security, etc.)
    ๐Ÿ›ก๏ธ Hook profiles 3 Minimal, standard, strict โ€” quality enforcement your way
    ๐Ÿ“š Skills 7 Reusable knowledge modules loaded on-demand
    ๐ŸŽญ Contexts 3 Behavior modes: dev, review, vibe
    ๐Ÿ”Œ MCP configs 10 Pre-configured server integrations
    ๐Ÿ“‹ Workflow examples 4 End-to-end multi-agent workflow guides
    ๐Ÿค Handoff templates 4 Structured agent-to-agent context passing

    ๐ŸŽฎ Agent Dashboard

    ERNE includes a real-time pixel-art dashboard with 4 tabs, a context sidebar, and animated office visualization.

    erne dashboard              # Start on port 3333, open browser
    erne dashboard --port 4444  # Custom port
    erne dashboard --no-open    # Don't open browser
    erne start                  # Init project + dashboard in background

    HQ โ€” Pixel-Art Office

    ERNE HQ โ€” 4 office rooms with 11 animated agents

    • ๐Ÿข 4 office rooms โ€” Development, Code Review, Testing, and Conference
    • ๐ŸŽจ 11 animated agent sprites with walking, typing, and done animations
    • ๐Ÿ’ฌ Thought bubbles showing the current task above working agents
    • ๐Ÿ–ฅ๏ธ Animated monitor screens (green code when working, screensaver when idle)
    • ๐Ÿ”” Toast notifications for agent start/complete events
    • ๐Ÿ“Š Bottom stats bar with session duration, tasks completed, working/planning counts
    • ๐Ÿ‘ค Agent detail overlay with full activity history (click any agent)
    • ๐ŸŽฏ Pipeline orchestrator coordination view in conference room
    • ๐Ÿ”„ Real-time WebSocket updates with auto-reconnect

    My App โ€” Project Intelligence

    My App tab โ€” project overview, MCP integrations, audit, environment

    • ๐Ÿ“‹ App overview with framework detection, health grade, and stack chips
    • ๐Ÿ”Œ 10 MCP integration statuses with requirements
    • ๐Ÿ” Project audit with score, findings (with FIX buttons), and strengths
    • โšก Quick actions โ€” run tests, lint, start dev, build iOS/Android, pod install
    • ๐Ÿ’ก Smart recommendations based on audit findings
    • ๐Ÿ› ๏ธ Environment checks for all dev tools (Node, Xcode, CocoaPods, etc.)

    Ecosystem โ€” Release Radar

    Ecosystem tab โ€” release feed for React Native packages

    • ๐Ÿ“ฐ Live release feed for React Native ecosystem packages
    • ๐Ÿท๏ธ Tags: NEW, BREAK, security patches
    • ๐Ÿ” Filter by category: Updates, Trending, Tips, Security
    • ๐Ÿ“Š Quick stats sidebar

    Insights โ€” Project Analytics

    Insights tab โ€” audit score, outdated deps, agent utilization

    • ๐Ÿ“ˆ KPI cards: Audit Score, Outdated Deps, Agent Tasks (with deltas)
    • ๐Ÿ“Š Agent utilization breakdown with horizontal bar chart

    Context Sidebar

    Context sidebar โ€” system info, audit, activity, knowledge base

    The sidebar auto-enables with the dashboard and provides 6 collapsible panels:

    • ๐Ÿ–ฅ๏ธ System Info โ€” project metadata, environment checks, git branch
    • ๐Ÿ” Project Audit โ€” 22-point score with one-click FIX buttons and strength checks
    • ๐Ÿ“‹ Agent Activity โ€” real-time task history with timestamps
    • ๐Ÿ’พ Context Savings โ€” live savings percentage, KB saved, and event timeline
    • ๐Ÿ“š Knowledge Base โ€” FTS5-powered search across 5 categories (pattern, decision, error, api, component)
    • ๐Ÿ’ฐ Context Budget โ€” set session/agent token limits, choose overflow strategy (truncate / warn / stop)

    Context optimization runs automatically โ€” no flags or configuration needed. See Context Optimization for details.


    ๐ŸŽฏ Multi-Agent Orchestration

    ERNE supports coordinated multi-agent workflows through the pipeline orchestrator:

    /orchestrate "build user profile screen"

    Pipeline phases:

      ๐Ÿ—๏ธ Plan          architect decomposes the task
           โ†“
      โšก Implement     senior-developer + feature-builder (parallel)
           โ†“
      ๐Ÿงช Test          tdd-guide writes and runs tests
           โ†“
      ๐Ÿ” Review        code-reviewer validates with evidence
           โ†“
      ๐Ÿ“Š Validate      performance-profiler checks performance

    Features retry logic (max 3 attempts), escalation to user on persistent failures, and structured handoff templates for context passing between agents. See Pipeline Documentation for details.


    ๐Ÿค– Agents

    Each agent has a distinct personality, quantified success metrics, and memory integration for cross-session learning.

    Agent Emoji Domain Room
    architect ๐Ÿ—๏ธ System design and project structure Development
    senior-developer ๐Ÿ‘จโ€๐Ÿ’ป End-to-end feature implementation, screens, hooks, API Development
    feature-builder โšก Focused implementation units, works in parallel Development
    native-bridge-builder ๐ŸŒ‰ Turbo Modules and native platform APIs Development
    expo-config-resolver โš™๏ธ Expo configuration and build issues Development
    ui-designer ๐ŸŽจ Accessible, performant UI components Development
    code-reviewer ๐Ÿ” Code quality with evidence-based approval Code Review
    upgrade-assistant ๐Ÿ“ฆ Version migration guidance Code Review
    tdd-guide ๐Ÿšฆ Test-driven development workflow Testing
    performance-profiler ๐ŸŽ๏ธ FPS diagnostics and bundle optimization Testing
    pipeline-orchestrator ๐ŸŽฏ Multi-agent workflow coordination Conference

    ๐Ÿง  Context Optimization

    ERNE includes a built-in context intelligence system that reduces tool output bloat by 97โ€“100%, preserves exact code examples via FTS5 search, and manages your context budget โ€” all auto-enabled with the dashboard.

    erne dashboard   # Context system starts automatically

    Benchmark-verified savings

    Layer What it does Savings
    Summarizer Auto-detects 14 content types (docs, JSON, logs, test output, build output, CSV, git history, etc.) and compresses to statistical summaries 97โ€“100%
    Index + Search Chunks content by headings, indexes in FTS5 with BM25 ranking. Returns only relevant chunks โ€” code examples preserved exactly 80%
    Full session Combined summarizer + search across a real debugging session (docs, snapshots, issues, tests, builds) 99%

    Real numbers: 537 KB of tool outputs โ†’ 2.6 KB of context. That's 0.4% of a 200K context window instead of 44.5%. See BENCHMARK.md for the full 21-scenario breakdown.

    How it works

    Tool Output โ”€โ”€โ–ถ Smart Summarizer โ”€โ”€โ–ถ 97-100% compression (14 content types)
                         โ”‚
    Raw Docs โ”€โ”€โ–ถ FTS5 Index+Search โ”€โ”€โ–ถ 80% savings, exact code preserved
                         โ”‚
    Session Events โ”€โ”€โ–ถ Session Tracker โ”€โ”€โ–ถ Errorโ†’Fix correlation
                         โ”‚
    Knowledge โ”€โ”€โ–ถ 3-Layer Search (FTS5 โ†’ Trigram โ†’ Levenshtein)
                         โ”‚
    Session End โ”€โ”€โ–ถ Snapshot (<2KB) โ”€โ”€โ–ถ Next session restores context
    Feature What it does
    Content summarizer 14 auto-detected content types: markdown, HTML, JSON, test output, TypeScript errors, build output, logs, git history, CSV, and more. Each type gets a specialized summary format
    Content store FTS5-powered index with Porter stemming. Markdown chunked by headings, code blocks never split or truncated. BM25 relevance ranking with byte budget management
    Smart truncation 4-tier fallback cascade: Structured โ†’ Pattern โ†’ Head/Tail โ†’ Hash. Handles anything the summarizer doesn't cover
    Knowledge base SQLite-backed with FTS5 full-text search, trigram fuzzy matching, and Levenshtein fallback. Entries scored by recency + access frequency
    Session continuity Snapshots capture active tasks, decisions, errors, and commits at session end. Next session restores context in <2KB
    Budget manager Set per-session and per-agent token limits. Throttles at 80%, supports aggressive truncation / warn / hard stop overflow strategies
    Agent preloader Tracks agent-to-agent transitions and predicts the next agent for parallel context warmup
    Errorโ†’Fix tracking Correlates errors with subsequent file modifications to build fix patterns over time

    Dashboard sidebar panels

    The context sidebar (toggle with the chevron button) shows 6 live panels:

    • System Info โ€” project metadata, environment health, git branch
    • Project Audit โ€” 22-point audit with score, one-click FIX buttons, and strengths
    • Agent Activity โ€” real-time task history with timestamps
    • Context Savings โ€” live savings percentage, KB saved, and event timeline
    • Knowledge Base โ€” searchable entries with category filters (pattern, decision, error, api, component)
    • Context Budget โ€” configure session limits and overflow strategy directly from the UI

    If the context system is disabled, the sidebar shows an Enable Context button to activate it at runtime.


    ๐Ÿ’ฐ Token Efficiency

    ERNE minimizes token usage through two complementary systems: architecture-level savings (what gets loaded into context) and runtime context optimization (how tool outputs and session state are compressed).

    Architecture savings

    Mechanism How it works Savings
    Profile-gated hooks Minimal profile runs 4 hooks instead of 16 ~31%
    Conditional rules Only loads rules matching your project type (Expo, bare RN, native) ~26%
    On-demand skills Skills load only when their command is invoked, not always in context ~12%
    Subagent isolation Fresh agent per task with only its own definition + relevant rules ~12%
    Task-specific commands 19 focused prompts instead of one monolithic instruction set ~13%
    Context-based behavior Modes change behavior dynamically without loading new rulesets ~3%

    Runtime context optimization (benchmark-verified)

    Mechanism How it works Savings
    Content summarizer Auto-detects 14 content types, produces statistical summaries 97โ€“100% per output
    Index + Search FTS5 BM25 retrieval returns only relevant chunks, code preserved exactly 80% per search
    Smart truncation 4-tier fallback: Structured โ†’ Pattern โ†’ Head/Tail โ†’ Hash 85โ€“100% per output
    Session snapshots Captures full session state in <2KB ~50% vs log replay
    Budget enforcement Throttling at 80% prevents runaway token usage Prevents overflow

    Result: Architecture saves 60โ€“67% on what enters context. Runtime optimization achieves 97โ€“100% compression on tool outputs (verified across 21 benchmark scenarios with 537 KB of real data). In a full debugging session, 99% of tool output tokens are eliminated โ€” leaving 99.6% of your context window free for actual problem solving. See BENCHMARK.md for complete results.


    ๐Ÿ›ก๏ธ Hook Profiles

    Profile Hooks Use Case
    minimal 4 โšก Fast iteration, vibe coding โ€” maximum speed, minimum friction
    standard 12 โš–๏ธ Balanced quality + speed (recommended) โ€” catches real issues
    strict 16 ๐Ÿ”’ Production-grade enforcement โ€” full security, accessibility, perf budgets

    Change profile: set ERNE_PROFILE env var, add <!-- Hook Profile: standard --> to CLAUDE.md, or use /vibe context.


    โšก Commands

    Category Commands
    Core /plan, /code-review, /tdd, /build-fix, /perf, /upgrade, /native-module, /navigate, /code, /feature
    Extended /animate, /deploy, /component, /debug, /quality-gate
    Orchestration /orchestrate
    Learning /learn, /retrospective, /setup-device

    ๐Ÿ–ฅ๏ธ IDE & Editor Support

    ERNE generates adaptive config files for multiple IDEs, but the full agent experience requires Claude Code:

    Feature Claude Code Cursor / Windsurf / Copilot / Codex
    Adaptive rules & config โœ… โœ…
    Stack detection (15 dimensions) โœ… โœ…
    19 slash commands โœ… โŒ
    11 specialized agents โœ… โŒ
    Pipeline orchestration โœ… โŒ
    Hook profiles โœ… โŒ
    Agent dashboard โœ… โŒ
    Cross-session memory โœ… โŒ

    Generated config files:

    File IDE / Tool
    CLAUDE.md Claude Code (full experience)
    AGENTS.md Codex, Windsurf, Cursor, GitHub Copilot
    GEMINI.md Gemini CLI
    .cursorrules Cursor
    .windsurfrules Windsurf
    .github/copilot-instructions.md GitHub Copilot

    ๐Ÿ—๏ธ Architecture

    Claude Code Hooks โ”€โ”€โ–ถ run-with-flags.js โ”€โ”€โ–ถ Profile gate โ”€โ”€โ–ถ Hook scripts
                                                    โ”‚
                                         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                                         โ”‚   Only hooks for    โ”‚
                                         โ”‚   active profile    โ”‚
                                         โ”‚   are executed      โ”‚
                                         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
    
    erne dashboard โ”€โ”€โ–ถ HTTP + WS Server โ”€โ”€โ–ถ Browser Canvas
                            โ–ฒ
    Claude Code PreToolUse โ”€โ”ค  (Agent pattern)
    Claude Code PostToolUse โ”˜

    Key design principles:

    • ๐Ÿชถ Zero runtime dependencies for the harness itself (ws package only for dashboard)
    • ๐ŸŽฏ Conditional loading โ€” rules, skills, and hooks load based on project type and profile
    • ๐Ÿงน Fresh subagent per task โ€” no context pollution between agent invocations
    • ๐Ÿ”‡ Silent failure โ€” hooks never block Claude Code if something goes wrong

    ๐Ÿค Contributing

    We welcome contributions from everyone โ€” from typo fixes to new agents and skills.

    I want to... Start here
    ๐Ÿ› Report a bug Bug Report
    ๐Ÿ’ก Request a feature Feature Request
    ๐Ÿ“š Propose a new skill Skill Proposal
    ๐Ÿ”€ Submit a PR Contributing Guide
    git checkout -b feat/your-feature
    npm run validate && npm test   # Must pass before PR

    ๐Ÿค Partnerships

    Skills, agents, and MCP configs are open source โ€” anyone can add them via PR. Partnerships are for deeper collaboration:

    Partnership Type What It Means
    Co-Maintenance You keep your library's ERNE skill up to date as your API evolves
    Early Access We update ERNE before your breaking changes ship, so users never hit stale guidance
    Joint Promotion Your docs recommend ERNE for AI-assisted development, we feature you on erne.dev
    Domain Expertise Co-develop specialized agents that require deep knowledge of your platform

    If you maintain a React Native library, Expo tool, or developer service โ€” let's talk.


    ๐Ÿ“ฆ Available On


    ๐Ÿ“– Documentation

    Doc Description
    Getting Started Installation and first run
    Agents Guide All 11 agents with domains and usage
    Commands Reference All 19 slash commands
    Hooks & Profiles Hook system and 3 profiles
    Creating Skills Author your own skills
    Pipeline & Orchestration Multi-agent workflow coordination
    Memory Integration Cross-session learning with MCP
    Handoff Templates Structured agent-to-agent context
    Contributing How to contribute

    ๐Ÿ“œ License

    MIT License โ€” use freely, commercially or personally.


    ๐Ÿ—๏ธ ERNE โ€” Your React Native AI Dream Team ๐Ÿ—๏ธ

    โญ Star this repo ยท ๐Ÿด Fork it ยท ๐Ÿ› Report an issue ยท ๐ŸŒ erne.dev

    Made with โค๏ธ for the React Native community