agentleFS
Poorgramer-ZackPoorgramer-Zack/flutter-agent-panel/AGENTS.md

flutter-agent-panel

AGENTS.md37 starsChanged 8 months agoMITView on GitHub

Generated: 2026-01-08 Updated: 2026-04-15 Flutter: 3.41.4 (via FVM) lean_builder build → dart format --set-exit-if-changed . → flutter analyze CI uses --no-fatal-infos for analyze, but strict locally.

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Always use .copyWith() for immutable updates

    line 48
  2. Distinctive:

    No Android/iOS directories - configured for Windows, macOS, Linux only.

    line 104

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

FLUTTER AGENT PANEL - PROJECT KNOWLEDGE BASE

Generated: 2026-01-08 Updated: 2026-04-15 Flutter: 3.41.4 (via FVM)

OVERVIEW

Cross-platform desktop terminal aggregator with AI agent integration. Built with Flutter + shadcn_ui, using BLoC/HydratedBloc for state persistence.

STRUCTURE

flutter_agent_panel/
├── lib/
│   ├── main.dart              # Entry: error handling, HydratedStorage init
│   ├── app.dart               # Root widget: MultiBlocProvider, theming
│   ├── core/                  # Cross-cutting: services, router, l10n, extensions
│   ├── features/              # Feature modules (BLoC pattern)
│   │   ├── home/              # App shell layout
│   │   ├── info/              # About/Help dialogs
│   │   ├── settings/          # App configuration (851 lines)
│   │   ├── terminal/          # PTY management, themes
│   │   └── workspace/         # Multi-workspace organization
│   └── shared/                # Utils, constants, common widgets
├── packages/
│   ├── flutter_pty/           # FFI PTY bindings (ConPTY/POSIX)
│   └── xterm/                 # Terminal emulator core (60fps render)
└── assets/                    # Images, agent logos

WHERE TO LOOK

TaskLocationNotes
Add new featurelib/features/{name}/Create bloc/, models/, views/, widgets/
Modify theminglib/app.dartShadThemeData, colorScheme switching
Add localizationlib/core/l10n/ARB files, regenerate with flutter gen-l10n
Configure routinglib/core/router/app_router.dartAutoRoute, regenerate with lean_builder
Add servicelib/core/services/Singleton pattern, init in main.dart
Terminal renderingpackages/xterm/lib/src/ui/Custom RenderBox, pixel-aligned painting
PTY native codepackages/flutter_pty/src/C files per platform

CONVENTIONS

State Management

  • HydratedBloc for persistent state (workspace, settings)
  • Regular Bloc for ephemeral state (terminal instances)
  • Event/State in part files: {name}_event.dart, {name}_state.dart
  • Always use .copyWith() for immutable updates

UI Patterns

  • shadcn_ui components: ShadDialog, ShadSelect, ShadInput, ShadTooltip
  • Context extensions: context.theme, context.t (localization)
  • LucideIcons throughout
  • Gap widgets for spacing (not SizedBox)

Code Style

  • Single quotes for strings
  • Trailing commas required
  • Relative imports within lib/
  • @pragma('vm:prefer-inline') on hot paths (xterm painter)

ANTI-PATTERNS (THIS PROJECT)

ForbiddenReason
Direct list mutationUse .copyWith() or create new list
Heavy logic in build()Move to Bloc or extract methods
Inline sortingDelegate to Bloc events
Hardcoded stringsUse context.t localized strings
Manual mock edits*.mocks.dart are generated
flutter_pty_bindings_generated.dart editsAuto-generated by ffigen
Sub-pixel offsets in painterUse roundToDouble() for crispness
Blocking PTY calls on main isolateUse dedicated isolates

COMMANDS

# Setup
flutter pub get
dart run lean_builder build      # Generate routes (must run after any route/l10n change)
flutter gen-l10n                  # Generate l10n (rarely needed separately)

# Development
flutter run -d windows

# Build
flutter build windows --release
flutter build macos --release
flutter build linux --release

# Packages (run from package dir for ffigen)
flutter pub run ffigen --config ffigen.yaml  # Regenerate PTY bindings

DEV PIPELINE

lean_builder build → dart format --set-exit-if-changed . → flutter analyze

CI uses --no-fatal-infos for analyze, but strict locally.

NOTES

Desktop-Only

No Android/iOS directories - configured for Windows, macOS, Linux only.

FVM (Flutter Version Management)

This project uses FVM. The Flutter version is pinned in .fvmrc (3.41.4). CI workflows use kuhnroyal/flutter-fvm-config-action to auto-detect and use the correct version.

Generated Files (Excluded from Analysis)

analysis_options.yaml excludes:

  • packages/flutter_pty/**
  • packages/xterm/**
  • lib/core/l10n/**.dart
  • lib/core/router/**.gr.dart

Monorepo Structure

Uses Flutter workspace with local packages:

  • packages/xterm - forked/customized terminal emulator
  • packages/flutter_pty - native PTY bindings

Large File Hotspots

  • settings_dialog.dart (851 lines) - Tab-based settings UI
  • workspace_drawer.dart (541 lines) - Drag-drop with pin constraints
  • terminal_bloc.dart (430 lines) - Cross-platform shell handling

Platform-Specific Shell Logic

Terminal creation handles: PowerShell, pwsh, cmd, WSL, bash, zsh. See TerminalServiceImpl and TerminalBloc._createTerminalNode().

Inter-Feature Dependencies

workspace → terminal (TerminalConfig model)
settings → terminal (font/theme models)
terminal → flutter_pty, xterm packages

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.