ce-optimize

Run metric-driven iterative optimization loops with parallel experiments and LLM-as-judge scoring.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/Norfolk-Group/marcela-norfolk-ai --skill ce-optimize-norfolk-group
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ce-optimize
Source: https://github.com/Norfolk-Group/marcela-norfolk-ai/tree/main/skills/compound-engineering/skills/ce-optimize
Command: npx skills add https://github.com/Norfolk-Group/marcela-norfolk-ai --skill ce-optimize-norfolk-group

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Improving measurable outcomes like clustering quality, search relevance, build latency, or prompt quality often requires trying many variants and scoring each one consistently. This Skill automates that loop: it defines a measurable goal, builds measurement scaffolding, runs parallel experiments in isolated git worktrees, keeps improvements, and converges toward the best solution without losing state across long runs. ## Core Features & Use Cases - Metric-Driven Experiment Loop: Define a YAML optimization spec with hard metrics or LLM-as-judge scoring, degenerate gates, and diagnostics, then run batched experiments that keep winners and revert losers. - Crash-Safe Persistence: Every experiment result is appended to an on-disk experiment log immediately after measurement, with write verification, per-experiment result markers, and resume support after crashes or context compaction. - Isolated Parallel Execution: Experiments run in dedicated git worktrees (or Codex sandboxes) with a parallelism probe that detects port conflicts, shared SQLite databases, lock files, and GPU contention before dispatch. - Use Case: Improve issue clustering quality across 18k tickets by testing embedding, preprocessing, and algorithm hypotheses, using degenerate gates to reject mega-clusters and an LLM judge to score sampled cluster coherence. ## Quick Start Ask the agent to run ce-optimize with a description of your optimization goal, such as reducing build latency while keeping tests green, and approve the generated spec and baseline before the loop begins.

Frequently Asked Questions about ce-optimize

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

FAQPage Schema
How do I run an iterative optimization loop on my codebase?

Provide an optimization spec YAML or describe your goal, and the skill validates the spec, measures a baseline, generates hypotheses, and runs batched experiments in isolated git worktrees. Each experiment is measured against gates and either kept or reverted based on the primary metric.

When should I use hard metrics vs LLM-as-judge evaluation?

Use hard metrics when better is an objective scalar like build time, latency, or test pass rate. Use LLM-as-judge when quality requires semantic judgment, such as clustering coherence or search relevance, where proxy metrics can be gamed.

Can optimization experiments run in parallel safely?

Yes, experiments run in separate git worktrees with up to 6 concurrent workers. A parallelism probe checks for hardcoded ports, shared SQLite databases, lock files, and GPU usage, and the skill recommends serial mode when exclusive resources are detected.

What happens if an optimization run crashes mid-experiment?

All state lives in an on-disk experiment log that is appended immediately after each measurement and verified by reading back. On resume, the skill reads the log, scans worktrees for result.yaml markers, and recovers measured-but-unlogged experiments.

When is ce-optimize not the right tool?

It is not suitable for one-shot bug fixes with obvious root causes, changes without a repeatable measurement harness, or problems where better cannot be measured or judged consistently. The first run should stay small and serial to validate the harness.