# lbyxunxunnini/flutter-forge architecture

> Architecture diagram of the GitHub repository lbyxunxunnini/flutter-forge, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lbyxunxunnini/flutter-forge
- Repository: https://github.com/lbyxunxunnini/flutter-forge

## Overview

Flutter Forge is an AI-agent workflow and decision layer for Flutter projects, not a code generator. A user request enters through the skill’s trigger and orchestration rules, is routed to a task mode, and—when needed—passes through context discovery, requirements and design decisions, implementation, and verification. Project guardrails preserve conventions across tasks. The graph reflects README-documented capabilities as well as sampled controller and project-scanning code; most reference workflows are unsampled, so uncertain internal call wiring is omitted.

Main entry points: [`scripts/controller.py`](https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/controller.py) (Phase controller), [`SKILL.md`](https://github.com/lbyxunxunnini/flutter-forge/blob/main/SKILL.md) (Skill entry), [`scripts/project_snapshot.py`](https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/project_snapshot.py) (Project scan), [`scripts/init_project_guardrails.py`](https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/init_project_guardrails.py) (Guardrails setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_coordination["Task coordination"]
  node_skill["Skill entry<br/>[SKILL.md]"]
  node_controller["Phase controller<br/>[controller.py]"]
  node_routing["Task routing<br/>[trigger_words.md]"]
  node_gates["Phase gates<br/>[gate_check.py]"]
end

subgraph group_context["Project context"]
  node_context_scan["Project scan"]
  node_stack_scan["Stack detection"]
  node_guardrails_init["Guardrails setup"]
  node_guardrails["Project guardrails"]
  node_memory_protocol["Session memory<br/>[memory_protocol.md]"]
end

subgraph group_workflow["Delivery workflow"]
  node_requirements["Requirement analysis"]
  node_design["UI design<br/>[ui_designer.md]"]
  node_architecture["Architecture decisions"]
  node_implementation["Flutter implementation<br/>[page_engineer.md]"]
  node_verification["Verification<br/>[verify_agent.md]"]
end

subgraph group_capabilities["Agent capabilities"]
  node_flutter_skills["Flutter skill library"]
  node_session_hook["Session bootstrap"]
end

node_user(("Flutter developer"))

node_user -->|"submits request"| node_skill
node_skill -->|"routes task"| node_routing
node_skill -->|"coordinates phases"| node_controller
node_controller -->|"checks write gate"| node_gates
node_controller -->|"assembles context"| node_context_scan
node_context_scan -->|"detects stack"| node_stack_scan
node_guardrails_init -->|"uses project signals"| node_context_scan
node_guardrails_init -->|"creates constraints"| node_guardrails
node_context_scan -->|"finds project rules"| node_guardrails
node_controller -->|"maintains session"| node_memory_protocol
node_controller -->|"dispatches role"| node_requirements
node_controller -->|"dispatches role"| node_design
node_controller -->|"dispatches role"| node_architecture
node_controller -->|"dispatches role"| node_implementation
node_controller -->|"dispatches role"| node_verification
node_implementation -.->|"delegates Flutter task"| node_flutter_skills
node_session_hook -.->|"prints bootstrap hint"| node_skill

click node_skill "https://github.com/lbyxunxunnini/flutter-forge/blob/main/SKILL.md"
click node_controller "https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/controller.py"
click node_routing "https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/trigger_words.md"
click node_gates "https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/gate_check.py"
click node_context_scan "https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/project_snapshot.py"
click node_stack_scan "https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/flutter_stack_scan.py"
click node_guardrails_init "https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/init_project_guardrails.py"
click node_guardrails "https://github.com/lbyxunxunnini/flutter-forge/tree/main/memory"
click node_requirements "https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/requirement_analyst.md"
click node_design "https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/ui_designer.md"
click node_architecture "https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/architecture_designer.md"
click node_implementation "https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/page_engineer.md"
click node_verification "https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/verify_agent.md"
click node_memory_protocol "https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/memory_protocol.md"
click node_flutter_skills "https://github.com/lbyxunxunnini/flutter-forge/tree/main/flutter-skills"
click node_session_hook "https://github.com/lbyxunxunnini/flutter-forge/tree/main/hooks"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_skill,node_controller,node_routing,node_gates toneBlue
class node_context_scan,node_stack_scan,node_guardrails_init,node_guardrails,node_memory_protocol toneAmber
class node_requirements,node_design,node_architecture,node_implementation,node_verification toneMint
class node_flutter_skills,node_session_hook toneRose
class node_user toneIndigo
```

## Components

### Task coordination

- [Skill entry](https://github.com/lbyxunxunnini/flutter-forge/blob/main/SKILL.md): `SKILL.md`
- [Phase controller](https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/controller.py): `scripts/controller.py`
- [Task routing](https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/trigger_words.md): `references/trigger_words.md`
- [Phase gates](https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/gate_check.py): `scripts/gate_check.py`

### Project context

- [Project scan](https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/project_snapshot.py): `scripts/project_snapshot.py`
- [Stack detection](https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/flutter_stack_scan.py): `scripts/flutter_stack_scan.py`
- [Guardrails setup](https://github.com/lbyxunxunnini/flutter-forge/blob/main/scripts/init_project_guardrails.py): `scripts/init_project_guardrails.py`
- [Project guardrails](https://github.com/lbyxunxunnini/flutter-forge/tree/main/memory): `memory`
- [Session memory](https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/memory_protocol.md): `references/memory_protocol.md`

### Delivery workflow

- [Requirement analysis](https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/requirement_analyst.md): `references/roles/requirement_analyst.md`
- [UI design](https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/ui_designer.md): `references/roles/ui_designer.md`
- [Architecture decisions](https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/architecture_designer.md): `references/roles/architecture_designer.md`
- [Flutter implementation](https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/page_engineer.md): `references/roles/page_engineer.md`
- [Verification](https://github.com/lbyxunxunnini/flutter-forge/blob/main/references/roles/verify_agent.md): `references/roles/verify_agent.md`

### Agent capabilities

- [Flutter skill library](https://github.com/lbyxunxunnini/flutter-forge/tree/main/flutter-skills): `flutter-skills`
- [Session bootstrap](https://github.com/lbyxunxunnini/flutter-forge/tree/main/hooks): `hooks`

### Other components

- **Flutter developer**

## Connections

- Flutter developer → Skill entry: submits request
- Skill entry → Task routing: routes task
- Skill entry → Phase controller: coordinates phases
- Phase controller → Phase gates: checks write gate
- Phase controller → Project scan: assembles context
- Project scan → Stack detection: detects stack
- Guardrails setup → Project scan: uses project signals
- Guardrails setup → Project guardrails: creates constraints
- Project scan → Project guardrails: finds project rules
- Phase controller → Session memory: maintains session
- Phase controller → Requirement analysis: dispatches role
- Phase controller → UI design: dispatches role
- Phase controller → Architecture decisions: dispatches role
- Phase controller → Flutter implementation: dispatches role
- Phase controller → Verification: dispatches role
- Flutter implementation → Flutter skill library: delegates Flutter task
- Session bootstrap → Skill entry: prints bootstrap hint
