en un clic
mushi-debug
Debug Mushi Mushi issues — edge function errors, SDK not reporting, API key problems, failed story mapping, failing QA stories, missing inventory, and PDCA loop issues. Use when something isn't working in Mushi.
Menu
Debug Mushi Mushi issues — edge function errors, SDK not reporting, API key problems, failed story mapping, failing QA stories, missing inventory, and PDCA loop issues. Use when something isn't working in Mushi.
Debug Mushi Mushi issues — SDK not reporting, API errors, LLM key exhaustion, story mapping failures, QA test failures, PDCA loop not running, edge function errors. Use when "mushi is not working", "sdk not pinging", "story map failed", "tdd test not running", "api key exhausted", "fix-worker failed", "pdca not improving", or any mushi error/failure.
Set up Mushi Mushi in a new project — install SDK, configure API keys, connect to the admin console, map user stories from a live app, and generate TDD tests. Use when the user asks to "set up mushi", "add mushi to my project", "connect mushi", "configure mushi", "install mushi sdk", "map my user stories", or "start using mushi tdd".
Run, review, and improve Mushi Mushi TDD tests — story mapping, Playwright test generation, QA coverage, PDCA improvement loop, test approval workflow. Use when "run tdd tests", "generate tests for my stories", "check qa coverage", "improve failing tests", "test my app with mushi", "review generated tests", or any TDD/QA workflow in mushi.
Set up, configure, and use Mushi Mushi — the AI-powered QA platform for automatic bug detection, user story mapping, TDD scenario generation, and PDCA auto-improvement. Use when setting up Mushi, configuring SDK/CLI/MCP, managing API keys, or asking how any Mushi feature works.
| name | mushi-debug |
| description | Debug Mushi Mushi issues — edge function errors, SDK not reporting, API key problems, failed story mapping, failing QA stories, missing inventory, and PDCA loop issues. Use when something isn't working in Mushi. |
| triggers | ["mushi not working","sdk not reporting","story map failed","qa story failing","api key exhausted","inventory not accepted","pdca not running","debug mushi","fix mushi"] |
# Run the doctor command — checks connectivity and key validity
mushi doctor
Expected output: all checks green. If MUSHI_API_KEY fails, re-run mushi login.
Use the Sentry MCP:
get_sentry_issues project=mushi-be
Look for errors in story-mapper, test-gen-from-story, pdca-runner, inventory-propose.
Symptom: "Map from live app" shows failed status
Diagnose:
error_messageCommon causes:
mushi keys addSymptom: mushi tdd gen <storyId> returns error
Diagnose:
# Check that a story exists in the accepted inventory
mushi tdd pending # lists qa stories pending review
Common causes:
mushi keys list then add a backup keySymptom: Tests never execute on schedule
Diagnose:
mushi tdd pending # check if stories are stuck in pending_review
approval_status = pending_review: approve them with mushi tdd approve <id>enabled = false: toggle enabled in console → QA Coverage → story detailautomation_mode = approve: the story requires manual enableSymptom: Fix attempts fail with "All LLM keys exhausted"
Diagnose:
mushi keys list
Look for status=quota_exhausted with a cooldown time.
Fix:
# Add a backup key
mushi keys add --provider anthropic --key sk-ant-... --label "backup2" --priority 200
# Or add an OpenAI key as fallback
mushi keys add --provider openai --key sk-... --label "openai-backup" --priority 300
Symptom: Inventory page shows no active inventory after accepting a proposal
Check in DB (Supabase MCP):
SELECT id, status, source, created_at
FROM inventory_proposals
WHERE project_id = '<your-project-id>'
ORDER BY created_at DESC LIMIT 5;
SELECT id, status, created_at
FROM inventories
WHERE project_id = '<your-project-id>'
ORDER BY created_at DESC LIMIT 3;
If inventories is empty but inventory_proposals has accepted rows, the accept flow failed — check Sentry.
Symptom: Failing tests never get rewritten
Check:
SELECT jobname, schedule FROM cron.job; in Supabase SQL editorsource=test_gen_from_story and automation_mode in ['auto', 'review']mushi tdd improveUse the Supabase MCP:
get_logs service=api
get_logs service=postgres
Or via CLI:
supabase functions logs story-mapper
supabase functions logs test-gen-from-story
supabase functions logs pdca-runner
| Error | Cause | Fix |
|---|---|---|
No Firecrawl API key configured | Missing BYOK key | Add key in Settings → API Keys |
All LLM keys exhausted | All Anthropic/OpenAI keys hit quota | Add backup key with mushi keys add |
Story not found in test-gen | Story id not in accepted inventory | Accept the inventory proposal first |
byok_keys_provider_slug_check | Invalid provider slug | Use: anthropic, openai, firecrawl, browserbase, cursor |
relation story_map_runs does not exist | Migration not applied | Run pending migrations on remote |
If you get "relation does not exist" errors, migrations may not be deployed:
cd packages/server
supabase db push --db-url postgresql://...
Or use the Supabase MCP apply_migration for each file in order:
20260602000000_byok_multikey_pool.sql20260602000001_story_map_runs.sql20260602000002_qa_stories_tdd_columns.sql20260602000003_pdca_qa_improve_cron.sql