experiment

Automate iterative code optimization by evaluating scalar fitness functions in isolated worktrees.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/special-place-administrator/citadel_codex --skill experiment-special-place-administrator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: experiment
Source: https://github.com/special-place-administrator/citadel_codex/tree/main/skills/experiment
Command: npx skills add https://github.com/special-place-administrator/citadel_codex --skill experiment-special-place-administrator

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automated, repeatable optimization of code changes by evaluating a scalar fitness function in isolated worktrees, enabling fast, data-driven improvements.

Core Features & Use Cases

  • Isolation: run experiments in individual worktrees to avoid polluting main branches.
  • Metric-driven evaluation: a single numeric command determines success across iterations.
  • Convergence & guardrails: detects diminishing returns and halts when improvements plateau.
  • Reporting: writes results to .citadel/research and logs telemetry for audit.

Quick Start

Provide a scope pattern, a metric command that outputs a single number, and an optional budget to start an automated optimization loop.

Frequently Asked Questions about experiment

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

FAQPage Schema
How do I automate iterative code optimization using a scalar fitness function?

Automated code optimization evaluates a scalar fitness function across isolated git worktrees. It proposes changes, measures metric results, and selects the best outcomes iteratively to drive data-driven performance improvements.

Can I run code optimization experiments in isolated git worktrees without polluting my main branch?

Yes, code optimization experiments run in individual isolated git worktrees. This keeps your main branch clean while the automated loop proposes changes, evaluates metrics, and type-checks each iteration.

What is convergence-driven reporting in metric-driven code evaluation?

Convergence-driven reporting tracks metric improvements across iterations and halts when returns diminish. It writes results and telemetry logs to a research directory for audit.

How do I set up a metric command to measure code performance in an automated loop?

Provide a scope pattern and a metric command that outputs a single numeric value. The optimization loop uses this scalar fitness function to evaluate baseline performance, propose changes, and gate iterations via type-checks.

When should I not use automated iterative optimization for code changes?

Avoid automated iterative optimization when your success criteria cannot be measured by a single numeric metric command, as the loop relies entirely on scalar fitness evaluation to select changes and detect convergence.

Does the optimization loop type-check code changes before measuring metric results?

Yes, type-check gating validates proposed code changes before measuring metric results. This ensures that only type-safe iterations proceed to fitness evaluation within the isolated worktrees.