Agent Skillskdlbs/kandev › spec-driven-development

spec-driven-development

GitHub

规范驱动开发工作流,通过意图澄清、需求定义、系统设计、计划制定及TDD实施,确保复杂功能的严谨交付。

.agents/skills/spec-driven-development/SKILL.md kdlbs/kandev

触发场景

非平凡功能开发 行为变更修复

安装

npx skills add kdlbs/kandev --skill spec-driven-development -g -y
更多选项

非标准路径

npx skills add https://github.com/kdlbs/kandev/tree/main/.agents/skills/spec-driven-development -g -y

不安装直接使用

npx skills use kdlbs/kandev@spec-driven-development

指定 Agent (Claude Code)

npx skills add kdlbs/kandev --skill spec-driven-development -a claude-code -g -y

安装 repo 全部 skill

npx skills add kdlbs/kandev --all -g -y

预览 repo 内 skill

npx skills add kdlbs/kandev --list

SKILL.md

Frontmatter
{
    "name": "spec-driven-development",
    "description": "Single-session Kandev feature workflow: clarify intent, create durable requirements, system designs, plans, and work orders, then hand off before implementation and verification."
}

Spec-Driven Development

Use this workflow for non-trivial features and behavior-changing fixes. The user-started primary conversation performs every phase by default. Subagents require explicit user authorization.

Core flow

Intent -> Requirements -> System design -> Plan + work orders -> Design-package handoff -> Explicit implementation request -> TDD implementation -> PR review -> Report

Do not replace durable artifacts with chat-only notes. Do not skip from intent to code unless the user explicitly opts out.

Prompt-precedence gate

Before you edit production or permanent test files, make sure that one condition is true:

  1. A prior design turn produced the requirements, system design, plan, and current work order. The user now explicitly asks to implement them.
  2. The request references existing reviewed specifications, a plan, and the current work order.
  3. The user explicitly says to skip specification, plan, and work-order creation.

Workflow envelopes, phase labels, TDD lists, and generic implementation prompts do not satisfy this gate.

If no condition is true, create or update the design package. Record any partial implementation as continuation context. Stop at the design-package handoff.

When the user asks for feature planning, complete the full design package before you return control. Stop after requirements only when the user requests a requirements review or a material question blocks safe design.

Phase 0: Track the work

Keep a visible task list:

  1. Clarify intent.
  2. Create or update requirements.
  3. Create or update the system design.
  4. Create the plan and work orders.
  5. End the design turn.
  6. Execute work orders with TDD after an explicit implementation request.
  7. Open the PR, address valid findings, record changes, and report.

Phases 1 to 4: Design

Use /interview-me only when the request needs clarification.

Run the /spec ownership gate before you choose paths. Search adjacent systems for the same capability. Choose the owner from the durable contract, not from backend or frontend implementation layers. If a feature has a UI, include its observable UI outcomes and frontend design in the feature owner's artifacts. Create a separate UI artifact only for an independent reusable UI contract.

Create or update:

  • docs/specs/<system>/requirements/<capability>.md through /spec.
  • docs/specs/<system>/system-design/<capability>.md through /spec.
  • docs/plans/<initiative>/plan.md through /plan.
  • docs/plans/<initiative>/task-<NN>-<short-slug>.md through /plan.

During migration, use a legacy specification only when no new requirement or system design replaces it.

Requirements define stable REQ-* and AC-* IDs. System designs map technical behavior to those IDs. Plans define delivery order. Work orders define one implementation result and its verification.

Keep one vertical requirement/design pair for one cohesive outcome. Work orders can separate implementation boundaries after the specification has one owner.

Each work order must contain:

  • Frontmatter with id, title, status, wave, depends_on, plan, requirements, acceptance_criteria, and system_design.
  • A summary, scope, and exclusions.
  • One to three implementation acceptance conditions.
  • Exact targeted verification commands.
  • Specific likely files, dependencies, and risks.

Work orders do not name a worker role or model tier. Waves can identify parallel-safe candidates. They do not authorize subagents.

Design-package handoff

Before implementation, report:

  • Requirement documents and IDs.
  • System-design paths.
  • The plan and work-order paths.
  • Dependency order and exact verification commands.
  • Open risks and exclusions.

Then end the turn. Do not ask the user to approve the package or switch models. The user reviews the files and sends a later implementation request.

Recommended Codex route:

  • GPT-5.6 Sol/high for intent, investigation, specifications, plans, and high-risk design.
  • GPT-5.6 Terra/medium for implementation, TDD, and integration.
  • GPT-5.6 Luna/low for short and mechanical read-only work.

The user controls model selection. Do not infer a model change from prose.

Phase 5: Execute work orders

For each work order, in dependency order:

  1. Read the work order, requirements, system design, plan, and scoped AGENTS.md.
  2. Change only that work order to in_progress.
  3. Implement with /tdd. Use /e2e and /mobile-parity when applicable.
  4. Run the exact targeted verification commands.
  5. Change the work order to done and synchronize plan.md.

If the user authorizes subagents, launch only parallel-safe work orders in the requested wave. Use native delegation with no full-history fork. Give each child the work-order path, owned files, dependencies, and exact command.

If work needs a new architecture, public contract, persistence boundary, or high-impact security decision, stop and request a strong-model design pass. Use /record for a durable decision.

Phase 6: Open the PR

After all work-order checks pass, request explicit user authorization before running /commit, /push, or /pr. Run only the operations the user authorizes. Do not add automatic local simplify, QA, broad review, security review, or /verify work.

The configured PR reviewers are the semantic-review gate. Use /pr-fixup only for a CI error or an actionable reviewer finding. Run the affected work-order checks after a correction.

Stop conditions

Stop and ask the user when specifications and code disagree, implementation needs a material new design, a model escalation is necessary, or the same check fails after three focused attempts.

Final report

Report requirement IDs, system-design and plan paths, work-order statuses, model checkpoints, changed files, commands and results, user-authorized subagents, PR-review evidence, and known risks.

版本历史

  • 0e4ae86 当前 2026-08-27 18:29

    强化规范所有权与迁移策略,建立面向系统的规范治理机制。

  • 1578843 2026-08-16 08:48

    简化了版本正文,移除了对特定子代理(如architect, implementer等)的详细依赖描述,聚焦于核心流程和规范前置门控逻辑。

  • b4239d8 2026-07-24 17:33

同 Skill 集合

.agents/skills/acp-debug/SKILL.md
.agents/skills/add-integration/SKILL.md
.agents/skills/clean-branches/SKILL.md
.agents/skills/code-review/SKILL.md
.agents/skills/commit/SKILL.md
.agents/skills/context-engineering/SKILL.md
.agents/skills/create-kandev-plugin/SKILL.md
.agents/skills/debug/SKILL.md
.agents/skills/docs-maintainer/SKILL.md
.agents/skills/e2e/SKILL.md
.agents/skills/fix/SKILL.md
.agents/skills/harness-improvement/SKILL.md
.agents/skills/interview-me/SKILL.md
.agents/skills/plan/SKILL.md
.agents/skills/planner-orchestration/SKILL.md
.agents/skills/playwright-cli/SKILL.md
.agents/skills/pr-fixup/SKILL.md
.agents/skills/pr/SKILL.md
.agents/skills/product-demo-seeding/SKILL.md
.agents/skills/product-video-capture/SKILL.md
.agents/skills/push/SKILL.md
.agents/skills/qa/SKILL.md
.agents/skills/record/SKILL.md
.agents/skills/release/SKILL.md
.agents/skills/runtime-feature-flags/SKILL.md
.agents/skills/simplify/SKILL.md
.agents/skills/spec/SKILL.md
.agents/skills/tdd/SKILL.md
.agents/skills/using-agent-skills/SKILL.md
.agents/skills/verify/SKILL.md
.agents/skills/mobile-parity/SKILL.md

元信息

文件数
0
版本
0e4ae86
Hash
03c98b46
收录时间
2026-07-24 17:33

首页 - Wiki
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-27 23:48
浙ICP备14020137号-1 $访客地图$