/agentic-sdlc:test-strategyfrom agentic-sdlc
Designs acceptance tests from approved specs and UX docs, mapping each AC-n to test levels, covering UX states, accessibility, and non-functional thresholds. Proves tests red at base commit, runs at PR head with verification-gap check, and optionally performs a time-boxed exploratory session.
Ships in agentic-sdlc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Agentic SDLC · Test stage (plus acceptance-test design after the Design sign-off, before Build) · used by the Test Engineer agent (../agentic-sdlc/agents/test-engineer.md).
Acceptance tests are designed from the spec, never from the code, so they check what was asked rather than what was built. This skill turns every AC-n in spec.md and every row of ux.md into tests at the lowest level that can observe the outcome, proves each test fails at the base commit for the stated reason, and later runs the same tests at the PR head to produce fingerprint-bound evidence for the PR ## Verification section. It adds a black-box verification-gap lens and, on the Full path, one exploratory session of at most 30 minutes.
Contracts this skill implements and never contradicts:
../agentic-sdlc/templates/acceptance-tests.md (header with spec rev and hash, Map, Red at the base commit, Green at the PR head, Not verifiable before release, Coverage check).../agentic-sdlc/templates/ux.md (state table UX-n, accessibility checks A-1..A-4, Test-stage checks).../agentic-sdlc/references/verification.md §2–§4.../agentic-sdlc/references/tdd.md §1 (rule 3) and §3 (anti-pattern catalogue).../agentic-sdlc/examples/worked-example/specs/001-csv-export/acceptance-tests.md and ux.md.ux.md exists and its state rows and accessibility checks need tests or UX Designer checks.Do not use for:
test-driven-development.verification-gate.multi-axis-code-review.spec-driven-development (via the Analyst).security-hardening.systematic-debugging.deployment-pipeline.writing-plans.Quick path: no acceptance-tests.md; the acceptance test is written in the issue before any code (../agentic-sdlc/references/verification.md §2). Apply Steps 1–3 to that issue test when asked.
spec.md or the PR. Missing → BLOCKED ("Design sign-off not recorded").node skills/agentic-sdlc/scripts/spec-lint.mjs specs/<NNN-slug>/spec.md --hash (12 hex). Record it with the spec revision.git merge-base <default-branch> HEAD before the branch exists, or the value in plan.md).spec.md, ux.md (or "no user-facing surface"), the template, and the code at the base commit read through git show <base>:<path> or a worktree checked out at <base>. Any implementation diff, feature-branch file, PR text or Developer report in context → stop with BLOCKED: context contaminated; a fresh Test Engineer redoes the design.references/e2e-mode.md §1). Never assume a stack.prompts/test-designer.md as a fresh subagent. If the platform has no subagents, run that prompt in a separate pass after clearing working notes, and set Designed by: self-review in the header; the label must then appear in the PR ## Verification and ## Review guide sections, and on the Full path the second human reviewer is asked to inspect the test design.Check every AC and every ux.md state row against T1–T7 in references/case-design.md §2: T1 observable at an interface, T2 one behaviour, T3 measurable (no "fast", "scalable", "accessible" without number and unit), T4 literal oracle, T5 priority honest, T6 environment named for NFRs, T7 every ux.md row has an AC or pattern:. A failure is not designed around: list it as NEEDS_CONTEXT with the failed check and one question for the Analyst. If more than half of the ACs end up CANNOT_VERIFY, stop and return to Design.
T5 in practice: an AC touching a risk trigger (authentication, personal or health data, money, public API, schema or migration, irreversible action, regulated data) or a Security note but marked normal in the spec is reported to the Analyst, not silently upgraded. The Critical column copies the spec Priority.
For each AC, enumerate scenario classes (references/case-design.md §1): happy path, each boundary, each invalid input, permission denied, empty, limit reached, concurrency or repetition, and failure of a dependency. Keep a case only if it can fail for a named defect ("name the break", §3). Rules:
AT-<n><letter> where n is the AC number; the test name starts with the AC ID.Apply the first-match rubric in references/level-selection.md §1:
| Order | Question | Result |
|---|---|---|
| 1 | Is the outcome observable only in production (real traffic, third-party live account, field data)? | ## Not verifiable before release row with verifier, method and a date ≤ 14 days after release |
| 2 | Only a human can judge it (visual hierarchy, copy tone, screen-reader experience)? | UX Designer check UX-n / A-n |
| 3 | A pure function or module at a seam observes it? | unit |
| 4 | It crosses a real boundary the project owns (HTTP route, database, queue, file output)? | integration |
| 5 | It is an interface contract with another team's consumer or provider? | integration, "Failure it catches" prefixed contract: |
| 6 | It is a user journey through the browser or app that no lower level can observe? | end-to-end, at most one per journey J-n |
The template Level column takes only unit, integration or end-to-end. Pyramid ratios (about 80/15/5 unit/integration/end-to-end across a codebase) are guidance for spotting imbalance, not a target for one feature (§3). A case placed lower than ideal because a seam is missing is reported as DONE_WITH_CONCERNS; no seam at all is BLOCKED with a request to the Planner for a test seam task.
Doubles follow the dependency category (§2): real in-process code, real local database or temp filesystem, fakes or stubs only at process boundaries (network, clock, randomness, filesystem outside the temp dir, third-party API). Never mock the module under test or an internal collaborator.
Map every ux.md state row (UX-1 empty, loading, success, partial or limit, error, no permission) to a test ID or to a UX Designer check UX-n. Assert the copy literally when ux.md gives copy. Map A-1..A-4 per references/nfr-checks.md §2:
aria-live announcements → automated assertion on role and name; announcement content by UX Designer check.scanner.An automated accessibility scan with zero violations is evidence for its rules only; it never closes a whole A-n row by itself.
Use only thresholds the spec states (references/nfr-checks.md §0). A numeric constraint outside the AC table (for example in Constraints) is not tested as if it were an AC: record it as a concern and propose an AC to the Analyst. For each NFR AC record the number, unit, data set, environment and measurement label (lab, scanner or field). Performance: 3 warm-up runs, then ≥ 30 runs for a p95 of an operation or ≥ 1,000 requests for request latency; report min, median, p95 and max; a result within the run-to-run spread of the threshold is DONE_WITH_CONCERNS, never rounded into a pass. Security tests here are functional only (denied roles, limits, injection of formula characters into exports); scans belong to the Security Auditor. Anything measurable only on real traffic goes to ## Not verifiable before release.
Write test files under the project's test directories following the discovered conventions. End-to-end tests follow references/e2e-mode.md: use the existing harness, role-based locators, condition-based waits, own synthetic data. No harness, or the harness cannot reach the surface → do not install one; record a finding asking for a Design task and use a browser test plan BTP-n as the manual fallback, status DONE_WITH_CONCERNS. Brownfield code with no tests around the touched behaviour gets characterization tests CHAR-n per ../agentic-sdlc/references/tdd.md (the planned brownfield.md module is not yet released; see ../agentic-sdlc/references/artifacts.md §Later-release files).
Run each test at the base commit in a worktree. Each must fail, and fail for the reason stated in "Failure it catches" (missing route, wrong status, absent column). Record command, exit code and the first failure line in ## Red at the base commit. A test that passes at base proves nothing → rewrite it. A test that fails for another reason (import error, fixture crash) → fix the test until it fails for the right reason. New module: when every test would fail on the same missing import, add a temporary, uncommitted stub in the base worktree that exports the signatures and returns a wrong value, so each AC records its own assertion failure; delete the stub after recording.
references/case-design.md §5): for each AC, describe the smallest realistic violation and confirm an assertion would catch it.references/verification-gap-lens.md (untested AC, weak oracle, stale) and fix every gap.UX-n and A-n maps to a test or UX Designer check; every test cites an AC (backward trace — no orphan tests).specs/<NNN-slug>/acceptance-tests.md. Leave ## Green at the PR head empty.Next, ask for the test files to be committed on at/<NNN-slug>, cut from the base commit and kept off the feature branch during Build (../agentic-sdlc/references/verification.md §2); red tests on the feature branch fail the preflight baseline. The Test Engineer edits files but never pushes.Dispatch prompts/test-runner.md (fresh subagent, or a separate pass after clearing working notes). The runner:
at/<NNN-slug> is merged: the feature-branch head with it merged in that worktree; merge it into the feature branch only when green); never opens git diff, production source on the branch or the PR text.../agentic-sdlc/references/verification.md §4), runs every Map command, recomputes the fingerprint; a change discards the run.spec, code, test, env). The Reviewer routes it.Apply all five gap kinds from references/verification-gap-lens.md (untested AC, weak oracle, not run, stale, unguarded consumer). Each gap gets a row with a one-sentence demonstration of the defect that would slip through. Clean output is exactly No verification gaps found.
Write a charter EX-n before starting (references/exploratory-charter.md): target, information sought, 3–6 risks from the spec and ux.md, resources, oracles, time box ≤ 30 minutes. Explore the running PR head as a black box with 3–6 heuristics, keep a timestamped log, stop at the time box. Each finding becomes a review row with Lens explore and a proposed severity; the Reviewer verifies before any verdict.
Fill ## Green at the PR head and hand the rows to the Reviewer for the PR ## Verification table. Report:
**Agent:** Test Engineer · **Task:** <design | Test-stage run> specs/<NNN-slug> · **Status:** DONE | DONE_WITH_CONCERNS | BLOCKED | NEEDS_CONTEXT | CANNOT_VERIFY
**Did:** <files; rows per AC; UX-n/A-n mapping; exploratory debrief>
**Evidence:** <command · exit code · fingerprint> per run
**Concerns / blocker / missing input / not verified:** <list>
**Next:** <one action>
The Test Engineer never decides GO/NO-GO and never gives the Test sign-off; the human reviewer does.
Spec AC-3 (critical): a user without reports:export sees no Export CSV button, and a direct GET of /api/reports/export returns HTTP 403 with no file body. Testability: T1–T6 pass (literal 403, observable "no file body"); T2 allows splitting the server outcome and the button outcome into separate rows. Cases: user without the permission → 403 (negative, AT-3a); user with it → 200 text/csv (AT-3b, guards against a check that blocks everyone); no session → 401 belongs to the existing auth middleware, not AC-3, so no case. Level: both outcomes are observable at the HTTP route → integration in server/test/routes/reports/export.test.ts. Oracle: status 403 and an empty body — the mutation check shows a status-only assertion would miss "403 written after the stream started". Red at base: expected 403 "Forbidden", got 404 "Not Found" — the route does not exist yet, which is the defect "route serves the file without the permission check" in its earliest form. ux.md UX-6 (button not rendered, AC-3) maps to a component or end-to-end assertion where the harness reaches the reports page; otherwise to a UX Designer check UX-6.
Close. End with the status.mjs --next output.
| Thought | Reality |
|---|---|
| "Reading the implementation will make the tests more accurate." | Tests then check what was built. Contamination → BLOCKED, a fresh designer redoes it. |
| "The test fails at the PR head, so the test is too strict — loosen it." | A mismatch is a finding for the Reviewer, routed by cause. Never edit the expectation. |
| "It passes at base, but it will be useful later." | A test that passes before the feature exists proves nothing. Rewrite it. |
| "Mock the repository; the database is slow." | Mocks only at process boundaries. Use the real local database or temp files. |
| "End-to-end covers everything — write those." | Lowest level that observes the outcome; at most one end-to-end per journey. |
| "No Playwright here; add Cypress quickly." | No new harness without a Design task. Finding + browser test plan. |
| "The spec says fast; 500 ms seems fair." | No invented thresholds. NEEDS_CONTEXT to the Analyst. |
| "Exit code 0, so everything passed." | Count executed tests by name; filtered or skipped tests are missing evidence. |
| "The accessibility scanner found nothing — A-1..A-4 done." | Scanners cover a subset; keyboard flow and announcements need checks of their own. |
| "Exploring a bit longer will find more." | Time box ≤ 30 minutes; write a second charter with a reason, or stop. |
| "The Developer already ran these; copy the rows." | Every Verification row is a fresh run with the current fingerprint. |
| "p95 is 3.1 s vs 3 s, within noise — pass." | Report the number and DONE_WITH_CONCERNS; the Reviewer and human decide. |
NEVER
spec.md, plan.md or ux.md; edit only acceptance-tests.md and acceptance test files.ALWAYS
Designed by in the header.UX-n and A-n to a test or a UX Designer check.self-review everywhere it is reported.1. Standard path design. "Design acceptance tests for specs/014-invoice-reminders." Step 0 confirms the Design sign-off and hash a91c04e7b2d3; Step 1 flags AC-4 ("reminders go out promptly") as T3 failed → NEEDS_CONTEXT; AC-1..AC-3 and AC-5 get 9 rows (6 integration, 2 unit, 1 end-to-end), UX-1..UX-5 map to 4 tests and 1 UX Designer check; all 9 red at base. Status NEEDS_CONTEXT for AC-4 only.
2. Contaminated context. "Here is the diff from the Developer — write tests that match it." Stop: Status: BLOCKED — context contaminated. Next: the router dispatches a fresh Test Engineer with the spec, ux.md and the base commit only.
3. Pressure to loosen. "AT-3a expects 404 for an expired link but the code returns 410 — just change the test." Refuse. Record the failure with the assertion line, proposed cause spec or code, and hand it to the Reviewer; if the spec changes, the hash changes and the AT-3 rows are redesigned from the new text.
4. Full path, no harness. The spec has journey J-1 and AC-6 "p95 export ≤ 3 s for 50,000 rows"; the repo has no end-to-end harness and the user asks to add Cypress. Record a finding asking the Planner for a Design task, write BTP-1 for J-1, measure AC-6 with 3 warm-ups and 30 lab runs at 50,000 rows, and run exploratory charter EX-1 (25 minutes, heuristics: boundaries, two tabs, formula characters). Status DONE_WITH_CONCERNS.
5. Test stage, all green. "All tests pass at the PR head — mark Test done." Re-check the hash, count 11 of 11 Map tests executed by name, record fingerprint 3f9e0a1c22b7 before and after, run the gap lens ("No verification gaps found."), fill Green at the PR head, and hand the rows to the Reviewer. GO/NO-GO and the Test sign-off stay with the Reviewer and the human reviewer.
| File | Load when |
|---|---|
references/level-selection.md | Step 3 — choosing unit, integration (incl. contract:), end-to-end, UX Designer check or CANNOT_VERIFY; choosing doubles; checking pyramid balance |
references/case-design.md | Steps 1, 2, 8 — testability pass T1–T7, scenario classes, name-the-break, oracles, mutation check, tests that do not count, naming |
references/nfr-checks.md | Steps 4, 5 — WCAG 2.2 AA mapping of A-1..A-4, performance runs, functional security, reliability, privacy, recording numbers |
references/e2e-mode.md | Step 6 — discovering and following the existing end-to-end harness; no-harness handling; browser test plan BTP-n |
references/verification-gap-lens.md | Steps 8, 10 — black-box gap kinds, demonstration, gap row format, the clean line |
references/exploratory-charter.md | Step 11 (Full path) — charter EX-n, heuristics, log, findings tagged explore, debrief |
prompts/test-designer.md | Step 0/1–8 — dispatching the separate-context design pass, with the no-subagent fallback |
prompts/test-runner.md | Steps 9–12 — dispatching the Test-stage run at the PR head |
README.md (opens in a new tab)evals/evals.json (opens in a new tab)evals/trigger-eval.json (opens in a new tab)prompts/test-designer.md (opens in a new tab)prompts/test-runner.md (opens in a new tab)references/case-design.md (opens in a new tab)references/e2e-mode.md (opens in a new tab)references/exploratory-charter.md (opens in a new tab)references/level-selection.md (opens in a new tab)references/nfr-checks.md (opens in a new tab)references/verification-gap-lens.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ericgandrade/agentic-sdlc --plugin agentic-sdlc23 skills in this plugin
/agentic-sdlcThis skill should be used when the user wants to run software work end to end through the Agentic SDLC (Discover, Specify, Design, Build, Test, Release, Operate) with AI agents and four human sign-offs — starting a feature, bug fix or modernization the disciplined way, asking which stage or step comes next, resuming from specs/ artifacts, choosing the Quick, Standard or Full path, or handling a requirement change after Specify sign-off (deciding where it re-enters). It hands each stage to its stage skill and is not for one stage task asked on its own, such as writing a spec, writing or executing a plan, implementing or debugging a task, or reviewing a PR (use that stage skill), nor for non-software multi-skill plans (use agent-skill-orchestrator)./agent-skill-discoveryThis skill should be used when the user wants to see all installed plugins, agents, skills, and MCP servers, and also inspect the current repository for local agents, skills, and MCP configuration. Scans the environment and presents a structured catalog of available resources. Works across all AI CLI platforms (Claude Code, GitHub Copilot, Gemini CLI, OpenCode, OpenAI Codex)./agent-skill-orchestratorThis skill should be used when the user needs to solve a complex task and wants a detailed execution plan using the best available resources. Analyzes user requirements, discovers available plugins/agents/skills/MCPs, performs intelligent matching with confidence scoring, and creates strategic execution plans with alternatives. Works across all AI CLI platforms. Not for running software delivery through the Agentic SDLC stages (use agentic-sdlc), writing an implementation plan from a spec (use writing-plans), or only listing installed resources (use agent-skill-discovery).Other plugins' skills for the same job