Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ln-814-optimization-executor

БесплатноБез исполняемых скриптовНе проверен

Multi-file hypothesis testing with keep/discard loop, compound baselines, and experiment logging

tensologyот tensology★ 17 звёзд на GitHub

Об этом скилле

Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.

ln-814-optimization-executor

Type: L3 Worker Category: 8XX Optimization

Executes optimization hypotheses from the researcher using keep/discard autoresearch loop. Supports multi-file changes, compound baselines, and any optimization type (algorithm, architecture, query, caching, batching).


Overview

Aspect Details
Input .optimization/{slug}/context.md OR conversation context (standalone invocation)
Output Optimized code on isolated branch, per-hypothesis results, experiment log
Pattern Strike-first: apply all → test → measure. Bisect only on failure. A/B only for contested alternatives

Workflow

Phases: Pre-flight → Baseline → Strike-First Execution → Report → Gap Analysis


Phase 0: Pre-flight Checks

Slug Resolution

  • If invoked via Agent with contextStore containing slug — use directly.
  • If invoked standalone — derive slug from context_file path or ask user.

Step 1: Load Context

Read .optimization/{slug}/context.md from project root. Contains problem statement, profiling results, research hypotheses, and target metric.

If file not found: check conversation context for the same data (standalone invocation).

Step 2: Pre-flight Validation

Check Required Action if Missing
Hypotheses provided (H1..H7) Yes Block — nothing to execute
Test infrastructure Yes Block (see ci_tool_detection.md)
Git clean state Yes Block (need clean baseline for revert)
Worktree isolation Yes Create per git_worktree_fallback.md
E2E safety test No (recommended) Read from context; WARN if null — full test suite as fallback gate

MANDATORY READ: Load shared/references/git_worktree_fallback.md — use optimization rows. MANDATORY READ: Load shared/references/ci_tool_detection.md — use Test Frameworks + Benchmarks sections.

E2E Safety Test

Read e2e_test_command from context file (discovered by profiler during test discovery phase).

Source Action
Context has e2e_test_command Use as functional safety gate in Phase 2
Context has e2e_test_command = null WARN: full test suite serves as fallback gate
Standalone (no context) User must provide test command; block if missing

Phase 1: Establish Baseline

Reuse baseline from performance map (already measured with real metrics).

From Context File

Read performance_map.baseline and performance_map.test_command from .optimization/{slug}/context.md.

Field Source
test_command Discovered/created test command
baseline Multi-metric snapshot: wall time, CPU, memory, I/O

Verification Run

Run test_command once to confirm baseline is still valid (code unchanged since profiling):

Step Action
1 Run test_command
2 IF result within 10% of baseline.wall_time_ms → baseline confirmed
3 IF result diverges > 10% → re-measure (3 runs, median) as new baseline
4 IF test FAILS → BLOCK: "test fails on unmodified code"

Phase 2: Strike-First Execution

MANDATORY READ: Load optimization_categories.md for pattern reference during implementation.

Apply maximum changes at once. Only fall back to A/B testing where sources genuinely disagree on approach.

Step 1: Triage Hypotheses

Split hypotheses from researcher into two groups:

Group Criteria Action
Uncontested Clear best approach, no conflicting alternatives Apply directly in the strike
Contested Multiple approaches exist (e.g., source A says cache, source B says batch) OR conflicts_with another hypothesis A/B test each alternative on top of full implementation

Most hypotheses should be uncontested — the researcher already ranked them by evidence.

Step 2: Strike (Apply All Uncontested)

1. APPLY all uncontested hypotheses at once (all file edits)
2. VERIFY: Run full test suite
   IF tests FAIL:
     - IF fixable (typo, missing import) → fix & re-run ONCE
     - IF fundamental → BISECT (see Step 4)
3. E2E GATE (if e2e_test_command not null):
   IF FAIL → BISECT
4. MEASURE: 5 runs, median
5. COMPARE: improvement vs baseline
   IF improvement meets target → DONE. Commit all:
     git add {all_files}
     git commit -m "perf: apply optimizations H1,H2,H3,... (+{improvement}%)"
   IF no improvement → BISECT

Step 3: Contested Alternatives (A/B on top of strike)

For each contested pair/group, with ALL uncontested changes already applied:

FOR each contested hypothesis group:
  1. Apply alternative A → test → measure (5 runs, median)
  2. Revert alternative A, apply
Полный SKILL.md на GitHub

Установить ln-814-optimization-executor в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/optimization_categories.md

FAQ

Что делает скилл ln-814-optimization-executor?

Multi-file hypothesis testing with keep/discard loop, compound baselines, and experiment logging

Как установить скилл ln-814-optimization-executor?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ln-814-optimization-executor запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить ln-814-optimization-executor с