agentleFS
Poorgramer-ZackPoorgramer-Zack/flutter-agent-panel/.github/copilot-instructions.md

flutter-agent-panel

Copilot instructions37 starsChanged 8 months agoMITView on GitHub

  • In this repositoryOne other file it gives its agents.

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
  1. Distinctive:

    Do not edit generated files directly:

    line 54
  2. Very specific:

    use Gap instead of SizedBox for spacing

    line 64
  3. Very specific:

    use flutter_screenutil (.w/.h/.sp/.r) for fixed dimensions

    line 65
  4. Very specific:

    Import style in existing project docs: prefer relative imports inside feature folders.

    line 71

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 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.

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

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 --release

Pre-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.dart

High-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/storage before runApp.
  • App composition (lib/app.dart) uses three core blocs:
    • WorkspaceBloc (Hydrated): persisted workspaces and serialized TerminalConfig.
    • 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:
    • WorkspaceView issues SyncWorkspaceTerminals from persisted workspace configs.
    • TerminalBloc creates/disposes/restarts TerminalNode (xterm Terminal + IsolatePty) and tracks pending/restarting/error states.
    • WorkspaceBloc stays as source of truth for terminal metadata; TerminalBloc owns 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 with fvm dart run lean_builder build)
    • lib/core/l10n/app_localizations*.dart (regenerate with fvm flutter gen-l10n)
    • packages/flutter_pty/lib/src/flutter_pty_bindings_generated.dart (regenerate with fvm flutter pub run ffigen --config ffigen.yaml from packages/flutter_pty)
    • *.mocks.dart files
  • State updates are immutable: copy list/map first, then emit with copyWith; avoid direct list mutation in bloc handlers.
  • AppSettings.copyWith uses explicit clear flags (clearCustomTerminalThemeJson, clearSelectedCustomShellId, clearAppFontFamily) for nullable fields.
  • UI code relies on context extensions (context.t, context.theme, context.colorScheme) from lib/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 Gap instead of SizedBox for spacing
    • use flutter_screenutil (.w/.h/.sp/.r) for fixed dimensions
  • Terminal spawning conventions are centralized in TerminalBloc._createTerminalNode:
    • environment merge includes TERM=xterm-256color and COLORTERM=truecolor
    • shell-specific wrapping differs for PowerShell / cmd / WSL / bash
    • PTY I/O runs through IsolatePty (avoid blocking main isolate)
  • 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/ and shared/.

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.