一键导入
stp-reviewer
Semantic QE review of STP documents against domain rules, Jira source data, and quality standards
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Semantic QE review of STP documents against domain rules, Jira source data, and quality standards
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
Classify PR review comments on STP/STD documents into auto-fixable vs needs-human categories. Maps free-text feedback to QualityFlow domain rules for automated fix routing.
Resolve Jira ID to project configuration and load project context
Generate comprehensive v2.1-ENHANCED STD YAML with pattern metadata, variables, test structure from ALL STP scenarios (single file)
Orchestrate STP → STD pipeline (generates comprehensive STD YAML only)
Generate test stubs with PSE docstrings from STD YAML — language and framework driven by project config
Detect test conventions from a codebase to drive test generation without tier config
基于 SOC 职业分类
| name | stp-reviewer |
| description | Semantic QE review of STP documents against domain rules, Jira source data, and quality standards |
| model | claude-opus-4-6 |
| version | 1.1.0 |
Phase: Post-Generation Review User-Invocable: false
Perform a comprehensive semantic QE review of a generated STP document. This is NOT structural validation (output-validator handles that). This skill evaluates the quality, accuracy, and completeness of the STP content — the same judgment a human QE reviewer would apply.
Invoked by the review-stp command after an STP has been generated by /stp-builder.
This skill uses a two-layer review architecture:
{project_context.config_dir}/review_rules.yaml at runtime.If the review-stp command has loaded a review_rules.yaml file and passed it as context,
use its contents to enhance rule checks with project-specific knowledge:
stp_rules.abstraction.internal_components → additional internal component names for Rule Astp_rules.abstraction.internal_to_user_mappings → internal-to-user term translations for Rule Astp_rules.abstraction.acceptable_locations → where internal mechanisms are acceptablestp_rules.dependencies.infrastructure_not_dependency → infrastructure items for Rule Dstp_rules.dependencies.dependency_examples → valid dependency examples for Rule Dstp_rules.upgrade.persistent_state_indicators → persistent state markers for Rule Estp_rules.testing_tools.standard_tools → standard tools list for Rule Gstp_rules.testing_tools.standard_frameworks → standard frameworks list for Rule Gstp_rules.strategy.always_y → strategy checkbox items that must always be checked for Dimension 6stp_rules.strategy.requires_justification_for_y → strategy checkbox items needing justification when checkedstp_rules.metadata.version_source → which Jira field to use for version derivation (Rule F)stp_rules.scope.layered_product → layered product ownership boundaries for Dimension 2If no review_rules.yaml exists for the project, all rules still apply using built-in
defaults. Project-specific config adds precision (custom component lists, domain-specific
examples) but is not required. The general rules provide comprehensive coverage on their own.
| Concern | output-validator | stp-reviewer |
|---|---|---|
| Section count | YES | NO |
| Table row counts | YES | NO |
| Markdown formatting | YES | NO |
| Rule A-P compliance | NO | YES |
| Requirement coverage gaps | NO | YES |
| Scenario quality judgment | NO | YES |
| Risk accuracy | NO | YES |
| Cross-section contradictions | NO | YES |
| Source data comparison | NO | YES |
stp_file_path: "outputs/stp/{JIRA_ID}/{JIRA_ID}_test_plan.md"
jira_data:
main_issue: <fetched Jira issue data>
linked_issues: <linked issues array>
subtasks: <subtasks array>
project_context: <from project-resolver, includes repo_rules>
review_rules: <from review_rules.yaml, if available>
When project_context.repo_rules is available, the reviewer uses:
repo_rules.stp_template — For Rule B (template comparison). Compare the STP
structure against the fetched template, not the local copy. This is the team's
current official template.repo_rules.stp_guide — Additional context for reviewing testing goals (SMART
criteria, priority levels P0/P1/P2, entry/exit criteria), risk categories, and STP
lifecycle expectations.repo_rules.testing_tiers — For validating tier classifications in Section III.
The fetched tiers guide defines what Tier 1 vs Tier 2 means for this project. Use it
to validate Rule J (One Tier Per Row) and Dimension 3 (Scenario Quality) tier
distribution checks.A structured review report written to:
outputs/reviews/{JIRA_ID}/{JIRA_ID}_stp_review.md
The review evaluates 7 dimensions. Each dimension produces findings classified as:
| Severity | Meaning | Impact on Verdict |
|---|---|---|
| CRITICAL | Factual error, missing coverage, or rule violation that makes the STP unusable | Blocks approval |
| MAJOR | Significant quality issue that should be addressed | Does not block but flags for attention |
| MINOR | Improvement suggestion or stylistic issue | Informational only |
Check each rule (A through P) against the STP content. For each rule, sample the relevant sections and evaluate compliance.
What to check:
QE technical terms allowlist (always acceptable in QE-facing STPs):
project.yaml scope_boundaries.cli_toolsIf project config is loaded, stp_rules.abstraction.qe_terms_allowed extends this list
with project-specific allowed terms.
Red flags (CRITICAL if found in Scope/Goals/Scenarios):
stp_rules.abstraction.internal_components for additional project-specific names.stp_rules.abstraction.internal_to_user_mappings for project-specific translations.
General examples: using internal process names where user-facing product names exist.Borderline term resolution: When a term could be either internal or user-facing depending on context, apply the litmus test below. Do NOT flag terms from the allowlist.
Red flags (MAJOR if found in Requirement Summary):
Acceptable locations for internal mechanisms:
If project config is loaded, use stp_rules.abstraction.acceptable_locations. Otherwise,
the general defaults are:
Evaluation method: For each Scope item, Goal, Requirement Summary, and Test Scenario, apply the litmus test:
"Would this sentence appear in customer-facing release notes?"
What to check:
Red flags (MAJOR):
Acceptable:
Severity: MAJOR for anthropomorphization or colloquial phrasing in formal STP sections. MINOR for vague qualifiers that could be made more specific.
What to check:
- [ ] items) with 5 items:
Review Requirements, Understand Value and Customer Use Cases, Testability, Acceptance Criteria, NFRs.
Each checkbox has indented sub-bullets for detail. Feature-specific observations go in the sub-item text.How to verify:
Read the STP template from project_context.repo_rules.stp_template (preferred) or fall
back to {project_context.config_dir}/templates/stp/stp-template.md.
Compare each section against the template's prescribed structure and format (tables vs
checkboxes, required columns, section ordering).
Red flags (MAJOR):
Red flags (CRITICAL) — Empty required fields:
Red flags (MAJOR) — Stale template:
repo_rules.stp_template
or {project_context.config_dir}/templates/stp/stp-template.md)What to check:
Pattern matching for prerequisites:
Where prerequisites should appear instead:
Severity: CRITICAL if a prerequisite appears as a test scenario in Section III without a corresponding behavioral verification.
What to check:
Red flags (MAJOR):
Items that are infrastructure, not dependencies. If project config is loaded, use
stp_rules.dependencies.infrastructure_not_dependency for project-specific examples.
General pattern: listing pre-existing platform infrastructure as a "dependency" when it
is actually a test environment requirement.
Acceptable dependency examples:
If project config is loaded, use stp_rules.dependencies.dependency_examples. General
pattern: another team must deliver a change, merge a PR, or release a component before
this feature can be tested.
What to check:
Decision criteria: Ask: "If a cluster upgrades from version N to N+1, does existing data/state created by this feature need to be preserved or converted?"
If project config is loaded, stp_rules.upgrade.persistent_state_indicators provides
project-specific indicators of persistent state.
Red flags (MAJOR):
What to check:
project_context.versioning.If project config is loaded, stp_rules.metadata.version_source specifies which Jira
field to use (e.g., fix_version).
Red flags (MAJOR):
Acceptable:
What to check:
If project config is loaded, use stp_rules.testing_tools.standard_tools and
stp_rules.testing_tools.standard_frameworks for the project-specific standard tools list.
Otherwise, the general principle applies: tools and frameworks that are standard for the
project's test infrastructure should not be listed.
Red flags (MINOR):
Acceptable:
What to check:
Red flags (MINOR):
Acceptable:
What to check:
Red flags (MAJOR):
Risks should describe:
What to check:
Red flags (MAJOR):
Acceptable:
What to check:
Red flags (CRITICAL):
What to check: Compare content across sections for contradictions.
Specific contradiction patterns:
| Check | Section A | Section B | What must be true |
|---|---|---|---|
| 1 | Scope (II.1) | Out of Scope (II.1) | No item appears in both |
| 2 | Testing Goals (II.1) | Known Limitations (I.2) | Goals do not promise what limitations exclude |
| 3 | Section I sub-items | Known Limitations (I.2) | Sub-items do not claim capabilities that limitations exclude |
| 4 | Test Strategy (II.2) | Section III | If strategy checkbox is unchecked, no scenarios of that type exist |
| 5 | Entry Criteria (II.4) | Test Environment (II.3) | Entry criteria reference environment requirements consistently |
| 6 | Scope (II.1) | Section III | All scope items have at least one test scenario |
| 7 | Out of Scope (II.1) | Section III | No scenarios test out-of-scope items |
Severity: CRITICAL for contradictions between Scope and Out of Scope, or Goals and Limitations. MAJOR for other inconsistencies.
What to check: Verify that content appears in the correct STP section. Content in the wrong section indicates the author misunderstands the STP structure.
Section content rules:
| Section | Should Contain | Should NOT Contain |
|---|---|---|
| Scope of Testing (II.1) | Testable capabilities and feature areas (checkbox format) | Implementation details, how to run tests |
| Out of Scope (II.1) | Features/areas explicitly excluded with rationale and PM ack (checkbox format) | Limitations (those go in I.2) |
| Testing Goals (II.1) | User-observable outcomes to validate | Internal mechanism validations |
| Test Strategy (II.2) | Checkbox items with feature-specific sub-items | Detailed test scenarios (those go in III) |
| Dependencies (II.2) | Other team deliveries with Jira references (checkbox item) | Infrastructure requirements (those go in II.3) |
| Test Environment (II.3) | Infrastructure and platform requirements (bullet list) | Risks (those go in II.5) |
| Testing Tools (II.3.1) | Only non-standard tools and frameworks (bullet list) | Standard tools (use project config list if available) |
| Risks (II.5) | Genuine uncertainties with mitigations (checkbox format) | Known environment requirements (those go in II.3) |
| Known Limitations (I.2) | Feature boundaries and restrictions | Out-of-scope items (those go in II.1 Out of Scope) |
| Section III | Testable behaviors with requirement mapping (bullet-based) | Configuration prerequisites, setup instructions |
Red flags (MAJOR):
Limitation vs Out-of-Scope Semantic Distinction:
A common misclassification is confusing Limitations with Out-of-Scope items. These have precise, different meanings:
| Category | Meaning | Example |
|---|---|---|
| Known Limitations (I.2) | A constraint prevents testing — you cannot test this even if you wanted to | "Feature X is not supported by the product" |
| Out of Scope (II.1) | A deliberate decision to exclude — you could test this but chose not to | "Feature X will be tested in a follow-up cycle" |
Red flags (MAJOR) — Limitation vs Out-of-Scope confusion:
Red flags (MINOR) — Risk mitigation linkage:
Severity: MAJOR for content in wrong section. MINOR for borderline cases.
What to check: For each section of the STP, apply the ISTQB deletion test: "If this section were removed entirely, would the Go/No-Go decision for the test effort be hindered?"
Process:
Red flags (MAJOR):
Red flags (MINOR):
Severity: MAJOR for content that adds bulk without aiding the test decision. MINOR for content that is correct but unnecessarily verbose.
What to check: Verify all links and references in the STP are valid, relevant, and not stale.
Process:
github.com/username/project instead of the
official organization URL) — personal forks may become stale or deletedRed flags (CRITICAL):
Red flags (MAJOR):
Red flags (MINOR):
Note: This rule consolidates link validation that was previously scattered across Dimensions 5 and 7. All link/reference findings should be reported under this rule.
What to check: When a testing goal, scope item, or scenario is marked as "not testable at this stage," "cannot be verified," or "deferred," verify the documentation is complete.
Required documentation for untestable items:
Red flags (CRITICAL) — Priority-Testability Contradiction:
Red flags (MAJOR):
Red flags (MINOR):
Activation guard: This rule ONLY applies when BOTH conditions are met:
If either condition is unmet, skip this rule entirely — mark as PASS with "N/A — not a bug ticket or no PR data available."
Process:
Step 1 — Classify fix scope (deterministic algorithm):
From fix_scope.key_changes and fix_scope.files_changed:
pkg/controller/
and pkg/api/ = 2 packages). Test files (*_test.go, test_*.py) do not count.fix_scope.key_changes list length, excluding test functions).client-go, controller-runtime, k8s.io/api, or
project-specific cluster packages from components.yaml.Classification table:
| Distinct packages | Modified functions | Cluster interaction | Classification |
|---|---|---|---|
| 1 | 1 | No | single-function-isolated |
| 1 | 1 | Yes | single-function-cluster |
| 1 | 2+ | Any | single-package |
| 2+ | Any | Any | multi-package |
| Any | Any | Any + PR description mentions "user workflow" or "end-to-end" | multi-step-workflow |
If fix_scope.files_changed is "large" (>5k lines), classify as multi-package.
Step 2 — Evaluate tier efficiency:
For each scenario in Section III, evaluate whether the proposed tier is the minimum that provides equivalent coverage.
Fix Scope → Expected Minimum Tier:
| Fix Scope Classification | Minimum Viable Tier | Reasoning |
|---|---|---|
single-function-isolated | Unit Tests | Mocked test validates the fix |
single-function-cluster | Tier 1 | Single operation in cluster |
single-package | Tier 1 | Single feature verification |
multi-package | Tier 2 | Cross-component interaction required |
multi-step-workflow | Tier 2 | Full workflow verification needed |
Red flags (MAJOR):
Red flags (MINOR):
NOT a finding:
Recommendation format: Suggest minimum viable tier AND recommend keeping the higher-tier test. Example: "Fix modifies validateCPUModel() in pkg/cpu/. Consider adding a Tier 1 test that directly verifies the validation logic. The existing Tier 2 migration scenario provides good regression coverage but a Tier 1 test verifies the fix more efficiently."
What to check: Compare the STP's Section III against the source Jira data to find coverage gaps.
Process:
Red flags:
acceptance_criteria_covered / total < 0.70
(less than 70% of acceptance criteria have corresponding scenarios), this is a systemic
coverage gap that blocks approval regardless of individual findingsCoverage metrics to report:
acceptance_criteria_covered: X/Y
acceptance_criteria_coverage_rate: X/Y (percent%)
p0_criteria_covered: X/Y
linked_issues_reflected: X/Y
negative_scenarios_present: true/false
edge_cases_identified: X (from Jira) / Y (in STP)
Coverage threshold evaluation: After scoring all acceptance criteria, calculate the coverage rate. If below 70%, produce a CRITICAL finding: "Acceptance criteria coverage is {X}% ({covered}/{total}). Minimum threshold is 70%. {list uncovered criteria}." This ensures incomplete STPs do not proceed to STD generation.
The Value Proposition and Use Cases sections describe why the feature matters. These must be customer-facing, factually accurate, and actionable.
Red flags (MAJOR) — Internal audience framing:
Red flags (MAJOR) — Value proposition inaccuracy:
Red flags (MINOR):
Beyond checking Jira acceptance criteria against scenarios, the reviewer must proactively challenge scope completeness — asking "what about X?" for test areas that are commonly overlooked. This is the most common type of human reviewer feedback.
UI Coverage Challenge:
Negative / Edge Case Challenge:
OS / Platform Coverage Challenge:
Monitoring / Alerting Alignment:
Regression Scope Challenge:
Cross-Team / Cross-SIG Impact:
Explicit Out-of-Scope Acknowledgment:
Invalid Scope Exclusion (Subtractive Review):
Team Ownership Boundary Check (Layered Product):
If project config is loaded and stp_rules.scope.layered_product is defined, apply
layered product ownership rules:
If no layered product config is defined, skip this check.
Epic-Anchored Completeness:
What to check: Evaluate the quality of each test scenario in Section III (bullet-based format).
Quality criteria:
| Criterion | Good | Bad |
|---|---|---|
| Specificity | "Verify service is reachable after config change" | "Verify feature works" |
| User perspective | "Verify user sees updated resource after edit" | "Verify internal sync protocol succeeds" |
| Brevity | 5-10 words, single phrase | Multi-sentence description |
| Actionability | Clear what to test | Vague or ambiguous |
| Uniqueness | Each scenario tests a distinct behavior | Duplicate or overlapping scenarios |
Red flags:
Distribution checks:
Apply these heuristics to verify P0/P1/P2 assignments:
| Heuristic | Expected Priority |
|---|---|
| First positive scenario for the feature's primary capability | P0 |
| Core happy-path functionality | P0 |
| Error handling / negative scenarios | P1 or P2 |
| Regression / backward compatibility | P1 |
| Edge cases / rare conditions | P2 |
| Integration with other features | P1 or P2 |
Red flags (MAJOR):
Red flags (MINOR):
What to check: Evaluate risks and limitations against the source Jira data and PR information.
For each risk:
For known limitations:
Red flags:
What to check: Evaluate whether the scope is appropriate for the feature described in Jira.
Process:
Red flags:
What to check: For each checkbox item in the Test Strategy list (II.2):
Classification validation:
If project config is loaded, use stp_rules.strategy.always_y for items that must always be checked,
and stp_rules.strategy.requires_justification_for_y for items that need justification when checked.
Otherwise, apply general rules:
Red flags:
Proactively challenge checked/unchecked states. Some items are checked with boilerplate sub-items when they should actually be unchecked (or vice versa).
Red flags (MAJOR) — Should be unchecked but is checked:
Red flags (MAJOR) — Should be checked but is unchecked:
stp_rules.upgrade.persistent_state_indicators.Red flags (MINOR) — Technology Challenges misuse:
Red flags (MAJOR) — Unchecked cross-referencing:
Red flags (MINOR) — Bare unchecked entries:
What to check: Compare metadata fields against Jira source data.
| Field | Validation |
|---|---|
| Enhancement(s) | Links resolve to actual enhancement proposals |
| Feature Tracking | Correct parent/feature issue from Jira Feature Link field |
| Epic Tracking | Matches the input Jira ID (Epic key + Parent key) |
| QE Owner(s) | TBD is acceptable for draft |
| Owning SIG | Matches Jira labels/components |
| Participating SIGs | Reasonable based on feature scope |
If project config is loaded, use stp_rules.metadata.sig_field to identify which metadata
field maps to the SIG ownership.
Red flags:
Note: Enhancement link validation and stale reference checks are now consolidated under Rule N (Link/Reference Validation). Report link-related findings there.
Generate the review report as markdown:
# STP Review Report: {JIRA_ID}
**Reviewed:** {STP_FILE_PATH}
**Date:** {YYYY-MM-DD}
**Reviewer:** QualityFlow Automated Review (v1.1.0)
**Review Rules Schema:** {review_rules._extraction_metadata.schema_version or "N/A"}
---
## Verdict: {APPROVED | APPROVED_WITH_FINDINGS | NEEDS_REVISION}
## Summary
| Metric | Value |
|:-------|:------|
| Dimensions reviewed | 7/7 |
| Critical findings | {count} |
| Major findings | {count} |
| Minor findings | {count} |
| Confidence | {HIGH / MEDIUM / LOW} |
---
## Findings by Dimension
### Dimension 1: Rule Compliance (Rules A-P)
| Rule | Status | Finding |
|:-----|:-------|:--------|
| A — Abstraction Level | {PASS/WARN/FAIL} | {description} |
| A.2 — Language Precision | {PASS/WARN/FAIL} | {description} |
| B — Section I Meta-Checklist | {PASS/WARN/FAIL} | {description} |
| C — Prerequisites vs Scenarios | {PASS/WARN/FAIL} | {description} |
| D — Dependencies | {PASS/WARN/FAIL} | {description} |
| E — Upgrade Testing | {PASS/WARN/FAIL} | {description} |
| F — Version Derivation | {PASS/WARN/FAIL} | {description} |
| G — Testing Tools | {PASS/WARN/FAIL} | {description} |
| G.2 — Environment Specificity | {PASS/WARN/FAIL} | {description} |
| H — Risk Deduplication | {PASS/WARN/FAIL} | {description} |
| I — QE Kickoff Timing | {PASS/WARN/FAIL} | {description} |
| J — One Tier Per Row | {PASS/WARN/FAIL} | {description} |
| K — Cross-Section Consistency | {PASS/WARN/FAIL} | {description} |
| L — Section Content Validation | {PASS/WARN/FAIL} | {description} |
| M — Deletion Test | {PASS/WARN/FAIL} | {description} |
| N — Link/Reference Validation | {PASS/WARN/FAIL} | {description} |
| O — Untestable Aspects | {PASS/WARN/FAIL} | {description} |
| P — Testing Pyramid Efficiency | {PASS/WARN/FAIL} | {description} |
### Dimension 2: Requirement Coverage
| Metric | Value |
|:-------|:------|
| Acceptance criteria covered | {X}/{Y} |
| Linked issues reflected | {X}/{Y} |
| Negative scenarios present | {YES/NO} |
| Coverage gaps found | {count} |
**Gaps identified:**
{list of uncovered acceptance criteria or use cases, if any}
### Dimension 3: Scenario Quality
| Metric | Value |
|:-------|:------|
| Total scenarios | {count} |
| Tier 1 | {count} |
| Tier 2 | {count} |
| P0 | {count} |
| P1 | {count} |
| P2 | {count} |
| Positive scenarios | {count} |
| Negative scenarios | {count} |
**Scenario-level findings:**
{list of specific findings per scenario row, if any}
### Dimension 4: Risk & Limitation Accuracy
{findings}
### Dimension 5: Scope Boundary Assessment
{findings}
### Dimension 6: Test Strategy Appropriateness
{findings}
### Dimension 7: Metadata Accuracy
{findings}
---
## Recommendations
{numbered list of actionable recommendations, ordered by severity}
1. **[CRITICAL]** {recommendation}
2. **[MAJOR]** {recommendation}
3. **[MINOR]** {recommendation}
---
## Confidence Notes
| Factor | Status |
|:-------|:-------|
| Jira source data available | {YES/NO} |
| Linked issues fetched | {YES/NO} |
| PR data referenced in STP | {YES/NO} |
| All STP sections present | {YES/NO} |
| Template comparison possible | {YES/NO} |
| Project review rules loaded | {YES/NO} |
**Confidence rationale:** {explanation of why confidence is HIGH/MEDIUM/LOW}
| Verdict | Criteria |
|---|---|
APPROVED | 0 critical findings, 0 major findings |
APPROVED_WITH_FINDINGS | 0 critical findings, 1+ major or minor findings |
NEEDS_REVISION | 1+ critical findings |
| Level | Criteria |
|---|---|
HIGH | Jira data available, all sections present, template comparison done, review rules default_ratio <= 0.30 |
MEDIUM | Jira data available but incomplete, OR template not available, OR review rules default_ratio <= 0.60 |
LOW | Jira data unavailable (content-only review), OR review rules default_ratio > 0.60 |
When review_rules._extraction_metadata.default_ratio > 0.50, include a note in
Confidence Notes: "Review precision reduced: {X}% of rules using generic defaults.
Consider adding project-specific review_rules.yaml or enabling repo_files_fetch."
End of STP Reviewer Skill