Skip to content

E2E plugin & Add local plugin marketplace#667

Open
alishakawaguchi wants to merge 4 commits intomainfrom
alisha/local-plugin-marketplace
Open

E2E plugin & Add local plugin marketplace#667
alishakawaguchi wants to merge 4 commits intomainfrom
alisha/local-plugin-marketplace

Conversation

@alishakawaguchi
Copy link
Contributor

@alishakawaguchi alishakawaguchi commented Mar 9, 2026

Summary

  • Creates a local marketplace at .claude/plugins/ wrapping the e2e and agent-integration plugins, registered via extraKnownMarketplaces in project settings
  • Adds e2e plugin with subcommands and skills for E2E test triage workflows
  • Updates agent-integration skills

This makes plugin subcommands discoverable by Claude Code for all team members.

New E2E commands

Command Description
/e2e Orchestrator — runs triage-ci then implement sequentially
/e2e:triage-ci Run failing E2E tests locally, classify flaky vs real-bug, present findings report
/e2e:debug Deep-dive artifact analysis for diagnosing E2E test failures
/e2e:implement Apply fixes from triage/debug findings, verify with scoped E2E tests

Agent integration commands (existing, now discoverable as subcommands)

Command Description
/agent-integration Run all three phases sequentially
/agent-integration:research Assess a new agent's hook/lifecycle compatibility with the CLI
/agent-integration:write-tests Create E2E agent runner (no unit tests)
/agent-integration:implement E2E-first TDD — unit tests written last

Test plan

  • Start a new Claude Code session in this project
  • Verify /e2e: tab-completion shows debug, triage-ci, implement
  • Verify /agent-integration: tab-completion shows research, write-tests, implement
  • Run /e2e:debug and verify it loads the procedure

🤖 Generated with Claude Code

alishakawaguchi and others added 2 commits March 9, 2026 12:30
Creates a local marketplace at .claude/plugins/ wrapping both the e2e and
agent-integration plugins, and registers it via extraKnownMarketplaces in
project settings so plugin subcommands (/e2e:debug, /agent-integration:research,
etc.) are discoverable by Claude Code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 13d3f0b6de12
Adds the e2e plugin (commands for debug, implement, triage-ci), e2e skills,
and updates agent-integration skills. These complement the marketplace
registration from the previous commit.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 8d3b93e7ecd7
Copilot AI review requested due to automatic review settings March 9, 2026 19:36
@cursor
Copy link

cursor bot commented Mar 9, 2026

PR Summary

Low Risk
Documentation and Claude Code configuration changes only; no production/runtime code paths are affected.

Overview
Adds a local Claude Code marketplace (.claude/plugins) and enables it via .claude/settings.json, making the e2e and agent-integration plugins available to the project.

Introduces an e2e plugin with discoverable commands (/e2e:triage-ci, /e2e:debug, /e2e:implement) backed by new E2E triage/debug/implement skill docs, and updates agent-integration skill documentation to reference the new /e2e:debug command instead of the old /debug-e2e.

Written by Cursor Bugbot for commit 994602b. Configure here.

Copy link
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 a local Claude Code plugin marketplace under .claude/plugins/ and wires up new /e2e:* commands plus updated e2e + agent-integration skills to make subcommands discoverable for the whole team.

Changes:

  • Register a local marketplace via .claude/settings.json and enable e2e + agent-integration plugins from it
  • Add e2e plugin command wrappers (/e2e:debug, /e2e:triage-ci, /e2e:implement) pointing at new/updated skill procedures
  • Update agent-integration docs to reference /e2e:debug instead of /debug-e2e

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
.claude/settings.json Registers local plugin marketplace and enables the new local plugins
.claude/plugins/.claude-plugin/marketplace.json Defines the local marketplace and the plugins it exposes
.claude/plugins/e2e/.claude-plugin/plugin.json Declares the e2e plugin metadata for marketplace loading
.claude/plugins/e2e/commands/debug.md Adds /e2e:debug command wrapper pointing to the debug skill
.claude/plugins/e2e/commands/triage-ci.md Adds /e2e:triage-ci command wrapper pointing to the triage skill
.claude/plugins/e2e/commands/implement.md Adds /e2e:implement command wrapper pointing to the implement skill
.claude/plugins/e2e/README.md Documents the newly added e2e plugin commands
.claude/skills/e2e/SKILL.md Adds an orchestrator skill that runs triage then implement
.claude/skills/e2e/debug.md Introduces the E2E artifact debugging workflow
.claude/skills/e2e/triage-ci.md Introduces the CI triage workflow with rerun-based classification
.claude/skills/e2e/implement.md Introduces the “implement fixes” workflow with mandatory real E2E verification
.claude/skills/agent-integration/SKILL.md Updates references to use /e2e:debug
.claude/skills/agent-integration/implementer.md Updates multiple workflow instructions to use /e2e:debug
.claude/skills/agent-integration/test-writer.md Updates debugging guidance to use /e2e:debug

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Bugbot Autofix prepared fixes for both issues found in the latest run.

  • ✅ Fixed: Triage procedure references non-existent download script
    • Added scripts/download-e2e-artifacts.sh to resolve latest/run-id/run-url references and output the artifact directory path as expected.
  • ✅ Fixed: New debug skill duplicates existing debug-e2e skill
    • Replaced .claude/skills/e2e/debug.md with a pointer to .claude/skills/debug-e2e/SKILL.md so there is a single authoritative workflow.

Create PR

Or push these changes by commenting:

@cursor push c57d165f1b
Preview (c57d165f1b)
diff --git a/.claude/skills/e2e/debug.md b/.claude/skills/e2e/debug.md
--- a/.claude/skills/e2e/debug.md
+++ b/.claude/skills/e2e/debug.md
@@ -1,88 +1,3 @@
-# Debug Entire CLI via E2E Artifacts
+# E2E Debug
 
-Diagnose Entire CLI bugs using captured artifacts from the E2E test suite. Artifacts are written to `e2e/artifacts/` locally or downloaded from CI via GitHub Actions.
-
-## Inputs
-
-The user provides either:
-- **A test run directory:** `e2e/artifacts/{timestamp}/` -- triage all failures
-- **A specific test directory:** `e2e/artifacts/{timestamp}/{TestName}-{agent}/` -- debug one test
-
-## Artifact Layout
-
-```
-e2e/artifacts/{timestamp}/
-├── report.nocolor.txt          # Pass/fail/skip summary with error lines
-├── test-events.json            # Raw Go test events (NDJSON)
-├── entire-version.txt          # CLI version under test
-└── {TestName}-{agent}/
-    ├── PASS or FAIL            # Status marker
-    ├── console.log             # Full operation transcript
-    ├── git-log.txt             # git log --decorate --graph --all
-    ├── git-tree.txt            # ls-tree HEAD + checkpoint branch
-    ├── entire-logs/entire.log  # CLI structured JSON logs
-    ├── checkpoint-metadata/    # Checkpoint + session metadata
-    └── repo -> /tmp/...        # Symlink to preserved repo (E2E_KEEP_REPOS=1 only)
-```
-
-## Preserved Repo
-
-When the test run was executed with `E2E_KEEP_REPOS=1`, each test's artifact directory contains a `repo` symlink pointing to the preserved temporary git repository. This is the actual repo the test operated on -- you can inspect it directly.
-
-**Navigate via the symlink** (e.g., `{artifact-dir}/repo/`) rather than resolving the `/tmp/...` path. The symlink lives inside the artifact directory so permissions and paths stay consistent.
-
-The preserved repo contains:
-- Full git history with all branches (main, `entire/checkpoints/v1`)
-- The `.entire/` directory with CLI state, config, and raw logs
-- The `.claude/` directory (if Claude Code was the agent)
-- All files the agent created or modified, in their final state
-
-This is the most powerful debugging tool -- you can run `git log`, `git diff`, `git show`, inspect `.entire/` internals, and see exactly what the CLI left behind.
-
-## Debugging Workflow
-
-### 1. Triage (if given a run directory)
-
-Read `report.nocolor.txt` to identify failures and their error messages. Each entry shows the test name, agent, duration, and failure output with file:line references.
-
-### 2. Read console.log (most important)
-
-Full transcript of every operation:
-- `> claude -p "..." ...` -- agent prompts with stdout/stderr
-- `> git add/commit/...` -- git commands
-- `> send: ...` -- interactive session inputs
-
-This tells you what happened chronologically.
-
-### 3. Read test source code
-
-Use the file:line from the report to find the test in `e2e/tests/`. Understand what the test expected to happen vs what console.log shows actually happened.
-
-### 4. Diagnose the CLI behavior
-
-Cross-reference console.log (what happened) with the test (what should have happened). Focus on CLI-level issues:
-
-| Symptom | CLI Investigation |
-|---------|-------------------|
-| Checkpoint not created / timeout | Check `entire-logs/entire.log` for hook invocations, phase transitions, errors |
-| Wrong checkpoint content | Check `git-tree.txt` for checkpoint branch files, `checkpoint-metadata/` for session info |
-| Hooks didn't fire | Check `entire.log` for missing hook entries (session-start, user-prompt-submit, stop, post-commit) |
-| Stash/unstash problems | Check `entire.log` for stash-related log lines, `git-log.txt` for commit ordering |
-| Attribution issues | Check `checkpoint-metadata/` for `files_touched`, session metadata for attribution data |
-| Strategy mismatch | Check `entire.log` for `strategy` field, verify auto-commit vs manual-commit behavior |
-
-### 5. Deep dive files
-
-- **entire-logs/entire.log**: Structured JSON logs -- hook lifecycle, session phases (`active` -> `idle` -> `ended`), warnings, errors. Key fields: `component`, `hook`, `strategy`, `session_id`.
-- **git-log.txt**: Commit graph showing main branch, `entire/checkpoints/v1`, checkpoint initialization.
-- **git-tree.txt**: Files at HEAD vs checkpoint branch (separated by `--- entire/checkpoints/v1 ---`).
-- **checkpoint-metadata/**: `metadata.json` has `checkpoint_id`, `strategy`, `files_touched`, `token_usage`, and `sessions` array. Session subdirs have per-session details.
-
-### 6. Report findings
-
-Identify whether the issue is in:
-- **CLI hooks** (prepare-commit-msg, commit-msg, post-commit)
-- **Session management** (phase transitions, session tracking)
-- **Checkpoint creation** (branch management, metadata writing)
-- **Attribution** (file tracking, prompt correlation)
-- **Strategy logic** (auto-commit vs manual-commit behavior)
+Use `.claude/skills/debug-e2e/SKILL.md` as the single source of truth for the debugging workflow.

diff --git a/scripts/download-e2e-artifacts.sh b/scripts/download-e2e-artifacts.sh
new file mode 100644
--- /dev/null
+++ b/scripts/download-e2e-artifacts.sh
@@ -1,0 +1,45 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+usage() {
+	echo "Usage: $0 <latest | RUN_ID | RUN_URL>" >&2
+	exit 1
+}
+
+if [[ $# -ne 1 ]]; then
+	usage
+fi
+
+if ! command -v gh >/dev/null 2>&1; then
+	echo "Error: gh CLI is required but not installed." >&2
+	exit 1
+fi
+
+ref="$1"
+run_id=""
+
+case "$ref" in
+latest)
+		run_id="$(gh run list --workflow e2e.yml --branch main --status failure --limit 1 --json databaseId --jq '.[0].databaseId')"
+		;;
+	*)
+		if [[ "$ref" =~ ^[0-9]+$ ]]; then
+			run_id="$ref"
+		elif [[ "$ref" =~ /runs/([0-9]+) ]]; then
+			run_id="${BASH_REMATCH[1]}"
+		else
+			usage
+		fi
+		;;
+esac
+
+if [[ -z "$run_id" || "$run_id" == "null" ]]; then
+	echo "Error: Could not resolve a CI run ID from '$ref'." >&2
+	exit 1
+fi
+
+artifact_dir="$(mktemp -d "${TMPDIR:-/tmp}/entire-e2e-artifacts-${run_id}-XXXXXX")"
+
+gh run download "$run_id" --dir "$artifact_dir" >/dev/null
+
+printf '%s\n' "$artifact_dir"
This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.

Comment @cursor review or bugbot run to trigger another review on this PR

- Standardize on `entire-logs/entire.log` in debug.md diagnostic table
- Update triage-ci command description to mention CI artifact support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 2046d09ffe0c
@alishakawaguchi alishakawaguchi changed the title Add local plugin marketplace and e2e/agent-integration skills Add local plugin marketplace and E2E plugin Mar 9, 2026
- Add scripts/download-e2e-artifacts.sh for downloading CI artifacts
- Remove .claude/skills/debug-e2e/ (consolidated into /e2e:debug command)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Entire-Checkpoint: 15ac9dc10e03
@alishakawaguchi alishakawaguchi changed the title Add local plugin marketplace and E2E plugin E2E plugin & Add local plugin marketplace Mar 9, 2026
@alishakawaguchi alishakawaguchi marked this pull request as ready for review March 9, 2026 20:01
@alishakawaguchi alishakawaguchi requested a review from a team as a code owner March 9, 2026 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants