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
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
- Distinctive: line 36
Before changing module boundaries or a main flow, read ARCHITECTURE.md.
- Very specific: line 51
No new entry under dependencies: in pubspec.yaml.
≈ “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.
Files
<!-- 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
| Command | When |
flutter test --coverage --exclude-tags=integration --timeout=30s | CI gate; writes coverage/lcov.info. |
dart format . | Zero diff (CI: --output=none --set-exit-if-changed .). |
flutter analyze --no-fatal-infos | Zero issues. |
python3 tool/check-docs.py | Docs gate: 0 issues. |
flutter pub publish --dry-run | Archive 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=integration | Manual 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 oflib/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:uior thelib/tapir.dartbarrel. - 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:
TapirSnapshotEnrichertypedef:String? Function(Element, RefRegistry).TapirNavigateAdaptertypedef:Future<bool> Function(String route).TapirPlugin.install()andTapirPlugin.registerNavigateAdapter()signatures, and theTapirPlugin.enricherslive-read list that magic appends to.RefRegistrypublic signatures:register,lookup,registerQuery,lookupQuery,disposeAll,resetForTesting. Adding statics (bind,lookupBinding,rebind) is not a signature change.- The
TapirActionabilityExceptionreason substrings agents branch on:"defunct (element no longer mounted)"and the seconddefuncttext ("... 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=...)". - The actionability-gate evaluation order: (0) defunct preflight, (1) enabled, (2) zero rect, (3) off-viewport (auto
showOnScreenunder aScrollable), (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 reportsconfirmed/indeterminate/skipped; the report may grow, the order and substrings may not. - The
e<N>andq<N>token spaces are disjoint: never minte<N>fromfind/observe, norq<N>fromsnap. - The original MCP tool names (
tapir_snap,tapir_tap,tapir_screenshot,tapir_hover,tapir_drag,tapir_type) and theirext.tapir.*methods. install.yaml: load-bearing forplugin:install; keep itsplugin_nameand itspost_installbootstrap message. Thetapirexecutable behinddart run tapir <cmd>is mapped byexecutables:inpubspec.yaml, not ininstall.yaml.- No new entry under
dependencies:inpubspec.yaml.
Key Gotchas
| Mistake | Fix |
flutter pub get or a macOS build of example/ changes example/pubspec.lock and example/macos/Runner.xcodeproj/project.pbxproj | Restore 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 own | Run 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
release: X.Y.ZPR: bump the version stamps and promote## [Unreleased]to## [X.Y.Z] - YYYY-MM-DDwith its footer link.- Stamps:
pubspec.yaml,server.json(guarded by a test),example/pubspec.lockand the^X.Y.Zinstall snippets indoc/getting-started/installation.md. Grep the old version before opening the PR. The skill keeps its ownversion:(and the stamp comment under its frontmatter) inskills/tapir/SKILL.md; bump it by hand with the release. - After it merges, tag the merge commit with the bare version:
git tag X.Y.Z && git push origin X.Y.Z.publish.ymlvalidates 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 publishesserver.jsonto the MCP registry (themcp-registryjob, stable tags only; the registry holds a version once, so a re-run after success fails with "already exists"). - A recovery after a failed
Validateis 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 classfor 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.
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.

