Skip to content

Commit 639129c

Browse files
authored
fix(agents): align permissionMode acceptEdits across plugin and project layers (#732)
permissionMode: acceptEdits was declared only in the project copies of the documentation-writer and refactor-assistant write agents; the plugin copies omitted it, so the same write agents prompted on every edit in the standalone plugin distribution. Add the field to both plugin copies to align the layers, and document in CUSTOM_EXTENSIONS.md that permissionMode is kept identical across layers (it was previously missing from the intended-layer-diff list, making the gap a silent capability drift).
1 parent dae613d commit 639129c

3 files changed

Lines changed: 3 additions & 1 deletion

File tree

docs/CUSTOM_EXTENSIONS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ pwsh scripts/sync_references.ps1 # Windows
210210

211211
**Type**: Repository-internal convention
212212

213-
The eight agent definitions exist in two layers — `project/.claude/agents/` and the standalone `plugin/agents/` bundle. They are near-duplicates but **not** byte-identical by design: frontmatter differs per layer (the project copy carries `color:`; neither carries the non-canonical `temperature:` field), and the body genericizes exactly one repo-specific "language-specific rules" sentence in the plugin copy.
213+
The eight agent definitions exist in two layers — `project/.claude/agents/` and the standalone `plugin/agents/` bundle. They are near-duplicates but **not** byte-identical by design: frontmatter differs per layer (the project copy carries `color:`; neither carries the non-canonical `temperature:` field; `permissionMode: acceptEdits` is kept identical across both layers for the two write agents, documentation-writer and refactor-assistant), and the body genericizes exactly one repo-specific "language-specific rules" sentence in the plugin copy.
214214

215215
**CI enforcement**: `.github/workflows/validate-skills.yml` runs `scripts/check_agents.sh` (PowerShell twin: `scripts/check_agents.ps1`). It strips frontmatter and normalizes that single sentence, then fails (exit 2) if the agent **bodies** otherwise diverge — so a behavioral instruction edited in one layer but not the other cannot ship silently.
216216

plugin/agents/documentation-writer.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ model: sonnet
55
tools: Read, Write, Edit, Glob
66
maxTurns: 30
77
effort: high
8+
permissionMode: acceptEdits
89
memory: project
910
initialPrompt: "Check your memory for established documentation patterns and style conventions in this project."
1011
applies_to:

plugin/agents/refactor-assistant.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ model: sonnet
55
tools: Read, Edit, Glob, Grep
66
maxTurns: 25
77
effort: high
8+
permissionMode: acceptEdits
89
memory: project
910
initialPrompt: "Check your memory for past refactoring decisions and established patterns in this project."
1011
applies_to:

0 commit comments

Comments
 (0)