AgentSkillsCN

workflow-interactive

适用于实施任务的开发工作流。当您需要实现功能、修复Bug、创建组件、编写路由、集成API,或进行任何涉及生产代码编写的任务时,可使用此工作流。它遵循标准的TDD优先开发周期,并包含代码评审与验证步骤。请勿将其用于研究、仅作文档记录,或仅用于规划任务。

SKILL.md
--- frontmatter
name: workflow-interactive
description: |
  Development workflow for implementation tasks. Use when: implementing features, fixing bugs, creating components, writing routes, integrating APIs, or any task that involves writing production code. Provides the standard TDD-first development cycle with code review and validation steps. Do NOT use for research, documentation-only, or planning-only tasks.

Interactive Development Workflow

Standard development workflow for human-in-the-loop implementation tasks. Follow these steps sequentially. Each step MUST complete before proceeding.


Phase 1: Plan

StepAction
1Enter PlanMode
2Analyze current state thoroughly
3Create detailed step-by-step plan
4Call TaskCreate tool
5STOP — Call TaskList tool to display tasks

CHECKPOINT: MUST wait for explicit user instruction (e.g., "proceed", "start", "go"). DO NOT auto-execute any task without user approval.


Phase 2: TDD (after user approval)

StepAction
6Switch to development branch (create if not exists)
7Create feature branch from development
8Run unit-test-writer sub-agent → verify tests FAIL (Red Phase). NEVER analyze patterns or write test code yourself — always delegate to the unit-test-writer subagent.
9Implement code to pass tests → run bun run testverify ALL pass (Green Phase)

Auto-verify (no human wait needed):

  • After Step 8: If tests pass immediately → review test logic, likely not testing correctly
  • After Step 9: If any test fails → fix implementation before proceeding

💡 Context tip: Consider /clear here. Plan context is no longer needed.

Commit: test: add failing tests for {feature} after Step 8, feat: implement {feature} after Step 9


Phase 3: Review

Select review agents based on task type:

Task TypeAgents
UI components, stylingcode-reviewer only
API integration, data handlingcode-reviewer + security-auditor
Performance-sensitive (lists, heavy render)code-reviewer + performance-analyzer
Phase completion / pre-releasecode-reviewer + security-auditor + performance-analyzer
StepAction
10Run selected review sub-agents
11Read ALL report files in /docs/reports/ → fix ALL issues where status ≠ "complete"

Commit: refactor: address review feedback for {feature} after Step 11

💡 Context tip: Consider /clear here. Review details are no longer needed.


Phase 4: Validate & Finalize

StepAction
12Run e2e-tester sub-agent
13Fix bugs discovered in E2E (skip if all pass)
14Run development-planner sub-agent
15Merge feature branch to development

Commit: fix: resolve e2e failures for {feature} after Step 13 (if needed)


Failure Recovery

code
IF any step fails:
  1. Log failure to docs/reports/failures/{timestamp}-{step}.md
  2. Retry SAME approach (1 attempt)
  3. Retry DIFFERENT approach (1 attempt)
  4. After 3 total failures → STOP, report to user, WAIT for instruction

Context Management

  • /clear after Phase 2 (TDD complete): plan + test exploration no longer needed
  • /clear after Phase 3 (review complete): review reports no longer needed
  • Target: stay under 60k tokens per phase
  • If unsure: /context to check usage