iTranslated by AI

The content below is an AI-generated translation. This is an experimental feature, and may contain errors. View original article
🦔

[AI-Driven Development] How to Enable High-Speed Releases for Solo Projects: From Planning to Post-Release Operations

に公開
2026/02/03

In this article, I will share how to practice AI-Driven Development across every phase—Planning, Project Setup, Development, Review, Testing, Release, and Operations—using an AI chat app (Sodalio) I built with Flutter as a practical case study.

Many independent developers are likely managing multiple products simultaneously. As someone currently developing and operating over 10 products across Web and mobile, I believe the following challenges in individual development are unavoidable:

  • How to ensure quality in a limited amount of time
  • How to compensate for the risks of working alone (lack of reviews, testing oversights)
  • How to move on to the next product development without burning out during the operation phase.

This flow aims to solve these issues by "integrating AI into each phase," allowing individual developers to achieve outcomes comparable to a startup-scale development structure.
If you have any recommendations for how to use these tools, please let me know in the comments.

Table of Contents


Prerequisites for this article

Target Audience

  • Those building mobile apps as an individual or in a small team
  • Those wanting to integrate AI into their development flow

Requirements

  • Basic knowledge of Flutter / GitHub
  • Knowledge of AI agents like Claude
  • For the operations phase, understanding of GitHub Actions / Google Analytics / Crashlytics will be helpful.

What You Will Get From This Article

  • A big picture of an AI development pipeline from planning to operation
  • A practical example of a spec-driven flow based on cc-sdd
  • Concrete examples of E2E / VRT / operation automation

Reading Guide

  1. Read the TL;DR and the big picture first
  2. Read only the phases that represent your current bottlenecks
  3. Refer to the code examples in the collapsible sections for implementation and settings

Estimated reading time: 30–45 minutes total (5–10 minutes if you focus on necessary phases only)

The App Used as a Case Study

https://apps.apple.com/jp/app/sodalio-aiチャット記録アプリ/id6757146846
https://play.google.com/store/apps/details?id=com.mysterylog.sodalio

TL;DR

  • A pipeline that delegates tasks to AI, leaving only the judgment to humans
  • A seamless process from planning → setup → development → review → testing → release → operation
  • Combining cc-sdd + TDD + E2E / VRT + operation automation balances quality and speed
  • Start by partially introducing it from your personal development bottlenecks

Big Picture (Summary)

To grasp the entire flow at a glance, here is a summary of the processes.

Overview of Each Phase

Phase Overview
Planning Organize the market, users, and revenue to solidify the direction.
Setup Prepare the development foundation and project memory (steering).
Development Proceed through specs → design → tasks → implementation.
Review Double-check quality with local + PR reviews.
Testing Ensure UI behavior/look with E2E and VRT.
Release Automate store copy and distribution.
Operations Run the improvement loop through monitoring, analysis, and learning.

Phase Details

Here, I will explain each phase in detail. You only need to read the sections that are relevant to you.

Phase 1: Planning

Introduction

App development begins with planning. In this phase, we leverage Claude to organize market research, personas, and revenue strategies all at once, generating a product.md (Product Vision) document. This document serves as the foundation for requirement analysis and technical design in subsequent development phases.

Goal of this phase:

  • Establish a product concept based on market research
  • Clarify target users and revenue models
  • Generate product.md (Product Vision)
  • Decide on the app name and icon

Subject: AI Chat App

For this planning section, the subject is a chat app that allows users to enjoy conversations with a customizable AI character.


Create a Project in Claude.ai

First, create a project in Claude.ai. By creating a project, you avoid having to explain the same prerequisites every time and make it easier to reference related interactions within the same project.

Screenshot 2026-01-13 12.05.29.png

Creating Skills

Every time you prompt Claude with requests like "conduct market research" or "design a persona," the output format and analytical depth can vary. By creating "Skills," you can achieve the following:

  • Uniform Output Format: Reports are always generated in the same structure
  • Consistent Analytical Perspectives: Ensure all necessary items are analyzed without omissions
Examples of Skills Created for the Planning Phase
Skill Purpose Output Format
market-research Market research & competitor analysis Market size, comparison table, differentiation points
user-persona Persona & JTBD design Persona profile, JTBD, usage scenarios
monetization-strategy Revenue strategy & KPI design Revenue model, pricing, KPI targets
kiro-product-md product.md generation (integration) product.md in Kiro/cc-sdd format
Design Intent for Each Skill

While I will omit the specific content of the actual skills, I will list the outcomes they produce.

market-research

Purpose: Clarify market opportunities and risks for the app idea.

#### Items included in output

- Market Overview (TAM/SAM/SOM, growth rate)
- Competitor Analysis (comparison table of 3-5 apps)
- Differentiation Points (unmet needs, niche to target)
- Summary: Abstract for product.md (Market Context)
user-persona

Purpose: Concretize target users and clarify "who it is being built for."

#### Items included in output

- Main Persona (name, age, occupation, lifestyle)
- JTBD (Functional / Emotional / Social perspectives)
- Usage Scenarios (when, where, how)
- Summary: Abstract for product.md (Primary Persona, Use Cases)
monetization-strategy

Purpose: Design the revenue model and KPIs to solidify the business direction.

#### Items included in output

- Recommended Revenue Model (freemium, subscription, etc.)
- Pricing and competitor comparison
- KPI Design (North Star Metric, Primary/Secondary KPIs)
- Summary: Abstract for product.md (Revenue Model)
kiro-product-md

Purpose: Integrate the analytical results above to generate a product.md document usable for development.

#### Generation Rules (Compliant with Steering Principles)

- Keep within 100-200 lines
- Focus on patterns and objectives (avoid detailed feature lists)
- Convey "why this app is being built"
Creating and Installing Skills

Select "Add Skill" from "Settings" > "Features" in Claude to see the dialog. You can also create skills together with Claude, so conversational creation is recommended.
Screenshot 2026-01-17 1.39.16.png

Created skills will appear in the skill list.
Screenshot 2026-01-17 1.20.10.png


Market Research → Persona → Revenue Strategy → product.md (Product Vision) Generation

Instead of executing Skills individually, we will make a bulk request to Claude.ai and proceed in a conversational format.

Prompt Example
I want to develop an AI chat app.
As for the service content, it will be an app where users can talk to an AI character customized for them, 
and summarize and save the conversation content as records.
Please help me think about the "Market Research," "Persona," and "Revenue Strategy."

Screenshot 2026-01-13 13.13.53.png

Confirming Direction via Dialogue

In my case, I include the following in my Claude personal settings so that before starting detailed analysis, Claude confirms the direction with multiple-choice questions.

If there are ambiguous parts, ask confirming questions before answering.
When confirming, try to number them as much as possible so the user can respond by number.

Example of Confirming Questions from Claude:

# Question Example Choices
1 About the target market A) Japanese market / B) Global expansion / C) Undecided
2 Assumed primary usage A) Diary/Self-reflection / B) Mental health / C) Learning
3 Extent of customization A) Avatar+Personality+Tone / B) Personality+Tone only / C) Minimal
4 About development structure A) Solo developer / B) Small team / C) Larger scale
5 Priority of monetization A) Emphasize from start / B) Prioritize user acquisition / C) Side project
How to Respond

Simply respond with numbers and letters, such as "1-B, 2-A, 3-A, 4-A, 5-A."

If there are additional points Claude wants to confirm, further questions will follow (e.g., output format, analytical depth).

Screenshot 2026-01-13 13.55.11.png

Analysis Results and Generation of product.md (Product Vision)

Based on the answers, Claude performs analysis in the order of Market Research → Persona → Revenue Strategy and finally generates product.md.

Generated product.md (Product Vision)

Claude generates product.md integrating the analysis results. This file will also be used later in the development phase. If there are parts you want to modify, you can adjust them while chatting.

Screenshot 2026-01-13 13.58.01.png


Determining the App Name (Brainstorming with Claude)

Once the concept is solidified in product.md, decide on the app name.

Prompt Example
Propose 10 app names that fit the following concept:
- Can talk to AI characters
- Can customize characters
- A daily companion
Name Duplication Check

Once the app name is somewhat decided, check the following points. Here, too, use Claude to investigate.

  1. Duplication on App Store / Google Play: Search if an app with the same name already exists.
  2. Domain Availability: Check if appname.com or appname.io can be acquired.
  3. Trademark Registration: Check if the name is not already trademarked.

App Icon Creation (ChatGPT + Canva)

For app icons, I generate materials with a transparent background using ChatGPT and finish them with Canva. Considering future customization, creating the main material with a transparent background is best.

Why this combination?
Tool Strengths Weaknesses
ChatGPT 0 to 1 design generation Detailed adjustments, exporting multiple sizes
Canva Detailed adjustments, size adjustment, exporting 0 to 1 design generation
Workflow
1. Generate transparent background material with ChatGPT
   ↓
2. Import favorite material into Canva
   ↓
3. Adjust size and fine-tune background color in Canva
   ↓
4. Export to each size for the App Store

Deliverables for this Phase

Deliverable Description
product.md Product vision (Purpose, Persona, Features, Business Goals)
App Name Axis of branding
App Icon Each size for the store

These will be placed and set in the next "Project Setup" phase.


👤 Human Decision Points

Points where humans should make decisions in this phase:

# Decision Item Detail
1 Direction confirmation via dialogue Respond to multiple-choice questions from Claude to decide the direction of analysis
2 Confirmation of product.md content Confirm if the generated product vision is as intended, and correct if necessary
3 Final confirmation of app name/icon Handle carefully as it becomes the axis of branding

Phase 2: Project Setup

Introduction

Once the planning is solid, create a project in your local environment. In this phase, we set up cc-sdd and integrate the planning information into the project.

Goal of this phase:

  • Create a Flutter project
  • Install and configure cc-sdd
  • Place and generate steering (development policy) documents

Flutter Project Generation

While the standard flutter create command is fine, I use my own GUI tool called "YokoFlu". I created this tool to automate the routine tasks performed every time I create a Flutter app.

YokoFlu Features:

  • GUI-based settings for app name, Bundle ID, app icon, etc.
  • Automatic generation of the Flutter project from the settings
  • Automation of Firebase configuration, etc., via CLI
  • Applies my preferred directory and library structure

For more details, please refer to the following article:

https://zenn.dev/yokkomystery/articles/c2bf78234efc65


What is cc-sdd?

cc-sdd is a tool for implementing the Spec-Driven Development workflow proposed by the AWS AI IDE "Kiro" using AI agents like Claude Code.
Spec-Driven Development is a development methodology that prevents rework by having all requirements, designs, and implementation plans approved before implementation.

Why use cc-sdd?

In traditional AI coding, when you instruct it to "write code," the AI immediately starts implementation—often called "vibe coding." However, this approach has problems.

Problem Details
Ambiguous Requirements Implementation starts without clarity on what to build
Lack of Design Code is generated without considering architecture
High Rework "Not what I expected" occurs frequently
Context Fragmentation As the conversation grows long, the AI loses context

Spec-Driven Development solves these by adopting an approach where "specifications are solidified first."

cc-sdd Features
Feature Description
3-Phase Approval Humans review at each stage: Requirements → Design → Tasks
Steering Maintains project "memory" so the AI understands the big picture
Sub-agents Specialized agents for specs, design, and implementation
TDD Implementation Quality assurance via Test-Driven Development
Specification Persistence Specs remain in the .kiro/specs/ directory for reference/modification

Installing cc-sdd

To perform spec-driven development utilizing Claude Code's sub-agent functionality, install cc-sdd with the following command:

npx cc-sdd@latest --claude-agent --lang ja
Option Description
--claude-agent Generates 12 commands and 9 sub-agents for Claude Code
--lang ja Generates specification documents in Japanese

スクリーンショット 2026-01-17 23.04.18.png

Available Commands

Installing cc-sdd with the --claude-agent option makes 12 slash commands and 9 sub-agents available. (Only 11 commands are available with the --claude option.)

Created Files and Directories
Created Item Description
.claude/agents/kiro/ Sub-agent definitions (spec-design.md, spec-impl.md, etc.)
.claude/commands/kiro/ Slash command definitions (/kiro:spec-* commands)
.kiro/settings/ Rules and templates
Append to CLAUDE.md Adds the AI Development Life Cycle (AI-DLC) section

スクリーンショット 2026-01-17 23.10.51.png


What are Sub-agents?

Claude Code can delegate complex tasks to specialized sub-agents. With cc-sdd, the following 9 sub-agents are defined upon installation:

Specification Agents (Spec)
Sub-agent Role
spec-requirements Generates requirements definitions in EARS syntax
spec-design Generates technical design documents
spec-tasks Generates implementation task lists
spec-impl Performs TDD implementation (test-first)
Validation Agents (Validate)
Sub-agent Role
validate-gap Analyzes gaps between requirements and existing code
validate-design Quality check of the design (interactive)
validate-impl Verifies if implementation meets specifications
Steering Agents (Steering)
Sub-agent Role
steering Initialization/sync of .kiro/steering/ (project memory)
steering-custom Creates custom steering (adds unique development policies)

Placing product.md

Place the product.md generated during the planning phase into .kiro/steering/.

Example content of product.md (Excerpt)

Below is an excerpt (main sections only).

Document Example
#### Product Overview

**Sodalio** is a mobile app that allows users to engage in self-reflection through conversations with a customizable AI character, and then summarize and save those conversations.

It supports users who "want to write a diary but don't know what to write" or "struggle to organize thoughts alone" through natural conversation with the AI.

#### Core Capabilities

- **Customizable AI Character**: Set appearance and tone as preferred
- **Interactive Self-Reflection**: Naturally reflect on daily events and emotions through conversation
- **Conversation Summary/Save**: AI summarizes and saves to the timeline
- **Cross-platform**: iOS and Android support

(Omitted)

#### Target User

##### Primary Persona

- **Age Group**: 20–35, young professionals/students
- **Characteristics**: High interest in self-growth, tech-savvy, wants to write a diary but fails to maintain it
- **Needs**: Wants to self-reflect casually but feels uncomfortable talking to people

#### Success Metrics

- **North Star Metric**: Weekly active conversation users
- **Primary KPIs**: DAU/MAU, Day 7 retention, free-to-paid conversion rate

(Omitted)

Generating tech.md and structure.md

Once product.md is placed, execute the /kiro:steering command in the local Claude Code.

/kiro:steering
Sync Mode

If product.md already exists, this command runs in Sync Mode, analyzing the codebase to automatically generate the following:

File Content
tech.md Technical stack, architectural patterns
structure.md Directory structure, coding conventions
Example content of tech.md
Document Example
#### Technical Stack

#### Framework

- Flutter 3.x
- Dart 3.x

#### State Management

- Riverpod

#### Backend

- Firebase (Authentication, Firestore, Functions)
- Vertex AI

#### Architecture

- Repository Pattern
- Provider Pattern (via Riverpod)
Example content of structure.md
Document Example
#### Project Structure

#### Directory Layout

lib/
├── screens/ # UI screens
├── models/ # Data models
├── services/ # Business logic
├── providers/ # Riverpod providers
├── widgets/ # Common widgets
└── utils/ # Utilities

#### Coding Conventions

- File names: snake_case
- Class names: PascalCase
- Variable names: camelCase

Final Directory Structure

cc-sdd automatically creates necessary directories during specification development.

Ultimately, the structure looks like this:

Example Structure
your_project/                    # Monorepo root
├── .claude/                     # Claude Code settings (automatically generated by cc-sdd)
│   ├── agents/                  # Sub-agent definitions (9 files)
│   │   └── kiro/
│   │       ├── spec-design.md
│   │       ├── spec-impl.md
│   │       ├── spec-requirements.md
│   │       ├── spec-tasks.md
│   │       ├── steering.md
│   │       ├── steering-custom.md
│   │       ├── validate-design.md
│   │       ├── validate-gap.md
│   │       └── validate-impl.md
│   ├── commands/                # Slash command definitions (12 files)
│   │   └── kiro/
│   │       ├── spec-design.md
│   │       ├── spec-impl.md
│   │       ├── spec-init.md
│   │       ├── spec-quick.md
│   │       ├── spec-requirements.md
│   │       ├── spec-status.md
│   │       ├── spec-tasks.md
│   │       ├── steering.md
│   │       ├── steering-custom.md
│   │       ├── validate-design.md
│   │       ├── validate-gap.md
│   │       └── validate-impl.md
│   └── settings.local.json      # Local settings
├── .kiro/
│   ├── steering/                # Project-wide policies (Project Memory)
│   │   ├── product.md           # Product vision, personas, monetization
│   │   ├── tech.md              # Tech stack, architecture
│   │   └── structure.md         # Directory structure, coding conventions
│   ├── specs/                   # Specifications for each feature (cc-sdd generated)
│   │   └── {feature-name}/
│   │       ├── requirements.md  # Requirements definition
│   │       ├── design.md        # Technical design
│   │       └── tasks.md         # Implementation task list
│   └── settings/                # Rules and templates
│       ├── rules/               # Spec development rules
│       └── templates/           # Templates
├── CLAUDE.md                    # Project constitution
├── Sodalio/                     # Flutter app
│   ├── lib/                     # Source code
│   └── test/                    # Test code
└── Sodalio-backend/             # Firebase Functions

Role of .kiro/

Directory Role Creation Timing
steering/ Development policy + Planning info (Why/How to build) Planning: product.md (Claude.ai), Setup: tech.md, structure.md (Local)
specs/ Feature specifications (What to build) Generated during development phase
What is Steering?

Steering functions as the "memory of the project."

  • product.md: Why we are building this app (planning intent)
  • tech.md: What technology we are using (tech stack)
  • structure.md: How it is organized (directories, conventions)

This allows the AI to develop specifications and implementation while "understanding the big picture."

What are Specs?

Specs store detailed specifications for each feature:

Example Structure
.kiro/specs/
├── user-authentication/
│   ├── requirements.md   # Auth feature requirements
│   ├── design.md         # Auth feature design
│   └── tasks.md          # Auth feature implementation tasks
├── character-chat/
│   ├── requirements.md
│   ├── design.md
│   └── tasks.md
└── ai-image-generation/
    ├── requirements.md
    ├── design.md
    └── tasks.md

About CLAUDE.md

CLAUDE.md functions as the "constitution" of the project. The AI-DLC section is added during cc-sdd installation.

Added Content
Document Example
#### AI-DLC and Spec-Driven Development

Kiro-style Spec Driven Development implementation on AI-DLC (AI Development Life Cycle)

#### Project Context

##### Paths

- Steering: `.kiro/steering/`
- Specs: `.kiro/specs/`

##### Steering vs Specification

**Steering** (`.kiro/steering/`) - Guide AI with project-wide rules and context
**Specs** (`.kiro/specs/`) - Formalize development process for individual features

##### Active Specifications

- Check `.kiro/specs/` for active specifications
- Use `/kiro:spec-status [feature-name]` to check progress

#### Development Guidelines

- Respond in Japanese. Specification-related Markdown such as requirements.md, design.md, tasks.md, research.md, validation reports, etc., should follow spec.json.language.

#### Minimal Workflow

- Phase 0 (optional): `/kiro:steering`, `/kiro:steering-custom`
- Phase 1 (Specification):
  - `/kiro:spec-init "description"`
  - `/kiro:spec-requirements {feature}`
  - `/kiro:validate-gap {feature}` (optional: for existing codebase)
  - `/kiro:spec-design {feature} [-y]`
  - `/kiro:validate-design {feature}` (optional: design review)
  - `/kiro:spec-tasks {feature} [-y]`
- Phase 2 (Implementation): `/kiro:spec-impl {feature} [tasks]`
  - `/kiro:validate-impl {feature}` (optional: after implementation)
- Progress check: `/kiro:spec-status {feature}` (use anytime)

#### Development Rules

- 3-phase approval workflow: Requirements → Design → Tasks → Implementation
- Human review required each phase; use `-y` only for intentional fast-track
- Keep steering current and verify alignment with `/kiro:spec-status`
- Follow the user's instructions precisely, and within that scope act autonomously: gather the necessary context and complete the requested work end-to-end in this run, asking questions only when essential information is missing or the instructions are critically ambiguous.

#### Steering Configuration

- Load entire `.kiro/steering/` as project memory
- Default files: `product.md`, `tech.md`, `structure.md`
- Custom files are supported (managed via `/kiro:steering-custom`)

This allows Claude Code to understand the project's development flow.


Deliverables for this Phase

Deliverable Description
Flutter Project Basic project structure
.claude/ Sub-agent and command definitions
.kiro/steering/ product.md, tech.md, structure.md
CLAUDE.md AI-DLC section added

👤 Human Decision Points

Decision points for humans in this phase:

# Decision Item Details
1 Final Steering Confirmation Do tech.md and structure.md match the reality?

Phase 3: cc-sdd Development (Spec-Driven Development)

Introduction

In the development phase, we use a methodology called Spec-Driven Development. This approach ensures quality by solidifying specifications before implementation through a 3-step approval process.

Goal of this phase:

  • Understand the flow of Requirements Definition → Technical Design → Task Generation → TDD Implementation
  • Clarify human decision points at each step
  • Master the workflow through actual feature addition

What is cc-sdd?

cc-sdd is a framework for "Spec-Driven Development."

Core: You cannot proceed to the next step without human "OK" at each stage.

This prevents:

  • Unnecessary implementation
  • Discovering problems during the design phase
  • AI from going rogue

Available Commands

After installing cc-sdd, 12 slash commands become available.

Specification Commands (Spec)
Command Role
/kiro:spec-init Initialize spec directory
/kiro:spec-requirements Requirements definition in EARS syntax
/kiro:spec-design Generate technical design document
/kiro:spec-tasks Generate implementation task list
/kiro:spec-impl Implementation via TDD
/kiro:spec-status Check progress
/kiro:spec-quick Quick spec generation (no dialogue)
Validation Commands (Validate)
Command Use Case When to use
/kiro:validate-gap Analyze gap between requirements and existing code Adding features to existing app
/kiro:validate-design Check design quality Design review for complex features
/kiro:validate-impl Verify implementation meets specs Final check after implementation
Steering Commands (Steering)
Command Use Case
/kiro:steering Initialize/Sync Steering
/kiro:steering-custom Create custom steering (own rules)

Practice: Automated AI Character Image Generation Feature

Here, I will describe the flow of adding an actual feature using cc-sdd.

Feature to Add

The feature to be added is an AI-powered automated character image generation feature. When creating a custom AI character, it will generate an avatar image based on the input settings (name, personality, tone, etc.).

↓ Place a generation button on this screen to automatically generate character images.
Custom Character Editor Screen

↓ Image after feature addition
Generation Flow (Style Selection)Generation Flow (Preview)


Step 1: Initialize Specification

/kiro:spec-init Create a feature that automatically generates character images using AI from settings when creating a custom character.

Screenshot 2026-01-14 0.24.17.png

Execution Result

A .kiro/specs/ai-character-image-generation/ directory is created, and spec.json and an initial requirements.md are generated.

.kiro/specs/
└── ai-character-image-generation/
    ├── spec.json        ← Manages phases and approval status
    └── requirements.md  ← Initial requirements (concise content)
Phase Management via spec.json

spec.json is a file that manages the progress and approval status of specifications. When approved: true is achieved in each phase—Requirements Definition → Technical Design → Task Generation—you can move to the next phase. If the previous phase is not approved, cc-sdd will refuse execution even if a command is run. Once all approvals are complete, ready_for_implementation becomes true, and you can start TDD implementation with /kiro:spec-impl.

Screenshot 2026-01-18 0.41.48.png

Field Description
phase Current phase (initialized → requirements → design → tasks)
approvals.*.generated Whether the document has been generated
approvals.*.approved Whether it has been approved by a human
ready_for_implementation Becomes true after all approvals, enabling implementation

Step 2: Requirements Definition

/kiro:spec-requirements ai-character-image-generation

Screenshot 2026-01-14 0.44.26.png

Requirements are generated using the EARS (Easy Approach to Requirements Syntax) notation.

Pattern Syntax Example
Ubiquitous The [system] shall [action] The system shall display error messages in red
Event-driven When [event], the [system] shall [action] When user taps generate, the system shall call AI API
State-driven While [state], the [system] shall [action] While generating, the system shall show progress
Optional Where [condition], the [system] shall [action] Where premium user, the system shall allow unlimited
Example of generated requirements.md

Below is an excerpt of the requirements.md generated in the actual project.

Document Example
#### Requirements Document

#### Introduction

This document defines the requirements for the "AI Character Image Generation Feature" in the Sodalio app.

#### Requirements

##### Requirement 1: Triggering AI Image Generation

**Objective:** As a user, I want to trigger AI image generation on the custom character creation screen, so that I can create a character image without needing to provide one manually.

###### Acceptance Criteria

1. When the user taps the AI image generation button on the custom character edit screen, the app shall start the AI image generation flow.
2. While required settings for AI image generation are not entered, the app shall disable the generation button and show a tooltip indicating the required items.
3. When the AI image generation button is tapped while enabled, the app shall construct a prompt for image generation from the current settings.

##### Requirement 3: Selecting Image Style

**Objective:** As a user, I want to select the style of the generated image, so that I can create a character image that matches my preference.

###### Acceptance Criteria

1. When the AI image generation flow starts, the app shall display the image style selection UI.
2. The app shall provide selectable styles (anime, realistic, pixel art, etc.) from existing ImageStyles.
3. When the user selects a style, the app shall apply the selected style to the prompt.

##### Requirement 7: Usage Limits and Quota Management

**Objective:** As a system, I want to manage the usage count of AI image generation, so that service costs can be properly managed.

###### Acceptance Criteria

1. The app shall apply image generation count limits based on the user's subscription level.
2. When the user reaches the image generation limit, the app shall display a limit reached message and guide the user to a premium upgrade.
3. While the user is a free user, the app shall display the image generation feature as a premium-only feature.

Step 3: Technical Design

Once requirements are approved, proceed to technical design.

/kiro:spec-design ai-character-image-generation
Example of generated design.md
Document Example
#### Technical Design Document

#### Overview

**Objective**: Automatically generate AI images from settings entered by the user during custom character creation, eliminating the need for manual image selection.

**Impact**: Add an AI image generation button to the existing CustomCharacterEditorScreen, and extend the existing generateImage Cloud Function and ImageStyle enum.

#### Architecture

┌─────────────────┐
│ CustomCharacter │
│ EditorScreen    │──┬─▶ ImageStyleSelectorDialog
└─────────────────┘  
│ └─▶ ImagePreviewDialog
▼
┌─────────────────┐
│ CharacterPrompt │
│ Builder         │
└─────────────────┘
│
▼
┌───────────────────────────────────────┐
│ AIService │───▶│ Cloud Function       │
│ (Existing)│    │ (generateImage)      │
└───────────────────────────────────────┘
│
▼
┌──────────────────┐
│ Vertex AI Gemini │
└──────────────────┘

#### Components

| Component | Role |
| --- | --- |
| CharacterPromptBuilder | Construct prompt from character attributes |
| ImageStyleSelectorDialog | Image style selection UI |
| ImagePreviewDialog | Generated image preview/adopt/regenerate |
| AIService (Existing) | Cloud Function call |
| FirestoreService (Existing) | Image compression/Storage save |

#### Error Handling

| Error | Response |
| --- | --- |
| Quota exceeded | Limit reached message + premium guide |
| Content policy violation | Prompt correction message |
| Timeout | Retry option display |
| Network error | Retry button display |

Step 4: Task Generation

Once the design is approved, generate implementation tasks.

/kiro:spec-tasks ai-character-image-generation
Example of generated tasks.md
Document Example
#### Implementation Plan

#### Tasks

- [ ] 1. Implement prompt construction utility

  - [ ] 1.1 Create class to construct prompt from character attributes
  - [ ] 1.2 Unit tests for prompt construction logic
  - _Requirements: 2.1, 2.2, 2.3, 2.4, 2.5_

- [ ] 2. Implement image style selection dialog

  - [ ] 2.1 Build style selection UI with glassmorphism design
  - _Requirements: 3.1, 3.2, 3.3, 3.4_

- [ ] 3. Implement image preview dialog

  - [ ] 3.1 Build preview and interaction UI for generated image
  - _Requirements: 5.1, 5.2, 5.3, 5.4_

- [ ] 4. Add localization for multi-language support

  - [ ] 4.1 Localize UI strings for AI image generation in 16 languages
  - _Requirements: 10.1, 10.2_

- [ ] 5. Integrate AI image generation into character edit screen

  - [ ] 5.1 Add AI image generation button to edit screen
  - [ ] 5.2 Implement AI image generation flow
  - [ ] 5.3 Implement adoption/save process for generated image
  - [ ] 5.4 Implement regeneration function
  - _Requirements: 1.1, 1.2, 1.3, 6.1, 6.2, 6.3, 8.1, 8.4_

- [ ] 6. Implement error handling and quota management

  - [ ] 6.1 Process image generation errors and user feedback
  - _Requirements: 7.1, 7.2, 9.1, 9.2, 9.3, 9.4_

- [ ] 7. Implement integration tests
  - [ ] 7.1 Integration test for entire AI image generation flow
  - [ ] 7.2 Integration test for error cases and quota limits
  - _Requirements: All requirements_

Step 4.5: Design Verification (Optional)

For complex features or those with large impacts on existing code, you can verify the design.

#### Design quality check (dialogue format)
/kiro:validate-design ai-character-image-generation
About validate-gap

If there is an existing codebase, you can analyze the gap between requirements and existing implementation with /kiro:validate-gap.

/kiro:validate-gap ai-character-image-generation

This clarifies:

  • Parts reusable in existing code
  • Parts requiring new implementation
  • Scope of impact on existing code

Once tasks are approved, ready_for_implementation becomes true, and you can start implementation.
Screenshot 2026-01-14 0.58.14.png

Step 5: TDD Implementation

Now that implementation preparation is complete, implement using Test Driven Development (TDD).

/kiro:spec-impl ai-character-image-generation

Screenshot 2026-01-14 1.07.25.png

TDD Cycle

cc-sdd strictly adheres to the following TDD cycle while proceeding with implementation.

AI Implementation Flow

AI repeats the following for each task:

  1. Create Test (Based on expected input/output)
  2. Run Test (Confirm failure → Proof that the test is correct)
  3. Minimal Implementation (Code only to pass the test)
  4. Refactor (Improve without breaking tests)

As implementation progresses, checkboxes in Tasks are checked sequentially.
Screenshot 2026-01-14 1.17.50.png

Important Rules

Step 6: Implementation Verification (Optional)

Once implementation is complete, verify if it meets the specifications.

/kiro:validate-impl ai-character-image-generation
Verification Content
  • Does it meet all requirements (requirements.md)?
  • Does it follow the design (design.md)?
  • Are all tasks (tasks.md) completed?
  • Do all tests pass?

Progress Check

You can check progress at any time.

/kiro:spec-status ai-character-image-generation
Output Example
#### ai-character-image-generation

| Phase | Status | File |
|-------|--------|------|
| Requirements | ✅ Approved | requirements.md |
| Design | ✅ Approved | design.md |
| Tasks | ✅ Approved | tasks.md |
| Implementation | 🔄 In Progress | 3/5 tasks |

When all tasks are complete, the results appear like this.
Screenshot 2026-01-14 1.25.08.png


👤 Human Decision Points (Summary)

# Decision Item Timing
1 Approve Requirements Definition After /kiro:spec-requirements
2 Approve Technical Design After /kiro:spec-design
3 Approve Implementation Tasks After /kiro:spec-tasks

Phase 4: Code Review

Introduction

Once TDD implementation is complete, conduct a code review. In this phase, combine local review before PR creation and AI review on GitHub after PR creation to build a multi-layered review system.

Goal of this phase:

  • Execute local AI code review
  • Use multiple AI review tools correctly
  • Efficiently fix review feedback

Explanation of Tools

Claude Code (Local)

Directly interact with Claude from the terminal to read/write code, execute, and review.

Features:

  • Access local file system
  • Define custom skills (~/.claude/commands/)

📖 Details: Claude Code Documentation

Claude Code Action (GitHub)

Claude Code Action runs as a GitHub Action and allows you to call Claude by mentioning @claude in Issues/PRs.

Features:

  • Triggered simply by writing @claude on GitHub
  • Answers with understanding of the repository's codebase
  • Capable of PR reviews, Issue analysis, and code fixes

📖 Details: Claude Code Action Official Repository

Codex (GitHub App)

Codex is an AI agent provided by OpenAI as a GitHub App that automatically reviews PR diffs.

Features:

  • Automatic review comments upon PR creation
  • Points out implementation validity and oversights
  • Checks from a different perspective than Claude

📖 Details: Codex GitHub App

BugBot (Cursor)

BugBot is an AI review tool by Cursor, specialized in detecting bugs and security issues.

Features:

  • Specialized in bugs/security
  • Fixable instantly with the "Fix in Cursor" button
  • Linkage with Cursor IDE

📖 Details: Cursor Bugbot


Overall Review Flow


Local Code Review (Before PR Creation)

Why Review Locally?
  • Early Discovery: Find and fix issues before submitting PR
  • Efficiency: Reduce review comments after PR
  • Quality Improvement: Squash critical issues beforehand
Create Custom Skill

It is convenient to create custom skills for code reviews.

Command Definition (Skill Trigger):

~/.claude/commands/code-quality/code-reviewer.md
---
agent: code-reviewer
description: Automated Flutter/Dart code review
---

Review code changes for best practices, security, performance, and maintainability with detailed feedback.

Agent Definition (How to run review):

Example Definition
~/.claude/agents/code-quality/code-reviewer.md
---
name: code-reviewer
description: Automated code review agent for Flutter/Dart projects
model: sonnet
color: blue
---

You are an expert Flutter/Dart code reviewer with deep knowledge of
best practices, security, performance, and maintainability.

#### Review Dimensions
1. Functionality & Correctness ✅
2. Performance ⚡
3. Security 🔒
4. Maintainability 🛠️
5. Flutter Best Practices 📱
6. Riverpod Specific 🔄
7. Code Style 🎨
8. Testing 🧪

#### Categorize Findings
- Critical (🔴 Must Fix): Security vulnerabilities, logic bugs, memory leaks
- Important (🟡 Should Fix): Performance issues, insufficient tests
- Minor (🔵 Consider): Style improvements, refactoring suggestions
- Positive (✅ Great!): Good patterns, well-tested code
Execution of Review
/code-quality:code-reviewer

Screenshot 2026-01-14 8.36.58.png

Calling this skill automatically detects diffs from the master branch and reviews based on the following:

  • Bugs/Logic errors
  • Security vulnerabilities
  • Performance issues
  • Code quality/Readability
  • Flutter/Dart best practices
  • Proper use of Riverpod
  • Compliance with project conventions (CLAUDE.md)

Additionally, if you want to review from a security perspective, you can also have it reviewed with the following command.

/security-review

Screenshot 2026-01-14 7.49.23.png


Example of Review Results

In actual review results, issues are categorized by importance:

#### 【Critical】Major Issues

##### 1. Potential Memory Leak - `_acceptGeneratedImage` method (Confidence: 95)

**Issue**: There is a possibility that it will be disposed during asynchronous processing, but there is no `mounted` check before `setState`.

**Improvement Proposal**:

```dart
if (mounted) {
  setState(() {
    _pickedImage = Uint8List.fromList(imageBytes);
  });
}
```

Fixing Review Feedback

Fix the issues pointed out in the review. When you tell Claude Code "Please fix this," it performs the fix automatically.

Run Tests After Fix

Once fixed, re-run tests to confirm no issues exist.

flutter test

PR Creation (@claude automated generation of title and description)

Once local review is complete, create a PR. At this time, you can use @claude to automatically generate the PR title and description.

Workflow
Example Flow
Local review complete
    │
    ▼
git push (Push branch to remote)
    │
    ▼
Create PR as Draft
    │
    ▼
Request @claude to generate title and description
    │
    ▼
Confirm/adjust generated content
    │
    ▼
Change PR to "Ready for Review"
Request Example to @claude

After creating a Draft PR, request in a comment as follows:

@claude Please create the title and description for this PR.

Screenshot 2026-01-18 1.28.45.png


AI Review After PR

Tool Usage
Tool Strengths Features
Claude Code Action Design, Logic, Architecture Comprehensive review
Codex Implementation validity, oversight check Check from additional perspectives
BugBot Bugs, Security Fixable instantly with "Fix in Cursor" button
Claude Code Action

Claude Code Action can be triggered by two triggers:

  • PR creation (automatic)
  • @claude mention in PR (manual)
Why can @claude trigger the Claude workflow?

Because it is configured in .github/workflows/claude.yml to detect @claude mentions. The GitHub Webhook detects the comment event, and the Claude Code Action workflow triggers.

Code Example
on:
  issue_comment:
    types: [created]
  pull_request_review_comment:
    types: [created]

jobs:
  claude:
    if: contains(github.event.comment.body, '@claude')
    # ...
Example of @claude mention usage
  • "@claude Create the title and description for this PR"
  • "@claude Is there a potential memory leak with this change?"
  • "@claude Can this logic be written more simply?"
  • "@claude Is this use of Riverpod correct?"
  • "@claude Create an Issue from BugBot/Codex feedback and make a fix PR"
Fix with Fix Button

Review feedback from Claude can be fixed directly by tapping the [Fix this →] button that appears in the comment.

Screenshot 2026-01-18 1.31.34.png

Codex

Codex (GitHub App by OpenAI) also reviews PR diffs. As it is a different model from Claude, you can get feedback from different perspectives.

Features:

  • Automated comments upon PR creation
  • Points out implementation validity and oversights
  • Double-check from a different perspective than Claude

Screenshot 2026-01-18 1.32.30.png

BugBot

BugBot is an AI review tool by Cursor, specialized in detecting bugs and security issues.

Features:

  • Specialized in bugs/security
  • Fixable instantly with the "Fix in Cursor" button
  • Linkage with Cursor IDE

Workflow for Responding to Review Feedback

Flow Example
Receive feedback
    │
    ▼
Check importance
    │
    ├─ Critical/Important → Fix immediately
    │
    └─ Minor → Either of the following
         │
         ├─ Fix immediately (if simple)
         │
         └─ Request Issue creation + Fix PR creation with @claude

👤 Human Decision Points

# Decision Item Timing
1 Confirm local review feedback After TDD implementation, before PR creation
2 Merge PR After passing AI review

Phase 5: E2E & Visual Regression

Introduction

Before release, I ensure quality with E2E testing and Visual Regression Testing in addition to unit tests.

Goal of this phase:

  • Create and execute E2E tests using Maestro
  • Visual Regression Testing to detect screenshot diffs
  • Master debugging methods for failed tests

E2E Testing (Maestro)

What is Maestro?

Maestro is a tool that allows you to describe mobile app E2E tests in declarative YAML format.

Features:

  • Intuitive description with YAML
  • Compatible with both iOS/Android
  • Screenshot capture
  • Flexible control of waiting processes

e2e-demo-sodalio-20260115.gif

📖 Official Documentation: Maestro


Automated Generation of E2E Tests

I created a Claude Code custom command that generates E2E tests from requirements.md.

#### Generate E2E test for a feature (custom command)
/e2e:create {feature-name}

#### Example: E2E for AI image generation feature
/e2e:create ai-image-generation

This command is designed to read .kiro/specs/{feature}/requirements.md and automatically generate Maestro YAML based on the acceptance criteria.

Screenshot 2026-01-14 9.53.25.png

Screenshot 2026-01-14 10.14.36.png


Structure of E2E Tests

E2E tests are designed to be contained within 1 file. Utilize runFlow, which automatically performs login processing even in an unlogged-in state.

Actual Test Example

Below is the E2E test for AI character image generation used in the actual project:

Code Example
Sodalio/maestro/flows/ai-character-image-generation.yaml
#### AI Character Image Generation E2E Test
#### Test AI image generation feature during custom character creation
#
#### Prerequisites:
#### - Logged in (auto-login if not logged in)
#### - Premium plan (assumed manually set)
#
#### Test Coverage:
#### - Req 1: Trigger AI image generation (button enabled after required fields input)
#### - Req 3: Select image style
#### - Req 5: Preview and confirm generated image

appId: com.mysterylog.sodalio.staging
---
#### ===== Launch App =====
- launchApp

#### ===== Setup: Login =====
- runFlow: setup/login-if-needed.yaml

#### ===== Initial State =====
- extendedWaitUntil:
    visible: "Log|Calendar|MyPage|Settings"
    timeout: 15000
- takeScreenshot: "01_home_screen"

#### ===== Navigate to Settings =====
- tapOn: "Settings"
- waitForAnimationToEnd
- tapOn:
    text: "Later|Close"
    optional: true
- waitForAnimationToEnd
- takeScreenshot: "02_settings_screen"

#### ===== Navigate to Custom Character Editor =====
- tapOn:
    text: "Create Custom Character"
- waitForAnimationToEnd
- takeScreenshot: "04_character_editor_empty"

#### ===== Fill Required Fields =====
- tapOn:
    text: "Name"
- inputText: "Test Char Taro"
- hideKeyboard

- tapOn:
    text: "Description"
- inputText: "A cat character with white fur and blue eyes"
- hideKeyboard

- tapOn:
    text: "Personality"
- inputText: "Kind and calm"
- hideKeyboard

- tapOn:
    text: "Type"
- inputText: "White Cat"
- hideKeyboard
- takeScreenshot: "05_character_editor_filled"

#### ===== Trigger AI Image Generation =====
- tapOn:
    text: "Generate with AI"
- waitForAnimationToEnd

#### ===== Image Style Selection =====
- extendedWaitUntil:
    visible: "Style Selection|Anime/Illustration|Generate"
    timeout: 15000
- takeScreenshot: "07_style_selection_dialog"

- tapOn:
    text: "Generate"
- waitForAnimationToEnd

#### ===== Wait for Generation & Preview =====
- extendedWaitUntil:
    visible: "Adopt|Regenerate"
    timeout: 120000
- takeScreenshot: "09_preview_dialog"

#### ===== Accept Generated Image =====
- tapOn:
    text: "Adopt"
- waitForAnimationToEnd
- takeScreenshot: "11_editor_with_image"

#### ===== Final Verification =====
- assertVisible: "Select Image|Generate with AI|Save"

Important Patterns for E2E Tests

Pattern Use Case Example
runFlow: setup/login-if-needed.yaml Share login process Used at the start of all tests
optional: true Conditional execution Parts where dialogs might appear depending on timing/conditions
`visible: "A B C"`
extendedWaitUntil Wait with timeout Await async process completion
Screenshot Naming Convention

Debugging Failed E2E Tests

When a test fails, Claude appropriately checks screenshots saved by Maestro and automatically fixes them.

Debug Flow
Code Example
#### 1. Test execution (fail)
maestro test maestro/flows/ai-image-generation.yaml

#### 2. Confirm screenshots
#### Results saved in ~/.maestro/tests/{timestamp}/
open ~/.maestro/tests/  # Open latest directory

#### 3. Confirm actual UI from failure screenshot (with ❌ mark)

#### 4. Fix test selector and re-run

Screenshot 2026-01-18 9.20.38.png

Debugging with Claude Code

Using Claude Code, you can simply show the screenshot and instruct it to "Fix the test to match this UI," and the AI will automatically correct the selector.


Visual Regression Testing

Compare screenshots taken in E2E tests with the baseline to detect unintended UI changes.

Screenshot 2026-01-15 2.42.45.png

Note that visual-regression.sh used here is a unique custom script (not a standard Maestro feature).

Mechanism of Visual Regression
Processing Content
  1. At run execution, run Maestro with --test-output-dir, saved to maestro/screenshots
  2. Comparison references maestro/screenshots or the latest ~/.maestro/tests
  3. Calculate diff pixel count with ImageMagick (THRESHOLD default is 0.1 = 10%)
  4. Crop status bar/home indicator to reduce false detections (CROP_TOP / CROP_BOTTOM)
  5. Output diff image and HTML report to maestro/diff-results/{year}/{timestamp}

If a diff is detected, judge whether it is an intentional change or a bug.

Situation Response
Intentional UI change (Specification change) Update baseline with save-baseline {flow}
Unintentional UI change (Bug) Fix code to match baseline

Directory Structure

Example Structure
Sodalio/maestro/
├── config.yaml               # Maestro configuration
├── flows/                    # E2E test scenarios
│   ├── setup/
│   │   ├── login-if-needed.yaml
│   │   ├── full-reset.yaml
│   │   └── set-plan-*.yaml   # Setup per plan
│   ├── suites/               # Test suites
│   │   ├── suite-all-plans.yaml
│   │   ├── suite-free.yaml
│   │   └── suite-standard.yaml
│   ├── tests/                # Test per plan
│   │   ├── plan-free/
│   │   ├── plan-light/
│   │   └── plan-standard/
│   ├── ai-character-image-generation.yaml
│   ├── ai-chat.yaml
│   ├── calendar.yaml
│   └── ...
├── baseline/                 # Baseline images
│   └── {flow-name}/
│       ├── 01_home_screen.png
│       └── ...
└── reports/                  # Test reports

Test Execution Commands

Code Example
#### Move to Sodalio directory
cd Sodalio

#### Run single test
maestro test maestro/flows/ai-character-image-generation.yaml

#### Run suite (all plans)
maestro test maestro/flows/suites/suite-all-plans.yaml

#### Run test per plan
maestro test maestro/flows/suites/suite-free.yaml
maestro test maestro/flows/suites/suite-standard.yaml

#### Run Visual Regression (test → compare → report generation)
./maestro/scripts/visual-regression.sh run ai-character-image-generation

#### Update baseline
./maestro/scripts/visual-regression.sh save-baseline ai-character-image-generation
Explanation of Visual Regression Script

While details are omitted, maestro/scripts/visual-regression.sh is created as a script with multiple subcommands.

Main Subcommands
Command Description
run [flow] Batch execution of test → compare → report generation
save-baseline Save current screenshots as baseline
compare [flow] Compare existing test results with baseline
report [flow] Generate HTML report
list Display available flows and baseline states
cleanup Delete old test results (defaults to keeping latest 5)

Below is an excerpt of the command content defined.

run Command

Main command that runs E2E tests, performs screenshot comparison, and generates reports.

Processing Content:

  1. Clear maestro/screenshots then run Maestro
  2. If no flow specified, run full-flow.yaml
  3. Calculate diff ratio with comparison baseline (threshold exceeded is FAIL)
  4. Generate report even if failed (diff-results/{year}/{timestamp})
  5. Create link to latest result in diff-results/latest
#### Visual Regression of single flow
./maestro/scripts/visual-regression.sh run ai-character-image-generation

#### Visual Regression of all flows (runs full-flow.yaml)
./maestro/scripts/visual-regression.sh run
save-baseline Command

Saves the current screenshot as the baseline. Use this when you intentionally change the UI.

Processing Content:

  1. Fetch from latest test result (or maestro/screenshots)
  2. Normalize screenshot name and copy to maestro/baseline/{flow-name}/
#### Update baseline
./maestro/scripts/visual-regression.sh save-baseline ai-character-image-generation

Phase 6: CI/CD & Release

Introduction

Once development is complete, push to GitHub to run CI, review, and release.

Goal of this phase:

  • Configure CI with GitHub Actions
  • Staging distribution (Firebase App Distribution) by PR label
  • Automatic generation of store content from CHANGELOG
  • Store upload via store-upload.yml + Fastlane

CI

CI is automatically executed on PR creation and push (master/main/develop/release branches). Because it is a monorepo, I insert change detection to run Flutter CI only when there are changes in Sodalio/. Additionally, in the develop branch only, the operation includes automatic commit if there are formatting diffs.

Workflow Example
Code Example
.github/workflows/ci-flutter.yml
name: Flutter CI

on:
  push:
    branches:
      - master
      - main
      - develop
      - 'release/**'
    paths:
      - "Sodalio/**"
      - ".github/actions/**"
      - ".github/workflows/ci-flutter.yml"
  pull_request:
    branches:
      - master
      - main
      - develop
      - 'release/**'
    paths:
      - "Sodalio/**"
      - ".github/actions/**"
      - ".github/workflows/ci-flutter.yml"

permissions:
  contents: write # for auto-format commit on develop
  pull-requests: read

env:
  FLUTTER_VERSION: "3.32.4"

jobs:
  flutter:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Check changes
        id: changes
        uses: ./.github/actions/check-file-changes
        with:
          directory: Sodalio

      - name: Setup Flutter
        if: steps.changes.outputs.changed == 'true'
        uses: ./.github/actions/setup-flutter
        with:
          flutter-version: ${{ env.FLUTTER_VERSION }}

      - name: Install dependencies
        if: steps.changes.outputs.changed == 'true'
        working-directory: Sodalio
        run: flutter pub get

      - name: Format
        if: steps.changes.outputs.changed == 'true'
        working-directory: Sodalio
        run: dart format lib test

      - name: Commit formatted code (develop only)
        if: |
          github.event_name == 'push' &&
          steps.changes.outputs.changed == 'true' &&
          github.ref == 'refs/heads/develop'
        working-directory: Sodalio
        run: |
          git config --local user.email "action@github.com"
          git config --local user.name "GitHub Action"
          git add -A
          git diff --staged --quiet || (git commit -m "chore: auto-format code [skip ci]" && git push)

      - name: Format check
        if: steps.changes.outputs.changed == 'true'
        working-directory: Sodalio
        run: dart format --set-exit-if-changed lib test

      - name: Analyze
        if: steps.changes.outputs.changed == 'true'
        working-directory: Sodalio
        run: flutter analyze --no-fatal-infos --no-fatal-warnings

      - name: Test with coverage
        if: steps.changes.outputs.changed == 'true'
        working-directory: Sodalio
        run: flutter test --coverage

Screenshot 2026-01-18 9.35.22.png

Points for CI Acceleration
Settings Effect
paths Run CI only for directories with changes
Custom Actions Share Flutter setup and change detection
--no-fatal-infos --no-fatal-warnings Don't block information/warning levels
timeout-minutes: 30 Prevent long-running execution

Staging Distribution (Firebase App Distribution)

Before production release, I make a staging build and distribute it only when necessary.

  • Android: .github/workflows/staging-android.yml
  • iOS: .github/workflows/staging-ios.yml

Both are triggered by pull_request, but the actual build runs only when a label is assigned (cost reduction). Manual execution (workflow_dispatch) is also possible.

Labels used:

  • run-staging-build-android
  • run-staging-build-ios
Summary of Workflow Trigger Conditions
Workflow Trigger Note
ci-flutter.yml push / pull_request master/main/develop/release only
staging-android.yml pull_request / workflow_dispatch Build skipped without label
staging-ios.yml pull_request / workflow_dispatch Build skipped without label
store-upload.yml workflow_dispatch Select iOS / Android individually
e2e-maestro.yml workflow_dispatch Manual execution only (macOS)

Create Release Branch

Once development is complete, create a release branch (operatable with main/master). I follow the operation of merging the developed content into this release branch, and creating a PR from release→main branch to perform follow-up work.

Code Example
#### Create release branch
git checkout -b release/1.1.0

#### Merge developed content
git merge feature/ai-image-generation

#### Create PR to main (if master operation, use --base master)
gh pr create --base main --title "Release 1.1.0"

CHANGELOG → Store Content Generation

Request to @claude

I follow the operation of requesting in @claude comments on the PR and splitting off a work PR for updating CHANGELOG and generating store content.

Comment Example
💬 PR Comment (@claude):
"Please update CHANGELOG.md and generate release notes for the App Store in multiple languages.
List only changes visible to users in release notes (new features/improvements/bug fixes).
Do not include internal implementation, refactoring, CI/dependency updates, test additions, or development-oriented changes.
Target languages: ja, en, ko, th, vi, id, es-419
Destination: Store/whats_new/{version}/{lang}.md"
Example of CHANGELOG.md
Document Example
CHANGELOG.md
#### Changelog

#### [1.1.0] - 2025-01-15

##### Added
- AI-powered character image automatic generation feature
- Image regeneration feature

##### Fixed
- Fixed performance issue with conversation history scrolling
- Fixed bug with image display on some devices

##### Changed
- Improved UI of character creation screen

Screenshot 2026-01-18 9.37.30.png

↓ Created branch
Screenshot 2026-01-18 9.38.24.png

Example of generated store content
Document Example
Store/whats_new/1.2.0/ja.md
【New Features】
・AI automatically generates character images! Create your own avatar from settings
・Regeneration is possible if you don't like it

【Improvements】
・Conversation history scrolling is smoother
・Character creation screen is now easier to use

【Fixes】
・Fixed image display issue on some devices

Pre-Release E2E Verification

Before automated deployment, run all local E2E tests in the release branch and check screenshot diffs. Also, e2e-maestro.yml is manual execution only to reduce costs, and is started from Actions when necessary (macOS runner).

I have created a custom command for Maestro in Claude, and execution is possible from there.

Screenshot 2026-01-18 9.42.01.png


Automated Deployment (Fastlane + GitHub Actions)

Uploading images, content, and binaries to App Store / Google Play is an operation of manually executing store-upload.yml via workflow_dispatch.
(I follow the flow of final check in release PR → execution from Actions)

Workflow Overview
Code Example
.github/workflows/store-upload.yml
name: Upload Store Metadata

on:
  workflow_dispatch:
    inputs:
      version:
        description: "Store version (x.y.z). Optional; defaults to pubspec.yaml."
        required: false
      version_code:
        description: "Android versionCode. Optional; defaults to pubspec.yaml."
        required: false
      # Platform selection
      upload_ios:
        description: "Upload to App Store Connect"
        type: boolean
        required: false
        default: true
      upload_android:
        description: "Upload to Google Play"
        type: boolean
        required: false
        default: true
      # Upload targets
      upload_binary:
        description: "Build and upload binary (IPA/AAB)"
        type: boolean
        required: false
        default: true
      upload_description:
        description: "Upload app description (overview content)"
        type: boolean
        required: false
        default: true
      upload_whats_new:
        description: "Upload release notes (update content)"
        type: boolean
        required: false
        default: true
      upload_screenshots:
        description: "Upload screenshots"
        type: boolean
        required: false
        default: true
Execution Options
Option Description
version Version number (obtains from pubspec.yaml if unspecified)
version_code Build number (obtains from pubspec.yaml if unspecified)
upload_ios Upload to App Store Connect
upload_android Upload to Google Play
upload_binary Build & upload binary (IPA/AAB)
upload_description Upload app description
upload_whats_new Upload release notes
upload_screenshots Upload screenshots

Screenshot 2026-01-18 9.43.39.png

Note:

  • iOS builds and signs on macOS runner (when upload_binary: true)
  • Android builds AAB on Ubuntu runner (when upload_binary: true)
  • The upload_* flag is converted internally to skip_* and passed to Sodalio/scripts/sync_store_metadata.sh and fastlane
  • Google Play uploads to draft in the production track (manual publishing)

Necessary Secrets are summarized in Sodalio/docs/ci-secrets.md.

Upload Targets

Upload targets for the store are 4 types:

Target Description iOS Android
Binary App本体 IPA AAB
Description App description description.txt full_description.txt
Release Notes Update content release_notes.txt changelogs/{version_code}.txt
Screenshots Published images screenshots/ images/phoneScreenshots/
Practical Use Cases
What to do Settings
Prepare content first upload_binary: false, upload_screenshots: false
Update screenshots only upload_binary: false, upload_description: false, upload_whats_new: false
Update binary only upload_description: false, upload_whats_new: false, upload_screenshots: false
Binary build locally

Building on GitHub Actions is possible, but since iOS takes time, building locally → directly uploading with fastlane is often used.

Version Specification
  • version / version_code input has priority
  • If unspecified, extracts from version: x.y.z+code in pubspec.yaml
Metadata Management

Store metadata is managed centrally in the Store/ directory, and converted to fastlane format upon upload:

Example Structure
Store/
├── description/
│   └── current/
│       ├── ja.md    # Overview content (Japanese)
│       ├── en.md    # Overview content (English)
│       └── ...
├── whats_new/
│   ├── 1.0.0/
│   │   └── ja.md, en.md, ...
│   └── 1.1.0/       # Update content (version-specific)
│       └── ja.md, en.md, ...
└── assets/
    └── screenshots/ # Screenshots
        └── ja/current/
            ├── ios/
            └── android/

Upon upload, Sodalio/scripts/sync_store_metadata.sh synchronizes Markdown in Store/ to fastlane format (Sodalio/ios/fastlane/metadata / Sodalio/android/fastlane/metadata/android, etc.).

Benefits:

  • Managed with Markdown
  • Track change history in Git
  • Save update content per version
  • If ios/ / android/ directories are missing, ja/current/ is used as common images.

Deploy Flow


👤 Human Decision Points

# Decision Item Timing
1 Final confirmation of store content After release note generation
2 Judgment to execute store upload Before executing workflow_dispatch

Phase 7: Operation/Improvement

Introduction

After release, enter the operation phase. Use AI here too to make continuous improvements.

Goal of this phase:

  • Crash monitoring and automatic Issue creation with Crashlytics
  • Improvement proposals via GA analysis
  • Accumulation and utilization of learning

Overall Operation Flow

Schedule List
Job Schedule Description
Crashlytics Daily Everyday JST 0:30 Early detection of new crashes
GA Weekly Report Mon JST 9:00 Weekly KPI report
Crash Weekly Summary Mon JST 9:00 Crash trend summary
Learnings Mon JST 11:00 Learning analysis

Mechanism of @claude mention (Claude Code Action)

Claude Code Action plays an important role in the automation of the operation phase.

What is Claude Code Action?

Claude Code Action is a GitHub Action that allows calling Claude by mentioning @claude in GitHub Issues or PRs.

Features:

  • Triggered simply by mentioning @claude in Issue/PR comments
  • Answers with understanding of the repository's codebase
  • Capable of code analysis, fix proposals, Issue creation, etc.
Why does mention of @claude trigger Claude?

📖 Details: Claude Code Action Official Repository


GA Analysis → Weekly Report → Claude Analysis

Screenshot 2026-01-16 20.30.03.png

Mechanism

Every Monday (JST 9:00), a GA weekly report is posted to a GitHub Issue, and automation up to analysis/improvement proposal is achieved by including @claude in the comment.

Weekly Report Method

GA reports are posted in a weekly Issue. By making it weekly instead of daily, noise is reduced and trends are easier to see.

[GA] Weekly Report 2025-W03
├─ 📊 Weekly Summary (Aggregation for 1 week)
├─ 📈 Daily Trend (Mini chart)
├─ 📱 Per Platform
└─ 🎯 Per Event (In descending order of change)
Report Content
Section Content
💡 This week's highlight Automatically detects and emphasizes indicators changing by over 30%
📈 Daily transition Visualization of 1-week transition with mini bar charts
KPI Summary Active users, new users, sessions, engagement rate (compared to previous week)
Per Platform KPI per iOS / Android
Per Event Event occurrence counts (sorted in descending order of change)
Report Output Example
Report Example
#### 📊 GA Weekly Report

**Period**: 2025-01-13 〜 2025-01-19 (Previous week: 2025-01-06 〜 2025-01-12)

##### 💡 This week's highlight

- 📈 **Active Users** increased significantly by +35% compared to the previous week
- 🎯 Event "**send_message**" increased sharply by +52% compared to the previous week

##### 📈 Daily transition

**Active Users**: ▁▃▅▇█▇▅ (120〜450)
**Sessions**: ▃▅▇█▇▅▃ (200〜680)

##### KPI Summary

| Indicator | This week | Prev. week | Change | Trend |
| --- | ---: | ---: | ---: | :---: |
| Active Users | 2,450 | 1,815 | +35% | 📈 |
| New Users | 320 | 280 | +14% | ↗️ |
| Sessions | 4,200 | 3,800 | +11% | ↗️ |
| Engagement Rate | 68.5% | 65.2% | +3.3% | ➖ |
Required Settings
  • Enable Google Analytics Data API (GCP)
  • Add Service Account to GA property as Viewer (GA Access Management)
    • GA permissions are granted via GA access management, not IAM
  • Set GA_PROPERTY_ID in GitHub Actions Variables
  • Labels automatically created by script (type/ga-report, env/prod)
Analysis Request to Claude

By including @claude and analysis instructions at the end of the report comment, Claude Code Action is triggered simultaneously with report posting.

---

@claude Please analyze this report and tell me the following:
1. **Notable trends**: Trends readable from numeric changes
2. **User behavior changes**: What can be inferred from event data
3. **Improvement actions**: Considerations for next week

Crash Monitoring → Automatic Issue → Claude Analysis

Mechanism

With GitHub Actions, check Crashlytics everyday and automatically create new crashes as GitHub Issues. Through threshold filtering and automatic priority assignment, noise is reduced and response priority is clarified.

Improvement Points
Function Description
🚦 Automatic priority calculation Automatically judge Critical/High/Medium/Low from impacted user count and occurrence count
🔢 Threshold filter Skips crashes below the specified threshold (noise reduction)
📋 Table format Formats Issue body to be easy to see
Automatic Priority Calculation Logic
Score = (Impacted User Count × 10) + Occurrence Count

Critical (🔴): Score >= 100 or Users >= 10
High (🟠): Score >= 30 or Users >= 5
Medium (🟡): Score >= 10 or Users >= 2
Low (🟢): Other
How to Get Crashlytics Data

Firebase Crashlytics data is obtained via BigQuery API. You need to set up Crashlytics → BigQuery export in advance.

Required Settings:

  • Firebase Service Account JSON (set in GitHub Secrets)
  • Enable Crashlytics → BigQuery Export (Firebase Console)
  • Grant BigQuery Data Viewer permission to Service Account (GCP IAM)
  • Target app settings (FIREBASE_PROJECT_ID / CRASHLYTICS_APPS_JSON)
  • MONITORING_PAT (GitHub PAT, for @claude trigger)
  • Labels automatically created by script (type/crash, env/prod, priority/*)

Threshold Settings (Environment Variables):

Env Var Default Description
CRASH_MIN_USER_COUNT 1 Minimum impacted user count
CRASH_MIN_EVENT_COUNT 1 Minimum occurrence count
Workflow
Code Example
.github/workflows/issue-monitoring.yml
name: Issue Monitoring (Crashlytics/GA)

on:
  schedule:
    # Crashlytics: Everyday JST 0:30 (Early detection of new crashes)
    - cron: '30 15 * * *'
    # GA + Crash Summary: Weekly Mon JST 9:00 (Weekly report)
    - cron: '0 0 * * 1'
    # Learnings: Weekly Mon JST 11:00 (Learning analysis)
    - cron: '0 2 * * 1'
  workflow_dispatch:
    inputs:
      run_ga:
        description: 'Run GA Weekly Report'
        type: boolean
        default: false
      run_crash:
        description: 'Run Crashlytics Daily Issues'
        type: boolean
        default: false
      run_crash_summary:
        description: 'Run Crashlytics Weekly Summary'
        type: boolean
        default: false
      run_learnings:
        description: 'Run Weekly Learnings Analysis'
        type: boolean
        default: false

env:
  # Crashlytics Threshold Settings (Noise Reduction)
  CRASH_MIN_USER_COUNT: '1'
  CRASH_MIN_EVENT_COUNT: '1'

jobs:
  crashlytics:
    name: Crashlytics Daily Issues
    if: |
      (github.event_name == 'workflow_dispatch' && github.event.inputs.run_crash == 'true') ||
      (github.event_name == 'schedule' && github.event.schedule == '30 15 * * *')
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - name: Create Crashlytics Issues
        env:
          FIREBASE_SERVICE_ACCOUNT_JSON: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_JSON }}
          GITHUB_TOKEN: ${{ secrets.MONITORING_PAT }}
        run: node scripts/monitoring/crashlytics_daily_issues.js

↓ Crash analysis CI screen
Screenshot 2026-01-18 13.11.25.png

Example of Automatically Created Issue
Issue Example
#### [Crash][Prod] 🟠 NullPointerException at ChatScreen.build

Crashlytics Issue ID: abc123

#### 🟠 Priority: High

##### Overview

| Item | Value |
| --- | --- |
| Platform | Android |
| Exception | `NullPointerException` |
| Subtitle | ChatScreen.build (line 42) |
| Impacted Users | **15** |
| Occurrence Count | **42** |
| Impacted Version | 1.2.3 |

##### Timeline

- First occurred: 2025-01-14 10:23:45
- Latest occurred: 2025-01-15 08:15:32
- Target period (JST): 2025-01-15

🔗 [Check details on Crashlytics](https://console.firebase.google.com/...)
Analysis Request to Claude (Include in Issue Body)

By including @claude and analysis instructions at the end of the Issue body, Claude Code Action is triggered simultaneously with Issue creation.

Comment Example
---

@claude Please analyze this crash:
**Analysis Procedures:**

1. Identify error type from the exception name/subtitle above
2. Search codebase of this repo to find related spots
3. Determine priority from impacted users/occurrence count

**Response Format:**

- 🔍 Cause Guess: (Reasonable cause from error content)
- 📍 Related Code: (Likely files/function names)
- ⚡ Priority: High/Medium/Low (with reason)
- 🛠️ Fix Strategy: (Concrete fix approach)
Example of Claude Analysis Comment
Comment Example
#### Crash Analysis

- 🔍 **Cause Guess**: Highly likely accessing `messages` list while it is null inside `ChatScreen.build`. It is presumed to occur if build is called while fetching data asynchronously.

- 📍 **Related Code**: `lib/screens/chat_screen.dart:42` vicinity where `ListView.builder` accesses `messages.length`

- ⚡ **Priority**: **High** - Impacts 15 users, continuously occurring, risk of impact expansion if left alone

- 🛠️ **Fix Strategy**:
  1. Add guard for case when `messages` is null
  2. Or properly handle loading/error/data with `AsyncValue` pattern
  3. Test addition: Test case where messages is null/empty

Weekly Crash Summary

Every Monday, automatically generate a weekly summary that summarizes the crash trend for one week.

Mechanism
Summary Content
Section Content
💡 This week's highlight Crash trend (increase/decrease), resolution status
📊 Statistical Summary Unique Issues, total occurrences, impacted users (compared to prev. week)
📱 Per Platform Statistics per iOS / Android
🔝 Top Crashes Top 5 ordered by impacted user count
📋 GitHub Issue Status Resolved this week / Currently Open
Summary Output Example
Report Example
#### 🔥 Crash Weekly Summary

**Period**: 2025-01-13 〜 2025-01-19

##### 💡 This week's highlight

- 📉 Impacted user count decreased compared to prev. week
- ✅ Resolved **3** crash Issues this week
- ⏳ **5** crash Issues currently pending

##### 📊 Statistical Summary

| Indicator | This week | Prev. week | Change | Trend |
| --- | ---: | ---: | ---: | :---: |
| Unique Issues | 8 | 12 | -4 (-33%) | 📉 |
| Total occurrences | 156 | 245 | -89 (-36%) | 📉 |
| Impacted Users | 42 | 68 | -26 (-38%) | 📉 |

##### 🔝 Top Crashes (Ordered by Impacted User Count)

###### iOS

| # | Issue | Users | Occurrences |
| --- | --- | ---: | ---: |
| 1 | `NullPointerException at ChatScreen...` | 15 | 42 |
| 2 | `IndexOutOfBoundsException in List...` | 8 | 23 |

I also use @claude in the weekly report to get analysis.

Accumulation of Learning (LEARNINGS.md)

Accumulate learnings obtained in operation in LEARNINGS.md. Introduce a mechanism where automatic update PRs are created weekly.

Mechanism for Automatic Update

Simple design where you create an Issue with a script and leave analysis and PR creation to @claude.

Point: By leaving natural analysis to Claude instead of parsing comments with regex, you can extract more flexible and higher-quality learning.

Workflow Settings

Added weekly job to issue-monitoring.yml:

Code Example
.github/workflows/issue-monitoring.yml
learnings:
  name: Weekly Learnings Issue
  if: |
    (github.event_name == 'workflow_dispatch' && github.event.inputs.run_learnings == 'true') ||
    (github.event_name == 'schedule' && github.event.schedule == '0 2 * * 1')
  runs-on: ubuntu-latest
  steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-node@v4
      with:
        node-version: '20'
    - name: Create Learnings Issue
      env:
        GITHUB_TOKEN: ${{ secrets.MONITORING_PAT }}
      run: node scripts/monitoring/learnings_weekly_analysis.js
Example of Automatically Created Issue
Issue Example
#### Weekly Learning Analysis Request

Extract learnings from Crash Issues closed in 2025-W03,
and update LEARNINGS.md.

##### Target Issues (2)

- #42: [Crash][Prod] 🟠 NullPointerException at ChatScreen.build
- #58: [Crash][Prod] 🟡 IndexOutOfBoundsException in ListView

---

@claude Analyze the above Issues and create a PR to update LEARNINGS.md.
Example section of automatically generated LEARNINGS.md
Section Example
##### 2025-W03 (Auto-generated)

- **[#42](https://github.com/.../issues/42)**: NullPointerException at ChatScreen.build

  - Cause: Null access as build was called before async processing finished
  - Response: Properly handle loading/error/data with AsyncValue pattern

- **[#58](https://github.com/.../issues/58)**: IndexOutOfBoundsException in ListView
  - Cause: Insufficient list length check
  - Response: Add consistency check between itemCount and actual data
Example structure of LEARNINGS.md
Document Example
LEARNINGS.md
#### Accumulation of Learning

#### Learned from crashes

##### 2025-01: Frequent crashes in non-null-safe areas
- **Problem**: NullPointerException because build was called before async processing finished
- **Response**: Lint rule addition, thorough AsyncValue pattern
- **Issue**: #42

##### 2025-01: Insufficient error handling for async processing
- **Problem**: No feedback to user on API error
- **Response**: try-catch mandatory, common error display component
- **Issue**: #58

#### Learned from GA Analysis

##### Tutorial Completion Rate
- Optimal within 3 steps (abandonment rate rises above that)
- Skip button is required

##### Correlation with Retention Rate
- First chat completion rate strongly correlates with Day7 retention rate
- Should guide to the first chat in onboarding

#### Frequently pointed out in review

##### Forgetting dispose in Riverpod
- **Response**: Add dispose process to template

##### Insufficient Comments
- **Response**: Mandatory for complex logic (added to review checklist)
Reflection to CLAUDE.md

Reflect learnings to CLAUDE.md and leverage them for AI quality improvement.

CLAUDE.md (Added part)
#### Learned from Development Guidelines

##### Async Processing
- Use AsyncValue pattern
- Thoroughly check for null

##### Error Handling
- try-catch is mandatory
- Don't forget feedback to the user

👤 Human Decision Points

# Decision Item Timing
1 Select crash response method After Issue creation (referring to priority label)
2 Whether to implement improvement measures After checking GA weekly report (Monday)
3 Whether to merge learning PR After weekly PR creation (Monday)
Choices for Response Method

Crash Response:

  • 🔴 Critical → Immediate response
  • 🟠 High → Respond within the week
  • 🟡 Medium → Consider in next sprint
  • 🟢 Low → To Backlog
  • Request fix to @claude

Improvement Measures:

  • Execute → Loop to planning phase
  • Pending → To Backlog
  • Rejected → Record reason

Loop from Operation → Planning

Feedback learnings and data obtained from operations to the next feature development (planning phase).

Flow Example
Operation
 │
 ├─ Crash analysis → Bug fix (according to priority)
 │
 ├─ GA weekly analysis → Improvement measure planning
 │
 ├─ Weekly summary → Trend comprehension / Resource allocation
 │
 └─ Accumulation of learning → CLAUDE.md update
          │
          ▼
       Planning (Next feature development)

Summary (Operation Phase)

By utilizing AI and automation even in the operation phase:

  1. Early discovery/analysis of crashes: Automatic Issue creation + automatic priority assignment + Claude analysis
  2. Weekly trend comprehension: GA weekly report + Crash weekly summary
  3. Data-driven improvement: Weekly report + Claude proposal
  4. Accumulation of knowledge: LEARNINGS.md → CLAUDE.md

This realizes continuous quality improvement and efficient operation.



Summary (Overall)

In this article, I introduced how to incorporate AI into the entire development pipeline to achieve both "speed" and "quality" even in individual development.
What is important is to thoroughly divide roles where humans concentrate on judgment, and AI is left with work.

There is no need to perfectly spin everything from the beginning.
It is realistic to incorporate partially from phases you feel are bottlenecks (planning, review, operation, etc.) and gradually grow it into a "pipeline that suits you."

Once you build this flow, you can continue to grow your app while continuously improving it even as an individual.
By all means, please customize it according to your development style and connect it to your next release.

Discussion