codex/skills/emulator/SKILL.md
Instantiate Ghost-style behavior contracts as executable, replayable, mutatable synthetic implementations. Use for `$emulator`, emulator runs, generated worlds from Ghost packages, synthetic implementations, scenario mutation, counterexamples, implementation divergence, trace reports, or EER-v1 execution reports. Not for deciding what to specify, producing Ghost contracts, editing target skills, or assuming emulator failures imply skill defects.
npx skillsauth add tkersey/dotfiles emulatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
$emulator turns portable behavior contracts into executable synthetic experience.
$grill-me learns what is worth specifying
$ghost captures the behavior contract
$emulator instantiates, runs, mutates, and compares implementations
$emulator does not decide what matters, produce the Ghost contract, diagnose skill deltas, or edit target skills.
Use $emulator when the user asks to:
generate executable worlds from a Ghost package
instantiate a scenario spec as a runnable environment
create deterministic, noisy, adversarial, or mutation implementations
run or compare synthetic implementations
mutate scenarios to find counterexamples
produce traces, divergence reports, or EER-v1
Do not use $emulator for:
material scope clarification -> $grill-me
portable behavior contract/spec extraction -> $ghost
historical session mining -> $seq
one live watched session -> $shadow
skill change diagnosis -> $tune only if explicitly requested
skill package edits -> $refine only after explicit apply authority
$tune and $refine are optional downstream consumers, not part of the core emulator lifecycle.
Prefer:
emulator_request:
mode: design | implement | run | mutate | compare | export
source_contract:
kind: ghost_package | ghost_scenario_tests | emulator_contract
path:
fingerprint:
target:
name:
kind: skill | agent_loop | tool_loop | workflow | library_protocol
emulator_root: codex/emulators
implementation_kinds:
- deterministic
- noisy
- adversarial
- mutation
seed:
scenario_budget:
authorized_files:
allowed: []
forbidden: []
output:
report: EER-v1
Fail closed when the source contract is absent or the target is unknown.
Choose exactly one mode.
Inspect a Ghost-style contract and produce an emulator design plan.
No files are changed unless the user explicitly requests implementation.
Create or update emulator implementation files inside the authorized emulator directory.
Do not edit the source Ghost package unless the user explicitly asks for contract repair.
Do not edit target skills.
Execute seeded scenarios against one or more emulator implementations.
Capture traces, state transitions, oracle results, and skipped-case reasons.
Generate scenario variants from the contract while preserving declared invariants.
Use mutations to find smaller counterexamples, wider boundary coverage, and oracle gaps.
Compare multiple synthetic implementations against the same contract.
Classify differences as contract ambiguity, emulator bug, oracle gap, nondeterminism, or behavior gap.
Emit an emulator_execution_report / EER-v1.
Only produce $tune-compatible evidence when the user explicitly asks to use emulator findings to improve a skill.
The preferred source is a Ghost scenario-layout package:
SPEC.md
tests.yaml
TESTS_SCHEMA.md
VERIFY.md
verification/evidence/*
Treat tests.yaml as the behavior contract.
Treat SPEC.md as explanatory and normative only where the Ghost package marks it as binding.
Treat VERIFY.md and verification/evidence/* as provenance and confidence evidence.
If the Ghost package is incomplete, report the missing contract surface instead of inventing it.
Generate implementations from the same contract, such as:
deterministic exact, reproducible state-machine execution
noisy latency, partial failure, retries, stochastic user behavior
adversarial hostile inputs, prompt injection, misleading tool output
mutation systematic perturbation and counterexample shrinking
Each implementation must declare:
implementation:
id:
kind:
source_contract_fingerprint:
seed_policy:
supported_scenarios: []
oracle_surface:
nondeterminism:
limitations: []
Capture enough evidence to reproduce and explain behavior:
scenario id
case id
implementation id
seed
initial visible state
hidden ground truth fingerprint
tool surface
user/actor events
tool calls and responses
state mutations
trace invariants checked
oracle results
final state
failure labels
counterexample data
Do not rely on final text matching when state or trace assertions can express the outcome.
Prefer deterministic oracles:
state assertions
trace invariants
forbidden tool checks
side-effect checks
budget and step limits
schema assertions
Use model judgment only when deterministic checks cannot express the criterion.
Never let a model judge be the sole authority for safety-critical behavior.
When an oracle fails, classify whether the likely problem is:
contract_ambiguity
emulator_bug
oracle_gap
nondeterminism
behavior_gap
source_contract_gap
Default report:
Emulated:
- Source contract:
- Target:
- Mode:
- Implementations:
- Seed:
- Scenario budget:
Run summary:
- Executed:
- Passed:
- Failed:
- Skipped:
Findings:
- Divergences:
- Counterexamples:
- Oracle gaps:
- Contract ambiguities:
- Candidate regressions:
Artifacts:
- Traces:
- Report:
- EER-v1:
Next route:
- none | repair-contract | build-more-implementations | export-eval-dataset | optional-handoff-tune
Use optional-handoff-tune only when the user explicitly asks to improve a skill from emulator evidence.
$grill-me decides material user judgments; $emulator does not.$ghost owns portable contract generation; $emulator consumes the contract.$tune or $refine unless skill improvement is explicit.tools
Invokes Apple's macOS 27 fm command-line tool from a local Mac to use the on-device system model or Private Cloud Compute, including instructions, image prompts, schema-constrained JSON, and noninteractive automation. Use when the user asks to run Apple Foundation Models through fm, compare system versus pcc, generate structured output, or automate fm without Swift or an app.
development
Compile historical Codex sessions into governed counterfactual evidence, evaluate an existing owner-applied candidate through blinded paired HCTP trials, and fold observable evidence into RUN, OBSERVE, or STOP. Use for `$hylo`, CRF extraction, counterfactual replay, source-governed direct or historical trials, sealed evidence, paired baseline/candidate evaluation, causal frontiers, or evidence-governed improvement.
testing
Ensure a `ledger` command is available on PATH; materialize, validate, record, replay, and project requested Actuating artifacts without taking semantic or execution authority; coordinate the shared Learnings/Synesthesia/Negative Ledger lifecycle checkpoint and repo-local source-memory reconciliation; address Universalist plans and receipts; and perform pure artifact validation.
testing
Classify and quotient review findings, failing tests, incidents, bug reports, migration failures, and other witnessed falsifiers against accepted intent and the current Construction. Author counterexample-set/v1 without selecting repairs, counting review credit, or granting mutation.