Skip to content

Update agent modes and refine formatter structure#154

Merged
mahata merged 1 commit intomainfrom
fix/opencode-setting
Mar 29, 2026
Merged

Update agent modes and refine formatter structure#154
mahata merged 1 commit intomainfrom
fix/opencode-setting

Conversation

@mahata
Copy link
Copy Markdown
Owner

@mahata mahata commented Mar 29, 2026

Change agent modes from 'plan' to 'subagent' in the db-reviewer and security-auditor configurations. Improve the structure of the opencode.json formatter for better clarity and functionality.

…security-auditor configurations; refine opencode.json formatter structure
Copilot AI review requested due to automatic review settings March 29, 2026 14:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates OpenCode configuration by changing reviewer agent modes and restructuring the formatter configuration.

Changes:

  • Restructures opencode.json formatter config into a named formatter object with explicit command + extensions.
  • Updates .opencode/agents/security-auditor.md mode from plan to subagent.
  • Updates .opencode/agents/db-reviewer.md mode from plan to subagent.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
opencode.json Reworks formatter configuration; removes previously-defined global permissions.
.opencode/agents/security-auditor.md Switches agent mode to subagent.
.opencode/agents/db-reviewer.md Switches agent mode to subagent.

Comment thread opencode.json
"command": ["biome", "check", "--write", "--unsafe", "{file}"],
"extensions": ["ts", "tsx", "json"]
}
},
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The global permissions block (including denies for destructive Bash patterns and secret reads like Read(.env*)) was removed. With the current config, any agent that doesn’t define its own restrictive permissions (e.g. .opencode/agents/test-writer.md has none) may inherit more permissive defaults, and even the read-only reviewer agents no longer deny reading secret-like files. Consider restoring a conservative top-level permissions section or moving the deny patterns into each agent so tool access remains constrained.

Suggested change
},
},
"permissions": {
"fs": [
"Read(*)",
"Write(*)",
"!Read(.env*)",
"!Read(**/.env*)",
"!Read(*id_rsa*)",
"!Read(**/*id_rsa*)",
"!Read(*id_dsa*)",
"!Read(**/*id_dsa*)",
"!Read(*id_ecdsa*)",
"!Read(**/*id_ecdsa*)",
"!Read(*id_ed25519*)",
"!Read(**/*id_ed25519*)",
"!Read(*secret*)",
"!Read(**/*secret*)",
"!Read(*token*)",
"!Read(**/*token*)",
"!Read(*key*)",
"!Read(**/*key*)",
"!Read(*credentials*)",
"!Read(**/*credentials*)",
"!Read(*config.yml)",
"!Read(**/config.yml)",
"!Read(*config.yaml)",
"!Read(**/config.yaml)",
"!Read(*config.json)",
"!Read(**/config.json)"
],
"bash": [
"Run(*)",
"!Run(rm -rf /)",
"!Run(rm -rf /*)",
"!Run(rm -rf *)",
"!Run(rm -r /)",
"!Run(rm -r /*)",
"!Run(rm -r *)",
"!Run(rm *)",
"!Run(:(){ :|:& };:)",
"!Run(*mkfs* /dev/*)",
"!Run(*dd if=* of=/dev/sd*)",
"!Run(*chmod 000 / -R*)",
"!Run(*chown 0:0 / -R*)"
]
},

Copilot uses AI. Check for mistakes.
description: Review code for security issues in Cloudflare Workers, auth flows, and data handling
model: claude-sonnet
mode: plan
mode: subagent
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This agent’s mode was changed to subagent, but the repo’s OpenCode reference skill still documents that “Security auditors and code reviewers should have mode: plan” (.opencode/skills/opencode-research/SKILL.md:78). If subagent is now the correct mode, update that documentation to avoid conflicting guidance; otherwise keep mode: plan here for consistency.

Suggested change
mode: subagent
mode: plan

Copilot uses AI. Check for mistakes.
description: Review database schema, migrations, and queries for correctness and performance
model: claude-sonnet
mode: plan
mode: subagent
Copy link

Copilot AI Mar 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This agent’s mode was changed to subagent, but the repo’s OpenCode reference skill still documents that “Security auditors and code reviewers should have mode: plan” (.opencode/skills/opencode-research/SKILL.md:78). If subagent is now the intended mode, update that documentation to prevent inconsistency; otherwise keep mode: plan here.

Suggested change
mode: subagent
mode: plan

Copilot uses AI. Check for mistakes.
@mahata mahata merged commit 5850133 into main Mar 29, 2026
7 checks passed
@mahata mahata deleted the fix/opencode-setting branch March 29, 2026 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants