Carol — back to Apps ← Apps

Carolopedia

A friendly guide to Carol, her ecosystem, and the agents who built her.

📖 CarolopediaServicesBuild InitiativesAll activitiesINI-100000311
📋

CAROL-INI-0935-00: Refactor Image Generator app to agent-centric modular design

Initiative
Open in Initiatives →

📖About

The Image Generator app (owner Archon) is a 1892-line monolith: it imports google.genai and runs all image/video generation, prompt enhancement, consistency scoring, gallery cataloging, and THREE in-process background workers (daily-photo, routine-planner, consistency-analyzer) directly in the app process. Violates P.01.03.01.05 (no business logic in apps) on all 6 banned categories. Refactor: move every business function out into Archon-owned droids behind a shared/ boundary shim (Design 146 + 173), leaving the app as thin routes only. Background workers become a timer-driven droid (+twin). Executed as Orion bypass, one attempt per item.

⚖️Decisions

  • Handover-watchdog: planner-pending nudge for phase 2 (auto-invocation failed: timeout after 60s). (elrond)
  • Handover-watchdog: planner-pending nudge for phase 2 (auto-invocation failed: timeout after 60s). (elrond)
  • SUMMARY: Image Generator refactored to agent-centric modular. App LOC 1892 -> 444 (thin routes only); ~1448 lines of business logic relocated into 6 Archon droids + shared/image_studio.py primitives. Per droid: ar-img-01 image gen (318), ar-cons-01 reference+consistency (461), ar-life-01 daily-life timer droid (410), ar-gal-01 gallery/catalog (172), ar-port-01 portraits (140), ar-vid-01 video (131); shared primitives 255. App is genai-free, zero in-process threads. Architecture audit L2.1+L9.1 pass; 0 undefined names. Live generation verified end-to-end (keyed restart via steward). — Closes the P.01.03.01.05 violation: no business logic, no model SDK, no scheduler threads in the app; all work behind shared/ shims (Design 146/173). (orion)
  • Orion remediated: INI-100000818 bypass closed — CAROL-INI-696 close-marker: the Orion bypass INI-100000818 filed against this parent reached terminal state (closed). This row's literal prefix Orion remediated: is the canonical signal the cookbook-155 dispatcher gate looks for. (shared.bypass.bypass_end)
  • Orion remediated: INI-100000818 bypass closed — CAROL-INI-696 close-marker: the Orion bypass INI-100000818 filed against this parent reached terminal state (closed). This row's literal prefix Orion remediated: is the canonical signal the cookbook-155 dispatcher gate looks for. (shared.bypass.bypass_end)

Success criteria

  • App contains zero business logic: architecture audit passes with all 6 P.01.03.01.05 banned categories gone (no genai import, no in-process workers/threads, no work in route handlers). (must_have)
  • Every relocated function lives in an Archon-owned droid reached via a shared/ boundary shim (lazy delegation, no silent stub, no direct droid import from the app). (must_have)
  • New droids are registered, uniquely-functioned (P.01.03.07.01), named per P.01.03.02.05; the scheduled daily-life droid has an on-demand twin and the generators have review droids. (must_have)
  • Behavior unchanged: every endpoint returns identical results before/after; the 3 background workers run via a timer-driven droid, not in-process threads; regression green. (must_have)
  • Closing summary shows app LOC before/after and total LOC moved app->droids, per-droid. (should_have)