| paths |
|
|---|
Test the plan-based path scoping feature in the enhanced-context plugin.
Allowed paths:
plugins/**- All plugin directoriesshared/**- Shared utilities*.md- Markdown files in root.claude/**- Claude configurationtest-*.md- Test plan files
Forbidden paths:
node_modules/**- Dependenciesdist/**- Build output.git/**- Git internals
Allowed paths:
**/*.ts- TypeScript files anywhere**/*.tsx- TypeScript React files**/*.test.ts- Test files**/*.md- Markdown files anywhere
Forbidden paths:
plugins/github-vercel-supabase-ci/**- Complex CI plugin (context-expensive)plugins/github-context-sync/**- GitHub sync plugin (context-expensive)
- ✅ Should allow: Write to
plugins/enhanced-context/hooks/test.ts - ✅ Should allow: Edit
shared/hooks/utils/test.ts - ✅ Should allow: Create
test-example.mdin root - ❌ Should deny: Write to
node_modules/package/index.js - ❌ Should deny: Write to
dist/bundle.js
- ✅ Should allow: Read
plugins/enhanced-context/hooks/create-plan-symlink.ts - ✅ Should allow: Edit
plugins/enhanced-context/shared/hooks/enforce-plan-scoping.ts - ✅ Should allow: Create
plugins/enhanced-context/hooks/test.test.ts - ❌ Should deny: Write to
plugins/github-vercel-supabase-ci/hooks/setup.ts - ❌ Should deny: Edit
plugins/github-context-sync/hooks/sync-plan.ts
⚠️ Main agent read outside scope: Should warn when reading forbidden paths⚠️ Subagent read outside scope: Should warn when reading context-expensive areas
When this plan is written to .claude/plans/test-plan.md:
- Hook
create-plan-symlink.tsshould create/updatePLAN.md→.claude/plans/test-plan.md - Symlink should be in project root
When write/edit/read operations occur:
- Hook
enforce-plan-scoping.tsshould:- Read
PLAN.mdsymlink - Parse
pathsfrontmatter - Detect agent context (main vs subagent)
- Validate path against appropriate scope
- Deny writes/edits outside scope
- Warn on reads outside scope
- Read
This test plan demonstrates:
- Main agent can work in plugins, shared, and docs
- Subagents can access TypeScript files but are blocked from complex plugins
- Context-expensive areas (CI and sync plugins) are isolated to focused work
- Plan agent has control over workspace boundaries