一键导入
assistant-reflexion
Reflect on evidence-backed lessons or recall prior ones. Use for explicit retrospectives, calibration, or a concrete durable lesson.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Reflect on evidence-backed lessons or recall prior ones. Use for explicit retrospectives, calibration, or a concrete durable lesson.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Clarify ambiguous or multi-intent requests. Use when the user asks to untangle, structure, or restate what they mean.
Manage durable memory safely. Use for explicit remember, recall, forget, or memory-health requests and stable corrections or preferences.
Review code and re-review fixes until clean. Use for explicit code review or the workflow Review phase; QA runs only when required.
Create or update V1 skills and contracts. Use for skill scaffolding, contract design, or contract-compliance validation.
Run proportional development phases. Use to plan, build, implement, fix, migrate, or refactor project artifacts.
Generate and rank options. Use light mode for quick improvement scans and deep mode for explicit brainstorming or broad exploration.
| name | assistant-reflexion |
| description | Reflect on evidence-backed lessons or recall prior ones. Use for explicit retrospectives, calibration, or a concrete durable lesson. |
| effort | low |
| triggers | [{"pattern":"reflect|what did we learn|lessons learned|how did that go|performance review|calibrate|self-assess|retrospective","priority":60,"min_words":3,"reminder":"This request matches assistant-reflexion. Consider invoking the Skill tool with skill='assistant-reflexion' for self-assessment and learning capture."}] |
| File | Purpose |
|---|---|
contracts/input.yaml | action (reflect/recall/stats/consolidate), task_description, project_type, task_type, review/build/user-correction evidence |
contracts/output.yaml | action_taken, lessons[], evidence reviewed, persistence/no-save decision, recalled_lessons[] |
task_description is required for reflect; project_type and task_type are inferred when absentlessons entries include lesson, confidence (high/medium/low), applies_to, and evidence sourcerecalled_lessons entries include lesson, confidence, date, and projectCross-task learning system where insights from task N improve performance on task N+1.
Core principle: Capture durable lessons, not routine task ceremony.
Convert task outcomes, mistakes, calibration signals, and reusable lessons into future-facing memory without saving noise.
Run reflection only when the user explicitly asks or concrete evidence suggests a durable lesson.
Recall prior lessons only when current work depends on earlier context.
After a user asks to reflect, or after review findings, build/test failures, user corrections, or memory trends expose a concrete reusable lesson:
>> Reflecting on completed task...
Gather:
If memory_trend MCP tool is available, call it with the current project name to surface mid-task signals (corrections, approvals, frustrations, pivots) captured during this session. Incorporate these into the self-assessment — they are objective evidence of what worked and what didn't.
For medium+ workflow completion, consume the ### Learning Controller fields from the task journal or equivalent workflow output. Treat Review Log findings, build/test failures, and user corrections as the highest-value lesson sources. Use routine progress and completed checklist items only as context, never as the lesson itself.
Ask yourself honestly:
What went well?
What went wrong or was slow?
What was surprising or non-obvious?
Convert observations into actionable rules:
Good format:
Bad format:
For lessons from review findings, build/test failures, or user corrections, include the source evidence in the lesson entry. If no evidence-backed durable lesson exists, return skipped_not_durable with a no-save rationale instead of forcing a memory write.
Store the reflection using memory system:
# Reflexion: [Task Description]
**Date:** [YYYY-MM-DD]
**Project:** [project name]
**Project Type:** [dotnet-api / blazor / maui / unity / etc.]
**Task Type:** [feature / bugfix / refactor / security / docs]
**Size:** [small / medium / large / mega]
**Duration:** [approximate]
## What Went Well
- [observation]
## What Went Wrong
- [observation]
## Lessons
- [actionable rule]
## Confidence Calibration
- Plan accuracy: [1-5] — [notes]
- Size estimate accuracy: [1-5] — [notes]
- First approach worked: [yes/no]
Use memory_reflect MCP tool to record the reflexion in the knowledge graph when the configured local memory backend is available and policy-approved.
If the backend is unavailable or policy-disallowed, do not write ad hoc markdown as cross-session memory. Return the reflection with persistence_decision: backend_unavailable or policy_disallowed and a no_save_rationale. If the only candidates are routine task progress, obvious repo facts, or stale temporary state, return persistence_decision: skipped_not_durable.
If lessons apply broadly to a project type, update the strategy profile:
# Strategy: [Project Type]
## Discovery
- [lesson about what to check/ask]
## Planning
- [lesson about what to include in plans]
## Building
- [lesson about implementation approach]
## Review
- [lesson about what to watch for]
Use memory_pattern MCP tool to record/reinforce the strategy pattern in the knowledge graph.
Update (don't overwrite) — add new lessons, reinforce existing ones.
Use before planning only when prior project decisions, corrections, preferences, or lessons can materially change the current approach.
Search memory for lessons matching:
Also call memory_trend with the project type to surface calibration trends and recent signal patterns. If trends show systematic bias (e.g., underestimation), factor that into planning.
>> Checking past lessons for [project type] [task type]...
Found [N] relevant lessons:
- [lesson 1] (confidence: high)
- [lesson 2] (confidence: medium)
>> Incorporating into plan constraints.
Add high-confidence lessons to the plan's constraints section.
Track prediction accuracy across tasks:
| Prediction Type | How Measured |
|---|---|
| Size estimate | Predicted vs. actual effort (did "small" stay small?) |
| Plan accuracy | How many plan deviations occurred? |
| Risk predictions | Did flagged risks materialize? Did unflagged risks appear? |
| First-approach success | Did the first strategy work or require pivoting? |
If cumulative data shows systematic bias:
Calibration data accumulates in strategy profile files and memory graph.
Lesson created (confidence: 0.5)
│
├─ Reinforced by same observation → confidence += 0.2
├─ Confirmed by user → confidence = 1.0
├─ Contradicted by evidence → flag for review
│
├─ Not reinforced in 90 days → confidence -= 0.1/month
│
└─ confidence < 0.2 → archived
| Skill | How Reflexion Integrates |
|---|---|
assistant-workflow | Conditional recall when prior context matters; conditional reflection when durable evidence exists |
assistant-memory | Stores reflexion entries and strategy profiles |
assistant-onboard | First reflexion seeds from onboarding observations |
assistant-review | Review findings feed into lessons about common mistakes |
Return:
Following the "invisible workflow" principle: