Feat/better autonomous dev#13
Conversation
Add a new section describing an automated workflow to detect when co-contributor JulesWyrm pushes raw HTML tool changes. Includes problem statement, goals, and a design: a GitHub Actions trigger on push with two jobs — Notify (detect commits by JulesWyrm and call Beeper) and Auto-issue (generate a diff, send to Anthropic Claude for analysis, create a structured GitHub issue assigned to Copilot to perform Next.js wiring). Notes required secrets (ANTHROPIC_API_KEY, BEEPER_*, GITHUB_TOKEN) and rationale for using Claude for analysis and Copilot for implementation. Status marked as Planned.
Introduce a new GitHub Actions workflow (Jules Push Monitor) that detects pushes authored by JulesWyrm, optionally notifies via Beeper, computes the commit diff, and opens a GitHub issue assigned to @copilot with a generated wiring-review body. Add scripts/analyze-diff.mjs which reads a git diff from stdin, builds a prompt, calls the Anthropic Messages API (claude-sonnet-4-6) to produce a Markdown issue body, and prints it to stdout. Notes: - The workflow checks commit authors, computes the diff, and runs analyze-diff.mjs to produce /tmp/issue-body.md, then creates an issue using gh. - The Beeper notification step includes TODOs and requires BEEPER_API_KEY, BEEPER_ACCOUNT_ID, BEEPER_SELF_USER_ID and a BEEPER_BASE_URL variable; verify reachability and auth scheme before enabling. - The analyzer requires ANTHROPIC_API_KEY. The workflow uses the GITHUB_TOKEN to create issues and actions/checkout + setup-node for running the script.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds automation to detect pushes authored by JulesWyrm and automatically open a wiring-review issue (generated via Anthropic/Claude diff analysis), with an optional Beeper notification path, to keep Next.js integration tasks from being missed.
Changes:
- Added a GitHub Actions workflow to detect Jules-authored pushes, optionally notify via Beeper, and open an issue assigned to Copilot.
- Added a Node.js script to turn a git diff into a Markdown issue body using the Anthropic Messages API.
- Documented the intended workflow and secrets in
dev.md.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
.github/workflows/jules-push.yml |
Implements push detection + notification + issue creation automation. |
scripts/analyze-diff.mjs |
Diff-to-issue-body generator via Anthropic API. |
dev.md |
Documents the co-contributor push automation design and requirements. |
| - name: Check commit authors | ||
| id: check | ||
| env: | ||
| COMMITS: ${{ toJson(github.event.commits) }} | ||
| BEFORE: ${{ github.event.before }} | ||
| AFTER: ${{ github.event.after }} | ||
| run: | | ||
| JULES_FOUND=$(echo "$COMMITS" | python3 -c " | ||
| import json, sys | ||
| commits = json.load(sys.stdin) | ||
| found = any(c.get('author', {}).get('username') == 'JulesWyrm' for c in commits) | ||
| print('true' if found else 'false') | ||
| ") |
There was a problem hiding this comment.
The github.event.commits payload isn’t guaranteed to include all commits in a push (it can be truncated on larger pushes), so this author check can miss JulesWyrm and skip the workflow. A more reliable approach is to checkout and run git log ${BEFORE}..${AFTER} (or use the GitHub compare API) to scan authors across the full commit range.
| - name: Check commit authors | |
| id: check | |
| env: | |
| COMMITS: ${{ toJson(github.event.commits) }} | |
| BEFORE: ${{ github.event.before }} | |
| AFTER: ${{ github.event.after }} | |
| run: | | |
| JULES_FOUND=$(echo "$COMMITS" | python3 -c " | |
| import json, sys | |
| commits = json.load(sys.stdin) | |
| found = any(c.get('author', {}).get('username') == 'JulesWyrm' for c in commits) | |
| print('true' if found else 'false') | |
| ") | |
| - name: Check out repository history | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check commit authors | |
| id: check | |
| env: | |
| BEFORE: ${{ github.event.before }} | |
| AFTER: ${{ github.event.after }} | |
| run: | | |
| AUTHOR_LINES=$(git log --format='%an%n%ae' "${BEFORE}..${AFTER}") | |
| JULES_FOUND=$(printf '%s\n' "$AUTHOR_LINES" | grep -Eixq 'JulesWyrm|.*<juleswyrm>|juleswyrm@.*' && echo true || echo false) |
| curl -sf -X POST "${BEEPER_BASE_URL}/v1/chats" \ | ||
| -H "Authorization: Bearer ${BEEPER_API_KEY}" \ | ||
| -H "Content-Type: application/json" \ | ||
| -d "{ | ||
| \"accountID\": \"${BEEPER_ACCOUNT_ID}\", | ||
| \"mode\": \"start\", | ||
| \"user\": { \"id\": \"${BEEPER_SELF_USER_ID}\" }, | ||
| \"messageText\": \"${MESSAGE}\" | ||
| }" |
There was a problem hiding this comment.
The JSON payload for Beeper is built via shell string interpolation; if BRANCH or MESSAGE contains quotes/newlines, the JSON becomes invalid (and can potentially change the request body). Generate the JSON with a proper encoder (e.g., python -c 'import json; print(json.dumps(...))' or jq -n) before passing it to curl.
| curl -sf -X POST "${BEEPER_BASE_URL}/v1/chats" \ | |
| -H "Authorization: Bearer ${BEEPER_API_KEY}" \ | |
| -H "Content-Type: application/json" \ | |
| -d "{ | |
| \"accountID\": \"${BEEPER_ACCOUNT_ID}\", | |
| \"mode\": \"start\", | |
| \"user\": { \"id\": \"${BEEPER_SELF_USER_ID}\" }, | |
| \"messageText\": \"${MESSAGE}\" | |
| }" | |
| PAYLOAD=$(MESSAGE="$MESSAGE" \ | |
| BEEPER_ACCOUNT_ID="$BEEPER_ACCOUNT_ID" \ | |
| BEEPER_SELF_USER_ID="$BEEPER_SELF_USER_ID" \ | |
| python3 -c ' | |
| import json | |
| import os | |
| print(json.dumps({ | |
| "accountID": os.environ["BEEPER_ACCOUNT_ID"], | |
| "mode": "start", | |
| "user": {"id": os.environ["BEEPER_SELF_USER_ID"]}, | |
| "messageText": os.environ["MESSAGE"], | |
| })) | |
| ') | |
| curl -sf -X POST "${BEEPER_BASE_URL}/v1/chats" \ | |
| -H "Authorization: Bearer ${BEEPER_API_KEY}" \ | |
| -H "Content-Type: application/json" \ | |
| -d "$PAYLOAD" |
| env: | ||
| BEEPER_API_KEY: ${{ secrets.BEEPER_API_KEY }} | ||
| BEEPER_BASE_URL: ${{ vars.BEEPER_BASE_URL }} | ||
| BEEPER_ACCOUNT_ID: ${{ secrets.BEEPER_ACCOUNT_ID }} | ||
| BEEPER_SELF_USER_ID: ${{ secrets.BEEPER_SELF_USER_ID }} | ||
| BRANCH: ${{ github.ref_name }} | ||
| SHA: ${{ github.event.after }} | ||
| run: | | ||
| MESSAGE="JulesWyrm pushed to ${BRANCH} (${SHA:0:7}). A wiring-review issue has been opened." | ||
| curl -sf -X POST "${BEEPER_BASE_URL}/v1/chats" \ | ||
| -H "Authorization: Bearer ${BEEPER_API_KEY}" \ |
There was a problem hiding this comment.
Because this step uses curl -sf, it will fail (and mark the workflow red) when Beeper config/secrets aren’t set yet (the comments indicate it’s still TBD). Consider gating the step/job on required vars being present, or set continue-on-error: true so issue creation still runs successfully even if notifications aren’t configured.
| const footer = [ | ||
| '', | ||
| '---', | ||
| '*Auto-generated by [analyze-diff.mjs](../scripts/analyze-diff.mjs) · model: claude-sonnet-4-6*' |
There was a problem hiding this comment.
This footer link is relative (../scripts/analyze-diff.mjs) and won’t resolve correctly inside a GitHub Issue. Use an absolute GitHub URL (ideally pinned to the commit SHA) or remove the link to avoid a broken reference.
| '*Auto-generated by [analyze-diff.mjs](../scripts/analyze-diff.mjs) · model: claude-sonnet-4-6*' | |
| '*Auto-generated by analyze-diff.mjs · model: claude-sonnet-4-6*' |
| - `BEEPER_*` — Beeper API auth (TBD once API docs confirmed) | ||
| - `GITHUB_TOKEN` — already available in Actions | ||
|
|
||
| **Status:** Planned — not yet implemented. |
There was a problem hiding this comment.
This section marks the automation as “Planned — not yet implemented,” but this PR adds the workflow + analysis script. Update the status (and clarify what remains TODO, e.g. Beeper endpoint/auth) so the docs match the repo state.
| **Status:** Planned — not yet implemented. | |
| **Status:** Partially implemented — the GitHub Actions workflow and diff-analysis script are now in the repo. Remaining TODOs: finalize the Beeper endpoint/auth configuration and complete any notification wiring that depends on those credentials. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This pull request implements an automated workflow to detect and process pushes from the co-contributor
JulesWyrm. When Jules pushes to any branch, the workflow notifies the maintainer via Beeper and opens a GitHub issue with a detailed analysis of the required Next.js "wiring" work, using Claude for diff analysis. The system is designed to ensure that all necessary integration steps are tracked and handled promptly and automatically.Automation Workflow Implementation:
Added a new GitHub Actions workflow (
.github/workflows/jules-push.yml) that:JulesWyrm.Added a Node.js script (
scripts/analyze-diff.mjs) that:Documentation and Planning:
dev.mdto document the motivation, goals, and design of the co-contributor push automation system, including the roles of Claude and Copilot, required secrets, and a summary of the planned workflow.