From c4ea3589202307a693ef35683bbb2adddd601aee Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Sun, 15 Feb 2026 10:25:44 -0600 Subject: [PATCH] fix(agents): use Write tool for file creation to prevent settings.local.json corruption Agents (executor, verifier, planner) were writing markdown files via Bash heredocs. When approved, Claude Code persisted the entire heredoc as a permission entry, breaking settings.local.json on next launch. Added explicit "use Write tool" directives to all three agents and added missing Write tool to gsd-verifier's tool list. Closes #526 Closes #491 Co-Authored-By: Claude Opus 4.6 --- agents/gsd-executor.md | 2 ++ agents/gsd-planner.md | 2 ++ agents/gsd-verifier.md | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/agents/gsd-executor.md b/agents/gsd-executor.md index ab882ea60..86a0c7d58 100644 --- a/agents/gsd-executor.md +++ b/agents/gsd-executor.md @@ -274,6 +274,8 @@ git commit -m "{type}({phase}-{plan}): {concise task description} After all tasks complete, create `{phase}-{plan}-SUMMARY.md` at `.planning/phases/XX-name/`. +**ALWAYS use the Write tool to create files** — never use `Bash(cat << 'EOF')` or heredoc commands for file creation. + **Use template:** @~/.claude/get-shit-done/templates/summary.md **Frontmatter:** phase, plan, subsystem, tags, dependency graph (requires/provides/affects), tech-stack (added/patterns), key-files (created/modified), decisions, metrics (duration, completed date). diff --git a/agents/gsd-planner.md b/agents/gsd-planner.md index b41f9711e..a2cd94ed8 100644 --- a/agents/gsd-planner.md +++ b/agents/gsd-planner.md @@ -996,6 +996,8 @@ Present breakdown with wave structure. Wait for confirmation in interactive mode Use template structure for each PLAN.md. +**ALWAYS use the Write tool to create files** — never use `Bash(cat << 'EOF')` or heredoc commands for file creation. + Write to `.planning/phases/XX-name/{phase}-{NN}-PLAN.md` Include all frontmatter fields. diff --git a/agents/gsd-verifier.md b/agents/gsd-verifier.md index 58639ec72..d0b81b665 100644 --- a/agents/gsd-verifier.md +++ b/agents/gsd-verifier.md @@ -1,7 +1,7 @@ --- name: gsd-verifier description: Verifies phase goal achievement through goal-backward analysis. Checks codebase delivers what phase promised, not just that tasks completed. Creates VERIFICATION.md report. -tools: Read, Bash, Grep, Glob +tools: Read, Write, Bash, Grep, Glob color: green --- @@ -333,6 +333,8 @@ gaps: ## Create VERIFICATION.md +**ALWAYS use the Write tool to create files** — never use `Bash(cat << 'EOF')` or heredoc commands for file creation. + Create `.planning/phases/{phase_dir}/{phase_num}-VERIFICATION.md`: ```markdown