Claude/add dart flutter support p01 rj#1055
Claude/add dart flutter support p01 rj#1055ritvij-saxena wants to merge 3 commits intoaffaan-m:mainfrom
Conversation
|
Analysis Failed
Troubleshooting
Retry: |
📝 WalkthroughWalkthroughAdded a Flutter/Dart feature set: new Changes
Sequence Diagram(s)sequenceDiagram
participant Dev as Developer (Repo)
participant Agent as Dart Build Resolver Agent
participant CLI as Flutter/Dart CLI
participant FS as File System
participant Tests as Test Runner
Dev->>Agent: invoke /flutter-build or trigger agent
Agent->>CLI: run `flutter analyze` / `dart analyze`
CLI-->>Agent: return analysis diagnostics
Agent->>FS: open files with errors
Agent->>Agent: determine minimal surgical fix
Agent->>FS: write updated file (rgba(0,128,0,0.5))
Agent->>CLI: re-run `flutter analyze`
CLI-->>Agent: new diagnostics
alt errors resolved
Agent->>CLI: run `flutter build` / `flutter test`
CLI->>Tests: execute build/tests
Tests-->>Agent: final status (PASS/FAIL)
else still failing
Agent->>Dev: report remaining errors and stop conditions
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR adds full Dart/Flutter language support to the ECC plugin — 5 rule files, 1 build-fixer agent, 3 commands, 1 skill, and manifest registration — matching the existing Kotlin, Go, Swift, and Rust packs. Previous review concerns (deprecated WebView API, Key findings:
Confidence Score: 4/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Developer invokes /flutter-build] --> B[dart-build-resolver agent]
A2[Developer invokes /flutter-review] --> C[flutter-reviewer agent]
A3[Developer invokes /flutter-test] --> D[Test runner + dart-build-resolver]
B --> E[flutter analyze\nflutter pub get\nbuild_runner]
C --> F[git diff inspection\npubspec / analysis_options\nSecurity pre-scan\nFull review checklist]
D --> G[flutter test --coverage\nfixing failures incrementally]
E -->|Errors| H{Fix loop\nmax 3 attempts}
H -->|Fixed| I[flutter analyze ✓]
H -->|Stuck| J[Stop & report to user]
F --> K[Severity report\nCRITICAL / HIGH / MEDIUM / LOW]
G --> L[Coverage report\ntarget ≥ 80%]
subgraph rules/dart/
M[coding-style.md]
N[patterns.md]
O[security.md]
P[testing.md]
Q[hooks.md]
end
subgraph skills/
R[dart-flutter-patterns/SKILL.md]
S[flutter-dart-code-review/SKILL.md]
end
C --> S
B --> S
D --> P
Reviews (4): Last reviewed commit: "fix(dart): address PR #1055 review comme..." | Re-trigger Greptile |
There was a problem hiding this comment.
13 issues found across 14 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="rules/dart/patterns.md">
<violation number="1" location="rules/dart/patterns.md:21">
P2: Repository example class implements an interface but omits required methods, making the sample non-compilable.</violation>
<violation number="2" location="rules/dart/patterns.md:169">
P2: Use-case example introduces an external dependency (`Uuid`) in logic that the doc frames as domain-layer code, conflicting with the stated clean-architecture boundary.</violation>
</file>
<file name="rules/dart/testing.md">
<violation number="1" location="rules/dart/testing.md:131">
P2: `Future<void>` methods are written as `async =>` with non-void expressions, creating return-type errors in the sample code.</violation>
</file>
<file name="rules/dart/coding-style.md">
<violation number="1" location="rules/dart/coding-style.md:47">
P2: Dart coding-style guidance incorrectly recommends `?.let`, a Kotlin idiom, which can mislead developers into writing non-standard/non-compiling Dart code.</violation>
<violation number="2" location="rules/dart/coding-style.md:141">
P2: Import guidance is internally contradictory: one rule bans relative imports while the next rule explicitly allows them for same-package `src` files.</violation>
</file>
<file name="README.md">
<violation number="1" location="README.md:223">
P2: PR updates some component totals but leaves other count sections stale, creating contradictory README numbers.</violation>
</file>
<file name="skills/dart-flutter-patterns/SKILL.md">
<violation number="1" location="skills/dart-flutter-patterns/SKILL.md:348">
P2: `cartTotal` uses `firstWhere` without a fallback, which can throw `StateError` when a cart item’s product is missing.</violation>
<violation number="2" location="skills/dart-flutter-patterns/SKILL.md:362">
P2: GoRouter auth redirect example is non-reactive to auth state changes because router refresh wiring is missing.</violation>
<violation number="3" location="skills/dart-flutter-patterns/SKILL.md:409">
P2: 401 refresh retry flow replays requests without a one-time retry guard, which can cause repeated retry loops.</violation>
</file>
<file name="AGENTS.md">
<violation number="1" location="AGENTS.md:3">
P2: AGENTS.md updates total agent counts but leaves the "Available Agents" inventory incomplete (missing Dart/Flutter agents), causing documentation-to-routing drift.</violation>
</file>
<file name="commands/flutter-review.md">
<violation number="1" location="commands/flutter-review.md:19">
P2: `/flutter-review` docs omit the required pre-review gate that build/test/lint/CI checks must be passing before review starts, making mandatory team workflow appear optional.</violation>
<violation number="2" location="commands/flutter-review.md:19">
P2: `/flutter-review` usage criteria omit the required rebase/merge-conflict resolution prerequisite, allowing review on non-mergeable diffs.</violation>
</file>
<file name="commands/flutter-build.md">
<violation number="1" location="commands/flutter-build.md:100">
P2: Documentation example mixes Cubit naming with Bloc-style `.add(event)` API, which can produce invalid auto-fix guidance.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.
AGENTS.md
Outdated
| # Everything Claude Code (ECC) — Agent Instructions | ||
|
|
||
| This is a **production-ready AI coding plugin** providing 30 specialized agents, 136 skills, 60 commands, and automated hook workflows for software development. | ||
| This is a **production-ready AI coding plugin** providing 31 specialized agents, 137 skills, 63 commands, and automated hook workflows for software development. |
There was a problem hiding this comment.
P2: AGENTS.md updates total agent counts but leaves the "Available Agents" inventory incomplete (missing Dart/Flutter agents), causing documentation-to-routing drift.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At AGENTS.md, line 3:
<comment>AGENTS.md updates total agent counts but leaves the "Available Agents" inventory incomplete (missing Dart/Flutter agents), causing documentation-to-routing drift.</comment>
<file context>
@@ -1,6 +1,6 @@
# Everything Claude Code (ECC) — Agent Instructions
-This is a **production-ready AI coding plugin** providing 30 specialized agents, 136 skills, 60 commands, and automated hook workflows for software development.
+This is a **production-ready AI coding plugin** providing 31 specialized agents, 137 skills, 63 commands, and automated hook workflows for software development.
**Version:** 1.9.0
</file context>
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@README.md`:
- Line 223: The README has an inconsistent agent count: change the directory
tree text "30 specialized subagents" to "31 specialized subagents" so it matches
the summary line "31 agents"; locate the string "30 specialized subagents" in
the README and update it (and any other occurrences of "30 specialized
subagents") to "31 specialized subagents" to keep counts consistent.
In `@rules/dart/coding-style.md`:
- Around line 46-48: The rule text incorrectly references Kotlin's `?.let`;
update the guidance to remove `?.let` and instead recommend Dart null-aware
operators and pattern matching—specifically mention `?.`, `??`, `if (x !=
null)`, and Dart 3 pattern matching as preferred alternatives to forced
unwrapping (`!`), and clarify the guidance about `late` (use nullable or
constructor initialization unless you can guarantee initialization before first
use). Ensure the phrase "Use `?.let` style" is replaced with Dart-appropriate
wording like "Use null-aware operators (`?.`, `??`) or pattern matching" and
keep the other bullet points about avoiding `!` and `late`.
In `@skills/dart-flutter-patterns/SKILL.md`:
- Around line 7-492: The document "Dart/Flutter Patterns" is missing the
required skill sections; add three Markdown sections titled "When to Use", "How
It Works", and "Examples" (each with at least one paragraph) for this skill.
Insert "When to Use" and "How It Works" immediately after the top-level title
"Dart/Flutter Patterns" and before the existing "1. Null Safety Fundamentals"
section, and add an "Examples" section either after each major pattern block or
as a consolidated section near the end that references patterns shown (Null
Safety, Immutable State, Async Composition, Widget Architecture, State
Management, Navigation, HTTP, Error Handling, Testing) so the doc conforms to
the skills/**/*.md required structure. Ensure headings use Markdown headers (##
When to Use, ## How It Works, ## Examples) and provide concise guidance and
usage examples in prose for each.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: c1e7e3b4-8616-4d06-ab3a-4e37cb952bdd
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (13)
AGENTS.mdREADME.mdagents/dart-build-resolver.mdcommands/flutter-build.mdcommands/flutter-review.mdcommands/flutter-test.mdmanifests/install-modules.jsonrules/dart/coding-style.mdrules/dart/hooks.mdrules/dart/patterns.mdrules/dart/security.mdrules/dart/testing.mdskills/dart-flutter-patterns/SKILL.md
|
Please rebase on main and re-push — merge conflicts prevent merging. Happy to merge once resolved. |
Resolves all issues raised by Greptile, CodeRabbit, and Cubic bots:
rules/dart/coding-style.md:
- Replace ?.let (Kotlin idiom) with Dart-native null-safe operators
- Soften "Never use !" to "Avoid !" — reserve for programming-error assertions
- Clarify import guidance: ban relative imports, no self-contradiction
rules/dart/patterns.md:
- Add missing getAll/save/delete implementations to UserRepositoryImpl
- Remove Uuid() from domain UseCase — inject IdGenerator instead (clean arch)
- Fix GoRouter redirect: context.read<AuthState>() -> context.read<AuthCubit>()
- Add refreshListenable: GoRouterRefreshStream to wire reactive auth state
rules/dart/security.md:
- Replace deprecated pre-v4 WebView API with WebViewController/WebViewWidget
- Update bullet points to reference new v4+ API
rules/dart/testing.md:
- Change async => _map[key] = val to async { } block to avoid non-void return
skills/dart-flutter-patterns/SKILL.md:
- Add required "When to Use", "How It Works", "Examples" sections
- Fix firstWhere -> firstWhereOrNull to prevent StateError
- Add refreshListenable to GoRouter pattern
- Add one-time retry guard to Dio 401 interceptor to prevent infinite loops
README.md:
- Fix directory tree "30 specialized subagents" -> "31"
commands/flutter-review.md:
- Add Prerequisites section (build/test/analyze must pass before review)
commands/flutter-build.md:
- Fix Cubit/Bloc API mix: CartCubit.add(event) -> CartCubit.addItem(item)
manifests/install-profiles.json:
- Add flutter-dart to full profile (fixes install manifest validator)
https://claude.ai/code/session_01BQbvf8xFtJyaFiuEgdnsin
|
Analysis CompleteGenerated ECC bundle from 500 commits | Confidence: 100% View Pull Request #1068Repository Profile
Detected Workflows (7)
Generated Instincts (15)
After merging, import with: Files
|
a7fac0a to
1a03a2e
Compare
Resolves all issues raised by Greptile, CodeRabbit, and Cubic bots:
rules/dart/coding-style.md:
- Replace ?.let (Kotlin idiom) with Dart-native null-safe operators
- Soften "Never use !" to "Avoid !" — reserve for programming-error assertions
- Clarify import guidance: ban relative imports, no self-contradiction
rules/dart/patterns.md:
- Add missing getAll/save/delete implementations to UserRepositoryImpl
- Remove Uuid() from domain UseCase — inject IdGenerator instead (clean arch)
- Fix GoRouter redirect: context.read<AuthState>() -> context.read<AuthCubit>()
- Add refreshListenable: GoRouterRefreshStream to wire reactive auth state
rules/dart/security.md:
- Replace deprecated pre-v4 WebView API with WebViewController/WebViewWidget
- Update bullet points to reference new v4+ API
rules/dart/testing.md:
- Change async => _map[key] = val to async { } block to avoid non-void return
skills/dart-flutter-patterns/SKILL.md:
- Add required "When to Use", "How It Works", "Examples" sections
- Fix firstWhere -> firstWhereOrNull to prevent StateError
- Add refreshListenable to GoRouter pattern
- Add one-time retry guard to Dio 401 interceptor to prevent infinite loops
README.md:
- Fix directory tree "30 specialized subagents" -> "31"
commands/flutter-review.md:
- Add Prerequisites section (build/test/analyze must pass before review)
commands/flutter-build.md:
- Fix Cubit/Bloc API mix: CartCubit.add(event) -> CartCubit.addItem(item)
manifests/install-profiles.json:
- Add flutter-dart to full profile (fixes install manifest validator)
https://claude.ai/code/session_01BQbvf8xFtJyaFiuEgdnsin
|
Analysis CompleteGenerated ECC bundle from 500 commits | Confidence: 100% View Pull Request #1073Repository Profile
Detected Workflows (9)
Generated Instincts (36)
After merging, import with: Files
|
Add rules, agents, commands, and skills for Dart/Flutter development,
following the same patterns as existing Kotlin, Go, and Swift support.
New files:
- rules/dart/{coding-style,hooks,patterns,security,testing}.md
- agents/dart-build-resolver.md
- commands/flutter-{build,review,test}.md
- skills/dart-flutter-patterns/SKILL.md
Updated:
- manifests/install-modules.json — registers flutter-dart module
The flutter-reviewer.md agent and flutter-dart-code-review skill
already exist; this PR adds the missing rules directory and tooling
to complete the language support pack. Inspired by PRs affaan-m#742, affaan-m#1030,
and affaan-m#1044 from the upstream repository.
https://claude.ai/code/session_01BQbvf8xFtJyaFiuEgdnsin
Bump catalog counts in README.md and AGENTS.md to reflect the new dart-build-resolver agent, dart-flutter-patterns skill, and flutter-build/flutter-review/flutter-test commands. https://claude.ai/code/session_01BQbvf8xFtJyaFiuEgdnsin
Resolves all issues raised by Greptile, CodeRabbit, and Cubic bots:
rules/dart/coding-style.md:
- Replace ?.let (Kotlin idiom) with Dart-native null-safe operators
- Soften "Never use !" to "Avoid !" — reserve for programming-error assertions
- Clarify import guidance: ban relative imports, no self-contradiction
rules/dart/patterns.md:
- Add missing getAll/save/delete implementations to UserRepositoryImpl
- Remove Uuid() from domain UseCase — inject IdGenerator instead (clean arch)
- Fix GoRouter redirect: context.read<AuthState>() -> context.read<AuthCubit>()
- Add refreshListenable: GoRouterRefreshStream to wire reactive auth state
rules/dart/security.md:
- Replace deprecated pre-v4 WebView API with WebViewController/WebViewWidget
- Update bullet points to reference new v4+ API
rules/dart/testing.md:
- Change async => _map[key] = val to async { } block to avoid non-void return
skills/dart-flutter-patterns/SKILL.md:
- Add required "When to Use", "How It Works", "Examples" sections
- Fix firstWhere -> firstWhereOrNull to prevent StateError
- Add refreshListenable to GoRouter pattern
- Add one-time retry guard to Dio 401 interceptor to prevent infinite loops
README.md:
- Fix directory tree "30 specialized subagents" -> "31"
commands/flutter-review.md:
- Add Prerequisites section (build/test/analyze must pass before review)
commands/flutter-build.md:
- Fix Cubit/Bloc API mix: CartCubit.add(event) -> CartCubit.addItem(item)
manifests/install-profiles.json:
- Add flutter-dart to full profile (fixes install manifest validator)
https://claude.ai/code/session_01BQbvf8xFtJyaFiuEgdnsin
1a03a2e to
3a1715f
Compare
|
Analysis CompleteGenerated ECC bundle from 500 commits | Confidence: 100% View Pull Request #1074Repository Profile
Detected Workflows (7)
Generated Instincts (15)
After merging, import with: Files
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@rules/dart/coding-style.md`:
- Line 40: Update the bullet that references `SCREAMING_SNAKE_CASE` to hyphenate
"top-level" (change "top level" to "top-level") so the rule reads
"`SCREAMING_SNAKE_CASE` for constants declared with `const` at top-level",
ensuring the phrase is consistent and readable.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 218297f8-e53f-4fc0-8f52-f98f02116b1c
📒 Files selected for processing (14)
AGENTS.mdREADME.mdagents/dart-build-resolver.mdcommands/flutter-build.mdcommands/flutter-review.mdcommands/flutter-test.mdmanifests/install-modules.jsonmanifests/install-profiles.jsonrules/dart/coding-style.mdrules/dart/hooks.mdrules/dart/patterns.mdrules/dart/security.mdrules/dart/testing.mdskills/dart-flutter-patterns/SKILL.md
✅ Files skipped from review due to trivial changes (10)
- manifests/install-profiles.json
- AGENTS.md
- rules/dart/hooks.md
- manifests/install-modules.json
- agents/dart-build-resolver.md
- rules/dart/patterns.md
- skills/dart-flutter-patterns/SKILL.md
- rules/dart/testing.md
- rules/dart/security.md
- commands/flutter-build.md
🚧 Files skipped from review as they are similar to previous changes (1)
- README.md
| - `camelCase` for variables, parameters, and named constructors | ||
| - `PascalCase` for classes, enums, typedefs, and extensions | ||
| - `snake_case` for file names and library names | ||
| - `SCREAMING_SNAKE_CASE` for constants declared with `const` at top level |
There was a problem hiding this comment.
Hyphenate “top-level” in the constant naming rule.
Use “top-level” (hyphenated) for consistency and readability in this bullet.
Suggested edit
-- `SCREAMING_SNAKE_CASE` for constants declared with `const` at top level
+- `SCREAMING_SNAKE_CASE` for constants declared with `const` at top-level📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - `SCREAMING_SNAKE_CASE` for constants declared with `const` at top level | |
| - `SCREAMING_SNAKE_CASE` for constants declared with `const` at top-level |
🧰 Tools
🪛 LanguageTool
[uncategorized] ~40-~40: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ... for constants declared with const at top level - Prefix private members with _ - Ext...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@rules/dart/coding-style.md` at line 40, Update the bullet that references
`SCREAMING_SNAKE_CASE` to hyphenate "top-level" (change "top level" to
"top-level") so the rule reads "`SCREAMING_SNAKE_CASE` for constants declared
with `const` at top-level", ensuring the phrase is consistent and readable.
|
|
||
| setUp(() { | ||
| repository = MockCartRepository(); | ||
| bloc = CartBloc(repository); |
There was a problem hiding this comment.
CartBloc constructor mismatch with patterns.md
CartBloc(repository) passes a repository argument, but the canonical CartBloc definition in rules/dart/patterns.md:84 has a no-argument constructor:
class CartBloc extends Bloc<CartEvent, CartState> {
CartBloc() : super(const CartState()) { ... }
}A developer copying both files will get a compile error: Too many positional arguments: 0 expected, but 1 found. Either the CartBloc in patterns.md should be updated to accept a repository (e.g., UserRepository _repository), or the test setup here should use CartBloc() with no arguments.
| bloc = CartBloc(repository); | |
| bloc = CartBloc(); |
Summary
Adds full Dart/Flutter language support to match the existing Kotlin, Go, Swift, and Rust packs. Inspired by upstream PRs #742, #1030, and #1044 from
affaan-m/everything-claude-code.New files (11)
rules/dart/coding-style.mddart format, immutability, null safety, sealed types, importsrules/dart/hooks.mddart format/dart analyze, pre-commit checklistrules/dart/patterns.mdrules/dart/security.mdrules/dart/testing.mdagents/dart-build-resolver.mdflutter analyzeerrors, null safety issues, pub conflicts,build_runnerfailurescommands/flutter-build.md/flutter-build— incremental build/analysis error fixingcommands/flutter-review.md/flutter-review— invokesflutter-revieweragentcommands/flutter-test.md/flutter-test— runs test suite, fixes failures, reports coverageskills/dart-flutter-patterns/SKILL.mdmanifests/install-modules.jsonflutter-dartopt-in install moduleUpdated files (3)
README.md— bumped counts: 31 agents, 137 skills, 63 commandsAGENTS.md— same count updates in two locationsyarn.lock— updated after markdownlint-cli install during lintingWhat already existed (intentionally preserved)
agents/flutter-reviewer.md— comprehensive Flutter/Dart code reviewer (all new commands reference it)skills/flutter-dart-code-review/SKILL.md— full review checklist (referenced by rules and commands)Validation evidence
Full test suite: 1688 passed, 8 failed — the 8 failures are pre-existing on
main(identical count before and after these changes, confirmed viagit stashbaseline run).Test plan
node scripts/ci/validate-agents.js agents/— exits 0, reports 31 filesnode scripts/ci/validate-rules.js rules/— exits 0, reports 82 filesnode scripts/ci/validate-commands.js commands/— exits 0, reports 63 filesnode scripts/ci/validate-skills.js skills/— exits 0, reports 137 directoriesnode tests/run-all.js— 1688 pass, same 8 pre-existing failuresrules/dart/files for correct YAML frontmatter paths (**/*.dart)/flutter-build,/flutter-review,/flutter-testcommands load in Claude CodeSummary by cubic
Adds full Dart/Flutter support with language rules, a build-fix agent, and
/flutter-*commands. Integrates as theflutter-dartmodule (also in the "full" profile) and updates catalog counts.New Features
rules/dart/).dart-build-resolveragent for analyzer/build errors, pub conflicts, andbuild_runner./flutter-build,/flutter-review(now lists build/test/analyze prereqs),/flutter-test.skills/dart-flutter-patterns; integrated existing Flutter reviewer/skill.!), replaced Kotlin idioms, GoRouter withrefreshListenable, WebView v4+ API, Dio 401 one-time retry guard,firstWhereOrNullfix, injectedIdGenerator, completed repository methods, test/Cubit example fixes, clarified import guidance.flutter-dartininstall-modules.jsonand added to the "full" profile; updated counts to 37 agents, 143 skills, 71 commands inREADME.md/AGENTS.md.Migration
flutter-dartmodule (opt-in) or using the "full" profile. No breaking changes.Written for commit 3a1715f. Summary will update on new commits.
Summary by CodeRabbit
New Features
Documentation