Repository navigation
feat: add Flutter framework support - #942
Conversation
|
@turnipdabeets this follows your KMP setup from #906 (enum ordering, docs-only skill variant first). Would value your eyes on it. @ioannisj flagging since it drives posthog_flutter. Happy to incorporate any feedback. |
|
Verified end-to-end against a real
The run surfaced one real gap, fixed in the second commit: the bash fence had no |
turnipdabeets
left a comment
There was a problem hiding this comment.
LGTM, I left a few suggestions, but will let @PostHog/team-wizard-docs merge. Also I believe all of your commits need to be signed and verified to merge.
|
@turnipdabeets thank you for the review and suggestions! Everything addressed. I've setup commit signing and will force-push the signed commits once this PR gets the green light :) |
|
Hey @Peetee06, this is perfect timing! We're right in the middle of adding Flutter, Java, Go, Rust, and Elixir this morning. We do need an example app in the context mill that we'll package. I'll be adding that project after your changes go in and publishing this. I'll merge this PR last since context mill needs to go out first. appreciate your help here! |
|
@gewenyu99 that's awesome! I had the example app lined up next, but then that's already covered! Anything else you're tackling next where some support is beneficial? I have some capacity and plan to contribute in the coming days. If there's anything you don't have capacity right now to do yourself I can prioritize that. Otherwise I'll find and fix some issues proactively :) |
|
@Peetee06 I will tag you to review my burrito consideration app. I wrote Flutter last in 2023, and I wasn't very good at it so if you have a moment to share your wisdom, I'd appreciate it! Also thanks for pushing through what might be the most chaotic few weeks in this repo. We're actively ripping apart and rebuilding the agentic core of this repo 🙏 so koodos for managing the confusing layout and out of date readmes :D |
|
Will take a look right at the Flutter example right now 👍 Good thing we have agents to help understand unknown projects now. Fable 5 took 2 minutes to find the right places to add stuff 😄💪 I just stress-tested some assumptions it made about Flutter projects. |
|
@gewenyu99 fixed the conflicts, so this can be merged when the context-mill PR is merged. :) Let me know if I can support in any way. |
|
@Peetee06 we require commits to be signed. would you mind rebasing and adding signatures? |
Adds Flutter as a supported framework following the mobile-framework pattern (Android / Swift / KMP): - Integration.flutter enum entry, ordered before kmp/swift/android so a Flutter project's android/ and ios/ subtrees don't match the native detectors first - FLUTTER_AGENT_CONFIG in src/frameworks/flutter/ — detects a pubspec.yaml depending on the Flutter SDK (sdk: flutter), gathers the enabled target platforms as agent context, installs via 'flutter pub add posthog_flutter' - pub package-manager helper in detection/package-manager.ts - FRAMEWORK_REGISTRY entry The pinned skill-menu contract in variant-resolution.test.ts gains framework: 'flutter' on integration-flutter, matching the companion context-mill change that promotes the existing docs-only variant. Closes #47 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Found in a live e2e run: the agent follows the Flutter prompt's 'flutter pub add posthog_flutter' and the fence denies it — flutter and dart were missing from the allowlist entirely. The agent then has to hand the installation back to the user in the setup report. Allows flutter/dart pub (add|remove|get|upgrade|outdated|deps) and analyze/build/clean/doctor. run and test stay denied (arbitrary code execution, same contract as xcodebuild test), as does pub run. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…lper - detect() anchors on a key/value line (/^\s*sdk:\s*flutter\s*$/m) so commented-out mentions don't match and multi-space YAML does - getTags() guards platforms with ?.length, matching getAdditionalContextLines, so platform-less packages emit no empty tag - pubPackageManager joins the static-helpers it.each suite - bash-fence comment reframed: build/analyze run project-defined code (same contract as xcodebuild build); run/test are out for *arbitrary* code execution Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
4c61021 to
5214ac4
Compare
|
@edwinyjlim all signed ✅ |
Related PRs:
Adds Flutter as a supported framework, following the mobile-framework pattern (Android / Swift / KMP, #906):
Integration.flutterenum entry, ordered beforekmp/swift/androidso a Flutter project'sandroid/andios/subtrees don't match the native detectors firstFLUTTER_AGENT_CONFIGinsrc/frameworks/flutter/— claims apubspec.yamlthat depends on the Flutter SDK (sdk: flutter), so pure Dart projects fall through; gathers the enabled target platforms (android/ios/web/…) as agent context; installs viaflutter pub add posthog_flutterpubpackage-manager helper +FRAMEWORK_REGISTRYentryframework: flutteronintegration-flutterin the variant-resolution contract test, matching the context-mill PR above — that PR must release before this mergesMonorepos (pub workspaces / melos) need no framework-specific handling: the agentic project scan targets are built from the registry, so nested Flutter apps are found and scoped automatically; a workspace root pubspec has no
sdk: flutterdependency and is correctly not claimed.Verification:
pnpm build✅,pnpm test✅ (1533 tests, incl. new flutter detect + enum-order tests),pnpm fix✅Closes #47
🤖 Generated with Claude Code