Skip to content

Add configurable review agents via .local.md settings#124

Open
kieranklaassen wants to merge 10 commits intomainfrom
feat/compound-engineering-setup
Open

Add configurable review agents via .local.md settings#124
kieranklaassen wants to merge 10 commits intomainfrom
feat/compound-engineering-setup

Conversation

@kieranklaassen
Copy link
Collaborator

@kieranklaassen kieranklaassen commented Jan 26, 2026

Summary

Adds per-project review agent configuration using the .local.md plugin settings pattern. Run /compound-engineering-setup to generate a settings file, or let workflows auto-detect your project type and pick sensible defaults.

Settings file

---
review_agents: [kieran-rails-reviewer, dhh-rails-reviewer, code-simplicity-reviewer, security-sentinel, performance-oracle]
plan_review_agents: [kieran-rails-reviewer, code-simplicity-reviewer]
---

# Review Context

Add project-specific review instructions here.
Focus on N+1 queries — we've had issues in the brief system.
Skip agent-native checks for internal admin pages.

Setup command

/compound-engineering-setup detects your project type (Rails, Python, TypeScript, or General) and creates .claude/compound-engineering.local.md with appropriate defaults. Edit the file anytime to add/remove agents or add review context that gets passed to all agents.

Config-aware workflows

/workflows:review and /workflows:work read agents from the settings file when present. Without it, they auto-detect project type and use defaults — no config required.

Conditional agents (migrations, frontend, architecture, data integrity) stay hardcoded — they trigger based on file patterns in the PR, not user config.

Schema drift detection

Wires the existing schema-drift-detector agent into /workflows:review — runs first on any PR touching db/migrate/ or db/schema.rb to catch unrelated schema changes before other DB reviewers run.

Test plan

  • Run /compound-engineering-setup in a Rails project — verify it detects Rails and creates .local.md with Rails defaults
  • Run /compound-engineering-setup when .local.md already exists — verify it asks before overwriting
  • Run /workflows:review with .local.md present — verify it uses configured agents
  • Run /workflows:review without .local.md — verify it falls back to auto-detected defaults
  • Run /workflows:review on a PR with db/migrate/ files — verify schema-drift-detector runs
  • Run /workflows:work — verify it reads from .local.md when present

🤖 Generated with Claude Code

kieranklaassen and others added 6 commits January 25, 2026 23:13
Adds a new setup command that allows users to configure which review
agents to use instead of hardcoding them in workflows. This enables:

- Multi-step onboarding with AskUserQuestion for easy setup
- Auto-detection of project type (Rails, Python, TypeScript, etc.)
- Three setup modes: Quick (smart defaults), Advanced, and Minimal
- Configuration stored in .claude/compound-engineering.json
- Support for both global (~/.claude/) and project-specific config

Updated workflows to read from config:
- /workflows:review - reads reviewAgents from config
- /plan_review - reads planReviewAgents from config
- /workflows:work - references config for reviewer agents
- /workflows:compound - references config for specialized agents

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Workflows now detect missing config and offer inline quick setup:
- "Quick Setup" - auto-detect project type, create config, continue
- "Full Setup" - run /compound-engineering-setup for customization
- "Skip" - use defaults just this once

This ensures users get onboarded automatically when running any
workflow for the first time, without needing to know about the
setup command beforehand.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Extended /workflows:review to invoke conditional agents for:
- migrations (existing)
- frontend (new): JS/TS/Stimulus changes
- architecture (new): structural changes, 10+ files
- data (new): model/ActiveRecord changes

Each category reads from conditionalAgents.* config key and
runs appropriate specialized agents when file patterns match.

Resolves: todos/001-ready-p2-conditional-agents-not-invoked.md

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Auto-detect custom agents in .claude/agents/ and ~/.claude/agents/
- Add modify existing config flow (add/remove agents, view config)
- Include guide for creating custom review agents
- Add customAgents mapping in config to track agent file paths
- Update changelog with new config schema including customAgents

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@kieranklaassen kieranklaassen force-pushed the feat/compound-engineering-setup branch from 3e765f7 to a1413c9 Compare January 26, 2026 04:42
- Add "Ask more questions" option at handoff phase
- Clarify that Claude should ask the user questions (not wait for user)
- Require resolving ALL open questions before offering to proceed

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@kieranklaassen
Copy link
Collaborator Author

@tmchow curious what you think of this one

kieranklaassen and others added 2 commits February 8, 2026 21:28
Resolve conflicts favoring main's versions for workflow files
that will be reworked with simplified settings approach.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Rewrite setup.md (486 → 95 lines): detect project type, create
  .claude/compound-engineering.local.md with smart defaults
- Make review.md and work.md config-aware: read agents from .local.md
  frontmatter, fall back to auto-detected defaults
- Wire schema-drift-detector into review.md migrations conditional block
- Delete technical_review.md (duplicated /plan_review)
- Add disable-model-invocation to setup.md
- Bump to v2.32.0

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@kieranklaassen kieranklaassen changed the title feat(commands): add /compound-engineering-setup for configurable agents Simplify plugin settings: .local.md pattern replaces JSON wizard Feb 9, 2026
@kieranklaassen kieranklaassen changed the title Simplify plugin settings: .local.md pattern replaces JSON wizard Add configurable review agents via .local.md settings Feb 9, 2026
…rkflow

- Converters now rewrite .claude/ → .opencode/ (OpenCode) and .codex/ (Codex)
  in command bodies and agent bodies so .local.md settings work cross-platform
- Apply transformContentForCodex to agent bodies (was only commands before)
- Add GitHub Action to auto-publish to npm on version bump merge to main
- Bump to v0.4.0

Co-Authored-By: Claude Opus 4.6 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant