Skip to content

Commit a2a1baa

Browse files
committed
schema-fix
1 parent 4250f13 commit a2a1baa

3 files changed

Lines changed: 32 additions & 8 deletions

File tree

.github/workflows/fix-specs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ jobs:
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
@@ -30,4 +34,19 @@ jobs:
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

.github/workflows/validate-specs.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff 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

specs/1-guardrails.spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
id: 1-guardrails
3-
version: 1.0.0
3+
version: 1.0.2
44
level: 1
55
status: canonical
66
dependencies:

0 commit comments

Comments
 (0)