Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .claude/skills/lading-optimize-find-target/SKILL.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
15 changes: 2 additions & 13 deletions .claude/skills/lading-optimize-hunt/SKILL.md
Original file line number Diff line number Diff line change
@@ -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`.

---

Expand Down
11 changes: 2 additions & 9 deletions .claude/skills/lading-optimize-review/SKILL.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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.

---

Expand Down
38 changes: 5 additions & 33 deletions .claude/skills/lading-optimize-submit/SKILL.md
Original file line number Diff line number Diff line change
@@ -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.

---

Expand All @@ -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
```

Expand All @@ -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.

---

Expand Down Expand Up @@ -114,7 +88,7 @@ git push -u origin opt/<crate>-<technique>
# Create PR using gh CLI
gh pr create \
--title "opt: <short description>" \
--body "$(cat <<'EOF'
--body "$(cat <<'PR_EOF'
## Summary
<What was optimized>

Expand All @@ -132,9 +106,7 @@ gh pr create \
- [x] ci/validate passes
- [x] Kani proofs pass (or N/A: <reason>)
- [x] Determinism verified

🤖 Generated with [Claude Code](https://claude.com/claude-code)
EOF
PR_EOF
)"
```
---
2 changes: 1 addition & 1 deletion .claude/skills/release/SKILL.md
Original file line number Diff line number Diff line change
@@ -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
---

Expand Down