qa-interrogate-spec

Interrogates PRDs, user stories, tickets, Figma or UI flows, API contracts, and vague requirements across 10 Failure Mode classes to expose Spec Ambiguity items, Spec-vs-Code drift, and Testable Acceptance Criteria with multi-layer Test Oracles.

Qu'est-ce que qa-interrogate-spec ?

qa-interrogate-spec is a Claude Code agent skill that interrogates PRDs, user stories, tickets, Figma or UI flows, API contracts, and vague requirements across 10 Failure Mode classes to expose Spec Ambiguity items, Spec-vs-Code drift, and Testable Acceptance Criteria with multi-layer Test Oracles.

Compatible avec~Claude Code~Codex CLI~Cursor
Part ofMobile
npx skills add https://github.com/HBaHa1303/qa-skills/tree/HEAD/skills/qa-interrogate-spec

Installed? Explore more Développement et programmation skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

Demander à votre IA préférée

Ouvre une nouvelle conversation avec cette compétence d'agent déjà préchargée.

Documentation

QA Interrogate Spec

Proactively interrogate requirements, tickets, UI flows, and API contracts across all 10 Failure Mode classes to convert vague specifications into Testable Acceptance Criterion items with multi-layer Test Oracles, surfaced Spec Ambiguity items, and prioritized risks.

Boundary & Language Rules

  • In boundary: PRDs, user stories, feature tickets, Figma/UI flows, API contracts, or vague requirements needing interrogation before test planning or coding.
  • Out of boundary (hand off neutrally): Pure code/PR review with no spec (qa-audit-diff or qa-audit-codebase), test-layer strategy (qa-plan-tests), or TC-* authoring (qa-design-tests).
  • Conversational language: Match the user's prompt language (English or Vietnamese) for all questions and explanations.
  • Canonical schema & vocabulary: Keep English headings, GLOSSARY.md terms, traceability IDs (AC-*, AMB-*, ASM-*, RISK-*), Failure Mode names, and tags (Spec-Only, Code-Assisted, Unverified-in-Spec, [UI/API], [DB/State], [Side-Effects], [ASSUMPTION - NEEDS SIGN-OFF]). Persisted reports follow Artifact language in docs/qa/context.md when set, otherwise defaulting to the prompt language.
  • Read-only & No Raw Secrets Rule: Never modify application code, databases, or runtime state. Write only .qa/reports/<slug>-spec-interrogation.md when chaining .qa/reports/<slug>-* checkpoints or explicitly requested. Never read .env files or print literal credentials, tokens, or secrets.

Step 1 — Context Load & Mode Detection

  1. Silent context load (zero-config fallback): Read GLOSSARY.md, docs/qa/context.md, and referenced docs/adr/ if present. When docs/qa/ is absent, fall back silently to zero-config .qa/ conventions without blocking.
  2. Select interrogation mode automatically:
    • Spec-Only / UI-Only Mode: Selected when no repository exists or the input is pure spec/UI documentation without matching codebase targets. Never fabricate hidden implementation facts. Mark code-dependent unknowns (Implicit Business Rule, Cross-Module Side Effect, Migration & Compatibility Defect) as Unverified-in-Spec (for example, Unverified-in-Spec (needs dev/code check)) paired with concrete PM/Dev verification questions.
    • Code-Assisted Mode: Selected when a repository is accessible and the spec names routes, endpoints, schemas, migrations, or domain entities. Run targeted read-only lookups only on those named routes, schemas, validation guards, and entities to surface Spec-vs-Code drift and active Implicit Business Rules.
  3. Escalation boundary in Code-Assisted mode: Inspect only targets named in the spec. If those targets sit inside undocumented or tangled legacy code requiring deep reverse-engineering, flag Deep Codebase Forensics Recommended and recommend qa-audit-codebase if installed (or run a minimal read-only check on the named entry points and persistence sites when qa-audit-codebase is absent).

Completion criterion: Context files checked, mode (Spec-Only / UI-Only or Code-Assisted) locked, and any Spec-vs-Code drift or escalation flag recorded.


Step 2 — Conditional Round 0 Framing Pass

Check whether the input is a one-liner or severely underspecified (missing primary actor, trigger, core success outcome, or primary failure boundary):

  • If sufficiently framed, skip Round 0 and proceed directly to Step 3.
  • If severely underspecified, run a Round 0 Framing Pass of 3 to 5 foundational questions (actor/permissions, trigger/entry point, success outcome, failure/rollback boundary, target non-goals) before running the full 10-class sweep. Consult Section 1 of references/failure-mode-probes.md for framing templates.
  • In Batch / Pipeline Mode, record the 3 to 5 framing questions with proposed defaults marked [ASSUMPTION - NEEDS SIGN-OFF] (use status: blocked only when no domain target can be inferred at all).

Completion criterion: Either framing is already sufficient, or 3–5 Round 0 foundational questions are resolved or captured as [ASSUMPTION - NEEDS SIGN-OFF].


Step 3 — 10-Class Failure Mode Interrogation (Adaptive Two-Mode)

Sweep the requirement across every item in the 10-Class Failure Mode Spec-Lens Checklist below. Load references/failure-mode-probes.md for deep probing heuristics, stack-agnostic code-lookup cues, and edge-case examples whenever a class needs deeper interrogation.

10-Class Failure Mode Spec-Lens Checklist

  1. Spec Ambiguity: Missing actor, trigger, units/timezone/rounding, sorting/empty state, failure copy, or contradicting clauses preventing a clear Test Oracle.
  2. Implicit Business Rule: Unstated domain invariants, quotas, retention/cutoff windows, or existing system constraints (Unverified-in-Spec in Spec-Only; verified via targeted lookup in Code-Assisted).
  3. Boundary & Input Validation Defect: Unspecified min/max lengths, numeric precision, empty/null/whitespace handling, Unicode/special characters, file size/MIME limits, or pagination limits.
  4. Broken State Transition: Missing allowed/forbidden transition matrix, retry/cancel/expiry paths, or partial-failure rollback state.
  5. Cross-Module Side Effect: Unspecified effects on notifications, caches, audit logs, billing/inventory ledgers, search indexes, or downstream webhooks.
  6. Contract / Integration Drift: Missing UI–API payload/failure shape, HTTP status mapping, nullable vs omitted fields, or third-party timeout/fallback behavior.
  7. Concurrency Defect: Unspecified double-submit/idempotency behavior, stale-read or optimistic/pessimistic locking, or parallel worker ordering.
  8. Auth & Permission Leak: Missing role matrix, tenant/ownership boundary (IDOR), unauthenticated fallback (401/403/404), or sensitive data leakage in payloads/logs.
  9. Migration & Compatibility Defect: Unspecified handling of existing/dirty records, feature-flag off/on skew, or backward compatibility with older clients.
  10. Silent Failure: Unspecified behavior when background jobs, third-party calls, or persistence steps fail mid-flow (must require explicit failure signaling, retry, or compensation—never false HTTP 200).

Execution Modes

  • Interactive Frontier Grilling (Default): Present only unblocked questions at the current dependency frontier with numbered IDs (Q1..Qn) and a concrete recommended default prefixed with ➡️. Wait for user answers to expand the next frontier round until ambiguities are resolved or the user explicitly freezes remaining items as [ASSUMPTION].
  • Batch / Pipeline Mode (Explicit unattended or async audit): Execute a single-pass 10-class sweep without blocking for interactive turns. Assign every Spec Ambiguity a concrete Proposed Default tagged [ASSUMPTION - NEEDS SIGN-OFF] so downstream planning never stalls.

Completion criterion: All 10 Failure Mode classes explicitly evaluated, with every open question tagged Q1..Qn + ➡️ default (Interactive) or [ASSUMPTION - NEEDS SIGN-OFF] (Batch), and code-dependent unknowns in Spec-Only marked Unverified-in-Spec.


Step 4 — Traceability IDs & Multi-Layer Test Oracles

Convert resolved behaviors and accepted/proposed defaults into structured traceability records:

  1. Preserve upstream IDs when present (FR-12, US-4.2) alongside stable interrogation IDs:
    • AC-01..N (Testable Acceptance Criterion)
    • AMB-01..N (Spec Ambiguity)
    • ASM-01..N ([ASSUMPTION] / [ASSUMPTION - NEEDS SIGN-OFF])
    • RISK-01..N (Failure Mode risk)
  2. Require multi-layer Test Oracles on every AC-*:
    • [UI/API]: Status code, response payload, failure message, or rendered UI state.
    • [DB/State]: Persisted record state, status transition, lock/version counter, or queue/cache state.
    • [Side-Effects]: Expected audit logs, notifications, ledger entries, webhooks, or explicit absence of unintended cross-module mutations.

Completion criterion: Every requirement and resolved default maps to a numbered AC-*, AMB-*, ASM-*, or RISK-*, and every AC-* specifies Trigger, Input/Constraints, and all 3 Test Oracle layers ([UI/API], [DB/State], [Side-Effects]).


Step 5 — Emit 5-Section Report & Optional Checkpoint

Load references/report-template.md before formatting the final output:

  1. Chat-first delivery: Present the complete 5-section spec interrogation report in chat (1. Context & Mode, 2. Spec Ambiguity & Open Questions, 3. Testable Acceptance Criteria & Multi-Layer Test Oracles, 4. 10-Class Failure Mode Checklist, 5. Handoff Notes).
  2. Checkpoint persistence (.qa/reports/<slug>-spec-interrogation.md): When chaining .qa/reports/<slug>-* checkpoints across sessions or explicitly requested by the user, write the file using a kebab-case <slug> (^[a-z0-9-]+$) with:
    • Standardized checkpoint YAML frontmatter (skill, stage: spec-interrogation, status, target, slug, date, artifact_language, confidence, upstream_refs, skipped_stages).
    • Compact ## Handoff Summary (<= 25 lines) immediately after frontmatter.
    • All 5 canonical report sections, with zero raw secrets.
  3. Neutral handoff guidance: Point to qa-audit-codebase (when Deep Codebase Forensics Recommended), qa-audit-diff (when a PR/diff is present), or qa-plan-tests (when ready for test-layer planning) if installed; otherwise advise mapping AC-*, RISK-*, and ASM-* directly to test layers and TC-* suites.

Completion criterion: All 5 report sections (and checkpoint YAML frontmatter + <= 25-line ## Handoff Summary when saving .qa/reports/<slug>-spec-interrogation.md) emitted cleanly with consistent IDs and zero raw secrets.

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

Skills associés