en un clic
long-task-ats
// Use when design doc exists but no ATS doc and no feature-list.json - generate a global Acceptance Test Strategy mapping every requirement to acceptance scenarios with category constraints
// Use when design doc exists but no ATS doc and no feature-list.json - generate a global Acceptance Test Strategy mapping every requirement to acceptance scenarios with category constraints
| name | long-task-ats |
| description | Use when design doc exists but no ATS doc and no feature-list.json - generate a global Acceptance Test Strategy mapping every requirement to acceptance scenarios with category constraints |
LANGUAGE RULE: You MUST respond to the user in Chinese (Simplified). All generated documents, reports, and user-facing output must be written in Chinese. Skill names, code identifiers, and JSON field names remain in English.
Take the approved SRS, Design, and UCD (if applicable) as input. Produce a global Acceptance Test Strategy document that maps every requirement to acceptance scenarios with required test categories — constraining downstream feature-st (test case derivation via srs_trace).
Announce at start: "I'm using the long-task-ats skill to generate the Acceptance Test Strategy."
Do NOT invoke any implementation skill, write any code, scaffold any project, run init_project.py, or take any implementation action until the ATS document is approved. This applies to EVERY project regardless of perceived simplicity.Without a global acceptance test strategy, per-feature ST test cases suffer from:
ATS front-loads these decisions so Init and feature-st have concrete, auditable constraints.
| Project Size | Features | ATS Depth |
|---|---|---|
| Tiny | 1-5 | Skip standalone ATS — embed a simplified mapping table in the design doc's Testing Strategy section (section 7); router detects *-ats.md absence + ≤5 features → auto-skip to Init |
| Small | 5-15 | Lightweight standalone ATS — sections 1-3 only (scope, mapping table, category strategies); skip sections 4-6 |
| Medium | 15-50 | Full ATS document — all 6 sections |
| Large | 50-200+ | Full ATS + detailed per-subsystem integration matrices + risk heat map |
Auto-skip rule for Tiny projects: If the design document exists and the SRS has ≤ 5 functional requirements (FR-xxx), this skill embeds the ATS mapping table into the design doc's testing strategy section and creates a minimal docs/plans/*-ats.md stub containing only a reference to that section. The router then detects the ATS stub and proceeds to Init.
You MUST create a TodoWrite task for each step and complete them in order:
docs/plans/*-srs.mddocs/plans/*-design.mddocs/plans/*-ucd.md (if it exists — only for UI projects)docs/templates/ats-template.mdFrom the SRS, extract a complete list of:
Count FR-xxx requirements. If ≤ 5, apply the Tiny project auto-skip rule (see Scaling Guide above).
For each FR/NFR/IFR, generate one or more acceptance scenarios with:
| Req ID | Requirement Summary | Acceptance Scenarios | Required Categories | Priority | Notes |
|--------|---------------------|----------------------|---------------------|----------|-------|
| FR-001 | User login | Normal login/wrong password/account lockout/session expiry | FUNC,BNDRY,SEC | Critical | Handles user input→SEC required |
| NFR-001 | Response time<200ms | P95 latency/concurrent load/degradation/cold start | PERF | High | Threshold: P95<200ms @100 concurrent |
| FR-010 | Search results page | Search/empty results/pagination/sorting/filtering | FUNC,BNDRY,UI | High | ui:true→UI required |
Category assignment rules:
| Condition | Required Categories |
|---|---|
| All FRs | FUNC + BNDRY (at minimum) |
| Handles user input/authentication/authorization/external data | + SEC |
Corresponds to a ui: true feature | + UI |
| Linked to NFR-xxx with performance metrics | + PERF |
Automation feasibility assessment (optional column 自动化可行性):
For each acceptance scenario, assess whether it can be fully automated with the project's tech stack:
Auto (default) — standard test tooling can execute and verify (CLI, API, Chrome DevTools MCP)Manual: physical-device — requires hardware access (USB, printer, IoT device)Manual: visual-judgment — requires human visual assessment beyond automated screenshot comparisonManual: external-action — requires external human action (receive email, make phone call, approve in third-party system)Manual: other: {description} — other reasonThis column propagates downstream: Feature-ST reads it to set 已自动化: No + 手动测试原因 on derived test cases. The human will be interrupted via AskUserQuestion during Feature-ST execution to perform and report manual test results.
Conservative flagging: Only mark as Manual when automation is genuinely impossible, not merely difficult. Chrome DevTools MCP covers most UI testing; mock services cover most external dependencies. Reserve Manual for true gaps.
For each test category, specify the strategy:
For each NFR-xxx with measurable thresholds:
| NFR ID | Test Method | Tool | Pass Criteria | Load Parameters | Related Feature |
|--------|---------|------|---------|---------|-------------|
| NFR-001 | Load test | k6/locust/ab | P95 < 200ms | 100 concurrent, 60s ramp | Feature 15, 16 |
| NFR-002 | Memory profiling | tracemalloc/heapdump | RSS < 512MB | 10K records | Feature 8 |
Identify critical data flow paths that span multiple features:
| Scenario ID | Description | Features Involved | Data Flow Path | Verification Points | ST Phase Coverage |
|-------------|-------------|-------------------|----------------|---------------------|-------------------|
| INT-001 | User register → login → first action | F1, F2, F5 | POST /register → POST /login → GET /dashboard | Session propagation, data consistency | System ST |
§6.2-driven integration scenario derivation: For each row in Design §6.2 Internal API Contracts:
Assess risk per requirement and assign test depth:
| Risk Area | Risk Level | Impact Scope | Test Depth | Rationale |
|-----------|------------|--------------|------------|-----------|
| User authentication | High | System-wide | Deep (SEC+FUNC+BNDRY) | Security boundary |
| Data import | Medium | Feature 3-5 | Standard (FUNC+BNDRY) | Data integrity |
Present each section to the user for approval (same pattern as design skill):
Present each section. Wait for user feedback. Incorporate changes before moving to the next.
For Small projects (5-15 features): Combine into 2 approval steps: (a) mapping table + categories, (b) everything else.
Dispatch the ATS reviewer subagent for independent quality review:
Agent(
subagent_type="general-purpose",
prompt="""
You are an independent ATS reviewer.
Read the reviewer definition at: agents/ats-reviewer.md
## Input Documents
- ATS document (draft): {ats_content}
- SRS document: {srs_path} — read it
- Design document: {design_path} — read it
- UCD document (if applicable): {ucd_path} — read it
## Task
Execute all review dimensions (R1-R8) defined in agents/ats-reviewer.md.
Output a structured review report.
Do NOT suggest improvements beyond defect identification.
Do NOT read any implementation code — this is a requirements-level review.
"""
)
Isolation guarantees:
Parse the subagent's review report:
AskUserQuestion:
If the review report contains [CROSS-REF CONFLICT] items (from R8 cross-validation):
[CROSS-REF CONFLICT] items from the Cross-Reference Conflicts table in the review reportAskUserQuestion:
| Conflict # | Decision | Applied To | User Rationale |
docs: resolve ATS cross-reference conflicts per user decision
docs/plans/YYYY-MM-DD-<topic>-ats.mddocs: add acceptance test strategy (ATS)
Maps N requirements to acceptance scenarios
Categories: FUNC, BNDRY, SEC, PERF, UI
Reviewed: [PASS / CONDITIONAL PASS with N gaps]
Once the ATS document is saved and committed:
long-task:long-task-init to scaffold the projectThe design doc (Section 7, Testing Strategy) describes the approach:
The ATS document describes the detailed mapping:
The design doc testing strategy section SHOULD reference the ATS document once it exists:
See `docs/plans/YYYY-MM-DD-<topic>-ats.md` for detailed requirement-to-test-category mapping.
long-task-increment skill (ATS Revision step)| Rationalization | Correct Response |
|---|---|
| "The SRS already has acceptance criteria, ATS is redundant" | SRS has business criteria; ATS maps them to test categories |
| "We'll figure out test categories during feature-st" | Ad-hoc category assignment leads to SEC/PERF gaps |
| "This project is too small for ATS" | Check Scaling Guide — Tiny projects auto-skip; Small projects get lightweight ATS |
| "NFR testing can be decided during ST phase" | NFR test methods must be specified upfront with tools and thresholds |
| "The review is overkill" | Independent review catches coverage gaps the author misses |
Called by: using-long-task (when design doc exists, no ATS doc, no feature-list.json) or long-task-design (Step 6)
Requires: Approved SRS at docs/plans/*-srs.md; Approved Design at docs/plans/*-design.md; optionally approved UCD at docs/plans/*-ucd.md
Chains to: long-task-init (after ATS approval)
Produces: docs/plans/YYYY-MM-DD-<topic>-ats.md
Downstream consumers:
long-task-init — reads ATS to set ui flags based on category assignmentlong-task-feature-st — reads ATS to enforce category requirements (via srs_trace lookup)long-task-st — uses ATS as baseline for RTM verificationlong-task-increment — updates ATS in place when requirements changeUse when SRS doc exists but no design doc and no feature-list.json - take the approved SRS as input and produce an architecture/design document focused on HOW to build it
Use when ATS doc exists (or auto-skipped) but feature-list.json not yet created - scaffold project artifacts and populate features from Design §10.2
Use when no SRS doc and no design doc and no feature-list.json exist - elicit requirements through structured questioning and produce a high-quality SRS document aligned with ISO/IEC/IEEE 29148
Use when starting any session in a long-task project - routes to the correct phase skill based on project state
Use when increment-request.json exists - collect incremental requirements, perform impact analysis, update design, and decompose new features
Use for on-demand deep exploration of an existing codebase - analyzes architecture, data flow, domain model, API surface, dependencies, and code health