From claude-commands
Canonical repro workflow for copying campaigns, targeted bug reproduction, twin clone baselines, evidence exports, and red/green provenance tracking.
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-commands:repro-twin-clone-evidenceThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
This `.claude` skill is the source of truth. Codex mirrors must point here rather than duplicating workflow rules.
This .claude skill is the source of truth. Codex mirrors must point here rather than duplicating workflow rules.
If the user pastes any URL matching */game/<id> (e.g. https://mvp-site-*.run.app/game/uZvPZPnBCVw3WtSEBWab), extract <id> as the campaign ID immediately. Go directly to §2 twin copy. Do NOT:
get_campaign_state before copyingThe /game/ path segment is the Firestore campaign ID. Take the first non-empty segment immediately after /game/ and strip any ?/# suffix (handles /game/<id>/, /game/<id>?x=1, /game/<id>#frag).
| User intent | Run |
|---|---|
/repro, /repro <campaign_id>, or "copy and reproduce this bug" | Default copy + targeted repro in section 2 |
| "first copy read-only, second copy gets actions" | Twin baseline + test subject in section 5 |
| "repro_copy", canonical+variant replay | copy to [email protected] (--dest-email <[email protected]>); scripts/repro_copy_campaign.py only when that exact workflow is requested |
"five-class", "level-up suite", or all test_level_up_class_* | Heavy level-up suite only when explicitly requested |
Do not silently substitute a broader or easier harness for the requested repro.
Use real services for evidence-bearing repros. Typical env:
export WORLDAI_DEV_MODE=true
export TESTING_AUTH_BYPASS=true
export ALLOW_TEST_AUTH_BYPASS=true
export MCP_TEST_MODE=real
export MOCK_SERVICES_MODE=false
export GOOGLE_APPLICATION_CREDENTIALS="$HOME/serviceAccountKey.json"
export WORLDAI_GOOGLE_APPLICATION_CREDENTIALS="$HOME/serviceAccountKey.json"
For <[email protected]>, use --dest-email <[email protected]> — the UID is resolved automatically by copy_campaign.py.
Goal: create a safe Firestore copy under the test user, then reproduce one reported bug with the narrowest faithful path.
scripts/copy_campaign.py --find-by-id <CAMPAIGN_ID>. Do not guess source UID.--dest-email <[email protected]>.scripts/download_campaign.py.A red repro must not run against the candidate fix codepath. Before calling any run RED, record the code/environment provenance:
AMBIGUOUS ENVIRONMENT until the deployed SHA/config is proven or the human explicitly approves it as the red lane.HISTORICAL RED ARTIFACT, not a fresh red replay.Do not compare a fixed-branch replay against a fixed-branch replay and call the first one red.
Before running a repro, write the exact observable bug phenotype in concrete terms:
Do not call a related internal signal a reproduction unless the same observable symptom appears in the copied/new run.
Examples:
action_resolution.player_input, stale location, wrong planning block, or wrong narrative thread is only a related finding unless the reported user-visible repeated narrative also appears.RELATED STALE-CONTEXT FAILURE, not ORIGINAL BUG REPRO.NON-REPRO FOR ORIGINAL PHENOTYPE.For every claimed repro, add a verdict table:
| Original required symptom | New copied-run observation | Evidence file / doc ID | Verdict |
|---|---|---|---|
REPRO / RELATED / NON-REPRO |
Only REPRO satisfies /repro. RELATED and NON-REPRO are useful evidence, but they do not complete the repro task and must not be described as the original bug reproduced.
When the first copy must stay read-only:
scripts/copy_campaign.py --find-by-id <SOURCE>.baseline read-only and one test subject.Note: The inline subcommand below uses copy_campaign.py with --format json to perform an early-exit email-to-UID lookup (it exits immediately and does not perform a copy).
./venv/bin/python scripts/download_campaign.py \
--uid "$(./venv/bin/python scripts/copy_campaign.py --dest-email <[email protected]> --format json 2>/dev/null | python3 -c "import sys, json; print(json.load(sys.stdin)['dest_uid'])")" \
--campaign-id <TEST_CAMPAIGN_ID> \
--output-dir /tmp/your-project.com/repro-exports/<slug> \
--format txt
Or, if you already know the resolved UID from the copy step output, pass it directly via --uid <UID> (or utilize a dedicated resolver script like resolve_uid.py in the future for clearer maintenance).
| Step | Done? |
|---|---|
Source campaign resolved with --find-by-id | |
| Red/green provenance recorded | |
| Same-symptom criteria written before replay | |
| Baseline/test clone separation preserved | |
| Exact input/action replayed | |
| Full campaign export saved | |
| Raw captures/snapshots saved | |
Verdict table filled with REPRO, RELATED, or NON-REPRO |
npx claudepluginhub jleechanorg/claude-commands --plugin claude-commandsCopies Firebase campaigns between users for testing via Admin SDK. Finds source user automatically by campaign ID or title, then duplicates the campaign and its subcollections to a destination user.
Reproduces behavioral bugs by recording a failing probe, then verifying the fix with the same probe. Use for crashes, hangs, regressions, wrong output, and failing tests.
Autonomous multi-session campaign agent that decomposes large work into phases, delegates to sub-agents, reviews output, and maintains campaign state across context windows.