一键导入
workflow-reflection
Finalize the workflow by reflecting on the process, moving ADRs, closing issues, and preparing for merge. Stage 8 of the development workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Finalize the workflow by reflecting on the process, moving ADRs, closing issues, and preparing for merge. Stage 8 of the development workflow.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
A-Mem thought evolution — check which prior thoughts should be updated when a significant new insight arrives. Spawns a lightweight subagent to classify prior thoughts as UPDATE or NO_UPDATE, then applies revisions. Use during long reasoning sessions when you reach a synthesis, make a decision, or discover something that changes earlier assumptions. Triggers on "this changes what I thought earlier", "update prior reasoning", "evolve thoughts", or automatically on conclusion/synthesis thoughts in sessions >10 thoughts.
Cross-session knowledge retrieval from the Thoughtbox knowledge graph. Searches entities, traverses relations, retrieves observations, and synthesizes findings from past sessions. Use when you need to recall prior decisions, check what's already known about a topic, find related insights, or build on past work. Triggers on "what do we know about", "have we seen this before", "recall", "prior decisions about", "knowledge graph", or when starting work that might have prior context.
Capture significant learnings from the current work session. Structures insights for future sessions and updates agent memory.
Write or improve prompts for Codex using Anthropic's official best practices. Creates system prompts, agent prompts, tool descriptions, and MCP resource templates. Pass an existing prompt to improve it, or describe what you need to create one from scratch.
Generate architecture diagrams for a codebase subsystem or module. Explores source files and produces Mermaid diagrams in docs/.
Extract reusable principles and decision frameworks from accumulated experience. Use after significant work sessions, project milestones, or when you notice recurring patterns worth codifying.
基于 SOC 职业分类
| name | workflow-reflection |
| description | Finalize the workflow by reflecting on the process, moving ADRs, closing issues, and preparing for merge. Stage 8 of the development workflow. |
| argument-hint | [optional reflection notes] |
| user-invocable | true |
Execute the reflection and finalization stage. $ARGUMENTS
You are executing Stage 8 (Reflection) of the development workflow. The implementation is reviewed, revised, and compounded. Your job is to finalize: reflect on what happened, move artifacts to their permanent locations, close tracking issues, and prepare the branch for merge.
Before starting, verify:
.workflow/state.json exists and currentStage is "reflection"Review the entire workflow by reading the state file and any persisted summaries. Produce a structured reflection:
WORKFLOW REFLECTION
====================
Workflow: <id> - <title>
Branch: <branch>
Duration: <startedAt> to now
## What Worked
- [specific things that went well, with evidence]
- [approaches that should be repeated]
## What Didn't Work
- [specific things that went poorly, with evidence]
- [approaches to avoid in future]
## Hypothesis Outcomes
- H1 "<text>": VALIDATED / REFUTED / INCONCLUSIVE
- H2 "<text>": ...
## Revision Iterations
- Total: N/3
- Root causes of revision: [what triggered each iteration]
## Unexpected Discoveries
- [things learned that weren't part of the original plan]
- [codebase behaviors that surprised us]
## Process Improvements
- [suggestions for improving the workflow itself]
Ask the user if they want to add their own reflection:
Would you like to add your own reflection notes?
This is optional but valuable for the compound learning record.
If the user provides input, append it to the reflection under a ## Chief Agentic Notes section.
Based on the workflow outcome:
If hypotheses were validated (happy path):
# Historical: ADRs archived — update spec status in frontmatter instead of mv .adr/<NNN>-<name>-adr.md .adr/accepted/<NNN>-<name>.md
# Historical: ADRs archived — update spec status in frontmatter instead of mv .adr/<NNN>-<name>-summary-*.md .adr/accepted/
specs/specs/ or docs/decisions/archive/adr/accepted/ are now outdated by this work, update themIf hypotheses were refuted:
# Historical: ADRs archived — update spec status in frontmatter instead of mv .adr/<NNN>-<name>-adr.md .adr/rejected/<NNN>-<name>.md
If the workflow was abandoned or partially completed:
Ensure all changes are committed:
git status
If there are uncommitted changes (reflection artifacts, ADR moves), commit them:
git add <specific files>
git commit -m "docs: finalize workflow <id> - move ADR, close issues"
Rebase onto main:
git fetch origin
git rebase origin/main
If conflicts arise, resolve them or escalate to user.
Push the branch:
git push -u origin <branch>
Create or update the PR:
Merge decision: Ask the user whether to merge now or leave the PR open for additional review:
Branch is pushed and PR is ready.
Merge now, or leave open for review?
Invoke /capture-learning to extract reusable learnings from this workflow session. Pass it the reflection from Step 1 as context.
Set the final state:
{
"stages": {
"reflection": {
"status": "completed",
"completedAt": "<ISO timestamp>"
}
},
"currentStage": "completed",
"updatedAt": "<ISO timestamp>"
}
Present the completion summary:
WORKFLOW COMPLETE
==================
<title>
Branch: <branch>
Spec: <final location>
Stages:
1. Ideation [x] <notes excerpt>
2. Dev-Docs [x] spec: <path>, adr: <path>
3. Planning [x] plan: <path>
4. Implementation [x] commits: N, summaries: N
5. Review [x] findings: N (all resolved)
6. Revision [x] iterations: N/3
7. Compound [x] learning captured
8. Reflection [x] ADR accepted/rejected
PR: <url or "merged">