Loading...
Loading...
Coordinates performance optimization: algorithm, query, and runtime workers in parallel
npx skill4agent add levnikolaevich/claude-code-skills ln-810-performance-optimization-coordinatorPaths: File paths (,shared/,references/) 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-*
| Aspect | Details |
|---|---|
| Input | Target file/module OR audit report (ln-650 output) |
| Output | Optimized code with verification proof |
| Workers | ln-811 (algorithm), ln-812 (query), ln-813 (runtime) |
| Check | Required | Action if Missing |
|---|---|---|
| Target file OR audit report | Yes | Block optimization |
| Git clean state | Yes | Block (need clean baseline for revert) |
| Test infrastructure | Yes | Block (workers need tests for keep/discard) |
shared/references/ci_tool_detection.md| Source | Detection | Workers Activated |
|---|---|---|
| ln-650 output exists | ln-812 (query) + ln-813 (runtime) |
| Target file + function | User-specified | ln-811 (algorithm) |
| Full audit report | All ln-65X sections present | All three workers |
| Condition | ln-811 | ln-812 | ln-813 |
|---|---|---|---|
| Target function specified | Yes | No | No |
| ln-651 findings present | No | Yes | No |
| ln-653 findings present | No | No | Yes |
| All audit findings | Conditional* | Yes | Yes |
CRITICAL: All delegations use Task tool withandsubagent_type: "general-purpose"— each worker creates its own branch perisolation: "worktree".shared/references/git_worktree_fallback.md
FOR each selected worker:
Task(description: "Optimize via ln-81X",
prompt: "Execute ln-81X-{worker}. Read skill from ln-81X-{worker}/SKILL.md. Context: {delegationContext}",
subagent_type: "general-purpose",
isolation: "worktree")| Field | Type | Description |
|---|---|---|
| projectPath | string | Absolute path to project |
| auditReport | string | Path to persistence_audit.md (if applicable) |
| targetFile | string | Target file path (if applicable) |
| targetFunction | string | Target function name (if applicable) |
| options.runTests | bool | Run tests after optimization |
| options.runLint | bool | Run lint after optimization |
| Workers | Can Parallel | Reason |
|---|---|---|
| ln-812 + ln-813 | Yes | Different files, different fix types |
| ln-811 + ln-812 | Depends | Only if targeting different files |
| ln-811 + ln-813 | Depends | Only if targeting different files |
| Worker | Branch Pattern | Contents |
|---|---|---|
| ln-811 | | Algorithm optimizations with benchmarks |
| ln-812 | | Query optimizations |
| ln-813 | | Runtime optimizations |
| Field | Type | Description |
|---|---|---|
| worker | string | ln-811, ln-812, or ln-813 |
| status | enum | success, partial, failed |
| branch | string | Worker's result branch name |
| fixes_applied | int | Number of kept optimizations |
| fixes_discarded | int | Number of discarded attempts |
| details | object | Worker-specific report |
| Field | Description |
|---|---|
| input_source | Audit report or target file |
| workers_activated | Which workers ran |
| total_fixes_applied | Sum across all workers |
| total_fixes_discarded | Sum across all workers |
| build_verified | PASSED or FAILED |
| per_worker[] | Individual worker reports |
| algorithm_improvement | Benchmark improvement % (ln-811 only) |
Options:
# Input
audit_report: "docs/project/persistence_audit.md"
target_file: ""
target_function: ""
# Workers
enable_algorithm: true
enable_query: true
enable_runtime: true
# Verification
run_tests: true
run_build: true
run_lint: true
# Safety
revert_on_build_failure: true| Error | Recovery |
|---|---|
| Worker timeout | Log timeout, continue with other workers |
| Single worker failure | Revert worker changes, report partial success |
| Build failure | Revert last worker, re-verify |
| Error | Action |
|---|---|
| No workers activated | Report "no optimization targets found" |
| All workers failed | Report failures, suggest manual review |
| Dirty git state | Block with "commit or stash changes first" |
../ln-811-algorithm-optimizer/SKILL.md../ln-812-query-optimizer/SKILL.md../ln-813-runtime-optimizer/SKILL.mdshared/references/ci_tool_detection.mdisolation: "worktree"