Skip to content

feat(skills): import CodeRabbit AI learnings as validated skills#201

Merged
rjmurillo merged 37 commits into
mainfrom
chore/coderabbit-learnings-import
Dec 22, 2025
Merged

feat(skills): import CodeRabbit AI learnings as validated skills#201
rjmurillo merged 37 commits into
mainfrom
chore/coderabbit-learnings-import

Conversation

@rjmurillo-bot

Copy link
Copy Markdown
Collaborator

Summary

  • Import 12 learnings from CodeRabbit AI export CSV file
  • Validate each learning for atomicity score (reject vague learnings)
  • Check for duplicates against existing skills
  • Create new skills memory file with 8 validated skills
  • Add cross-reference to existing skills-linting memory

Learnings Analysis

Metric Count
Total Learnings Imported 12
Valid Skills Created 8
Duplicates Identified 4
Atomicity Score Range 88-95%

Skills Created

  1. Skill-CodeRabbit-001: MCP tool path case sensitivity (95%)
  2. Skill-CodeRabbit-002: Template bracket notation placeholders (93%)
  3. Skill-CodeRabbit-003: Infrastructure naming avoids spaces (90%)
  4. Skill-CodeRabbit-004: Expression injection labeling is intentional (95%)
  5. Skill-CodeRabbit-005: MCP tool naming with duplicated segments (92%)
  6. Skill-CodeRabbit-006: Generated files omit edit warnings (90%)
  7. Skill-CodeRabbit-007: Analyst vs impact analysis architecture (95%)
  8. Skill-CodeRabbit-008: Nested code fence syntax (88%)

Duplicates Identified

Learnings 7-10 from the CSV were already covered by skills-linting memory:

  • MD031/MD032 configuration deference (Skill-Lint-002, Skill-Lint-005, Skill-Lint-008)

Files Changed

  • .serena/memories/skills-coderabbit-learnings.md (new)
  • .serena/memories/skills-linting.md (cross-reference added)

Test plan

  • Verify no duplicate skills with existing memories
  • Verify atomicity scores are 70%+ (all are 88%+)
  • Verify source attribution is documented
  • Verify cross-references between related skills

🤖 Generated with Claude Code

Copilot AI and others added 23 commits December 20, 2025 09:36
…ignment

- Add Invoke-CopilotAssignment.ps1 script for synthesizing context from trusted sources
- Add copilot-synthesis.yml config with maintainers and AI agents configuration
- Add Pester tests (60 tests) for the synthesis script
- Update SKILL.md with documentation for copilot operations

Implements Issue #92 Phase 1

Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
- Move reusable functions to GitHubHelpers.psm1:
  - Get-IssueComments, Update-IssueComment, New-IssueComment
  - Get-TrustedSourceComments (useful for pr-comment-responder)
- Move script from scripts/copilot/ to scripts/issue/ (no nested dir)
- Move config from .github/ to .claude/skills/github/ (app config)
- Use config extraction patterns in Get-CodeRabbitPlan
- Fix timestamp to use Get-Date -AsUTC
- Remove unused $IssueTitle parameter from New-SynthesisComment
- Fix regex efficiency (remove redundant Where-Object)
- Update tests to reflect new structure

Addresses PR review feedback from @rjmurillo

Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
- Fix YAML parsing bug: synthesis marker regex now specifically targets
  'synthesis:' section to avoid matching 'ai_triage.marker' first
- Add 29 functional tests that execute functions and verify behavior:
  - Get-MaintainerGuidance: empty input, bullet extraction, checkboxes
  - Get-CodeRabbitPlan: implementation extraction, issue references
  - Get-AITriageInfo: priority/category extraction
  - Find-ExistingSynthesis: idempotency marker detection
  - New-SynthesisComment: comment generation with all sections
  - Get-SynthesisConfig: YAML parsing and marker extraction

Total: 90 tests pass (61 pattern-based + 29 functional)

Co-authored-by: rjmurillo-bot <250269933+rjmurillo-bot@users.noreply.github.com>
- Use deep copy for config hashtable to avoid modifying defaults
- Wrap ForEach-Object results in @() to ensure arrays (not null)
- Use JSON payload via --input for large comment bodies in both
  Update-IssueComment and New-IssueComment functions

All 146 tests pass.

Co-authored-by: rjmurillo <6811113+rjmurillo@users.noreply.github.com>
…nment

Addresses cursor[bot] review comments:

- Fix module path: Use "../.." to navigate from scripts/issue/ to modules/
  (was using only ".." which resolved to non-existent scripts/modules/)
- Fix corrupted Unicode: Replace corrupted emoji in related_prs pattern
  with correct link emoji

Comment-ID: 2637061449, 2637061451

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add PR reviewers to ai_agents trusted sources:
- Copilot (GitHub Copilot)
- cursor[bot] (Cursor Bugbot)

Updated both config file and script defaults.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive inline documentation covering:
- Purpose and overview of the synthesis system
- Usage examples and related files
- Detailed explanation of trusted_sources section
- Description of each AI agent and their contributions
- Extraction patterns with examples
- Synthesis marker and idempotency behavior
- Extension guide for adding maintainers, agents, and patterns

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
rjmurillo-bot is a bot account, so it belongs in ai_agents rather than
maintainers. Updated config, script defaults, and tests to match.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements the GitHub Actions workflow for automated Copilot context
synthesis and assignment when the 'copilot-ready' label is added.

Changes:
- Create .github/workflows/copilot-context-synthesis.yml workflow
  - Triggers on issues:labeled event with 'copilot-ready' gate
  - Supports workflow_dispatch for manual testing
  - Generates step summary on success
- Fix empty comments handling in Invoke-CopilotAssignment.ps1
  - Wrap comments in @() to ensure array even if null
- Fix Get-TrustedSourceComments in GitHubHelpers.psm1
  - Add [AllowEmptyCollection()] attribute
  - Return empty array early for empty input

Addresses all acceptance criteria from Issue #92 Phase 4.

Fixes #92

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add step to remove the copilot-ready label after successful processing
- Only removes label for labeled trigger (not workflow_dispatch)
- Update step summary to reflect label removal action

Also created the copilot-ready label:
- Color: #6e40c9 (GitHub Copilot purple)
- Description: Triggers automated context synthesis and Copilot assignment

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add a second job that runs hourly to catch any missed issues:

- schedule: Runs every hour via cron "0 * * * *"
- sweep-missed job: Lists all open issues with copilot-ready label
- Processes each issue using the same Invoke-CopilotAssignment.ps1 (DRY)
- Removes label after successful processing
- Continues processing even if individual issues fail

Smart workflow_dispatch modes:
- With issue_number: Process single issue
- Without issue_number: Run sweep mode

Both jobs use the same PowerShell script as the single source of truth,
ensuring consistent behavior across all trigger types.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comprehensive analysis of 56 review comments:
- 47 addressed (84%), 9 pending (16%)
- P0 (Blocking): 0 - All resolved
- P1 (High): 2 items (functional tests complete)
- P2 (Medium): 4 items (deferred to follow-up)
- P3 (Low): 3 items (cosmetic)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Session 38: Executed action plan for PR #147 review feedback
- Verified 90/90 tests pass (including functional tests)
- Posted summary comment and re-requested review from rjmurillo
- All P1 items complete, P2-P3 deferred to follow-up

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use non-greedy regex quantifier with boundary for maintainers/ai_agents
  extraction to prevent over-matching in YAML parsing (P2-001)
- Add RelatedPRs to hasAIContent check so AI recommendations section
  displays when only related PRs exist (P2-002)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Define where test files should be located:
- All Pester tests in /tests/ directory at repo root
- Naming convention: {ScriptName}.Tests.ps1
- Pattern-based vs functional test organization

Addresses P2-003 from PR #147 review feedback.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Define JSON Schema for copilot-synthesis.yml covering:
- trusted_sources (maintainers, ai_agents)
- extraction_patterns (coderabbit, ai_triage)
- synthesis (marker)

Enables IDE validation and autocompletion for config files.
Addresses P2-004 from PR #147 review feedback.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add edge case test coverage for:
- Empty and malformed config file handling
- Multiple maintainer comments order preservation
- Unicode character handling in patterns
- RelatedPRs visibility in AI section

Add test approach documentation explaining:
- Pattern-based tests for structural validation
- Functional tests for behavior verification
- Why both approaches are used together

Addresses P3-001 and P3-003 from PR #147 review feedback.
Total tests: 100

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Import 12 learnings from CodeRabbit AI export, validating each for
atomicity and checking against existing skills for duplicates.

Summary:
- 8 valid skills created (7 new + 1 supplementary)
- 4 duplicates identified (already in skills-linting)
- Cross-reference added to skills-linting

Skills added:
- Skill-CodeRabbit-001: MCP tool path case sensitivity (95%)
- Skill-CodeRabbit-002: Template bracket notation placeholders (93%)
- Skill-CodeRabbit-003: Infrastructure naming avoids spaces (90%)
- Skill-CodeRabbit-004: Expression injection labeling is intentional (95%)
- Skill-CodeRabbit-005: MCP tool naming with duplicated segments (92%)
- Skill-CodeRabbit-006: Generated files omit edit warnings (90%)
- Skill-CodeRabbit-007: Analyst vs impact analysis architecture (95%)
- Skill-CodeRabbit-008: Nested code fence syntax (88%)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Take main's regex fix for synthesis marker extraction
- Take main's HANDOFF.md and test file (more current)
Copilot AI review requested due to automatic review settings December 21, 2025 19:48
@coderabbitai

coderabbitai Bot commented Dec 21, 2025

Copy link
Copy Markdown

Caution

Review failed

Failed to post review comments

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

Added a new CodeRabbit skills export and supporting QA; updated skills index and multi-agent workflow docs; expanded session/handoff PR-review artifacts and a handoff merging pattern. All changes are documentation-only; no code or exported/public declarations were modified.

Changes

Cohort / File(s) Summary
New CodeRabbit Skills Export
.serena/memories/skills-coderabbit-learnings.md
Added a new Markdown export of 12 learnings, producing 8 validated skills (Skill-CodeRabbit-001..-008), marking 4 duplicates (overlap with skills-linting), merging 1 partial duplicate into Skill-CodeRabbit-008, and including evidence, impact, application/integration notes (pr-comment-responder, Code Review Agents), and metadata.
Skills Index & Cross-links
.serena/memories/skills-linting.md, .agents/skills/README.md
Appended a "Related Skills" section linking skills-coderabbit-learnings (notes Skill-CodeRabbit-008 supplements Skill-Lint-006) and coderabbit-noise-reduction-research; updated README table row for multi-agent-workflow.md from 10 → 11.
QA & Clarity Fixes
.agents/qa/002-pr-201-skills-clarity-fixes.md
Added QA report for PR #201 documenting three markdown fixes to the new skills file (count corrected 7→8, clarified backtick notation, added MCP naming example) with verification notes and commit references.
PR Review / Session Logs
.agents/sessions/2025-12-21-session-55-pr201-review.md, .agents/sessions/2025-12-21-session-56-pr201-review-response.md, .agents/sessions/2025-12-21-session-57-pr201-review-response.md
Added three session artifacts for PR #201 documenting phases, comment triage, commit references (d69707b, 8d43e97, baa3e87, 0c6f610 noted), checklists, and verification that Copilot comments were addressed.
HANDOFF / Session History Changes
.agents/HANDOFF.md, .serena/memories/pattern-handoff-merge-session-histories.md, .agents/skills/multi-agent-workflow.md
Updated HANDOFF.md to reflect PR Review Response phase and expanded session history; added a new HANDOFF.md Session History Merge pattern file and inserted Skill-Workflow-011 content (merge protocol) into multi-agent-workflow.md — note: the new section appears duplicated in the diff.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Primary focus: review factual accuracy and duplicate detection in .serena/memories/skills-coderabbit-learnings.md.
  • Verify the cross-link in skills-linting.md and README count change.
  • Check session logs/HANDOFF edits for correct PR numbers and commit SHAs.
  • Watch for duplicate insertion of HANDOFF.md section in multi-agent-workflow.md.

Possibly related PRs

Suggested reviewers

  • Copilot

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed Title follows conventional commit format with type(scope) prefix and clearly describes the main change of importing CodeRabbit learnings as skills.
Description check ✅ Passed Description directly relates to the changeset, detailing imported learnings, validation metrics, created skills, identified duplicates, and affected files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/coderabbit-learnings-import

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR imports validated learnings from CodeRabbit AI review bot exports and transforms them into structured skills for the Serena memory system. The work involves deduplication against existing linting skills and validation using atomicity scoring to ensure high-quality, actionable knowledge capture.

Key Changes

  • Created 8 new CodeRabbit-specific skills covering MCP tool conventions, template syntax, infrastructure patterns, and security documentation
  • Identified and documented 4 duplicate learnings already covered by existing linting skills
  • Established bidirectional cross-references between skills-coderabbit-learnings and skills-linting memories

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.serena/memories/skills-coderabbit-learnings.md New skills file with 8 validated skills (88-95% atomicity) from CodeRabbit learnings export
.serena/memories/skills-linting.md Added "Related Skills" section with cross-reference to skills-coderabbit-learnings

Comment thread .serena/memories/skills-coderabbit-learnings.md Outdated
Comment thread .serena/memories/skills-coderabbit-learnings.md Outdated
Comment thread .serena/memories/skills-coderabbit-learnings.md Outdated
@rjmurillo-bot rjmurillo-bot enabled auto-merge (squash) December 21, 2025 19:51
…rnings

- Fix numeric count: change 'Valid Skills Created: 7' to 8 (correct count)
- Clarify nested code fence syntax: replace inline backticks with 'four backticks'
- Add MCP tool naming breakdown: concrete example showing server/tool-id segments

Addresses PR #201 review comments from @Copilot:
- Comment 2638064485 (line 10 numeric correction)
- Comment 2638064487 (line 107 backtick clarity)
- Comment 2638064489 (line 52 MCP naming example)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@coderabbitai coderabbitai Bot requested a review from rjmurillo December 21, 2025 20:28
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.

4 participants