fix: correct YAML errors and restore missing permissions in agent configs (#167)
* fix: migrate all agents to OpenCode v1.1.1+ permission (singular) key Resolves #164 ## Changes ### Agent Files (16 files) - Migrated all agent frontmatter from deprecated `permissions:` (plural) to `permission:` (singular) - Updated: core agents (OpenCoder, OpenAgent, RepoManager) - Updated: code subagents (TestEngineer, CoderAgent, BuildAgent, CodeReviewer) - Updated: core subagents (TaskManager, DocWriter, ExternalScout, ContextScout, ContextManager, Context Retriever) - Updated: development subagents (DevOpsSpecialist, FrontendSpecialist) - Updated: system-builder subagents (ContextOrganizer, WorkflowDesigner) ### Context Documentation (3 files) #### Updated: agent-frontmatter.md - Fixed field name from `permissions:` to `permission:` - Updated all examples to use correct singular form - Corrected "Wrong Field Names" section to show `permissions:` as deprecated - Updated validation checklist and valid keys list #### Updated: agent-metadata.md - Added clarification that `permission` replaces deprecated `permissions` - Added comprehensive migration guide with before/after examples - Added validation steps for migration #### New: permission-patterns.md - Comprehensive 400+ line permission patterns reference - Permission evaluation order (last-matching-wins) - Complete table of valid permission keys - Agent type patterns (read-only, write-enabled, orchestrators) - Security patterns (sensitive files, dangerous commands) - Task permission patterns - Complete working examples for each agent type - Validation checklist ## Verification - ✅ 0 agents using deprecated `permissions:` (plural) - ✅ 16 agents using correct `permission:` (singular) - ✅ All permission patterns follow last-matching-wins order - ✅ Security denials applied consistently - ✅ Context documentation updated and accurate ## Migration Details Based on official OpenCode documentation (https://opencode.ai/docs/agents/): - OpenCode v1.1.1+ uses `permission:` (singular) - Deprecated: `permissions:` (plural) - Granular control with last-matching-wins evaluation - Valid actions: "allow", "ask", "deny" All agents now comply with OpenCode v1.1.1+ standards. * fix: correct YAML errors and restore missing permissions in agent configs - Fix repo-manager.md duplicate permission section - Fix externalscout.md YAML indentation error - Remove old tools: section from devops-specialist.md - Restore context file permissions in context-manager.md - Restore test command permissions in tester.md - Clean up formatting in coder-agent.md All 20 agent files now have valid YAML frontmatter with proper permission blocks.
This commit is contained in:
parent
d169f91680
commit
b41641cfb2
23 changed files with 479 additions and 244 deletions
|
|
@ -1,23 +1,11 @@
|
||||||
---
|
---
|
||||||
# OpenCode Agent Configuration
|
|
||||||
# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in:
|
|
||||||
# .opencode/config/agent-metadata.json
|
|
||||||
|
|
||||||
name: OpenAgent
|
name: OpenAgent
|
||||||
description: "Universal agent for answering queries, executing tasks, and coordinating workflows across any domain"
|
description: "Universal agent for answering queries, executing tasks, and coordinating workflows across any domain"
|
||||||
mode: primary
|
mode: primary
|
||||||
temperature: 0.2
|
temperature: 0.2
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
write: true
|
|
||||||
edit: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
bash: true
|
|
||||||
task: true
|
|
||||||
patch: true
|
|
||||||
permissions:
|
|
||||||
bash:
|
bash:
|
||||||
|
"*": "ask"
|
||||||
"rm -rf *": "ask"
|
"rm -rf *": "ask"
|
||||||
"rm -rf /*": "deny"
|
"rm -rf /*": "deny"
|
||||||
"sudo *": "deny"
|
"sudo *": "deny"
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,9 @@
|
||||||
---
|
---
|
||||||
# OpenCode Agent Configuration
|
|
||||||
# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in:
|
|
||||||
# .opencode/config/agent-metadata.json
|
|
||||||
|
|
||||||
name: OpenCoder
|
name: OpenCoder
|
||||||
description: "Orchestration agent for complex coding, architecture, and multi-file refactoring"
|
description: "Orchestration agent for complex coding, architecture, and multi-file refactoring"
|
||||||
mode: primary
|
mode: primary
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
task: true
|
|
||||||
read: true
|
|
||||||
edit: true
|
|
||||||
write: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
bash: true
|
|
||||||
patch: true
|
|
||||||
permissions:
|
|
||||||
bash:
|
bash:
|
||||||
"rm -rf *": "ask"
|
"rm -rf *": "ask"
|
||||||
"sudo *": "deny"
|
"sudo *": "deny"
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,4 @@
|
||||||
---
|
---
|
||||||
# OpenCode Agent Configuration
|
|
||||||
# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in:
|
|
||||||
# .opencode/config/agent-metadata.json
|
|
||||||
|
|
||||||
name: OpenDataAnalyst
|
name: OpenDataAnalyst
|
||||||
description: "Expert in data analysis, visualization, and statistical insights"
|
description: "Expert in data analysis, visualization, and statistical insights"
|
||||||
mode: primary
|
mode: primary
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,9 @@
|
||||||
---
|
---
|
||||||
# OpenCode Agent Configuration
|
|
||||||
# Metadata (id, name, category, type, version, author, tags, dependencies) is stored in:
|
|
||||||
# .opencode/config/agent-metadata.json
|
|
||||||
|
|
||||||
name: OpenRepoManager
|
name: OpenRepoManager
|
||||||
description: "Meta agent for managing OpenAgents Control repository development with lazy context loading, smart delegation, and automatic documentation"
|
description: "Meta agent for managing OpenAgents Control repository development with lazy context loading, smart delegation, and automatic documentation"
|
||||||
mode: primary
|
mode: primary
|
||||||
temperature: 0.2
|
temperature: 0.2
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
write: true
|
|
||||||
edit: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
bash: true
|
|
||||||
task: true
|
|
||||||
list: true
|
|
||||||
patch: true
|
|
||||||
bash:
|
bash:
|
||||||
"rm -rf *": "ask"
|
"rm -rf *": "ask"
|
||||||
"rm -rf /*": "deny"
|
"rm -rf /*": "deny"
|
||||||
|
|
@ -28,12 +15,6 @@ tools:
|
||||||
"**/*.secret": "deny"
|
"**/*.secret": "deny"
|
||||||
"node_modules/**": "deny"
|
"node_modules/**": "deny"
|
||||||
".git/**": "deny"
|
".git/**": "deny"
|
||||||
permissions:
|
|
||||||
bash:
|
|
||||||
"rm -rf *": "ask"
|
|
||||||
"rm -rf /*": "deny"
|
|
||||||
"sudo *": "deny"
|
|
||||||
"> /dev/*": "deny"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<!-- ═══════════════════════════════════════════════════════════════════════════ -->
|
<!-- ═══════════════════════════════════════════════════════════════════════════ -->
|
||||||
|
|
|
||||||
|
|
@ -7,14 +7,6 @@ name: OpenSystemBuilder
|
||||||
description: "Main orchestrator for building complete context-aware AI systems from user requirements"
|
description: "Main orchestrator for building complete context-aware AI systems from user requirements"
|
||||||
mode: primary
|
mode: primary
|
||||||
temperature: 0.2
|
temperature: 0.2
|
||||||
tools:
|
|
||||||
read: true
|
|
||||||
write: true
|
|
||||||
edit: true
|
|
||||||
bash: false
|
|
||||||
task: true
|
|
||||||
glob: true
|
|
||||||
grep: false
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# System Builder Orchestrator
|
# System Builder Orchestrator
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,7 @@ name: BuildAgent
|
||||||
description: Type check and build validation agent
|
description: Type check and build validation agent
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
bash: true
|
|
||||||
read: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
task: true
|
|
||||||
edit: false
|
|
||||||
write: false
|
|
||||||
permissions:
|
|
||||||
bash:
|
bash:
|
||||||
"tsc": "allow"
|
"tsc": "allow"
|
||||||
"mypy": "allow"
|
"mypy": "allow"
|
||||||
|
|
|
||||||
|
|
@ -3,16 +3,7 @@ name: CoderAgent
|
||||||
description: Executes coding subtasks in sequence, ensuring completion as specified
|
description: Executes coding subtasks in sequence, ensuring completion as specified
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0
|
temperature: 0
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
edit: true
|
|
||||||
write: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
bash: false
|
|
||||||
patch: true
|
|
||||||
task: true
|
|
||||||
permissions:
|
|
||||||
bash:
|
bash:
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
edit:
|
edit:
|
||||||
|
|
@ -22,9 +13,9 @@ permissions:
|
||||||
"node_modules/**": "deny"
|
"node_modules/**": "deny"
|
||||||
".git/**": "deny"
|
".git/**": "deny"
|
||||||
task:
|
task:
|
||||||
|
"*": "deny"
|
||||||
contextscout: "allow"
|
contextscout: "allow"
|
||||||
externalscout: "allow"
|
externalscout: "allow"
|
||||||
"*": "deny"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# CoderAgent
|
# CoderAgent
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,7 @@ name: CodeReviewer
|
||||||
description: Code review, security, and quality assurance agent
|
description: Code review, security, and quality assurance agent
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
bash: false
|
|
||||||
edit: false
|
|
||||||
write: false
|
|
||||||
task: true
|
|
||||||
permissions:
|
|
||||||
bash:
|
bash:
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
edit:
|
edit:
|
||||||
|
|
@ -19,8 +11,8 @@ permissions:
|
||||||
write:
|
write:
|
||||||
"**/*": "deny"
|
"**/*": "deny"
|
||||||
task:
|
task:
|
||||||
contextscout: "allow"
|
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
|
contextscout: "allow"
|
||||||
---
|
---
|
||||||
|
|
||||||
# CodeReviewer
|
# CodeReviewer
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,7 @@ name: TestEngineer
|
||||||
description: Test authoring and TDD agent
|
description: Test authoring and TDD agent
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
edit: true
|
|
||||||
write: true
|
|
||||||
bash: true
|
|
||||||
task: true
|
|
||||||
permissions:
|
|
||||||
bash:
|
bash:
|
||||||
"npx vitest *": "allow"
|
"npx vitest *": "allow"
|
||||||
"npx jest *": "allow"
|
"npx jest *": "allow"
|
||||||
|
|
@ -31,8 +23,9 @@ permissions:
|
||||||
"**/*.key": "deny"
|
"**/*.key": "deny"
|
||||||
"**/*.secret": "deny"
|
"**/*.secret": "deny"
|
||||||
task:
|
task:
|
||||||
contextscout: "allow"
|
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
|
contextscout: "allow"
|
||||||
|
externalscout: "allow"
|
||||||
---
|
---
|
||||||
|
|
||||||
# TestEngineer
|
# TestEngineer
|
||||||
|
|
|
||||||
|
|
@ -3,21 +3,13 @@ name: ContextManager
|
||||||
description: Context organization and lifecycle management specialist - discovers, catalogs, validates, and maintains project context structure with dependency tracking
|
description: Context organization and lifecycle management specialist - discovers, catalogs, validates, and maintains project context structure with dependency tracking
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
edit: true
|
|
||||||
write: true
|
|
||||||
bash: true
|
|
||||||
task: true
|
|
||||||
permissions:
|
|
||||||
read:
|
read:
|
||||||
"**/*": "allow"
|
"*": "allow"
|
||||||
grep:
|
grep:
|
||||||
"**/*": "allow"
|
"*": "allow"
|
||||||
glob:
|
glob:
|
||||||
"**/*": "allow"
|
"*": "allow"
|
||||||
bash:
|
bash:
|
||||||
"find .opencode/context*": "allow"
|
"find .opencode/context*": "allow"
|
||||||
"ls -la .opencode/context*": "allow"
|
"ls -la .opencode/context*": "allow"
|
||||||
|
|
@ -26,6 +18,7 @@ permissions:
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
edit:
|
edit:
|
||||||
".opencode/context/**/*.md": "allow"
|
".opencode/context/**/*.md": "allow"
|
||||||
|
".opencode/context/**/*.json": "allow"
|
||||||
"**/*.env*": "deny"
|
"**/*.env*": "deny"
|
||||||
"**/*.key": "deny"
|
"**/*.key": "deny"
|
||||||
"**/*.secret": "deny"
|
"**/*.secret": "deny"
|
||||||
|
|
@ -36,8 +29,8 @@ permissions:
|
||||||
"**/*.key": "deny"
|
"**/*.key": "deny"
|
||||||
"**/*.secret": "deny"
|
"**/*.secret": "deny"
|
||||||
task:
|
task:
|
||||||
"contextscout": "allow"
|
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
|
"contextscout": "allow"
|
||||||
---
|
---
|
||||||
|
|
||||||
# ContextManager
|
# ContextManager
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,7 @@ name: Context Retriever
|
||||||
description: Generic context search and retrieval specialist for finding relevant context files, standards, and guides in any repository
|
description: Generic context search and retrieval specialist for finding relevant context files, standards, and guides in any repository
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
list: true
|
|
||||||
bash: false
|
|
||||||
edit: false
|
|
||||||
write: false
|
|
||||||
permissions:
|
|
||||||
bash:
|
bash:
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
edit:
|
edit:
|
||||||
|
|
|
||||||
|
|
@ -2,14 +2,22 @@
|
||||||
name: ContextScout
|
name: ContextScout
|
||||||
description: Discovers and recommends context files from .opencode/context/ ranked by priority. Suggests ExternalScout when a framework/library is mentioned but not found internally.
|
description: Discovers and recommends context files from .opencode/context/ ranked by priority. Suggests ExternalScout when a framework/library is mentioned but not found internally.
|
||||||
mode: subagent
|
mode: subagent
|
||||||
tools:
|
permission:
|
||||||
read: true
|
read:
|
||||||
grep: true
|
"*": "allow"
|
||||||
glob: true
|
grep:
|
||||||
write: false
|
"*": "allow"
|
||||||
edit: false
|
glob:
|
||||||
bash: false
|
"*": "allow"
|
||||||
task: false
|
bash:
|
||||||
|
"*": "deny"
|
||||||
|
edit:
|
||||||
|
"*": "deny"
|
||||||
|
write:
|
||||||
|
"*": "deny"
|
||||||
|
task:
|
||||||
|
"*": "deny"
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# ContextScout
|
# ContextScout
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,7 @@ name: DocWriter
|
||||||
description: Documentation authoring agent
|
description: Documentation authoring agent
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.2
|
temperature: 0.2
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
edit: true
|
|
||||||
write: true
|
|
||||||
bash: false
|
|
||||||
task: true
|
|
||||||
permissions:
|
|
||||||
bash:
|
bash:
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
edit:
|
edit:
|
||||||
|
|
|
||||||
|
|
@ -3,57 +3,29 @@ name: ExternalScout
|
||||||
description: Fetches live, version-specific documentation for external libraries and frameworks using Context7 and other sources. Filters, sorts, and returns relevant documentation.
|
description: Fetches live, version-specific documentation for external libraries and frameworks using Context7 and other sources. Filters, sorts, and returns relevant documentation.
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
bash: true
|
|
||||||
skill: true
|
|
||||||
grep: true
|
|
||||||
webfetch: true
|
|
||||||
write: true
|
|
||||||
edit: true
|
|
||||||
glob: true
|
|
||||||
task: false
|
|
||||||
todoread: false
|
|
||||||
todowrite: false
|
|
||||||
permissions:
|
|
||||||
read:
|
read:
|
||||||
|
"**/*": "deny"
|
||||||
".opencode/skill/context7/**": "allow"
|
".opencode/skill/context7/**": "allow"
|
||||||
".tmp/external-context/**": "allow"
|
".tmp/external-context/**": "allow"
|
||||||
"**/*": "deny"
|
|
||||||
bash:
|
bash:
|
||||||
|
"*": "deny"
|
||||||
"curl -s https://context7.com/*": "allow"
|
"curl -s https://context7.com/*": "allow"
|
||||||
"jq *": "allow"
|
"jq *": "allow"
|
||||||
"curl *": "deny"
|
|
||||||
"wget *": "deny"
|
|
||||||
"rm *": "deny"
|
|
||||||
"sudo *": "deny"
|
|
||||||
"mv *": "deny"
|
|
||||||
"cp *": "deny"
|
|
||||||
"> *": "deny"
|
|
||||||
">> *": "deny"
|
|
||||||
skill:
|
skill:
|
||||||
"context7": "allow"
|
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
webfetch:
|
"*context7*": "allow"
|
||||||
"*": "allow"
|
|
||||||
write:
|
write:
|
||||||
".tmp/external-context/**": "allow"
|
|
||||||
"**/*": "deny"
|
"**/*": "deny"
|
||||||
|
".tmp/external-context/**": "allow"
|
||||||
edit:
|
edit:
|
||||||
".tmp/external-context/**": "allow"
|
|
||||||
"**/*": "deny"
|
"**/*": "deny"
|
||||||
|
".tmp/external-context/**": "allow"
|
||||||
task:
|
task:
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
glob:
|
|
||||||
".opencode/skill/context7/**": "allow"
|
|
||||||
".tmp/external-context/**": "allow"
|
|
||||||
"**/*": "deny"
|
|
||||||
todoread:
|
|
||||||
"*": "deny"
|
|
||||||
todowrite:
|
|
||||||
"*": "deny"
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
||||||
# ExternalScout
|
# ExternalScout
|
||||||
|
|
||||||
<role>Fast documentation fetcher for external libraries/frameworks</role>
|
<role>Fast documentation fetcher for external libraries/frameworks</role>
|
||||||
|
|
|
||||||
|
|
@ -3,29 +3,25 @@ name: TaskManager
|
||||||
description: JSON-driven task breakdown specialist transforming complex features into atomic, verifiable subtasks with dependency tracking and CLI integration
|
description: JSON-driven task breakdown specialist transforming complex features into atomic, verifiable subtasks with dependency tracking and CLI integration
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
edit: true
|
|
||||||
write: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
bash: true
|
|
||||||
task: true
|
|
||||||
patch: true
|
|
||||||
permissions:
|
|
||||||
bash:
|
bash:
|
||||||
|
"*": "deny"
|
||||||
"npx ts-node*task-cli*": "allow"
|
"npx ts-node*task-cli*": "allow"
|
||||||
"mkdir -p .tmp/tasks*": "allow"
|
"mkdir -p .tmp/tasks*": "allow"
|
||||||
"mv .tmp/tasks*": "allow"
|
"mv .tmp/tasks*": "allow"
|
||||||
"*": "deny"
|
|
||||||
edit:
|
edit:
|
||||||
"**/*.env*": "deny"
|
"**/*.env*": "deny"
|
||||||
"**/*.key": "deny"
|
"**/*.key": "deny"
|
||||||
"**/*.secret": "deny"
|
"**/*.secret": "deny"
|
||||||
"node_modules/**": "deny"
|
"node_modules/**": "deny"
|
||||||
".git/**": "deny"
|
".git/**": "deny"
|
||||||
skills:
|
task:
|
||||||
- task-management
|
contextscout: "allow"
|
||||||
|
externalscout: "allow"
|
||||||
|
"*": "deny"
|
||||||
|
skill:
|
||||||
|
"*": "deny"
|
||||||
|
"task-management": "allow"
|
||||||
---
|
---
|
||||||
|
|
||||||
<context>
|
<context>
|
||||||
|
|
|
||||||
|
|
@ -3,19 +3,12 @@ name: OpenDevopsSpecialist
|
||||||
description: DevOps specialist subagent - CI/CD, infrastructure as code, deployment automation
|
description: DevOps specialist subagent - CI/CD, infrastructure as code, deployment automation
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
write: true
|
|
||||||
edit: true
|
|
||||||
bash: true
|
|
||||||
task: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
permissions:
|
|
||||||
task:
|
task:
|
||||||
contextscout: "allow"
|
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
|
contextscout: "allow"
|
||||||
bash:
|
bash:
|
||||||
|
"*": "deny"
|
||||||
"docker build *": "allow"
|
"docker build *": "allow"
|
||||||
"docker compose up *": "allow"
|
"docker compose up *": "allow"
|
||||||
"docker compose down *": "allow"
|
"docker compose down *": "allow"
|
||||||
|
|
@ -31,7 +24,6 @@ permissions:
|
||||||
"terraform validate *": "allow"
|
"terraform validate *": "allow"
|
||||||
"npm run build *": "allow"
|
"npm run build *": "allow"
|
||||||
"npm run test *": "allow"
|
"npm run test *": "allow"
|
||||||
"*": "deny"
|
|
||||||
edit:
|
edit:
|
||||||
"**/*.env*": "deny"
|
"**/*.env*": "deny"
|
||||||
"**/*.key": "deny"
|
"**/*.key": "deny"
|
||||||
|
|
|
||||||
|
|
@ -3,22 +3,12 @@ name: OpenFrontendSpecialist
|
||||||
description: Frontend UI design specialist - subagent for design systems, themes, animations
|
description: Frontend UI design specialist - subagent for design systems, themes, animations
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.2
|
temperature: 0.2
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
write: true
|
|
||||||
edit: true
|
|
||||||
bash: false
|
|
||||||
task: true
|
|
||||||
glob: true
|
|
||||||
grep: true
|
|
||||||
permissions:
|
|
||||||
task:
|
task:
|
||||||
|
"*": "deny"
|
||||||
contextscout: "allow"
|
contextscout: "allow"
|
||||||
externalscout: "allow"
|
externalscout: "allow"
|
||||||
"*": "deny"
|
|
||||||
write:
|
write:
|
||||||
"design_iterations/**/*.html": "allow"
|
|
||||||
"design_iterations/**/*.css": "allow"
|
|
||||||
"**/*.env*": "deny"
|
"**/*.env*": "deny"
|
||||||
"**/*.key": "deny"
|
"**/*.key": "deny"
|
||||||
"**/*.secret": "deny"
|
"**/*.secret": "deny"
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,7 @@ name: ContextOrganizer
|
||||||
description: Organizes and generates context files (domain, processes, standards, templates) for optimal knowledge management
|
description: Organizes and generates context files (domain, processes, standards, templates) for optimal knowledge management
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
write: true
|
|
||||||
edit: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
task: true
|
|
||||||
permissions:
|
|
||||||
task:
|
task:
|
||||||
contextscout: "allow"
|
contextscout: "allow"
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,7 @@ name: WorkflowDesigner
|
||||||
description: Designs complete workflow definitions with context dependencies and success criteria
|
description: Designs complete workflow definitions with context dependencies and success criteria
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.1
|
temperature: 0.1
|
||||||
tools:
|
permission:
|
||||||
read: true
|
|
||||||
write: true
|
|
||||||
edit: true
|
|
||||||
grep: true
|
|
||||||
glob: true
|
|
||||||
task: true
|
|
||||||
permissions:
|
|
||||||
task:
|
task:
|
||||||
contextscout: "allow"
|
contextscout: "allow"
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
|
|
|
||||||
|
|
@ -7,15 +7,6 @@ name: Simple Responder
|
||||||
description: "Test agent that responds with 'AWESOME TESTING' - for eval framework testing"
|
description: "Test agent that responds with 'AWESOME TESTING' - for eval framework testing"
|
||||||
mode: subagent
|
mode: subagent
|
||||||
temperature: 0.0
|
temperature: 0.0
|
||||||
tools:
|
|
||||||
read: false
|
|
||||||
write: false
|
|
||||||
edit: false
|
|
||||||
grep: false
|
|
||||||
glob: false
|
|
||||||
bash: false
|
|
||||||
task: false
|
|
||||||
patch: false
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Simple Responder - Test Agent
|
# Simple Responder - Test Agent
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ Based on [OpenCode documentation](https://opencode.ai/docs/agents/), these are t
|
||||||
- `prompt` - Custom prompt file path (e.g., `{file:./prompts/build.txt}`)
|
- `prompt` - Custom prompt file path (e.g., `{file:./prompts/build.txt}`)
|
||||||
- `hidden` - Hide from @ autocomplete (subagents only)
|
- `hidden` - Hide from @ autocomplete (subagents only)
|
||||||
- `tools` - Tool access configuration
|
- `tools` - Tool access configuration
|
||||||
- `permission` - Permission rules for tools
|
- `permission` - Permission rules for tools (v1.1.1+, replaces deprecated `permissions`)
|
||||||
|
|
||||||
### Example Valid Frontmatter
|
### Example Valid Frontmatter
|
||||||
|
|
||||||
|
|
@ -118,7 +118,7 @@ tools:
|
||||||
glob: true
|
glob: true
|
||||||
write: false
|
write: false
|
||||||
edit: false
|
edit: false
|
||||||
permission:
|
permission: # v1.1.1+ (singular, not plural)
|
||||||
bash:
|
bash:
|
||||||
"*": ask
|
"*": ask
|
||||||
"git *": allow
|
"git *": allow
|
||||||
|
|
@ -382,6 +382,37 @@ Then run:
|
||||||
|
|
||||||
## Migration Guide
|
## Migration Guide
|
||||||
|
|
||||||
|
### Migrating from permissions (plural) to permission (singular)
|
||||||
|
|
||||||
|
**OpenCode v1.1.1+ Change**: The field name changed from `permissions:` (plural) to `permission:` (singular).
|
||||||
|
|
||||||
|
**Before** (deprecated):
|
||||||
|
```yaml
|
||||||
|
permissions:
|
||||||
|
bash:
|
||||||
|
"*": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
**After** (v1.1.1+):
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"*": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Migration Steps**:
|
||||||
|
1. Find all agents using `permissions:` (plural)
|
||||||
|
```bash
|
||||||
|
grep -r "^permissions:" .opencode/agent/
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Replace with `permission:` (singular) in each file
|
||||||
|
|
||||||
|
3. Verify no validation errors:
|
||||||
|
```bash
|
||||||
|
opencode agent validate
|
||||||
|
```
|
||||||
|
|
||||||
### Migrating Existing Agents
|
### Migrating Existing Agents
|
||||||
|
|
||||||
**Step 1**: Identify agents with extra fields
|
**Step 1**: Identify agents with extra fields
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,12 @@ tools: # Tool access
|
||||||
bash: false
|
bash: false
|
||||||
task: false
|
task: false
|
||||||
|
|
||||||
permissions: # Permission rules
|
permission: # Permission rules (v1.1.1+)
|
||||||
|
"*": "ask" # Catch-all (last-match-wins)
|
||||||
|
read: "allow" # Specific override
|
||||||
bash:
|
bash:
|
||||||
"git *": "allow"
|
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
|
"git status*": "allow"
|
||||||
edit:
|
edit:
|
||||||
"**/*.env*": "deny"
|
"**/*.env*": "deny"
|
||||||
task:
|
task:
|
||||||
|
|
@ -72,7 +74,7 @@ tools:
|
||||||
write: true
|
write: true
|
||||||
bash: true
|
bash: true
|
||||||
task: true
|
task: true
|
||||||
permissions:
|
permission:
|
||||||
bash:
|
bash:
|
||||||
"npx vitest *": "allow"
|
"npx vitest *": "allow"
|
||||||
"pytest *": "allow"
|
"pytest *": "allow"
|
||||||
|
|
@ -108,11 +110,11 @@ tools:
|
||||||
|
|
||||||
### 3. Wrong Field Names ❌
|
### 3. Wrong Field Names ❌
|
||||||
```yaml
|
```yaml
|
||||||
permission: # ❌ Should be 'permissions'
|
permissions: # ❌ Deprecated - use 'permission' (singular)
|
||||||
bash:
|
bash:
|
||||||
"*": "deny"
|
"*": "deny"
|
||||||
```
|
```
|
||||||
**Fix**: Use correct field name `permissions:`
|
**Fix**: Use correct field name `permission:` (singular, v1.1.1+)
|
||||||
|
|
||||||
### 4. Extra Delimiter Blocks ❌
|
### 4. Extra Delimiter Blocks ❌
|
||||||
```yaml
|
```yaml
|
||||||
|
|
@ -158,7 +160,7 @@ dependencies: [] # ❌ Not valid
|
||||||
- [ ] Only valid OpenCode fields?
|
- [ ] Only valid OpenCode fields?
|
||||||
- [ ] No duplicate keys?
|
- [ ] No duplicate keys?
|
||||||
- [ ] No orphaned list items?
|
- [ ] No orphaned list items?
|
||||||
- [ ] Correct field names (`permissions` not `permission`)?
|
- [ ] Correct field names (`permission` not `permissions`)?
|
||||||
- [ ] Only one `---` delimiter at top?
|
- [ ] Only one `---` delimiter at top?
|
||||||
- [ ] Metadata moved to agent-metadata.json?
|
- [ ] Metadata moved to agent-metadata.json?
|
||||||
- [ ] Valid YAML syntax?
|
- [ ] Valid YAML syntax?
|
||||||
|
|
@ -178,7 +180,7 @@ grep -A 50 "^---$" agent.md | grep -E "^[a-z_]+:" | sort | uniq -d
|
||||||
grep -A 50 "^---$" agent.md | grep -E "^[a-z_]+:" | cut -d: -f1
|
grep -A 50 "^---$" agent.md | grep -E "^[a-z_]+:" | cut -d: -f1
|
||||||
```
|
```
|
||||||
|
|
||||||
**Valid keys**: `name`, `description`, `mode`, `temperature`, `model`, `maxSteps`, `disable`, `hidden`, `prompt`, `tools`, `permissions`, `skills`
|
**Valid keys**: `name`, `description`, `mode`, `temperature`, `model`, `maxSteps`, `disable`, `hidden`, `prompt`, `tools`, `permission`, `skills`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,378 @@
|
||||||
|
<!-- Context: openagents-repo/standards/permission-patterns | Priority: critical | Version: 1.0 | Updated: 2026-02-01 -->
|
||||||
|
# Standard: Permission Patterns for OpenCode v1.1.1+
|
||||||
|
|
||||||
|
**Purpose**: Comprehensive permission configuration patterns for different agent types
|
||||||
|
**Priority**: CRITICAL - Load this before configuring agent permissions
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Core Principle
|
||||||
|
|
||||||
|
OpenCode v1.1.1+ uses `permission:` (singular) with granular control over tool access. Rules follow **last-matching-wins** evaluation order.
|
||||||
|
|
||||||
|
**Why**: Granular permissions prevent unintended actions while allowing necessary operations.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Permission Evaluation Order
|
||||||
|
|
||||||
|
**Last matching rule wins** - Common pattern:
|
||||||
|
1. Catch-all `"*"` first (default behavior)
|
||||||
|
2. Specific overrides after (take precedence)
|
||||||
|
|
||||||
|
Example:
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"*": "deny" # Catch-all: deny all bash
|
||||||
|
"git status*": "allow" # Override: allow git status
|
||||||
|
"git diff*": "allow" # Override: allow git diff
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Valid Permission Keys
|
||||||
|
|
||||||
|
| Key | Description | Granular? | Default |
|
||||||
|
|-----|-------------|-----------|---------|
|
||||||
|
| `read` | File reading | Yes (path globs) | `"allow"` |
|
||||||
|
| `edit` | File modifications | Yes (path globs) | `"allow"` |
|
||||||
|
| `glob` | File globbing/searches | Yes | `"allow"` |
|
||||||
|
| `grep` | Content/regex search | Yes | `"allow"` |
|
||||||
|
| `list` | Directory listing | Yes | `"allow"` |
|
||||||
|
| `bash` | Shell commands | Yes (command globs) | `"allow"` |
|
||||||
|
| `task` | Subagent launches | Yes (subagent type) | `"allow"` |
|
||||||
|
| `skill` | Skill loading | Yes | `"allow"` |
|
||||||
|
| `lsp` | LSP queries | No | `"allow"` |
|
||||||
|
| `todoread` | Todo list read | No | `"allow"` |
|
||||||
|
| `todowrite` | Todo list update | No | `"allow"` |
|
||||||
|
| `webfetch` | URL fetching | Yes | `"allow"` |
|
||||||
|
| `websearch` | Web search | Yes | `"allow"` |
|
||||||
|
| `codesearch` | Code search | Yes | `"allow"` |
|
||||||
|
| `external_directory` | Out-of-project paths | Yes | `"ask"` |
|
||||||
|
| `doom_loop` | Repeated identical calls | Yes | `"ask"` |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Valid Actions
|
||||||
|
|
||||||
|
- `"allow"` - Executes without approval
|
||||||
|
- `"ask"` - Prompts user (options: once, always, reject)
|
||||||
|
- `"deny"` - Blocks immediately
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Agent Type Patterns
|
||||||
|
|
||||||
|
### Read-Only Agents (Reviewers, Analyzers)
|
||||||
|
|
||||||
|
**Use case**: Code review, analysis, security audits
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"*": "deny"
|
||||||
|
edit:
|
||||||
|
"**/*": "deny"
|
||||||
|
write:
|
||||||
|
"**/*": "deny"
|
||||||
|
task:
|
||||||
|
contextscout: "allow"
|
||||||
|
"*": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**: CodeReviewer, SecurityAuditor
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Write-Enabled Agents (Coders, Testers)
|
||||||
|
|
||||||
|
**Use case**: Code implementation, test authoring
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"rm -rf *": "ask"
|
||||||
|
"sudo *": "deny"
|
||||||
|
"chmod *": "ask"
|
||||||
|
"curl *": "ask"
|
||||||
|
"wget *": "ask"
|
||||||
|
"docker *": "ask"
|
||||||
|
"kubectl *": "ask"
|
||||||
|
# Test-specific commands (for testers)
|
||||||
|
"npx vitest *": "allow"
|
||||||
|
"npx jest *": "allow"
|
||||||
|
"pytest *": "allow"
|
||||||
|
"npm test *": "allow"
|
||||||
|
"go test *": "allow"
|
||||||
|
"cargo test *": "allow"
|
||||||
|
"*": "deny"
|
||||||
|
edit:
|
||||||
|
"**/*.env*": "deny"
|
||||||
|
"**/*.key": "deny"
|
||||||
|
"**/*.secret": "deny"
|
||||||
|
"node_modules/**": "deny"
|
||||||
|
"**/__pycache__/**": "deny"
|
||||||
|
"**/*.pyc": "deny"
|
||||||
|
".git/**": "deny"
|
||||||
|
task:
|
||||||
|
contextscout: "allow"
|
||||||
|
"*": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**: CoderAgent, TestEngineer, BuildAgent
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Orchestrators (Task Managers, Primary Agents)
|
||||||
|
|
||||||
|
**Use case**: Workflow orchestration, task delegation
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"rm -rf *": "ask"
|
||||||
|
"sudo *": "deny"
|
||||||
|
"chmod *": "ask"
|
||||||
|
"*": "ask" # More permissive for orchestration
|
||||||
|
edit:
|
||||||
|
"**/*.env*": "deny"
|
||||||
|
"**/*.key": "deny"
|
||||||
|
"**/*.secret": "deny"
|
||||||
|
"node_modules/**": "deny"
|
||||||
|
".git/**": "deny"
|
||||||
|
task:
|
||||||
|
"*": "allow" # Can delegate to any subagent
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**: OpenCoder, OpenAgent, TaskManager
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Restricted Bash Agents (Specific Commands Only)
|
||||||
|
|
||||||
|
**Use case**: Agents that need only specific bash commands
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"git status*": "allow"
|
||||||
|
"git diff*": "allow"
|
||||||
|
"git log*": "allow"
|
||||||
|
"ls *": "allow"
|
||||||
|
"cat *": "allow"
|
||||||
|
"*": "deny"
|
||||||
|
edit:
|
||||||
|
"**/*.env*": "deny"
|
||||||
|
task:
|
||||||
|
contextscout: "allow"
|
||||||
|
"*": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
**Examples**: ExternalScout, ContextScout
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Security Patterns
|
||||||
|
|
||||||
|
### Always Deny Sensitive Files
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
edit:
|
||||||
|
"**/*.env*": "deny"
|
||||||
|
"**/*.key": "deny"
|
||||||
|
"**/*.secret": "deny"
|
||||||
|
"**/*.pem": "deny"
|
||||||
|
"**/*.crt": "deny"
|
||||||
|
"**/credentials*": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Always Deny Dangerous Commands
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"sudo *": "deny"
|
||||||
|
"rm -rf /*": "deny"
|
||||||
|
"chmod 777 *": "deny"
|
||||||
|
"curl * | bash": "deny"
|
||||||
|
"wget * | sh": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Always Ask for Destructive Operations
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"rm -rf *": "ask"
|
||||||
|
"git push --force*": "ask"
|
||||||
|
"docker system prune*": "ask"
|
||||||
|
"npm publish*": "ask"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Task Permission Patterns
|
||||||
|
|
||||||
|
### Allow Specific Subagents Only
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
task:
|
||||||
|
contextscout: "allow"
|
||||||
|
externalscout: "allow"
|
||||||
|
"*": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Allow All Except Specific
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
task:
|
||||||
|
"*": "allow"
|
||||||
|
"dangerous-agent": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ask for Orchestration Agents
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
permission:
|
||||||
|
task:
|
||||||
|
contextscout: "allow" # Always allow context discovery
|
||||||
|
"coder-agent": "ask" # Ask before code generation
|
||||||
|
"build-agent": "ask" # Ask before builds
|
||||||
|
"*": "deny"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Complete Examples
|
||||||
|
|
||||||
|
### Example 1: Code Reviewer (Read-Only)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: CodeReviewer
|
||||||
|
description: Code review, security, and quality assurance agent
|
||||||
|
mode: subagent
|
||||||
|
temperature: 0.1
|
||||||
|
tools:
|
||||||
|
read: true
|
||||||
|
grep: true
|
||||||
|
glob: true
|
||||||
|
bash: false
|
||||||
|
edit: false
|
||||||
|
write: false
|
||||||
|
task: true
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"*": "deny"
|
||||||
|
edit:
|
||||||
|
"**/*": "deny"
|
||||||
|
write:
|
||||||
|
"**/*": "deny"
|
||||||
|
task:
|
||||||
|
contextscout: "allow"
|
||||||
|
"*": "deny"
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 2: Test Engineer (Write-Enabled)
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: TestEngineer
|
||||||
|
description: Test authoring and TDD agent
|
||||||
|
mode: subagent
|
||||||
|
temperature: 0.1
|
||||||
|
tools:
|
||||||
|
read: true
|
||||||
|
grep: true
|
||||||
|
glob: true
|
||||||
|
edit: true
|
||||||
|
write: true
|
||||||
|
bash: true
|
||||||
|
task: true
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"npx vitest *": "allow"
|
||||||
|
"npx jest *": "allow"
|
||||||
|
"pytest *": "allow"
|
||||||
|
"npm test *": "allow"
|
||||||
|
"go test *": "allow"
|
||||||
|
"cargo test *": "allow"
|
||||||
|
"rm -rf *": "ask"
|
||||||
|
"sudo *": "deny"
|
||||||
|
"*": "deny"
|
||||||
|
edit:
|
||||||
|
"**/*.env*": "deny"
|
||||||
|
"**/*.key": "deny"
|
||||||
|
"**/*.secret": "deny"
|
||||||
|
task:
|
||||||
|
contextscout: "allow"
|
||||||
|
"*": "deny"
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
### Example 3: Primary Orchestrator
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
name: OpenCoder
|
||||||
|
description: Orchestration agent for complex coding
|
||||||
|
mode: primary
|
||||||
|
temperature: 0.1
|
||||||
|
tools:
|
||||||
|
task: true
|
||||||
|
read: true
|
||||||
|
edit: true
|
||||||
|
write: true
|
||||||
|
grep: true
|
||||||
|
glob: true
|
||||||
|
bash: true
|
||||||
|
permission:
|
||||||
|
bash:
|
||||||
|
"rm -rf *": "ask"
|
||||||
|
"sudo *": "deny"
|
||||||
|
"chmod *": "ask"
|
||||||
|
"curl *": "ask"
|
||||||
|
"wget *": "ask"
|
||||||
|
"docker *": "ask"
|
||||||
|
"kubectl *": "ask"
|
||||||
|
edit:
|
||||||
|
"**/*.env*": "deny"
|
||||||
|
"**/*.key": "deny"
|
||||||
|
"**/*.secret": "deny"
|
||||||
|
"node_modules/**": "deny"
|
||||||
|
".git/**": "deny"
|
||||||
|
task:
|
||||||
|
"*": "allow"
|
||||||
|
---
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Validation Checklist
|
||||||
|
|
||||||
|
- [ ] Using `permission:` (singular, not `permissions:`)
|
||||||
|
- [ ] Catch-all rules (`"*"`) come FIRST
|
||||||
|
- [ ] Specific overrides come AFTER catch-all
|
||||||
|
- [ ] Sensitive files denied (`**/*.env*`, `**/*.key`, `**/*.secret`)
|
||||||
|
- [ ] Dangerous commands denied (`sudo *`, `rm -rf /*`)
|
||||||
|
- [ ] Destructive operations ask (`rm -rf *`, `git push --force*`)
|
||||||
|
- [ ] Task permissions appropriate for agent type
|
||||||
|
- [ ] Valid actions only (`"allow"`, `"ask"`, `"deny"`)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Related
|
||||||
|
|
||||||
|
- **Agent Frontmatter**: `standards/agent-frontmatter.md`
|
||||||
|
- **Subagent Structure**: `standards/subagent-structure.md`
|
||||||
|
- **Security Patterns**: `../../core/standards/security-patterns.md`
|
||||||
|
- **OpenCode Docs**: https://opencode.ai/docs/permissions/
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Last Updated**: 2026-02-01 | **Version**: 1.0.0
|
||||||
Loading…
Reference in a new issue