| name | opentest-workflow |
| description | Standardize OpenTest QA artifact generation, review gates, bilingual outputs, and output folder organization. Use when Codex works on OpenTest-style testing workflows, test proposals, requirement analysis, test points, test cases, test reports, Claude slash commands for OpenTest, or any task involving OpenTest artifact structure and quality gates. |
OpenTest Workflow
Core Rules
- Treat OpenTest as a staged QA artifact pipeline. Generate artifacts directly into their stage folders.
- Do not dump new artifacts into
output/ root and do not depend on a later cleanup step.
- Keep helper scripts under
scripts/, not under output/.
- Use Claude slash commands under
.claude/commands/ as the executable prompt specs for each stage.
- Use repository
docs/ only for human-facing documentation; do not load diagrams or long docs unless the user asks for explanation.
Required Output Layout
output/
00_requirement/
01_proposal/
02_analysis/
03_test_points/
04_cases/
05_mindmap/
06_report/
99_archive/
_legacy_tools/
Bilingual Policy
For every major Markdown artifact, create aligned versions:
*.ai.md English, strict, AI-oriented source for downstream commands
*.zh-CN.md Chinese, review-oriented source for humans
Keep IDs aligned across both versions, including workflow IDs, testable item IDs, test case IDs, dataset IDs, risk IDs, and pending question IDs.
Quality Gates
Do not generate executable cases until proposal and analysis are case-ready:
Case Generation Ready: Yes
Readiness Score: >= 90
The proposal/analysis must include tested object boundary, requirement evidence, workflow plan, P0/P1/P2 priorities, data format boundary, validation oracle, test data matrix, abnormal flows, coverage gaps, pending questions, and readiness score.
Command Flow
/opentest-doctor
/opentest-run-all <requirement file or folder>
/opentest-prepare-requirement <requirement file or folder>
/opentest-new output/00_requirement/requirement_text.ai.md
/opentest-revise-proposal output/01_proposal/test_proposal.ai.md
/opentest-analysis output/01_proposal/test_proposal.ai.md
/opentest-points output/02_analysis/requirement_analysis.ai.md
/opentest-generate-cases output/02_analysis/requirement_analysis.ai.md P0
/opentest-generate-cases output/02_analysis/requirement_analysis.ai.md P1
/opentest-generate-cases output/02_analysis/requirement_analysis.ai.md P2
/opentest-localize-cases output/04_cases/test_cases.json
/opentest-validate-cases output/04_cases/test_cases.json
/opentest-generate-excel output/04_cases/test_cases.json output/04_cases/test_cases.xlsx
/opentest-generate-xmind output/04_cases/test_cases.json
/opentest-report output/04_cases/test_cases.xlsx
/opentest-archive output output/99_archive
Use /opentest-run-all when the user wants an automated end-to-end run. It must still obey the analysis gate, priority-file validation, chunked localization, and final validation rules.
Stage Rules
- Requirement preparation normalizes PDF, OCR text, screenshots, or mixed requirement folders into
output/00_requirement/.
- Requirement analysis must be workflow-driven, not a flat module list.
- Test points must be grouped by P0/P1/P2 workflows and must respect data format boundaries and validation oracles.
- Case generation creates stable English JSON only. Chinese display fields are added later.
- Generate cases by priority (
P0, P1, P2) before merging. Do not create large bilingual JSON in one pass.
priority, workflow_priority, and the workflow_id prefix must match (P0-*, P1-*, P2-*).
- Every case must have a non-empty
oracle.
- Localize in chunks of 25 cases or fewer. If localization changes case count, IDs, English fields, priorities, or workflow IDs, discard that run and retry with a smaller chunk.
- Run deterministic validation before Excel export.
Excel Rules
The workbook must be human-readable by default:
Summary: overview counts by priority and type.
用例总表: Chinese-first execution sheet with only review/execution columns.
AI_Source: full bilingual/English source fields for traceability.
Do not put every English and Chinese field side by side on the primary execution sheet.
Legacy Cleanup
Only use cleanup rules for old projects that already contain messy root-level outputs. For new work, write directly to staged folders. Do not delete locked files; ask the user to close Excel, WPS, or preview panes first.