Logo Acceptance Criteria

Acceptance Criteria

Cộng đồng
jdm4pku
acceptance-criteria

Write testable acceptance criteria and acceptance tests for requirements using Given/When/Then, checklist, and rule-based formats. Use when defining the conditions that prove a requirement is correctly implemented.

Tổng quan

Nhà phát hànhjdm4pku
Kho mãRE-Skills
Tên kỹ năngacceptance-criteria
Sao
27
Bản fork
1
Tệp đi kèm
2
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 2 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được jdm4pku công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Acceptance Criteria trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/jdm4pku/RE-Skills/tree/main/skills/acceptance-criteria
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jdm4pku/RE-Skills.git /tmp/RE-Skills
mkdir -p .claude/skills
cp -r /tmp/RE-Skills/skills/acceptance-criteria .claude/skills/acceptance-criteria
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Acceptance Criteria trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Acceptance Criteria ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Acceptance Criteria với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

Purpose

Create acceptance criteria that define the specific, testable conditions under which a requirement is considered satisfied. Use this to close the gap between "what does this requirement mean?" and "how do we prove it works?"

This is not test case writing -- acceptance criteria define what to verify. Test cases define how to verify it. Acceptance criteria live in requirements; test cases live in test plans.

Key Concepts

Acceptance Criteria vs. Acceptance Tests

AspectAcceptance CriteriaAcceptance Tests
WhatConditions for satisfactionProcedures to verify conditions
Who writesBA / Requirements EngineerQA / Test Engineer
WhenDuring requirements specificationDuring test planning
FormatGiven/When/Then, checklistsStep-by-step test procedures with expected results
Lives inSRS, user storiesTest plan, test management tool

Three Formats for Acceptance Criteria

1. Given/When/Then (Gherkin) Best for behavior-driven scenarios with clear preconditions and triggers:

Given [precondition],
When [action],
Then [expected result].

2. Checklist Best for straightforward pass/fail conditions:

- [ ] [Condition that must be true]
- [ ] [Another condition that must be true]

3. Rule-Based Best for business rules with multiple examples:

Rule: [Business rule statement]
Example: [Input] -> [Expected output]
Example: [Different input] -> [Different expected output]

SMART Acceptance Criteria

Every acceptance criterion should be:

  • Specific -- Describes a single, concrete condition
  • Measurable -- Has a pass/fail determination
  • Achievable -- Technically feasible
  • Relevant -- Traces to a requirement or user need
  • Testable -- A tester can verify it without interpretation

Anti-Patterns

  • The Obviously True -- "The system shall function correctly." Every requirement should function correctly.
  • The Subjective -- "The interface shall be attractive." Whose taste?
  • The Implementation Detail -- "The system shall use a 256-bit AES encryption key stored in a hardware security module." That is design, not a requirement.
  • The Infinite Set -- "The system shall handle all possible inputs." Impossible to test.

Application

Step 1: Start with the Requirement

Take your requirement (user story, shall statement, or use case step) and ask:

  • "How will we know this requirement is satisfied?"
  • "What does the user expect to see when this works?"
  • "What does failure look like?"

Step 2: Choose the Right Format

Use This FormatWhen
Given/When/ThenThe behavior depends on preconditions and has clear trigger/response
ChecklistSimple pass/fail conditions without complex preconditions
Rule-BasedA business rule with multiple scenarios or boundary conditions

Step 3: Write the Criteria

Given/When/Then example:

markdown
**Requirement:** CT.ALERT.EXPIRY.1 -- The system shall send an email
alert to the responsible lab technician when a chemical is 30 days
from expiration.

**Acceptance Criteria:**

AC-1: Given a chemical with expiration date exactly 30 days from today,
      and a lab technician is assigned to its storage location,
      When the daily alert job runs,
      Then an email is sent to the assigned technician containing the
      chemical name, CAS number, location, and expiration date.

AC-2: Given a chemical with expiration date exactly 30 days from today,
      and no technician is assigned to its storage location,
      When the daily alert job runs,
      Then an email is sent to the lab manager instead.

AC-3: Given a chemical with status "Disposed,"
      and expiration date is 30 days from today,
      When the daily alert job runs,
      Then no alert is sent for that chemical.

Checklist example:

markdown
**Requirement:** CT.CATALOG.SEARCH.1 -- Search for chemicals by name,
CAS number, location, or expiration date range.

**Acceptance Criteria:**
- [ ] Search by partial chemical name returns all matching records
- [ ] Search by exact CAS number returns the specific record
- [ ] Search by storage location returns all chemicals in that location
- [ ] Search by date range returns chemicals expiring within that range
- [ ] Combining multiple criteria narrows results (AND logic)
- [ ] Empty search results display "No chemicals found" message
- [ ] Search results display within 2 seconds for 50,000 records

Rule-based example:

markdown
**Requirement:** BR-002 -- Volume discount calculation

**Acceptance Criteria:**

Rule: Discount is calculated on per-SKU order quantity, not total order.
  Example: 50 units of SKU-A -> 0% discount (below 100 threshold)
  Example: 150 units of SKU-A -> 5% discount on all 150 units
  Example: 50 units SKU-A + 100 units SKU-B -> 0% on A, 5% on B
  
Rule: Discount applies to pre-tax unit price.
  Example: SKU-A at $10/unit, 200 units -> $10 * 0.95 * 200 = $1,900

Step 4: Validate Criteria Quality

For each acceptance criterion, verify:

  • A tester can determine pass/fail without asking the BA for clarification
  • The criterion tests one specific condition (not multiple combined)
  • Boundary conditions are covered (what about 29 days? 31 days? exactly 30?)
  • Negative cases are included (what should NOT happen)
  • The criterion traces to the parent requirement

Step 5: Review with Stakeholders

Walk through acceptance criteria with:

  • Developer -- "Is this clear enough to implement?"
  • Tester -- "Can you write test cases from these?"
  • User -- "Does this match what you expect the system to do?"

Examples

See examples/sample.md for complete acceptance criteria sets.

Common Pitfalls

Pitfall 1: No Negative Test Cases

Symptom: All acceptance criteria describe what the system should do. None describe what it should not do.

Consequence: Error paths, edge cases, and security concerns are not tested.

Fix: For every positive criterion, ask "What should NOT happen?" Add at least one negative criterion per requirement.


Pitfall 2: Criteria Too Vague to Test

Symptom: "System responds quickly" or "Data is displayed correctly."

Consequence: Tester cannot determine pass/fail. "Quickly" to whom? "Correctly" by what standard?

Fix: Quantify: "Response within 2 seconds" and "Displays all 6 fields in the specified order."


Pitfall 3: Criteria Test Implementation, Not Behavior

Symptom: "The system uses PostgreSQL to store the record" or "The API returns a 200 status code."

Consequence: Criteria are coupled to implementation. If the database changes, the criteria break even though behavior is the same.

Fix: Test behavior: "The record is retrievable after save" and "The system confirms successful submission."

References

Related Skills

  • skills/user-story-re/SKILL.md -- Acceptance criteria are part of every user story
  • skills/use-case/SKILL.md -- Acceptance criteria can be derived from use case flows
  • skills/business-rule/SKILL.md -- Rule-based criteria often implement business rules
  • skills/requirements-validation-process/SKILL.md -- Acceptance criteria are validated during review

External Frameworks

  • Dan North, "Introducing BDD" (2006) -- Given/When/Then format
  • Karl Wiegers & Joy Beatty, Software Requirements, Third Edition (2013) -- Chapter 17: Validating the Requirements
  • Gojko Adzic, Specification by Example (2011) -- Rule-based acceptance criteria

Skill type: Component Dependencies: None Used by: skills/user-story-re/SKILL.md, skills/requirements-validation-process/SKILL.md

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Acceptance Criteria làm được gì?

Write testable acceptance criteria and acceptance tests for requirements using Given/When/Then, checklist, and rule-based formats. Use when defining the conditions that prove a requirement is correctly implemented.

Vì sao nên dùng Acceptance Criteria trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Acceptance Criteria là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Acceptance Criteria trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/jdm4pku/RE-Skills/tree/main/skills/acceptance-criteria. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Acceptance Criteria?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Acceptance Criteria với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Acceptance Criteria với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Acceptance Criteria có miễn phí không?

Kỹ năng này được jdm4pku phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇