$npx -y skills add github/awesome-copilot --skill create-github-action-workflow-specificationCreate a formal specification for an existing GitHub Actions CI/CD workflow, optimized for AI consumption and workflow maintenance.
| 1 | # Create GitHub Actions Workflow Specification |
| 2 | |
| 3 | Create a comprehensive specification for the GitHub Actions workflow: `${input:WorkflowFile}`. |
| 4 | |
| 5 | This specification serves as a specification for the workflow's behavior, requirements, and constraints. It must be implementation-agnostic, focusing on **what** the workflow accomplishes rather than **how** it's implemented. |
| 6 | |
| 7 | ## AI-Optimized Requirements |
| 8 | |
| 9 | - **Token Efficiency**: Use concise language without sacrificing clarity |
| 10 | - **Structured Data**: Leverage tables, lists, and diagrams for dense information |
| 11 | - **Semantic Clarity**: Use precise terminology consistently throughout |
| 12 | - **Implementation Abstraction**: Avoid specific syntax, commands, or tool versions |
| 13 | - **Maintainability**: Design for easy updates as workflow evolves |
| 14 | |
| 15 | ## Specification Template |
| 16 | |
| 17 | Save as: `/spec/spec-process-cicd-[workflow-name].md` |
| 18 | |
| 19 | ```md |
| 20 | --- |
| 21 | title: CI/CD Workflow Specification - [Workflow Name] |
| 22 | version: 1.0 |
| 23 | date_created: [YYYY-MM-DD] |
| 24 | last_updated: [YYYY-MM-DD] |
| 25 | owner: DevOps Team |
| 26 | tags: [process, cicd, github-actions, automation, [domain-specific-tags]] |
| 27 | --- |
| 28 | |
| 29 | ## Workflow Overview |
| 30 | |
| 31 | **Purpose**: [One sentence describing workflow's primary goal] |
| 32 | **Trigger Events**: [List trigger conditions] |
| 33 | **Target Environments**: [Environment scope] |
| 34 | |
| 35 | ## Execution Flow Diagram |
| 36 | |
| 37 | ```mermaid |
| 38 | graph TD |
| 39 | A[Trigger Event] --> B[Job 1] |
| 40 | B --> C[Job 2] |
| 41 | C --> D[Job 3] |
| 42 | D --> E[End] |
| 43 | |
| 44 | B --> F[Parallel Job] |
| 45 | F --> D |
| 46 | |
| 47 | style A fill:#e1f5fe |
| 48 | style E fill:#e8f5e8 |
| 49 | ``` |
| 50 | |
| 51 | ## Jobs & Dependencies |
| 52 | |
| 53 | | Job Name | Purpose | Dependencies | Execution Context | |
| 54 | |----------|---------|--------------|-------------------| |
| 55 | | job-1 | [Purpose] | [Prerequisites] | [Runner/Environment] | |
| 56 | | job-2 | [Purpose] | job-1 | [Runner/Environment] | |
| 57 | |
| 58 | ## Requirements Matrix |
| 59 | |
| 60 | ### Functional Requirements |
| 61 | | ID | Requirement | Priority | Acceptance Criteria | |
| 62 | |----|-------------|----------|-------------------| |
| 63 | | REQ-001 | [Requirement] | High | [Testable criteria] | |
| 64 | | REQ-002 | [Requirement] | Medium | [Testable criteria] | |
| 65 | |
| 66 | ### Security Requirements |
| 67 | | ID | Requirement | Implementation Constraint | |
| 68 | |----|-------------|---------------------------| |
| 69 | | SEC-001 | [Security requirement] | [Constraint description] | |
| 70 | |
| 71 | ### Performance Requirements |
| 72 | | ID | Metric | Target | Measurement Method | |
| 73 | |----|-------|--------|-------------------| |
| 74 | | PERF-001 | [Metric] | [Target value] | [How measured] | |
| 75 | |
| 76 | ## Input/Output Contracts |
| 77 | |
| 78 | ### Inputs |
| 79 | |
| 80 | ```yaml |
| 81 | # Environment Variables |
| 82 | ENV_VAR_1: string # Purpose: [description] |
| 83 | ENV_VAR_2: secret # Purpose: [description] |
| 84 | |
| 85 | # Repository Triggers |
| 86 | paths: [list of path filters] |
| 87 | branches: [list of branch patterns] |
| 88 | ``` |
| 89 | |
| 90 | ### Outputs |
| 91 | |
| 92 | ```yaml |
| 93 | # Job Outputs |
| 94 | job_1_output: string # Description: [purpose] |
| 95 | build_artifact: file # Description: [content type] |
| 96 | ``` |
| 97 | |
| 98 | ### Secrets & Variables |
| 99 | |
| 100 | | Type | Name | Purpose | Scope | |
| 101 | |------|------|---------|-------| |
| 102 | | Secret | SECRET_1 | [Purpose] | Workflow | |
| 103 | | Variable | VAR_1 | [Purpose] | Repository | |
| 104 | |
| 105 | ## Execution Constraints |
| 106 | |
| 107 | ### Runtime Constraints |
| 108 | |
| 109 | - **Timeout**: [Maximum execution time] |
| 110 | - **Concurrency**: [Parallel execution limits] |
| 111 | - **Resource Limits**: [Memory/CPU constraints] |
| 112 | |
| 113 | ### Environmental Constraints |
| 114 | |
| 115 | - **Runner Requirements**: [OS/hardware needs] |
| 116 | - **Network Access**: [External connectivity needs] |
| 117 | - **Permissions**: [Required access levels] |
| 118 | |
| 119 | ## Error Handling Strategy |
| 120 | |
| 121 | | Error Type | Response | Recovery Action | |
| 122 | |------------|----------|-----------------| |
| 123 | | Build Failure | [Response] | [Recovery steps] | |
| 124 | | Test Failure | [Response] | [Recovery steps] | |
| 125 | | Deployment Failure | [Response] | [Recovery steps] | |
| 126 | |
| 127 | ## Quality Gates |
| 128 | |
| 129 | ### Gate Definitions |
| 130 | |
| 131 | | Gate | Criteria | Bypass Conditions | |
| 132 | |------|----------|-------------------| |
| 133 | | Code Quality | [Standards] | [When allowed] | |
| 134 | | Security Scan | [Thresholds] | [When allowed] | |
| 135 | | Test Coverage | [Percentage] | [When allowed] | |
| 136 | |
| 137 | ## Monitoring & Observability |
| 138 | |
| 139 | ### Key Metrics |
| 140 | |
| 141 | - **Success Rate**: [Target percentage] |
| 142 | - **Execution Time**: [Target duration] |
| 143 | - **Resource Usage**: [Monitoring approach] |
| 144 | |
| 145 | ### Alerting |
| 146 | |
| 147 | | Condition | Severity | Notification Target | |
| 148 | |-----------|----------|-------------------| |
| 149 | | [Condition] | [Level] | [Who/Where] | |
| 150 | |
| 151 | ## Integration Points |
| 152 | |
| 153 | ### External Systems |
| 154 | |
| 155 | | System | Integration Type | Data Exchange | SLA Requirements | |
| 156 | |--------|------------------|---------------|------------------| |
| 157 | | [System] | [Type] | [Data format] | [Requirements] | |
| 158 | |
| 159 | ### Dependent Workflows |
| 160 | |
| 161 | | Workflow | Relationship | Trigger Mechanism | |
| 162 | |----------|--------------|-------------------| |
| 163 | | [Workflow] | [Type] | [How triggered] | |
| 164 | |
| 165 | ## Compliance & Governance |
| 166 | |
| 167 | ### Audit Requirements |
| 168 | |
| 169 | - **Execution Logs**: [Retention policy] |
| 170 | - **Approval Gates**: [Required approvals] |
| 171 | - **Change Control**: [Update process] |
| 172 | |
| 173 | ### Security Contr |