name: ‘step-01-load-context’ description: ‘Load knowledge base, determine scope, and gather context’ nextStepFile: ‘{skill-root}/steps-c/step-02-discover-tests.md’ knowledgeIndex: ‘./resources/tea-index.csv’
Determine review scope, load required knowledge fragments, and gather related artifacts.
{communication_language}CRITICAL: Follow this sequence exactly. Do not skip, reorder, or improvise.
Use review_scope:
If unclear, ask the user.
Stack Detection (for context-aware loading):
Read test_stack_type from {config_source}. If "auto" or not configured, infer {detected_stack} by scanning {project-root}:
playwright.config.*, cypress.config.*, package.json with react/vue/angularpyproject.toml, pom.xml/build.gradle, go.mod, *.csproj, Gemfile, Cargo.tomlfullstack; only frontend → frontend; only backend → backendtest_stack_type overrides auto-detectionLoad fragments based on their tier classification in tea-index.csv:
Context Efficiency: Loading only core fragments reduces context usage by 40-50% compared to loading all fragments.
If tea_use_playwright_utils is enabled, select the appropriate loading profile:
API-only profile (when {detected_stack} is backend or no page.goto/page.locator found in test files):
Load: overview, api-request, auth-session, recurse (~1,800 lines)
Full UI+API profile (when {detected_stack} is frontend/fullstack or browser tests detected):
Load: all Playwright Utils core fragments (~4,500 lines)
Detection: Scan {test_dir} for files containing page.goto or page.locator. If none found, use API-only profile.
If tea_use_pactjs_utils is enabled (and contract tests detected in review scope):
Load: pactjs-utils-overview.md, pactjs-utils-consumer-helpers.md (one-interaction-per-it() determinism rule), pactjs-utils-provider-verifier.md (vitest pool: 'forks' + singleFork — applies to BOTH consumer and provider), pactjs-utils-request-filter.md, pact-consumer-framework-setup.md (consumer Vitest fileParallelism: false + pool: 'forks' + singleFork: true, determinism gate, jq publish normalization), pact-broker-webhooks.md (webhook auth, PAT rotation, staleness monitoring — relevant if CI failure patterns include can-i-deploy timeouts with no verification).
If tea_use_pactjs_utils is disabled but contract tests are in review scope:
Load: contract-testing.md
If tea_pact_mcp is "mcp":
Load: pact-mcp.md — enables agent to use SmartBear MCP “Review Pact Tests” tool for automated best-practice feedback during test review.
From {knowledgeIndex} load:
Read {config_source} and check tea_use_playwright_utils, tea_use_pactjs_utils, tea_pact_mcp, and tea_browser_automation to select the correct fragment set.
Core:
test-quality.mddata-factories.mdtest-levels-framework.mdselective-testing.mdtest-healing-patterns.mdselector-resilience.mdtiming-debugging.mdIf Playwright Utils enabled:
overview.md, api-request.md, network-recorder.md, auth-session.md, intercept-network-call.md, recurse.md, log.md, file-utils.md, burn-in.md, network-error-monitor.md, fixtures-composition.mdIf disabled:
fixture-architecture.mdnetwork-first.mdplaywright-config.mdcomponent-tdd.mdci-burn-in.mdPlaywright CLI (if tea_browser_automation is “cli” or “auto”):
playwright-cli.mdMCP Patterns (if tea_browser_automation is “mcp” or “auto”):
Pact.js Utils (if enabled and contract tests in review scope):
pactjs-utils-overview.md, pactjs-utils-consumer-helpers.md, pactjs-utils-provider-verifier.md, pactjs-utils-request-filter.md, pact-consumer-di.md, pact-consumer-framework-setup.md, pact-broker-webhooks.mdContract Testing (if pactjs-utils disabled but contract tests in review scope):
contract-testing.mdPact MCP (if tea_pact_mcp is “mcp”):
pact-mcp.mdIf available:
Summarize what was found.
Coverage mapping and coverage gates are out of scope in test-review. Route those concerns to trace.
Save this step’s accumulated work to {outputFile}.
{outputFile} does not exist (first save), create it using the workflow template (if available) with YAML frontmatter: ---
stepsCompleted: ['step-01-load-context']
lastStep: 'step-01-load-context'
lastSaved: '{date}'
---
Then write this step’s output below the frontmatter.
{outputFile} already exists, update:
'step-01-load-context' to stepsCompleted array (only if not already present)lastStep: 'step-01-load-context'lastSaved: '{date}'Update inputDocuments: Set inputDocuments in the output template frontmatter to the list of artifact paths loaded in this step (e.g., knowledge fragments, test design documents, configuration files).
Load next step: {nextStepFile}