experiment

Automate metric-driven optimization loops across isolated git worktrees.

820|78|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/SethGammon/Citadel --skill experiment-sethgammon
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: experiment
Source: https://github.com/SethGammon/Citadel/tree/main/skills/experiment
Command: npx skills add https://github.com/SethGammon/Citadel --skill experiment-sethgammon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automated optimization of code by running iterative experiments in isolated git worktrees, guided by a scalar fitness function to identify improvements and discard failures.

Core Features & Use Cases

  • Baseline measurement and progress tracking
  • Safe isolation via git worktrees for repeatable experiments
  • Propose, implement, and evaluate changes that improve a numeric metric
  • Convergence detection, diminishing returns checks, and structured reporting

Quick Start

Provide a scope, a metric command that outputs a single number, and a budget to begin automated optimization.

Frequently Asked Questions about experiment

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate code optimization using a numeric metric?

Automated code optimization requires defining a scope, a shell metric command outputting a single number, and an iteration budget. The system then runs iterative experiments in isolated git worktrees to discover changes that measurably improve the defined objective.

What is the best way to run iterative code experiments safely?

Iterative code experiments run safely by using git worktree isolation. This keeps proposed changes separate from your main branch, allowing the system to propose, implement, and evaluate modifications without risking your primary codebase during the optimization loop.

How do I set up a metric-driven optimization loop for my project?

Setting up a metric-driven optimization loop involves providing a scope, a shell command that outputs a single numeric metric, and an iteration budget. The system measures the baseline, runs experiments in worktrees, and tracks progress against that baseline.

Does automated code optimization work with any shell command?

Automated code optimization works with any shell command that outputs a single number. This scalar fitness function guides the iterative process, enabling the system to identify code changes that improve the measurable objective and discard failures.

What are the limitations of using git worktrees for code improvement?

Git worktree isolation requires available disk space for each experiment and depends on shell metric commands providing consistent numeric output. The system enforces type checks and logging, but convergence detection and diminishing returns checks will halt the loop when improvements stop.

Why does my iterative optimization loop stop before reaching the budget?

Iterative optimization loops stop early due to convergence detection and diminishing returns checks. When the system determines that continued experiments are no longer yielding measurable improvements to the numeric metric, it halts and provides structured reporting on the results.