ワンクリックで
sim-compare
Run cache policy hit rate comparison across multiple cache sizes with charts
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Run cache policy hit rate comparison across multiple cache sizes with charts
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Audit the adaptive window hill-climber and region-resize logic for implementation defects (not algorithm quality)
JSR-107 (JCache) spec-conformance audit
Audit explicit state machines (drain status, node lifecycle, async-value lifecycle) for illegal or missed transitions
Heavyweight history-mining bug audit. Walks the caffeine module's git history chronologically (oldest to HEAD), maintains a forward-tracked issue database, and surfaces concerns introduced by past commits that were never resolved. Catches bugs that snapshot mining cannot — half-fixes invisible from current state, latent+trigger pairs across multi-commit interactions, and partial refactors. Slow (model/effort-dependent; ~24h on Opus + max effort) and rare-run (every several months or before a major release).
Differential audit comparing matched code paths that should behave identically. Spawns one auditor per sibling pair (sync/async, bounded/unbounded, view consistency, bulk vs single, generated node variants, read fast vs slow, adapter conformance) and requires a concrete witness scenario where the two paths diverge observably.
Find places where documented API contracts and the implementation diverge
| name | sim-compare |
| description | Run cache policy hit rate comparison across multiple cache sizes with charts |
| argument-hint | <trace-file> [policies...] [sizes...] |
| context | fork |
| disable-model-invocation | true |
| allowed-tools | Read, Grep, Glob, Bash |
Run a comprehensive cache policy comparison for the given trace.
Trace file: $ARGUMENTS
If no policies or sizes are specified, use sensible defaults based on the trace.
Identify the trace format. Check the file extension and contents:
.gz files: try common formats (lirs, arc, etc.)simulator/src/main/resources/reference.conf for format optionsformat:path syntax (e.g., lirs:trace.gz)Select policies to compare. Policy names use category.PolicyName format.
Note: config categories use hyphens (two-queue, greedy-dual), not underscores.
Each policy is paired with configured admission filters (default: Always, TinyLfu,
Clairvoyant), creating multiple instances per policy name.
Include at minimum:
product.Caffeine (the production implementation)opt.Clairvoyant (theoretical optimal, upper bound)opt.Unbounded (infinite cache, ceiling)linked.Lru (baseline)sketch.WindowTinyLfu (research W-TinyLFU)sketch.HillClimberWindowTinyLfu (adaptive variant)linked.S4Lru, adaptive.Arclinked.Lfu, irr.Lirstwo-queue.TwoQueue, two-queue.S3Fifogreedy-dual.Gdsf, greedy-dual.CampChoose cache sizes. Use a geometric progression covering the working set:
100,500,1_000,2_500,5_000,10_000,25_000Run the simulation. Use the Gradle task:
./gradlew simulator:simulate -q \
--maximumSize=100,500,1000,2500,5000,10000 \
--metric="Hit Rate" \
--title="Description" \
--theme=light \
--outputDir=build/reports/sim
Override the trace and policies via system properties appended to the command:
-Dcaffeine.simulator.files.paths.0="format:path/to/trace"
-Dcaffeine.simulator.policies.0=product.Caffeine
-Dcaffeine.simulator.policies.1=opt.Clairvoyant
# ... etc
Note: for single-size runs, use ./gradlew simulator:run -q with
-Dcaffeine.simulator.maximum-size=N instead of simulator:simulate.
Read and interpret results. The simulate task produces:
Explain findings. For each notable result:
.claude/docs/research-foundations.md for paper-to-code mappingReport. Present: