Skip to content

feat: add Changelog Drafter pattern + full ecosystem expansions #21

feat: add Changelog Drafter pattern + full ecosystem expansions

feat: add Changelog Drafter pattern + full ecosystem expansions #21

Workflow file for this run

name: Loop Readiness Audit (dogfood)
permissions:
contents: read
pull-requests: write
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Daily-ish dogfood of the reference itself
- cron: '17 9 * * *'
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '22'
cache: 'npm'
cache-dependency-path: tools/loop-audit/package-lock.json
- name: Build, test & run loop-audit on the reference + starters
run: |
cd tools/loop-audit
npm ci
npm test
echo "=== Audit of repo root ==="
node dist/cli.js ../../ || true
echo ""
echo "=== Audit of starters ==="
for s in ../../starters/*/; do
echo "--- $(basename "$s") ---"
node dist/cli.js "$s" || true
done
- name: Report score and gate on critically low (reference is source, not a consumer project)
run: |
cd tools/loop-audit
node dist/cli.js ../../ --json > /tmp/audit.json || true
SCORE=$(node -e '
const fs = require("fs");
try {
const data = JSON.parse(fs.readFileSync("/tmp/audit.json", "utf8"));
console.log("Reference score: " + data.score);
// Reference repo dogfoods L2: STATE.md, skills/, AGENTS.md, LOOP.md gates.
if (data.score < 58) {
console.error("Reference score below L2 threshold (58). Restore dogfood signals: STATE.md, skills/, AGENTS.md.");
process.exit(2);
}
} catch (e) {
console.error("Could not parse audit JSON:", e.message);
process.exit(0); // do not fail the whole job on parse issues
}
')
- name: Comment PR with loop readiness score
if: github.event_name == 'pull_request'
uses: actions/github-script@v9
with:
script: |
const fs = require('fs');
let data;
try {
data = JSON.parse(fs.readFileSync('/tmp/audit.json', 'utf8'));
} catch (e) {
core.setFailed('Could not read audit JSON for PR comment');
return;
}
const recs = (data.recommendations || []).slice(0, 5);
const body = [
'## Loop Readiness Audit',
'',
`**Score:** ${data.score}/100 (**${data.level}**)`,
'',
data.assessment,
'',
recs.length ? '### Top suggestions\n' + recs.map(r => `- ${r}`).join('\n') : '_No suggestions — looking good._',
'',
'<sub>Posted by `audit.yml` · [loop-audit docs](https://github.com/cobusgreyling/loop-engineering/tree/main/tools/loop-audit)</sub>',
].join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body,
});