用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/AsiaOstrich/universal-dev-standards --skill ac-coverage命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
[UDS] 以 Claude 原生 Agent tool 编排多任务执行计划(DAG-based,无外部引擎)。 Use when: executing a plan.json file with parallel/sequential task dependencies. Keywords: orchestrate, plan, execute, DAG, task plan, 编排, 执行计划, 并行.
[UDS] 从 Spec 文档、OpenSpec 变更或自由文本需求生成 plan.json。 Use when: converting specifications into executable task plans for /orchestrate. Keywords: plan, spec, task plan, 计划, 规格, 任务, plan.json, DAG.
[UDS] AI 辅助 git push 安全层:质量门禁 + 协作护栏。 Use when: pushing commits, force pushing, pushing to protected branches, pushing feature branches. Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation, 推送, 保护分支, 质量门禁.
正在显示 SKILL.md
基于 SOC 职业分类
| name | ac-coverage |
| scope | universal |
| description | [UDS] Analyze AC-to-test traceability and coverage |
| allowed-tools | Read, Grep, Glob |
| argument-hint | [spec file path | 規格檔案路徑] |
Analyze Acceptance Criteria (AC) to test traceability and generate coverage reports.
分析驗收條件(AC)與測試之間的追蹤關係,並產生覆蓋率報告。
/coverage | 與 /coverage 的區別| Aspect | /coverage | /ac-coverage |
|---|---|---|
| Scope | Code-level (line/branch/function) | Requirement-level (AC-to-test) |
| Input | Source code + test runner | SPEC file + test annotations |
| Question | "How much code is tested?" | "Which AC have tests?" |
| Output | Coverage percentages | Traceability matrix + gap report |
@AC and @SPEC annotations using standard linking conventionsCoverage % = (covered + partial × 0.5) / total × 100Tests MUST reference their source AC using standard annotations:
// TypeScript/JavaScript
describe('AC-1: User login with valid credentials', () => {
// @AC AC-1
// @SPEC SPEC-001
it('should redirect to dashboard on successful login', () => { ... });
});
# Python
class TestAC1_UserLogin:
"""AC-1: User login with valid credentials
@AC AC-1
@SPEC SPEC-001
"""
def test_redirect_to_dashboard(self): ...
# BDD Feature
@SPEC-001 @AC-1
Scenario: User login with valid credentials
| Threshold | Default Value | Enforcement |
|---|---|---|
| Check-in | 80% | Required for feature branch merge |
| Release | 100% | Required for production release |
| Warning | 60% | Triggers coverage warning |
Thresholds are configurable via --threshold parameter or project configuration.
The generated report follows the standard format from core/acceptance-criteria-traceability.md:
# AC Coverage Report
**Specification**: SPEC-001 — Feature Name
**Generated**: 2026-03-18
**Coverage**: 75% (6/8 AC)
## Summary
| Status | Count | Percentage |
|--------|-------|------------|
| ✅ Covered | 5 | 62.5% |
| ⚠️ Partial | 2 | 25.0% |
| ❌ Uncovered | 1 | 12.5% |
## Traceability Matrix
| AC-ID | Description | Status | Test Reference |
|-------|-------------|--------|----------------|
| AC-1 | Login with valid credentials | ✅ | auth.test.ts:15 |
| AC-2 | Reject invalid credentials | ✅ | auth.test.ts:32 |
| ... | ... | ... | ... |
## Gaps
- **AC-8**: Social login — Blocked by OAuth sandbox
## Action Items
1. [ ] AC-8: Set up OAuth sandbox (ETA: TBD)
After /ac-coverage completes, the AI assistant should suggest:
AC 覆蓋率分析完成。建議下一步 / AC coverage analysis complete. Suggested next steps:
- 覆蓋率達標 → 執行
/checkin品質關卡 — Coverage meets threshold → Run/checkinquality gates- 有未覆蓋 AC → 執行
/derive-tdd補齊測試 — Uncovered AC found → Run/derive-tddto add tests- 有部分覆蓋 AC → 檢查缺少的邊界情況 — Partial AC → Review missing edge cases