chore(claude): modernize setup + enable parallel worktree agents#154
Conversation
- Add tracked .claude/settings.json (permissions + outputStyle) so config reaches parallel worktrees/teammates; hooks stay local for fork safety - Add .worktreeinclude to copy local settings/hooks/.env into new worktrees; gitignore .claude/worktrees/ - Migrate skills to .claude/skills/<name>/SKILL.md so they actually load (flat .md files were never discovered by Claude Code 2.x) - Add .mcp.json pinning Context7 for the whole project - Trim CLAUDE.md 580->179 lines; move history/usage/dir-map to docs/active/wasm-migration-history.md; add docs/active/parallel-agents.md - isolation: worktree on wasm-engine-verifier subagent - Bump version 4.42.6 -> 4.42.7 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThis PR adds worktree-based parallel-agent infrastructure and copying rules, configures MCP/tool permissions, rewrites the developer guide into a Dual-Engine CPU Guide, adds parallel-agent and WASM migration docs, and bumps APP_VERSION to 4.42.7. ChangesParallel Agent Infrastructure & Developer Guide
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/active/wasm-migration-history.md (1)
68-86: 💤 Low valueConsider demonstrating LoggingService in documentation examples.
The code example uses
console.logon lines 80 and 84. While this is standard for documentation examples, given the project's strict "noconsole.log" guideline and emphasis on LoggingService, these examples could reinforce the preferred pattern.📚 Optional refinement to demonstrate preferred pattern
import { DualEngine } from './src/core/cpu-engines'; +import { LoggingService } from './src/services/logging/LoggingService'; const dualEngine = new DualEngine(bus, 'JS'); // Start with JS engine await dualEngine.initialize(); // Switch to WASM for performance await dualEngine.switchEngine('WASM'); // Get performance comparison const comparison = await dualEngine.compareEngines(); -console.log(`WASM is ${comparison.speedup}x faster!`); +LoggingService.info(`WASM is ${comparison.speedup}x faster!`); // Listen for engine switches dualEngine.onEngineSwitch((event) => { - console.log(`Switched from ${event.from} to ${event.to}`); + LoggingService.info(`Switched from ${event.from} to ${event.to}`); });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/active/wasm-migration-history.md` around lines 68 - 86, Replace the console.log calls in the DualEngine example with the project's LoggingService usage: import or obtain a logger (e.g., LoggingService or getLogger) and use it to log the engine comparison and engine-switch events; update the snippet to create/obtain a logger before calling dualEngine.initialize() and replace console.log in the comparison output and the onEngineSwitch handler with logger.info/debug calls, referencing DualEngine, initialize, switchEngine, compareEngines, and onEngineSwitch so readers know where to integrate logging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CLAUDE.md`:
- Line 15: Update the version reference in CLAUDE.md: change the string
"current: 4.42.0" to "current: 4.42.7" so it matches the bumped version in
src/version.ts and the PR description; search for the exact text "current:
4.42.0" in CLAUDE.md and replace it with "current: 4.42.7".
---
Nitpick comments:
In `@docs/active/wasm-migration-history.md`:
- Around line 68-86: Replace the console.log calls in the DualEngine example
with the project's LoggingService usage: import or obtain a logger (e.g.,
LoggingService or getLogger) and use it to log the engine comparison and
engine-switch events; update the snippet to create/obtain a logger before
calling dualEngine.initialize() and replace console.log in the comparison output
and the onEngineSwitch handler with logger.info/debug calls, referencing
DualEngine, initialize, switchEngine, compareEngines, and onEngineSwitch so
readers know where to integrate logging.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: b441284d-5026-4cd4-bdc2-8fdddc01f836
📒 Files selected for processing (11)
.claude/agents/wasm-engine-verifier.md.claude/settings.json.claude/skills/engine-parity-check/SKILL.md.claude/skills/wasm-optimization/SKILL.md.gitignore.mcp.json.worktreeincludeCLAUDE.mddocs/active/parallel-agents.mddocs/active/wasm-migration-history.mdsrc/version.ts
Dashboard default left auto-review off, so PRs only got a summary with status "Review skipped". Version-control the setting so reviews run and the behavior is explicit/reproducible. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- CLAUDE.md: drop hardcoded "4.42.0" from version rule (version.ts is the single source of truth) — fixes the stale version reference - wasm-migration-history.md: use loggingService.info(source, message) in the DualEngine example instead of console.log, matching the project convention (CodeRabbit's suggested LoggingService.info(msg) had the wrong signature; the real API is the loggingService singleton with a (source, message) arg) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Context
Audited the project's Claude Code setup against current (May 2026) best practices and wired up a git-worktree workflow so multiple agents can work on different features in parallel. The existing setup was already mature; these are targeted gap-fixes, not a rewrite.
Changes
.claude/settings.json(auto-inherited) +.worktreeincludecopies local hooks/env into each worktree.mdfiles Claude Code 2.x never loaded.claude/skills/<name>/SKILL.md(confirmed loading).mcp.jsonpins it project-widedocs/active/wasm-migration-history.mdisolation: worktreeonwasm-engine-verifierdocs/active/parallel-agents.mdDesign notes
.gitignoredocuments that active hooks are kept local so fork PRs can't inject auto-executing code. Committedsettings.jsoncarries only permissions + output style;.worktreeincludecopies the maintainer's local hooks into worktrees without committing them.Bash(rm:*)deliberately excluded from the committed allowlist (kept in localsettings.local.json). A blanket recursive-delete grant is a poor default for teammates and auto-spawned worktree agents.git mvto preserve history.Using parallel agents
claude --worktree feature-name # isolated session on its own branch + worktreeSee
docs/active/parallel-agents.mdfor config inheritance and cleanup.Verification
yarn lint✅ ·yarn type-check✅ ·yarn test:ci✅ (685 passed, 18 skipped — WASM benchmark/parity skip without a loaded module, as documented) ·yarn lint:md:fix✅ (0 errors)engine-parity-check+wasm-optimizationnow appear in the loaded-skills list (were absent before)🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Chores