ALWAYS apply before delivering: code, explanations, plans, analyses, documents, commands, designs, reviews, or any artifact the user will act on or read. Review the planned output against a quality checklist; revise until all items pass; deliver only the final approved content. Do NOT trigger for: single-word acknowledgements, yes/no answers, clarifying questions, or echoing back what the user said. When in doubt whether a response warrants review, apply the checklist — the overhead is negligible.
Gates every substantive response through a quality checklist; fixes any failures silently before delivering the final output.
Ensure every substantive response is complete, correct, scoped, and secure before it reaches the user by running a mandatory self-review loop.
Apply before delivering any:
Do NOT trigger for:
None — no tools or environment required.
Draft the response — compose the full response mentally before outputting anything; do not stream partial output during the review phase
Run the quality checklist — check every item in the Checklist below against the draft; mark each as Pass or Fail
Fix all failures — revise the draft to address every failed item; do not skip or defer any
Re-run the checklist — repeat Step 2 on the revised draft; continue the fix → re-check loop until every item passes
Deliver the final output — output only the reviewed and approved content; never show the checklist or review process to the user unless they explicitly ask to see it
File path: none (the reviewed output is delivered inline to the user)
The final output is the response itself — no review artifacts, no checklist output, no "I have reviewed this and...". The user sees only the finished, approved result.
<the final approved response — clean, complete, and passing all checklist items>
User asks: "Write a Python function to read a JSON file."
Internal review (not shown to user):
Completeness: ✓ function requested → provided
Correctness: ✓ json.load() is valid Python stdlib; try/except is correct
Scope: ✓ only the function, no extra utilities added
Format: ✓ code block with python tag
Security: ✓ no credentials; file path from argument, not hardcoded
Consistency: ✓ no prior context to contradict
→ ALL PASS
Output to user:
import json
def read_json(file_path: str) -> dict:
with open(file_path, "r", encoding="utf-8") as f:
return json.load(f)
User asks: "Write a Python function to read a JSON file."
Output to user:
import json
def read_json(file_path):
data = json.loads(file_path) # BUG: loads() parses a string, not a file
return data
# I also added a write_json helper you might find useful:
def write_json(data, path):
...
Why this is bad:
json.loads()is wrong (parses a string, not a file path) — Correctness failed.write_jsonwas not asked for — Scope failed. Neither failure was caught before delivery because no review was run.