workflow-reflection
Skill64 starsChanged 4 months agoMITView on GitHub
Finalize the workflow by reflecting on the process, moving ADRs, closing issues, and preparing for merge. Stage 8 of the development workflow.
- Commits and pushes
In this repository102 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- assumptionsSkill
- capture-learningSkill
- Codex-opus-4-6-promptingSkill
- Codex-promptSkill
- mcp-code-modeSkill
- deploy-team-hubSkill
- diagramSkill
- distillSkill
- effect-tsSkill
- escalateSkill
- evalSkill
- experimentSkill
- hddSkill
- hub-auditSkill
- hub-collabSkill
- implementSkill
- knowledgeSkill
- peer-notebook-delivery-guardSkill
- research-taskSkill
- session-reviewSkill
- source-command-hdd-decideSkill
- source-command-hdd-hddSkill
- source-command-hdd-researchSkill
- source-command-hdd-stage-adrSkill
- source-command-hdd-validateSkill
- statusSkill
- supabaseSkill
- synthesizeSkill
- tasteSkill
- teamSkill
- test-suiteSkill
- theseus-protocolSkill
- thoughtbox:debugSkill
- thoughtbox:decisionSkill
- thoughtbox:evolutionSkill
- thoughtbox:knowledge-querySkill
- thoughtbox:onboardSkill
- thoughtbox:refactorSkill
- thoughtbox:researchSkill
- thoughtbox:session-reviewSkill
- thoughtbox-teamSkill
- ulc-loopSkill
- ulysses-protocolSkill
- workflow-brainstormingSkill
- workflow-ideationSkill
- workflow-revisionSkill
- workflows-compoundSkill
- workflowSkill
- workflows-planSkill
- workflows-reviewSkill
- workflows-workSkill
- workflow-tournamentSkill
- assumptionsSkill
- capture-learningSkill
- claude-opus-4-6-promptingSkill
- claude-promptSkill
- mcp-code-modeSkill
- deploy-team-hubSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 13 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 19
All sub-agent work has been committed (no uncommitted implementation changes)
- Distinctive: line 61
Ask the user if they want to add their own reflection:
- Very specific: line 68
If the user provides input, append it to the reflection under a ## Chief Agentic Notes section.
- Very specific: line 83
If the spec was in staging, move it to specs/
- Very specific: line 84
If any existing docs in specs/ or docs/decisions/archive/adr/accepted/ are now outdated by this work, update them
- Distinctive: line 92
Add rejection reason and falsified hypotheses to the ADR file
- Distinctive: line 95
Leave artifacts in staging with a note about the incomplete state
- Distinctive: line 104
If there are uncommitted changes (reflection artifacts, ADR moves), commit them:
- Distinctive: line 115
If conflicts arise, resolve them or escalate to user.
- Distinctive: line 123
If no PR exists, create one
- Distinctive: line 124
If a PR exists, ensure it's up to date
- Distinctive: line 127
Merge decision: Ask the user whether to merge now or leave the PR open for additional review:
- Distinctive: line 181
Do NOT skip the ADR move — artifacts left in staging rot and confuse future workflows
- Distinctive: line 182
Do NOT merge without pushing first — local-only merges are invisible to the team
- Distinctive: line 183
Do NOT skip the learning capture — the whole point of reflection is to compound
- Distinctive: line 184
Do NOT fabricate reflection — base it on actual evidence from the workflow state and summaries
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Execute the reflection and finalization stage. $ARGUMENTS
Purpose
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.
Pre-Conditions
Before starting, verify:
.workflow/state.jsonexists andcurrentStageis"reflection"- Stages 1-7 are all completed or skipped (check state file)
- All sub-agent work has been committed (no uncommitted implementation changes)
Process
Step 1: Agent Structured 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]Step 2: User Reflection (Optional)
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.
Step 3: Move ADR to Permanent Location
Based on the workflow outcome:
If hypotheses were validated (happy path):
- Move the spec with frontmatter to accepted:
# Historical: ADRs archived — update spec status in frontmatter instead of mv .adr/<NNN>-<name>-adr.md .adr/accepted/<NNN>-<name>.md - Move associated summaries with it:
# Historical: ADRs archived — update spec status in frontmatter instead of mv .adr/<NNN>-<name>-summary-*.md .adr/accepted/ - If the spec was in staging, move it to
specs/ - If any existing docs in
specs/ordocs/decisions/archive/adr/accepted/are now outdated by this work, update them
If hypotheses were refuted:
- Move the spec with frontmatter to rejected:
# Historical: ADRs archived — update spec status in frontmatter instead of mv .adr/<NNN>-<name>-adr.md .adr/rejected/<NNN>-<name>.md - Preserve test insights alongside the rejected ADR
- Add rejection reason and falsified hypotheses to the ADR file
If the workflow was abandoned or partially completed:
- Leave artifacts in staging with a note about the incomplete state
- The next workflow that touches this domain will find them during ideation
Step 4: Prepare for Merge
- Ensure all changes are committed:
If there are uncommitted changes (reflection artifacts, ADR moves), commit them:git statusgit add <specific files> git commit -m "docs: finalize workflow <id> - move ADR, close issues" - Rebase onto main:
If conflicts arise, resolve them or escalate to user.git fetch origin git rebase origin/main - Push the branch:
git push -u origin <branch> - Create or update the PR:
- If no PR exists, create one
- If a PR exists, ensure it's up to date
- The PR description should reference the ADR and include the reflection summary
- 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?
Step 5: Delegate Learning Capture
Invoke /capture-learning to extract reusable learnings from this workflow session. Pass it the reflection from Step 1 as context.
Step 6: Update Workflow State
Set the final state:
{
"stages": {
"reflection": {
"status": "completed",
"completedAt": "<ISO timestamp>"
}
},
"currentStage": "completed",
"updatedAt": "<ISO timestamp>"
}Step 7: Final Report
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">Anti-Patterns
- Do NOT skip the ADR move — artifacts left in staging rot and confuse future workflows
- Do NOT merge without pushing first — local-only merges are invisible to the team
- Do NOT skip the learning capture — the whole point of reflection is to compound
- Do NOT fabricate reflection — base it on actual evidence from the workflow state and summaries
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

