agentleFS
fluttersdkfluttersdk/dusk/CLAUDE.md

dusk

CLAUDE.md3 starsChanged 15 days agoMITView on GitHub

Flutter package tapir (Dart 3.13+, Flutter 3.47+), a plugin of dowel. TapirDowelProvider contributes the tapir:* CLI commands and the tapir_* MCP tool descriptors, both over the ext.tapir.* VM Service extensions. A live check drives example/ (cd example && dart run tapir start --device=macos, then tapir:*, then stop). A change is not done while any of these is stale: CHANGELOG.md under ## [Unreleased], README.md, llms.txt, the matching doc/** page, and skills/tapir/. A behavioural or interface change updates all of them in…

  • Commits and pushes
  • In this repository2 other files it gives its agents.

The file

We split this CLAUDE.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. Distinctive:

    Before changing module boundaries or a main flow, read ARCHITECTURE.md.

    line 36
  2. Very specific:

    No new entry under dependencies: in pubspec.yaml.

    line 51

≈ “Common” is an estimate: at least 1 in 5 of the 28,633 CLAUDE.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
CLAUDE.md
<!-- Generated by ac:claude-md-rules-creator on 2026-11-14. -->

Stack

Flutter package tapir (Dart 3.13+, Flutter 3.47+), a plugin of dowel. TapirDowelProvider contributes the tapir:* CLI commands and the tapir_* MCP tool descriptors, both over the ext.tapir.* VM Service extensions.

Commands

CommandWhen
flutter test --coverage --exclude-tags=integration --timeout=30sCI gate; writes coverage/lcov.info.
dart format .Zero diff (CI: --output=none --set-exit-if-changed .).
flutter analyze --no-fatal-infosZero issues.
python3 tool/check-docs.pyDocs gate: 0 issues.
flutter pub publish --dry-runArchive check, as CI runs it; exit 65 on warnings (a dirty git tree is one), 0 on a clean archive.
flutter test test/integration --tags=integrationManual CDP smoke run; needs Chrome.

A live check drives example/ (cd example && dart run tapir start --device=macos, then tapir:*, then stop).

Post-Change Checklist

A change is not done while any of these is stale: CHANGELOG.md under ## [Unreleased], README.md, llms.txt, the matching doc/** page, and skills/tapir/. A behavioural or interface change updates all of them in the same change. Then format, analyze, test and python3 tool/check-docs.py.

Development Flow

Red, green, refactor: write the failing test first and confirm it fails for the right reason. One long-lived branch, master; everything lands through a PR from a short kebab-case task branch (feat/snap-ref-dedup), one topic each.

  • Payloads grow, they do not change: new response keys are additive and absent on a healthy run, and a default never changes meaning. A verb that cannot confirm an effect says so.

Testing

  • Line coverage stays at or above 80%: lift it with a test, never by excluding code.

Architecture

  • The in-app half (lib/src/extensions/, most of lib/src/utils/, TapirPlugin, RefRegistry) imports Flutter; the host half (commands/, perf/, cdp/, tapir_dowel_provider.dart, cli_args.dart, bin/tapir.dart, lib/cli.dart) runs on the plain Dart VM, so it never imports Flutter, dart:ui or the lib/tapir.dart barrel.
  • Before changing module boundaries or a main flow, read ARCHITECTURE.md; update it in the same change when a boundary, flow or invariant moves.

Off-limits (frozen contracts)

These change only with a coordinated bump across tapir, magic and wind_kit:

  1. TapirSnapshotEnricher typedef: String? Function(Element, RefRegistry).
  2. TapirNavigateAdapter typedef: Future<bool> Function(String route).
  3. TapirPlugin.install() and TapirPlugin.registerNavigateAdapter() signatures, and the TapirPlugin.enrichers live-read list that magic appends to.
  4. RefRegistry public signatures: register, lookup, registerQuery, lookupQuery, disposeAll, resetForTesting. Adding statics (bind, lookupBinding, rebind) is not a signature change.
  5. The TapirActionabilityException reason substrings agents branch on: "defunct (element no longer mounted)" and the second defunct text ("... no longer attached to a render object"), "not enabled", "zero rect", "off-viewport (rect=..., viewport=...)", "not stable (rect changed by Xpx)", "obscured by other widget (top=...)".
  6. The actionability-gate evaluation order: (0) defunct preflight, (1) enabled, (2) zero rect, (3) off-viewport (auto showOnScreen under a Scrollable), (4) not stable (2-frame drift above 0.5px; --no-checkStable), (5) receives events (hit test reaches the target or a descendant; --no-checkReceivesEvents). New checks append. Step 5 reports confirmed / indeterminate / skipped; the report may grow, the order and substrings may not.
  7. The e<N> and q<N> token spaces are disjoint: never mint e<N> from find/observe, nor q<N> from snap.
  8. The original MCP tool names (tapir_snap, tapir_tap, tapir_screenshot, tapir_hover, tapir_drag, tapir_type) and their ext.tapir.* methods.
  9. install.yaml: load-bearing for plugin:install; keep its plugin_name and its post_install bootstrap message. The tapir executable behind dart run tapir <cmd> is mapped by executables: in pubspec.yaml, not in install.yaml.
  10. No new entry under dependencies: in pubspec.yaml.

Key Gotchas

MistakeFix
flutter pub get or a macOS build of example/ changes example/pubspec.lock and example/macos/Runner.xcodeproj/project.pbxprojRestore both before committing.
A tapir:* command run in a git worktree (they sit under .claude/worktrees/, inside the main checkout) before the worktree has a session of its ownRun dowel start in the worktree, or pass --state=<path>, first. Without a session, dowel falls back to the main checkout's recorded app; sessionOwnershipError lets that through when the app's project root encloses the worktree, so the command drives the main checkout's app and reports success (an app started from example/ is refused instead).
A release build that registers ext.tapir.*Wrap TapirPlugin.install() in if (!kReleaseMode), not kDebugMode: a profile build is what tapir:perf_run measures. --dart-define=TAPIR_DISABLE=1 skips registration; TAPIR_FORCE_FRAMES=false turns off the frame wake.
A count of commands, tools or extensions in prose (README, llms.txt, doc/**, the skill, this file)Name verbs; test/tapir_dowel_provider_mcp_tools_test.dart holds the numbers.

Release

  1. release: X.Y.Z PR: bump the version stamps and promote ## [Unreleased] to ## [X.Y.Z] - YYYY-MM-DD with its footer link.
  2. Stamps: pubspec.yaml, server.json (guarded by a test), example/pubspec.lock and the ^X.Y.Z install snippets in doc/getting-started/installation.md. Grep the old version before opening the PR. The skill keeps its own version: (and the stamp comment under its frontmatter) in skills/tapir/SKILL.md; bump it by hand with the release.
  3. After it merges, tag the merge commit with the bare version: git tag X.Y.Z && git push origin X.Y.Z. publish.yml validates the tag, the stamps, the dry-run and 160/160 pana points, publishes through OIDC, creates the GitHub Release, mirrors the skill to the skill registry and publishes server.json to the MCP registry (the mcp-registry job, stable tags only; the registry holds a version once, so a re-run after success fails with "already exists").
  4. A recovery after a failed Validate is forward: delete the tag, fix on a PR, tag the new merge commit.

CI

master is protected; the required checks are Lint & Test (ci.yml), Changelog (changelog.yml) and Internal Links (docs-link-check.yml, which also runs an external link pass on Mondays).

Style

  • final class for new concrete types. Docblocks state a contract or a failure mode; none on trivial getters.
  • Numbered step comments (// 1.) in handlers with three or more phases.
  • Prose in docs, comments and CHANGELOG is UK English with no em dash or en dash.

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.