Reflecting
Review-phase workflow — lessons learned, evolution proposals (Class A/B gate), health-metrics check. Invoked by /dr-archive Step 0.5.
Overview
Reflecting is the mandatory reflection gate inside /dr-archive Step 0.5. It runs for every completed task, reviewing what happened, extracting lessons learned, and proposing framework improvements. Created in TUNE-0013, it replaced the former optional /dr-reflect command — because reflection was expected on every task yet trivially skippable as a separate stage.
Invocation Contract
This skill is not a standalone command. It is loaded internally by /dr-archive Step 0.5. The input is the resolved task state from datarim/tasks.md and datarim/activeContext.md. The output is a reflection document at datarim/reflection/reflection-{task-id}.md, plus optional approved Class A evolution changes and a follow-up task list returned to /dr-archive Step 4.
What It Does
- Load reviewer persona and security + testing skills for context
- Review changes against the Definition of Done, verify tests pass, check for security vulnerabilities
- Create reflection document using the reflection template
- Generate evolution proposals — classify each as Class A (content change, approval-ready) or Class B (operating-model change, requires PRD update first per the evolution skill's gate)
- Run health-metrics check — count total skills, agents, commands and compare against thresholds. Suggest
/dr-optimizeif any threshold is exceeded - Identify follow-up tasks and return them to
/dr-archiveStep 4 for backlog writes
Class A vs Class B Gate
Class A proposals (add a recipe, fix a description, update an existing skill) go through normal approval. Class B proposals (change source-of-truth direction, sync semantics, pipeline routing, core contract) require a PRD update before they can be approved. This gate was introduced after the TUNE-0002/TUNE-0003 incident where a research conclusion was treated as a regular proposal and caused 6 hours of wrong-direction work.
Failure Mode
If the skill fails to load or the user rejects all proposals, the archive process stops at Step 0.5. It does not proceed to Step 1. The archive is idempotent — re-running re-enters Step 0.5.