experiment

Solid

Automated optimization loop with scalar fitness function. Proposes changes in isolated worktrees, measures with a metric command, keeps improvements, discards failures. Supports convergence detection and diminishing returns.

Web & Frontend 1 stars 0 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 80/100

Stars 20%
10
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# /experiment — Metric-Driven Optimization Loop ## Identity /experiment is an automated optimization loop with a scalar fitness function. It takes a hypothesis, runs isolated experiments in git worktrees, measures results with a metric command, and keeps improvements or discards failures. Think of it as automated A/B testing for code changes. ## Inputs The user provides three things: 1. **scope**: Files to modify (glob pattern, e.g., "src/api/**/*.ts") 2. **metric**: Shell command that outputs a single number (e.g., `npm run build 2>&1 | tail -1 | grep -oP '\d+'`) 3. **budget**: Iteration cap (default: 5) or time cap (e.g., "10 minutes") If any input is missing, ask for it. The metric MUST output a single number to stdout. ## Protocol ### Step 1: BASELINE 1. Stash any uncommitted changes (restore on exit) 2. Run the metric command. Record the baseline value. 3. Determine direction: does lower = better (bundle size, error count) or higher = better (FPS, test count)? Ask the user if ambiguous. 4. Log: `Baseline: {value} ({metric command})` ### Step 2: ITERATE For each iteration (up to budget): 1. **Create isolation**: Spawn a sub-agent in a worktree (`isolation: "worktree"`) 2. **Propose change**: The agent modifies files within scope to improve the metric. Provide context: baseline value, metric direction, scope, what previous iterations tried. 3. **Measure**: Run the metric command in the worktree 4. **Gate**: Run typecheck...

Details

Author
allysgrandiose674
Repository
allysgrandiose674/Armory
Created
3 months ago
Last Updated
yesterday
Language
JavaScript
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category