Skip to content

[plan] Add inline examples to major workflow configuration fields #8135

@github-actions

Description

@github-actions

Objective

Add examples fields to the most important workflow configuration properties to improve IDE autocomplete and developer onboarding.

Context

This is Issue #3 (Medium) from the schema audit. Only 49% of root properties have examples, and critically, the most important fields (on, engine, tools, steps, safe-outputs, mcp-servers) lack examples.

Approach

Add examples array to each priority field with 1-2 realistic usage examples. Focus on common use cases that developers will encounter first.

Files to Modify

  • pkg/parser/schemas/main_workflow_schema.json

Priority Fields (in order)

  1. on - Workflow trigger events (highest priority)

    "examples": [
      {"issues": {"types": ["opened"]}},
      {"pull_request": {"types": ["opened", "synchronize"]}}
    ]
  2. engine - AI engine selection

    "examples": ["copilot", "claude", "codex"]
  3. tools - Tool configuration

    "examples": [
      {"playwright": {"version": "v1.41.0"}},
      {"github": {"mode": "remote"}}
    ]
  4. steps - Workflow steps

    "examples": [
      [{"prompt": "Analyze the issue and create a plan"}],
      [{"uses": "actions/checkout@v4"}, {"prompt": "Review the code"}]
    ]
  5. safe-outputs - Safe output configuration

    "examples": [
      {"create_issue": {"title": "Bug Report", "body": "Description"}},
      {"create_pull_request": {"title": "Fix", "body": "Changes"}}
    ]
  6. mcp-servers - MCP server configuration

    "examples": [
      {"filesystem": {"stdio": {"command": "npx", "args": ["-y", "`@modelcontextprotocol/server-filesystem`"]}}},
      {"custom-server": {"http": {"url": "(redacted)
    ]

Acceptance Criteria

  • All 6 priority fields have examples arrays
  • Examples demonstrate common/realistic use cases
  • Examples are valid according to schema constraints
  • Schema validation still passes
  • Run make build to verify embedded schemas compile

Estimated Effort

2-3 hours (includes testing examples for validity)

AI generated by Plan Command for discussion #8130

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions