File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 fix-specs :
1212 runs-on : self-hosted
1313
14+ permissions :
15+ contents : write
16+ pull-requests : write
17+
1418 steps :
1519 - name : Checkout repository
1620 uses : actions/checkout@v6
3034 run : |
3135 codemie profile login
3236 codemie-code --model claude-4-1-opus --task "$(cat ./prompts/fix-specs.md)\n---- VALIDATION SUMMARY START ----\n${{ inputs.summary }}\n---- VALIDATION SUMMARY END ----"
37+ echo "There are changes in the following files after the agent run:"
3338 git status
39+
40+ - name : Create Pull Request
41+ uses : peter-evans/create-pull-request@v6
42+ with :
43+ token : ${{ secrets.GITHUB_TOKEN }}
44+ branch : agent/fix-specs-${{ github.run_id }}
45+ title : " Agent: Fix Specs"
46+ body : |
47+ This PR was automatically generated by the AI Agent.
48+ It fixes spec validation errors detected in CI.
49+ Please review these changes carefully and merge if they are expected.
50+ labels : |
51+ agent
52+ specs
Original file line number Diff line number Diff line change @@ -102,17 +102,22 @@ jobs:
102102 "| \(.spec_id // "global") | \(.rule) | **\(.severity)** | \(.description) |"
103103 ' .specs-validation/result.json >> "$GITHUB_STEP_SUMMARY"
104104
105- - name : Fail pipeline on failed validation
106- if : steps.validation.outputs.result == 'INVALID'
107- run : |
108- echo "❌ Specs validation failed"
109- exit 1
110-
111105 fix-specs :
112106 needs : validate-specs
113107 if : needs.validate-specs.outputs.validation-status == 'INVALID'
114108 uses : ./.github/workflows/fix-specs.yml
115109 secrets : inherit
116110 with :
117111 summary : ${{ needs.validate-specs.outputs.validation-summary-json }}
118-
112+
113+ finally :
114+ needs : [validate-specs, fix-specs]
115+ runs-on : self-hosted
116+
117+ steps :
118+ - name : Fail pipeline on failed validation
119+ if : needs.validate-specs.outputs.validation-status == 'INVALID'
120+ run : |
121+ echo "❌ Specs validation failed! Please review the validation summary above and address the issues."
122+ echo "🤖 Or realy on the agent which already tries to fix the issues."
123+ exit 1
Original file line number Diff line number Diff line change 11---
22id : 1-guardrails
3- version : 1.0.0
3+ version : 1.0.2
44level : 1
55status : canonical
66dependencies :
You can’t perform that action at this time.
0 commit comments