Skip to content

feat(plugins): add reflexion plugin for self-refinement#65

Merged
amondnet merged 5 commits into
mainfrom
64-feat-add-reflexion-plugin-for-self-refinement
Dec 23, 2025
Merged

feat(plugins): add reflexion plugin for self-refinement#65
amondnet merged 5 commits into
mainfrom
64-feat-add-reflexion-plugin-for-self-refinement

Conversation

@amondnet

Copy link
Copy Markdown
Contributor

Summary

Add a reflexion plugin that implements self-refinement techniques based on academic research. This plugin introduces feedback and refinement loops to improve output quality.

Features

  • /reflexion:reflect - Self-refinement with complexity triage (Quick/Standard/Deep paths)
  • /reflexion:critique - Multi-agent review with 3 specialized judges
  • /reflexion:memorize - CLAUDE.md context curation using Agentic Context Engineering

Scientific Foundation

Based on peer-reviewed research demonstrating 8-21% improvement in output quality:

Files Changed

plugins/reflexion/
├── .claude-plugin/plugin.json   # Plugin manifest
├── README.md                    # Documentation
└── commands/
    ├── reflect.md               # Self-refinement command
    ├── critique.md              # Multi-agent review command
    └── memorize.md              # Memory consolidation command

Test Plan

  • Verify plugin.json is valid JSON
  • Verify all commands have correct frontmatter
  • Test /reflexion:reflect command execution
  • Test /reflexion:critique command execution
  • Test /reflexion:memorize command execution

Closes #64

Add reflexion plugin with 3 commands based on academic research:
- /reflexion:reflect - Self-refinement with complexity triage
- /reflexion:critique - Multi-agent review with 3 judges
- /reflexion:memorize - CLAUDE.md context curation

Based on Self-Refine and Reflexion papers (8-21% quality improvement).

Closes #64
@amondnet amondnet linked an issue Dec 23, 2025 that may be closed by this pull request
10 tasks
@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @amondnet, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request integrates a powerful new "reflexion" plugin designed to significantly enhance the quality and reliability of large language model outputs. By incorporating structured self-refinement, multi-agent critique, and intelligent memory updates, the plugin aims to reduce errors, improve predictability, and foster continuous learning within the system. It provides a robust framework for iterative improvement, allowing for more precise and context-aware responses.

Highlights

  • New Reflexion Plugin: Introduces a plugin for self-refinement of LLM outputs, aiming to enhance quality and reliability.
  • Three Core Commands: Adds /reflexion:reflect for iterative self-improvement, /reflexion:critique for multi-agent review, and /reflexion:memorize for context curation.
  • Research-Backed Techniques: Implements methods based on academic papers like Self-Refine, Reflexion, and Agentic Context Engineering, promising 8-21% output quality improvement.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Dec 23, 2025

Copy link
Copy Markdown

Deploying code-please with  Cloudflare Pages  Cloudflare Pages

Latest commit: 057b224
Status:🚫  Build failed.

View logs

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a new 'reflexion' plugin, which adds powerful self-refinement capabilities based on recent AI research. The implementation is well-documented through a comprehensive README and detailed command definitions in markdown. The prompts for the different commands (reflect, critique, memorize) are thorough and well-structured.

My review focuses on improving the accuracy and clarity of the documentation. I've found a few issues, mainly related to incorrect or inconsistent references to research papers and some copy-paste errors in the README. Correcting these will enhance the quality and credibility of the documentation. Overall, this is a great addition.

Comment thread plugins/reflexion/README.md Outdated
Comment thread plugins/reflexion/README.md Outdated
Comment thread plugins/reflexion/README.md Outdated
Comment thread plugins/reflexion/README.md Outdated
Comment thread plugins/reflexion/README.md Outdated
Comment thread plugins/reflexion/README.md Outdated
Comment thread plugins/reflexion/commands/memorize.md Outdated
Comment thread plugins/reflexion/commands/memorize.md Outdated
@codecov

codecov Bot commented Dec 23, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.71%. Comparing base (6cbe828) to head (057b224).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #65   +/-   ##
=======================================
  Coverage   38.71%   38.71%           
=======================================
  Files          59       59           
  Lines        6515     6515           
=======================================
  Hits         2522     2522           
  Misses       3993     3993           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

- Add marketplace.json with code-please and reflexion plugin entries
- Register context-engineering-kit submodule reference
- Update progress tracking for reflexion plugin feature (Phase 6/8)
- Update mcp-server-plugin submodule reference

Related to #64
- Add trigger phrases to plugin.json description
- Add trigger phrases to command descriptions (reflect, critique, memorize)
- Add "When to Use" table to README.md

Improves plugin discoverability as recommended by plugin-dev skill review.
- Fix swapped descriptions between critique and memorize commands in README
- Fix inconsistent Self-Refine arXiv link (use 2303.17651 consistently)
- Fix author name inconsistency in marketplace.json (PassionFactory)
- Add repository field to plugin.json
- Add trailing newline to marketplace.json
@amondnet amondnet self-assigned this Dec 23, 2025
- Fix Agentic Context Engineering link (2510.04618 → 2405.04618) in 3 places
- Fix Chain-of-Verification link (2305.13888 → 2309.11495)
- Fix section numbering in memorize.md (7 → 6)

Addresses review comments from gemini-code-assist[bot]
@amondnet
amondnet merged commit b0ebea5 into main Dec 23, 2025
9 of 10 checks passed
@amondnet
amondnet deleted the 64-feat-add-reflexion-plugin-for-self-refinement branch December 23, 2025 13:48
@passionfactory-bot passionfactory-bot Bot mentioned this pull request Dec 23, 2025
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.

feat: add reflexion plugin for self-refinement

1 participant