refactor: enforce unidirectional layer deps (core ← pkg ← cmd) - #77
Merged
Conversation
M09Ic
force-pushed
the
refactor/unidirectional-layer-deps
branch
from
July 28, 2026 08:09
5006781 to
fa0e668
Compare
M09Ic
force-pushed
the
fix/web-runtime-integrity
branch
from
July 28, 2026 08:13
e7a6aee to
63479ba
Compare
M09Ic
force-pushed
the
refactor/unidirectional-layer-deps
branch
from
July 28, 2026 08:14
fa0e668 to
04e7ade
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
aiscan 包命名暗示分层规则:core/ 是内核,pkg/ 是功能实现,cmd/ 是入口。但实际存在大量 Z 字形跨层依赖(core 导入 pkg,pkg 又导入 core),导致命名完全失去意义,也让 agent 内核无法独立编译。
改动
包移动
新增
删除
修复
结果
core/ 对 pkg/ 依赖归零。依赖方向严格为:cmd → pkg/runner → pkg/* → core/*
测试
Generated with Claude Code