Borrowing it
Nothing to install: this file belongs to bladeofgod/flutter-ai-harness. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/bladeofgod/flutter-ai-harness/main/CLAUDE.mdgit clone --depth 1 https://github.com/bladeofgod/flutter-ai-harnessWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/bladeofgod/flutter-ai-harness/claude-md)<a href="https://agentmods.dev/instructions/bladeofgod/flutter-ai-harness/claude-md"><img src="https://agentmods.dev/badge/instructions/bladeofgod/flutter-ai-harness/claude-md.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.05892 | $0.05892 |
| Opus 5 | $0.02946 | $0.02946 |
| Sonnet 5 | $0.01178 | $0.01178 |
| Haiku 4.5 | $0.00589 | $0.00589 |
Grade C, and why
flutter-ai-harness CLAUDE.md scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
- 不执行 `rm -rf` 等破坏性命令。 How it starts
The opening of the file, as written. The whole thing — 297 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Flutter AI Harness 项目契约
本文件是仓库的权威工程契约。修改代码或文档前必须先读。其他工具入口可以摘要本文件,但不得覆盖本文件的规则。
项目目标
本仓库是一套 AI 原生工程 Harness,也是一套有明确架构取向的 Flutter 混合应用工作区。AI Agent 和开发者共同使用相同的架构规则、任务产物、执行命令与质量门禁。
仓库分两个阶段建设:
- 建立中立的 Harness 和仓库边界。
- 通过 Harness 设计并实现全新 Demo,让任务卡、Review、App 文档和项目 Memory 从真实工作中自然产生。
不得从其他应用复制业务代码、凭据、历史任务或私有依赖到本仓库。
技术栈
Flutter
- Flutter 3.41.9 / Dart 3.11
- 状态管理与轻量 DI:GetX 精简版 fork(公开 Git 源,固定 Commit)
- 路由:
go_router ^15.1.2 - 网络:
dio ^5.7.0+ Protocol Buffers^6.0.0 - 本地存储:
drift ^2.20.0+flutter_secure_storage ^9.2.2 - 不可变数据:Freezed
^3.0.0 - JSON 序列化:
json_serializable ^6.9.0 - 测试:
flutter_test+mocktail ^1.0.4+integration_test - Monorepo 编排:Melos
原生平台
- Android:Kotlin / Gradle
- iOS:Swift / Xcode / CocoaPods
Demo 固定采用本节技术栈,不在产品设计或任务拆解阶段重新选型。依赖在首个真实消费者出现时加入所属 Package 并锁定兼容版本,不为填充清单引入未使用依赖。
仓库结构
app/
├── apps/demo/
└── packages/
├── app_core/
├── app_data/
├── app_ui/
├── app_features/
├── app_media/
└── app_media_capture_bridge/
工作区随 Demo 实施逐步形成。不得为了填充目录而预先创建没有真实需求的业务抽象。
架构不变量
-
Domain Entity 或明确的 Value Object 是数据适配层进入业务层以及业务公共 API 之间唯一允许传递的数据类型。
-
app_core只能定义并处理传输中立的 Request、Response、Failure 和不透明 Payload,不得定义、import 或解析具体 Fixture Payload、Proto Message 或数据库 Row;这些具体类型及其解析必须留在app_data,不得进入 Feature、Controller 或 UI。MediaResourceId是唯一批准的聚焦基础设施 ID 例外:它只提供传输中立的闭合格式校验,不包含路径、URI、Native handle、文件行为或业务规则;Store、Resolver、媒体 metadata 和预览 API 不得继续下沉到app_core。 -
每个包只定义自己需要的接口,不建立中央万能契约包。
-
依赖方向保持单向。下图中
A -> B表示 Package A 可以 import Package B:apps/demo -> app_features, app_data, app_ui app_features -> app_data, app_core, app_ui, app_media, app_media_capture_bridge app_media -> app_core, app_ui app_media_capture_bridge -> 不依赖其他 Workspace Package app_data -> app_core app_core / app_ui -> 不依赖其他 Workspace Package -
Feature 不得 import 其他 Feature 的内部实现。
-
业务抽象接口放在
app_features/lib/api/,具体实现放在对应feature_xxx/api/;跨 Feature 交互只依赖抽象接口,并由统一 Registry 绑定实现。 -
app_data提供 Domain Entity、LocalDataSource、确定性 Fixture 及其 Transport,以及协议或持久化出现后的 Mapper/Adapter;不得承载页面、Controller 或 Feature 业务编排。 -
壳工程只负责模块与回调装配,不得 import Feature 实现类。
-
Controller 通过构造函数接收必需 API。服务定位器只允许出现在装配点或显式全局服务中。
-
只有在确实降低复杂度或保护真实边界时才新增抽象。
-
Native Consumer 直接依赖对应 Native Module;Flutter Consumer 通过聚焦的 Dart Client 和 Android/iOS Bridge Adapter 委托同一 Module。Host 只负责装配和注册,Native Module 不依赖 Flutter。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday Changed · +8 lines · +496 tokens per session 8ac404dde330
- 7d ago First seen · 289 lines · 5,396 tokens per session scan C 50eae0c6ff3e
flutter-ai-harness CLAUDE.md is an instructions file published in the GitHub repository bladeofgod/flutter-ai-harness (113 stars, last pushed 4d ago), licensed MIT. It adds 5,892 tokens to every session, about $0.0295 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
next.js AGENTS.md
AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.