Experiment
Automated optimization loop with scalar fitness function.
Install
npx skills add SethGammon/Citadel --skill experiment -g -a claude-code -y- Repository
- SethGammon/Citadel927
- Category
- Engineering
- Updated
- 5d ago
- License
- MIT
- Context cost
- Mediumabout 2,979 tokens
- Runs scripts
- No, instructions only
What it does
Automated optimization loop with scalar fitness function. Proposes changes in isolated worktrees, measures against a fixed baseline, and retains verified candidates locally. Supports convergence detection and diminishing returns.
/experiment, Metric-Driven Optimization Loop
Identity
Coordinate bounded metric-driven experiments in isolated checkouts, retaining candidates locally until the declared verification and independent review pass.
Orientation
When to Use
- When you want to optimize a measurable metric (bundle size, error count, test coverage, FPS)
- When you have a clear hypothesis but aren't sure which of several approaches wins
- When manual A/B testing would be too slow or error-prone
- NOT when the goal is subjective ("make it feel better"), the metric must be a number
Inputs
The user provides three things:
- scope: Files to modify (glob pattern, e.g., "src/api/**/*.ts")
- metric: Project command that outputs a single number (e.g.,
node tools/bundle-bytes.cjs) - budget: Iteration cap (default: 5) or time cap (e.g., "10 minutes")
Ask only for missing inputs that cannot be resolved from the request or project. The metric MUST exit successfully and output a single finite number to stdout.
