From be65d89a376b916056cf6e32a2f69125548abdf7 Mon Sep 17 00:00:00 2001 From: rohan-tessl Date: Thu, 7 May 2026 12:11:15 +0530 Subject: [PATCH] feat: improve 5 lowest-scoring skill definitions --- .../lading-optimize-find-target/SKILL.md | 3 +- .claude/skills/lading-optimize-hunt/SKILL.md | 15 +------- .../skills/lading-optimize-review/SKILL.md | 11 +----- .../skills/lading-optimize-submit/SKILL.md | 38 +++---------------- .claude/skills/release/SKILL.md | 2 +- 5 files changed, 11 insertions(+), 58 deletions(-) diff --git a/.claude/skills/lading-optimize-find-target/SKILL.md b/.claude/skills/lading-optimize-find-target/SKILL.md index b8c9cbe3c..5dafc148e 100644 --- a/.claude/skills/lading-optimize-find-target/SKILL.md +++ b/.claude/skills/lading-optimize-find-target/SKILL.md @@ -1,8 +1,7 @@ --- name: lading-optimize-find-target -description: Finds a valid optimization target in lading. Returns a filled target.yaml template with pattern, technique, target, file, bench, and fingerprint. Use before /lading-optimize-hunt or when selecting a new optimization target. +description: "Finds a valid optimization target in lading by profiling allocation intensity, scanning for known inefficiency patterns (buffer reuse, hoist allocation, vec-with-capacity, etc.), and ranking opportunities by impact. Returns a filled target.yaml template with pattern, technique, target, file, bench, and fingerprint. Use when selecting what to optimize next, finding a performance bottleneck, or before running /lading-optimize-hunt." allowed-tools: Bash Read Glob Grep -context: fork --- ## Phase 1: Discover Benchmark-Eligible Modules diff --git a/.claude/skills/lading-optimize-hunt/SKILL.md b/.claude/skills/lading-optimize-hunt/SKILL.md index 74be853b0..9b8be1a6a 100644 --- a/.claude/skills/lading-optimize-hunt/SKILL.md +++ b/.claude/skills/lading-optimize-hunt/SKILL.md @@ -1,23 +1,12 @@ --- name: lading-optimize-hunt -description: Coordinates optimization attempts. Captures baselines, implements changes, invokes review, and records outcomes. +description: "Coordinates lading Rust performance optimization attempts: profiles hot paths, captures benchmark baselines (Criterion + hyperfine), implements a single focused change, invokes multi-persona review, and records outcomes in db.yaml. Use when the user wants to optimize lading performance, speed up serialization, reduce allocations, or run the full benchmark-driven optimization loop." allowed-tools: Bash(cat:*) Bash(cargo:*) Bash(ci/*:*) Bash(hyperfine:*) Bash(*/payloadtool:*) Bash(tee:*) Read Write Edit Glob Grep Skill --- # Optimization Hunt -Coordinates optimization attempts: captures baselines, implements changes, invokes review, and records all outcomes. - -## Role: Coordinator and Recorder - -Hunt is the **coordinator and recorder** — it captures baselines, implements changes, hands off to review, and records all outcomes. - -Hunt does NOT: -- Run post-change benchmarks (review does this) -- Make pass/fail decisions on optimizations (review does this) - -Hunt DOES: -- Record all verdicts and outcomes in `.claude/skills/lading-optimize-hunt/assets/db.yaml` after review returns +Coordinates optimization attempts. Captures baselines, implements changes, hands off to review (which runs post-change benchmarks and judges), and records all verdicts in `.claude/skills/lading-optimize-hunt/assets/db.yaml`. --- diff --git a/.claude/skills/lading-optimize-review/SKILL.md b/.claude/skills/lading-optimize-review/SKILL.md index 16df3d253..b4bdaa7b2 100644 --- a/.claude/skills/lading-optimize-review/SKILL.md +++ b/.claude/skills/lading-optimize-review/SKILL.md @@ -1,9 +1,7 @@ --- name: lading-optimize-review -description: Reviews optimization patches using a 5-persona peer review system. Requires unanimous approval backed by benchmarks. -argument-hint: "[bench] [fingerprint] [file] [target] [technique]" +description: "Reviews lading Rust performance optimization patches using a 5-persona peer review system (Duplicate Hunter, Skeptic, Conservative, Rust Expert, Greybeard). Runs post-change Criterion and hyperfine benchmarks, enforces statistical thresholds, and returns an APPROVED/REJECTED YAML verdict. Use when reviewing a performance patch, validating optimization results, or the user says 'review optimization' or 'check my perf changes'." allowed-tools: Bash(cat:*) Bash(sample:*) Bash(samply:*) Bash(cargo:*) Bash(ci/*:*) Bash(hyperfine:*) Bash(*/payloadtool:*) Bash(tee:*) Read Glob Grep -context: fork --- # Optimization Patch Review @@ -171,12 +169,7 @@ ci/kani lading_payload ## Phase 4: Decision -| Outcome | Votes | Action | -|---------|-------|--------| -| **APPROVED** | 5/5 APPROVE | Return APPROVED report | -| **REJECTED** | Any REJECT | Return REJECTED report | - -Duplicates, bugs, correctness issues, and missing benchmarks are all rejections. Describe the specific reason in the report's `reason` field. +All 5 personas must APPROVE for the optimization to pass. Any REJECT from any persona results in rejection. Duplicates, bugs, correctness issues, and missing benchmarks are all rejections. Describe the specific reason in the report's `reason` field. --- diff --git a/.claude/skills/lading-optimize-submit/SKILL.md b/.claude/skills/lading-optimize-submit/SKILL.md index 295b35971..8af372745 100644 --- a/.claude/skills/lading-optimize-submit/SKILL.md +++ b/.claude/skills/lading-optimize-submit/SKILL.md @@ -1,15 +1,12 @@ --- name: lading-optimize-submit -description: Full optimization workflow with git branch creation, commits, and optional PR. Wraps /lading-optimize-hunt with git automation. +description: "End-to-end lading performance optimization with git automation: runs the full optimization hunt (profiling, baselines, implementation, review), then creates a git branch, commits with benchmark results, and optionally opens a PR. Use when the user wants to optimize lading and submit the results, or says 'optimize and commit', 'optimize and PR', or 'submit optimization'." allowed-tools: Bash(git:*) Bash(gh:*) Bash(cat:*) Read Skill --- # Optimization Submit Workflow -**Complete optimization workflow with git automation.** This skill wraps `/lading-optimize-hunt` and handles: -- Git branch creation -- Git commit with formatted results -- Optional push and PR creation +Wraps `/lading-optimize-hunt` with git automation: branch creation, commit with benchmark results, and optional PR. --- @@ -22,10 +19,7 @@ Run `/lading-preflight` first to ensure environment is ready. ## Phase 1: Prepare Git Environment ```bash -# Ensure clean state on main git checkout main && git pull - -# Verify clean working directory git status ``` @@ -37,27 +31,7 @@ git status Run `/lading-optimize-hunt`. -**CRITICAL: After `/lading-optimize-hunt` completes, you MUST return here to Phase 3.** - -The hunt workflow will: -- Select and analyze optimization targets -- Capture baseline benchmarks -- Implement optimization -- Run basic ci/validate check -- Invoke /lading-optimize-review (which runs post-change benchmarks and judges) - -**The hunt will:** -- Record the verdict in `.claude/skills/lading-optimize-hunt/assets/db.yaml` after review returns - -**BUT the hunt does NOT:** -- Run post-change benchmarks (review does this) -- Make pass/fail decisions (review does this) -- Create git branches -- Commit changes -- Push to remote -- Create PRs - -Those are the responsibility of THIS skill (lading-optimize-submit). +**CRITICAL: After `/lading-optimize-hunt` completes, you MUST return here to Phase 3.** The hunt handles target selection, baselines, implementation, review, and verdict recording -- but NOT git operations (branch/commit/push/PR), which are handled below. --- @@ -114,7 +88,7 @@ git push -u origin opt/- # Create PR using gh CLI gh pr create \ --title "opt: " \ - --body "$(cat <<'EOF' + --body "$(cat <<'PR_EOF' ## Summary @@ -132,9 +106,7 @@ gh pr create \ - [x] ci/validate passes - [x] Kani proofs pass (or N/A: ) - [x] Determinism verified - -🤖 Generated with [Claude Code](https://claude.com/claude-code) -EOF +PR_EOF )" ``` --- diff --git a/.claude/skills/release/SKILL.md b/.claude/skills/release/SKILL.md index 8d5f2d69f..8b20c7d2a 100644 --- a/.claude/skills/release/SKILL.md +++ b/.claude/skills/release/SKILL.md @@ -1,6 +1,6 @@ --- name: release -description: Prepare a lading release. Updates CHANGELOG.md, bumps version in Cargo.toml, updates Cargo.lock, commits, and creates a PR. +description: "Prepare a lading release: determines the next semver version, updates CHANGELOG.md, bumps version in Cargo.toml, updates Cargo.lock, commits, and creates a PR. Use when the user wants to cut a release, bump the version, publish a new lading version, or says 'release lading'." allowed-tools: Read, Edit, Bash, AskUserQuestion ---