STAGE 0: RESEARCH BRIEF
| # | Gap | Impact | |---|-----|--------| | G1 | `app_entities` table not created in Supabase | Cannot register Spore or any app | | G2 | No `app_entity` row for Spore | Autonomy loop has no target | | G3 | RevenueCat not configured | No revenue data flows at all | | G4 | No "Build This" harvest option in Spore app | Users cannot trigger app generation | | G5 | No Edge Function to generate structured app specs | Evolved spores cannot become app blueprints | | G6 | Bootstrap script not triggered from pipeline | Even
Full Public Reader
# STAGE 0: RESEARCH BRIEF
## Spore as ACMP Anchor App: Idea-to-App Pipeline End-to-End
> Date: 2026-03-14 | Agent: Evo-Cubed Runner (Opus 4.6)
---
1. WHAT EXISTS TODAY (Ground Truth)
### 1.1 Spore iOS App (53 Swift files)
- Version: v1.2.0, submitted for App Store review
- Data model: Spore -> Garden -> Season. Status lifecycle: spore -> germinating -> growing -> budding -> blooming -> fruiting -> composted (withering branch for neglect)
- Growth algorithm: `strengthDelta = baseGrowth * seasonMultiplier + tendrilBonus + guidanceBonus + wateringBonus`
- Evolution tiers: Tier 1 (on-device NLEmbedding, <200ms), Tier 2 (edge function + KARL + Gemini, 1-3s), Tier 3 (daemon-driven overnight, passive)
- Services: GrowthEngine, EvolutionEngine, TierBroker, IntelligenceClient, BehaviorTracker, TopicClassifier, InvariantGuard, RealtimeSync, CloudKitManager, StoreManager, HapticManager, NotificationManager
- StoreKit 2: Free (5 spores), Sprout (20 spores, weekly evolution), Garden (unlimited, daily evolution)
- Harvest actions: Add notes, export to Notes, create Reminder, share, copy, keep growing, compost. NO "Build This" option exists.
- Landing page: tryspore.app with Supabase email capture, social links
### 1.2 Supabase Edge Functions (6)
| Function | Purpose | Status |
|----------|---------|--------|
| `evolve-spore` | Original v1 evolution (random technique) | Working |
| `spore-evolve-v2` | KARL-powered Tier 2 (Thompson/softmax technique selection + Gemini) | Working |
| `spore-plant` | Generate 768-dim embedding on plant, UPSERT to spore_embeddings | Working |
| `spore-feedback` | Batch behavioral event ingestion | Working |
| `evolve-idea` | Landing page interactive idea generator (3 divergent branches) | Working |
| `send-welcome` | Welcome email on signup | Working |
### 1.3 Backend Intelligence (cloud-vm)
- spore_evolution_daemon.py (1,245 lines): FAST loop 15min (SENSE + SCORE + LEARN + GK REGISTER), DEEP loop 60min (+ EVOLVE Tier 3)
- spore_reward_engine.py: 5-signal reward (Engagement 30
- garden_tender.py: Bloom events -> Discord notification
- 12 TIE techniques: 6 generative (G01, G04, G07, G10, G15, G18), 6 reductive (R01, R04, R07, R10, R14, R18)
- Key architectural constraint from prior Evo3: Edge functions CANNOT reach cloud-vm services (Tailscale, GK, RAG++). Edge functions stay THIN (Supabase + Gemini only). GK registration is ASYNC via daemon.
### 1.4 Supabase Tables (Spore-specific)
| Table | Purpose |
|-------|---------|
| `spore_embeddings` | pgvector 768-dim embeddings per spore |
| `spore_evolutions` | Evolution history (tier, technique, keywords before/after) |
| `spore_trajectories` | KARL trajectories (technique, rewards, advantage) |
| `spore_technique_weights` | Per (technique, topic_cluster) weights for technique selection |
| `spore_feedback` | Behavioral events from BehaviorTracker |
### 1.5 ACMP V3 Infrastructure
- Spec: ACMP-V3-TECHNICAL-SPEC.md (499 lines), 6-pass code review completed
- Formula: 60
- Composite scorer: `composite-scorer.ts` with Fill-First scoring (U(a) headroom + health + affinity + anti-starvation)
- Dispatch router: `dispatch-router.ts` with WFQ support
- Types: `types.ts` (AccountProfile, HealthCheckResult, RotationDecision, TaskRequest)
- Supabase tables: `guild_members`, `account_pool`, `compute_contributions`, `revenue_splits`, `task_routing`, `mesh_events`
- App-as-Entity lifecycle: SEED -> GROWTH -> MATURE -> HARVEST -> SUNSET (2+ month transitions)
- 6-hour autonomy loop: SENSE -> ASSESS -> PLAN -> DISPATCH -> EVOLVE
- 23 invariants defined (INV-1 through INV-23)
- `app_entities` table: DDL ready but NOT CREATED YET
- RevenueCat: NOT CONFIGURED for any app
### 1.6 iOS Bootstrap Pipeline
- `openclaw-ios-bootstrap.sh`: One-command scaffold (project.yml, CLAUDE.md, CI/CD, ExportOptions, optional payments)
- OpenClawKit v1.0.2: Shared SPM (Core + Supabase + TCA)
- OpenClawPayments: Shared StoreKit 2 package
- 50 apps built (39 on TestFlight), proven parallel build pipeline
- ASC API: JWT auth, screenshot upload, metadata, review submission, privacy (iris API)
### 1.7 Evolution World + KARL
- EW: Fleet 3, workspace config, fitness 0.88/0.85 target, 19/19 CALC techniques
- KARL: 132+ trajectories, Spore mapped to skill "spore", domain "ios", 5-signal reward + Cortex bridge
---
2. THE GAP ANALYSIS (What Does NOT Exist)
2.1 Critical Path Gaps (Blocks Everything)
| # | Gap | Impact |
|---|---|---|
| G1 | `app_entities` table not created in Supabase | Cannot register Spore or any app |
| G2 | No `app_entity` row for Spore | Autonomy loop has no target |
| G3 | RevenueCat not configured | No revenue data flows at all |
| G4 | No "Build This" harvest option in Spore app | Users cannot trigger app generation |
| G5 | No Edge Function to generate structured app specs | Evolved spores cannot become app blueprints |
| G6 | Bootstrap script not triggered from pipeline | Even with specs, no automated build path |
| G7 | Autonomy loop not running | No SENSE-ASSESS-PLAN-DISPATCH-EVOLVE cycle |
2.2 Secondary Gaps (Can Be Phased)
| # | Gap | Impact |
|---|---|---|
| G8 | Revenue not flowing through ACMP formula | Formula exists but no data feeds it |
| G9 | No spec-to-project translation layer | Bootstrap script expects CLI args, not JSON spec |
| G10 | No user-facing pipeline visibility | User plants idea, sees nothing about app generation |
| G11 | No compute budget tracking per app | Budget allocation formula exists but has no inputs |
| G12 | No split_audit_log table | Revenue audit trail missing |
| G13 | No "fruiting" -> "build requested" status transition | Spore lifecycle ends at fruiting, needs extension |
---
3. DEPENDENCY MAP
G1 (app_entities table)
|
v
G2 (register Spore) -----> G7 (autonomy loop)
| |
v v
G3 (RevenueCat) ---------> G8 (revenue flow) --> G12 (audit log)
|
G4 (Build This button) v
| ACMP Formula Running
v
G5 (spec generation edge function)
|
v
G9 (spec-to-bootstrap adapter)
|
v
G6 (automated build trigger)
|
v
G10 (user visibility)Critical path: G1 -> G2 -> G3 -> G7 -> G8 (revenue foundation)
Parallel path: G4 -> G5 -> G9 -> G6 (idea-to-app pipeline)
These paths converge at: Revenue flowing from generated apps through ACMP formula
---
4. CONSTRAINTS
### 4.1 Technical Constraints
- Edge functions CANNOT reach cloud-vm (Tailscale private IPs unreachable from Deno Deploy)
- iOS BGProcessingTask has ~30s budget (constrains what background tasks can do)
- SwiftData models are fixed once deployed to App Store (schema migration required for new fields)
- Bootstrap script runs on Mac1 only (Xcode required)
- ASC app creation cannot be done via API (requires Safari automation or web UI)
- RevenueCat webhook needs HTTPS endpoint (Supabase Edge Function or cloud-vm with Cloudflare)
- App Store review is currently pending for v1.2.0 (cannot submit new build until resolved)
### 4.2 Business Constraints
- Zero revenue currently ($0/month across all 50 apps)
- Zero guild members (solo mode only)
- RevenueCat free tier: 2,500 MTR (Monthly Tracked Revenue) -- sufficient for launch
- Apple Developer account: single $99/year account handles all apps
- App Store review adds 1-3 day latency per submission
### 4.3 Resource Constraints
- 5 Mac machines + 1 cloud VM available
- Mac1 = primary build host, Mac2 = iOS domain, Mac3 = creative, Mac4/Mac5 = compute
- One Apple Developer account (Diomande, Mohamed)
- No friends enrolled yet for compute pool
---
5. OPEN QUESTIONS FOR STAGE 1
1. What triggers "Build This"? User taps button on fruiting spore? Automatic when a spore reaches fruiting? Only for Garden-tier subscribers?
2. What does a "structured app spec" contain? Name, description, features list, bundle ID, category? Or a full CLAUDE.md-style project brief?
3. Who approves app generation? Fully autonomous? Or Mohamed-gated? (INV-13 says Mohamed approval for strategic allocation)
4. How does revenue attribution work for generated apps? The spore that spawned the app gets credit? The user who planted it?
5. What is the build trigger mechanism? Supabase webhook -> Prefect flow -> SSH to Mac1? Or a new daemon?
6. Should all 50 existing apps be registered as app_entities immediately? Or phase it (Spore first, then flagships, then rest)?
7. RevenueCat: one project per app or one project for all? Affects webhook routing and revenue attribution.
---
6. PRIOR EVOLUTION FINDINGS (Must Carry Forward)
### From Spore Intelligence Architecture (2026-03-11)
- Edge functions are THIN: Supabase + Gemini only. No GK. No RAG++.
- RAG++ DROPPED for Spore: replaced by direct pgvector cosine queries
- GK registration is ASYNC: done by daemon, not edge function
- Cold start mitigation: Latin Square forced exploration for first 12 evolutions
### From ACMP Stress Test (2026-03-07)
- "Architecturally sound, operationally non-functional"
- Solo mode before guild mode is non-negotiable
- Health check: three-tier cascade (Tailscale ping -> session recency -> quota estimation)
- `revenue_share_pct` override column should be REMOVED (use standard formula for all)
- Need `pending_tasks` queue for graceful degradation
- Need migration scripts, not prose DDL
### From ACMP V3 Technical Spec (2026-03-12)
- Spore is explicitly designated as "the anchor app" in Section 6
- Phase 1 (April Week 1): Register Spore as first app_entity
- 6-hour autonomy loop defined but not implemented
- All 23 invariants documented but only 3 enforced in code (INV-6, INV-7, revenue formula)
---
7. RESEARCH SUMMARY
The system has:
- A fully functional iOS app with intelligence pipeline (3 tiers, KARL, behavioral tracking)
- A well-designed ACMP spec with revenue formula, compute scoring, and app lifecycle
- A proven iOS bootstrap pipeline that can scaffold and deploy apps
- All the building blocks, none of them connected
The system lacks:
- The `app_entities` table that ACMP's autonomy loop needs to operate on
- Any revenue tracking infrastructure (RevenueCat not configured)
- The "Build This" concept anywhere in the Spore app
- Any mechanism to translate a mature spore into an app specification
- Any mechanism to trigger the bootstrap pipeline from a database event
- The autonomy loop that would sense, assess, plan, dispatch, and evolve
The core challenge is not building new systems but WIRING existing ones together. Every piece exists. The gap is the connective tissue.
Promotion Decision
Attach run IDs, datasets, metrics, and reproduction commands.
Source Anchor
evo-cube-output/spore-acmp-anchor/stage0-research.md
Detected Structure
Method · Evaluation · Figures · Code Anchors · Architecture · is Stage Research