Background
Project-namespace isolation currently covers only skills / learnings (plus the knowledge axis shared with roles). docs / agents / env / hooks / mcp are still synced to the whole team with no way to scope them per project.
Goal
Make all resource types support project-namespace isolation, aligned with how skills already works, delivered in a single PR:
- Unified layout:
<type>/<namespace>/... = synced + cleaned up per active project; <type>/ root = shared team-wide, always synced.
- Union across active projects; duplicate name = error (same as the existing skills conflict rule).
Per-resource directory layout (team repo)
skills/ already isolated skills/<name>/… skills/alpha/<name>/…
learnings/ already isolated learnings/*.md learnings/alpha/*.md
rules/ knowledge axis rules/common/*.md rules/alpha/*.md
claudemd/ knowledge axis claudemd/common/*.md claudemd/alpha/*.md
agents/ to do agents/*.md agents/alpha/*.md
docs/ to do docs/*.md (whole bundle) docs/alpha/*.md
env/ to do env/env.yaml env/alpha/env.yaml
hooks/ to do hooks/hooks.yaml hooks/alpha/hooks.yaml
mcp/ to do mcp/mcp.yaml mcp/alpha/mcp.yaml
Left column = root (shared team-wide, behavior unchanged). Right column = namespace subdirectory (synced only when the matching project is active). alpha is an example project id.
Compatibility (non-breaking)
With no projects.yaml, or with resources kept at the <type>/ root, behavior is completely unchanged (shared team-wide). Isolation is opt-in: a team enables it only by moving resources into a namespace subdirectory. The existing single-file resources (env/env.yaml, hooks/hooks.yaml, mcp/mcp.yaml) naturally fall under "root = shared", so existing teams need zero migration.
Background
Project-namespace isolation currently covers only
skills/learnings(plus theknowledgeaxis shared with roles).docs / agents / env / hooks / mcpare still synced to the whole team with no way to scope them per project.Goal
Make all resource types support project-namespace isolation, aligned with how
skillsalready works, delivered in a single PR:<type>/<namespace>/...= synced + cleaned up per active project;<type>/root = shared team-wide, always synced.Per-resource directory layout (team repo)
Compatibility (non-breaking)
With no
projects.yaml, or with resources kept at the<type>/root, behavior is completely unchanged (shared team-wide). Isolation is opt-in: a team enables it only by moving resources into a namespace subdirectory. The existing single-file resources (env/env.yaml,hooks/hooks.yaml,mcp/mcp.yaml) naturally fall under "root = shared", so existing teams need zero migration.