Skip to content

Adopt Apache Magpie (agent-assisted maintainer workflows) + JMeter config#1

Draft
milamberspace wants to merge 6 commits into
trunkfrom
magpie-project-manifest
Draft

Adopt Apache Magpie (agent-assisted maintainer workflows) + JMeter config#1
milamberspace wants to merge 6 commits into
trunkfrom
magpie-project-manifest

Conversation

@milamberspace

Copy link
Copy Markdown
Owner

What

Adopts the Apache Magpie framework of
agent skills into JMeter, plus the JMeter-specific configuration, so
maintainers can run structured, auditable workflows (PR triage, issue
triage, stats dashboards, security-issue and release helpers) from their
own AI coding agent.

Draft / for discussion. Opened against my fork's trunk so the diff
and committed footprint are reviewable. It is not proposed to
apache/jmeter yet — see the dev@ DISCUSS thread.
Nothing is merged or run automatically.

Committed footprint (the important part)

21 files. The split:

  • ~550 lines of JMeter-specific config + wiring: project.md, the
    pr-management-* config, .gitignore, a short README/AGENTS
    section, .claude/settings.json, two relay symlinks, .apache-magpie.lock.
  • The one committed magpie-setup bootstrap skill (~4.7k lines of
    Markdown docs, not code) — required so a fresh clone can re-fetch the
    framework.
  • Not committed: the other 68 skills. They live in a gitignored
    snapshot
    (.apache-magpie/), fetched on demand. They never land in
    git and never sit in the agent's context window (skills load on demand;
    only a one-line description per skill is indexed).

Full removal is a single command: /magpie-setup unadopt.

What's wired for JMeter

  • Families enabled: pr-management, issue, security. release-*
    is intentionally not wired yet.
  • Config adapted to JMeter reality: no area:* labels (area grouping
    disabled), no GitHub security tracker / Projects board (those panels are
    N/A), real CI-check names mapped (Validation, Error Prone, the JDK ×
    vendor × OS test matrix), longer grace windows for our slow triage
    cadence.
  • Backends: GitHub Issues, dev@/private@ via the ASF PonyMail
    archive, ASF Vulnogram CVE tooling.

How it stays low-risk

  • Human-in-the-loop: every skill only proposes; a human confirms
    before any comment, label, merge, or commit. No bots posting on their
    own, no CI automation.
  • Local & credential-scoped: runs in each maintainer's own agent under
    their own credentials. No shared service; no project data leaves the
    maintainer's control.
  • Deterministic guardrails: a committed PreToolUse hook blocks
    premature "ready", maintainer pings, and Co-Authored-By trailers.

Example output (read-only, nothing posted)

PR-backlog dashboard generated from our 70 open PRs by the
pr-management-stats skill:
https://gistpreview.github.io/?b22eb23da618ff3b17a4e4e921375d72

Commits

  • Add Apache Magpie (snapshot + committed magpie-setup)
  • Finish apache-magpie adoption (locks, symlinks, overrides, hook, docs)
  • Add Apache JMeter project manifest
  • Add pr-management-triage config for JMeter

🤖 Generated with Claude Code

Complete the snapshot-based adoption started in 729551e:

- Pin the framework in .apache-magpie.lock (git-branch, apache/magpie@main)
- Wire security, pr-management, and issue skill families (+ always-on
  setup-*/list-*) as gitignored magpie-* symlinks
- Scaffold .apache-magpie-overrides/
- Wire the agent-guard PreToolUse hook in .claude/settings.json
- Document the adoption in README.md and AGENTS.md

Generated-by: Claude Opus 4.8
Add .apache-magpie-overrides/project.md — the per-project config the
apache-magpie skills read to resolve identity, repositories, mailing
lists, mail sources, and security-workflow knobs for JMeter.

Filled from confirmed facts (upstream apache/jmeter@master, GitHub
Issues, dev@/private@/user@/commits@jmeter.apache.org, ASF Vulnogram
CNA, Gmail+PonyMail mail sources). Security-tracker/board/issue-template
blocks are marked N/A: JMeter runs no dedicated GitHub security tracker
(.asf.yaml projects: false); vulnerabilities go to security@apache.org
and private@jmeter.apache.org.

Generated-by: Claude Opus 4.8
Add the three per-project config files the pr-management-triage skill
reads from .apache-magpie-overrides/:

- pr-management-config.md — identifiers, labels, grace windows (tuned
  longer than framework defaults for JMeter's slow triage cadence),
  workflow choices (pr-body feedback channel).
- pr-management-triage-comment-templates.md — JMeter doc URLs
  (CONTRIBUTING.md, gradle.md, building.html), the fixed quality-criteria
  marker, and the AI-attribution footer.
- pr-management-triage-ci-check-map.md — maps JMeter's real GitHub Actions
  check names (Validation, Error Prone, Matrix Preparation, the JDK x
  vendor x OS x locale test matrix) to categories + gradle.md.

area-grouping is disabled (JMeter uses no area:* labels); the workflow
labels are documented as not-yet-created (PMC decision) so label actions
degrade to feedback-only until then.

Generated-by: Claude Opus 4.8
Match the SPDX-License-Identifier header the four sibling files in
.apache-magpie-overrides/ already carry (project.md, pr-management-config.md,
pr-management-triage-comment-templates.md, pr-management-triage-ci-check-map.md).

AGENTS.md is intentionally left without a header, consistent with JMeter's
other root docs (README.md, CONTRIBUTING.md, SECURITY.md, THREAT_MODEL.md,
gradle.md), which carry none.

Generated-by: Claude Opus 4.8
Comment thread .claude/settings.json Outdated
"hooks": [
{
"type": "command",
"command": "python3 \"$CLAUDE_PROJECT_DIR/.claude/hooks/agent-guard.py\"",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What is this? Why creating a hook without agent-guard.py?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Good catch. Two parts, then the fix.

What it is: .claude/settings.json wires Magpie's deterministic agent-guard — a Claude Code PreToolUse hook that blocks risky gh/git commands before they run (a commit carrying a Co-Authored-By trailer, an @-mention that would ping a maintainer, marking a PR "ready" while CI is still pending, force-pushing an empty PR…). It's a safety rail, not project logic.

Why agent-guard.py isn't in the PR: same rule as the 68 skills — it's framework code, gitignored on purpose, synced from the Magpie snapshot by /magpie-setup (re-collected on upgrade). We don't vendor it into JMeter's history; only magpie-setup + config are committed.

But your underlying point is valid: the committed wiring referenced a script that isn't there until /magpie-setup runs, so on a fresh clone the hook would try to exec a missing file on every Bash call — and a PreToolUse error can block the tool. That's a footgun.

Fixed in 6ec2d88: the committed command is now a no-op until the script exists —

[ -f "$CLAUDE_PROJECT_DIR/.claude/hooks/agent-guard.py" ] && python3 "$CLAUDE_PROJECT_DIR/.claude/hooks/agent-guard.py" || true

I'll also upstream this to apache/magpie (via setup-upstream-fix), since it affects every adopter. If you'd rather not commit the wiring at all, the alternative is to let /magpie-setup write it into the gitignored settings.local.json instead — happy to switch to that if you prefer.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Upstreamed: the guard is now proposed for every adopter in apache/magpie#786 — it updates the committed hook snippet in skills/setup/adopt.md and tools/agent-guard/README.md to the same [ -f … ] && … || true form. Once that merges and we /magpie-setup upgrade, our local 6ec2d88 becomes redundant and can be dropped. Thanks again for catching it.

<!-- SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICENSE-2.0 -->

# Apache JMeter — project manifest

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Who and what keeps this up to date?

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Fair question — same one you raised on dev@, so here it is inline too.

These are slow-moving facts (upstream repo, default branch, mailing lists, label names, CI-check names) — a label rename or a new CI job touches one line. Keeping them current isn't a separate chore:

  • /magpie-setup upgrade reconciles these overrides against framework changes and surfaces any drift for review, and setup-upstream-fix pushes our own fixes back upstream.
  • When JMeter itself changes something referenced here (renames a label, adds a CI check), whoever makes that change updates the one line — exactly like .asf.yaml or CODEOWNERS.
  • The skills read this file at runtime, so an obviously-stale value surfaces on the next run.

So: "who" = the maintainers who use the skills, like any config; "what" = reconcile-on-upgrade plus normal review. Not a standing maintenance burden.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The CI matrix changes very often. The stale context is worse than no context.

whoever makes that change updates the one line — exactly like .asf.yaml

I would prefer Magpie to source information from .asf.yaml rather than forcing everybody to duplicate the info.

Per @vlsi's review on PR #1: .claude/settings.json wires the agent-guard
PreToolUse hook, but agent-guard.py is gitignored (framework code synced by
/magpie-setup, like the skills). On a fresh clone before /magpie-setup runs,
the hook would exec a missing file on every Bash call — and a PreToolUse
error can block the tool.

Guard the command so it is a no-op until the script exists:
  [ -f ".../agent-guard.py" ] && python3 ".../agent-guard.py" || true

Worth upstreaming to apache/magpie (affects every adopter).

Generated-by: Claude Opus 4.8
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