agentleFS
pa001024pa001024/dna-builder/.agents/skills/wt-review-pr/SKILL.md

wt-review-pr

Skill159 starsChanged 2 days agoMITView on GitHub

Complete PR workflow with git worktree isolation - requirements to delivery; supports both standalone and orchestrated modes

  • Commits and pushes

The file

Show its rules and text

We split this skill into the rules it gives an agent

16 rules. About 0 are common, 8 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Very specific:

    When you are launched as an independent implementation session by .agents/skills/orchestrated-delivery (not the main session), follow these …

    line 13
  2. Very specific:

    Requirements/Spec: Use PLAN.md + TASKS/<unit>.md as source of truth.

    line 15
  3. Distinctive:

    Communication: Do NOT ask user directly; write issues/risks into final report or use pending requests.

    line 22
  4. Distinctive:

    Final Report: must include: branch name, commit SHA, PR URL (if created), verification commands & results, review conclusion, open …

    line 23
  5. Distinctive:

    Create isolated git worktree for development:

    line 47
  6. Very specific:

    Follow project code style (.agents/docs/code-style.md)

    line 63
  7. Very specific:

    Follow commit convention (.agents/docs/commit-convention.md)

    line 64
  8. Very specific:

    Use bun i18n add for i18n content (all 6 languages, each in native language)

    line 65
  9. Very specific:

    Run build tools as needed (bun icon add, bun tools/data-pack.ts, etc.)

    line 66
  10. Very specific:

    Use a fresh-context subagent to invoke /code-review skill (if available.

    line 89
  11. Distinctive:

    Check compliance with project conventions

    line 92
  12. Distinctive:

    Commit code and create PR:

    line 106
  13. Distinctive:

    Evidence: Before/After screenshots or test output

    line 129
  14. Distinctive:

    Note: Only clean up after PR successfully created, ensuring code is pushed to remote.

    line 149
  15. Distinctive:

    PR creation fails: Keep worktree, wait for user intervention

    line 166
  16. Very specific:

    Follow project rules: don't run pnpm dev, don't execute git push/merge and other sensitive operations without user confirmation

    line 174

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Worktree-Isolated PR Workflow

End-to-end isolated PR workflow: requirements gathering → specification → worktree implementation → testing → code review → PR creation → cleanup.

Orchestrated Mode (launched by orchestrated-delivery)

When you are launched as an independent implementation session by .agents/skills/orchestrated-delivery (not the main session), follow these overrides:

  • Requirements/Spec: Use PLAN.md + TASKS/<unit>.md as source of truth; skip steps 1-2 interactive confirmation; do NOT call /grill-with-docs.
  • Worktree: Already created by launcher via t3_thread_launch workspaceStrategy; skip step 3, do NOT execute git worktree add.
  • Implementation: Implement directly per task spec; proceed without /implement-spec if unavailable.
  • Testing: Execute step 5 commands; include results in final report.
  • Review: Execute step 6; if /code-review unavailable, use read-only subagent for equivalent review.
  • PR Creation: Execute step 7 only if task spec requires it; otherwise commit to branch and report.
  • Cleanup: Skip step 8; do NOT remove worktree, leave it to orchestrator.
  • Communication: Do NOT ask user directly; write issues/risks into final report or use pending requests.
  • Final Report must include: branch name, commit SHA, PR URL (if created), verification commands & results, review conclusion, open questions.

Workflow Steps

Execute the complete workflow in standalone mode:

1. Requirements Gathering

Invoke /grill-with-docs skill (if available) to confirm requirements with user:

  • Understand the actual problem the user wants to solve
  • Confirm technical boundaries and constraints
  • Identify relevant documentation and context

2. Specification

Invoke /to-spec skill (if available) to generate technical specification:

  • Transform requirements into actionable technical spec
  • Define clear acceptance criteria
  • Plan file change scope

3. Worktree Creation (Isolation)

Create isolated git worktree for development:

# Create feature branch and worktree based on current master
BRANCH_NAME="feat/$(date +%s)-<descriptive-name>"
git worktree add -b "$BRANCH_NAME" "../dna-builder-wt-$BRANCH_NAME" master

Important: Record worktree path and branch name for subsequent steps.

4. Implementation

Invoke /implement-spec skill in worktree (if available; otherwise implement directly per spec):

  • Switch to worktree directory
  • Implement per specification
  • Follow project code style (.agents/docs/code-style.md)
  • Follow commit convention (.agents/docs/commit-convention.md)
  • Use bun i18n add for i18n content (all 6 languages, each in native language)
  • Run build tools as needed (bun icon add, bun tools/data-pack.ts, etc.)

5. Testing & Linting (Verification)

Execute verification in worktree:

# Frontend changes
pnpm lint                    # Incremental lint (Biome + vue-tsc on changed files only)
pnpm test                    # Run tests if test files modified

# Backend changes (Rust)
cargo check
cargo test

# Data package changes
pnpm --filter dna-builder-data test

Fix all errors and warnings before proceeding.

6. Code Review

Use a fresh-context subagent to invoke /code-review skill (if available; otherwise use read-only subagent) for objective review:

  • Scan implementation code quality
  • Check compliance with project conventions
  • Identify potential issues and improvement opportunities

Handle review feedback:

  • Valid issues: Fix in worktree
  • Invalid issues: Record but may ignore
  • Controversial: Discuss with user to decide

7. PR Creation (Pull Request)

⚠️ The following commands modify remote repository: git push and gh pr create are sensitive operations. Must confirm with user in conversation first (or confirm launcher has explicitly authorized auto-push/PR), then proceed.

Commit code and create PR:

# Commit all changes
git add .
git commit -m "feat(<scope>): <description>

- <change 1>
- <change 2>
"

# Push to remote
git push -u origin "$BRANCH_NAME"

# Create PR using GitHub CLI
gh pr create --base master --head "$BRANCH_NAME" \
  --title "<PR title>" \
  --body "<PR body following /pr template>"

Invoke /pr skill (if available) to generate PR description including:

  • Summary: Visual of code changes (diff/tree/mermaid)
  • Evidence: Before/After screenshots or test output
  • Merge Danger:
    • Door: one-way / two-way
    • Blast Radius: impact scope assessment

8. Worktree Cleanup

Clean up worktree after PR creation:

# Return to main repo
cd <main-repo-path>

# Remove worktree (keep remote branch)
git worktree remove "../dna-builder-wt-$BRANCH_NAME"

# Delete local branch (remote branch auto-deleted by GitHub after PR merge)
git branch -d "$BRANCH_NAME"

Note: Only clean up after PR successfully created, ensuring code is pushed to remote.

Usage Example

# User invocation
/wt-review-pr

# Or with requirement description
/wt-review-pr Add user avatar upload feature

Error Handling

  • Unclear requirements: /grill-with-docs phase clarifies with user
  • Lint/Test failures: Fix in worktree then re-verify
  • Code review finds issues: Fix then re-review
  • PR creation fails: Keep worktree, wait for user intervention
  • Any step fails: Pause workflow, report issue, wait for user decision

Notes

  • Worktree path pattern: ../dna-builder-wt-<branch-name>
  • Branch naming: feat/<timestamp>-<descriptive-name>
  • Work entirely in worktree to avoid polluting main repo
  • Follow project rules: don't run pnpm dev, don't execute git push/merge and other sensitive operations without user confirmation
  • i18n content must cover all 6 languages at once (cn/tw/en/jp/kr/fr), each written in its native language

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.