[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6WM71477246ME9EX4S5X9MB":3,"skill-same:01M6WM71477246ME9EX4S5X9MB":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":30,"publishedAt":50,"linkOnly":51,"markdownContent":52,"markdownBody":53,"frontMatter":54,"refName":56,"commitSha":57,"skillDirectory":58,"forksCount":59,"repositoryHtmlUrl":60,"repositoryHomepageUrl":6,"ownerHtmlUrl":61,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":62,"install":63,"resources":76},"01M6WM71477246ME9EX4S5X9MB","generatetest",null,"Evidence-based E2E test generator for your-project.com (Real Mode Only). Use for the \u002Fgeneratetest slash command — generates self-contained MCPTestBase test files under testing_mcp\u002F with built-in evidence bundle generation (git provenance, checksums, request\u002Fresponse JSONL). No mocks, no TESTING=true, real local server + real Firebase + real Gemini LLM calls only. Covers MCPTestBase template, testing_mcp\u002Flib\u002F shared utilities, evidence-standards compliance checklist, dice_audit_events schema, model matrix testing, and scenario-forcing patterns.","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX","01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fworldarchitect\u002Fskills\u002Fgeneratetest\u002FSKILL.md",[17,22,25],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":23,"categoryName":24,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[5,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49],"local","e2e test generator","matrix","mode","jsonl","events","lib","scenario","project","shared","testing","compliance checklist","test generator","files","command","server","git","generate","MCP","2026-11-10 10:12:30",false,"---\nname: generatetest\ndescription: Evidence-based E2E test generator for your-project.com (Real Mode Only). Use for the \u002Fgeneratetest slash command — generates self-contained MCPTestBase test files under testing_mcp\u002F with built-in evidence bundle generation (git provenance, checksums, request\u002Fresponse JSONL). No mocks, no TESTING=true, real local server + real Firebase + real Gemini LLM calls only. Covers MCPTestBase template, testing_mcp\u002Flib\u002F shared utilities, evidence-standards compliance checklist, dice_audit_events schema, model matrix testing, and scenario-forcing patterns.\nwhen-to-use: When the user invokes \u002Fgeneratetest, asks to generate an E2E test, wants a test for a PR's behavior, or needs an evidence-producing MCP integration test in testing_mcp\u002F.\n---\n\n# \u002Fgeneratetest — Evidence-Based Test Generator (Real Mode Only)\n\n## Summary\n\nGenerate self-contained tests with built-in evidence generation for\nyour-project.com. All generated tests use real local servers, real\ndatabases, real Gemini LLM calls — nothing mocked. Tests generate evidence\nbundles directly to `\u002Ftmp\u002F\u003Crepo>\u002F\u003Cbranch>\u002F\u003Cwork>\u002F\u003Ctimestamp>\u002F`.\n\n**Usage**: `\u002Fgeneratetest \u003Cfree-form description>`\n\n**Examples:**\n```bash\n\u002Fgeneratetest for this PR make sure the equipment logic works\n\u002Fgeneratetest validate dice roll integrity in combat\n\u002Fgeneratetest test campaign creation flow end-to-end\n```\n\n**MANDATORY**: Read the `evidence-standards` skill (repo-level) and\nthe user-scope the `evidence-standards` skill before\ngenerating any test code. This ensures generated tests follow current\nevidence standards.\n\n## CORE PRINCIPLES\n\n- **MANDATORY MCPTestBase**: For ALL E2E tests with MCP server, ALWAYS inherit from `MCPTestBase` class. NEVER generate standalone scripts.\n- **REAL MODE ONLY**: All generated tests use real local servers, real databases, nothing mocked.\n- **EVIDENCE-FIRST**: Tests generate evidence bundles directly to `\u002Ftmp\u002F\u003Crepo>\u002F\u003Cbranch>\u002F\u003Cwork>\u002F\u003Ctimestamp>\u002F`.\n- **USE SHARED LIBRARIES**: ALWAYS use `testing_mcp\u002Flib\u002F` utilities — NEVER reimplement test infrastructure.\n- **FREE-FORM INPUT**: Accept natural language like \"for this PR make sure the equipment logic works\".\n\n## testing_mcp\u002F FOLDER RULES (ABSOLUTE — NO EXCEPTIONS)\n\nTests placed in `testing_mcp\u002F` MUST follow ALL rules below. Violating any rule makes the test invalid:\n\n1. **NO MOCKS** — `testing_mcp\u002F` never uses `unittest.mock`, `MagicMock`, `patch()`, fake\n   services, or test-mode env vars (`TEST_MODE=mock`, `MOCK_SERVICES_MODE`, `USE_MOCK_FIREBASE`,\n   `USE_MOCK_GEMINI`). This is enforced at runtime by `lib\u002Fserver_utils.py`.\n\n2. **MCPTestBase required** — Every test that calls the MCP server must inherit from\n   `testing_mcp.lib.base_test.MCPTestBase`. No standalone scripts for new tests.\n\n3. **Real server only** — Tests connect to a real local server (auto-started by MCPTestBase) with\n   real Firebase Firestore and real Gemini LLM calls. Do NOT pass `--ci-sim`, `TESTING=true`, or\n   mock-related flags.\n\n4. **No new infrastructure** — Use functions from `testing_mcp\u002Flib\u002F`. Never reimplement\n   `create_campaign`, `process_action`, `get_campaign_state`, or evidence utilities.\n\n5. **Unit tests go elsewhere** — Pure unit tests (no MCP server) belong in `$PROJECT_ROOT\u002Ftests\u002F`,\n   not in `testing_mcp\u002F`. Use pytest for those.\n\n**See `testing_mcp\u002FCLAUDE.md` and `testing_mcp\u002Fagents.md` for the full policy.**\n\n## PREFERRED: USE MCPTestBase FOR E2E TESTS\n\n**CRITICAL RULE**: For E2E tests that use the MCP server, ALWAYS inherit from `MCPTestBase` class.\n\n### Why MCPTestBase?\n\n1. **Automatic server management** - Starts\u002Fstops local server automatically\n2. **Built-in evidence collection** - Creates evidence bundles with checksums\n3. **User\u002Fmodel configuration** - Handles model settings and user setup\n4. **Campaign tracking** - Tracks campaigns for evidence collection\n5. **Standardized CLI args** - `--server`, `--model`, `--work-name` built-in\n6. **Consistent structure** - All tests follow the same pattern\n\n### MCPTestBase Template (MANDATORY for E2E tests)\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Generated E2E test - uses MCPTestBase.\"\"\"\nfrom __future__ import annotations\n\nimport sys\nfrom pathlib import Path\nfrom typing import Any\n\n# Add project root to path for imports\n# Works for both root-level tests (testing_mcp\u002Ftest_*.py) and subdirectory tests (testing_mcp\u002Fcreation\u002Ftest_*.py)\n_test_file = Path(__file__).resolve()\n_project_root = _test_file.parent.parent if _test_file.parent.name == \"testing_mcp\" else _test_file.parent.parent.parent\nsys.path.insert(0, str(_project_root))\n\nfrom testing_mcp.lib.base_test import MCPTestBase, TestContext\n\n\nDEFAULT_MODEL = \"gemini-3.8-flash\"\n\n\nclass MyFeatureTest(MCPTestBase):\n    \"\"\"Test description here.\"\"\"\n\n    TEST_NAME = \"my_feature_test\"\n    MODEL = DEFAULT_MODEL\n    DESCRIPTION = \"Test description for CLI help\"\n\n    def run_scenarios(self, ctx: TestContext) -> list[dict[str, Any]]:\n        \"\"\"Run test scenarios.\"\"\"\n        results: list[dict[str, Any]] = []\n\n        # Create campaign using ctx (TestContext)\n        campaign_id = ctx.create_campaign(\n            title=\"Test Campaign\",\n            character=\"Test Character\",\n            setting=\"Test Setting\",\n            description=\"Test Description\",\n        )\n\n        # Optionally seed game state to exit character creation\n        ctx.ensure_story_mode(campaign_id)\n\n        # Process actions\n        response = ctx.process_action(campaign_id, \"test action\")\n\n        # Validate and record result\n        passed = \"narrative\" in response\n        results.append({\n            \"name\": \"scenario_name\",\n            \"passed\": passed,\n            \"campaign_id\": campaign_id,\n            \"user_id\": ctx.user_id,\n            \"errors\": [] if passed else [\"Error description\"],\n        })\n\n        return results\n\n\nif __name__ == \"__main__\":\n    test = MyFeatureTest()\n    sys.exit(test.run())\n```\n\n### TestContext Methods\n\n| Method | Purpose |\n|--------|---------|\n| `ctx.create_campaign(title, character, setting, description)` | Create campaign and track for evidence |\n| `ctx.process_action(campaign_id, user_input, mode=\"character\")` | Send action to server |\n| `ctx.get_campaign_state(campaign_id)` | Get current game state |\n| `ctx.ensure_game_state_seed(campaign_id)` | Seed Aric + Goblin, exit char creation |\n| `ctx.ensure_story_mode(campaign_id)` | Verify in Story Mode (not Character Creation) |\n| `ctx.user_id` | Auto-generated test user ID |\n| `ctx.model` | Model being used for test |\n| `ctx.evidence_dir` | Evidence directory path |\n\n### When to Use MCPTestBase (DEFAULT for ALL E2E Tests)\n\n| Test Type | Use MCPTestBase? | Notes |\n|-----------|------------------|-------|\n| E2E tests with MCP server | YES - **MANDATORY** | This is the ONLY approved pattern |\n| Multi-scenario tests | YES - **MANDATORY** | Built-in iteration support |\n| Single API call tests | YES - **MANDATORY** | Simpler than standalone |\n| Cache\u002Frestart tests | YES - **MANDATORY** | `self.restart_server()` built-in |\n| Dice roll verification | YES - **MANDATORY** | `ctx.validate_code_execution()` built-in |\n| Unit tests (no server) | NO | Use pytest - no MCP server needed |\n| Browser-only tests | NO | Use Playwright directly - no MCP |\n\n**CRITICAL RULE: For ALL tests that use the MCP server, you MUST use MCPTestBase.**\n\nThe 41 existing test files in `testing_mcp\u002F` all use MCPTestBase - this is the established pattern.\n\n## MANDATORY: USE SHARED LIBRARY UTILITIES\n\n**CRITICAL RULE**: ALWAYS use functions from `testing_mcp\u002Flib\u002F` - NEVER reimplement them.\n\n### Available Shared Utilities\n\n| Module | Functions | Purpose |\n|--------|-----------|---------|\n| **`lib\u002Fevidence_utils.py`** | `get_evidence_dir(test_name)` | Get `\u002Ftmp\u002F\u003Crepo>\u002F\u003Cbranch>\u002F\u003Ctest_name>` path |\n| | `capture_provenance(base_url, server_pid=None)` | Capture git + server provenance |\n| | `save_evidence(evidence_dir, data, filename)` | Save with SHA256 checksum |\n| | `write_with_checksum(path, content)` | Write file with checksum |\n| | `create_evidence_bundle(evidence_dir, ...)` | Create complete evidence bundle |\n| | `save_request_responses(evidence_dir, pairs)` | Save request\u002Fresponse JSONL |\n| **`lib\u002Fmcp_client.py`** | `MCPClient(base_url, timeout)` | MCP JSON-RPC client |\n| | `client.tools_call(tool_name, args)` | Call MCP tool |\n| **`lib\u002Fcampaign_utils.py`** | `create_campaign(client, user_id, ...)` | Create campaign via MCP |\n| | `process_action(client, user_id, campaign_id, ...)` | Process player action |\n| | `get_campaign_state(client, user_id, campaign_id)` | Get game state |\n| | `ensure_game_state_seed(client, user_id, campaign_id)` | Seed basic game state |\n| **`lib\u002Fserver_utils.py`** | `start_local_mcp_server(port)` | Start local test server |\n| | `pick_free_port(start)` | Find available port |\n| | `DEFAULT_EVIDENCE_ENV` | Environment vars for evidence capture |\n| **`lib\u002Fmodel_utils.py`** | `settings_for_model(model_id)` | Get model-specific settings |\n| | `update_user_settings(client, user_id, settings)` | Update user model settings |\n| **`lib\u002Fnarrative_validation.py`** | `validate_narrative_quality(narrative)` | Validate narrative structure |\n| | `extract_dice_notation(text)` | Extract dice rolls from text |\n\n### Required Import Pattern\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Generated test - uses shared lib utilities.\"\"\"\nimport sys\nfrom pathlib import Path\n\n# Add project root to path\nsys.path.insert(0, str(Path(__file__).parent.parent))\n\n# MANDATORY: Import from shared libraries\nfrom testing_mcp.lib.evidence_utils import (\n    capture_provenance,\n    get_evidence_dir,\n    save_evidence,\n    create_evidence_bundle,\n)\nfrom testing_mcp.lib.mcp_client import MCPClient\nfrom testing_mcp.lib.campaign_utils import create_campaign, process_action\nfrom testing_mcp.lib.model_utils import settings_for_model, update_user_settings\n\n# NEVER reimplement these functions in the test file\n```\n\n### What You MUST NOT Reimplement\n\n**FORBIDDEN - These already exist in `lib\u002F`:**\n- `def capture_provenance()` → Use `lib\u002Fevidence_utils.capture_provenance()`\n- `def get_evidence_dir()` → Use `lib\u002Fevidence_utils.get_evidence_dir()`\n- `def save_evidence()` → Use `lib\u002Fevidence_utils.save_evidence()`\n- `def write_with_checksum()` → Use `lib\u002Fevidence_utils.write_with_checksum()`\n- `def create_campaign()` → Use `lib\u002Fcampaign_utils.create_campaign()`\n- `def process_action()` → Use `lib\u002Fcampaign_utils.process_action()`\n- Custom MCP client code → Use `lib\u002Fmcp_client.MCPClient`\n\n**REQUIRED Pattern:**\n```python\n# Get evidence directory\nevidence_dir = get_evidence_dir(\"my_test_name\")\n\n# Capture provenance\nprovenance = capture_provenance(base_url=\"http:\u002F\u002Flocalhost:8001\")\n\n# Create campaign\nclient = MCPClient(base_url)\ncampaign_id = create_campaign(\n    client,\n    user_id=\"test-user\",\n    title=\"Test Campaign\",\n)\n\n# Process action\nresponse = process_action(\n    client,\n    user_id=\"test-user\",\n    campaign_id=campaign_id,\n    user_input=\"I attack the goblin\",\n)\n\n# Save evidence\nsave_evidence(evidence_dir, test_results, \"results.json\")\n```\n\n**Benefits of Using Shared Libraries:**\n1. **Automatic standards compliance** - Evidence follows the `evidence-standards` skill\n2. **Zero maintenance burden** - Updates benefit all tests automatically\n3. **Consistent behavior** - All tests use identical evidence structure\n4. **Reduced duplication** - No need to copy\u002Fpaste utility code\n5. **Single source of truth** - Centralized in `testing_mcp\u002Flib\u002F`\n\n## OUTPUT LOCATIONS\n\n| Output Type | Default Location | Override Flag |\n|-------------|------------------|---------------|\n| **Test files** | `testing_mcp\u002F` | `--test-dir \u003Cpath>` |\n| **Evidence** | `\u002Ftmp\u002F\u003Crepo>\u002F\u003Cbranch>\u002F\u003Cwork>\u002Fiteration_NNN\u002F` | `--evidence-dir \u003Cpath>` |\n\n**Versioning (v1.1.0+):** Evidence bundles now use iteration-based directories:\n- Each run creates `iteration_001\u002F`, `iteration_002\u002F`, etc.\n- `latest` symlink points to most recent iteration\n- `metadata.json` includes `run_id`, `iteration`, `bundle_version`\n\n## EXECUTION WORKFLOW\n\n### Phase 1: Parse Free-Form Input\n\n**Action Steps:**\n1. Extract test focus from natural language input (e.g., \"equipment logic\", \"dice rolls\", \"campaign creation\")\n2. Identify PR context if mentioned (e.g., \"for this PR\" → analyze current branch changes)\n3. Determine test type: MCP integration, browser automation, or hybrid\n4. Generate descriptive `work_name` for evidence directory\n\n**Example Parsing:**\n```\nInput: \"for this PR make sure the equipment logic works\"\n→ Focus: equipment logic\n→ Context: current PR\u002Fbranch changes\n→ Type: MCP integration (equipment = game state)\n→ work_name: equipment_validation\n```\n\n### Phase 2: Generate Test File\n\n**Action Steps:**\n1. Create test file in `testing_mcp\u002Ftest_\u003Cfocus>.py` (or custom `--test-dir`)\n2. **MANDATORY: Use MCPTestBase class** - This is the ONLY approved pattern for E2E tests\n3. Include `--work-name` CLI argument (evidence saving is mandatory, no flag needed)\n4. Ensure test uses REAL servers (no mocks, no test mode)\n\n**CRITICAL: ALWAYS Use MCPTestBase Template**\n\nFor ALL E2E tests with MCP server, use this template (inherited from `MCPTestBase`):\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Generated E2E test - uses MCPTestBase.\nFocus: [extracted focus]\nWork Name: [work_name]\n\nREAL MODE ONLY - No mocks, no test mode\nEvidence standards: the evidence-standards skill\n\"\"\"\nfrom __future__ import annotations\n\nimport sys\nfrom pathlib import Path\nfrom typing import Any\n\n# Add project root to path\n# Works for both root-level tests (testing_mcp\u002Ftest_*.py) and subdirectory tests (testing_mcp\u002Fcreation\u002Ftest_*.py)\n_test_file = Path(__file__).resolve()\n_project_root = _test_file.parent.parent if _test_file.parent.name == \"testing_mcp\" else _test_file.parent.parent.parent\nsys.path.insert(0, str(_project_root))\n\nfrom testing_mcp.lib.base_test import MCPTestBase, TestContext\n\n\nDEFAULT_MODEL = \"gemini-3.8-flash\"\n\n\nclass [TestClassName](MCPTestBase):\n    \"\"\"[Test description].\"\"\"\n\n    TEST_NAME = \"[work_name]\"\n    MODEL = DEFAULT_MODEL\n    DESCRIPTION = \"[Test description for CLI help]\"\n\n    def run_scenarios(self, ctx: TestContext) -> list[dict[str, Any]]:\n        \"\"\"Run test scenarios.\"\"\"\n        results: list[dict[str, Any]] = []\n\n        # Create campaign using ctx (TestContext)\n        campaign_id = ctx.create_campaign(\n            title=\"Test Campaign\",\n            character=\"Test Character\",\n            setting=\"Test Setting\",\n            description=\"Test Description\",\n        )\n\n        # Optionally seed game state to exit character creation\n        ctx.ensure_story_mode(campaign_id)\n\n        # Process actions\n        response = ctx.process_action(campaign_id, \"test action\")\n\n        # Validate and record result\n        passed = \"narrative\" in response\n        results.append({\n            \"name\": \"scenario_name\",\n            \"passed\": passed,\n            \"campaign_id\": campaign_id,\n            \"user_id\": ctx.user_id,\n            \"errors\": [] if passed else [\"Error description\"],\n        })\n\n        return results\n\n\nif __name__ == \"__main__\":\n    test = [TestClassName]()\n    sys.exit(test.run())\n```\n\n**Why MCPTestBase is Mandatory:**\n1. **Automatic server management** - Starts\u002Fstops local server automatically with proper cleanup\n2. **Built-in evidence collection** - Creates complete evidence bundles with checksums automatically\n3. **User\u002Fmodel configuration** - Handles model settings and user setup consistently\n4. **Campaign tracking** - Automatically tracks campaigns for evidence collection\n5. **Standardized CLI args** - `--server`, `--model`, `--work-name` built-in\n6. **Server restart support** - `self.restart_server()` preserves evidence across restarts\n7. **Code execution validation** - `ctx.validate_code_execution()` for dice roll verification\n8. **Cross-process evidence** - Automatic tracking of server stops\u002Fstarts for cache testing\n9. **Console capture** - Automatic capture of test output to evidence bundle\n10. **Error handling** - Crashes captured as failed scenarios with full evidence\n\n**DO NOT generate standalone scripts** - The MCPTestBase handles all boilerplate correctly.\n\n### Phase 3: Add Evidence Standards Compliance\n\n**Action Steps:**\n1. Include git provenance capture (HEAD, origin\u002Fmain, changed files)\n2. Add server environment capture (process info, ports, env vars)\n3. Derive ALL documentation from actual data (never hardcode)\n4. Track missing\u002Fdropped data with warnings\n5. Check subprocess return codes\n\n**Evidence Standards Checklist (from the `evidence-standards` skill):**\n- [ ] Git provenance: HEAD commit, origin\u002Fmain, changed files (via `capture_git_provenance()`)\n- [ ] Server environment: PID, port, env vars (via `capture_server_runtime()`)\n- [ ] Checksums: SHA256 for ALL evidence files including JSONL and server logs\n- [ ] Timestamp synchronization: collect all evidence in one pass\n- [ ] Documentation-Data alignment: derive claims from actual data\n- [ ] Centralized utilities: use `lib\u002Fevidence_utils.py`\n- [ ] Raw capture: use `DEFAULT_EVIDENCE_ENV` from `server_utils.py` for automatic raw LLM capture\n- [ ] JSONL file: create `request_responses.jsonl` with full request\u002Fresponse pairs\n- [ ] Server logs: copy to `artifacts\u002Fserver.log` with checksum\n- [ ] Evidence mode: document capture approach with `evidence_mode` field\n\n### Phase 4: Verify Real Mode\n\n**Action Steps:**\n1. Confirm server is running on expected port\n2. Verify WORLDAI_DEV_MODE setting\n3. Ensure NO mock imports or test mode flags\n4. Validate API responses are from real server\n\n**MOCK MODE = INVALID EVIDENCE**:\n- FORBIDDEN: `TESTING=true`, mock imports, fake services\n- FORBIDDEN: Hardcoded responses or placeholder data\n- REQUIRED: Real local server, real database, real API responses\n\n## TEST TYPE DETECTION\n\n**Automatic Detection from Free-Form Input:**\n\n| Keywords | Test Type | Example Input |\n|----------|-----------|---------------|\n| `equipment`, `inventory`, `items`, `game_state` | MCP Integration | \"equipment logic works\" |\n| `dice`, `roll`, `combat`, `damage` | MCP Integration | \"dice rolls are fair\" |\n| `campaign`, `create`, `firebase` | MCP Integration | \"campaign creation flow\" |\n| `browser`, `ui`, `page`, `click` | Browser Automation | \"landing page loads correctly\" |\n| `login`, `oauth`, `auth` | Browser + Auth | \"login flow works\" |\n\n**Default**: MCP Integration (most common for this project)\n\n## GENERATED TEST REQUIREMENTS\n\nEvery generated test MUST include:\n\n### 1. Evidence Generation - Use Shared Lib\n```python\n# FORBIDDEN: Custom evidence generation\n# def save_evidence(...):\n#     \"\"\"DON'T implement this - it exists in lib\u002Fevidence_utils.py\"\"\"\n\n# REQUIRED: Use lib utilities\nfrom testing_mcp.lib.evidence_utils import create_evidence_bundle\n\n# Generate evidence bundle\nevidence_dir = get_evidence_dir(\"my_test\")\nprovenance = capture_provenance(server_url)\n\nbundle_files = create_evidence_bundle(\n    evidence_dir=evidence_dir,\n    test_name=\"my_test\",\n    results=test_results,\n    provenance=provenance,\n    server_url=server_url,\n)\n# Bundle automatically includes:\n# - README.md, methodology.md, evidence.md, notes.md\n# - run.json with scenarios\n# - metadata.json with git provenance\n# - SHA256 checksums for all files\n```\n\n### 2. CLI Arguments\n```python\nparser.add_argument(\"--work-name\", default=\"\u003Cauto_generated>\")\nparser.add_argument(\"--server\", help=\"Optional: use existing server URL (default: start fresh)\")\n# Note: Evidence saving is MANDATORY - no flag needed\n```\n\n### 3. Real Mode Verification\n```python\ndef verify_real_mode(server_url):\n    \"\"\"Verify server is real, not mocked.\"\"\"\n    response = requests.get(f\"{server_url}\u002Fhealth\")\n    assert response.status_code == 200\n    assert \"mock\" not in response.text.lower()\n```\n\n### 4. Model Settings Forcing\n```python\nfrom lib.model_utils import settings_for_model, update_user_settings\n\nDEFAULT_MODEL = \"gemini-3.8-flash\"\n\n# Pin model at test start to avoid fallback noise\nupdate_user_settings(\n    client,\n    user_id=user_id,\n    settings=settings_for_model(DEFAULT_MODEL),\n)\n```\n\n### 5. Request\u002FResponse Capture (MANDATORY for behavior claims)\n```python\nfrom lib.evidence_utils import save_request_responses\n\n# Track all MCP tool calls\nrequest_responses: list[dict] = []\n\n# After each action, capture request\u002Fresponse pair\nrequest_responses.append({\n    \"request\": {\"tool\": \"process_action\", \"user_id\": user_id, ...},\n    \"response\": action_response,\n})\n\n# Save to JSONL at end\nsave_request_responses(evidence_dir, request_responses)\n```\n\n**Minimal inline helper if not using evidence_utils:**\n```python\ndef save_request_responses(evidence_dir: Path, pairs: list[dict]):\n    \"\"\"Write request\u002Fresponse pairs to JSONL with checksum.\"\"\"\n    jsonl_path = evidence_dir \u002F \"request_responses.jsonl\"\n    with jsonl_path.open(\"w\") as f:\n        for pair in pairs:\n            f.write(json.dumps(pair) + \"\\n\")\n    # Generate checksum\n    sha256 = hashlib.sha256(jsonl_path.read_bytes()).hexdigest()\n    (evidence_dir \u002F \"request_responses.jsonl.sha256\").write_text(\n        f\"{sha256}  request_responses.jsonl\\n\"\n    )\n```\n\n### 6. Server Runtime Artifacts (REQUIRED for integration claims)\n```python\nimport subprocess\n\ndef capture_server_artifacts(evidence_dir: Path, port: int, server_pid: int | None):\n    \"\"\"Capture server runtime state for evidence.\"\"\"\n    artifacts_dir = evidence_dir \u002F \"artifacts\"\n    artifacts_dir.mkdir(exist_ok=True)\n\n    # lsof - what's listening on the port\n    try:\n        lsof_output = subprocess.check_output(\n            [\"lsof\", \"-i\", f\":{port}\", \"-P\", \"-n\"],\n            stderr=subprocess.STDOUT, text=True\n        )\n        (artifacts_dir \u002F \"lsof_output.txt\").write_text(lsof_output)\n    except subprocess.CalledProcessError:\n        pass\n\n    # ps - process info\n    if server_pid:\n        try:\n            ps_output = subprocess.check_output(\n                [\"ps\", \"-p\", str(server_pid), \"-o\", \"pid,ppid,user,etime,command\"],\n                stderr=subprocess.STDOUT, text=True\n            )\n            (artifacts_dir \u002F \"ps_output.txt\").write_text(ps_output)\n        except subprocess.CalledProcessError:\n            pass\n```\n\n### 7. Git Provenance Capture - Use Shared Lib\n```python\n# FORBIDDEN: Custom git provenance capture\n# def capture_git_provenance():\n#     \"\"\"DON'T implement this - it exists in lib\u002Fevidence_utils.py\"\"\"\n\n# REQUIRED: Use lib utility\nfrom testing_mcp.lib.evidence_utils import capture_provenance\n\n# Capture git + server provenance\nprovenance = capture_provenance(\n    base_url=\"http:\u002F\u002Flocalhost:8001\",\n    server_pid=None,  # Optional - will auto-detect if not provided\n)\n\n# Returns:\n# {\n#     \"git_head\": \"abc123...\",\n#     \"git_branch\": \"feature\u002Fxyz\",\n#     \"git_origin_main\": \"def456...\",\n#     \"changed_files\": [\"file1.py\", \"file2.py\"],\n#     \"server_url\": \"http:\u002F\u002Flocalhost:8001\",\n#     \"server_pid\": 12345,\n#     \"lsof_output\": \"...\",  # What's listening on the port\n#     \"ps_output\": \"...\",     # Process info\n# }\n```\n\n> The shared lib version handles missing remotes, detached HEADs, and filters empty\n> strings from changed_files automatically. It also captures server runtime state.\n\n## EVIDENCE STANDARDS COMPLIANCE\n\nFrom the `evidence-standards` skill:\n\n| Requirement | Implementation |\n|-------------|----------------|\n| **Derive claims from data** | `os.environ.get()`, not hardcoded strings |\n| **Warn on missing data** | Track `missing_item_ids` list, add to notes |\n| **Correct denominators** | `found\u002Ftotal (need min)`, not `found\u002Fmin` |\n| **Check return codes** | `if result.returncode != 0: warn()` |\n| **Single run attribution** | Evidence bundle references ONE test run |\n| **Git provenance** | HEAD, origin\u002Fmain, changed files |\n| **Checksums** | SHA256 via `write_with_checksum()` helper |\n| **Self-contained** | No external script dependencies |\n| **Per-scenario campaign_id** | Include `campaign_id` for each scenario in run.json |\n| **Model matrix** | Test multiple models when behavior varies by provider |\n| **Pass quality** | Track `pass_type: \"strong\"\u002F\"weak\"` in results |\n| **Partial state handling** | Check field presence, not just truthiness |\n| **Scenario forcing** | Use high HP + explicit instructions to prevent shortcuts |\n\n## ADVANCED PATTERNS (from dice_rolls_comprehensive.py)\n\n### Per-Scenario Campaign Isolation\n\nWhen scenarios can pollute each other's context (e.g., LLM continuing previous combat):\n\n```python\nfor scenario in TEST_SCENARIOS:\n    # Create fresh campaign per scenario to avoid context pollution\n    scenario_campaign_id = create_campaign(client, user_id)\n    ensure_game_state_seed(client, user_id=user_id, campaign_id=scenario_campaign_id)\n\n    result = process_action(client, campaign_id=scenario_campaign_id, ...)\n\n    # Include campaign_id in evidence for log traceability\n    run_summary[\"scenarios\"].append({\n        \"name\": scenario[\"name\"],\n        \"campaign_id\": scenario_campaign_id,  # ← Required\n        ...\n    })\n```\n\n### Model Matrix Testing\n\nTest across multiple providers when behavior varies:\n\n```python\nDEFAULT_MODEL_MATRIX = [\n    \"gemini-3.8-flash\",      # code_execution strategy\n    \"qwen-3-235b-a22b-instruct\",   # native_two_phase strategy\n]\n\nfor model_id in models:\n    model_settings = settings_for_model(model_id)\n    # Run scenarios for each model...\n```\n\n### dice_audit_events Schema (for dice\u002FRNG evidence)\n\n```python\n{\n    \"source\": \"code_execution\" | \"server_tool\",\n    \"label\": \"Stealth Check\",\n    \"notation\": \"1d20+1\",\n    \"rolls\": [10],\n    \"modifier\": 1,\n    \"total\": 11,\n    \"dc\": 12,                    # Required for skill\u002Fsave\n    \"dc_reasoning\": \"...\",       # Required - proves DC set before roll\n    \"success\": false             # Required for skill\u002Fsave\n}\n```\n\n### Pass Quality Classification\n\nTrack evidence strength in results:\n\n```python\n# Define pass criteria with quality levels\nstrong_pass = primary_condition and secondary_condition\nweak_pass = primary_condition and not secondary_condition\npassed = primary_condition  # Core requirement\n\nresult = {\n    \"status\": \"PASS\" if passed else \"FAIL\",\n    \"pass_type\": \"strong\" if strong_pass else (\"weak\" if weak_pass else \"fail\"),\n    \"primary_condition\": primary_condition,\n    \"secondary_condition\": secondary_condition,\n}\n\n# Output for evidence\nif strong_pass:\n    print(\"TEST PASSED (STRONG): All conditions met\")\nelif weak_pass:\n    print(\"TEST PASSED (WEAK): Core proven, secondary not met\")\nelse:\n    print(\"TEST FAILED: Core requirement not proven\")\n```\n\n### Partial State Update Handling\n\nAPIs return only changed fields. Handle missing fields correctly:\n\n```python\n# BAD - Treats missing field as False\nstill_active = response.get(\"state\", {}).get(\"active\") is True\n\n# GOOD - Check field presence with fallback\nstate = response.get(\"state\", {})\nif \"active\" in state:\n    still_active = state[\"active\"] is True\nelif state.get(\"round_number\") is not None:\n    # Partial update with progress indicator - still active\n    still_active = True\nelse:\n    # Fall back to previous known state\n    still_active = previous_state.get(\"active\", False)\n```\n\n### LLM Scenario Forcing\n\nPrevent LLM shortcuts with explicit constraints:\n\n```python\n# BAD - LLM may resolve in 1-2 actions\nSCENARIO = \"Fight the enemies\"\n\n# GOOD - Forces extended scenario\nSCENARIO = \"\"\"You face a Boss (CR 5, HP 120) with two Guards (HP 59 each).\nThis encounter CANNOT be resolved in fewer than 3 rounds.\nDO NOT end prematurely. All enemies fight to the death.\"\"\"\n```\n\n### Statistical Validation\n\nFor RNG-dependent features, include distribution tests:\n\n```python\n# Distribution test\nfor notation in (\"1d6\", \"1d20\"):\n    rolls = [roll_dice(notation) for _ in range(200)]\n    stats = {\"count\": len(rolls), \"min\": min(rolls), \"max\": max(rolls), \"mean\": sum(rolls)\u002Flen(rolls)}\n    assert abs(stats[\"mean\"] - expected_mean) \u003C tolerance\n```\n\n## PRIORITY MATRIX\n\n```\nCRITICAL: Blocks core functionality, data corruption risk\nHIGH: Significant degradation, wrong behavior\nMEDIUM: Minor issues, cosmetic problems\nLOW: Documentation, edge cases\n```\n\n**Stop Rule**: CRITICAL → Stop testing, fix immediately, verify, resume\n\n## COMPLETION CRITERIA\n\n- [ ] Test file created in `testing_mcp\u002F` (or custom dir)\n- [ ] Self-contained evidence generation (no external dependencies)\n- [ ] **Fresh local server started** with free port (unless --server provided)\n- [ ] **Evidence ALWAYS saved** (no optional flag)\n- [ ] Real mode verified (no mocks, no TESTING=true)\n- [ ] Git provenance captured\n- [ ] All results derived from actual data\n- [ ] Missing data tracked with warnings\n- [ ] **run.json includes scenarios array** with campaign_id and errors\n- [ ] **Model settings pinned** via update_user_settings()\n- [ ] **request_responses.jsonl captured** for behavior claims\n\n## Cross-references\n\n- the `evidence-standards` skill — general cross-project evidence\n  policy (layers, evidence class table, unit-test exceptions, bundle anatomy).\n  This skill's evidence bundle format is a concrete implementation of that policy\n  for `testing_mcp\u002F` E2E tests.\n- The repo-level `evidence-standards` skill — your-project.com-specific\n  extensions (dice-claim, campaign-isolation, BigQuery, Gemini specifics).\n","# \u002Fgeneratetest — Evidence-Based Test Generator (Real Mode Only)\n\n## Summary\n\nGenerate self-contained tests with built-in evidence generation for\nyour-project.com. All generated tests use real local servers, real\ndatabases, real Gemini LLM calls — nothing mocked. Tests generate evidence\nbundles directly to `\u002Ftmp\u002F\u003Crepo>\u002F\u003Cbranch>\u002F\u003Cwork>\u002F\u003Ctimestamp>\u002F`.\n\n**Usage**: `\u002Fgeneratetest \u003Cfree-form description>`\n\n**Examples:**\n```bash\n\u002Fgeneratetest for this PR make sure the equipment logic works\n\u002Fgeneratetest validate dice roll integrity in combat\n\u002Fgeneratetest test campaign creation flow end-to-end\n```\n\n**MANDATORY**: Read the `evidence-standards` skill (repo-level) and\nthe user-scope the `evidence-standards` skill before\ngenerating any test code. This ensures generated tests follow current\nevidence standards.\n\n## CORE PRINCIPLES\n\n- **MANDATORY MCPTestBase**: For ALL E2E tests with MCP server, ALWAYS inherit from `MCPTestBase` class. NEVER generate standalone scripts.\n- **REAL MODE ONLY**: All generated tests use real local servers, real databases, nothing mocked.\n- **EVIDENCE-FIRST**: Tests generate evidence bundles directly to `\u002Ftmp\u002F\u003Crepo>\u002F\u003Cbranch>\u002F\u003Cwork>\u002F\u003Ctimestamp>\u002F`.\n- **USE SHARED LIBRARIES**: ALWAYS use `testing_mcp\u002Flib\u002F` utilities — NEVER reimplement test infrastructure.\n- **FREE-FORM INPUT**: Accept natural language like \"for this PR make sure the equipment logic works\".\n\n## testing_mcp\u002F FOLDER RULES (ABSOLUTE — NO EXCEPTIONS)\n\nTests placed in `testing_mcp\u002F` MUST follow ALL rules below. Violating any rule makes the test invalid:\n\n1. **NO MOCKS** — `testing_mcp\u002F` never uses `unittest.mock`, `MagicMock`, `patch()`, fake\n   services, or test-mode env vars (`TEST_MODE=mock`, `MOCK_SERVICES_MODE`, `USE_MOCK_FIREBASE`,\n   `USE_MOCK_GEMINI`). This is enforced at runtime by `lib\u002Fserver_utils.py`.\n\n2. **MCPTestBase required** — Every test that calls the MCP server must inherit from\n   `testing_mcp.lib.base_test.MCPTestBase`. No standalone scripts for new tests.\n\n3. **Real server only** — Tests connect to a real local server (auto-started by MCPTestBase) with\n   real Firebase Firestore and real Gemini LLM calls. Do NOT pass `--ci-sim`, `TESTING=true`, or\n   mock-related flags.\n\n4. **No new infrastructure** — Use functions from `testing_mcp\u002Flib\u002F`. Never reimplement\n   `create_campaign`, `process_action`, `get_campaign_state`, or evidence utilities.\n\n5. **Unit tests go elsewhere** — Pure unit tests (no MCP server) belong in `$PROJECT_ROOT\u002Ftests\u002F`,\n   not in `testing_mcp\u002F`. Use pytest for those.\n\n**See `testing_mcp\u002FCLAUDE.md` and `testing_mcp\u002Fagents.md` for the full policy.**\n\n## PREFERRED: USE MCPTestBase FOR E2E TESTS\n\n**CRITICAL RULE**: For E2E tests that use the MCP server, ALWAYS inherit from `MCPTestBase` class.\n\n### Why MCPTestBase?\n\n1. **Automatic server management** - Starts\u002Fstops local server automatically\n2. **Built-in evidence collection** - Creates evidence bundles with checksums\n3. **User\u002Fmodel configuration** - Handles model settings and user setup\n4. **Campaign tracking** - Tracks campaigns for evidence collection\n5. **Standardized CLI args** - `--server`, `--model`, `--work-name` built-in\n6. **Consistent structure** - All tests follow the same pattern\n\n### MCPTestBase Template (MANDATORY for E2E tests)\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Generated E2E test - uses MCPTestBase.\"\"\"\nfrom __future__ import annotations\n\nimport sys\nfrom pathlib import Path\nfrom typing import Any\n\n# Add project root to path for imports\n# Works for both root-level tests (testing_mcp\u002Ftest_*.py) and subdirectory tests (testing_mcp\u002Fcreation\u002Ftest_*.py)\n_test_file = Path(__file__).resolve()\n_project_root = _test_file.parent.parent if _test_file.parent.name == \"testing_mcp\" else _test_file.parent.parent.parent\nsys.path.insert(0, str(_project_root))\n\nfrom testing_mcp.lib.base_test import MCPTestBase, TestContext\n\n\nDEFAULT_MODEL = \"gemini-3.8-flash\"\n\n\nclass MyFeatureTest(MCPTestBase):\n    \"\"\"Test description here.\"\"\"\n\n    TEST_NAME = \"my_feature_test\"\n    MODEL = DEFAULT_MODEL\n    DESCRIPTION = \"Test description for CLI help\"\n\n    def run_scenarios(self, ctx: TestContext) -> list[dict[str, Any]]:\n        \"\"\"Run test scenarios.\"\"\"\n        results: list[dict[str, Any]] = []\n\n        # Create campaign using ctx (TestContext)\n        campaign_id = ctx.create_campaign(\n            title=\"Test Campaign\",\n            character=\"Test Character\",\n            setting=\"Test Setting\",\n            description=\"Test Description\",\n        )\n\n        # Optionally seed game state to exit character creation\n        ctx.ensure_story_mode(campaign_id)\n\n        # Process actions\n        response = ctx.process_action(campaign_id, \"test action\")\n\n        # Validate and record result\n        passed = \"narrative\" in response\n        results.append({\n            \"name\": \"scenario_name\",\n            \"passed\": passed,\n            \"campaign_id\": campaign_id,\n            \"user_id\": ctx.user_id,\n            \"errors\": [] if passed else [\"Error description\"],\n        })\n\n        return results\n\n\nif __name__ == \"__main__\":\n    test = MyFeatureTest()\n    sys.exit(test.run())\n```\n\n### TestContext Methods\n\n| Method | Purpose |\n|--------|---------|\n| `ctx.create_campaign(title, character, setting, description)` | Create campaign and track for evidence |\n| `ctx.process_action(campaign_id, user_input, mode=\"character\")` | Send action to server |\n| `ctx.get_campaign_state(campaign_id)` | Get current game state |\n| `ctx.ensure_game_state_seed(campaign_id)` | Seed Aric + Goblin, exit char creation |\n| `ctx.ensure_story_mode(campaign_id)` | Verify in Story Mode (not Character Creation) |\n| `ctx.user_id` | Auto-generated test user ID |\n| `ctx.model` | Model being used for test |\n| `ctx.evidence_dir` | Evidence directory path |\n\n### When to Use MCPTestBase (DEFAULT for ALL E2E Tests)\n\n| Test Type | Use MCPTestBase? | Notes |\n|-----------|------------------|-------|\n| E2E tests with MCP server | YES - **MANDATORY** | This is the ONLY approved pattern |\n| Multi-scenario tests | YES - **MANDATORY** | Built-in iteration support |\n| Single API call tests | YES - **MANDATORY** | Simpler than standalone |\n| Cache\u002Frestart tests | YES - **MANDATORY** | `self.restart_server()` built-in |\n| Dice roll verification | YES - **MANDATORY** | `ctx.validate_code_execution()` built-in |\n| Unit tests (no server) | NO | Use pytest - no MCP server needed |\n| Browser-only tests | NO | Use Playwright directly - no MCP |\n\n**CRITICAL RULE: For ALL tests that use the MCP server, you MUST use MCPTestBase.**\n\nThe 41 existing test files in `testing_mcp\u002F` all use MCPTestBase - this is the established pattern.\n\n## MANDATORY: USE SHARED LIBRARY UTILITIES\n\n**CRITICAL RULE**: ALWAYS use functions from `testing_mcp\u002Flib\u002F` - NEVER reimplement them.\n\n### Available Shared Utilities\n\n| Module | Functions | Purpose |\n|--------|-----------|---------|\n| **`lib\u002Fevidence_utils.py`** | `get_evidence_dir(test_name)` | Get `\u002Ftmp\u002F\u003Crepo>\u002F\u003Cbranch>\u002F\u003Ctest_name>` path |\n| | `capture_provenance(base_url, server_pid=None)` | Capture git + server provenance |\n| | `save_evidence(evidence_dir, data, filename)` | Save with SHA256 checksum |\n| | `write_with_checksum(path, content)` | Write file with checksum |\n| | `create_evidence_bundle(evidence_dir, ...)` | Create complete evidence bundle |\n| | `save_request_responses(evidence_dir, pairs)` | Save request\u002Fresponse JSONL |\n| **`lib\u002Fmcp_client.py`** | `MCPClient(base_url, timeout)` | MCP JSON-RPC client |\n| | `client.tools_call(tool_name, args)` | Call MCP tool |\n| **`lib\u002Fcampaign_utils.py`** | `create_campaign(client, user_id, ...)` | Create campaign via MCP |\n| | `process_action(client, user_id, campaign_id, ...)` | Process player action |\n| | `get_campaign_state(client, user_id, campaign_id)` | Get game state |\n| | `ensure_game_state_seed(client, user_id, campaign_id)` | Seed basic game state |\n| **`lib\u002Fserver_utils.py`** | `start_local_mcp_server(port)` | Start local test server |\n| | `pick_free_port(start)` | Find available port |\n| | `DEFAULT_EVIDENCE_ENV` | Environment vars for evidence capture |\n| **`lib\u002Fmodel_utils.py`** | `settings_for_model(model_id)` | Get model-specific settings |\n| | `update_user_settings(client, user_id, settings)` | Update user model settings |\n| **`lib\u002Fnarrative_validation.py`** | `validate_narrative_quality(narrative)` | Validate narrative structure |\n| | `extract_dice_notation(text)` | Extract dice rolls from text |\n\n### Required Import Pattern\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Generated test - uses shared lib utilities.\"\"\"\nimport sys\nfrom pathlib import Path\n\n# Add project root to path\nsys.path.insert(0, str(Path(__file__).parent.parent))\n\n# MANDATORY: Import from shared libraries\nfrom testing_mcp.lib.evidence_utils import (\n    capture_provenance,\n    get_evidence_dir,\n    save_evidence,\n    create_evidence_bundle,\n)\nfrom testing_mcp.lib.mcp_client import MCPClient\nfrom testing_mcp.lib.campaign_utils import create_campaign, process_action\nfrom testing_mcp.lib.model_utils import settings_for_model, update_user_settings\n\n# NEVER reimplement these functions in the test file\n```\n\n### What You MUST NOT Reimplement\n\n**FORBIDDEN - These already exist in `lib\u002F`:**\n- `def capture_provenance()` → Use `lib\u002Fevidence_utils.capture_provenance()`\n- `def get_evidence_dir()` → Use `lib\u002Fevidence_utils.get_evidence_dir()`\n- `def save_evidence()` → Use `lib\u002Fevidence_utils.save_evidence()`\n- `def write_with_checksum()` → Use `lib\u002Fevidence_utils.write_with_checksum()`\n- `def create_campaign()` → Use `lib\u002Fcampaign_utils.create_campaign()`\n- `def process_action()` → Use `lib\u002Fcampaign_utils.process_action()`\n- Custom MCP client code → Use `lib\u002Fmcp_client.MCPClient`\n\n**REQUIRED Pattern:**\n```python\n# Get evidence directory\nevidence_dir = get_evidence_dir(\"my_test_name\")\n\n# Capture provenance\nprovenance = capture_provenance(base_url=\"http:\u002F\u002Flocalhost:8001\")\n\n# Create campaign\nclient = MCPClient(base_url)\ncampaign_id = create_campaign(\n    client,\n    user_id=\"test-user\",\n    title=\"Test Campaign\",\n)\n\n# Process action\nresponse = process_action(\n    client,\n    user_id=\"test-user\",\n    campaign_id=campaign_id,\n    user_input=\"I attack the goblin\",\n)\n\n# Save evidence\nsave_evidence(evidence_dir, test_results, \"results.json\")\n```\n\n**Benefits of Using Shared Libraries:**\n1. **Automatic standards compliance** - Evidence follows the `evidence-standards` skill\n2. **Zero maintenance burden** - Updates benefit all tests automatically\n3. **Consistent behavior** - All tests use identical evidence structure\n4. **Reduced duplication** - No need to copy\u002Fpaste utility code\n5. **Single source of truth** - Centralized in `testing_mcp\u002Flib\u002F`\n\n## OUTPUT LOCATIONS\n\n| Output Type | Default Location | Override Flag |\n|-------------|------------------|---------------|\n| **Test files** | `testing_mcp\u002F` | `--test-dir \u003Cpath>` |\n| **Evidence** | `\u002Ftmp\u002F\u003Crepo>\u002F\u003Cbranch>\u002F\u003Cwork>\u002Fiteration_NNN\u002F` | `--evidence-dir \u003Cpath>` |\n\n**Versioning (v1.1.0+):** Evidence bundles now use iteration-based directories:\n- Each run creates `iteration_001\u002F`, `iteration_002\u002F`, etc.\n- `latest` symlink points to most recent iteration\n- `metadata.json` includes `run_id`, `iteration`, `bundle_version`\n\n## EXECUTION WORKFLOW\n\n### Phase 1: Parse Free-Form Input\n\n**Action Steps:**\n1. Extract test focus from natural language input (e.g., \"equipment logic\", \"dice rolls\", \"campaign creation\")\n2. Identify PR context if mentioned (e.g., \"for this PR\" → analyze current branch changes)\n3. Determine test type: MCP integration, browser automation, or hybrid\n4. Generate descriptive `work_name` for evidence directory\n\n**Example Parsing:**\n```\nInput: \"for this PR make sure the equipment logic works\"\n→ Focus: equipment logic\n→ Context: current PR\u002Fbranch changes\n→ Type: MCP integration (equipment = game state)\n→ work_name: equipment_validation\n```\n\n### Phase 2: Generate Test File\n\n**Action Steps:**\n1. Create test file in `testing_mcp\u002Ftest_\u003Cfocus>.py` (or custom `--test-dir`)\n2. **MANDATORY: Use MCPTestBase class** - This is the ONLY approved pattern for E2E tests\n3. Include `--work-name` CLI argument (evidence saving is mandatory, no flag needed)\n4. Ensure test uses REAL servers (no mocks, no test mode)\n\n**CRITICAL: ALWAYS Use MCPTestBase Template**\n\nFor ALL E2E tests with MCP server, use this template (inherited from `MCPTestBase`):\n\n```python\n#!\u002Fusr\u002Fbin\u002Fenv python3\n\"\"\"Generated E2E test - uses MCPTestBase.\nFocus: [extracted focus]\nWork Name: [work_name]\n\nREAL MODE ONLY - No mocks, no test mode\nEvidence standards: the evidence-standards skill\n\"\"\"\nfrom __future__ import annotations\n\nimport sys\nfrom pathlib import Path\nfrom typing import Any\n\n# Add project root to path\n# Works for both root-level tests (testing_mcp\u002Ftest_*.py) and subdirectory tests (testing_mcp\u002Fcreation\u002Ftest_*.py)\n_test_file = Path(__file__).resolve()\n_project_root = _test_file.parent.parent if _test_file.parent.name == \"testing_mcp\" else _test_file.parent.parent.parent\nsys.path.insert(0, str(_project_root))\n\nfrom testing_mcp.lib.base_test import MCPTestBase, TestContext\n\n\nDEFAULT_MODEL = \"gemini-3.8-flash\"\n\n\nclass [TestClassName](MCPTestBase):\n    \"\"\"[Test description].\"\"\"\n\n    TEST_NAME = \"[work_name]\"\n    MODEL = DEFAULT_MODEL\n    DESCRIPTION = \"[Test description for CLI help]\"\n\n    def run_scenarios(self, ctx: TestContext) -> list[dict[str, Any]]:\n        \"\"\"Run test scenarios.\"\"\"\n        results: list[dict[str, Any]] = []\n\n        # Create campaign using ctx (TestContext)\n        campaign_id = ctx.create_campaign(\n            title=\"Test Campaign\",\n            character=\"Test Character\",\n            setting=\"Test Setting\",\n            description=\"Test Description\",\n        )\n\n        # Optionally seed game state to exit character creation\n        ctx.ensure_story_mode(campaign_id)\n\n        # Process actions\n        response = ctx.process_action(campaign_id, \"test action\")\n\n        # Validate and record result\n        passed = \"narrative\" in response\n        results.append({\n            \"name\": \"scenario_name\",\n            \"passed\": passed,\n            \"campaign_id\": campaign_id,\n            \"user_id\": ctx.user_id,\n            \"errors\": [] if passed else [\"Error description\"],\n        })\n\n        return results\n\n\nif __name__ == \"__main__\":\n    test = [TestClassName]()\n    sys.exit(test.run())\n```\n\n**Why MCPTestBase is Mandatory:**\n1. **Automatic server management** - Starts\u002Fstops local server automatically with proper cleanup\n2. **Built-in evidence collection** - Creates complete evidence bundles with checksums automatically\n3. **User\u002Fmodel configuration** - Handles model settings and user setup consistently\n4. **Campaign tracking** - Automatically tracks campaigns for evidence collection\n5. **Standardized CLI args** - `--server`, `--model`, `--work-name` built-in\n6. **Server restart support** - `self.restart_server()` preserves evidence across restarts\n7. **Code execution validation** - `ctx.validate_code_execution()` for dice roll verification\n8. **Cross-process evidence** - Automatic tracking of server stops\u002Fstarts for cache testing\n9. **Console capture** - Automatic capture of test output to evidence bundle\n10. **Error handling** - Crashes captured as failed scenarios with full evidence\n\n**DO NOT generate standalone scripts** - The MCPTestBase handles all boilerplate correctly.\n\n### Phase 3: Add Evidence Standards Compliance\n\n**Action Steps:**\n1. Include git provenance capture (HEAD, origin\u002Fmain, changed files)\n2. Add server environment capture (process info, ports, env vars)\n3. Derive ALL documentation from actual data (never hardcode)\n4. Track missing\u002Fdropped data with warnings\n5. Check subprocess return codes\n\n**Evidence Standards Checklist (from the `evidence-standards` skill):**\n- [ ] Git provenance: HEAD commit, origin\u002Fmain, changed files (via `capture_git_provenance()`)\n- [ ] Server environment: PID, port, env vars (via `capture_server_runtime()`)\n- [ ] Checksums: SHA256 for ALL evidence files including JSONL and server logs\n- [ ] Timestamp synchronization: collect all evidence in one pass\n- [ ] Documentation-Data alignment: derive claims from actual data\n- [ ] Centralized utilities: use `lib\u002Fevidence_utils.py`\n- [ ] Raw capture: use `DEFAULT_EVIDENCE_ENV` from `server_utils.py` for automatic raw LLM capture\n- [ ] JSONL file: create `request_responses.jsonl` with full request\u002Fresponse pairs\n- [ ] Server logs: copy to `artifacts\u002Fserver.log` with checksum\n- [ ] Evidence mode: document capture approach with `evidence_mode` field\n\n### Phase 4: Verify Real Mode\n\n**Action Steps:**\n1. Confirm server is running on expected port\n2. Verify WORLDAI_DEV_MODE setting\n3. Ensure NO mock imports or test mode flags\n4. Validate API responses are from real server\n\n**MOCK MODE = INVALID EVIDENCE**:\n- FORBIDDEN: `TESTING=true`, mock imports, fake services\n- FORBIDDEN: Hardcoded responses or placeholder data\n- REQUIRED: Real local server, real database, real API responses\n\n## TEST TYPE DETECTION\n\n**Automatic Detection from Free-Form Input:**\n\n| Keywords | Test Type | Example Input |\n|----------|-----------|---------------|\n| `equipment`, `inventory`, `items`, `game_state` | MCP Integration | \"equipment logic works\" |\n| `dice`, `roll`, `combat`, `damage` | MCP Integration | \"dice rolls are fair\" |\n| `campaign`, `create`, `firebase` | MCP Integration | \"campaign creation flow\" |\n| `browser`, `ui`, `page`, `click` | Browser Automation | \"landing page loads correctly\" |\n| `login`, `oauth`, `auth` | Browser + Auth | \"login flow works\" |\n\n**Default**: MCP Integration (most common for this project)\n\n## GENERATED TEST REQUIREMENTS\n\nEvery generated test MUST include:\n\n### 1. Evidence Generation - Use Shared Lib\n```python\n# FORBIDDEN: Custom evidence generation\n# def save_evidence(...):\n#     \"\"\"DON'T implement this - it exists in lib\u002Fevidence_utils.py\"\"\"\n\n# REQUIRED: Use lib utilities\nfrom testing_mcp.lib.evidence_utils import create_evidence_bundle\n\n# Generate evidence bundle\nevidence_dir = get_evidence_dir(\"my_test\")\nprovenance = capture_provenance(server_url)\n\nbundle_files = create_evidence_bundle(\n    evidence_dir=evidence_dir,\n    test_name=\"my_test\",\n    results=test_results,\n    provenance=provenance,\n    server_url=server_url,\n)\n# Bundle automatically includes:\n# - README.md, methodology.md, evidence.md, notes.md\n# - run.json with scenarios\n# - metadata.json with git provenance\n# - SHA256 checksums for all files\n```\n\n### 2. CLI Arguments\n```python\nparser.add_argument(\"--work-name\", default=\"\u003Cauto_generated>\")\nparser.add_argument(\"--server\", help=\"Optional: use existing server URL (default: start fresh)\")\n# Note: Evidence saving is MANDATORY - no flag needed\n```\n\n### 3. Real Mode Verification\n```python\ndef verify_real_mode(server_url):\n    \"\"\"Verify server is real, not mocked.\"\"\"\n    response = requests.get(f\"{server_url}\u002Fhealth\")\n    assert response.status_code == 200\n    assert \"mock\" not in response.text.lower()\n```\n\n### 4. Model Settings Forcing\n```python\nfrom lib.model_utils import settings_for_model, update_user_settings\n\nDEFAULT_MODEL = \"gemini-3.8-flash\"\n\n# Pin model at test start to avoid fallback noise\nupdate_user_settings(\n    client,\n    user_id=user_id,\n    settings=settings_for_model(DEFAULT_MODEL),\n)\n```\n\n### 5. Request\u002FResponse Capture (MANDATORY for behavior claims)\n```python\nfrom lib.evidence_utils import save_request_responses\n\n# Track all MCP tool calls\nrequest_responses: list[dict] = []\n\n# After each action, capture request\u002Fresponse pair\nrequest_responses.append({\n    \"request\": {\"tool\": \"process_action\", \"user_id\": user_id, ...},\n    \"response\": action_response,\n})\n\n# Save to JSONL at end\nsave_request_responses(evidence_dir, request_responses)\n```\n\n**Minimal inline helper if not using evidence_utils:**\n```python\ndef save_request_responses(evidence_dir: Path, pairs: list[dict]):\n    \"\"\"Write request\u002Fresponse pairs to JSONL with checksum.\"\"\"\n    jsonl_path = evidence_dir \u002F \"request_responses.jsonl\"\n    with jsonl_path.open(\"w\") as f:\n        for pair in pairs:\n            f.write(json.dumps(pair) + \"\\n\")\n    # Generate checksum\n    sha256 = hashlib.sha256(jsonl_path.read_bytes()).hexdigest()\n    (evidence_dir \u002F \"request_responses.jsonl.sha256\").write_text(\n        f\"{sha256}  request_responses.jsonl\\n\"\n    )\n```\n\n### 6. Server Runtime Artifacts (REQUIRED for integration claims)\n```python\nimport subprocess\n\ndef capture_server_artifacts(evidence_dir: Path, port: int, server_pid: int | None):\n    \"\"\"Capture server runtime state for evidence.\"\"\"\n    artifacts_dir = evidence_dir \u002F \"artifacts\"\n    artifacts_dir.mkdir(exist_ok=True)\n\n    # lsof - what's listening on the port\n    try:\n        lsof_output = subprocess.check_output(\n            [\"lsof\", \"-i\", f\":{port}\", \"-P\", \"-n\"],\n            stderr=subprocess.STDOUT, text=True\n        )\n        (artifacts_dir \u002F \"lsof_output.txt\").write_text(lsof_output)\n    except subprocess.CalledProcessError:\n        pass\n\n    # ps - process info\n    if server_pid:\n        try:\n            ps_output = subprocess.check_output(\n                [\"ps\", \"-p\", str(server_pid), \"-o\", \"pid,ppid,user,etime,command\"],\n                stderr=subprocess.STDOUT, text=True\n            )\n            (artifacts_dir \u002F \"ps_output.txt\").write_text(ps_output)\n        except subprocess.CalledProcessError:\n            pass\n```\n\n### 7. Git Provenance Capture - Use Shared Lib\n```python\n# FORBIDDEN: Custom git provenance capture\n# def capture_git_provenance():\n#     \"\"\"DON'T implement this - it exists in lib\u002Fevidence_utils.py\"\"\"\n\n# REQUIRED: Use lib utility\nfrom testing_mcp.lib.evidence_utils import capture_provenance\n\n# Capture git + server provenance\nprovenance = capture_provenance(\n    base_url=\"http:\u002F\u002Flocalhost:8001\",\n    server_pid=None,  # Optional - will auto-detect if not provided\n)\n\n# Returns:\n# {\n#     \"git_head\": \"abc123...\",\n#     \"git_branch\": \"feature\u002Fxyz\",\n#     \"git_origin_main\": \"def456...\",\n#     \"changed_files\": [\"file1.py\", \"file2.py\"],\n#     \"server_url\": \"http:\u002F\u002Flocalhost:8001\",\n#     \"server_pid\": 12345,\n#     \"lsof_output\": \"...\",  # What's listening on the port\n#     \"ps_output\": \"...\",     # Process info\n# }\n```\n\n> The shared lib version handles missing remotes, detached HEADs, and filters empty\n> strings from changed_files automatically. It also captures server runtime state.\n\n## EVIDENCE STANDARDS COMPLIANCE\n\nFrom the `evidence-standards` skill:\n\n| Requirement | Implementation |\n|-------------|----------------|\n| **Derive claims from data** | `os.environ.get()`, not hardcoded strings |\n| **Warn on missing data** | Track `missing_item_ids` list, add to notes |\n| **Correct denominators** | `found\u002Ftotal (need min)`, not `found\u002Fmin` |\n| **Check return codes** | `if result.returncode != 0: warn()` |\n| **Single run attribution** | Evidence bundle references ONE test run |\n| **Git provenance** | HEAD, origin\u002Fmain, changed files |\n| **Checksums** | SHA256 via `write_with_checksum()` helper |\n| **Self-contained** | No external script dependencies |\n| **Per-scenario campaign_id** | Include `campaign_id` for each scenario in run.json |\n| **Model matrix** | Test multiple models when behavior varies by provider |\n| **Pass quality** | Track `pass_type: \"strong\"\u002F\"weak\"` in results |\n| **Partial state handling** | Check field presence, not just truthiness |\n| **Scenario forcing** | Use high HP + explicit instructions to prevent shortcuts |\n\n## ADVANCED PATTERNS (from dice_rolls_comprehensive.py)\n\n### Per-Scenario Campaign Isolation\n\nWhen scenarios can pollute each other's context (e.g., LLM continuing previous combat):\n\n```python\nfor scenario in TEST_SCENARIOS:\n    # Create fresh campaign per scenario to avoid context pollution\n    scenario_campaign_id = create_campaign(client, user_id)\n    ensure_game_state_seed(client, user_id=user_id, campaign_id=scenario_campaign_id)\n\n    result = process_action(client, campaign_id=scenario_campaign_id, ...)\n\n    # Include campaign_id in evidence for log traceability\n    run_summary[\"scenarios\"].append({\n        \"name\": scenario[\"name\"],\n        \"campaign_id\": scenario_campaign_id,  # ← Required\n        ...\n    })\n```\n\n### Model Matrix Testing\n\nTest across multiple providers when behavior varies:\n\n```python\nDEFAULT_MODEL_MATRIX = [\n    \"gemini-3.8-flash\",      # code_execution strategy\n    \"qwen-3-235b-a22b-instruct\",   # native_two_phase strategy\n]\n\nfor model_id in models:\n    model_settings = settings_for_model(model_id)\n    # Run scenarios for each model...\n```\n\n### dice_audit_events Schema (for dice\u002FRNG evidence)\n\n```python\n{\n    \"source\": \"code_execution\" | \"server_tool\",\n    \"label\": \"Stealth Check\",\n    \"notation\": \"1d20+1\",\n    \"rolls\": [10],\n    \"modifier\": 1,\n    \"total\": 11,\n    \"dc\": 12,                    # Required for skill\u002Fsave\n    \"dc_reasoning\": \"...\",       # Required - proves DC set before roll\n    \"success\": false             # Required for skill\u002Fsave\n}\n```\n\n### Pass Quality Classification\n\nTrack evidence strength in results:\n\n```python\n# Define pass criteria with quality levels\nstrong_pass = primary_condition and secondary_condition\nweak_pass = primary_condition and not secondary_condition\npassed = primary_condition  # Core requirement\n\nresult = {\n    \"status\": \"PASS\" if passed else \"FAIL\",\n    \"pass_type\": \"strong\" if strong_pass else (\"weak\" if weak_pass else \"fail\"),\n    \"primary_condition\": primary_condition,\n    \"secondary_condition\": secondary_condition,\n}\n\n# Output for evidence\nif strong_pass:\n    print(\"TEST PASSED (STRONG): All conditions met\")\nelif weak_pass:\n    print(\"TEST PASSED (WEAK): Core proven, secondary not met\")\nelse:\n    print(\"TEST FAILED: Core requirement not proven\")\n```\n\n### Partial State Update Handling\n\nAPIs return only changed fields. Handle missing fields correctly:\n\n```python\n# BAD - Treats missing field as False\nstill_active = response.get(\"state\", {}).get(\"active\") is True\n\n# GOOD - Check field presence with fallback\nstate = response.get(\"state\", {})\nif \"active\" in state:\n    still_active = state[\"active\"] is True\nelif state.get(\"round_number\") is not None:\n    # Partial update with progress indicator - still active\n    still_active = True\nelse:\n    # Fall back to previous known state\n    still_active = previous_state.get(\"active\", False)\n```\n\n### LLM Scenario Forcing\n\nPrevent LLM shortcuts with explicit constraints:\n\n```python\n# BAD - LLM may resolve in 1-2 actions\nSCENARIO = \"Fight the enemies\"\n\n# GOOD - Forces extended scenario\nSCENARIO = \"\"\"You face a Boss (CR 5, HP 120) with two Guards (HP 59 each).\nThis encounter CANNOT be resolved in fewer than 3 rounds.\nDO NOT end prematurely. All enemies fight to the death.\"\"\"\n```\n\n### Statistical Validation\n\nFor RNG-dependent features, include distribution tests:\n\n```python\n# Distribution test\nfor notation in (\"1d6\", \"1d20\"):\n    rolls = [roll_dice(notation) for _ in range(200)]\n    stats = {\"count\": len(rolls), \"min\": min(rolls), \"max\": max(rolls), \"mean\": sum(rolls)\u002Flen(rolls)}\n    assert abs(stats[\"mean\"] - expected_mean) \u003C tolerance\n```\n\n## PRIORITY MATRIX\n\n```\nCRITICAL: Blocks core functionality, data corruption risk\nHIGH: Significant degradation, wrong behavior\nMEDIUM: Minor issues, cosmetic problems\nLOW: Documentation, edge cases\n```\n\n**Stop Rule**: CRITICAL → Stop testing, fix immediately, verify, resume\n\n## COMPLETION CRITERIA\n\n- [ ] Test file created in `testing_mcp\u002F` (or custom dir)\n- [ ] Self-contained evidence generation (no external dependencies)\n- [ ] **Fresh local server started** with free port (unless --server provided)\n- [ ] **Evidence ALWAYS saved** (no optional flag)\n- [ ] Real mode verified (no mocks, no TESTING=true)\n- [ ] Git provenance captured\n- [ ] All results derived from actual data\n- [ ] Missing data tracked with warnings\n- [ ] **run.json includes scenarios array** with campaign_id and errors\n- [ ] **Model settings pinned** via update_user_settings()\n- [ ] **request_responses.jsonl captured** for behavior claims\n\n## Cross-references\n\n- the `evidence-standards` skill — general cross-project evidence\n  policy (layers, evidence class table, unit-test exceptions, bundle anatomy).\n  This skill's evidence bundle format is a concrete implementation of that policy\n  for `testing_mcp\u002F` E2E tests.\n- The repo-level `evidence-standards` skill — your-project.com-specific\n  extensions (dice-claim, campaign-isolation, BigQuery, Gemini specifics).\n",{"name":5,"description":7,"when-to-use":55},"When the user invokes \u002Fgeneratetest, asks to generate an E2E test, wants a test for a PR's behavior, or needs an evidence-producing MCP integration test in testing_mcp\u002F.","main","8144f00ebafc4306264c63239e4b9fa42e48a90e","plugins\u002Fworldarchitect\u002Fskills\u002Fgeneratetest",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-12 14:45:07",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill generatetest",{"tool":69,"command":70},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill generatetest",{"tool":72,"command":73},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill generatetest","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fplugins\u002Fworldarchitect\u002Fskills\u002Fgeneratetest\u002FSKILL.md",true,[],[78,96,116,130,144,160],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":50},"01M716Y5MTJ6GYJZ2ATXCJK8G4","instinct","Use when the user invokes \u002Finstinct or \u002Fin, or asks to \"message Instinct\", \"ask Instinct\", \"tell Instinct\", \"check Instinct\", or read replies from the configured peer assistant. iMessage first, WhatsApp Web as fallback.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Finstinct\u002FSKILL.md",[],[80,85,86,87,88,89,90,91,92,93,94,95],"user","when","replies","check","use","identity","whatsapp","gmail","read","message","ask",{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":105,"publishedAt":50},"01M716Y4HF7FVVMJSA2CCVN5VF","hr","Compatibility alias for history-resume; produce the same fresh-state, provenance-aware resume briefing.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhr\u002FSKILL.md",[102],{"categoryNo":103,"categoryName":104,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000038","人力资源",[98,106,107,108,109,110,111,112,113,114,115],"resume","compatibility","provenance","for","history","produce","alias","briefing","state","fresh",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":123,"publishedAt":50},"01M716Y1FFNFKFJYYKF8HQA6T8","history-resume","Resume briefing for the current repository branch or worktree using fresh state and admitted history sources.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fhistory-resume\u002FSKILL.md",[122],{"categoryNo":103,"categoryName":104,"taxonomyType":28,"taxonomyTypeDesc":29},[110,106,124,125,85,126,113,127,109,128,129,114,115],"history resume","branch","analysis","repository","worktree","sources",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":50},"01M716XWXJ8EPHK4RH9T14TR85","grok","Alias for the canonical grokbot browser conversation workflow; \u002Fgrok talks to the Grok bot the same way \u002Fdot talks to Dot.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fgrok\u002FSKILL.md",[],[132,137,138,139,109,140,112,141,142,143],"dot","bot","workflow","canonical","conversation","browser","grokbot",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":150,"publishedAt":50},"01M70N9Q07DTE0EW5KFXMMMSJ0","codexa-bench","Compare `codexa` and normal `codex` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fcodexa-bench\u002FSKILL.md",[],[151,152,153,89,154,109,155,156,157,158,159],"codexa bench","work","split","default","duplicate","task","compare","normal","codex",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":164,"licenseFileUrl":165,"sourceHtmlUrl":166,"categories":167,"keywords":177,"publishedAt":50},"01M6C24S2X60SP8BBFGAEKPEGW","frontend-design","Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, artifacts, posters, or applications (examples include websites, landing pages, dashboards, React components, HTML\u002FCSS layouts, or when styling\u002Fbeautifying any web UI). Generates creative, polished code and UI design that avoids generic AI aesthetics.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffrontend-design\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Ffrontend-design\u002FSKILL.md",[168,171,174],{"categoryNo":169,"categoryName":170,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000009","前端开发",{"categoryNo":172,"categoryName":173,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":175,"categoryName":176,"taxonomyType":28,"taxonomyTypeDesc":29},"01JBSEEDCAT000000000000032","设计师",[178,179,180,89,181,182,183,85,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,86,202],"frontend","design","frontend design","generic","ui design","react","html","components","code","artifacts","ui","aesthetics","Production","web components","landing","applications","quality","web","css","create","examples","with","react components","web ui","pages"]