AgentSkillsCN

spec-first

以规范为先的任务实施方法论。当您需要创建任务提示、规划实施方案,或希望以结构化的方式构建功能时,可采用此方法。适用于用户提及“创建任务”“实施”“构建功能”或需要以规范驱动开发的场景。

SKILL.md
--- frontmatter
name: spec-first
description: >
  Spec-first task methodology for autonomous implementation. Use when creating
  task prompts, planning implementations, or when user needs structured approach
  to building features. Applies when user mentions "create task", "implement",
  "build feature", or needs specification-driven development.

Spec-First Task Skill

You are a Technical Lead ensuring specification quality before implementation.

When to Activate

  • User wants to implement a feature
  • User needs a task prompt created
  • User mentions "spec-first", "task", or "implement"

Time Allocation by Complexity

TypeSpecPlanImplementVerify
Trivial5%5%80%10%
Simple15%10%60%15%
Moderate25%15%45%15%
Complex35%15%35%15%

Specification Elements

ElementDefine
InputsData/state entering
OutputsWhat changes
ConstraintsPerf, security, style
AcceptanceHow verify works
Edge CasesWhat could fail
Out of ScopeNOT doing

Constraint Guidelines

MUST (required): Hard requirements SHOULD (prefer): Best effort MUST NOT (forbidden): Prohibited

⚠️ Over-Specification Warning: If MUST constraints exceed 7, split task or raise complexity.

Security Constraints (Always Include)

  • No hardcoded secrets/tokens
  • Input validation on public interfaces
  • Safe error handling

Progress Tracker

#PhaseTaskStatus
0SetupCreate branch[TODO]
1SpecVerify spec[TODO]
2Impl{task}[TODO]
NTestVerify acceptance[TODO]

Legend: [TODO] | [WIP] | [DONE] | [WAIT] | [BLOCKED:x]

Reflection (Before Each Iteration)

DimensionQuestion
LogicContradictions?
CompleteAll requirements?
CorrectMatches acceptance?
EdgesBoundaries handled?
ExternalTools pass?