Qwen Code 知识库
Qwen Code 通过 QWEN.md、私有 auto-memory、可选的 git-backed team memory、Skills、subagents 与 MCP 延续上下文。这些层让 session 更强,也更需要区分 Agent 记住的内容与人类审核接受的内容。
四层 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 instructions | Shared project file 走 Git review |
| Private auto-memory | Qwen Code | Preferences、feedback、local project context | 用户可检查、编辑、forget |
| Team memory | Qwen Code 与 collaborators | Git 中的 shared project guidance | Diff/PR review 与 secret scan |
| Busabase record | Agent proposal 加责任人 | Cross-project facts、decisions、status | Change 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。
用户 Qwen 目录里的 personal auto-memory
Git 中的 QWEN.md 与可选 team-memory
不被自动清理的 curated memory
有 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 或 teammatecontext_scopeFresh、full parent 或 recent turnstool_scopeAllowed/disallowed tools 与 MCP serverspermission_modePlan、ask、auto-edit、auto、yoloworking_dirShared checkout 或 explicit worktreeresult_refReturned message 与 artifactsApproval Mode
五种 execution mode 描述 action risk,不描述知识质量。
按环境选择 mode。Outcome 依赖 edits、commands、network 或 MCP 时,必须记录 effective mode。
| Mode | File edits | Shell / network | 知识含义 |
|---|---|---|---|
| Plan | 只读 | 不执行 | 分析仍需证据 |
| Ask Permissions | 手动批准 | 手动批准 | 用户看到 action,不代表检查了每条 claim |
| Auto-Edit | 自动 | 手动批准 | 仍需 review diff |
| Auto | Classifier 判断 | 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 要分开保存。
Procedure、support files、optional deterministic hook
Focused context 与 controlled tools
External tools、prompts、resources、authentication
有 owner 与 lifecycle 的 accepted conclusion
提升路径
从 remembered context 走到有明确证据的 claim。
Memory 可以暴露有用 hypothesis;Qwen 再读取 owner sources、调用合适 tools,并提出一项 bounded update。Busabase 让提议在 review 前保持 non-canonical。
知识契约
记录被接受的内容,不冻结 Qwen 全部 memory state。
Canonical object 应比生成它的 session context 更小、更明确、更有责任归属。
knowledge_key稳定身份memory_refs相关 QWEN.md、private/team/pinned memoryagent_traceParent、subagents、forks、native executorssource_refsOwner systems 与 exact evidenceproposed_state可复用精简 claimowner接受责任decision接受、有条件、拒绝、已替代freshnessVerified-at 与 next-review boundary选择 owner
每种 context 都放进能治理它的最窄系统。
这样 Qwen memory 不会变成 shadow database,Busabase 也不会替代 repository conventions。
Stable project instructions 与 verification commands
Personal preferences 与短期 context
应该进入 repository 的 reviewed shared guidance
跨 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,再独立审核。

