name: ‘step-01-preflight-and-context’ description: ‘Determine mode, verify framework, and load context and knowledge’ outputFile: ‘{test_artifacts}/automation-summary.md’ nextStepFile: ‘{skill-root}/steps-c/step-02-identify-targets.md’
Determine execution mode, verify framework readiness, and load the necessary artifacts and knowledge fragments.
{communication_language}CRITICAL: Follow this sequence exactly. Do not skip, reorder, or improvise.
Read config.test_stack_type from {config_source}.
Auto-Detection Algorithm (when test_stack_type is "auto" or not configured):
{project-root} for project manifests:
package.json with react/vue/angular/next dependencies, playwright.config.*, vite.config.*, webpack.config.*pyproject.toml, pom.xml/build.gradle, go.mod, *.csproj/*.sln, Gemfile, Cargo.tomlfullstack; only frontend = frontend; only backend = backendtest_stack_type config value overrides auto-detectiontest_stack_type is not in config, treat as "auto" (preserves current frontend behavior for existing installs)Store result as {detected_stack} = frontend | backend | fullstack
Verify framework exists:
If {detected_stack} is frontend or fullstack:
playwright.config.ts or cypress.config.tspackage.json includes test dependenciesIf {detected_stack} is backend or fullstack:
conftest.py, src/test/, *_test.go, .rspec, test project *.csproj)If missing: HALT with message “Run framework workflow first.”
{test_dir}{config_source} read tea_use_playwright_utils{config_source} read tea_use_pactjs_utils{config_source} read tea_pact_mcp{config_source} read tea_browser_automation{config_source} read test_stack_typeLoad 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 {detected_stack} is backend or fullstack, or microservices indicators detected):
Load: pactjs-utils-overview.md, pactjs-utils-consumer-helpers.md, pactjs-utils-provider-verifier.md, pactjs-utils-request-filter.md (~800 lines)
If tea_use_pactjs_utils is disabled but contract testing is relevant (microservices architecture detected, existing Pact config found):
Load: contract-testing.md (~960 lines)
Detection: Scan {project-root} for Pact indicators: pact/ directory, @pact-foundation/pact in package.json, pactUrls in test files, PACT_BROKER in env files.
If tea_pact_mcp is "mcp":
Load: pact-mcp.md (~150 lines) — enables agent to use SmartBear MCP tools for fetching provider states and generating pact tests during automation.
Use {knowledgeIndex} and load only what is required.
Core (always load):
test-levels-framework.mdtest-priorities-matrix.mddata-factories.mdselective-testing.mdci-burn-in.mdtest-quality.mdPlaywright Utils (if 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.mdTraditional Patterns (if Playwright Utils disabled):
fixture-architecture.mdnetwork-first.mdPact.js Utils (if enabled):
pactjs-utils-overview.md, pactjs-utils-consumer-helpers.md, pactjs-utils-provider-verifier.md, pactjs-utils-request-filter.mdContract Testing (if pactjs-utils disabled but relevant):
contract-testing.mdPact MCP (if tea_pact_mcp is “mcp”):
pact-mcp.mdHealing (if auto-heal enabled):
test-healing-patterns.mdselector-resilience.mdtiming-debugging.mdPlaywright CLI (if tea_browser_automation is “cli” or “auto”):
playwright-cli.mdMCP Patterns (if tea_browser_automation is “mcp” or “auto”):
Summarize loaded artifacts, framework, and knowledge fragments, then proceed.
Save this step’s accumulated work to {outputFile}.
{outputFile} does not exist (first save), create it with YAML frontmatter: ---
stepsCompleted: ['step-01-preflight-and-context']
lastStep: 'step-01-preflight-and-context'
lastSaved: '{date}'
---
Then write this step’s output below the frontmatter.
{outputFile} already exists, update:
'step-01-preflight-and-context' to stepsCompleted array (only if not already present)lastStep: 'step-01-preflight-and-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}