一键导入
output-validator
Validate STP document structure and content completeness
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Validate STP document structure and content completeness
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
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
| name | output-validator |
| description | Validate STP document structure and content completeness |
| model | claude-opus-4-6 |
Phase: Post-Processing User-Invocable: false
Validate STP document structure and content completeness.
Invoked by the document-formatter subagent to verify the STP before saving.
document: |
# {project_context.stp_header}
## **Feature Name - Quality Engineering Plan**
### **Metadata & Tracking**
...
validation_results:
valid: true
structure:
document_header: pass
feature_title: pass
all_sections_present: pass
horizontal_rules: pass
list_items:
metadata: pass # 6 bullet items
section_i_1: pass # 5 checkbox items
section_i_3: pass # 5 checkbox items
section_ii_1_out_of_scope: pass # At least 1 checkbox item
section_ii_2: pass # 13 checkbox items across 4 categories
section_ii_3: pass # 10 bullet items
section_ii_5: pass # 7 checkbox categories with sub-items
section_iii: pass # No minimum - comprehensive coverage
content:
no_code_blocks: pass
valid_test_tiers: pass
unique_requirement_summaries: pass
no_generic_scenarios: pass
errors: []
warnings:
- "Section II.5 'Other' risk category is empty - consider adding risks if applicable"
total_checks: 18
passed: 17
failed: 0
warnings: 1
Read project_context.stp_header for the expected document header.
Example: # {project_context.stp_header}
Check: First line matches the configured stp_header value.
Read project_context.feature_title_format for the expected format if configured.
Example: ## **[Any Title] - Quality Engineering Plan**
Check: Second non-empty line matches pattern
Check presence of all sections in order:
Expected: --- after Feature Overview, after Section I.3 (before Section II), after Section III (before Section IV)
| Section | Format | Required Items | Check Method |
|---|---|---|---|
| Metadata | Bullet list (- **Field:**) | 6 | Count lines matching - ** pattern |
| I.1 | Checkbox list (- [ ]) | 5 | Count lines matching - [ ] with bold label |
| I.3 | Checkbox list (- [ ]) | 5 | Count lines matching - [ ] with bold label |
| II.1 Out of Scope | Checkbox list (- [ ]) | At least 1 | Count - [ ] lines under Out of Scope heading |
| II.2 Test Strategy | Grouped checkbox list | 13 total | Count across 4 category groups (see below) |
| II.3 Test Environment | Bullet list (- **Label:**) | 10 | Count lines matching - ** pattern |
| II.5 Risks | Checkbox list with sub-items | 7 categories | Count - [ ] top-level items |
| III.1 | Bullet list (- **[Jira-ID]**) | No minimum | Count requirement entries (no minimum enforced) |
| Category | Expected Items |
|---|---|
| Functional | 4 (Functional, Automation, Regression, Upgrade) |
| Non-Functional | 5 (Performance, Scale, Security, Usability, Monitoring) |
| Integration & Compatibility | 3 (Compatibility, Dependencies, Cross Integrations) |
| Infrastructure | 1 (Cloud Testing) |
Check: Each category heading is present as a bold sub-heading, followed by its checkbox items.
Check: Document does not contain:
``` code fence blocksCheck: All tier references in Section III.1 use inline format:
[Tier 1][Tier 2]Invalid values:
Tier 1 (Functional) (old column format)Tier 2 (End-to-End) (old column format)Functional, API, Integration, Security, Upgrade (not valid tier names)Unit Tests (not used in Section III mapping)Check: In Section III.1, each requirement entry is unique
- **[Jira-ID]** line describes a specific capabilityCheck: Test scenarios do not include:
Check: Each requirement entry follows the bullet-based format:
- **[Jira-123]** -- As a user... (requirement line with Jira ID in bold)*Test Scenario:* sub-item describing the test*Priority:* sub-item with priority valueCheck document does NOT contain:
| Severity | Handling |
|---|---|
| Error | Must be fixed before save |
| Warning | Document can be saved, but should be addressed |
| Info | Optional improvement suggestion |
Some issues can be auto-fixed:
| Issue | Auto-Fix |
|---|---|
| Wrong tier format | Convert "Tier 1 (Functional)" to "[Tier 1]" |
| Missing horizontal rule | Insert --- at expected positions |
| Trailing whitespace | Remove |
| Old metadata field name | Rename "Feature in Jira" to "Feature Tracking", "Jira Tracking" to "Epic Tracking" |
Issues that CANNOT be auto-fixed: