gskinnerteam/flutter-hatcha-app/ai-system
Claude Code and agent skill by gskinnerteam/flutter-hatcha-app
- community
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-systemSKILL.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.
| Pattern | Dart class | Backend | Output | |
|---|---|---|---|---|
| GenUI | ControllerConfig | Named Python agent | JSON widget tree (surfaceUpdate) | |
| Text | GeminiConversationConfig | TextProxyAgent | Plain 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
Key methods
| Method | Purpose | |
|---|---|---|
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/.
All conversation configs
| Config class | Feature | Purpose | |
|---|---|---|---|
GenerateEventDetailsConversation | configure_event | Extract title/date/location from summary | |
GenerateInviteAndModulesConversation | configure_event | Extract InviteModule[] + DashboardModule[] | |
EventAssistantConversationConfig | host_dashboard | Natural-language event modification | |
ModuleInterviewSummaryConversation | host_dashboard | Interview summary → structured module update | |
OrchestratorConversationConfig | interview | Multi-turn orchestrator (questions, confidence, summary) | |
SummaryConversationConfig | interview | Markdown summary from answers | |
DigestConversationConfig | core/services | Event digest generation/update |
4. GenUI Controllers (ControllerConfig)
Base class for widget-rendering. Subclasses live in lib/features/*/genui/.
contextId = "{groupId}_{contextSuffix}" — used for sticky session routing in Python.
All controllers
| Controller class | Feature | Python agent | Status | |
|---|---|---|---|---|
GuestInviteController | guest_invite | GuestAnswerAgent | ✅ Active | |
GuestModuleController | guest_invite | GuestModuleAgent | ✅ Active | |
HostModuleController | host_dashboard | HostModuleAgent | ✅ Active | |
GuestResponsesController | host_dashboard | GuestResponsesAgent | ✅ Active | |
ModuleSuggestionsController | host_dashboard | ModuleSuggestionsAgent | ✅ Active | |
InterviewGenuiControllerConfig | interview (inline) | InterviewQuestionAgent | ✅ Active | |
InterviewSummaryControllerConfig | interview | InterviewSummaryAgent | ✅ Active |
5. Context ID Patterns
Context IDs are session keys for sticky routing:
| Feature | Pattern | Example | |
|---|---|---|---|
| Guest invite per-question | guest_invite_{eventId}_{moduleId} | guest_invite_abc123_dietary | |
| Host module card | host_module_{eventId}_{moduleId} | host_module_abc123_catering | |
| Guest responses chart | guest_responses_{eventId}_{moduleId} | guest_responses_abc123_dietary | |
| Module suggestions | module_suggestions_{eventId} | module_suggestions_abc123 | |
| Interview orchestrator | interview_orchestrator_{groupId} | interview_orchestrator_event_abc123 | |
| Interview per-question | interview_question_{groupId}_{questionId} | interview_question_event_abc123_q1 |
6. Python Agent Architecture
All code in agents/hatcha_agent/.
Key files
| File | Purpose | |
|---|---|---|
agent.py | Agent registry — all agents registered here | |
agent_executor.py | RoutingExecutor — session-sticky message routing | |
a2ui_protocol.py | A2UI extension handler — parses GenUI JSON responses | |
base_agent.py | BaseAgent — 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 containingsurfaceUpdateobjects - Text agents (
use_ui=False): Return plain text.TextProxyAgentis the only text agent
Routing (RoutingExecutor)
- First message to a
contextId: agent detected from message prefix pattern - Agent stored in
_session_routes[context_id] - All subsequent messages with same
contextId→ same agent (sticky)
Agent routing table
| Python Agent | Trigger pattern | GenUI? | |
|---|---|---|---|
TextProxyAgent | system instruction: substring | No | |
InterviewQuestionAgent | question: prefix | Yes | |
GuestAnswerAgent | answer_question: | Yes | |
HostModuleAgent | module_data: | Yes | |
GuestResponsesAgent | visualize_module: | Yes | |
ModuleSuggestionsAgent | # event context | Yes | |
ConfigureEventAgent | Configure event context | Yes | |
GuestInviteAgent | Guest invite context | Yes | |
HostDashboardAgent | Host dashboard context | Yes | |
GuestModuleAgent | Guest module context | Yes | |
InterviewSummaryAgent | Interview summary context | Yes | |
SuggestionChipsAgent | Suggestion chips context | Yes | |
InterviewAgent | Default fallback | Yes |
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
- SKILL.md in the repositoryChecking.github/skills/ai-system/SKILL.md
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
[](https://verified-skill.com/skills/gskinnerteam/flutter-hatcha-app/ai-system)