test-documentation
Analyze, prioritize, and document test cases in TMS (Jira/Xray), or repair an existing Story-ATS-ATP-ATR-TC cascade through a sealed explicit mode. Use for Test/ATP/ATR artifacts, ROI and automation verdicts, maintaining traceability, fix-traceability, or broken TMS links. The re
Install
npx skills add https://github.com/upex-galaxy/agentic-qa-boilerplate/tree/main/.agents/skills/test-documentation
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install upex-galaxy-agentic-qa-boilerplate@llmmart
git clone https://github.com/upex-galaxy/agentic-qa-boilerplate.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole upex-galaxy/agentic-qa-boilerplate collection as a plugin from our marketplace. Git is the plain clone.
Skill manifest
Forbidden invocations
Never invoke /sdd-* skills from this workflow: SDD is an optional ceremony users install themselves, and this skill is self-contained. To change KATA, fixtures, cli/, scripts/ or the api/schemas/ pipeline, leave this skill and use /framework-development (it runs Plan, Code, Verify, Archive on its own). scripts/lint-skills.ts rejects any /sdd- mention outside this section; .agents/skills/agentic-qa-core/references/skill-composition-strategy.md §4 governs users who install SDD manually.
Test Documentation: QA Bridge
Formalize already-validated tests in the TMS (Jira, Xray or equivalent) with full traceability, the right priority and a clear automation verdict, in three phases: Analyze, Prioritize (ROI), Document. Prioritizing is not optional, because most scenarios should end up Deferred, not automated.
One prerequisite: the tests describe behavior that is already validated ({{jira.status.story.qa_approved}} story, closed bug or finished exploratory session). The TMS protects regression; it is not an exploration tool.
Dependencies
Requires agentic-qa-core. Loads on demand:
agentic-qa-core/references/test-design-doctrine.md: read before deriving TCs from acceptance criteria. It governs the 1:N TC explosion, the formal-technique triggers and the floor-not-ceiling coverage model.agentic-qa-core/references/defect-management-doctrine.md: read before parenting a Test or raising an Improvement. It governs QA process-epic parenting (everyTesthangs from the QA Test Repository epic, Part 4), the mandatorycomponentsaxis (Part 3) and the Improvement bridge for under-specified ACs (Part 1). This skill files no Bugs.agentic-qa-core/references/briefing-template.md,agentic-qa-core/references/dispatch-patterns.md,agentic-qa-core/references/orchestration-doctrine.md,agentic-qa-core/references/session-management.md,agentic-qa-core/references/preflight-gate.md,agentic-qa-core/references/traceability-linking.md: cited inline by the sections that use them.
Compact Rules
Test-design doctrine (binding, full canon in agentic-qa-core/references/test-design-doctrine.md):
- An AC-to-TC map is the floor: at least one TC per AC is a minimum, never a target. Coverage is AC conformance plus risk beyond the AC, so the set includes the boundary, negative, state and anomaly cases the AC is silent on.
- 1:N applies to derivation, not to the regression repository. Only regression-worthy scenarios (Candidate or Manual) are persisted; most are Deferred. jira-native: Stage 4 creates
Tests for those only (Deferred is report-only). jira-xray: Stage 1 already made the sprintTests, so Stage 4 promotes the regression-worthy ones into the Test Plan and enriches them. Document because it will be re-run, never to hit a count. - Techniques by trigger: EP always; BVA for a range, limit, length or date window; State-Transition for stateful entities; Decision Table when 2+ conditions interact; Pairwise when 3+ factors combine.
- Parametrize: same-behavior data variants are ONE Test (
Scenario Outline+Examplesrows) per partition. Split only when action, outcome, status or state differs. Canon: doctrine §"Part 2.5". - Cross-cutting characteristics (XSS, perf, a11y) deferred to app-level suites are an explicit handoff: name the receiving suite or file the gap.
Test-documentation operational rules:
- Document already-validated behavior only (discovery-driven:
oracle: confirmed). Exploration belongs to/sprint-testingper ticket and/exploratory-testingper module, flow or sweep. - TC identity is Precondition + Action + verifiable outcome. Naming:
{US_ID}: TC#: should <expected outcome> [<connector> <condition>] [given <precondition>];Validate <feature>is reserved for the grouping layer (Test Set summary ordescribe()). Reject"Login test","Login - error","TC1: Test form". - ROI gives each TC one verdict: Candidate (feeds test-automation), Manual, Deferred. Prioritize by risk.
- No ROI verdict while a scenario is
oracle: observed: it needs a person's answer to "is this intended?" first (decision-protocol kind 1). Canon:agentic-qa-core/references/discovery-driven-doctrine.md§4. - A Candidate or Manual verdict is fired only after a person signs it (a batch through the
mkddeck, one verdict through the question tool). The ROI comment then carriesVerdict signed: <who>, <where>, <when>with a checkable<where>(the person's own comment id, or the saved mkd result or decision record path), the line the TC source gate of/test-automationreads. Only an attended session writes it; a subagent, worker or routine lists verdicts as pending. Format and the sign-only pass:references/tms-conventions.md§9. - Discovery intake (
references/discovery-intake.md): COVERED is dropped with a line, WEAK becomes a strengthen proposal (never a new Test), NEW runs the full pipeline anchored to its coverage Tech Story; the >50% alarm is per chunk. PASSEDorFAILEDonly from a run observed in the environment the TC's precondition names, elseNOT RUNwith its reason (doctrine §5).automated(merged) only once the spec is on the production branch, through modepost-promotion(doctrine §6).- Cardinality: US to TC is 1:N; AC to TC is N:1 or N:M. Resolve the TMS modality in Phase 0 first. The mode comes from
$ARGUMENTS(Mode routing). - Bug-driven (golden rule): a regression-worthy bug must end with a Test. Reuse the existing failed Test if the bug came from one, else create one (both modalities). A non-qualifying bug is treated like a failed test: Deferred, no new Test.
Read full SKILL.md when: resolving TMS modality, computing ROI, writing Gherkin, or wiring US-ATP-ATR-TC traceability links.
Mode routing
Resolve the mode before the readiness preflight and Phase -1. When the first token of $ARGUMENTS matches a mode below, that token is the mode and the rest goes to it unchanged (/test-documentation repair-traceability UPEX-123). Without a match, plain documentation work runs the default mode, and an ambiguous request gets a question.
repair-traceability: selected only by a first tokenrepair-traceability, thefix-traceabilitytrigger phrase, or an explicit request to repair a ticket's existing traceability. Load onlyreferences/repair-traceability.md. Its sequence is sealed: audit, present the plan, get explicit user approval, apply, verify. Do not start Analyze, Prioritize, Document, create unrelated test cases, or widen the ticket scope.post-promotion: selected by a first tokenpost-promotion, by the hand-off/git-flow-mastersends when a promotion lands ("run the post-promotionmergedpass"), or by an explicit request for that pass. Load onlyreferences/post-promotion-pass.md. It firesmergedon TCs whose spec is on the production branch and touches nothing else (no Analyze, no ROI, no new Test).document(default): normal TMS documentation, ROI, and Candidate, Manual and Deferred work. Continue with the workflow below.
If the user has not supplied the ticket key repair-traceability needs, ask for it before any TMS call. Missing credentials remain a hard stop under AGENTS.md Critical Rule #10.
repair-traceabilityon one ticket cannot see the failure that matters most. Coverage-link direction is a project-wide condition: an inverted link is invisible on its own Story (the link is there, the coverage panel is just empty, and nothing reports it) and only shows as a pattern in aggregate. On one measured project roughly half the linked Stories were wired the wrong way (ADR-0006). So when the mode audits a ticket, also offer the project-wide mixed-direction sweep before applying anything: the[TMS_TOOL]traceability check accepts several keys or a JQL query and returns one repair worklist. Direction doctrine, the delete-before-recreate rule (Jira dedupes the pair and type, so adding the corrected link is a silent no-op) and the sweep are canon inagentic-qa-core/references/traceability-linking.md§4 and §10. Read them first; the plan the user approves says which links get deleted, by id.
Subagent Dispatch Strategy
Orchestration & Session contracts: this skill follows
agentic-qa-core/references/orchestration-doctrine.md(mandatory subagent dispatch — main thread is command center) ANDagentic-qa-core/references/session-management.md(Phase 0 resume check, plan-first persistence at.session/<skill-slug>/<scope>/, archive on completion). Phase 0 (resume check) and Phase 1 (plan write) are NOT optional. The orchestrator also applies the per-stage Definition-of-Done gates inagentic-qa-core/references/stage-gates.md: verify a stage's DoD (planning stages include the Test-Design Checklist) BEFORE recording its progress checkpoint and advancing.
This skill is per-scope. <scope> is <JIRA-KEY> (ticket or bug scope, or the coverage Tech Story of a discovery-driven gap), <module-slug> (module scope, or a per-module discovery-driven scope) or <YYYY-MM-DD>-adhoc (ad-hoc scope); names are canonical in agentic-qa-core/references/discovery-driven-doctrine.md §2. Session state lives at .session/test-documentation/<scope>/{plan.md, progress.md} per agentic-qa-core/references/session-management.md §3 and §9. Phase -1 (session resume) runs first, then Phase 0 (TMS modality), then the pipeline.
Every dispatch follows the 7-component briefing in .agents/skills/agentic-qa-core/references/briefing-template.md (doctrine: AGENTS.md §3 "Orchestration Mode"), and the pattern per phase follows .agents/skills/agentic-qa-core/references/dispatch-patterns.md; the session contract is .agents/skills/agentic-qa-core/references/session-management.md. Phase 1 and Phase 2 stay inline because planning and decisions live in the orchestrator; bulk TC creation in Phase 3 is the only parallel hotspot and the only step that branches per TMS modality.
| Phase | Pattern | Subagent role |
|---|---|---|
| Phase -1: Session resume check | inline | orchestrator only; reads .session/test-documentation/<scope>/progress.md if present, offers resume / restart / abort per agentic-qa-core/references/session-management.md §4 |
| Phase 0: Resolve TMS modality | inline | orchestrator only; the 3-step probe in §Phase 0 |
| Phase 1: Analyze scope | Single | inline; planning lives in the orchestrator (delegating it is an anti-pattern) |
| Phase 2: ROI / Candidate-Manual-Deferred verdict | Single | inline; decisions live in the orchestrator |
| Phase 3: TMS TC creation (N > 10 TCs) | Parallel | M subagents, chunks of ~5-10 TCs per agent; cap = 10 to avoid Jira/Xray rate limits; each subagent loads /xray-cli (Modality jira-xray) or /acli (Modality jira-native) |
| Phase 3: TMS TC creation (N ≤ 10 TCs) | Single | inline; dispatch overhead is not justified for small batches |
| Phase 3: Traceability linking (US <-> ATS/ATP/ATR <-> TCs) | Single | inline; it needs the aggregated state of all created entities |
Phase 3: Final report / reports (COVERAGE-MATRIX-<scope>.md, PRIORITIZATION-<scope>.md) |
Single | inline; synthesis lives in the orchestrator |
- Concurrency cap is 10 subagents for Parallel TC creation: Jira and Xray both rate-limit at about 10 writes per second sustained, and wider fan-out triggers 429 responses. A module with more than 100 TCs gets chunks larger than 10 per subagent (the cap is on subagent count, not chunk size).
- Error protocol: on any subagent failure, stop and report the partial state (which TCs landed, which failed, with issue keys and errors), then present retry, skip and abort. Do not auto-fix or auto-rollback (see
.agents/skills/agentic-qa-core/references/orchestration-doctrine.md). A skill that itself broke (a wrong step, a missing verifier, a stale rule) is reported upstream per../agentic-qa-core/references/upstream-feedback.md: drafted and redacted locally, filed only on explicit OK, verified withgh issue view.
With nobody at the keyboard
A supervised worker sends each question below to its conductor or launcher, which holds the gate. A routine takes the delegating brief as the approval when the brief covers the decision (agentic-qa-core/references/decision-protocol.md). Otherwise do the reversible work (analysis, the local plan, the reports), stop before any Jira or Xray write, and report what is waiting.
| Gate | With nobody present |
|---|---|
| Readiness preflight checklist | Self-fix only what the brief allows; a blocking RED stops the run and goes in the report. |
| Phase -1 resume, restart or abort | Resume. Restart archives the old session and abort drops it, so each needs the brief's word. |
| Ambiguous mode, missing ticket key | Stop and report; no TMS call without the key. |
| Phase 0 modality unsettled by config and evidence | Fail closed: no TMS write, report. |
repair-traceability plan approval, project-wide sweep |
Write the plan and stop; applying needs the approval. |
ROI verdict signature, oracle: observed scenarios |
List the verdicts as pending. |
Questions inside Phase 3 follow the same rule.
Readiness Preflight Gate (MANDATORY — runs before Phase -1)
Full doctrine:
agentic-qa-core/references/preflight-gate.md. The gate runs before the resume check and the TMS-modality gate. Two laws: args are answers (the scope and any stated modality are provided, so ask only the gaps) and probe, don't assume. Surface gaps and REDs as ONEAskUserQuestionchecklist, self-fix with approval and explanation, and stop on any blocking RED. This skill documents already-validated behavior and never executes against a live system, so its gate centers on TMS write capability. The generic baseline (env resolution, test-user creds, secret and restart handling, output contract) is in the reference §3.1; below is only this skill's capability delta.
| Capability | Need | Why here |
|---|---|---|
Issue-tracker ([ISSUE_TRACKER_TOOL]) |
REQUIRED | TC / ATP / ATR creation, linking, transitions. Load /acli; validate via bun run jira:check. |
TMS modality + [TMS_TOOL] |
REQUIRED | The whole Phase 0 gate. jira-xray: /xray-cli loaded, XRAY_* creds set and the Xray API answering (evidence, never work types alone). jira-native: /acli covers it. Resolve before Phase 1; ask only if all auto-checks fail. |
| Source repos readable | OPTIONAL | Phase 1 source-code validation reads backend and frontend code, not a running env, so no live-env or DB/API/browser probe is needed. |
Active env, test-user creds, DBHub, OpenAPI / API token, Playwright, resend and kata-manifest.json (owned by /test-automation) are N/A: documentation never hits a live system and writes no test code. When every REQUIRED row is GREEN, continue to Phase -1.
Phase -1 — Session resume check (MANDATORY, inline)
Runs before Phase 0 (the TMS modality gate). Compute the prospective <scope> from the invocation: <JIRA-KEY> for ticket or bug scope (and the coverage Tech Story of a discovery-driven gap), <module-slug> for module scope (and a per-module discovery-driven scope), <YYYY-MM-DD>-adhoc for ad-hoc. Then:
- Check
.session/test-documentation/<scope>/progress.md. - If it does not exist, proceed to Phase 0 (TMS modality).
- If it exists:
- Read
plan.md(chosen scope, TMS modality, TC list, ROI verdicts). - Read the tail of
progress.md(last completed phase and next planned phase). - Tell the user the scope, TMS modality, last completed phase, next phase, and any TC creation chunks that did not finish (the most common interruption point: the Phase 3 parallel bulk create, capped at 10 subagents).
- Offer resume / restart / abort. On
restart, archive to.session/.archive/<YYYY-MM-DD>-test-documentation-<scope>-aborted/first.
- Read
The critical resume case is a Phase 3 parallel bulk create interrupted mid-batch. progress.md records one entry per returned Parallel subagent, so resume reads the chunks marked completed and dispatches only the missing ones (see Phase 3).
Phase 0 — Resolve TMS modality (mandatory gate)
Every project runs in one of two modalities. Resolve it before Phase 1. The same ATP/ATR/TC concepts have different containers in each mode.
The question to answer first
Does this project have Xray installed and licensed on Jira?
A. Yes -> Modality jira-xray
B. No -> Modality jira-native (no Xray)
How to resolve it without asking (in order)
- Resolve
{{TMS_CLI}}(testing.tms_cliin.agents/project.yaml). Valuebun xray(or any Xray CLI) means a candidate jira-xray, confirmed in step 2. Value unset,acli-only, or{{TMS_CLI}}matching{{ISSUE_TRACKER_CLI}}means Modality jira-native. - Confirm Xray by evidence: the Xray API answers through
[TMS_TOOL](/xray-cli: its auth status check, then one read against the project). If it answers, the modality is jira-xray. Work types alone never decide:Test Plan/Test Execution/Test Set/Pre-Conditionalso exist as native Jira work types on jira-native instances (the table below uses them there "by excellence"), so their presence proves nothing about Xray. Fail closed: no answer from the Xray API means never assume jira-xray. When step 1 named an Xray CLI, that is a tool or credential failure: stop per Critical Rule #10 and name theXRAY_*variables. - Only if neither the config nor the evidence settles it, ask the user the question above. Do not ask by default: autoresolve first.
What changes per modality
| Artifact | Modality jira-xray | Modality jira-native |
|---|---|---|
| ATP (Acceptance Test Plan) | Test Plan issue titled ATP: {STORY-KEY}: {story title}, parented to the QA Master Test Plan epic, linked to the US |
Same Test Plan issue by excellence (native Jira work type, Xray-independent); falls back to the Story {{jira.acceptance_test_plan}} field (then a ## Acceptance Test Plan (ATP) comment) only when the Test Plan work type is absent from the instance. |
| ATR (Acceptance Test Results) | Test Execution issue with Test Runs per TC, Environment, Begin/End Date, titled ATR: {STORY-KEY}: Story Testing, parented to the QA Test Artifacts epic |
Same Test Execution issue by excellence; falls back to the Story {{jira.acceptance_test_results}} field (then a ## Acceptance Test Results (ATR) comment) only when the Test Execution work type is absent from the instance. |
| TC (Test Case) | Xray Test issue (type Manual / Cucumber / Generic) |
Jira-native Test issue type (or Task with custom type), Description carries the full TC template |
| ATS (Acceptance Test Set) | Test Set issue titled ATS: {US_ID}: {story title}, mandatory per Story; holds ALL the Story's TCs (membership = TC→ATS issue links + the Xray-internal membership), linked to the US (is tested by, the coverage-panel link) |
Same Test Set issue when the work type is present; membership expressed as the same TC→ATS issue links. Work type absent means no ATS: direct TC→Story links (cascade last resort) |
| TS / Precondition / Test Plan | First-class Xray issue types (TS: feature Set is optional grouping) |
Same native work types when present in the instance; absent, use labels + Epic grouping |
| Result sync | CI imports JUnit/Cucumber via [TMS_TOOL] Import Results, and Test Runs update automatically |
Custom script updates Test Status field on each TC + comment with build context |
| CLI tag | [TMS_TOOL] resolves to bun xray or equivalent |
[TMS_TOOL] falls through to [ISSUE_TRACKER_TOOL] (acli / Jira MCP) |
Resolve {{TC_CREATION_STAGE}} in the same gate
The modality says which TMS tool is live. testing.tc_creation_stage in .agents/project.yaml (referenced as {{TC_CREATION_STAGE}}) says whether this skill creates the Candidate/Manual Test items or refines and promotes ones /sprint-testing already made. Read it here, alongside the modality; unset or unrecognized means auto. The knob's full table and rationale are in sprint-testing/SKILL.md §"Which stage creates the TCs", which is authoritative; this section only consumes it.
| Resolved value | Phase 3's verb for a Candidate / Manual scenario |
|---|---|
auto (default) |
jira-xray: promote + enrich an existing sprint Test · jira-native: create the Test here |
sprint-testing |
promote + enrich in BOTH modalities; the items already exist, and creating a second one duplicates the repository |
test-documentation |
create in BOTH modalities; no sprint items exist to promote |
Whatever the verb, the title rule is identical: a created TC is titled to the form, and a promoted TC has its title re-derived and verified first (§"Title on promotion"). If the verb says promote but no sprint Test exists for a scenario (a Story tested before the knob was set, or a scenario derived only now), create it and note that in progress.md. Never skip the TC.
Persist the decision
Once resolved, save the modality and the resolved {{TC_CREATION_STAGE}} into .session/test-documentation/<scope>/plan.md §Inputs (the canonical session record) and also mirror it to test-session-memory.md for the ticket (if one exists, for per-ticket sub-agent context). Treat it as sticky: do not re-resolve mid-session. If you detect drift (for example [TMS_TOOL] suddenly fails), stop and ask the user before re-resolving.
Reference implementations:
- Modality jira-xray concepts + Xray REST/GraphQL/CLI:
references/xray-platform.md - Modality jira-native project setup (Test issue type, Screen Scheme, custom fields):
references/jira-setup.md - Both modes side by side (field mapping, workflow, Description template):
references/jira-test-management.md
When to use each scope
Pick the scope from the input, not the output. All scopes share the Analyze, Prioritize, Document pipeline; only the input source and the defaults differ. Names, origins and granularity are canonical in agentic-qa-core/references/discovery-driven-doctrine.md §2; this table is the subset this skill accepts.
| Scope | Input | Typical volume | Default labels | Notes |
|---|---|---|---|---|
| Module-driven | A module of the system explored end to end | 20-100+ scenarios | regression, e2e or integration |
Batch of TCs grouped under the Regression Epic. Most scenarios end up Deferred. |
| Ticket-driven | A QA Approved user story from a sprint | 3-8 scenarios | regression, plus the test type |
Output of a sprint-testing session. ATP/ATR created per US. |
| Bug-driven | A closed bug with a verified fix | 0-2 scenarios | regression, automation-candidate (usually) |
Run the Bug-driven decision below. ROI biased up: "it failed once, it can fail again." |
| Ad-hoc / Exploratory | New scenarios found in exploratory testing | 1-10 scenarios | regression |
Apply the 3 Phase-0 questions harshly; ad-hoc scenarios are often one-time validations. Gate 0 holds for every scenario that carries an oracle line. A set with no coverable creates no Test: a round whose anchor is NONE proposes the coverage Tech Story first (agentic-qa-core/references/discovery-driven-doctrine.md §2.1, §3), and intake runs as discovery-driven once it exists. |
| Discovery-driven | A coverage gap with no Story, anchored to a coverage Tech Story; only scenarios a person confirmed (oracle: confirmed) are scored |
1-10 per gap, 20-100+ per module | regression, plus the test type |
Gate 0 below: an oracle: observed scenario gets no ROI verdict (agentic-qa-core/references/discovery-driven-doctrine.md §4). TCs use the Tech Story key as {US_ID} (§3 of the same file). Scored one anchor at a time (references/discovery-intake.md §6). |
A story ID means ticket-driven, a bug ID means bug-driven, a coverage Tech Story means discovery-driven, and a module name or a session output means module- or ad-hoc accordingly.
Bug-driven decision: "an important bug must have a test" (golden rule)
Not every bug becomes a regression Test: a one-time typo in a stable area is treated like a failed test (the fix was verified in sprint-testing) and Deferred. Run the same analysis and prioritization as for any scenario; a regression-worthy bug must end with a Test that covers it, in BOTH modalities.
1. Is this Bug/Defect a regression candidate? (apply Phase-0 filter + ROI; the prior-bug rule biases up)
NO -> No new Test. Treat as a failed test: fix already verified in sprint-testing -> log as Deferred. Done.
YES -> step 2.
2. Was the bug found FROM an existing, already-executed Test? (a Test that ran and failed — jira-native OR xray)
YES -> REUSE that existing Test for the bug's retest + regression. It already lives in the test set;
ensure it is linked to the bug (`tests / is tested by`) and promoted into regression. Do NOT duplicate.
NO -> CREATE + design the corresponding Test for the bug's retest.
jira-native: new `Test` issue. jira-xray: new Xray `Test` (+ plugin-appropriate Test Plan / Test Set linking).
Link to the bug via `tests / is tested by`.
This overrides the sprint-testing phrase "the bug is the test case", which covers only the in-sprint retest. The retest verifies the fix now; this rule decides whether a persistent Test must exist so the bug cannot silently return.
Scope handoff to /test-automation. Candidate TCs flow to /test-automation, which plans them under the same scope names and sizes each work package (agentic-qa-core/references/discovery-driven-doctrine.md §2): module-driven is Macro, ticket-driven Medium, bug-driven Micro, discovery-driven Macro per module and Medium or Micro per gap. ad-hoc / exploratory Candidates enter under whichever fits (a module batch, or a Micro package for a single TC). Manual and Deferred verdicts are terminal and never reach automation.
After the scope is confirmed, write .session/test-documentation/<scope>/plan.md per agentic-qa-core/references/session-management.md §6. It holds:
- Goal: scope, TMS modality, expected TC count.
- Inputs: PBI references, ATP source, prior bugs.
- Approach: the per-phase dispatch table above.
- Phase breakdown: Phase 1 Analyze, Phase 2 Prioritize, Phase 3 TC creation with its chunk count, Traceability, Final report.
- Risks, and a verification checklist (all TCs created with traceability, both reports written, the Deferred list mirrored to Jira).
- Cross-references:
.context/PBI/epics/EPIC-<KEY>-<slug>/stories/STORY-<KEY>-<slug>/test-cases/*.mdper-TC files,.context/reports/COVERAGE-MATRIX-<scope>.mdand.context/reports/PRIORITIZATION-<scope>.md(filenames per §"Reports: fixed filenames").
Then append ## Phase -1 — Session resume check — <ts> with status: completed and next: Phase 0 — Resolve TMS modality to progress.md.
Phase 1 — Analyze
Inputs to gather
| Source | What to read | Why |
|---|---|---|
| User Story / Epic | Description, ACs, comments, linked issues | Scenario identification, risk signals |
| Closed bugs linked to the story | Summary, root cause, fix area | Prior-bug prioritization rule |
| Exploratory session notes | Validated scenarios, observations; from /exploratory-testing, its candidate-scenarios.md (marks and scoring rules: references/discovery-intake.md; only oracle: confirmed ones are scored) |
Reuse nomenclature already used; never re-document a COVERED candidate |
| Coverage gap list | .session/project-context/coverage/gap-list.json (project-context mode coverage): behaviours by bucket, each with its coverage Tech Story; same marks and fail-closed reads (references/discovery-intake.md) |
Discovery-driven work list in risk order; never a Test without its anchor |
| Existing ATP (if present), modality-aware (see §Phase 0) | jira-native: Story field {{jira.acceptance_test_plan}}, synced to .context/PBI/epics/EPIC-<KEY>-<slug>/stories/STORY-<KEY>-<slug>/acceptance-test-plan.md (read-only Jira cache; sync via bun run jira:sync-issues get <STORY> --include-comments). jira-xray: Test Plan issue description via bun run jira:sync-issues get <ATP_KEY>, synced to test-plans/ATP-<KEY>-<slug>.md (a non-conforming title keeps the legacy TESTPLAN- / TESTEXEC- / RETESTEXEC- prefix); per-TC run state via [TMS_TOOL] (xray-cli) |
Scenarios may already exist; do not reinvent |
| Existing ATR (if present), modality-aware (see §Phase 0) | jira-native: Story field {{jira.acceptance_test_results}}, synced to acceptance-test-results.md (same jira:sync-issues get <STORY> --include-comments). jira-xray: Test Execution issue description via bun run jira:sync-issues get <ATR_KEY>, synced to test-executions/ATR-<KEY>-<slug>.md; per-TC run results via [TMS_TOOL] (xray-cli) |
Prior run results; do not re-execute what is already recorded |
| Implementation plan / source code | Actual files, APIs, test IDs | Validate that the design matches the implementation before documenting |
business-domain-context (bun run context:map business-domain-context; one term: --section term-<slug>) |
Canonical entity + process names, their UI labels | Vocabulary reference for TC names, steps and preconditions. Terms must match the map (a placeholder map means no glossary: say so, do not invent terms) |
Separate real scenarios from cross-cutting characteristics
Cross-cutting traits are validated inside every test, not as separate TCs.
| Cross-cutting (not a TC) | Validated by |
|---|---|
| Mobile responsive | Running each test in mobile viewport |
| XSS prevention | Using special-character test data inside tests |
| Performance | Timing assertions inside tests |
| Accessibility | A11y assertions inside UI tests |
| API contract | Response schema checks inside API tests |
| Generic "error handling" | Specific negative-path scenarios |
Deferral is not omission (Compact Rules). Each row lands somewhere: woven into a TC's data and assertions, or owned by a named app-level suite. If no suite exists for a trait the feature genuinely exposes, file the gap (a Deferred TC or a note in the ATR).
A real scenario is a user flow: a clear business objective, a concrete precondition and action, and a verifiable outcome, named in the should form (Compact Rules).
Source-code validation (mandatory before documenting)
The design in the ATP was written before code existed. Before creating any TC:
- Open the implementation plan (if any) and list the files it touches.
- Grep the actual code for
data-testid=, route handlers, API paths and text formats. - Compare the ATP's assumptions against what the code does. If they diverge, correct the TC design and add a Refinement Notes section.
Common discrepancies: an API the ATP assumed exists turns out to be SSR/direct DB; UI text in the ATP ("based on N reviews") differs from reality ("(N reviews)"); hardcoded IDs in the ATP where the TMS needs a variable pattern. Skipping this is the most common cause of invalid automated tests later.
Sprint TCs are drafts: refine them, do not inherit them
Whatever /sprint-testing Stage 1 left behind (Xray Test items, or ATP outlines under jira-native) was written to run once, this sprint, by its author. It is an input to this phase, never its output. Refine it before it enters the regression repository:
| What Stage 1 produced | What this phase does |
|---|---|
| Title | Re-derive it to the canonical form (§"Title on promotion"): a regression title reads for whoever runs it in six months, not for the tester who was there |
| Steps / Gherkin | Raise to repeatable detail: no "as before", no implicit state, no step that only makes sense after the previous test. Parameterize same-behavior data variants into one Scenario Outline (doctrine §Part 2.5) |
| Preconditions | Make them explicit and buildable from a cold environment (a sprint test may have relied on data the tester happened to have) |
| Variables | Replace every hardcoded id / email / UUID captured during the sprint with {variable} + a Variables table saying how to obtain it |
| Scope | A sprint TC that covers two (precondition, action) pairs splits here; two that cover the same pair merge (TC identity rule below) |
A refined TC carries a short Refinement Notes line in its Description (the section source-code validation writes to) naming what was tightened and why, so a reviewer can tell it from an untouched sprint artifact.
Under jira-native with {{TC_CREATION_STAGE}} = auto there is no sprint Test item to refine. The outline in the ATP plays that role, and the same table applies to it.
TC identity rule (load-bearing)
A TC is defined by Precondition + Action. All expected results from the same (precondition, action) pair belong to the same TC, not to separate TCs.
Same TC: Different TCs:
Precondition: valid credentials Precondition: valid credentials -> TC-A
Action: submit login Precondition: locked account -> TC-B
Assertions: redirect + token + welcome Precondition: invalid credentials -> TC-C
(all one TC) (all same action, but preconditions differ)
Splitting one (precondition, action) into N "check panel A / B / C" TCs is an anti-pattern: one TC, multiple assertions.
Technique-driven TC derivation (1:N, full canon: agentic-qa-core/references/test-design-doctrine.md)
One AC yields multiple TCs by default. Derive them by the AC's shape, and merge only within a partition (TC identity above), never across partitions, boundaries or states. Reduce an AC to one TC only with a written trivially atomic justification.
| Trigger in the AC | Technique | TCs produced |
|---|---|---|
| Any input (always) | Equivalence Partitioning | same-output inputs share one parameterized TC (Scenario Outline + Examples); different-output inputs get separate TCs |
| A range / limit / length / date-window | Boundary Value Analysis | TCs at min-1·min·min+1 … max-1·max·max+1 + zero / empty / null / overflow (EP alone misses off-by-one) |
| A status / lifecycle field | State-Transition | one TC per valid transition + per invalid transition |
| 2+ interacting conditions | Decision Table | enumerate combos, collapse equivalents, one TC per surviving rule |
| 3+ combinable factors | Pairwise | all-pairs TC set (log the reduction) |
These are candidate scenarios, not yet TMS work items. ROI (Phase 2) decides which become persistent regression TCs and which stay Deferred (recorded in the prioritization report, not created in the TMS).
Improvement bridge (
agentic-qa-core/references/defect-management-doctrine.mdPart 1). When a test beyond the AC exposes a gap because the AC was under-specified or absent (the system violated no defined criterion), file an Improvement issue per the doctrine (or delegate it to/sprint-testing). It is not a regression TC, and the Story's AC set stays as it is.
Phase 2 — Prioritize (ROI)
Gate 0 (discovery-driven only): the scenario is oracle: confirmed; otherwise it waits, unscored (agentic-qa-core/references/discovery-driven-doctrine.md §4).
Every scenario passes three gates in order. Failing any gate makes it Deferred.
MTP risk orders which gaps and scopes are worked first and never sets a verdict. ROI decides per scenario, and a high-risk gap can still end Deferred, explicitly (agentic-qa-core/references/discovery-driven-doctrine.md §7).
Phase 0: The three filter questions
- Does it protect against FUTURE regressions? If the bug was a one-time typo in a stable area, the answer is no. Defer.
- Are there PRIOR bugs in this area? Yes: prioritize even with moderate ROI ("it failed once, it can fail again").
- Is it an APP-level concern or a FEATURE-level concern? XSS / a11y / performance / responsive are APP-level suites, not per-feature TCs. Defer from this scope.
ROI formula (load-bearing)
ROI = (Frequency x Impact x Stability) / (Effort x Dependencies) / 10
The trailing / 10 is a normalization constant, not a sixth factor. The raw quotient over 1-5 factors spans 0.04 .. 125, while every threshold and worked example here reads on a 0.004 .. 12.5 scale, so always divide by 10. A neutral all-3s scenario lands at (3x3x3)/(3x3)/10 = 0.3, which is Deferred, the intended default.
Each factor is scored 1-5 independently:
| Factor | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Frequency (how often run) | Yearly / rarely | Every release | Every sprint | Daily | Every PR / commit |
| Impact (if it fails) | Cosmetic | Minor inconvenience | Degrades UX | Blocks feature | Revenue / core business |
| Stability (of the flow) | Very volatile | Unstable | Moderate | Stable, minor changes | Unchanged for months |
| Effort (to automate) | Trivial | Low (hours) | Moderate (1-2 days) | High (several days) | Very high (week+) |
| Dependencies | None | 1-2 simple | 3-4 | 5+ | Complex externals |
Effort and Dependencies are divisors, so a higher score is worse. The other three are multipliers.
Component value bonus
If a TC is reusable across multiple E2E flows:
Component Value = Base ROI x (1 + 0.2 x N)
where N is the number of E2E flows that consume it (a moderate-ROI atomic like authenticateSuccessfully can cross out of the defer bands through reuse). N is a qualitative estimate, capped at 3 (max multiplier x1.6): no tool counts call-sites, so read it off the ATP / feature map and record the estimate in the ROI comment. Full rule: references/tms-conventions.md §9 "Component value bonus".
Three outcomes (load-bearing)
Every scenario ends in exactly one of these buckets. There is no fourth.
| Outcome | Triggers it | Where it goes next | TMS status flow |
|---|---|---|---|
| Candidate | ROI > 3.0, OR (ROI 1.5-3.0 AND prior bug), OR critical happy path | Feeds test-automation skill |
Draft -> In Design -> READY -> In Review -> Candidate |
| Manual | ROI 0.5-1.5 AND not automatable (human judgment, visual inspection), OR explicitly manual-only | Terminal: manual regression suite | Draft -> In Design -> READY -> MANUAL |
| Deferred | ROI < 0.5, OR failed Phase-0 filter, OR one-time validation, OR it matched neither row above (Deferred is the default bucket: ROI under 3.0 with no prior bug and no critical-path justification lands here) | Terminal: not in regression. Can be revisited if system changes | jira-native: do not create a TC in the TMS. Document as Deferred in .context/reports/PRIORITIZATION-<scope>.md AND in the mirrored Jira comment (§"Reports: fixed filenames"; the local file is [LOCAL], the comment is the durable record). jira-xray: the sprint Test (created in /sprint-testing Stage 1) is not promoted to the Regression Test Plan (RTP); it stays as a sprint execution artifact, not deleted. |
Band authority: the three outcomes above collapse the 5-band table in
references/tms-conventions.md§9 ("ROI decision thresholds (strict)"), which is the authority on band boundaries. It resolves the middle bands explicitly:1.5-3.0is "Case by case: prior bug? critical flow? If no, defer", and0.5-1.5is "Probably defer: include only if prior bug". Read it whenever a score falls between0.5and3.0.
If more than 50% of candidates end up Candidate or Manual, re-apply Phase 0 more strictly (a discovery batch runs this per chunk, references/discovery-intake.md §6).
Modality changes the verb in Phase 3, not the verdict here. The verdicts are identical in both modalities. jira-native: Phase 3 creates
Testwork items for Candidate and Manual only (Deferred is report-only). jira-xray: theTestitems already exist from/sprint-testingStage 1, so Phase 3 selects and promotes the Candidate and Manual ones into the RTP (re-derived canonical title, then labelregression-candidate) and enriches them (rich Gherkin, parameterization, edge elaboration: the "specify much more" pass). Deferred sprint Tests stay unpromoted. Seesprint-testing/SKILL.md§"TC creation timing (modality-aware)".
Phase 3 — Document in TMS
Phase 3 turns the Phase 2 verdicts into TMS artifacts: containers, TCs, links, and the hand-off to the Regression Test Plan. Every ask-first step in this phase (the Regression Epic, the feature TS, the RTP, an artifact owned by someone else, an unmapped slug) follows ## With nobody at the keyboard: unattended, stop before the Jira write and report.
Preflight: Regression Epic
Every documented TC needs a parent Regression Epic, the project's single test repository. That epic is the QA Test Repository process epic (agentic-qa-core/references/defect-management-doctrine.md Part 4). Resolve it found-or-created by the configured name qa.qa_epics.test_repository_epic.name ("QA Test Repository"). When it is absent, create it once, write the test-repository strategy into its description, and cache its key in .agents/project.yaml under qa.qa_epics.test_repository_epic.key. It is a QA process epic, never a product or dev epic and never unparented. The parent only says which QA bucket tracks the Test: product area travels on components (Part 3) and Story coverage on the issue link (Part 4).
Load /acli before running the commands below.
[ISSUE_TRACKER_TOOL] Search Issues:
project: {{PROJECT_KEY}}
query: type = Epic AND summary ~ "QA Test Repository" # resolve by configured name qa.qa_epics.test_repository_epic.name
If none exists, ask the user before creating one named QA Test Repository with labels QA-Artifact, regression (QA-Artifact is the identity label of every QA process epic).
Preflight: Test Sets (ATS mandatory per Story, TS optional feature grouping)
Two Set altitudes, and they are different things:
The ATS (Acceptance Test Set),
ATS: {US_ID}: {story title}, is mandatory per Story, even with a single TC. It holds all the Story's TCs and anchors coverage: the ATS to Storyis tested bylink is what fills the Xray coverage panel (ATP and ATR links do not; seexray-cli/SKILL.md§Direction). It is parented to QA Test Artifacts and inheritscomponentsfrom the Story (the components exemption covers feature-levelTS:only). Phase 3 is Set-first: find-or-create the ATS, add the TCs to it, then derive the ATP's and the Execution's test lists from its membership.The TS (feature-level Test Set),
TS: <EPIC_KEY|module>: Validate <feature>, is optional grouping (smoke, regression or a feature suite), 1:1 with the Epic or module, with optionalcomponentsbecause a feature Set spans modules. Ask the user before creating one; the AI creates it lazily, only when a promotion needs it. Only promoted, regression-worthy Tests (Candidate or Manual) go into it; Deferred sprint Tests do not.Modality jira-xray: resolve or create Sets through
[TMS_TOOL]. Membership is written in Xray (GraphQL) and as one TC to ATStestissue link per TC through[ISSUE_TRACKER_TOOL](../agentic-qa-core/references/traceability-linking.md§9). The ATS to Storyis tested byedge is also a Jira issue link, and it is mandatory.Modality jira-native: with the Test Set work type, create the ATS item and express membership as TC to ATS issue links plus the ATS to Story link. Without it there is no ATS: link each TC to the Story directly with
is tested by(the cascade's last-resort path) and group by feature through the Regression Epic plus a feature or Epic label (epic-<EPIC_KEY>or the feature slug).
Entity model: ATP / ATR / ATS / TC
Five entities. The Story links to its ATS, ATP and ATR ("is tested by"), but only the ATS to Story edge carries coverage; the ATP to Story and ATR to Story links are administrative and contribute zero (xray-cli/SKILL.md §Direction). The ATP designs the TCs (TC "is designed by" ATP) and the ATR executes them (TC "is executed by" ATR). A direct TC to Story link is the cascade's last resort, used when no ATS exists, not the default. The defect is a TC with no path to its Story, not the direct link itself. Full doctrine: agentic-qa-core/references/traceability-linking.md and references/tms-architecture.md.
| Entity | Created | Naming | Main content |
|---|---|---|---|
| US (Story) | Pre-existing | {{PROJECT_KEY}}-{n} |
The requirement |
| ATP | Content pre-sprint in {{jira.acceptance_test_plan}} (shift-left); the Test Plan ITEM by /sprint-testing Stage 1 from that field, or by this phase (find-or-create) when running module-driven and no Story ATP item exists |
ATP: {STORY-KEY}: {story title} |
Test Analysis + AC-to-TC coverage |
| ATR | Stage 1 (or now, if missing) | ATR: {STORY-KEY}: Story Testing |
Test Report + execution results |
| TC | Stage 4 (this phase) | {US_ID}: TC#: should <expected outcome> [<connector> <condition>] [given <precondition>] |
Precondition + Action + Expected |
| ATS | Stage 1 (or now, find-or-create), mandatory per Story | ATS: {US_ID}: {story title} |
All the Story's TCs (even one); the coverage anchor. Components inherited from the Story (mandatory). Parent: QA Test Artifacts. |
| TS (optional) | Lazily in Stage 4 if a promotion needs it (ask first); else pre-existing (async) | TS: {EPIC-KEY\|module}: Validate {feature} |
Optional feature-level grouping (1:1 Epic) of promoted regression Tests. Components optional. Native without the work type: a feature/Epic label, no entity. |
Read references/tms-architecture.md when creating ATP/ATR/TC for a ticket, checking required links, or validating that a story is fully documented.
Linking order (always Set-first)
1. Find-or-create the Story's ATS -> link to US (Story "is tested by" ATS — the coverage-panel link)
2. Find-or-create ATP (pre-sprint content lives in {{jira.acceptance_test_plan}}; the item usually
exists from /sprint-testing Stage 1 — create here only when module-driven and no ATP item exists)
-> link to US (Story "is tested by" ATP — administrative, no coverage)
3. Create ATR -> link to US (Story "is tested by" ATR — administrative, no coverage)
4. Update ATP -> link to ATR (bidirectional plan/results)
5. For each TC:
Create TC -> add to the ATS (TC->ATS issue link in both modalities; jira-xray also
writes the Xray-internal membership)
-> link to ATP (TC "is designed by" ATP) + ATR (TC "is executed by" ATR)
# Do NOT link the TC directly to the Story when an ATS exists — TCs aggregate via the ATS.
# Direct TC->Story is the cascade's LAST RESORT (no ATS available — e.g. jira-native
# without the Test Set work type). The defect is a TC with NO path, not the direct link.
# AC coverage is recorded in the ATP's AC-to-TC matrix, not as a Story<->TC issuelink.
6. Derive the ATP's and the ATR's test lists FROM the ATS membership (Set-first: the ATS holds
ALL the Story's TCs; Plan and Execution consume that list).
7. For each PROMOTED (regression-worthy) TC:
FIRST -> re-derive the canonical title and, if the live summary differs, rewrite it
([ISSUE_TRACKER_TOOL] Update Issue — summary is a Jira field, not an Xray one),
THEN verify it matches before anything else touches the TC (see §"Title on
promotion"). A wrongly-titled TC must never reach the RTP or carry the label.
jira-xray -> [TMS_TOOL] add TC to the OPTIONAL feature TS (resolve/create per Preflight) + [TMS_TOOL] add to the RTP
+ [ISSUE_TRACKER_TOOL] label `regression-candidate` (labels are a Jira field; xray-cli has no update-label for existing Tests)
jira-native -> [ISSUE_TRACKER_TOOL] apply the feature/Epic label (or add to a feature TS item when the work type exists)
Every artifact this skill creates carries assignee set to the authenticated session user at create time: the RTP, the ATS, the optional feature TS, every Test and every Precondition (agentic-qa-core/references/artifact-lifecycle.md §2). Xray refuses membership edits on a Test Plan the caller does not own, so an unassigned RTP blocks promotions long after the Plan exists. If find-or-create returns an artifact owned by someone else, ask the user before reassigning it.
Plan and Set lifecycle (agentic-qa-core/references/artifact-lifecycle.md §1):
| Artifact | Born | This skill moves it to | Then |
|---|---|---|---|
| RTP (Regression Test Plan) | {{jira.status.test_plan.planning}} |
{{jira.status.test_plan.ready}} via {{jira.transition.test_plan.designed}} on the first promotion |
stays ready forever, because the RTP is long-lived. Never fire {{jira.transition.test_plan.complete}} on it |
| ATS (per-Story Set) | {{jira.status.test_set.designing}} |
closed by /sprint-testing Reporting, not here |
none |
| TS (optional feature Set) | {{jira.status.test_set.designing}} |
stays designing for the life of the feature |
{{jira.transition.test_set.done}} only when its Epic closes |
| Precondition | {{jira.status.precondition.active}} |
nothing: the workflow has no transition out of active |
stays active; that is correct, not a gap |
Per-operation tool resolution and the Gherkin-enrichment CLI gap are in references/jira-test-management.md §"Stage-4 promote + enrich — tool resolution map". Load /xray-cli for command syntax.
Where candidates go: the RTP handoff
This is the procedure for getting Phase 2 Candidates into the general regression suite, and it is the last thing Phase 3 does.
- Find-or-create the project's Regression Test Plan (RTP): one long-lived
Test Planitem per project, titledRTP: {PROJECT_KEY|module}: Regression Test Plan, parented to the QA Master Test Plan epic,assigneeset to self at create time (see the lifecycle table above). Ask the user before creating it, as with the Regression Epic. - Every
CandidateTC lands in it: title re-derived and verified (§"Title on promotion"), thenregression-candidateapplied, then added to the RTP.ManualTCs go to the manual regression suite, which under jira-xray is the same RTP, told apart by themanual-onlylabel and the{{jira.status.test_case.manual}}status.DeferredTCs never enter it; that is the point of the verdict. - The RTP moves to
{{jira.status.test_plan.ready}}on the first promotion and stays there: a regression run never completes the plan it ran from. - Downstream consumers read the RTP, not this session.
/test-automationpicks up the TCs at{{jira.status.test_case.candidate}}carryingregression-candidate;/regression-testingruns the RTP's membership into an RTR (testPlanis the RTP); an STR exists only at sprint close. Neither reads.context/reports/, since both report files are[LOCAL]. A Candidate that is not in the RTP does not exist downstream.
Grouping Candidates into e2e regression flows
The same authentication or checkout TC is consumed by several end-to-end journeys, and that reuse is what the Component value bonus (§Phase 2) scores. Group the Candidates explicitly, at the altitude /test-automation will use.
- One group is one e2e flow, a user journey that a spec file runs end to end, named for the journey and not the module:
Checkout — guest purchase, notCheckout tests. - A TC reused by 2+ flows is an atomic component. In KATA terms it becomes a Steps module instead of being duplicated per flow (
test-automation/references/kata-architecture.md). Name it once, list it under every flow that consumes it, and let theNin the Component value bonus equal that count. - Record the grouping in two places. The durable copy is the RTP description, as a
## Regression flowssection listing each flow with its member TC keys, readable by/test-automationand/regression-testingwithout this session. The local copy is a flow column inCOVERAGE-MATRIX-<scope>.md, beside the AC, scenario, TC and verdict grid. - A Candidate that belongs to no flow is a smell, not a category: either it is an atomic component (say which flows consume it) or its journey was never identified. Surface it instead of filing it under a catch-all.
Creating TCs: modality matrix
| TMS stack | Manual test | Automation-candidate test |
|---|---|---|
| Xray on Jira | Two-step (Xray Cloud |
Files (agentic-qa-boilerplate)
-
evals
-
evals.json 3.9 KB
Loading…
-
-
references
-
discovery-intake.md 7.3 KB
Loading… -
jira-setup.md 10.6 KB
Loading… -
jira-test-management.md 37.8 KB
Loading… -
post-promotion-pass.md 4 KB
Loading… -
repair-traceability.md 7.7 KB
Loading… -
tms-architecture.md 50 KB
Loading… -
tms-conventions.md 41.2 KB
Loading… -
xray-platform.md 16.2 KB
Loading…
-
-
SKILL.md 92.2 KB
--- name: test-documentation description: "Document already-validated tests in the TMS: ROI verdicts, TCs, ATP and ATR. Use when documenting test cases or deciding what to automate; repairing broken Story-ATS-ATP-ATR-TC traceability (repair-traceability); running the post-promotion merged pass. Not for test code (test-automation) or running suites (regression-testing)." license: MIT compatibility: [claude-code, copilot, cursor, codex, opencode, pi] complementary_categories: [tms, issue-tracker] metadata: kind: workflow stage_owner: true # compact_rules is consumed verbatim by scripts/build-skill-registry.ts (frontmatter first, # no truncation). It is the registry digest of the body's Compact Rules and Phase 3 rules. compact_rules: | - An AC-to-TC map is the floor: at least one TC per AC is a minimum, never a target. Coverage is AC conformance plus risk beyond the AC, so the set includes the boundary, negative, state and anomaly cases the AC is silent on. Canon: `agentic-qa-core/references/test-design-doctrine.md`. - 1:N applies to derivation, not to the regression repository. Only regression-worthy scenarios (Candidate or Manual) are persisted; most are Deferred. jira-native: Stage 4 creates `Test`s for those only (Deferred is report-only). jira-xray: Stage 1 already made the sprint `Test`s, so Stage 4 promotes the regression-worthy ones into the Test Plan and enriches them. Document because it will be re-run, never to hit a count. - Techniques by trigger: EP always; BVA for a range, limit, length or date window; State-Transition for stateful entities; Decision Table when 2+ conditions interact; Pairwise when 3+ factors combine. - Parametrize: same-behavior data variants are ONE Test (`Scenario Outline` + `Examples` rows) per partition. Split only when action, outcome, status or state differs. Canon: doctrine §"Part 2.5". - Cross-cutting characteristics (XSS, perf, a11y) deferred to app-level suites are an explicit handoff: name the receiving suite or file the gap. - Document already-validated behavior only (discovery-driven: `oracle: confirmed`). Exploration belongs to `/sprint-testing` and `/exploratory-testing`. - TC identity is Precondition + Action + verifiable outcome. Naming: `{US_ID}: TC#: should <expected outcome> [<connector> <condition>] [given <precondition>]`; `Validate <feature>` is reserved for the grouping layer. Reject `"Login test"`, `"Login - error"`, `"TC1: Test form"`. - ROI gives each TC one verdict: Candidate (feeds test-automation), Manual, Deferred. Prioritize by risk. - No ROI verdict while a scenario is `oracle: observed`: it needs a person's answer to "is this intended?" first (decision-protocol kind 1). Canon: `agentic-qa-core/references/discovery-driven-doctrine.md` §4. - A Candidate or Manual verdict is fired only after a person signs it (a batch through the `mkd` deck, one verdict through the question tool). The ROI comment then carries `Verdict signed: <who>, <where>, <when>` with a checkable `<where>`, the line the TC source gate of `/test-automation` reads. Only an attended session writes it; a subagent, worker or routine lists verdicts as pending. Format: `references/tms-conventions.md` §9. - Discovery intake (`references/discovery-intake.md`): a COVERED candidate is dropped with a line, a WEAK one becomes a strengthen proposal for the existing test (never a new Test), a NEW one runs the full pipeline anchored to its coverage Tech Story. The >50% alarm is computed per chunk. - `PASSED` or `FAILED` only from a run observed in the environment the TC's precondition names, else `NOT RUN` with its reason (doctrine §5). `automated` (`merged`) only once the spec is on the production branch, through mode `post-promotion` (doctrine §6). - Cardinality: US to TC is 1:N; AC to TC is N:1 or N:M. Resolve the TMS modality (Xray or Jira-native) in Phase 0 first. - Mode from `$ARGUMENTS`: a first token matching a mode in Mode routing (`repair-traceability`, `post-promotion`, `document`) is the mode and the rest is forwarded. Otherwise `document` for plain documentation work; ask when it could be either. - Bug-driven (golden rule): a regression-worthy bug must end with a Test. Reuse the existing failed Test if the bug came from one, else create one (both modalities). A non-qualifying bug is treated like a failed test: Deferred, no new Test. - The ATS is mandatory per Story (`ATS: {US_ID}: {story title}`, even with one TC): a `Test Set` holding all the Story's TCs, parented to the QA Test Artifacts epic, with `components` inherited from the Story. Components are mandatory here; the exemption covers only the optional feature-level `TS:` sets. - Create sets first: find or create the ATS, ATP and ATR before the first TC (module-driven pre-creates them because parallel TC sharding needs the targets). Add each TC to the ATS, then derive the ATP's and the Execution's test lists from the ATS membership, never three independent id lists. - Coverage truth (`xray-cli/SKILL.md` §Direction): coverage comes from the ATS-to-Story `is tested by` link (primary) or a direct TC-to-Story link (last resort, only when no ATS can exist). Story-to-ATP and Story-to-ATR links are administrative and contribute zero coverage: keep them, never count them. - Membership: TC in ATS is always a TC-to-ATS `test` issue link, in both modalities (never in the TC title). jira-xray also writes the Xray-internal membership (GraphQL, via `/xray-cli`), never instead. TC in ATP and TC in ATR stay Xray-internal. Test Set work type absent means no ATS (canon: `../agentic-qa-core/references/traceability-linking.md` §9). - Direct TC-to-Story links are the last resort (only when no ATS can exist, such as jira-native without the Test Set work type), not the default. The defect is a TC with no path to its Story, not the direct link itself. --- ## Forbidden invocations Never invoke `/sdd-*` skills from this workflow: SDD is an optional ceremony users install themselves, and this skill is self-contained. To change KATA, fixtures, `cli/`, `scripts/` or the `api/schemas/` pipeline, leave this skill and use `/framework-development` (it runs Plan, Code, Verify, Archive on its own). `scripts/lint-skills.ts` rejects any `/sdd-` mention outside this section; `.agents/skills/agentic-qa-core/references/skill-composition-strategy.md` §4 governs users who install SDD manually. # Test Documentation: QA Bridge Formalize already-validated tests in the TMS (Jira, Xray or equivalent) with full traceability, the right priority and a clear automation verdict, in three phases: Analyze, Prioritize (ROI), Document. Prioritizing is not optional, because most scenarios should end up Deferred, not automated. One prerequisite: the tests describe behavior that is already validated ({{jira.status.story.qa_approved}} story, closed bug or finished exploratory session). The TMS protects regression; it is not an exploration tool. --- ## Dependencies Requires `agentic-qa-core`. Loads on demand: - `agentic-qa-core/references/test-design-doctrine.md`: read before deriving TCs from acceptance criteria. It governs the 1:N TC explosion, the formal-technique triggers and the floor-not-ceiling coverage model. - `agentic-qa-core/references/defect-management-doctrine.md`: read before parenting a Test or raising an Improvement. It governs QA process-epic parenting (every `Test` hangs from the **QA Test Repository** epic, Part 4), the mandatory `components` axis (Part 3) and the Improvement bridge for under-specified ACs (Part 1). This skill files no Bugs. - `agentic-qa-core/references/briefing-template.md`, `agentic-qa-core/references/dispatch-patterns.md`, `agentic-qa-core/references/orchestration-doctrine.md`, `agentic-qa-core/references/session-management.md`, `agentic-qa-core/references/preflight-gate.md`, `agentic-qa-core/references/traceability-linking.md`: cited inline by the sections that use them. ## Compact Rules **Test-design doctrine (binding, full canon in `agentic-qa-core/references/test-design-doctrine.md`):** - An AC-to-TC map is the floor: at least one TC per AC is a minimum, never a target. Coverage is AC conformance plus risk beyond the AC, so the set includes the boundary, negative, state and anomaly cases the AC is silent on. - 1:N applies to derivation, not to the regression repository. Only regression-worthy scenarios (Candidate or Manual) are persisted; most are Deferred. jira-native: Stage 4 creates `Test`s for those only (Deferred is report-only). jira-xray: Stage 1 already made the sprint `Test`s, so Stage 4 promotes the regression-worthy ones into the Test Plan and enriches them. Document because it will be re-run, never to hit a count. - Techniques by trigger: EP always; BVA for a range, limit, length or date window; State-Transition for stateful entities; Decision Table when 2+ conditions interact; Pairwise when 3+ factors combine. - Parametrize: same-behavior data variants are ONE Test (`Scenario Outline` + `Examples` rows) per partition. Split only when action, outcome, status or state differs. Canon: doctrine §"Part 2.5". - Cross-cutting characteristics (XSS, perf, a11y) deferred to app-level suites are an explicit handoff: name the receiving suite or file the gap. **Test-documentation operational rules:** - Document already-validated behavior only (discovery-driven: `oracle: confirmed`). Exploration belongs to `/sprint-testing` per ticket and `/exploratory-testing` per module, flow or sweep. - TC identity is Precondition + Action + verifiable outcome. Naming: `{US_ID}: TC#: should <expected outcome> [<connector> <condition>] [given <precondition>]`; `Validate <feature>` is reserved for the grouping layer (Test Set summary or `describe()`). Reject `"Login test"`, `"Login - error"`, `"TC1: Test form"`. - ROI gives each TC one verdict: Candidate (feeds test-automation), Manual, Deferred. Prioritize by risk. - No ROI verdict while a scenario is `oracle: observed`: it needs a person's answer to "is this intended?" first (decision-protocol kind 1). Canon: `agentic-qa-core/references/discovery-driven-doctrine.md` §4. - A Candidate or Manual verdict is fired only after a person signs it (a batch through the `mkd` deck, one verdict through the question tool). The ROI comment then carries `Verdict signed: <who>, <where>, <when>` with a checkable `<where>` (the person's own comment id, or the saved mkd result or decision record path), the line the TC source gate of `/test-automation` reads. Only an attended session writes it; a subagent, worker or routine lists verdicts as pending. Format and the sign-only pass: `references/tms-conventions.md` §9. - Discovery intake (`references/discovery-intake.md`): COVERED is dropped with a line, WEAK becomes a strengthen proposal (never a new Test), NEW runs the full pipeline anchored to its coverage Tech Story; the >50% alarm is per chunk. - `PASSED` or `FAILED` only from a run observed in the environment the TC's precondition names, else `NOT RUN` with its reason (doctrine §5). `automated` (`merged`) only once the spec is on the production branch, through mode `post-promotion` (doctrine §6). - Cardinality: US to TC is 1:N; AC to TC is N:1 or N:M. Resolve the TMS modality in Phase 0 first. The mode comes from `$ARGUMENTS` (Mode routing). - Bug-driven (golden rule): a regression-worthy bug must end with a Test. Reuse the existing failed Test if the bug came from one, else create one (both modalities). A non-qualifying bug is treated like a failed test: Deferred, no new Test. **Read full SKILL.md when**: resolving TMS modality, computing ROI, writing Gherkin, or wiring US-ATP-ATR-TC traceability links. --- ## Mode routing Resolve the mode before the readiness preflight and Phase -1. When the first token of `$ARGUMENTS` matches a mode below, that token is the mode and the rest goes to it unchanged (`/test-documentation repair-traceability UPEX-123`). Without a match, plain documentation work runs the default mode, and an ambiguous request gets a question. - `repair-traceability`: selected only by a first token `repair-traceability`, the `fix-traceability` trigger phrase, or an explicit request to repair a ticket's existing traceability. Load only `references/repair-traceability.md`. Its sequence is sealed: audit, present the plan, get explicit user approval, apply, verify. Do not start Analyze, Prioritize, Document, create unrelated test cases, or widen the ticket scope. - `post-promotion`: selected by a first token `post-promotion`, by the hand-off `/git-flow-master` sends when a promotion lands ("run the post-promotion `merged` pass"), or by an explicit request for that pass. Load only `references/post-promotion-pass.md`. It fires `merged` on TCs whose spec is on the production branch and touches nothing else (no Analyze, no ROI, no new Test). - `document` (default): normal TMS documentation, ROI, and Candidate, Manual and Deferred work. Continue with the workflow below. If the user has not supplied the ticket key `repair-traceability` needs, ask for it before any TMS call. Missing credentials remain a hard stop under `AGENTS.md` Critical Rule #10. > `repair-traceability` on one ticket cannot see the failure that matters most. Coverage-link direction is a project-wide condition: an inverted link is invisible on its own Story (the link is there, the coverage panel is just empty, and nothing reports it) and only shows as a pattern in aggregate. On one measured project roughly half the linked Stories were wired the wrong way (ADR-0006). So when the mode audits a ticket, also offer the project-wide mixed-direction sweep before applying anything: the `[TMS_TOOL]` traceability check accepts several keys or a JQL query and returns one repair worklist. Direction doctrine, the delete-before-recreate rule (Jira dedupes the pair and type, so adding the corrected link is a silent no-op) and the sweep are canon in `agentic-qa-core/references/traceability-linking.md` §4 and §10. Read them first; the plan the user approves says which links get deleted, by id. --- ## Subagent Dispatch Strategy > **Orchestration & Session contracts**: this skill follows `agentic-qa-core/references/orchestration-doctrine.md` (mandatory subagent dispatch — main thread is command center) AND `agentic-qa-core/references/session-management.md` (Phase 0 resume check, plan-first persistence at `.session/<skill-slug>/<scope>/`, archive on completion). Phase 0 (resume check) and Phase 1 (plan write) are NOT optional. The orchestrator also applies the per-stage **Definition-of-Done gates** in `agentic-qa-core/references/stage-gates.md`: verify a stage's DoD (planning stages include the Test-Design Checklist) BEFORE recording its progress checkpoint and advancing. This skill is per-scope. `<scope>` is `<JIRA-KEY>` (ticket or bug scope, or the coverage Tech Story of a discovery-driven gap), `<module-slug>` (module scope, or a per-module discovery-driven scope) or `<YYYY-MM-DD>-adhoc` (ad-hoc scope); names are canonical in `agentic-qa-core/references/discovery-driven-doctrine.md` §2. Session state lives at `.session/test-documentation/<scope>/{plan.md, progress.md}` per `agentic-qa-core/references/session-management.md` §3 and §9. Phase -1 (session resume) runs first, then Phase 0 (TMS modality), then the pipeline. Every dispatch follows the 7-component briefing in `.agents/skills/agentic-qa-core/references/briefing-template.md` (doctrine: `AGENTS.md` §3 "Orchestration Mode"), and the pattern per phase follows `.agents/skills/agentic-qa-core/references/dispatch-patterns.md`; the session contract is `.agents/skills/agentic-qa-core/references/session-management.md`. Phase 1 and Phase 2 stay inline because planning and decisions live in the orchestrator; bulk TC creation in Phase 3 is the only parallel hotspot and the only step that branches per TMS modality. | Phase | Pattern | Subagent role | |--------------------------------------------------------|------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| | Phase -1: Session resume check | inline | orchestrator only; reads `.session/test-documentation/<scope>/progress.md` if present, offers resume / restart / abort per `agentic-qa-core/references/session-management.md` §4 | | Phase 0: Resolve TMS modality | inline | orchestrator only; the 3-step probe in §Phase 0 | | Phase 1: Analyze scope | Single | inline; planning lives in the orchestrator (delegating it is an anti-pattern) | | Phase 2: ROI / Candidate-Manual-Deferred verdict | Single | inline; decisions live in the orchestrator | | Phase 3: TMS TC creation (N > 10 TCs) | Parallel | M subagents, chunks of ~5-10 TCs per agent; cap = 10 to avoid Jira/Xray rate limits; each subagent loads `/xray-cli` (Modality jira-xray) or `/acli` (Modality jira-native) | | Phase 3: TMS TC creation (N ≤ 10 TCs) | Single | inline; dispatch overhead is not justified for small batches | | Phase 3: Traceability linking (US <-> ATS/ATP/ATR <-> TCs) | Single | inline; it needs the aggregated state of all created entities | | Phase 3: Final report / reports (`COVERAGE-MATRIX-<scope>.md`, `PRIORITIZATION-<scope>.md`) | Single | inline; synthesis lives in the orchestrator | - Concurrency cap is 10 subagents for Parallel TC creation: Jira and Xray both rate-limit at about 10 writes per second sustained, and wider fan-out triggers 429 responses. A module with more than 100 TCs gets chunks larger than 10 per subagent (the cap is on subagent count, not chunk size). - Error protocol: on any subagent failure, stop and report the partial state (which TCs landed, which failed, with issue keys and errors), then present retry, skip and abort. Do not auto-fix or auto-rollback (see `.agents/skills/agentic-qa-core/references/orchestration-doctrine.md`). A skill that itself broke (a wrong step, a missing verifier, a stale rule) is reported upstream per `../agentic-qa-core/references/upstream-feedback.md`: drafted and redacted locally, filed only on explicit OK, verified with `gh issue view`. --- ## With nobody at the keyboard A supervised worker sends each question below to its conductor or launcher, which holds the gate. A routine takes the delegating brief as the approval when the brief covers the decision (`agentic-qa-core/references/decision-protocol.md`). Otherwise do the reversible work (analysis, the local plan, the reports), stop before any Jira or Xray write, and report what is waiting. | Gate | With nobody present | |---|---| | Readiness preflight checklist | Self-fix only what the brief allows; a blocking RED stops the run and goes in the report. | | Phase -1 resume, restart or abort | Resume. Restart archives the old session and abort drops it, so each needs the brief's word. | | Ambiguous mode, missing ticket key | Stop and report; no TMS call without the key. | | Phase 0 modality unsettled by config and evidence | Fail closed: no TMS write, report. | | `repair-traceability` plan approval, project-wide sweep | Write the plan and stop; applying needs the approval. | | ROI verdict signature, `oracle: observed` scenarios | List the verdicts as pending. | Questions inside Phase 3 follow the same rule. --- ## Readiness Preflight Gate (MANDATORY — runs before Phase -1) > Full doctrine: `agentic-qa-core/references/preflight-gate.md`. The gate runs before the resume check and the TMS-modality gate. Two laws: args are answers (the scope and any stated modality are provided, so ask only the gaps) and probe, don't assume. Surface gaps and REDs as ONE `AskUserQuestion` checklist, self-fix with approval and explanation, and stop on any blocking RED. This skill documents already-validated behavior and never executes against a live system, so its gate centers on TMS write capability. The generic baseline (env resolution, test-user creds, secret and restart handling, output contract) is in the reference §3.1; below is only this skill's capability delta. | Capability | Need | Why here | |---|---|---| | Issue-tracker (`[ISSUE_TRACKER_TOOL]`) | REQUIRED | TC / ATP / ATR creation, linking, transitions. Load `/acli`; validate via `bun run jira:check`. | | TMS modality + `[TMS_TOOL]` | REQUIRED | The whole Phase 0 gate. jira-xray: `/xray-cli` loaded, `XRAY_*` creds set and the Xray API answering (evidence, never work types alone). jira-native: `/acli` covers it. Resolve before Phase 1; ask only if all auto-checks fail. | | Source repos readable | OPTIONAL | Phase 1 source-code validation reads backend and frontend code, not a running env, so no live-env or DB/API/browser probe is needed. | Active env, test-user creds, DBHub, OpenAPI / API token, Playwright, `resend` and `kata-manifest.json` (owned by `/test-automation`) are N/A: documentation never hits a live system and writes no test code. When every REQUIRED row is GREEN, continue to Phase -1. --- ## Phase -1 — Session resume check (MANDATORY, inline) Runs before Phase 0 (the TMS modality gate). Compute the prospective `<scope>` from the invocation: `<JIRA-KEY>` for ticket or bug scope (and the coverage Tech Story of a discovery-driven gap), `<module-slug>` for module scope (and a per-module discovery-driven scope), `<YYYY-MM-DD>-adhoc` for ad-hoc. Then: 1. Check `.session/test-documentation/<scope>/progress.md`. 2. If it does not exist, proceed to Phase 0 (TMS modality). 3. If it exists: - Read `plan.md` (chosen scope, TMS modality, TC list, ROI verdicts). - Read the tail of `progress.md` (last completed phase and next planned phase). - Tell the user the scope, TMS modality, last completed phase, next phase, and any TC creation chunks that did not finish (the most common interruption point: the Phase 3 parallel bulk create, capped at 10 subagents). - Offer **resume / restart / abort**. On `restart`, archive to `.session/.archive/<YYYY-MM-DD>-test-documentation-<scope>-aborted/` first. The critical resume case is a Phase 3 parallel bulk create interrupted mid-batch. `progress.md` records one entry per returned Parallel subagent, so resume reads the chunks marked `completed` and dispatches only the missing ones (see Phase 3). --- ## Phase 0 — Resolve TMS modality (mandatory gate) Every project runs in one of two modalities. Resolve it **before** Phase 1. The same ATP/ATR/TC concepts have **different containers** in each mode. ### The question to answer first ``` Does this project have Xray installed and licensed on Jira? A. Yes -> Modality jira-xray B. No -> Modality jira-native (no Xray) ``` ### How to resolve it without asking (in order) 1. Resolve `{{TMS_CLI}}` (`testing.tms_cli` in `.agents/project.yaml`). Value `bun xray` (or any Xray CLI) means a **candidate** jira-xray, confirmed in step 2. Value unset, `acli`-only, or `{{TMS_CLI}}` matching `{{ISSUE_TRACKER_CLI}}` means **Modality jira-native**. 2. Confirm Xray by **evidence**: the Xray API answers through `[TMS_TOOL]` (`/xray-cli`: its auth status check, then one read against the project). If it answers, the modality is **jira-xray**. Work types alone never decide: `Test Plan` / `Test Execution` / `Test Set` / `Pre-Condition` also exist as native Jira work types on jira-native instances (the table below uses them there "by excellence"), so their presence proves nothing about Xray. **Fail closed**: no answer from the Xray API means never assume jira-xray. When step 1 named an Xray CLI, that is a tool or credential failure: stop per Critical Rule #10 and name the `XRAY_*` variables. 3. **Only if neither the config nor the evidence settles it**, ask the user the question above. Do not ask by default: autoresolve first. ### What changes per modality | Artifact | Modality jira-xray | Modality jira-native | |----------|---------------------------|---------------------------| | **ATP** (Acceptance Test Plan) | `Test Plan` issue titled `ATP: {STORY-KEY}: {story title}`, parented to the **QA Master Test Plan** epic, linked to the US | Same `Test Plan` issue **by excellence** (native Jira work type, Xray-independent); falls back to the Story `{{jira.acceptance_test_plan}}` field (then a `## Acceptance Test Plan (ATP)` comment) **only when the Test Plan work type is absent** from the instance. | | **ATR** (Acceptance Test Results) | `Test Execution` issue with Test Runs per TC, Environment, Begin/End Date, titled `ATR: {STORY-KEY}: Story Testing`, parented to the **QA Test Artifacts** epic | Same `Test Execution` issue **by excellence**; falls back to the Story `{{jira.acceptance_test_results}}` field (then a `## Acceptance Test Results (ATR)` comment) **only when the Test Execution work type is absent** from the instance. | | **TC** (Test Case) | Xray `Test` issue (type Manual / Cucumber / Generic) | Jira-native `Test` issue type (or `Task` with custom type), Description carries the full TC template | | **ATS** (Acceptance Test Set) | `Test Set` issue titled `ATS: {US_ID}: {story title}`, mandatory per Story; holds ALL the Story's TCs (membership = TC→ATS issue links + the Xray-internal membership), linked to the US (`is tested by`, the coverage-panel link) | Same `Test Set` issue **when the work type is present**; membership expressed as the same **TC→ATS issue links**. Work type absent means **no ATS**: direct TC→Story links (cascade last resort) | | **TS / Precondition / Test Plan** | First-class Xray issue types (`TS:` feature Set is optional grouping) | Same native work types when present in the instance; absent, use labels + Epic grouping | | **Result sync** | CI imports JUnit/Cucumber via `[TMS_TOOL] Import Results`, and Test Runs update automatically | Custom script updates Test Status field on each TC + comment with build context | | **CLI tag** | `[TMS_TOOL]` resolves to `bun xray` or equivalent | `[TMS_TOOL]` falls through to `[ISSUE_TRACKER_TOOL]` (acli / Jira MCP) | ### Resolve `{{TC_CREATION_STAGE}}` in the same gate The modality says which TMS tool is live. `testing.tc_creation_stage` in `.agents/project.yaml` (referenced as `{{TC_CREATION_STAGE}}`) says **whether this skill creates the Candidate/Manual `Test` items or refines and promotes ones `/sprint-testing` already made**. Read it here, alongside the modality; unset or unrecognized means `auto`. The knob's full table and rationale are in `sprint-testing/SKILL.md` §"Which stage creates the TCs", which is authoritative; this section only consumes it. | Resolved value | Phase 3's verb for a Candidate / Manual scenario | |---|---| | `auto` (default) | jira-xray: **promote + enrich** an existing sprint `Test` · jira-native: **create** the `Test` here | | `sprint-testing` | **promote + enrich** in BOTH modalities; the items already exist, and creating a second one duplicates the repository | | `test-documentation` | **create** in BOTH modalities; no sprint items exist to promote | Whatever the verb, the title rule is identical: a created TC is titled to the form, and a promoted TC has its title re-derived and verified first (§"Title on promotion"). If the verb says promote but no sprint `Test` exists for a scenario (a Story tested before the knob was set, or a scenario derived only now), create it and note that in `progress.md`. Never skip the TC. ### Persist the decision Once resolved, save the modality **and the resolved `{{TC_CREATION_STAGE}}`** into `.session/test-documentation/<scope>/plan.md` §Inputs (the canonical session record) and also mirror it to `test-session-memory.md` for the ticket (if one exists, for per-ticket sub-agent context). Treat it as sticky: do not re-resolve mid-session. If you detect drift (for example `[TMS_TOOL]` suddenly fails), stop and ask the user before re-resolving. Reference implementations: - Modality jira-xray concepts + Xray REST/GraphQL/CLI: `references/xray-platform.md` - Modality jira-native project setup (Test issue type, Screen Scheme, custom fields): `references/jira-setup.md` - Both modes side by side (field mapping, workflow, Description template): `references/jira-test-management.md` --- ## When to use each scope Pick the scope from the input, not the output. All scopes share the Analyze, Prioritize, Document pipeline; only the input source and the defaults differ. Names, origins and granularity are canonical in `agentic-qa-core/references/discovery-driven-doctrine.md` §2; this table is the subset this skill accepts. | Scope | Input | Typical volume | Default labels | Notes | |-------|-------|----------------|----------------|-------| | **Module-driven** | A module of the system explored end to end | 20-100+ scenarios | `regression`, `e2e` or `integration` | Batch of TCs grouped under the Regression Epic. Most scenarios end up Deferred. | | **Ticket-driven** | A QA Approved user story from a sprint | 3-8 scenarios | `regression`, plus the test type | Output of a `sprint-testing` session. ATP/ATR created per US. | | **Bug-driven** | A closed bug with a verified fix | 0-2 scenarios | `regression`, `automation-candidate` (usually) | Run the Bug-driven decision below. ROI biased up: "it failed once, it can fail again." | | **Ad-hoc / Exploratory** | New scenarios found in exploratory testing | 1-10 scenarios | `regression` | Apply the 3 Phase-0 questions harshly; ad-hoc scenarios are often one-time validations. Gate 0 holds for every scenario that carries an oracle line. A set with no coverable creates no Test: a round whose anchor is NONE proposes the coverage Tech Story first (`agentic-qa-core/references/discovery-driven-doctrine.md` §2.1, §3), and intake runs as `discovery-driven` once it exists. | | **Discovery-driven** | A coverage gap with no Story, anchored to a coverage Tech Story; only scenarios a person confirmed (`oracle: confirmed`) are scored | 1-10 per gap, 20-100+ per module | `regression`, plus the test type | Gate 0 below: an `oracle: observed` scenario gets no ROI verdict (`agentic-qa-core/references/discovery-driven-doctrine.md` §4). TCs use the Tech Story key as `{US_ID}` (§3 of the same file). Scored one anchor at a time (`references/discovery-intake.md` §6). | A story ID means ticket-driven, a bug ID means bug-driven, a coverage Tech Story means discovery-driven, and a module name or a session output means module- or ad-hoc accordingly. ### Bug-driven decision: "an important bug must have a test" (golden rule) Not every bug becomes a regression Test: a one-time typo in a stable area is treated like a failed test (the fix was verified in sprint-testing) and Deferred. Run the same analysis and prioritization as for any scenario; a regression-worthy bug must end with a Test that covers it, in BOTH modalities. ``` 1. Is this Bug/Defect a regression candidate? (apply Phase-0 filter + ROI; the prior-bug rule biases up) NO -> No new Test. Treat as a failed test: fix already verified in sprint-testing -> log as Deferred. Done. YES -> step 2. 2. Was the bug found FROM an existing, already-executed Test? (a Test that ran and failed — jira-native OR xray) YES -> REUSE that existing Test for the bug's retest + regression. It already lives in the test set; ensure it is linked to the bug (`tests / is tested by`) and promoted into regression. Do NOT duplicate. NO -> CREATE + design the corresponding Test for the bug's retest. jira-native: new `Test` issue. jira-xray: new Xray `Test` (+ plugin-appropriate Test Plan / Test Set linking). Link to the bug via `tests / is tested by`. ``` This overrides the sprint-testing phrase "the bug is the test case", which covers only the in-sprint retest. The retest verifies the fix now; this rule decides whether a persistent Test must exist so the bug cannot silently return. **Scope handoff to `/test-automation`.** `Candidate` TCs flow to `/test-automation`, which plans them under the same scope names and sizes each work package (`agentic-qa-core/references/discovery-driven-doctrine.md` §2): `module-driven` is Macro, `ticket-driven` Medium, `bug-driven` Micro, `discovery-driven` Macro per module and Medium or Micro per gap. `ad-hoc / exploratory` Candidates enter under whichever fits (a module batch, or a Micro package for a single TC). `Manual` and `Deferred` verdicts are terminal and never reach automation. After the scope is confirmed, write `.session/test-documentation/<scope>/plan.md` per `agentic-qa-core/references/session-management.md` §6. It holds: - Goal: scope, TMS modality, expected TC count. - Inputs: PBI references, ATP source, prior bugs. - Approach: the per-phase dispatch table above. - Phase breakdown: Phase 1 Analyze, Phase 2 Prioritize, Phase 3 TC creation with its chunk count, Traceability, Final report. - Risks, and a verification checklist (all TCs created with traceability, both reports written, the Deferred list mirrored to Jira). - Cross-references: `.context/PBI/epics/EPIC-<KEY>-<slug>/stories/STORY-<KEY>-<slug>/test-cases/*.md` per-TC files, `.context/reports/COVERAGE-MATRIX-<scope>.md` and `.context/reports/PRIORITIZATION-<scope>.md` (filenames per §"Reports: fixed filenames"). Then append `## Phase -1 — Session resume check — <ts>` with `status: completed` and `next: Phase 0 — Resolve TMS modality` to `progress.md`. --- ## Phase 1 — Analyze ### Inputs to gather | Source | What to read | Why | |--------|--------------|-----| | User Story / Epic | Description, ACs, comments, linked issues | Scenario identification, risk signals | | Closed bugs linked to the story | Summary, root cause, fix area | Prior-bug prioritization rule | | Exploratory session notes | Validated scenarios, observations; from `/exploratory-testing`, its `candidate-scenarios.md` (marks and scoring rules: `references/discovery-intake.md`; only `oracle: confirmed` ones are scored) | Reuse nomenclature already used; never re-document a `COVERED` candidate | | Coverage gap list | `.session/project-context/coverage/gap-list.json` (`project-context` mode `coverage`): behaviours by bucket, each with its coverage Tech Story; same marks and fail-closed reads (`references/discovery-intake.md`) | Discovery-driven work list in risk order; never a Test without its anchor | | Existing ATP (if present), **modality-aware** (see §Phase 0) | **jira-native**: Story field `{{jira.acceptance_test_plan}}`, synced to `.context/PBI/epics/EPIC-<KEY>-<slug>/stories/STORY-<KEY>-<slug>/acceptance-test-plan.md` (read-only Jira cache; sync via `bun run jira:sync-issues get <STORY> --include-comments`). **jira-xray**: Test Plan issue `description` via `bun run jira:sync-issues get <ATP_KEY>`, synced to `test-plans/ATP-<KEY>-<slug>.md` (a non-conforming title keeps the legacy `TESTPLAN-` / `TESTEXEC-` / `RETESTEXEC-` prefix); per-TC run state via `[TMS_TOOL]` (xray-cli) | Scenarios may already exist; do not reinvent | | Existing ATR (if present), **modality-aware** (see §Phase 0) | **jira-native**: Story field `{{jira.acceptance_test_results}}`, synced to `acceptance-test-results.md` (same `jira:sync-issues get <STORY> --include-comments`). **jira-xray**: Test Execution issue `description` via `bun run jira:sync-issues get <ATR_KEY>`, synced to `test-executions/ATR-<KEY>-<slug>.md`; per-TC run results via `[TMS_TOOL]` (xray-cli) | Prior run results; do not re-execute what is already recorded | | Implementation plan / source code | Actual files, APIs, test IDs | Validate that the design matches the implementation before documenting | | `business-domain-context` (`bun run context:map business-domain-context`; one term: `--section term-<slug>`) | Canonical entity + process names, their UI labels | Vocabulary reference for TC names, steps and preconditions. Terms must match the map (a placeholder map means no glossary: say so, do not invent terms) | ### Separate real scenarios from cross-cutting characteristics Cross-cutting traits are validated inside every test, not as separate TCs. | Cross-cutting (not a TC) | Validated by | |--------------------------|--------------| | Mobile responsive | Running each test in mobile viewport | | XSS prevention | Using special-character test data inside tests | | Performance | Timing assertions inside tests | | Accessibility | A11y assertions inside UI tests | | API contract | Response schema checks inside API tests | | Generic "error handling" | Specific negative-path scenarios | > Deferral is not omission (Compact Rules). Each row lands somewhere: woven into a TC's data and assertions, or owned by a named app-level suite. If no suite exists for a trait the feature genuinely exposes, file the gap (a Deferred TC or a note in the ATR). A real scenario is a **user flow**: a clear business objective, a concrete precondition and action, and a verifiable outcome, named in the `should` form (Compact Rules). ### Source-code validation (mandatory before documenting) The design in the ATP was written before code existed. Before creating any TC: 1. Open the implementation plan (if any) and list the files it touches. 2. Grep the actual code for `data-testid=`, route handlers, API paths and text formats. 3. Compare the ATP's assumptions against what the code does. If they diverge, correct the TC design and add a Refinement Notes section. Common discrepancies: an API the ATP assumed exists turns out to be SSR/direct DB; UI text in the ATP ("based on N reviews") differs from reality ("(N reviews)"); hardcoded IDs in the ATP where the TMS needs a variable pattern. Skipping this is the most common cause of invalid automated tests later. ### Sprint TCs are drafts: refine them, do not inherit them Whatever `/sprint-testing` Stage 1 left behind (Xray `Test` items, or ATP outlines under jira-native) was written to run once, this sprint, by its author. It is an input to this phase, never its output. Refine it before it enters the regression repository: | What Stage 1 produced | What this phase does | |---|---| | **Title** | Re-derive it to the canonical form (§"Title on promotion"): a regression title reads for whoever runs it in six months, not for the tester who was there | | **Steps / Gherkin** | Raise to *repeatable* detail: no "as before", no implicit state, no step that only makes sense after the previous test. Parameterize same-behavior data variants into one `Scenario Outline` (doctrine §Part 2.5) | | **Preconditions** | Make them explicit and buildable from a cold environment (a sprint test may have relied on data the tester happened to have) | | **Variables** | Replace every hardcoded id / email / UUID captured during the sprint with `{variable}` + a Variables table saying how to obtain it | | **Scope** | A sprint TC that covers two (precondition, action) pairs splits here; two that cover the same pair merge (TC identity rule below) | A refined TC carries a short **Refinement Notes** line in its Description (the section source-code validation writes to) naming what was tightened and why, so a reviewer can tell it from an untouched sprint artifact. Under jira-native with `{{TC_CREATION_STAGE}}` = `auto` there is no sprint `Test` item to refine. The outline in the ATP plays that role, and the same table applies to it. ### TC identity rule (load-bearing) A TC is defined by Precondition + Action. All expected results from the same (precondition, action) pair belong to the same TC, not to separate TCs. ``` Same TC: Different TCs: Precondition: valid credentials Precondition: valid credentials -> TC-A Action: submit login Precondition: locked account -> TC-B Assertions: redirect + token + welcome Precondition: invalid credentials -> TC-C (all one TC) (all same action, but preconditions differ) ``` Splitting one (precondition, action) into N "check panel A / B / C" TCs is an anti-pattern: one TC, multiple assertions. ### Technique-driven TC derivation (1:N, full canon: `agentic-qa-core/references/test-design-doctrine.md`) One AC yields multiple TCs by default. Derive them by the AC's shape, and merge only within a partition (TC identity above), never across partitions, boundaries or states. Reduce an AC to one TC only with a written `trivially atomic` justification. | Trigger in the AC | Technique | TCs produced | |---|---|---| | Any input (always) | **Equivalence Partitioning** | same-output inputs share one parameterized TC (Scenario Outline + Examples); different-output inputs get separate TCs | | A range / limit / length / date-window | **Boundary Value Analysis** | TCs at `min-1·min·min+1 … max-1·max·max+1` + zero / empty / null / overflow (EP alone misses off-by-one) | | A status / lifecycle field | **State-Transition** | one TC per valid transition + per invalid transition | | 2+ interacting conditions | **Decision Table** | enumerate combos, collapse equivalents, one TC per surviving rule | | 3+ combinable factors | **Pairwise** | all-pairs TC set (log the reduction) | These are candidate scenarios, not yet TMS work items. ROI (Phase 2) decides which become persistent regression TCs and which stay Deferred (recorded in the prioritization report, **not created in the TMS**). > **Improvement bridge (`agentic-qa-core/references/defect-management-doctrine.md` Part 1).** When a test beyond the AC exposes a gap because the AC was under-specified or absent (the system violated no defined criterion), file an **Improvement** issue per the doctrine (or delegate it to `/sprint-testing`). It is not a regression TC, and the Story's AC set stays as it is. --- ## Phase 2 — Prioritize (ROI) **Gate 0 (discovery-driven only)**: the scenario is `oracle: confirmed`; otherwise it waits, unscored (`agentic-qa-core/references/discovery-driven-doctrine.md` §4). Every scenario passes three gates in order. Failing any gate makes it Deferred. MTP risk orders which gaps and scopes are worked first and never sets a verdict. ROI decides per scenario, and a high-risk gap can still end Deferred, explicitly (`agentic-qa-core/references/discovery-driven-doctrine.md` §7). ### Phase 0: The three filter questions 1. **Does it protect against FUTURE regressions?** If the bug was a one-time typo in a stable area, the answer is no. Defer. 2. **Are there PRIOR bugs in this area?** Yes: prioritize even with moderate ROI ("it failed once, it can fail again"). 3. **Is it an APP-level concern or a FEATURE-level concern?** XSS / a11y / performance / responsive are APP-level suites, not per-feature TCs. Defer from this scope. ### ROI formula (load-bearing) ``` ROI = (Frequency x Impact x Stability) / (Effort x Dependencies) / 10 ``` The trailing `/ 10` is a **normalization constant, not a sixth factor**. The raw quotient over 1-5 factors spans `0.04 .. 125`, while every threshold and worked example here reads on a `0.004 .. 12.5` scale, so always divide by 10. A neutral all-3s scenario lands at `(3x3x3)/(3x3)/10 = 0.3`, which is Deferred, the intended default. Each factor is scored 1-5 independently: | Factor | 1 | 2 | 3 | 4 | 5 | |--------|---|---|---|---|---| | Frequency (how often run) | Yearly / rarely | Every release | Every sprint | Daily | Every PR / commit | | Impact (if it fails) | Cosmetic | Minor inconvenience | Degrades UX | Blocks feature | Revenue / core business | | Stability (of the flow) | Very volatile | Unstable | Moderate | Stable, minor changes | Unchanged for months | | Effort (to automate) | Trivial | Low (hours) | Moderate (1-2 days) | High (several days) | Very high (week+) | | Dependencies | None | 1-2 simple | 3-4 | 5+ | Complex externals | Effort and Dependencies are **divisors**, so a higher score is worse. The other three are multipliers. ### Component value bonus If a TC is reusable across multiple E2E flows: ``` Component Value = Base ROI x (1 + 0.2 x N) ``` where `N` is the number of E2E flows that consume it (a moderate-ROI atomic like `authenticateSuccessfully` can cross out of the defer bands through reuse). **`N` is a qualitative estimate, capped at 3** (max multiplier `x1.6`): no tool counts call-sites, so read it off the ATP / feature map and record the estimate in the ROI comment. Full rule: `references/tms-conventions.md` §9 "Component value bonus". ### Three outcomes (load-bearing) Every scenario ends in exactly one of these buckets. There is no fourth. | Outcome | Triggers it | Where it goes next | TMS status flow | |---------|------------|--------------------|------------------| | **Candidate** | ROI > 3.0, OR (ROI 1.5-3.0 AND prior bug), OR critical happy path | Feeds `test-automation` skill | Draft -> In Design -> READY -> In Review -> Candidate | | **Manual** | ROI 0.5-1.5 AND not automatable (human judgment, visual inspection), OR explicitly manual-only | Terminal: manual regression suite | Draft -> In Design -> READY -> MANUAL | | **Deferred** | ROI < 0.5, OR failed Phase-0 filter, OR one-time validation, OR **it matched neither row above** (Deferred is the default bucket: ROI under 3.0 with no prior bug and no critical-path justification lands here) | Terminal: not in regression. Can be revisited if system changes | **jira-native**: do not create a TC in the TMS. Document as Deferred in `.context/reports/PRIORITIZATION-<scope>.md` AND in the mirrored Jira comment (§"Reports: fixed filenames"; the local file is `[LOCAL]`, the comment is the durable record). **jira-xray**: the sprint `Test` (created in `/sprint-testing` Stage 1) is **not promoted** to the Regression Test Plan (RTP); it stays as a sprint execution artifact, not deleted. | > **Band authority**: the three outcomes above collapse the 5-band table in `references/tms-conventions.md` §9 ("ROI decision thresholds (strict)"), which is the authority on band boundaries. It resolves the middle bands explicitly: `1.5-3.0` is "Case by case: prior bug? critical flow? **If no, defer**", and `0.5-1.5` is "Probably defer: include only if prior bug". Read it whenever a score falls between `0.5` and `3.0`. If more than 50% of candidates end up Candidate or Manual, re-apply Phase 0 more strictly (a discovery batch runs this per chunk, `references/discovery-intake.md` §6). > **Modality changes the verb in Phase 3, not the verdict here.** The verdicts are identical in both modalities. **jira-native**: Phase 3 creates `Test` work items for Candidate and Manual only (Deferred is report-only). **jira-xray**: the `Test` items already exist from `/sprint-testing` Stage 1, so Phase 3 selects and promotes the Candidate and Manual ones into the RTP (re-derived canonical title, then label `regression-candidate`) and enriches them (rich Gherkin, parameterization, edge elaboration: the "specify much more" pass). Deferred sprint Tests stay unpromoted. See `sprint-testing/SKILL.md` §"TC creation timing (modality-aware)". --- ## Phase 3 — Document in TMS Phase 3 turns the Phase 2 verdicts into TMS artifacts: containers, TCs, links, and the hand-off to the Regression Test Plan. Every ask-first step in this phase (the Regression Epic, the feature TS, the RTP, an artifact owned by someone else, an unmapped slug) follows `## With nobody at the keyboard`: unattended, stop before the Jira write and report. ### Preflight: Regression Epic Every documented TC needs a parent Regression Epic, the project's single test repository. That epic is the QA Test Repository process epic (`agentic-qa-core/references/defect-management-doctrine.md` Part 4). Resolve it found-or-created by the configured name `qa.qa_epics.test_repository_epic.name` ("QA Test Repository"). When it is absent, create it once, write the test-repository strategy into its description, and cache its key in `.agents/project.yaml` under `qa.qa_epics.test_repository_epic.key`. It is a QA process epic, never a product or dev epic and never unparented. The parent only says which QA bucket tracks the Test: product area travels on `components` (Part 3) and Story coverage on the issue link (Part 4). Load `/acli` before running the commands below. ``` [ISSUE_TRACKER_TOOL] Search Issues: project: {{PROJECT_KEY}} query: type = Epic AND summary ~ "QA Test Repository" # resolve by configured name qa.qa_epics.test_repository_epic.name ``` If none exists, ask the user before creating one named `QA Test Repository` with labels `QA-Artifact, regression` (`QA-Artifact` is the identity label of every QA process epic). ### Preflight: Test Sets (ATS mandatory per Story, TS optional feature grouping) Two Set altitudes, and they are different things: - The ATS (Acceptance Test Set), `ATS: {US_ID}: {story title}`, is mandatory per Story, even with a single TC. It holds all the Story's TCs and anchors coverage: the ATS to Story `is tested by` link is what fills the Xray coverage panel (ATP and ATR links do not; see `xray-cli/SKILL.md` §Direction). It is parented to QA Test Artifacts and inherits `components` from the Story (the components exemption covers feature-level `TS:` only). Phase 3 is Set-first: find-or-create the ATS, add the TCs to it, then derive the ATP's and the Execution's test lists from its membership. - The TS (feature-level Test Set), `TS: <EPIC_KEY|module>: Validate <feature>`, is optional grouping (smoke, regression or a feature suite), 1:1 with the Epic or module, with optional `components` because a feature Set spans modules. Ask the user before creating one; the AI creates it lazily, only when a promotion needs it. Only promoted, regression-worthy Tests (Candidate or Manual) go into it; Deferred sprint Tests do not. - Modality jira-xray: resolve or create Sets through `[TMS_TOOL]`. Membership is written in Xray (GraphQL) and as one TC to ATS `test` issue link per TC through `[ISSUE_TRACKER_TOOL]` (`../agentic-qa-core/references/traceability-linking.md` §9). The ATS to Story `is tested by` edge is also a Jira issue link, and it is mandatory. - Modality jira-native: with the Test Set work type, create the ATS item and express membership as TC to ATS issue links plus the ATS to Story link. Without it there is no ATS: link each TC to the Story directly with `is tested by` (the cascade's last-resort path) and group by feature through the Regression Epic plus a feature or Epic label (`epic-<EPIC_KEY>` or the feature slug). ### Entity model: ATP / ATR / ATS / TC Five entities. The Story links to its ATS, ATP and ATR ("is tested by"), but only the ATS to Story edge carries coverage; the ATP to Story and ATR to Story links are administrative and contribute zero (`xray-cli/SKILL.md` §Direction). The ATP designs the TCs (TC "is designed by" ATP) and the ATR executes them (TC "is executed by" ATR). A direct TC to Story link is the cascade's last resort, used when no ATS exists, not the default. The defect is a TC with no path to its Story, not the direct link itself. Full doctrine: `agentic-qa-core/references/traceability-linking.md` and `references/tms-architecture.md`. | Entity | Created | Naming | Main content | |--------|---------|--------|--------------| | US (Story) | Pre-existing | `{{PROJECT_KEY}}-{n}` | The requirement | | ATP | Content pre-sprint in `{{jira.acceptance_test_plan}}` (shift-left); the Test Plan ITEM by `/sprint-testing` Stage 1 from that field, or by this phase (find-or-create) when running module-driven and no Story ATP item exists | `ATP: {STORY-KEY}: {story title}` | Test Analysis + AC-to-TC coverage | | ATR | Stage 1 (or now, if missing) | `ATR: {STORY-KEY}: Story Testing` | Test Report + execution results | | TC | Stage 4 (this phase) | `{US_ID}: TC#: should <expected outcome> [<connector> <condition>] [given <precondition>]` | Precondition + Action + Expected | | ATS | Stage 1 (or now, find-or-create), mandatory per Story | `ATS: {US_ID}: {story title}` | All the Story's TCs (even one); the coverage anchor. Components inherited from the Story (mandatory). Parent: QA Test Artifacts. | | TS (optional) | Lazily in Stage 4 if a promotion needs it (ask first); else pre-existing (async) | `TS: {EPIC-KEY\|module}: Validate {feature}` | Optional feature-level grouping (1:1 Epic) of promoted regression Tests. Components optional. Native without the work type: a feature/Epic label, no entity. | Read `references/tms-architecture.md` when creating ATP/ATR/TC for a ticket, checking required links, or validating that a story is fully documented. ### Linking order (always Set-first) ``` 1. Find-or-create the Story's ATS -> link to US (Story "is tested by" ATS — the coverage-panel link) 2. Find-or-create ATP (pre-sprint content lives in {{jira.acceptance_test_plan}}; the item usually exists from /sprint-testing Stage 1 — create here only when module-driven and no ATP item exists) -> link to US (Story "is tested by" ATP — administrative, no coverage) 3. Create ATR -> link to US (Story "is tested by" ATR — administrative, no coverage) 4. Update ATP -> link to ATR (bidirectional plan/results) 5. For each TC: Create TC -> add to the ATS (TC->ATS issue link in both modalities; jira-xray also writes the Xray-internal membership) -> link to ATP (TC "is designed by" ATP) + ATR (TC "is executed by" ATR) # Do NOT link the TC directly to the Story when an ATS exists — TCs aggregate via the ATS. # Direct TC->Story is the cascade's LAST RESORT (no ATS available — e.g. jira-native # without the Test Set work type). The defect is a TC with NO path, not the direct link. # AC coverage is recorded in the ATP's AC-to-TC matrix, not as a Story<->TC issuelink. 6. Derive the ATP's and the ATR's test lists FROM the ATS membership (Set-first: the ATS holds ALL the Story's TCs; Plan and Execution consume that list). 7. For each PROMOTED (regression-worthy) TC: FIRST -> re-derive the canonical title and, if the live summary differs, rewrite it ([ISSUE_TRACKER_TOOL] Update Issue — summary is a Jira field, not an Xray one), THEN verify it matches before anything else touches the TC (see §"Title on promotion"). A wrongly-titled TC must never reach the RTP or carry the label. jira-xray -> [TMS_TOOL] add TC to the OPTIONAL feature TS (resolve/create per Preflight) + [TMS_TOOL] add to the RTP + [ISSUE_TRACKER_TOOL] label `regression-candidate` (labels are a Jira field; xray-cli has no update-label for existing Tests) jira-native -> [ISSUE_TRACKER_TOOL] apply the feature/Epic label (or add to a feature TS item when the work type exists) ``` Every artifact this skill creates carries `assignee` set to the authenticated session user at create time: the RTP, the ATS, the optional feature TS, every `Test` and every Precondition (`agentic-qa-core/references/artifact-lifecycle.md` §2). Xray refuses membership edits on a Test Plan the caller does not own, so an unassigned RTP blocks promotions long after the Plan exists. If find-or-create returns an artifact owned by someone else, ask the user before reassigning it. Plan and Set lifecycle (`agentic-qa-core/references/artifact-lifecycle.md` §1): | Artifact | Born | This skill moves it to | Then | |---|---|---|---| | RTP (Regression Test Plan) | `{{jira.status.test_plan.planning}}` | `{{jira.status.test_plan.ready}}` via `{{jira.transition.test_plan.designed}}` on the first promotion | stays `ready` forever, because the RTP is long-lived. Never fire `{{jira.transition.test_plan.complete}}` on it | | ATS (per-Story Set) | `{{jira.status.test_set.designing}}` | closed by `/sprint-testing` Reporting, not here | none | | TS (optional feature Set) | `{{jira.status.test_set.designing}}` | stays `designing` for the life of the feature | `{{jira.transition.test_set.done}}` only when its Epic closes | | Precondition | `{{jira.status.precondition.active}}` | nothing: the workflow has no transition out of `active` | stays `active`; that is correct, not a gap | Per-operation tool resolution and the Gherkin-enrichment CLI gap are in `references/jira-test-management.md` §"Stage-4 promote + enrich — tool resolution map". Load `/xray-cli` for command syntax. ### Where candidates go: the RTP handoff This is the procedure for getting Phase 2 Candidates into the general regression suite, and it is the last thing Phase 3 does. 1. Find-or-create the project's Regression Test Plan (RTP): one long-lived `Test Plan` item per project, titled `RTP: {PROJECT_KEY|module}: Regression Test Plan`, parented to the QA Master Test Plan epic, `assignee` set to self at create time (see the lifecycle table above). Ask the user before creating it, as with the Regression Epic. 2. Every `Candidate` TC lands in it: title re-derived and verified (§"Title on promotion"), then `regression-candidate` applied, then added to the RTP. `Manual` TCs go to the manual regression suite, which under jira-xray is the same RTP, told apart by the `manual-only` label and the `{{jira.status.test_case.manual}}` status. `Deferred` TCs never enter it; that is the point of the verdict. 3. The RTP moves to `{{jira.status.test_plan.ready}}` on the first promotion and stays there: a regression run never completes the plan it ran from. 4. Downstream consumers read the RTP, not this session. `/test-automation` picks up the TCs at `{{jira.status.test_case.candidate}}` carrying `regression-candidate`; `/regression-testing` runs the RTP's membership into an RTR (`testPlan` is the RTP); an STR exists only at sprint close. Neither reads `.context/reports/`, since both report files are `[LOCAL]`. A Candidate that is not in the RTP does not exist downstream. #### Grouping Candidates into e2e regression flows The same authentication or checkout TC is consumed by several end-to-end journeys, and that reuse is what the Component value bonus (§Phase 2) scores. Group the Candidates explicitly, at the altitude `/test-automation` will use. - One group is one e2e flow, a user journey that a spec file runs end to end, named for the journey and not the module: `Checkout — guest purchase`, not `Checkout tests`. - A TC reused by 2+ flows is an atomic component. In KATA terms it becomes a Steps module instead of being duplicated per flow (`test-automation/references/kata-architecture.md`). Name it once, list it under every flow that consumes it, and let the `N` in the Component value bonus equal that count. - Record the grouping in two places. The durable copy is the RTP description, as a `## Regression flows` section listing each flow with its member TC keys, readable by `/test-automation` and `/regression-testing` without this session. The local copy is a flow column in `COVERAGE-MATRIX-<scope>.md`, beside the AC, scenario, TC and verdict grid. - A Candidate that belongs to no flow is a smell, not a category: either it is an atomic component (say which flows consume it) or its journey was never identified. Surface it instead of filing it under a catch-all. ### Creating TCs: modality matrix | TMS stack | Manual test | Automation-candidate test | |-----------|-------------|---------------------------| | Xray on Jira | Two-step (Xray Cloud
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.