feat: Add CoVe commands, template sync, and Python SOLID checklist#24
feat: Add CoVe commands, template sync, and Python SOLID checklist#24
Conversation
Inspired by serpro69/claude-starter-kit: adds Chain-of-Verification commands (/cove, /cove-isolated) for high-stakes accuracy, a template sync workflow for downstream projects, and Python-specific SOLID checklist items in the refactoring-specialist agent. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThis PR introduces Chain-of-Verification (CoVe) commands for multi-step answer verification, adds a GitHub Actions workflow for automated upstream template synchronization, enhances the refactoring-specialist agent with Python-specific SOLID checks, and provides corresponding documentation and test coverage. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User/Requester
participant System as Claude System
participant Agent as Verification Agent
participant Tools as Tools (Read/Grep/Bash)
User->>System: Request with CoVe command
System->>System: Step 1: Generate Baseline Response
System->>System: Step 2: Plan Verification Questions (3-8 fact-checks)
System->>Agent: Step 3: Send verification questions<br/>(Isolated: no baseline access)
Agent->>Tools: Query source code/docs
Tools-->>Agent: Return evidence
Agent-->>System: Return verification results<br/>(CONFIRMED/INCORRECT)
System->>System: Step 4: Generate Final Response<br/>Incorporate corrections if needed
System-->>User: Return verified response
sequenceDiagram
participant Scheduler as GitHub Scheduler
participant Workflow as Workflow (template-sync.yml)
participant Git as Git Operations
participant Upstream as Upstream Repository
participant PR as PR Creation
Scheduler->>Workflow: Trigger (scheduled weekly or manual)
Workflow->>Workflow: Determine template repo & branch
Workflow->>Git: Add upstream remote
Git->>Upstream: Fetch upstream branch
Upstream-->>Git: Return upstream code
Workflow->>Workflow: Compare template-managed paths<br/>(diff against upstream)
alt has_changes
Workflow->>Git: Create sync branch<br/>(template-sync/YYYYMMDD)
Git->>Workflow: Checkout upstream files
Workflow->>Git: Stage & commit changes
Git->>Workflow: Push branch
Workflow->>PR: Create/update pull request<br/>with change summary
PR-->>Workflow: PR created or already exists
else No Changes
Workflow->>Workflow: Mark as up-to-date
end
Workflow-->>Scheduler: Workflow complete
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/template-sync.yml:
- Around line 113-116: The Apply step can exit early without setting sync_branch
in GITHUB_ENV which leaves env.sync_branch empty when the "Create pull request"
step runs; add an id to the Apply step (e.g., id: apply) and set an output flag
(e.g., outputs.changed=true/false or write a flag to GITHUB_ENV) to indicate
whether a branch was created, then update the "Create pull request" step
condition to check that output (e.g., if: steps.apply.outputs.changed == 'true')
before running commands that use sync_branch or calling gh pr list --head;
ensure any path that sets sync_branch writes it to GITHUB_ENV so the PR step
only runs when sync_branch is defined.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: b2e1b0a8-e865-49d7-85fd-8a047c60dc11
📒 Files selected for processing (8)
.claude/agents/refactoring-specialist.md.claude/commands/cove-isolated.md.claude/commands/cove.md.github/workflows/template-sync.ymlREADME.mddocs/CHANGELOG.mddocs/DEVELOPMENT_PROCESS.mdtests/test_commands.py
Address CodeRabbit review: if the apply step exits early (no changes after checkout), sync_branch was never set, causing gh pr list to run with an empty --head argument. Now uses step output flag to gate the PR creation step. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace stat.S_IXUSR filesystem check with git ls-files -s mode check in test_hook_is_executable (NTFS has no Unix permission bits) - Remove stale test_sync_does_not_classify assertion that no longer matches the rewritten sync skill content Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The integration tests copy the template to a non-git directory, so git ls-files returns nothing. Fall back to stat.S_IXUSR when not in a git repo (works on Linux CI), use git mode check otherwise (works on Windows). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
Adopts three features inspired by serpro69/claude-starter-kit:
/cove,/cove-isolated) -- 4-step self-verification process based on Meta's CoVe paper for reducing hallucinations. The isolated variant runs step 3 in a separate agent to prevent confirmation bias..github/workflows/template-sync.yml) -- weekly or manual workflow that syncs template-managed files from upstream into downstream projects via PR, preserving project-specific code.refactoring-specialistagent -- adds checks for mutable default arguments, ABC/Protocol misuse, missing dependency injection, god classes,@propertyoveruse, and circular imports.Attribution added to README Credits section.
Test plan
python -m pytest tests/test_commands.py -v-- all 35 tests pass (5 new CoVe tests)python -m pytest tests/test_agents.py -v-- all 114 tests passpython -m pytest tests/ -v-- 400 passed, 7 pre-existing Windows-only failurespython -m ruff check tests/test_commands.py-- cleanpython -m ruff format --check tests/test_commands.py-- clean🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes
New Features
Documentation