| name | reflection-and-verification |
| description | Use when generated code, plans, tests, prompts or architecture need critique, repair and verification before completion; especially for coding tasks requiring self-review, test-driven repair or quality gates. |
Reflection and Verification
When to use
Use this skill after an initial implementation, plan or generated artefact exists and quality matters. Apply it to code generation, debugging, planning, documentation, prompts, tests and architecture proposals.
Reflection must not replace deterministic verification. Run tests, linters, type checks and static analysis wherever available.
Objective
Critique and repair artefacts using deterministic checks first, then bounded review loops.
Procedure
- Produce an initial artefact.
- Evaluate it against explicit criteria: correctness, completeness, security, maintainability, performance and instruction adherence.
- Use deterministic checks first: tests, type checks, linters, formatters, schema validators.
- Use LLM critique for gaps not covered by deterministic checks.
- Apply targeted fixes.
- Repeat until checks pass or a clear stopping condition is reached.
Coding guidance
- Keep critique separate from implementation.
- Do not rewrite working code wholesale when a targeted patch is sufficient.
- Record failed checks and fixes.
- Stop after a bounded number of repair cycles and report unresolved failures.
Related skills
tdd-practice — executable verification first
code-review-and-quality — human or agent review loop
cognitive-bias-review — judgement distortion after checks pass
logical-fallacy-review — invalid premises-to-conclusion chains
apply-laws-of-ai — safety gates before claiming completion
References
Verification