feat: add type-level ownership checks to the layer validator
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 22/100
Research direction
Start with the ffca-layer-auditor agent and domain.md, which define the ownership rules and the Summary pattern. The issue is blocked by #22 (moving the validator into Very Good CLI) and uses severity levels from #21, so confirm both are merged before building on them. Done means three rules (data implementing another feature's domain interface as an error, domain interfaces using another feature's models as a warning, and domain public APIs importing dart:ui, Flutter, or backend types as an error), each with fixtures and tests, and the agent consuming these results.
Written by the indexing model from the issue text.
Description
Description
Some ownership rules can only be checked by looking at types, not at pubspecs or import directives. The ffca-layer-auditor agent covers them with an LLM today.
The validator stays a dependency-free script in this plugin: moving it into Very Good CLI was decided against. package:analyzer is therefore not available, since it would need dart pub get in scripts/ before the hook could run. These checks have to work from source text, the way the import checks from #25 do: read class … implements … declarations and repository method signatures, and resolve type names through the file's imports. A rule that cannot be checked reliably that way stays with the auditor.
Requirements
- Error: a class in
{f}_dataimplements a repository interface from another feature's_domain. The dependency on that domain is allowed, but the data layer implements only its own domain's interfaces. - Warning: a repository interface in
{f}_domaintakes or returns a model from another feature's_domain. This is what the Summary pattern indomain.mdavoids. Sometimes legitimate, hence a warning (#21). - Error:
{f}_domainusesdart:ui, Flutter types, or backend types (Firebase, HTTP clients) in its public API. The domain layer is pure Dart (domain.md). - Each check works from source text with no new dependencies. A rule that would need full type resolution to avoid false positives stays with the auditor, and the issue says which.
- Fixtures and tests for each rule.
- The
ffca-layer-auditoragent relies on these results instead of checking the same rules itself. - All CI/CD checks are passing.
- There is no drop in the test coverage percentage.
Additional Context
Uses the severity levels from #21 and the directive scanner from #31.
- Dominant language
- Dart
- Stars
- 7
- Forks
- 2
- Avg merge
- 9h 59m
- Merged PRs (30d)
- 7
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from VeryGoodOpenSource/vgv-ffca-plugin
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
chore
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
chore
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 76/100
All issues in VeryGoodOpenSource/vgv-ffca-plugin
Similar issues
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
StabilityNexus/Zplit#77 · 1 comment ·
-
🚀 [firebase_core] Bump Firebase C++ SDK (14.1.0 → 14.2.0)Possibly taken @SelaseKay claimed this today. OpenNeeds Attention type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
firebase/flutterfire#18977 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
agent: is checked on a wrapper holding several checkables answers from the first one in tree orderOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AlphaWaveSystems/flutter-probe#865 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ubuntu/app-center#2306 ·
Maintainers usually reply within 1 day