Skip to content

chore: improve git worktree workflow and add review-critique skill#2451

Open
tlgimenes wants to merge 4 commits intomainfrom
chore/worktree-githooks
Open

chore: improve git worktree workflow and add review-critique skill#2451
tlgimenes wants to merge 4 commits intomainfrom
chore/worktree-githooks

Conversation

@tlgimenes
Copy link
Contributor

@tlgimenes tlgimenes commented Feb 13, 2026

What is this contribution about?

This PR enhances the developer workflow with two main improvements:

  1. Git Worktree Automation - Adds a post-checkout hook that automatically copies .env from the main worktree to new worktrees, preventing missing environment variable issues when working with isolated branches.

  2. Review Critique Skill - Adds a new Cursor skill that analyzes git diffs using parallel subagents from 7 different perspectives (duplication, correctness, security, performance, testing, architecture, scope), then produces a prioritized remediation plan.

Changes Made

  • Added .githooks/post-checkout hook that copies .env to new worktrees (only if missing)
  • Added .cursor/skills/review-critique/SKILL.md with comprehensive workflow for multi-perspective code review
  • Added .cursor/skills/review-critique/references/critic-prompts.md with detailed prompts for each critic perspective
  • Moved .cursor/skills/plan-critique/critic-prompts.md to top-level directory for consistency

Screenshots/Demonstration

N/A - Infrastructure and tooling changes

How to Test

Test the git worktree hook:

  1. Ensure you have an .env file in apps/mesh/.env in your main worktree
  2. Create a new worktree: git worktree add .worktrees/test-branch -b test-branch
  3. Verify that .env was automatically copied to .worktrees/test-branch/apps/mesh/.env
  4. Create another worktree with an existing .env and verify it's not overwritten

Test the review-critique skill:

  1. Make changes on a feature branch
  2. Open Cursor and invoke the review-critique skill
  3. Verify that it spawns parallel subagents to analyze the diff
  4. Confirm it produces a structured remediation plan with prioritized issues

Migration Notes

N/A

Review Checklist

  • PR title is clear and descriptive
  • Changes are tested and working
  • Documentation is updated (if needed)
  • No breaking changes

Made with Cursor


Summary by cubic

Automates .env setup for new git worktrees and adds a multi-perspective review-critique skill to analyze branch diffs and produce a remediation plan. This reduces local setup friction and improves pre-merge reviews.

  • New Features

    • Added post-checkout hook to copy apps/mesh/.env to new worktrees only when missing.
    • Added review-critique Cursor skill that runs parallel critics (duplication, correctness, security, performance, testing, architecture, scope) and outputs a prioritized remediation plan.
  • Refactors

    • Moved critic-prompts.md to the top-level plan-critique directory for consistency.

Written for commit 60c87a3. Summary will update on new commits.

tlgimenes and others added 4 commits February 13, 2026 10:07
- Created .githooks/post-checkout hook
- Automatically copies apps/mesh/.env to new worktrees
- Configured git to use .githooks directory

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Spawn parallel subagents to critique git diffs from 7 perspectives
(duplication, correctness, security, performance, testing, architecture,
scope) and produce a prioritized remediation plan.

Co-authored-by: Cursor <cursoragent@cursor.com>
Prevent post-checkout hook from overwriting worktree-specific .env
modifications on every branch switch.

Co-authored-by: Cursor <cursoragent@cursor.com>
Move critic-prompts.md from references subdirectory to the root of the plan-critique skill directory for better accessibility.

Co-authored-by: Cursor <cursoragent@cursor.com>
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 4 files

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