Skip to content

agents: add premium-analytics implement/verify/regression skills + governance#49083

Open
dognose24 wants to merge 1 commit into
Automattic:trunkfrom
dognose24:upstream/agent-skills-and-governance
Open

agents: add premium-analytics implement/verify/regression skills + governance#49083
dognose24 wants to merge 1 commit into
Automattic:trunkfrom
dognose24:upstream/agent-skills-and-governance

Conversation

@dognose24
Copy link
Copy Markdown
Contributor

@dognose24 dognose24 commented May 22, 2026

Proposed changes

Adds the agent skill definitions that drive end-to-end task implementation against the premium-analytics package, plus minimal governance to keep the skill set discoverable.

Skills (.agents/skills/, Anthropic-style flat md)

  • premium-analytics-implement-task.md — orchestrator: pre-flight checks, branch from fork/trunk, implement, build, UI verify, regression-inject, commit, push, open PR, kick off review-cycle, Step-10 invariant capture. Accepts either a local scratch md path (current) or a Linear issue identifier (target state).
  • premium-analytics-verify-ui.md — wp-verify Playwright verification flow (default backend for Step 4 of the orchestrator). Host- and container-runnable; WP_VERIFY_INSTANCE-aware so multiple parallel agent workspaces can coexist on one host.
  • regression-injection.md — generic regression-injection skill (Step 5 of the orchestrator). Backend-agnostic via BUILD_COMMAND / VERIFY_COMMAND env vars; the orchestrator passes wp-verify-flavored defaults when unset.

Slash-command bindings (.claude/commands/)

Four single-line bindings pointing Claude Code's slash-command surface at the skill files above:

  • premium-analytics-implement-task.md
  • premium-analytics-verify-ui.md
  • regression-injection.md
  • jetpack-pr-review-cycle.md

Governance (.agents/)

  • SKILL-NAMING.md — naming convention (<package-or-area>-<verb>-<noun>) and canonical directory pointer, so future skill additions stay discoverable.
  • check-skill-registration.sh — pre-merge lint enforcing that every .agents/skills/*.md has a matching .claude/commands/*.md binding. A renamed-or-removed skill can't silently lose its slash command.

What this PR is / isn't

  • Is: opt-in skill files for AI coding agents. Loaded only when an agent session reads them; no runtime effect on any Jetpack plugin or package.
  • Isn't: a change to any package's build, test, or deploy behavior.

Why parallel batch

This is one of 4 PRs upstreaming accumulated work from dognose24/jetpack:

The skills reference paths in PR #B (verify-ui dispatches wp-verify.sh; regression-injection's defaults point at the wp-verify Playwright config). These references are runtime: with PR #B not merged, an agent running the skill would not find the wp-verify orchestrator and would error informatively at Step 4. Recommended merge order: B then C. (Practically: both PRs can be reviewed in parallel and merged in any order; the failure mode if C lands first is just an error message until B lands.)

Does this pull request change what data or activity we track or use?

No. Skill files are read by AI agents at session time; nothing is shipped to any Jetpack runtime.

Testing instructions

  1. Read .agents/SKILL-NAMING.md — should be self-explanatory.
  2. Run bash .agents/check-skill-registration.sh from the repo root — should exit 0 (every .agents/skills/*.md has a matching .claude/commands/*.md).
  3. Skim each .agents/skills/*.md — confirm the Step structure is comprehensible and the env-var contracts (WP_BASE, BUILD_COMMAND, VERIFY_COMMAND, VERIFY_SKILL, WP_VERIFY_INSTANCE) are documented.

🤖 Generated with Claude Code

…vernance

Adds the agent skill files that drive end-to-end task implementation
against the premium-analytics package, plus minimal governance:

.agents/skills/ (skill definitions, Anthropic-style flat md):
* premium-analytics-implement-task.md — Step-by-step orchestrator:
  pre-flight, branch, implement, build, UI verify, regression-inject,
  commit, push, open PR, kick off review-cycle, Step 10 invariant
  capture. Accepts a local scratch md path or a Linear issue id (the
  latter is a Phase-2 forward target documented in the skill).
* premium-analytics-verify-ui.md — wp-verify Playwright verification
  flow (default backend for Step 4 above). Host- and container-runnable;
  WP_VERIFY_INSTANCE-aware for parallel agent workspaces.
* regression-injection.md — generic regression-injection skill (Step 5
  above). Backend-agnostic via BUILD_COMMAND / VERIFY_COMMAND env vars.

.claude/commands/ — four single-line slash-command bindings that point
Claude Code's command surface at the skill files above.

Governance:
* .agents/SKILL-NAMING.md — naming convention for skills
  (<package-or-area>-<verb> noun) and pointers to the canonical skill
  directory.
* .agents/check-skill-registration.sh — pre-merge lint that ensures
  every .agents/skills/*.md has a matching .claude/commands/*.md
  binding, so a renamed skill can't silently drop its slash command.

References tools/ai-sandbox/ from inside skill bodies (verify-ui's wp-
verify orchestrator, regression-injection's BUILD_COMMAND default).
That subsystem ships as a parallel PR — see "Related PRs" in body.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


@github-actions github-actions Bot added the OSS Citizen This Pull Request was opened by an Open Source contributor. label May 22, 2026
@dognose24 dognose24 self-assigned this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs OSS Citizen This Pull Request was opened by an Open Source contributor.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant