.agents/skills/showcase-demo-debugging/SKILL.md
Before changing code or fixtures, read the current local guides:
showcase/README.mdshowcase/RUNBOOK.mdshowcase/DEBUGGING.mdshowcase/INTEGRATION-CHECKLIST.md when adding or changing a demoUse showcase/bin/showcase for showcase operations. Do not use raw docker compose, raw docker build, or direct harness commands unless the CLI lacks the needed operation and you explain why.
Prefer isolated runs when another session may be using showcase:
showcase/bin/showcase test <slug> --d5 --verbose --cycle --isolate
showcase/integrations/langgraph-python as the gold standard for D5 behavior. Every other showcase demo must be a 1:1 match to langgraph-python for the same demo behavior, prompts, pills, tool flow, UI assertions, and D5 coverage unless the user explicitly approves a documented divergence.showcase/integrations/langgraph-python before implementation and keep the same versions or newer unless the user explicitly approves a documented divergence.langgraph-python behavior and assertions unless the user explicitly approves a divergence.Use this workflow when creating a new showcase item, adding a new demo cell, adding suggestion pills, or implementing a new showcase feature. The same rules apply as debugging:
langgraph-python demo or define the new langgraph-python behavior first.showcase/integrations/langgraph-python; use the same versions or newer for shared demo/runtime/test dependencies unless a documented incompatibility requires otherwise.Do not treat new showcase work as done after the UI appears to work once. New demos need the same fixture consistency, replay stability, and regression coverage as bug fixes.
showcase/docker-compose.local.yml, provider base URLs, and showcase/harness/fixtures/d5/*.json.showcase/aimock/d5-all.json or source fixtures under showcase/harness/fixtures/d5/.showcase/bin/showcase logs aimock --grep "fixture|match|NO match|404" after a run.showcase/bin/showcase up aimock <slug>
showcase/bin/showcase test <slug> --d5 --verbose --cycle
If a real LLM provider is needed, inspect showcase/.env without printing secret values. If the required key is missing or empty:
showcase/.env exists, copying from showcase/.env.example if needed.code --new-window "F:\projects\cpk\CopilotKit\showcase\.env"
OPENAI_API_KEY; use ANTHROPIC_API_KEY or GOOGLE_API_KEY only when the target provider needs it.If env/config changes affect containers, use:
showcase/bin/showcase recreate <slug>
Use rebuild only for dependency, Dockerfile, or non-mounted source changes.
If the user says they will reproduce manually, start the needed local services and ask them to click through the flow, then tell you when finished so you can inspect logs and recorded fixtures.
If the user asks you to reproduce from instructions, run the showcase demo in headed Playwright or the Browser MCP, interact until the bug is reproduced, and preserve the exact steps, prompt text, selected pill, URL, and observed failure.
Use headed D5 when useful:
showcase/bin/showcase test <slug> --d5 --headed --verbose --cycle
For a new demo or any local step that talks to a real LLM, run aimock in record mode so the interaction becomes fixture-backed. This is mandatory: real-provider traffic should produce fixtures that can be replayed later.
docker compose -f showcase/docker-compose.local.yml -f showcase/docker-compose.record.yml --profile infra up -d aimock <slug>
This record-mode compose override is the accepted exception to the normal "use showcase/bin/showcase" rule until the showcase CLI has a first-class record command.
Then drive every pill in the demo manually or with the D5 harness. Recorded calls land under showcase/aimock/d5-recorded/.
After recording:
showcase/harness/fixtures/d5/.showcase/aimock/d5-all.json contains the replay fixture path required by current docs/scripts.When using the existing D5 recorder helper, read showcase/scripts/record-d5-fixtures.mjs first. It documents the current recorder patch requirement for multi-turn fixtures. If aimock cannot record the needed response shape, do not fake the behavior in the demo; discuss the smallest upstream aimock change with the user.
When adding a feature, changing fixtures, or debugging any fixture-backed demo, verify suggestion-pill stability under aimock replay:
Fixtures must be consistent and replayable. Do not rely on turnIndex or conversation history when a stable userMessage, toolCallId, hasToolResult, or more specific fixture key can make the replay deterministic across repeated and interleaved pill clicks.
showcase/harness/fixtures/d5/*.json.showcase/aimock/d5-all.json.toolCallId for multi-turn disambiguation when a stable tool id exists; use hasToolResult only when the exact tool id is unavailable or intentionally runtime-variable.turnIndex in new fixtures unless no stable request property can distinguish the turn and the divergence is documented.userMessage, systemMessage, toolCallId, and tool-surface matching. Avoid broad catch-alls that can steal another pill's fixture.showcase/bin/showcase fixtures validate
showcase/bin/showcase recreate aimock
showcase/bin/showcase test <slug> --d5 --verbose --cycle
Add regression coverage after the user confirms the fixed flow works:
If aimock lacks a feature needed to accurately replay the LLM provider response:
showcase/bin/showcase aimock-rebuild --from <aimock-source-path>
Before final status:
langgraph-python demo behavior matches langgraph-python 1:1 or has an explicit documented user-approved divergence.