Qwen Code 知识库Busabase x Qwen Code

Qwen Code 知识库

Qwen Code 通过 QWEN.md、私有 auto-memory、可选的 git-backed team memory、Skills、subagents 与 MCP 延续上下文。这些层让 session 更强,也更需要区分 Agent 记住的内容与人类审核接受的内容。

Memory 派生提议证据尚未接受
Busabase 正在审核 Qwen Code 提议的知识
Memory 可以提出 claim,review 才决定它是否 canonical。

四层 Memory

QWEN.md、auto-memory、team memory 与 canonical knowledge 有不同 owner。

Qwen Code 在 session 开始时加载 instructions 与 learned context。Busabase 不应抹掉这些层,而只接收需要跨 checkout、跨 Agent 被负责复用的少量 claim。

Layer谁写入最佳用途审核方式
QWEN.md人类或 /init 辅助Commands、conventions、durable instructionsShared project file 走 Git review
Private auto-memoryQwen CodePreferences、feedback、local project context用户可检查、编辑、forget
Team memoryQwen Code 与 collaboratorsGit 中的 shared project guidanceDiff/PR review 与 secret scan
Busabase recordAgent proposal 加责任人Cross-project facts、decisions、statusChange Request 后 merge

Team memory

Git-backed sharing 让 memory 可审核,但不会自动成为权威。

Team memory 是 opt-in、source-controlled,并对 collaborators 可见。Qwen 会阻止检测到的 secrets,写入也出现在 git diff;但 auto-edit 或 YOLO 仍可能不提示就应用。把 diff 当成 proposed guidance,业务状态与跨系统 claim 单独进入 reviewed record。

PRIVATE

用户 Qwen 目录里的 personal auto-memory

PROJECT

Git 中的 QWEN.md 与可选 team-memory

PINNED

不被自动清理的 curated memory

CANONICAL

有 source、owner、decision、freshness 的 Busabase record

Subagents 与 forks

Delegation 会改变 context 和 tools,不会转移事实接受权。

Named subagents 从独立 context 开始并使用受控 tools;fork 继承指定 parent turns,并可用 fork_tools 或 profile 缩小执行面。Native Claude Code/Codex executor 还有自己的 runtime rules。要记录实际路径、可访问范围和返回内容。

agent_kindNamed subagent、fork、native executor 或 teammate
context_scopeFresh、full parent 或 recent turns
tool_scopeAllowed/disallowed tools 与 MCP servers
permission_modePlan、ask、auto-edit、auto、yolo
working_dirShared checkout 或 explicit worktree
result_refReturned message 与 artifacts

Approval Mode

五种 execution mode 描述 action risk,不描述知识质量。

按环境选择 mode。Outcome 依赖 edits、commands、network 或 MCP 时,必须记录 effective mode。

ModeFile editsShell / network知识含义
Plan只读不执行分析仍需证据
Ask Permissions手动批准手动批准用户看到 action,不代表检查了每条 claim
Auto-Edit自动手动批准仍需 review diff
AutoClassifier 判断Classifier 判断Policy classification 不是 factual validation
YOLO自动自动只用于受控环境,结果另行审核

Skills 与 MCP

Skill 形成 procedure,MCP 提供 capability 与外部证据。

Qwen Skill 可以包含 instructions、scripts、templates、hooks、path gates;MCP 可以提供 tools、prompts、resources、per-server filtering 与 trust。Skill revision、server identity、tool response、acceptance decision 要分开保存。

SKILL

Procedure、support files、optional deterministic hook

SUBAGENT

Focused context 与 controlled tools

MCP

External tools、prompts、resources、authentication

REVIEWED RECORD

有 owner 与 lifecycle 的 accepted conclusion

提升路径

从 remembered context 走到有明确证据的 claim。

Memory 可以暴露有用 hypothesis;Qwen 再读取 owner sources、调用合适 tools,并提出一项 bounded update。Busabase 让提议在 review 前保持 non-canonical。

01 · REMEMBER

项目指令或记忆提示上下文

02 · RESEARCH

读取 source systems

03 · EXECUTE

Skills、subagents、MCP

04 · VERIFY

Tests 与 readback

05 · PROPOSE

一项 record change

06 · REVIEW

Owner 接受

Qwen Code 知识提议的 Busabase delivery log

知识契约

记录被接受的内容,不冻结 Qwen 全部 memory state。

Canonical object 应比生成它的 session context 更小、更明确、更有责任归属。

knowledge_key稳定身份
memory_refs相关 QWEN.md、private/team/pinned memory
agent_traceParent、subagents、forks、native executors
source_refsOwner systems 与 exact evidence
proposed_state可复用精简 claim
owner接受责任
decision接受、有条件、拒绝、已替代
freshnessVerified-at 与 next-review boundary

选择 owner

每种 context 都放进能治理它的最窄系统。

这样 Qwen memory 不会变成 shadow database,Busabase 也不会替代 repository conventions。

QWEN.md

Stable project instructions 与 verification commands

AUTO-MEMORY

Personal preferences 与短期 context

TEAM MEMORY

应该进入 repository 的 reviewed shared guidance

BUSABASE

跨 projects、people、Agents、Apps 复用的 structured decisions/facts

实际问题

Qwen Code 知识库常见问题

Busabase 会取代 QWEN.md 吗?

不会。QWEN.md 保存 always-on project instructions;Busabase 保存少量 reviewed state。

Qwen auto-memory 足以 canonical 吗?

它有用、可检查,但由模型写入且是 best-effort;claim 要回到 owner source 验证。

Team memory 需要审核吗?

Git diff 可审核;auto-edit/YOLO 仍可能无提示写入,因此 repository policy 要明确 review。

Fork 能批准自己的 output 吗?

不能。Fork tool restrictions 只管执行,责任人决定 claim 是否 canonical。

Trusted MCP 等于 trusted data 吗?

不等于。Trust 可能跳过确认或允许有限 replay,response 仍需验证并保留 provenance。

从一条 memory-derived claim 开始

让 Qwen Code 先核验,再提出 durable record。

挑一个有用 remembered fact,追到 owner system,附上 Agent path 与 evidence,再独立审核。