Skip to content

improvement(cleanup-skill): parallelize analysis, apply fixes sequentially#5609

Open
TheodoreSpeaks wants to merge 8 commits into
stagingfrom
feat/parallel-cleanup-skill
Open

improvement(cleanup-skill): parallelize analysis, apply fixes sequentially#5609
TheodoreSpeaks wants to merge 8 commits into
stagingfrom
feat/parallel-cleanup-skill

Conversation

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator

Summary

  • Rewrote the /cleanup skill to fan out the seven code-quality passes as read-only parallel subagents (fix=false), then converge and apply fixes sequentially in dependency order
  • Avoids concurrent-write clobbering on overlapping files while keeping the analysis-phase speedup

Type of Change

  • Improvement

Testing

Verified all seven sub-skills support the fix=false propose-only path

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Jul 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 12, 2026 2:37am

Request Review

@cursor

cursor Bot commented Jul 12, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are limited to agent skills and command markdown; no app, API, or migration runtime behavior is modified.

Overview
/cleanup is reworked from a single sequential chain into four steps: parse scope/fix, run eight quality passes in parallel with fix=false, converge overlapping proposals (tagged by pass), then apply fixes pass-by-pass in dependency order (effects → … → comments) using content-anchored edits so parallel snapshots stay valid. The pipeline now includes you-might-not-need-url-state and you-might-not-need-a-comment.

New .agents/skills for comment hygiene and nuqs URL-state anti-patterns, plus matching .claude/commands and .cursor/commands copies (including full babysit PR-review loop docs). babysit post-push verify clarifies that git log --reverse is required so commit order matches the PR list.

The PR also adds several large agent-only command guides (e.g. db-migrate, memory-load-check, frontend polish / anti-slop design skills) with no application runtime changes.

Reviewed by Cursor Bugbot for commit 3a32a53. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR changes the cleanup workflow to keep parallel analysis while applying edits in order. The main changes are:

  • Cleanup now parses scope and fix arguments before running passes.
  • The analysis passes run concurrently with fixes disabled.
  • Proposed edits are grouped by pass and applied sequentially.
  • URL-state and comment cleanup passes were added to the cleanup set.
  • Several command and skill docs were added or mirrored for Claude and Cursor.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
.agents/skills/cleanup/SKILL.md Updates the cleanup skill to parse arguments, run read-only passes in parallel, reconcile proposals, and apply surviving edits in dependency order.
.claude/commands/cleanup.md Mirrors the cleanup command flow for Claude with explicit scope substitution and sequential apply steps.
.cursor/commands/cleanup.md Mirrors the cleanup command flow for Cursor with explicit scope substitution and sequential apply steps.
.agents/skills/you-might-not-need-url-state/SKILL.md Adds a URL-state cleanup skill covering nuqs usage, manual query handling, and shareable view-state patterns.
.agents/skills/you-might-not-need-a-comment/SKILL.md Adds a comment cleanup skill for removing redundant inline comments and promoting real documentation to TSDoc.

Reviews (7): Last reviewed commit: "fix(skills): port url-state + comment pa..." | Re-trigger Greptile

Comment thread .claude/commands/cleanup.md
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .claude/commands/cleanup.md
Comment thread .claude/commands/cleanup.md Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .claude/commands/cleanup.md Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .claude/commands/babysit.md Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .claude/commands/babysit.md
Comment thread .claude/commands/cleanup.md
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread .cursor/commands/cleanup.md
Comment thread .agents/skills/cleanup/SKILL.md Outdated
Comment thread .cursor/commands/cleanup.md
Comment thread .agents/skills/cleanup/SKILL.md
Comment thread .agents/skills/cleanup/SKILL.md Outdated
@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@greptile

@TheodoreSpeaks

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3a32a53. Configure here.

2. If the `old_string` still matches verbatim, apply it — a content-anchored edit is safe even if its line moved.
3. If it no longer matches (an earlier pass altered that region), do **not** force the stale patch. Re-derive the change from the current code by re-applying that pass's rule to the construct, or drop it if a prior pass already made it moot. Never apply a proposal against text it wasn't computed from.

After all edits, run `bun run lint:check` on the touched files.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lint check cannot target files

Medium Severity

Step 3 tells the orchestrator to run bun run lint:check on the touched files, but the root script is turbo run lint:check with no per-path API. Following the wording literally may pass stray arguments to Turbo or skip lint while believing only edited paths were checked.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3a32a53. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant