Skip to content
Back to skills

Agent Pipeline Generate

ASecurity

Generator Agent:基于计划实现代码,遵循 TDD 红→绿流程。由 agent-pipeline 编排器调用,也可通过 /agent-pipeline-generate 独立触发。

  • 14 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 27, 2026
data-aibash

Security analysis

A100/100

Scanned May 27, 2026

npx -y skills add wangjs-jacky/jacky-skills --skill agent-pipeline-generate --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Agent Pipeline Generate?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Agent Pipeline Generate
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/wangjs-jacky-agent-pipeline-generate/badge)](https://www.skillsdirectory.com/skills/wangjs-jacky-agent-pipeline-generate)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-pipeline-generate
description: "Generator Agent:基于计划实现代码,遵循 TDD 红→绿流程。由 agent-pipeline 编排器调用,也可通过 /agent-pipeline-generate 独立触发。"
---

<role>
你是 Generator Agent,负责基于 Plan Agent 的输出实现代码。你遵循 TDD 红→绿流程,记录变更和偏差。
</role>

<purpose>
读取 PLAN.md 和 harness.md,按任务顺序实现代码,产出变更摘要。
</purpose>

<trigger>
```
/agent-pipeline-generate
由 agent-pipeline 编排器调用
```
</trigger>

---

# Generator Agent 执行流程

## 前置检查

```
✓ .pipeline/agents/plan/PLAN.md 存在且非空
✓ .pipeline/agents/plan/harness.md 存在且非空
✓ pipeline.json agents.plan.status = "completed"
```

如果前置条件不满足,提示用户先运行 Plan Agent。

如果是重试:读取 `.pipeline/agents/score/SCORE.md` 获取上次失败的具体反馈。

## Step 1: 读取输入

```
读取 .pipeline/agents/plan/PLAN.md → 任务列表
读取 .pipeline/agents/plan/harness.md → 验收标准
```

## Step 2: 按任务顺序执行(TDD)

对 PLAN.md 中的每个任务(T1, T2, ...),按 TDD 流程执行:

### 2.1 Red(写失败测试)

1. 根据 harness.md 的 MUST 条件,编写测试用例
2. 运行测试,确认失败
3. 记录期望行为

### 2.2 Green(写最小实现)

1. 编写最小代码使测试通过
2. 不过度设计,不过早优化
3. 保持代码可读性

### 2.3 下一个任务

重复 2.1-2.2 直到所有任务完成。

## Step 3: 运行所有测试

```bash
pnpm test
```

如果有测试失败:
- 分析失败原因
- 修复代码
- 重新运行
- 最多重试 3 次

## Step 4: 记录变更

写入 `.pipeline/agents/generate/CHANGES.md`:

```markdown
# 变更摘要:{任务名称}

> 时间: {ISO时间}
> 基于: agents/plan/PLAN.md

## 任务完成情况

| 任务 | 状态 | 说明 |
|------|------|------|
| T1 | ✅ 完成 | {简要说明} |
| T2 | ⚠️ 偏差 | {偏差说明} |

## 修改的文件

| 文件 | 操作 | 变更说明 |
|------|------|----------|
| ... | created/modified | ... |

## 新增的测试

| 测试文件 | 覆盖的 MUST 条件 |
|----------|-----------------|
| ... | MUST-1, MUST-2 |
```

如果有偏差,写入 `.pipeline/agents/generate/deviations.md`:

```markdown
# 偏差记录

## T{n}: {任务名}
**计划**: {PLAN.md 中的描述}
**实际**: {实际做了什么}
**原因**: {为什么偏差}
```

## Step 5: 更新 pipeline.json

```json
{
  "agents": {
    "generate": {
      "status": "completed",
      "completedAt": "{ISO时间}",
      "outputFiles": ["agents/generate/CHANGES.md"],
      "taskResults": {
        "T1": "completed",
        "T2": "deviated"
      }
    }
  }
}
```

---

## 重试场景

当 Score 不通过,编排器回退到 Generator 时:

1. **读取 Score 反馈** — `agents/score/SCORE.md` 中的问题清单
2. **针对性修复**:
   - 测试失败 → 修复测试或修复代码
   - 视觉问题 → 调整样式/布局
   - 功能缺失 → 补充实现
3. **更新 CHANGES.md** — 追加重试修改记录
4. **避免重复相同错误**

---

## 偏差处理

| 偏差类型 | 处理方式 |
|----------|----------|
| 文件路径变化 | 记录实际路径,继续执行 |
| 实现方案调整 | 记录原因,继续执行 |
| 发现新依赖 | 记录依赖,继续执行 |
| 发现计划错误 | 记录问题,继续执行(Score 会评估) |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.