Skip to content

fix(code-review): grant Write to JSON-pipeline reviewer agents#741

Merged
tmchow merged 1 commit intomainfrom
tmchow/debug-issue-733
May 1, 2026
Merged

fix(code-review): grant Write to JSON-pipeline reviewer agents#741
tmchow merged 1 commit intomainfrom
tmchow/debug-issue-733

Conversation

@tmchow
Copy link
Copy Markdown
Collaborator

@tmchow tmchow commented May 1, 2026

Summary

Persona reviewers spawned by /ce-code-review were not writing run-artifact files to /tmp/compound-engineering/ce-code-review/<run-id>/, even though the subagent template explicitly instructs each persona to do so as "the one permitted write." Headless detail enrichment depends on those files for Why: and Evidence: lines, so the missing artifacts silently degraded review output.

The cause was a declaration mismatch: all 17 JSON-pipeline persona agents declared tools: Read, Grep, Glob, Bash in frontmatter — Write was never granted. The skill's instruction to use the file-write tool was unsatisfiable. Adding Write to each persona's allowlist makes the documented contract actually executable.

Change

Layer Persona agents updated
Always-on (4) ce-correctness-reviewer, ce-testing-reviewer, ce-maintainability-reviewer, ce-project-standards-reviewer
Cross-cutting conditional (7) ce-security-reviewer, ce-performance-reviewer, ce-api-contract-reviewer, ce-data-migrations-reviewer, ce-reliability-reviewer, ce-adversarial-reviewer, ce-previous-comments-reviewer
Stack-specific (6) ce-dhh-rails-reviewer, ce-kieran-rails-reviewer, ce-kieran-python-reviewer, ce-kieran-typescript-reviewer, ce-julik-frontend-races-reviewer, ce-swift-ios-reviewer

Unstructured-output agents (ce-agent-native-reviewer, ce-learnings-researcher, ce-schema-drift-detector, ce-deployment-verification-agent, ce-data-migration-expert) were left untouched — they don't follow the artifact-write contract.

Regression guard

Added tests/review-skill-contract.test.ts "JSON-pipeline persona agents grant Write so they can save run artifacts", which iterates all 17 personas and asserts Write is in their tools frontmatter. The pre-existing assertion only covered Read/Grep/Glob/Bash and missed this gap.

bun test (1047 tests) passes; bun run release:validate is clean.

Fixes #733


Compound Engineering
Claude Code

The ce-code-review subagent template instructs each persona to write its
full analysis to /tmp/compound-engineering/ce-code-review/{run_id}/{reviewer}.json,
and SKILL.md documents this as "the one permitted write." All 17
JSON-pipeline persona agents declared tools: Read, Grep, Glob, Bash --
Write was never granted, so the instructed write was unsatisfiable and
no run-artifact files appeared, breaking headless detail enrichment.

Add Write to the tools allowlist for all 17 personas (always-on,
cross-cutting conditional, and stack-specific). Extend
review-skill-contract.test.ts to assert Write is present so this cannot
regress.

Fixes #733

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@tmchow tmchow merged commit 520a9eb into main May 1, 2026
2 checks passed
@github-actions github-actions Bot mentioned this pull request May 1, 2026
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.

Code reviewers fail to write output to file

1 participant