Improve Command You are a senior code reviewer and refactoring specialist. When provided…
- User
Improve Command
You are a senior code reviewer and refactoring specialist. When provided with organize/refactor @src\scripts/ Before completing my request, first evaluate the prompt I gave you. Do not perform the requested task until the prompt evaluation and improvement step is complete.
Act without asking me clarifying questions. When information is missing, make reasonable, explicit assumptions and proceed.
Use this structure:
Prompt Critique
Identify anything unclear, incomplete, overly broad, contradictory, inefficient, or likely to produce a weaker result.
Missing Information
List the context, constraints, examples, audience details, tone, format requirements, source material, success criteria, or edge cases that would help produce a stronger result on the first attempt.
Assumptions You Will Make
State the assumptions you will use to proceed despite any missing information. These assumptions should be practical, reasonable, and aligned with the likely intent of my request.
Improved Prompt
Rewrite my original prompt so it is clearer, more specific, better structured, and more likely to produce the desired output on the first attempt. Preserve my original intent, but improve wording, constraints, formatting, sequencing, and instructions where helpful.
Proceed With the Task
After completing the evaluation and improved prompt, immediately perform the original requested task using the improved prompt and the assumptions you listed.
Do not ask clarifying questions. Do not wait for confirmation. Do not stop after improving the prompt unless the original request is unsafe, impossible, or lacks essential source material that cannot be reasonably assumed. (files or directories), perform a comprehensive analysis and propose concrete improvements. If no arguments are provided, analyze the current context (open files, recent changes, and active working area).
Your Review Process
Step 1: Define Review Scope & Gather Context
- If organize/refactor @src\scripts/ Before completing my request, first evaluate the prompt I gave you. Do not perform the requested task until the prompt evaluation and improvement step is complete.
Act without asking me clarifying questions. When information is missing, make reasonable, explicit assumptions and proceed.
Use this structure:
Prompt Critique
Identify anything unclear, incomplete, overly broad, contradictory, inefficient, or likely to produce a weaker result.
Missing Information
List the context, constraints, examples, audience details, tone, format requirements, source material, success criteria, or edge cases that would help produce a stronger result on the first attempt.
Assistant
I'll start by reading the file, then evaluate your prompt before performing the task.
Assistant
Let me gather more context about the project's script conventions.
Assistant
Now let me check how similar scripts in the root
scripts/directory are structured and what conventions the package.json defines.Assistant
Assistant
Improvement Report
Scope:
src/scripts/capture-frames.ts→ relocate toscripts/capture-frames.ts
Languages/Frameworks: TypeScript 6.x, OpenTUI, DuckDB, BunFindings & Actions
- Readability & Maintainability: Missing JSDoc header (sibling
capture-spans-dump.tshas one). Deadeslint-disablecomments (Biome, not ESLint). DoublerenderOnce()unexplained. → Add header, remove dead comments, add comment explaining double render. - Performance: No issues (47-line sequential script).
- Best Practices: File in wrong directory (
src/scripts/instead ofscripts/). Nopackage.jsonscript entry. Stale imports in siblingscripts/capture-spans-dump.ts(references deletedsrc/hub/). → Move file, add script entry, fix stale sibling imports.
- Readability & Maintainability: Missing JSDoc header (sibling
Assistant
Now fixing the stale imports in
capture-spans-dump.ts, deleting the old file, and adding the package.json entry:Assistant
All changes applied. Here's the summary:
Changes Made
File Action Reason scripts/capture-frames.tsCreated (moved + improved) Relocated from src/scripts/with fixed imports, JSDoc header, CLI arg parsing for width/height, typed error handling, removed dead eslint-disable comments