Skill v1.0.0
currentLLM-judged scan95/100version: "1.0.0" name: long-task-feature-st description: "Use after quality gates pass in a long-task project — independently manages test environment lifecycle (start/cleanup), executes black-box acceptance testing per feature, generates ISO/IEC/IEEE 29119 compliant test case documents"
Feature-ST — SubAgent Dispatch
Delegate black-box acceptance testing to a SubAgent with fresh context. The main Agent only dispatches and parses the structured result — it never reads SRS/Design/UCD sections, test case documents, or execution output directly.
Announce at start: "I'm using the long-task-feature-st skill to run acceptance testing via SubAgent."
Step 1: Gather Path Parameters
Collect file paths from the current session state (do NOT read the file contents yourself):
feature_id— current feature IDfeature_json— current feature object from feature-list.json (compact JSON)design_doc_path— path todocs/plans/*-design.mdsrs_doc_path— path todocs/plans/*-srs.mducd_doc_path— path todocs/plans/*-ucd.md(only if"ui": true; omit otherwise)ats_doc_path— path todocs/plans/*-ats.md(if exists; omit otherwise)plan_doc_path— path todocs/features/YYYY-MM-DD-<feature-name>.md(from Feature Design step)env_guide_path—env-guide.md(if exists)quality_gates_json— quality_gates thresholds from feature-list.jsontech_stack_json— tech_stack from feature-list.jsonworking_dir— project working directoryst_case_template_path— from feature-list.json root (optional)st_case_example_path— from feature-list.json root (optional)
Step 2: Construct SubAgent Prompt
You are a Feature-ST execution SubAgent for black-box acceptance testing.## Your Task1. Read the execution rules: Read {skills_root}/long-task-feature-st/references/feature-st-execution.md2. Follow the checklist exactly (Steps 1-8): Load Context → Load Template → Derive Test Cases → Write Document → Validate → Execute → Visual Assessment (ui:true) → Cleanup3. Return your result using the Structured Return Contract at the end of the execution rules## Input Parameters- Feature ID: {feature_id}- Feature: {feature_json}- quality_gates: {quality_gates_json}- tech_stack: {tech_stack_json}- Working directory: {working_dir}## Document Paths (read these yourself using the Read tool)- Design doc: {design_doc_path}- SRS doc: {srs_doc_path}- UCD doc: {ucd_doc_path} (omit if not UI)- ATS doc: {ats_doc_path} (omit if not present)- Feature design plan: {plan_doc_path}- Environment guide: {env_guide_path}## Template/Example (optional)- ST case template: {st_case_template_path} (omit if not set)- ST case example: {st_case_example_path} (omit if not set)## Key Constraints- Do NOT mark the feature as "passing" in feature-list.json — only report results- You MUST manage service lifecycle: start before tests, cleanup after all tests- UI test cases require browser-based verification — no skip- If environment cannot start after 3 attempts, set Verdict to BLOCKED- ALL automated test cases must be executed one by one — no skipping- Manual test cases (已自动化: No) must NOT be executed by SubAgent — mark as PENDING-MANUAL in the traceability matrix and include full case details in the Manual Test Cases section of the return contract- For `"ui": true` features: after scripted tests, you MUST perform the Exploratory Visual Assessment (Step 8). Navigate the live application yourself via Chrome DevTools MCP, screenshot every page, click every interactive element, and grade against the 4 visual quality criteria. You are an independent QA evaluator, not the developer — be skeptical. A blank canvas with working buttons is a FAIL. "Display-only" elements that render but don't respond to interaction are Major defects.
Step 3: Dispatch SubAgent
Claude Code: Use the Agent tool:
Agent(description = "Feature-ST for feature #{feature_id}",prompt = [the constructed prompt above])
OpenCode: Use @mention syntax or the platform's native subagent mechanism with the same prompt content.
Step 4: Parse Result
Read the SubAgent's returned text and locate the ### Verdict: line:
- `### Verdict: PASS`
- Extract Next Step Inputs:
st_case_path,st_case_count,environment_cleaned - If feature is
"ui": true: extract Visual Assessment scores. If any score ≤ 2 or Display-Only Defects > 0, treat as FAIL (SubAgent should have already done this, but double-check). - Record in
task-progress.md: "Feature-ST: PASS ({N} cases, all passed)" — for ui:true, append visual assessment min score - If
environment_cleanedis false, run cleanup perenv-guide.mdyourself - Proceed to next step (Inline Check + Persist)
- `### Verdict: FAIL` or `### Verdict: BLOCKED`
- Read the Issues table — identify failure details
- Main Agent classifies each issue into one of two categories:
- Human manual testing (escalate immediately via
AskUserQuestion): missingrequired_configs[]secrets or credentials the AI cannot provide, UI verification requiring physical device or visual judgment beyond Chrome DevTools MCP capability, external human action required (third-party approval, manual account setup, hardware interaction) - AI self-fix (everything else): code bugs causing test failures, environment startup issues, port conflicts, dependency errors, external service errors, test execution failures due to implementation issues
- For AI self-fix issues: record in
task-progress.md, fix code or environment, re-dispatch SubAgent. No retry limit — AI must keep fixing until resolved. - For human manual testing issues: escalate via
AskUserQuestionwith issue details. Feature stays BLOCKED until human responds. - No bypass allowed — every failure must be resolved (by AI or human) before proceeding to Persist.
- `### Verdict: CLARIFY`
- Read the Specification Gaps table — extract all categorized questions
- Cross-check: read the Feature Design document's
## Clarification Addendumsection (atplan_doc_path). Filter out any gaps that were already resolved there — do NOT re-ask. - For genuinely new gaps: present to user via
AskUserQuestion:
``` Feature-ST Specification Gap: Feature #{feature_id} ({title})
While deriving acceptance test cases, {N} specification gap(s) were found that prevent writing correct expected results. For each, a suggested interpretation is provided — you may accept it, provide a different answer, or say "skip".
Gap 1 [{category}]: {description} Source: {source} Impact on test cases: {impact_on_test_cases} Suggested: {suggested_interpretation} → Your answer (or "accept" / "skip"):
Gap 2 [{category}]: ... ```
- Parse user responses and present approval summary:
``` Specification Gap Summary for Feature #{feature_id}:
- [{category}] {description} → Resolution: {answer}
Proceed with these resolutions? (yes / revise #N) ```
- If approved: construct a Specification Gap Addendum and re-dispatch SubAgent with original prompt PLUS:
``` ## Specification Gap Addendum (user-approved resolutions)
| # | Category | Original Gap | Resolution | Authority | |
|---|---|---|---|---|---|
| 1 | {category} | {description} | {resolution} | user-approved / assumed |
Apply these resolutions as authoritative. Derive test case expected results from these resolutions. Do NOT re-flag them as gaps. ```
- Record in
task-progress.md: "Feature-ST: CLARIFY ({N} gaps resolved) → re-dispatching" - Max 1 clarification round for Feature-ST (design-level ambiguities should have been caught in Feature Design; ST gaps are typically minor). If SubAgent returns
CLARIFYagain after receiving the addendum, set to BLOCKED and escalate: "Persistent specification gaps in Feature-ST. Consider usinglong-task-incrementto update source documents."
Step 4b: Manual Test Review Gate
After parsing the SubAgent's verdict, check for a ### Manual Test Cases section in the return.
If no manual test cases: skip directly to Step 4 outcome handling (PASS/FAIL/BLOCKED above).
If manual test cases exist:
- For each manual test case row, call
AskUserQuestionwith this format:
``` Manual Test Required: {Case ID}
Test Objective: {Test Objective from table} Reason for manual testing: {Manual Reason from table}
Preconditions: {Preconditions from table}
Test Steps: {Test Steps Summary from table}
Verification Points: {Verification Points from table}
Please perform this test and respond with: Line 1: PASS or FAIL Line 2: What you observed Line 3: Evidence (screenshot path, log excerpt, or "none")
Example response: PASS Login page renders correctly with all expected form fields /tmp/screenshots/login-page.png
To skip this test temporarily, respond: SKIP {reason} ```
- Parse the human response:
- First line: extract
PASS,FAIL, orSKIP - If first line cannot be parsed: re-prompt ONCE with:
Could not parse your response. Please respond with PASS, FAIL, or SKIP on the first line.
- If still unparseable after re-prompt: record as
BLOCKEDwith raw response as evidence
- Record result:
PASS→ update traceability matrix结果toMANUAL-PASS, record observationFAIL→ update traceability matrix结果toMANUAL-FAIL, record observationSKIP {reason}→ update traceability matrix结果toBLOCKED, record reason
(preserves the "no bypass" principle — BLOCKED is tracked, not silently skipped)
- After all manual cases are collected:
- Update the test case document (
docs/test-cases/feature-{id}-{slug}.md): - Set each manual case's traceability matrix
结果to the collected result - Update the Manual Test Case Summary section counts
- Re-evaluate the feature-level verdict:
- If SubAgent verdict was PASS AND all manual cases are
MANUAL-PASS→ final verdict PASS - If any manual case is
MANUAL-FAIL→ final verdict FAIL (same as automated failure) - If any manual case is
BLOCKED→ final verdict BLOCKED
- Proceed with the final verdict to Step 4 outcome handling (existing PASS/FAIL/BLOCKED logic above).
Integration
Called by: long-task-work (Step 9) Requires: Quality Gates passed (long-task-quality complete) Produces: docs/test-cases/feature-{id}-{slug}.md with executed results + structured summary Chains to: Inline Check + Persist (Worker Step 10 + 11)