penguiflow-reflection-loop
БесплатноБез исполняемых скриптовНе проверенExplain, configure, and troubleshoot the ReactPlanner reflection loop: how post-answer critique, revision, and clarification work; how to wire…
от hurtener★ 27 звёзд на GitHubОб этом скилле
PenguiFlow Reflection Loop
When to use
- Explaining how ReactPlanner's built-in answer-quality loop works.
- Wiring reflection into a manual
ReactPlanner(...)construction. - Retrofitting reflection into scaffolded
config.pyandplanner.pyfiles. - Debugging whether a run passed critique, requested a revision, or fell back to clarification.
When NOT to use
- General planner configuration outside reflection: use penguiflow-reactplanner-config.
- AG-UI event wiring and frontend reducer behavior: use penguiflow-agui-events.
- Generic eval frameworks or offline benchmarking pipelines not tied to
ReactPlanner.
Hard boundaries
This skill covers the built-in ReactPlanner reflection path only:
ReflectionConfig- optional
reflection_llm - critique, revision, and clarification behavior
- runtime signals in metadata, cost, events, and logs
It does not describe arbitrary multi-agent reviewer patterns.
Workflow
1) Find planner construction
Locate where the app constructs ReactPlanner(...).
Reflection is inactive unless that constructor receives reflection_config=....
2) Enable the feature explicitly
Use the public API import:
from penguiflow.planner import ReflectionConfig
Then pass:
reflection_config=ReflectionConfig(
enabled=True,
quality_threshold=0.85,
max_revisions=2,
)
3) Choose shared vs separate critique model
- Shared model: simplest rollout; omit
use_separate_llmandreflection_llm. - Separate critique model: set
use_separate_llm=Trueand providereflection_llm.
Important rule:
- the critique model judges answer quality;
- the main planner client still writes revisions.
4) Verify behavior with runtime signals
Look for:
result.metadata["reflection"]result.metadata["cost"]["reflection_llm_calls"]- planner event
reflection_critique - planner event
reflection_clarification_generatedwhen quality never reaches threshold
5) Interpret "nothing changed"
That can be the healthy case:
- if the answer passes on the first critique, the user often sees the same answer,
- the visible difference is mostly latency and cost,
- logs and metadata still show that reflection ran.
Load these references as needed
docs/planner/reflection-loop.md- shareable external-facing guide with code examples.tests/test_react_reflection.py- best source for expected runtime behavior.examples/planner_enterprise_agent_v2/main.py- production-style planner wiring.examples/planner_enterprise_agent_v2/config.py- env-driven reflection settings.penguiflow/planner/react_runtime.py- reflection loop control flow.penguiflow/planner/llm.py- critique, revision, and clarification generation.
Установить penguiflow-reflection-loop в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл penguiflow-reflection-loop?
Explain, configure, and troubleshoot the ReactPlanner reflection loop: how post-answer critique, revision, and clarification work; how to wire `ReflectionConfig` and optional `reflection_llm`; how env/spec-driven scaffolds expose the knobs; and how to verify behavior through planner events, metadata, and cost counters. Use when a user asks about "reflection loop", "self-critique", "reflection_critique", "quality_threshold", "max_revisions", or wants to compare reflection-enabled vs reflection-disabled runs.
Как установить скилл penguiflow-reflection-loop?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл penguiflow-reflection-loop запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
patterns
Find patterns worth sharing from recent PRs and repo history, both repeats to fix and good practices worth spreading. Use when a champion wants to know what…
от Anthropiccopilot-cli-quickstart
Use this skill when someone wants to learn GitHub Copilot CLI from scratch. Offers interactive step-by-step tutorials with separate Developer and…
от GitHubvardoger-analyze
Use when the user asks to personalize the GitHub Copilot CLI assistant, adapt Copilot to their style, use vardoger, or analyze their Copilot CLI conversation…
от GitHubpolicy-lookup
Find and explain company policies in plain language. Trigger with "what's our PTO policy", "can I work remotely from another country", "how do expenses work"…
от Anthropic