Skip to content

Feat/better autonomous dev#13

Open
ghostleek wants to merge 3 commits into
mainfrom
feat/better-autonomous-dev
Open

Feat/better autonomous dev#13
ghostleek wants to merge 3 commits into
mainfrom
feat/better-autonomous-dev

Conversation

@ghostleek
Copy link
Copy Markdown
Contributor

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:

    • Detects if any commit in a push is authored by JulesWyrm.
    • Sends a notification via the Beeper API when such a push is detected.
    • Computes the git diff for the push, analyzes it using Claude (Anthropic API), and opens a GitHub issue assigned to Copilot with a checklist of required Next.js wiring tasks.
  • Added a Node.js script (scripts/analyze-diff.mjs) that:

    • Reads a git diff from stdin, sends it to the Anthropic Claude API with a structured prompt, and outputs a markdown-formatted GitHub issue body summarizing required wiring work (e.g., missing Next.js pages, tool-ids, tracker scripts, and test suites).

Documentation and Planning:

  • Updated dev.md to 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.

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.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
diagrams Ready Ready Preview, Comment Apr 9, 2026 9:39am

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +16 to +28
- 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')
")
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- 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)

Copilot uses AI. Check for mistakes.
Comment on lines +64 to +72
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}\"
}"
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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"

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +65
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}" \
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Comment thread scripts/analyze-diff.mjs
const footer = [
'',
'---',
'*Auto-generated by [analyze-diff.mjs](../scripts/analyze-diff.mjs) · model: claude-sonnet-4-6*'
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
'*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*'

Copilot uses AI. Check for mistakes.
Comment thread dev.md
- `BEEPER_*` — Beeper API auth (TBD once API docs confirmed)
- `GITHUB_TOKEN` — already available in Actions

**Status:** Planned — not yet implemented.
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
**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.

Copilot uses AI. Check for mistakes.
Comment thread dev.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants