feat: add type-level ownership checks to the layer validator
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Dart
- 星标
- 7
- 派生
- 2
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 9
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
VeryGoodOpenSource/vgv-ffca-plugin 的其他 Issue
-
feature
难度 4/5 3-5 天 新手友好度 54/100
VeryGoodOpenSource/vgv-ffca-plugin#39 ·
维护者通常 1 天内回复
-
feature
难度 4/5 3-5 天 新手友好度 38/100
VeryGoodOpenSource/vgv-ffca-plugin#26 ·
维护者通常 1 天内回复
-
test
难度 3/5 1-2 天 新手友好度 48/100
VeryGoodOpenSource/vgv-ffca-plugin#23 ·
维护者通常 1 天内回复
-
external dependency feature
难度 5/5 一周以上 新手友好度 25/100
VeryGoodOpenSource/vgv-ffca-plugin#6 · 1 条评论 ·
维护者通常 1 天内回复
查看 VeryGoodOpenSource/vgv-ffca-plugin 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
Vinillian/book_tracker#208 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 64/100
-
难度 1/5 1-3 小时 新手友好度 76/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
fdittgen-png/deskilo#3753 ·
维护者通常 1 天内回复
-
enhancement good first issue help wanted
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复