AgentSkillsCN

wi-writer

撰写条理清晰的工作项,明确各项验收标准。适用于以下情况:(1) 创建工作项;(2) 添加验收标准;(3) 用户提及工作项、任务、WI 或票证时使用。

SKILL.md
--- frontmatter
name: wi-writer
description: "Write well-structured work items with proper acceptance criteria. Use when: (1) Creating work items, (2) Adding acceptance criteria, (3) User mentions work item, task, WI, or ticket"

Work Item Writer

Write work items with clear descriptions and actionable acceptance criteria.

Quick Reference

bash
govctl work new --active "<title>"
govctl work add <WI-ID> acceptance_criteria "<category>: <description>"
govctl work add <WI-ID> refs RFC-NNNN
govctl work tick <WI-ID> acceptance_criteria "<pattern>" -s done
govctl work move <WI-ID> done

Work Item Structure

Title

Concise, action-oriented. Describes what will be done.

  • Good: "Add validation for clause cross-references"
  • Bad: "Fix stuff" or "Work on the thing"

Description

Replace the placeholder immediately. One paragraph explaining:

  • What the work accomplishes
  • Why it's needed
  • Any relevant context

Acceptance Criteria

Every criterion MUST have a category prefix for changelog generation:

PrefixChangelog SectionUse for
add:AddedNew features, capabilities
changed:ChangedModifications to existing behavior
deprecated:DeprecatedFeatures marked for removal
removed:RemovedDeleted features
fix:FixedBug fixes
security:SecuritySecurity-related changes
chore:(excluded)Internal tasks, tests, maintenance
bash
# Feature work
govctl work add <WI-ID> acceptance_criteria "add: Implement clause validation"
govctl work add <WI-ID> acceptance_criteria "add: Error messages include clause ID"

# Bug fix
govctl work add <WI-ID> acceptance_criteria "fix: Duplicate clause detection"

# Internal
govctl work add <WI-ID> acceptance_criteria "chore: All tests pass"
govctl work add <WI-ID> acceptance_criteria "chore: govctl check passes"

References

Link to governing artifacts:

bash
govctl work add <WI-ID> refs RFC-0001
govctl work add <WI-ID> refs ADR-0023

Writing Rules

Acceptance Criteria Quality

Each criterion should be:

  • Specific — "Add validate_refs() function" not "Add validation"
  • Testable — Can be verified as done/not-done with no ambiguity
  • Independent — Each criterion stands alone
  • Categorized — Always include the category prefix

Completion Flow

Work items cannot be marked done without ticking all criteria:

bash
# Tick criteria as you complete them
govctl work tick <WI-ID> acceptance_criteria "<pattern>" -s done

# When all criteria are done, close the work item
govctl work move <WI-ID> done

The chore: Pattern

Always add at least one chore: criterion for validation:

bash
govctl work add <WI-ID> acceptance_criteria "chore: govctl check passes"

This ensures validation is an explicit gate, not an afterthought.

Common Mistakes

MistakeFix
Missing category prefixAlways use add:, fix:, chore:, etc.
Placeholder description left inReplace immediately with real description
Vague criteria: "Feature works"Specific: "add: CLI returns exit code 0 on success"
No chore: criterionAdd "chore: govctl check passes" or "chore: all tests pass"
No refs to governing artifactsLink RFCs/ADRs with work add <WI-ID> refs