AgentSkillsCN

spec-quality

使用 11 项评分标准、平衡性检查与常见问题表来评估规范质量。适用于在实施前审查规范,或在质量关口进行验证时使用。

SKILL.md
--- frontmatter
name: spec-quality
description: Assess specification quality using 11-item rubric, balance check, and common problems table. Use when reviewing specs before implementation or verifying quality gates.

Specification Quality

Criteria and tools for evaluating specification quality.

Applicability Rubric

ConditionPassFail
Spec review requestedNeed to assess spec qualityNo review needed
Pre-implementation checkSpec about to be implementedAlready implemented
Quality gateSpec must meet minimum bar before proceedingQuality already verified
Improvement cycleIterating on spec after feedbackNo prior version to compare against

Apply when: Any condition passes

Core Principles

Specification Rubric

Rate each item Y (yes) or N (no).

Intent Layer

#CriterionRequiredY/N
1Purpose stated in one sentence?
2Target users identified?
3Impacts (behavior changes) identified?
4Success criteria measurable or verifiable?

Design Layer

#CriterionRequiredY/N
5Each documented feature has defined behavior?
6Error scenarios cover all documented features?
7Interaction points (internal and external) have explicit contracts?
8Implementer can build without clarifying questions?

Consistency Layer

#CriterionRequiredY/N
9Key terms defined and used consistently throughout?
10Recurring situations have named patterns?
11Two implementers would produce compatible results?

Passing Criteria:

  • Any Required N → Must address before implementation.
  • All Required Y → Specification meets Minimal level. Usable for small teams.
  • All Required Y + #3,4 Y → Specification meets Usable level. Stop unless improving quality.
  • All items Y → Specification meets Complete level. Stop.
  • Non-required N → Address only if relevant to project scope.

Quality Level Classification

LevelCriteriaSuitable For
MinimalAll Required items Y (#1,2,5,6,8)Small team, rapid iteration
UsableAll Required Y + #3,4 YStandard development
CompleteAll 11 items YMulti-team, external consumers
Over-specifiedAll Y but Balance Check failsNeeds trimming of implementation details

Balance Check (for review verification; see spec-principles Specify vs Leave Open for writing decisions)

QuestionDesign Decision (specify)Implementation Detail (open)
User-visible?Error messages, CLI outputLog format, variable names
Affects module contracts?Interface signaturesInternal functions
Could cause inconsistent interpretation?Error handling pattern, Business rulesAlgorithm choice, Performance optimization

Test: "If implemented differently, would users notice or would modules conflict?"

Warning signs of over-specification: internal implementation details, algorithm choices (unless user-visible or cross-implementer consistency required)

Warning signs of under-specification: vague terms ("appropriate", "reasonable"), undefined behavior for reachable states

Common Problems (diagnosis; see spec-principles Anti-Patterns for prevention)

ProblemSymptomCauseFix
Missing intentTechnical tasks instead of user valueNo purpose/users definedAdd intent layer
Undefined scenariosInconsistent edge case behaviorIncomplete state coverageEnumerate all combinations
Over-specificationImplementer constrained unnecessarilyImplementation details includedKeep only observable behaviors
Inconsistent patternsSimilar problems solved differentlyNo shared conventionsExtract and reference patterns
Inconsistent terminologySame concept has multiple namesNo shared vocabularyDefine key terms, use consistently
Vague languageAmbiguous interpretation"Handle appropriately"Use specific values or criteria
Hidden assumptionsWorks only in specific contextUnstated prerequisitesMake all assumptions explicit
Explanatory notes"Note: because..." appearsMixing rationale with specRewrite as direct statement
Phase markers"(Future)", "(v2)" in specMixing planning with specRemove; spec describes target state

Completion Rubric

Before Quality Assessment

CriterionPassFail
Full spec readEntire specification read and understoodPartial or skimmed reading
Project context knownUnderstand team size, project stage, consumersNo context about project
Target quality level selectedChose Minimal/Usable/Complete based on contextNo target level determined

During Quality Assessment

CriterionPassFail
All 11 items evaluatedEvery rubric item scored Y or NItems skipped or unclear
Evidence for each NEach N has specific evidence from specN without justification
Balance Check completedOver/under-specification assessedBalance not checked
Common Problems scannedAll 9 problem types checkedProblems check incomplete

After Quality Assessment

CriterionPassFail
Prioritized findingsRequired N items listed before non-requiredUnprioritized list
Actionable recommendationsEach finding has a specific fix suggestionVague improvement advice
Clear verdictQuality level determined (Minimal/Usable/Complete/Over-specified)No clear assessment