Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/lint-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Lint Workflows

on:
push:
branches: [main]
paths:
- 'workflows/**'
pull_request:
paths:
- 'workflows/**'

jobs:
lint:
name: Validate workflow definitions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Validate ambient.json files
run: |
echo "Validating ambient.json files..."
errors=0
for f in workflows/*/.ambient/ambient.json; do
if [ ! -f "$f" ]; then
continue
fi
if python3 -m json.tool "$f" > /dev/null 2>&1; then
echo " ✓ $f"
else
echo " ✗ $f — invalid JSON"
python3 -c "import json; json.load(open('$f'))" 2>&1 | tail -1
errors=$((errors + 1))
fi
done
if [ "$errors" -gt 0 ]; then
echo ""
echo "Found $errors invalid ambient.json file(s)"
exit 1
fi
echo "All ambient.json files are valid"

- name: Check required fields in ambient.json
run: |
echo "Checking required fields..."
warnings=0
for f in workflows/*/.ambient/ambient.json; do
[ ! -f "$f" ] && continue
workflow=$(echo "$f" | cut -d/ -f2)
missing=""
for field in name description startupPrompt; do
val=$(python3 -c "import json; d=json.load(open('$f')); v=d.get('$field',''); print(v if v else '')" 2>/dev/null)
if [ -z "$val" ]; then
missing="$missing $field"
fi
done
if [ -n "$missing" ]; then
echo " ⚠ $workflow: missing$missing"
warnings=$((warnings + 1))
else
echo " ✓ $workflow"
fi
done
if [ "$warnings" -gt 0 ]; then
echo ""
echo "$warnings workflow(s) have missing fields (name, description, or startupPrompt)"
echo "Workflows without startupPrompt will not show a greeting when activated"
fi

- name: Verify workflow directory structure
run: |
echo "Checking workflow structure..."
errors=0
for dir in workflows/*/; do
workflow=$(basename "$dir")
if [ ! -f "$dir/.ambient/ambient.json" ]; then
echo " ✗ $workflow: missing .ambient/ambient.json"
errors=$((errors + 1))
elif [ ! -d "$dir/.claude" ]; then
echo " ⚠ $workflow: missing .claude/ directory"
else
echo " ✓ $workflow"
fi
done
if [ "$errors" -gt 0 ]; then
echo ""
echo "Found $errors workflow(s) without ambient.json"
exit 1
fi
5 changes: 1 addition & 4 deletions workflows/prd-rfe-workflow/.ambient/ambient.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"RFE List": "artifacts/rfes.md",
"RFE Tasks": "artifacts/rfe-tasks/*.md",
"Prioritization Matrix": "artifacts/prioritization.md"
}
},
"rubric": {
"activationPrompt": "After creating rfe.md, evaluate the quality of the RFEs. Utilize the evaluator.md to better understand the criteria of a quality RFE. Utilize that rubric to rate the RFEs and produce a score out of 25, an aggregate of each score for each criteria.",
"schema": {
Expand All @@ -24,7 +24,4 @@
}
}
}

}