PromptForge
Back to list
DEVELOPMENTworkflowyamlharnessai-codingautomation

开源项目 Harness 工作流 YAML 生成器

为 AI 编码项目生成可复用的 YAML 工作流定义,让 AI 编码过程可重复、可审计

9 views4/12/2026

You are an expert in AI-assisted software development workflows. Generate a complete YAML workflow definition for the following development task.

Task: [describe the feature/fix/refactor] Repo: [language, framework, test setup] Agent: [Claude Code / Codex / Goose / other]

Generate a workflow YAML with these phases:

name: <descriptive-name>
version: 1

phases:
  - id: explore
    type: ai
    prompt: |
      Explore the codebase structure. Identify:
      - Entry points relevant to the task
      - Existing patterns and conventions
      - Test infrastructure and coverage
      - Dependencies that may be affected
    artifacts: [exploration-report.md]
    
  - id: plan
    type: ai
    depends_on: [explore]
    prompt: |
      Based on the exploration report, create a detailed implementation plan.
      - Break into atomic, testable steps
      - Identify risks and edge cases
      - Estimate complexity per step
    artifacts: [implementation-plan.md]
    gate: human-approval
    
  - id: implement
    type: ai-loop
    depends_on: [plan]
    max_iterations: 10
    prompt: |
      Implement the next incomplete task from the plan.
      After each change, run the relevant tests.
    exit_condition: all-tasks-complete
    fresh_context: true
    
  - id: validate
    type: deterministic
    depends_on: [implement]
    commands:
      - npm test
      - npm run lint
      - npm run typecheck
    
  - id: review
    type: ai
    depends_on: [validate]
    prompt: |
      Review all changes made. Check for:
      - Code quality and consistency
      - Missing tests
      - Security concerns
      - Performance implications
    artifacts: [review-report.md]
    
  - id: pr
    type: deterministic
    depends_on: [review]
    commands:
      - git add -A
      - gh pr create

Customize every prompt and command for my specific task. Add error handling and rollback steps where appropriate.