flutter-agent-panel
Copilot instructions36 starsChanged 8 months agoMITView on GitHub
In this repositoryOne other file it gives its agents.
- AGENTS.mdAGENTS.md
The file
We split this copilot-instructions.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 54
Do not edit generated files directly:
- Very specific: line 64
use Gap instead of SizedBox for spacing
- Very specific: line 65
use flutter_screenutil (.w/.h/.sp/.r) for fixed dimensions
- Very specific: line 71
Import style in existing project docs: prefer relative imports inside feature folders.
≈ “Common” is an estimate: at least 1 in 5 of the 3,950 Copilot instructions 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.
Files
Copilot Instructions for flutter_agent_panel
Build, lint, and test commands
Root app (desktop Flutter)
fvm flutter pub get
fvm dart run lean_builder build --delete-conflicting-outputs
fvm flutter gen-l10n
fvm dart format --set-exit-if-changed .
fvm flutter analyze
fvm flutter build windows --release
fvm flutter build macos --release
fvm flutter build linux --releasePre-push checks used by repository hook
fvm flutter analyze
fvm dart format --set-exit-if-changed lib/Tests
- Root
test/is currently empty. - Active tests are in
packages/xterm/test/.
# Run all xterm tests
cd packages/xterm
fvm flutter test
# Run a single test file
fvm flutter test test/src/core/escape/parser_test.dartHigh-level architecture
- App bootstrap (
lib/main.dart) initializes config/log directories, crash logging, app logger, global Flutter/zone error handlers,window_manager, and HydratedBloc storage at~/.flutter-agent-panel/storagebeforerunApp. - App composition (
lib/app.dart) uses three core blocs:WorkspaceBloc(Hydrated): persisted workspaces and serializedTerminalConfig.SettingsBloc(Hydrated): persisted theme/font/locale/shell/agent settings.TerminalBloc(non-hydrated): live PTY + terminal runtime state.
- Routing (
lib/core/router/app_router.dart) is nested:AppShellView (/)→WorkspaceWrapperView (/workspace)→WorkspaceView (/:workspaceId)→TerminalView (terminal/:terminalId). - Cross-feature runtime flow:
WorkspaceViewissuesSyncWorkspaceTerminalsfrom persisted workspace configs.TerminalBloccreates/disposes/restartsTerminalNode(xtermTerminal+IsolatePty) and tracks pending/restarting/error states.WorkspaceBlocstays as source of truth for terminal metadata;TerminalBlocowns non-serializable runtime objects.
- Repo is a Flutter workspace with local packages:
packages/flutter_pty: native PTY bindings (ConPTY/POSIX).packages/xterm: terminal emulation/rendering engine.
Key conventions specific to this repository
- Do not edit generated files directly:
lib/core/router/app_router.gr.dart(regenerate withfvm dart run lean_builder build)lib/core/l10n/app_localizations*.dart(regenerate withfvm flutter gen-l10n)packages/flutter_pty/lib/src/flutter_pty_bindings_generated.dart(regenerate withfvm flutter pub run ffigen --config ffigen.yamlfrompackages/flutter_pty)*.mocks.dartfiles
- State updates are immutable: copy list/map first, then emit with
copyWith; avoid direct list mutation in bloc handlers. AppSettings.copyWithuses explicit clear flags (clearCustomTerminalThemeJson,clearSelectedCustomShellId,clearAppFontFamily) for nullable fields.- UI code relies on context extensions (
context.t,context.theme,context.colorScheme) fromlib/core/extensions/context_extension.dart. - UI strings should go through localization (
assets/l10n/*.arb+fvm flutter gen-l10n), not hardcoded text. - Layout/style conventions used across feature guides:
- use
Gapinstead ofSizedBoxfor spacing - use
flutter_screenutil(.w/.h/.sp/.r) for fixed dimensions
- use
- Terminal spawning conventions are centralized in
TerminalBloc._createTerminalNode:- environment merge includes
TERM=xterm-256colorandCOLORTERM=truecolor - shell-specific wrapping differs for PowerShell / cmd / WSL / bash
- PTY I/O runs through
IsolatePty(avoid blocking main isolate)
- environment merge includes
- User config and runtime artifacts are stored under
~/.flutter-agent-panel(themes, schema, logs, hydrated storage). - Import style in existing project docs: prefer relative imports inside feature folders; use absolute imports for
core/andshared/.
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
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.

