Multi-Agent Filesystem Governance
Use this skill to make safe, consistent filesystem decisions in environments where multiple agents may create, edit, move, download, organize, or archive files.
This skill governs ownership, placement, lifecycle, and write boundaries. It is not tied to a specific product, path layout, operating system, or note-taking tool.
Core objective
Ensure that every file has:
- 1. a clear ownership scope
- a clear storage location
- a clear lifecycle state
- a clear modification rule
When uncertain, choose the narrowest safe scope and the least shared location.
Scope model
Classify every file, folder, and file operation into exactly one of these scopes:
- - agent-private: used by one agent only
- shared: intentionally reusable or accessible by multiple agents
- archive: inactive, historical, completed, frozen, or retained for reference
If scope is unclear, default to agent-private.
Storage model
Use three top-level storage categories conceptually, even if local directory names differ:
- - agent areas: private per-agent working locations
- shared areas: common reusable resources
- archive areas: inactive or historical materials
Do not depend on any single hard-coded path. Preserve conceptual boundaries even when adapting to local layouts.
Required decision order
Before creating, editing, moving, renaming, or deleting files, determine the following in order:
- 1. What is the artifact?
- Is it temporary, active, reusable, frozen, or historical?
- Is it private to one agent or shared by multiple agents?
- What is the narrowest valid location?
- Will this action affect other agents or shared workflows?
If any answer is unclear, choose a private non-destructive location first.
Default rules
Prefer private over shared
If a file does not clearly require cross-agent reuse, place it in an agent-private location.
Do not write across agent boundaries by default
Do not create, edit, move, or overwrite files belonging to another agent unless the task explicitly requires it.
Treat shared locations as high-impact
Writing to a shared location is a wider-scope action. Use shared locations only when reuse, collaboration, or standardization is intended.
Keep archive separate from active work
Archived material is not an active workspace. Do not continue editing files in archive locations. Restore or copy them into an active or private area first.
Treat temporary locations as disposable
Do not keep the only important copy of a file in a temp or scratch location.
Content-type placement guidance
Apply these rules regardless of exact local path names.
Skills
- - Put reusable multi-agent skills in a shared skills location.
- Put experimental, agent-specific, or override skills in an agent-private skills location.
- If the same skill exists in both shared and private locations, prefer the more specific private version for that agent.
Workspaces
- - Put active working files, drafts, and intermediate artifacts in the current agent’s private workspace unless they are intentionally shared.
- Do not move private task files into shared locations prematurely.
Scripts
- - Put reusable utility scripts in a shared scripts location.
- Put task-specific or agent-specific scripts in a private scripts location or within the relevant project.
- Do not scatter unrelated scripts across arbitrary folders.
Downloads
- - Route newly downloaded files into a dedicated intake location first.
- Classify and move them later into proper long-term locations.
- Do not leave downloads scattered across project folders, knowledge vaults, or temp directories without intent.
Knowledge notes and vaults
- - Put durable reference notes and curated knowledge into a designated knowledge base or vault location.
- Keep rough task notes private until they are worth preserving or sharing.
- Do not use the knowledge base as a dumping ground for arbitrary transient files.
Code projects
- - Store code projects in designated project locations.
- For durable, long-lived repositories, prefer a dedicated project root such as
~/projects/<repo>. - Use
/tmp/... for temporary reproduction, validation, or throwaway clones, then promote ongoing work into ~/projects/<repo>. - Separate experimental, active, frozen, and archived projects when practical.
- Do not mix project source trees with general downloads, archives, note repositories, or agent runtime/config trees.
- Read
references/project-directory-best-practices.md when the question is specifically about where formal repositories should live versus where temporary repo work should happen.
Archives
- - Move inactive, completed, superseded, or retained materials into archive locations.
- Keep archive structure stable and low-churn.
- Prefer append-only archival behavior unless explicit cleanup is required.
File lifecycle model
Classify files into one of these lifecycle states:
- - temporary: scratch, disposable, rebuildable
- active: currently being edited or used
- shared: actively reused by multiple agents
- frozen: paused but potentially resumable
- archived: historical, completed, or retained for record
When lifecycle changes, move the file or justify keeping it in place.
Safety rules for file operations
Create
Create files in the narrowest valid scope first.
Edit
Edit in place only when ownership and scope are clear.
Move
Move files when ownership or lifecycle changes.
Copy
Copy instead of move when preserving history or minimizing disruption matters.
Delete
Delete only when the file is clearly temporary, redundant, or explicitly approved for removal.
Rename
Rename to improve clarity, ownership, lifecycle visibility, or discoverability — not for cosmetic churn alone.
Collision and precedence rules
When equivalent resources exist in multiple scopes, prefer the most specific valid source:
- 1. agent-private
- shared
- bundled, default, or global
Use overrides intentionally. Do not create duplicate variants without reason.
What to avoid
Avoid these patterns:
- - dumping everything into one shared root
- using archive as a live workspace
- downloading directly into long-term storage without triage
- scattering scripts across unrelated folders
- mixing code projects with note-vault content
- placing durable knowledge only in temporary notes
- editing another agent’s private area without explicit need
- using shared locations by default “just in case”
Recommended behavior when uncertain
If the correct location is unclear:
- 1. choose agent-private
- choose non-destructive actions
- preserve reversibility
- avoid shared writes
- ask for clarification only when the ambiguity materially affects future organization or other agents
Decision template
When deciding where something should go, return:
- - Scope:
- Lifecycle:
- Recommended location type:
- Reason:
- Shared-impact note:
Output expectations
When applying this skill:
- - make scope explicit
- make lifecycle explicit
- recommend the narrowest valid location
- state whether other agents are affected
- prefer durable rules over ad hoc path guesses
技能名称:multi-agent-filesystem-governance
详细描述:
多智能体文件系统治理
使用此技能,在多个智能体可能创建、编辑、移动、下载、整理或归档文件的环境中,做出安全、一致的文件系统决策。
本技能治理所有权、放置位置、生命周期和写入边界。它不依赖于特定的产品、路径布局、操作系统或笔记工具。
核心目标
确保每个文件都具备:
- 1. 明确的所有权范围
- 明确的存储位置
- 明确的生命周期状态
- 明确的修改规则
当不确定时,选择最窄的安全范围和最少共享的位置。
范围模型
将每个文件、文件夹和文件操作精确分类到以下范围之一:
- - 智能体私有:仅由一个智能体使用
- 共享:有意供多个智能体重复使用或访问
- 归档:非活跃的、历史的、已完成的、冻结的或为参考而保留的
如果范围不明确,默认设为智能体私有。
存储模型
在概念上使用三个顶层存储类别,即使本地目录名称不同:
- - 智能体区域:每个智能体私有的工作位置
- 共享区域:通用的可重复使用资源
- 归档区域:非活跃或历史资料
不要依赖任何单一的硬编码路径。即使在适应本地布局时,也要保持概念上的边界。
必需的决策顺序
在创建、编辑、移动、重命名或删除文件之前,按顺序确定以下内容:
- 1. 制品是什么?
- 它是临时的、活跃的、可复用的、冻结的还是历史的?
- 它是单个智能体私有的还是多个智能体共享的?
- 最窄的有效位置是什么?
- 此操作会影响其他智能体或共享工作流吗?
如果任何答案不明确,首先选择一个私有的、非破坏性的位置。
默认规则
私有优先于共享
如果一个文件没有明确需要跨智能体复用,则将其放置在智能体私有位置。
默认不跨智能体边界写入
除非任务明确要求,否则不要创建、编辑、移动或覆盖属于另一个智能体的文件。
将共享位置视为高影响
写入共享位置是范围更广的操作。仅当意图是复用、协作或标准化时,才使用共享位置。
将归档与活跃工作分开
归档材料不是活跃的工作空间。不要继续在归档位置编辑文件。先将其恢复或复制到活跃或私有区域。
将临时位置视为可丢弃
不要将文件的唯一重要副本保存在临时或暂存位置。
内容类型放置指南
无论确切的本地路径名称如何,都应用这些规则。
技能
- - 将可复用的多智能体技能放在共享技能位置。
- 将实验性的、特定于智能体的或覆盖技能放在智能体私有技能位置。
- 如果同一技能同时存在于共享和私有位置,则优先为该智能体使用更具体的私有版本。
工作空间
- - 将活跃的工作文件、草稿和中间制品放在当前智能体的私有工作空间中,除非它们是有意共享的。
- 不要过早地将私有任务文件移动到共享位置。
脚本
- - 将可复用的实用脚本放在共享脚本位置。
- 将特定于任务或特定于智能体的脚本放在私有脚本位置或相关项目内。
- 不要将无关的脚本分散到任意文件夹中。
下载
- - 首先将新下载的文件路由到专用的接收位置。
- 稍后对其进行分类并移动到合适的长期位置。
- 不要在没有明确意图的情况下,将下载文件分散在项目文件夹、知识库或临时目录中。
知识笔记和知识库
- - 将持久的参考笔记和精选知识放入指定的知识库或知识库位置。
- 将粗略的任务笔记保持私有,直到它们值得保存或共享。
- 不要将知识库用作任意临时文件的倾倒场。
代码项目
- - 将代码项目存储在指定的项目位置。
- 对于持久的、长期存在的仓库,优先使用专用的项目根目录,例如 ~/projects/。
- 使用 /tmp/... 进行临时复现、验证或可丢弃的克隆,然后将正在进行的工作提升到 ~/projects/。
- 在可行的情况下,将实验性、活跃、冻结和归档项目分开。
- 不要将项目源代码树与通用下载、归档、笔记仓库或智能体运行时/配置树混合。
- 当问题特别涉及正式仓库应位于何处与临时仓库工作应在何处进行时,请阅读 references/project-directory-best-practices.md。
归档
- - 将非活跃、已完成、被取代或保留的材料移动到归档位置。
- 保持归档结构稳定且变动少。
- 除非需要明确的清理,否则首选仅追加的归档行为。
文件生命周期模型
将文件分类到以下生命周期状态之一:
- - 临时:草稿、可丢弃、可重建
- 活跃:当前正在编辑或使用
- 共享:被多个智能体主动复用
- 冻结:暂停但可能恢复
- 已归档:历史的、已完成的或为记录而保留的
当生命周期发生变化时,移动文件或证明将其保留在原位的合理性。
文件操作安全规则
创建
首先在最窄的有效范围内创建文件。
编辑
仅在所有权和范围明确时进行原地编辑。
移动
当所有权或生命周期发生变化时移动文件。
复制
当需要保留历史或最小化干扰时,复制而非移动。
删除
仅在文件明显是临时的、冗余的或明确批准删除时才进行删除。
重命名
重命名是为了提高清晰度、所有权、生命周期可见性或可发现性——而不仅仅是为了外观上的变动。
冲突与优先级规则
当等效资源存在于多个范围时,优先选择最具体的有效来源:
- 1. 智能体私有
- 共享
- 捆绑的、默认的或全局的
有意使用覆盖。没有理由不要创建重复的变体。
应避免的事项
避免以下模式:
- - 将所有内容倾倒到一个共享根目录
- 将归档用作活跃工作空间
- 未经分类直接下载到长期存储
- 将脚本分散到无关文件夹
- 将代码项目与笔记库内容混合
- 仅将持久知识放在临时笔记中
- 在没有明确需要的情况下编辑另一个智能体的私有区域
- 默认“以防万一”使用共享位置
不确定时的推荐行为
如果正确位置不明确:
- 1. 选择智能体私有
- 选择非破坏性操作
- 保持可逆性
- 避免共享写入
- 仅当模糊性会实质性影响未来组织或其他智能体时,才请求澄清
决策模板
在决定某物应放置何处时,返回:
- - 范围:
- 生命周期:
- 推荐位置类型:
- 原因:
- 共享影响说明:
输出期望
在应用此技能时:
- - 明确范围
- 明确生命周期
- 推荐最窄的有效位置
- 说明是否影响其他智能体
- 优先使用持久规则而非临时的路径猜测