AgentSkillsCN

workflow

工作开展的方式与思路。适用于所有任务,包括实现、规划、调研、设计、评审与审计。

SKILL.md
--- frontmatter
name: workflow
description: How to approach work. Applies to all tasks including implementation, planning, investigation, design, review, and auditing.

Workflow

Main Agent acts as conductor: plan, delegate, judge, integrate. Never do hands-on work yourself.

mermaid
flowchart LR
    A[Plan] --> B[Done Criteria] --> C[Team] --> D[ToDo]
    D --> E[Delegate] --> F[Record] --> G{Next?}
    G -->|Y| E
    G -->|N| H[Done]

Conductor Pattern

Delegate all investigation and implementation to Sub Agents to preserve context for decision-making.

DoDo NOT
Plan, delegate, judge, integrateExplore files, write code, run tests
Record progress after each ToDoWork on multiple ToDos simultaneously
Launch parallel Sub Agents for independent tasksHold context that Sub Agents should hold

Delegation criteria

ConditionAction
Trivial fix (typo, 3 lines) or single known-location editSelf
Investigation, multi-file change, or insufficient infoDelegate

When in doubt, delegate. Conductor loses sight of the goal when immersed in hands-on work.

Sub Agent types

PurposeAgent Type
Search, exploreExplore
Design comparisonPlan
Implement, test, verifygeneral-purpose

Coordination protocol

PhaseConductor action
LaunchSpecify goal, input, expected output, and output path in Task prompt
ParallelCall multiple Task tools in one message for independent tasks
ReceiveRead result, compare against Done Criteria
ConflictJudge manual merge when Sub Agents edit the same file
FailureRe-launch with revised prompt, or launch additional Sub Agent
MergeRecord integrated results in progress.md

Rules

#Rule
1Conductor delegates all hands-on work to Sub Agents
2Externalize thinking to tmp/<task>/ (plan.md, progress.md, analysis.md)
3Complete one → record → next. No self-parallelism (Sub Agent parallelism is fine)
4Decompose Plan into ToDos via TaskCreate
5Team table in plan.md. First row is always Conductor. 1 role = 1 purpose
6Delegate by type: explore=Explore / design=Plan / implement+verify=general-purpose
7Define Done Criteria first. Incomplete until all items pass
8Record to progress.md immediately on completion
9Technical decisions: decide without asking. Policy decisions: present options with recommendation
10Visualize dependencies and ToDo map in analysis.md with Mermaid
11Delegate detailed procedures to specialized skills. When direction is unclear, use thinking-method skill
12Structural code changes (module moves, renames, old path deletions) require refactoring skill first

tmp/ structure

code
tmp/<task>/
├── plan.md        # Goal, Done Criteria, Team, Approach, Scope
├── progress.md    # Incremental records
├── analysis.md    # Mermaid diagrams
└── investigation/ # Sub Agent results

Plan template

markdown
# Plan: <task name>

## Goal

## Done Criteria

- <checkable condition>

## Team

| Role      | Purpose                          | Agent Type | ToDo    |
| --------- | -------------------------------- | ---------- | ------- |
| Conductor | Plan, delegate, judge, integrate | Main Agent | Overall |

## Approach

## Scope

Do: / Do not:

progress.md format

Append after each ToDo completion. Separate What/Why (rationale) from How (procedure).

markdown
### T1: <task name>

**What/Why** - <purpose and rationale> **How** - <procedure, tools, output path>
**Result** - [x] YYYY-MM-DD HH:MM <fact>

Question template

markdown
## Decision: <topic>

| Option            | Summary | Pro | Con |
| ----------------- | ------- | --- | --- |
| A (recommended)   |         |     |     |
| B                 |         |     |     |
| → Proceed with A? |         |     |     |

Reference

For agent type mapping, conflict resolution, and Task prompt structure, read delegation-protocol.md in this skill's directory.