A reusable skill and methodology for AI systems and agents to design, review, and diagnose robust learning systems—from the first baseline to production operations.
It helps choose among supervised learning, imitation learning, reinforcement learning, offline RL, self-play, and hybrid strategies; design independent rewards and evaluations; control experiments; detect pathological behavior; and plan safety, promotion, and rollback.
The methodology is platform- and domain-general. It can guide AI assistants, autonomous agents, research workflows, and engineering teams across robotics, recommendation, classification, forecasting, language, vision, simulation, games, and many other domains. Chess is only one possible example.
- An operational problem definition and explicitly prohibited behaviors.
- Required baselines and a data strategy.
- A recommended learning regime and model architecture.
- Loss, reward, curriculum, and exploration design.
- Defenses against reward hacking and specification gaming.
- Reproducible governance with seeds, versions, hashes, and checkpoints.
- Ablations, confidence intervals, and robustness tests.
- Training, data, policy, and operational observability.
- Containment, integrity tests, and incident classification.
- Promotion gates, progressive deployment, monitoring, and rollback.
git clone https://github.com/perepepeu/design-learning-agents.git
Copy-Item -Recurse -Force `
.\design-learning-agents\design-learning-systems `
"$HOME\.codex\skills\design-learning-systems"git clone https://github.com/perepepeu/design-learning-agents.git
cp -R design-learning-agents/design-learning-systems \
"${CODEX_HOME:-$HOME/.codex}/skills/design-learning-systems"Restart or reload Codex if the skill does not appear immediately.
Invoke the skill explicitly:
$design-learning-systems Design an agent that learns to control warehouse
inventory without increasing stockouts or waste.
More examples:
$design-learning-systems Compare imitation learning, offline RL, and online RL
for a robot.
$design-learning-systems Review this reward function and find shortcuts the
agent could exploit.
$design-learning-systems Create a reproducible protocol for comparing two
recommendation models with multiple seeds and regression tests.
$design-learning-systems Diagnose why reward increased while the agent became
worse on held-out scenarios.
The core workflow has nine stages:
- Define the objective, decisions, constraints, and risks.
- Establish baselines and the data strategy.
- Select the learning regime and architecture.
- Separate the real objective, training signal, and evaluation.
- Freeze governance and ablations before seeing results.
- Instrument behavioral and operational observability.
- Evaluate with multiple seeds, uncertainty, and held-out scenarios.
- Design containment and environment-integrity controls.
- Promote gradually, monitor continuously, and retain rollback.
design-learning-systems/
├── SKILL.md
├── agents/
│ └── openai.yaml
├── assets/
│ ├── experiment-manifest.json
│ └── learning-system-plan.md
├── references/
│ ├── problem-and-learning-regimes.md
│ ├── model-selection.md
│ ├── reward-and-curriculum.md
│ ├── experimental-governance.md
│ ├── evaluation-and-ablations.md
│ ├── observability-and-failure-modes.md
│ ├── safety-and-alignment.md
│ ├── deployment-and-monitoring.md
│ └── example-applications.md
└── scripts/
├── validate_experiment_manifest.py
└── compare_experiments.py
SKILL.md contains the decision workflow. References are loaded only when relevant, keeping context lean.
Copy assets/experiment-manifest.json, fill in the fields, and run:
python design-learning-systems/scripts/validate_experiment_manifest.py \
path/to/experiment-manifest.json --strictThe validator checks minimum reproducibility fields, duplicate seeds, confidence levels, and unresolved placeholders.
Prepare a CSV file:
variant,seed,metric
baseline,101,0.62
candidate,101,0.67
baseline,202,0.64
candidate,202,0.70Run:
python design-learning-systems/scripts/compare_experiments.py results.csv \
--baseline baseline --candidate candidateThe script reports descriptive statistics, the paired delta by seed, and a bootstrap interval. It does not replace domain-specific evaluation.
- Never claim progress from one seed or a cherry-picked best run.
- Never confuse training reward with real success.
- Never add complexity without a baseline and a testable hypothesis.
- Never hide regressions behind an aggregate mean.
- Never compensate for an environment bug by distorting model behavior.
- Never deploy without containment, telemetry, and a tested rollback path.
See CONTRIBUTING.md to set up, validate, and propose changes. Security issues must follow SECURITY.md, not a public issue.
Released under the MIT License.