gskinnerteam/flutter-hatcha-app/ai-system

Claude Code and agent skill by gskinnerteam/flutter-hatcha-app

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

AI communication architecture for the Flutter A2UI + Python hatcha_agent system. Use when: adding a new ControllerConfig or GeminiConversationConfig, creating a Python agent, working with system prompts, modifying routing, or understanding the Two-Layer AI pattern. Covers both Flutter and Python sides.

Install

npx vskill@latest install gskinnerteam/flutter-hatcha-app/ai-system

SKILL.md

AI System — Developer Guide

This skill covers the full AI communication architecture: Flutter conversation configs, Python agent routing, prompt files, and the protocols connecting them.

Working on the background image builder? Use the image-builder skill instead — it is the focused guide for editing the refiner prompt, the pixel system instruction, and running the local iteration loop.

When to Use

  • Adding a new ControllerConfig (GenUI widget-rendering)
  • Adding a new GeminiConversationConfig (text-only AI)
  • Creating or modifying a Python agent in agents/hatcha_agent/
  • Working with system prompts in agents/hatcha_agent/prompts/
  • Debugging AI routing or session issues
  • Understanding the TextProxyAgent pattern

1. Two-Layer AI Architecture

Every AI request routes through the Python hatcha_agent A2A server. No direct Gemini API calls in Flutter.

Flutter App
├── GenUI (ControllerConfig)
│ └── A2A request → RoutingExecutor → {feature}Agent → widget JSON
│
└── GeminiService (GeminiConversationConfig)
└── A2A request ("System Instruction: {prompt}\n\n{msg}")
→ TextProxyAgent → Gemini → text response
PatternDart classBackendOutput
GenUIControllerConfigNamed Python agentJSON widget tree (surfaceUpdate)
TextGeminiConversationConfigTextProxyAgentPlain text / JSON string

2. GeminiService (Text Conversations)

File: lib/core/genui/gemini_service.dart

Each GeminiConversationConfig creates its own GeminiService instance via GeminiServiceLogic.

How messages reach Python
dart
$gemini.getById(conversationId).sendMessage(message);
// Sends: "System Instruction: {systemPrompt}\n\n{message}"
// Python TextProxyAgent extracts systemPrompt, calls Gemini, returns text
Key methods
MethodPurpose
sendMessage(String)Queue or send immediately
clearHistory()Reset conversation without dispose (use on back-nav)
dispose()Deferred if request in-flight
Batching

When enableBatching: true (default), messages within a 1-second window are concatenated. Batch-handling instructions are auto-injected into the system prompt.


3. GeminiConversationConfig

Base class for text-only AI conversations. Subclasses live in lib/features/*/generative/.

dart
abstract class GeminiConversationConfig {
String get groupId; // Groups related conversations
String get conversationId; // Unique per instance
String get systemPrompt; // Sent as "System Instruction: {prompt}"
GeminiConfig get config; // Model params
}
All conversation configs
Config classFeaturePurpose
GenerateEventDetailsConversationconfigure_eventExtract title/date/location from summary
GenerateInviteAndModulesConversationconfigure_eventExtract InviteModule[] + DashboardModule[]
EventAssistantConversationConfighost_dashboardNatural-language event modification
ModuleInterviewSummaryConversationhost_dashboardInterview summary → structured module update
OrchestratorConversationConfiginterviewMulti-turn orchestrator (questions, confidence, summary)
SummaryConversationConfiginterviewMarkdown summary from answers
DigestConversationConfigcore/servicesEvent digest generation/update

4. GenUI Controllers (ControllerConfig)

Base class for widget-rendering. Subclasses live in lib/features/*/genui/.

dart
abstract class ControllerConfig {
String get groupId;
String get contextSuffix; // Combined → contextId (session key)
Catalog get catalog; // Widget catalogue for this context
Transport get transport; // Points at A2A server (was ContentGenerator)
// Optional: maxInstances, enableAutoRetry, maxRetryAttempts, retryDelay
}

contextId = "{groupId}_{contextSuffix}" — used for sticky session routing in Python.

All controllers
Controller classFeaturePython agentStatus
GuestInviteControllerguest_inviteGuestAnswerAgent✅ Active
GuestModuleControllerguest_inviteGuestModuleAgent✅ Active
HostModuleControllerhost_dashboardHostModuleAgent✅ Active
GuestResponsesControllerhost_dashboardGuestResponsesAgent✅ Active
ModuleSuggestionsControllerhost_dashboardModuleSuggestionsAgent✅ Active
InterviewGenuiControllerConfiginterview (inline)InterviewQuestionAgent✅ Active
InterviewSummaryControllerConfiginterviewInterviewSummaryAgent✅ Active

5. Context ID Patterns

Context IDs are session keys for sticky routing:

FeaturePatternExample
Guest invite per-questionguest_invite_{eventId}_{moduleId}guest_invite_abc123_dietary
Host module cardhost_module_{eventId}_{moduleId}host_module_abc123_catering
Guest responses chartguest_responses_{eventId}_{moduleId}guest_responses_abc123_dietary
Module suggestionsmodule_suggestions_{eventId}module_suggestions_abc123
Interview orchestratorinterview_orchestrator_{groupId}interview_orchestrator_event_abc123
Interview per-questioninterview_question_{groupId}_{questionId}interview_question_event_abc123_q1

6. Python Agent Architecture

All code in agents/hatcha_agent/.

Key files
FilePurpose
agent.pyAgent registry — all agents registered here
agent_executor.pyRoutingExecutor — session-sticky message routing
a2ui_protocol.pyA2UI extension handler — parses GenUI JSON responses
base_agent.pyBaseAgent — shared Gemini call logic
prompts/All system prompt strings (one file per agent)
Agent types
  • GenUI agents (use_ui=True): Respond with text + ---a2ui_JSON--- block containing surfaceUpdate objects
  • Text agents (use_ui=False): Return plain text. TextProxyAgent is the only text agent
Routing (RoutingExecutor)
  1. First message to a contextId: agent detected from message prefix pattern
  2. Agent stored in _session_routes[context_id]
  3. All subsequent messages with same contextId → same agent (sticky)
Agent routing table
Python AgentTrigger patternGenUI?
TextProxyAgentsystem instruction: substringNo
InterviewQuestionAgentquestion: prefixYes
GuestAnswerAgentanswer_question:Yes
HostModuleAgentmodule_data:Yes
GuestResponsesAgentvisualize_module:Yes
ModuleSuggestionsAgent# event contextYes
ConfigureEventAgentConfigure event contextYes
GuestInviteAgentGuest invite contextYes
HostDashboardAgentHost dashboard contextYes
GuestModuleAgentGuest module contextYes
InterviewSummaryAgentInterview summary contextYes
SuggestionChipsAgentSuggestion chips contextYes
InterviewAgentDefault fallbackYes
Prompt files

All in agents/hatcha_agent/prompts/:

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 95 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

Repository stars
66
Repository forks
7
7-day trend score
21

Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/gskinnerteam/flutter-hatcha-app/ai-system/badge)](https://verified-skill.com/skills/gskinnerteam/flutter-hatcha-app/ai-system)

Something wrong with this skill or its page? Tell us.