AgentSkillsCN

harness-step-schema

在harness-schema仓库中创建或更新流水线步骤模式。 始终在用户提及以下任一内容时使用此技能: - 步骤操作:“创建步骤”、“添加步骤”、“新步骤”、“更新步骤”、“修改步骤”、“编辑步骤”、“实现步骤”、“定义步骤”、“构建步骤” - 模式文件:“step-info.yaml”、“step-node.yaml”、“StepInfo”、“StepNode”、“步骤模式”、“步骤定义”、“步骤规范” - 阶段可用性:“添加到阶段”、“启用在阶段”、“阶段可用”、“注册步骤”、“执行包装器配置” - 模板支持:“步骤模板”、“template_config.yaml”、“启用为模板” - JSON更新:“pipeline.json”、“template.json”、“添加定义”、“更新模式” - 字段工作:“添加字段”、“添加属性”、“新字段”、“步骤属性”、“步骤字段”、“修改字段” - 表达式支持:“运行时输入”、“JEXL”、“表达式支持”、“<+input>”、“common-jexl” - 类别提及:“CD步骤”、“CI步骤”、“自定义步骤”、“FME步骤”、“功能标志步骤”、“审批步骤” 如果用户正在处理v0/pipeline/steps/中的文件或提及步骤相关的模式更改,请使用此技能。

SKILL.md
--- frontmatter
name: harness-step-schema
description: |
  Creates or updates pipeline step schemas in the harness-schema repository.

  ALWAYS use this skill when user mentions ANY of these:
  - Step operations: "create step", "add step", "new step", "update step", "modify step", "edit step", "implement step", "define step", "build step"
  - Schema files: "step-info.yaml", "step-node.yaml", "StepInfo", "StepNode", "step schema", "step definition", "step spec"
  - Stage availability: "add to stage", "enable in stage", "available in stage", "register step", "execution-wrapper-config"
  - Template support: "step template", "template_config.yaml", "enable as template"
  - JSON updates: "pipeline.json", "template.json", "add definition", "update schema"
  - Field work: "add field", "add property", "new field", "step property", "step field", "modify field"
  - Expression support: "runtime input", "JEXL", "expression support", "<+input>", "common-jexl"
  - Category mentions: "CD step", "CI step", "custom step", "FME step", "feature flag step", "approval step"

  If user is working with files in v0/pipeline/steps/ or mentions step-related schema changes, USE THIS SKILL.

Harness Pipeline Step Schema Management

This skill helps create or update pipeline step schemas in the harness-schema repository.

Reference Documentation:

  • v0/AGENTS.md - Directory structure, common schema files, and field patterns
  • TEMPLATES.md - Full YAML/JSON templates for step creation
  • EXAMPLES.md - Existing step examples

Before Starting - Ask These Questions

When creating a new step, gather this information from the user:

  1. Step name: PascalCase name (e.g., FmeFlagDelete, MyCustomStep)

  2. Step category: Where to place it? (see v0/AGENTS.md for directory structure)

    • cd - CD (Continuous Deployment) specific steps
    • ci - CI (Continuous Integration) specific steps
    • common - Shared across multiple stages
    • custom - Custom steps (approvals, FME flags, HTTP, etc.)
    • cvng - Continuous Verification steps
    • iacm - Infrastructure as Code Management steps
    • idp - Internal Developer Portal steps
  3. Step fields: What properties does the step spec need?

    • Field name, type, required/optional, description
    • Should fields support runtime input (<+input>) and expressions?
    • See v0/AGENTS.md "Common Schema Files" section for available field patterns
  4. Target stages: Which stages should have this step? (select multiple)

    • approval - Approval stage
    • cd - Deployment stage
    • cf - Feature Flag stage
    • ci - Build/CI stage
    • custom - Custom stage
    • iacm - IACM stage
    • idp - IDP stage
    • security - Security stage

    Note: Steps can be added to multiple stages. See v0/AGENTS.md "Stage-Step Availability" for common patterns.

  5. Include in templates?: Should this step be available as a step template?

File Structure

Each step requires these files:

1. Step Info YAML

v0/pipeline/steps/{category}/{step-name}-step-info.yaml

Defines the step's spec properties. See v0/AGENTS.md "Common Field Patterns" for available patterns.

2. Step Node YAML

v0/pipeline/steps/{category}/{step-name}-step-node.yaml

Defines the step wrapper with type, identifier, name, timeout, etc.

3. Stage Execution Configs

v0/pipeline/stages/{stage}/execution-wrapper-config.yaml

Add reference to make step available in each target stage.

4. Template Config (if templates enabled)

v0/template/template_config.yaml

Add to step_template_types: list.

5. Bundled JSON Files

  • v0/pipeline.json - Add definitions + stage references
  • v0/template.json - Add definitions + template/stage references

Step Creation Process

  1. Create {step-name}-step-info.yaml in v0/pipeline/steps/{category}/
  2. Create {step-name}-step-node.yaml in v0/pipeline/steps/{category}/
  3. Add reference to each target stage's execution-wrapper-config.yaml
  4. Add to v0/template/template_config.yaml if templates enabled
  5. Add definitions to v0/pipeline.json:
    • {StepName}StepNode definition
    • {StepName}StepInfo definition
    • References in stage ExecutionWrapperConfig oneOf arrays
  6. Add definitions to v0/template.json:
    • {StepName}StepNode_template definition (no identifier/name required)
    • {StepName}StepNode definition
    • {StepName}StepInfo definition
    • Reference in step template spec oneOf
    • References in stage ExecutionWrapperConfig oneOf arrays

Reference Files

  • v0/AGENTS.md - Common schema files, field patterns, directory structure
  • TEMPLATES.md - YAML/JSON templates for step definitions
  • EXAMPLES.md - Existing step examples (FmeFlagDelete, FmeFlagCreate)