Test e2e
Runs a 3-way parallel dogfood drill of the monitor plugin — clones a fresh small Python, Node, and Go-or-docs project, installs monitor into each with a different companion-skill level (none/some/all), has an isolated subagent use each project like a real developer, then synthesizes one HTML comparison report. Use when asked to test monitor end-to-end, run the testing drill, or dogfood the monitor plugin.From its SKILL.md
npx -y skills add ojaswiat/monitor-tools --skill test-e2eAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
20.7 KB, as published. Nobody here has run it
test-e2e
Parallel end-to-end dogfood drill for the monitor plugin, 3 projects wide.
Tests the plugin's actual behavior against real projects — not a unit test,
a real usage drill, same spirit as the manual drills already done this
session but run 3-at-once with varying companion-install levels.
Flow
-
Virgin plugin state — ask the user first, every time. A drill run against a stale local marketplace cache proves nothing about whether a real user pulling
monitorfresh from GitHub gets working code — agithubmarketplace source with no branch pin resolves to whatever the local cache already has until explicitly refreshed, which silently diverges from the actual default-branch content over time. Before finding repos, ask the user:Reset monitor's plugin marketplace registration and cache first, so this drill installs from a genuinely fresh GitHub pull instead of whatever's currently cached? This is machine-global state — check
~/.claude/plugins/config/installed_plugins.jsonfor othermonitor@monitor-toolsentries first and name them in the question. This deletes the whole cache directory, including the exact version folder each of those other projects'installPathpoints at — their plugin will actually fail to resolve, not just stay outdated, untilclaude plugin install monitor@monitor-tools --scope projectis re-run in each one's own directory afterward.Record the currently-cached plugin version now, regardless of the answer — step 7 needs it for the before/after delta. The cache directory can hold multiple version folders at once (leftovers from past installs for other projects), so don't glob it blindly: read
~/.claude/plugins/config/installed_plugins.json, find themonitor@monitor-toolsentry whoseprojectPathis this repo's root, and read.claude-plugin/plugin.json'sversionat that entry's owninstallPath— that's the one actually in use here.If yes:
claude plugin marketplace remove monitor-tools rm -rf ~/.claude/plugins/cache/monitor-tools/ claude plugin marketplace add ojaswiat/monitor-toolsConfirm the marketplace re-added cleanly before proceeding.
If no: proceed with whatever's currently cached, and say so plainly in the final synthesis report (step 5) — this run did not verify a fresh pull, only current cached behavior.
-
Find 3 fresh test repos. Use
WebSearch(never a hardcoded list) to find one small, real, currently-existing repo for each:- a small Python CLI project
- a small Node/JS CLI project
- a small Go project, or a small docs-only project if no small Go repo turns up Prefer repos with a handful of files, not sprawling ones — small enough that a subagent can orient in one read pass. WebSearch results go stale or hallucinate paths (hit this live: a search-recommended repo didn't exist under the given owner) — the subagent template's step 1 below makes cloning-and-verifying the subagent's own job, so a bad candidate fails fast as a clear report instead of the subagent improvising a replacement repo mid-task.
-
Before dispatching, install the plugin for real into each of the 3 cloned project dirs — this is a plain CLI command, not the interactive
/pluginslash command, so you (the orchestrator) can run it directly:claude plugin install monitor@monitor-tools --scope projectrun once per
{project_dir}, from inside that directory. This is what makes each guest project's own.claude/settings.jsongenuinely saymonitor@monitor-tools: true, scoped to that project — matching what a real user's/plugin installwould produce, not a manual copy script. Be honest about what this does and doesn't prove: the subagents you dispatch next inherit this session's already-registered skill list (same as always — nested subagents don't independently re-resolve plugin registration mid-run), so this step does not re-verify "can a brand-new top-level session discover the skill from scratch" — that narrower question is a one-off sanity check on the install mechanism itself, not something this drill needs to re-prove every run. What it does verify:/monitor:init(run inside each subagent next) resolves$CLAUDE_PLUGIN_ROOTagainst a real, freshly-installed plugin cache — proving the actual shipped code the subagent will exercise came from a genuine install, not a stale copy or a manual mirror hack.Spawn 3 subagents in parallel — one message, three
Agentcalls, each withsubagent_type: "general-purpose",isolation: "worktree",run_in_background: true. Each subagent gets the prompt template below with its own{repo_url},{project_dir}(alwaysexamples/<slug>,<slug>derived from the repo name), and{companion_level}:Agent Language companion_level A Python repo noneB Node repo some(installsuperpowersonly — see template step 3)C Go-or-docs repo all(install all 6)If any of the 3
Agentcalls comes back denied by the auto-mode classifier (seen in practice — it's launch-time flakiness, not a problem with the request), retry that one call alone; don't resend the whole batch or swap in a different repo/level for it.Before writing each subagent's prompt, capture this repo's current branch and commit sha, so each subagent can tell whether its worktree's content is behind your HEAD at the moment it was dispatched:
git rev-parse --abbrev-ref HEAD git rev-parse HEADPass the branch name into every subagent's prompt as
{base_branch}and the commit sha as{expected_head_sha}.Subagent prompt template:
You're doing a real end-to-end usage test of a Claude Code plugin called "monitor" inside a fresh clone of a small open-source project. Work only inside this project's folder — don't touch anything outside it. Never run a command that reads or lists paths outside it either — no `find`/`ls`/`grep` rooted at `/`, `~`, or any home-directory folder (Documents, Desktop, Downloads, etc.); those trigger OS permission prompts on the user's machine that have nothing to do with this test. 0. Before anything else, check whether your worktree's content is behind the commit the orchestrator was on when it dispatched you: run `git rev-parse HEAD` from the repo root you're in and compare the printed sha against `{expected_head_sha}`. If they differ, your worktree is behind — run `git merge {base_branch}` right now, before proceeding to step 1. If they match, proceed directly to step 1. State in your final report which case happened. 1. Clone {repo_url} into {project_dir} (relative to the repo root you're in), then cd into it. Verify the clone succeeded and contains real files — if it fails, or the repo is empty/archived/unrelated to what the name implies, stop and report that back instead of substituting a different repo yourself. 2. Don't run `install-monitor.sh` — the orchestrator already installed `monitor` for real into this project directory before dispatching you (`claude plugin install monitor@monitor-tools --scope project`). From inside {project_dir}, discover and run whatever gets a new project set up with monitor for the first time, the way any real user would — its own skill description is enough to surface it; don't quote a command name from these setup instructions. 3. Companion skill level for this run: {companion_level}. - If "none": don't install any companion — but still let monitor's own `/monitor:init` probing step run normally and write `monitor/usage.md` showing all 6 as ABSENT. "None installed" means nothing to install, not "skip the probe" — those are different steps. - If "some": install superpowers only, project-scoped: - superpowers: merge into {project_dir}/.claude/settings.json — "extraKnownMarketplaces": {"claude-plugins-official": {"source": {"source": "github", "repo": "anthropics/claude-plugins-official"}}}, "enabledPlugins": {"superpowers@claude-plugins-official": true} - graphify has no project-scoped install path (it only installs globally, outside this repo) — leave it uninstalled and let the probe record it ABSENT, same as any other companion you're not installing at this level. - If "all": install the 5 companions that have a project-scoped path (skip graphify — see above, it can't be installed without touching global machine state): - ui-ux-pro-max: marketplace nextlevelbuilder/ui-ux-pro-max-skill, plugin ui-ux-pro-max — same extraKnownMarketplaces/enabledPlugins pattern as above - superpowers: as in "some" above - openwiki: marketplace SoulKyu/openwiki-cc, plugin openwiki — same pattern - find-skills: npx skills add vercel-labs/skills@find-skills (run from inside {project_dir}, no -g flag) - copywriting: npx skills add coreyhaines31/marketingskills@copywriting (same, no -g) 4. Now act like a real developer who just opened this project, with no special knowledge of monitor beyond what you discover in the project itself. Look around, pick several small real things worth doing (a bug fix, a missing test, a docs fix, dead code removal — your call), and do them. Once setup above is done, the project's own CLAUDE.md/AGENTS.md explains how to use whatever's now available — follow that, in your own words, the way a real user encountering it cold would. Don't quote or rely on any tool/command name from these setup instructions; let the project's own docs teach you the vocabulary. 5. Do at least 5 separate rounds of small changes so there's real log and report volume to inspect afterward. 6. As part of (not separate from) those 5 rounds, use the project's task-tracking commands to create, update, and close at least one task. Paths below are relative to {project_dir}, which you're already cd'd into. While the task is still open (after creating/updating it, before closing it), check that the Dashboard's open-task KPI counts it. After closing it, verify it appears on the Tasks page with its final status, and that its lifecycle events are recorded in `monitor/tasks/tasks.mtr`. 7. Somewhere in those same 5 rounds, make at least one real commit without logging it first, then simulate what the two installed pending-state hooks would do (you cannot trigger Claude Code's real PostToolUse/UserPromptSubmit hook dispatch from inside this subagent — there's no live interactive session here, so this is a deliberate simulation, not the real thing): pipe the same JSON a real hook call would receive into `monitor/scripts/pending.py`. All paths here are relative to {project_dir}, which you're already cd'd into, and `--project-root` must come *before* the subcommand — `pending.py` registers it on the top-level parser, so argparse rejects it if it trails: ```bash echo '{"tool_name": "Bash", "tool_input": {"command": "git commit -m x"}}' \ | python3 monitor/scripts/pending.py --project-root . hook-post-tool-use echo '{}' | python3 monitor/scripts/pending.py --project-root . hook-user-prompt-submitVerify the unlogged commit shows up in
monitor/.pending.json, the user-prompt-submit simulation produces a sensible warning message, and running the project's actual log command afterward clears the matching pending entry — run that log command immediately after the test commit, before making any further commits, since the pending entry is matched by the commit sha that was HEAD at log time. 8. Somewhere in those same 5 rounds, use the project's log-search command — discovered from the project's own docs, the same way as logging/reporting/task commands above, not named here — to look up a word that actually appears in one of your own log entries (from a--summaryor--detailsfield you wrote earlier in this run — not a guess). If the project's docs don't make the exact command clear, fall back to running:python3 monitor/scripts/search.py --project-root . --query "<text>". The output must contain at least one real matching entry block, not a "no matches for '<query>'" line — if you get no matches, you either picked a word that isn't actually in the log or something is broken; try a different real word from your own log before concluding it's broken. Paste the exact query and one matched result block verbatim into your final report. 9. Somewhere after you have at least one open or recently-touched task and a few log entries, run the project's status command — discovered from the project's own docs, the same way as the other commands above, not named here — and check its output against what you actually did: it must mention your real open/most-recent task under "currently working on," at least one of your real recent log summaries, and (if any NEXT:/GAPS:/ASSUMPTIONS: field was written in a --details block this run) that field's real text under next steps — not a placeholder or an invented one. It must answer directly in chat, not as a file — confirm no new file appeared undermonitor/from running it (git status --short monitor/immediately before and after should be identical). If the project's docs don't make the exact command clear, fall back to running:python3 monitor/scripts/status.py --project-root .and read its JSON directly. Paste the command you ran and the relevant part of its output (or the JSON fields you checked) verbatim into your final report. 10. Report back in plain language: what you changed, whether/how you used monitor (which commands, how many times), and anything that looked broken, confusing, inconsistent, or undocumented — including anything about the companion-install step if companion_level wasn't "none". Your worktree will likely be gone by the time this is read, so paste the real evidence inline rather than describing it: the final log-entry count and report count, the number of distinct task_ids inmonitor/tasks/tasks.mtr(that file is append-only with one block per lifecycle event, so count distinct task_ids, not blocks or lines), one full task's self-reported metrics pasted verbatim, one full--detailsblock copied verbatim fromoperations.mtr(not paraphrased) so it can be checked for real content vs. placeholder text, the pending-hook test outcome from step 7 — pass or fail, with the warning message text pasted verbatim, the search-test outcome from step 8: the exact query used and one matched result block pasted verbatim, and the status-test outcome from step 9: the command run and the relevant output pasted verbatim, plus confirmation no file was created by it. -
Wait for all 3 to complete (event-driven completion notifications — never poll or sleep-loop for this).
-
Verify, don't just relay. Try reading each worktree directly first —
{project_dir}/monitor/profile.json,logs/operations.mtr,reports/*.html,tasks/tasks.mtr, and.pending.json— and cross-check counts and--detailscontent against what the subagent claimed. When counting tasks, count distinct task_ids intasks.mtr, not blocks (it holds one block per lifecycle event, so a single created→updated→closed task is several blocks). The worktree is usually already gone by this point (auto-pruned by the harness once the subagent stopped), so treat that as the expected case, not an error: fall back to checking the verbatim log-entry count, report count, distinct-task_id count, one task's metrics, the pending-hook pass/fail, the search-test query/result, and the status-test command/ output each subagent was told to paste into its own report (template step 10) for internal consistency and real content, same verify-before-trusting-a-subagent's-claims practice as any manual drill — just against pasted evidence instead of live files. -
Synthesize one combined HTML report. Invoke the
ui-ux-pro-maxskill, then write a single self-contained HTML file totemp/test-e2e-runs/<YYYY-MM-DD>.html(today's date, in the main working tree — not inside any worktree). If a file for today already exists (a second run same day), append-round-Nrather than overwriting it. Cover, per project: repo name/language, companion level, number of commits/changes made, log entry count, report count, task count (distinct task_ids, matching how the subagents were told to count), hook-test result (pass/fail, with the one-line reason on fail), and search-test result (pass/fail, with the query used) — plus a short findings list (bugs, inconsistencies, compliance gaps) drawn from both the subagent's report and your own spot-check in flow step 4. -
Publish the report with the
Artifacttool (file_pathpointing at the HTML file just written, a shorttitle/description, and afavicon).SendUserFiledoes not exist in this harness — don't use it. -
Report the plugin-version delta and the other-projects reinstall reminder to the user, in chat — regardless of whether step 0's reset happened. Read the cached version the same way as step 0 (via
installed_plugins.json'smonitor@monitor-toolsentry for this repo's ownprojectPath, not a bare glob of the cache directory) and compare it against what you recorded in step 0. If it changed, say so plainly: "monitor was upgraded from X to Y during this run." Then, whether or not it changed, remind the user: any other project on this machine withmonitor@monitor-toolsinstalled (the ones named when you asked the step 0 question) is still on its own pinned version and needsclaude plugin install monitor@monitor-tools --scope projectre-run in its own directory to pick up the current one — it does not happen automatically. -
Re-install monitor in this Host project (monitor-tools) itself, if step 0's reset happened. The marketplace-remove + cache-delete in step 0 wipes the version this repo was using too, same as any other project. Run
claude plugin install monitor@monitor-tools --scope projectfrom this repo's root so monitor-tools keeps dogfooding itself the same way it did before the reset. Skip this step entirely if step 0's user answer was no.
Notes
- This skill tests the
monitorplugin; it is not part of it and is never copied intoplugins/monitor/. - Repos are found fresh every run — don't reuse or hardcode candidates from a previous run.
- The orchestrator (you) is bound by the same containment rule as the
subagents. Don't run
find/ls/greprooted outside this repo (/,~, or any home-directory folder) while investigating drill state — scope every lookup to this repo's own path. The one exception is step 0's/7's/8's plugin-state commands (~/.claude/plugins/cache/monitor-tools/,~/.claude/plugins/config/installed_plugins.json,claude plugin ...) — these are known, specific paths for a real machine-global operation the user explicitly asked for, not an exploratory scan, so they're fine to touch directly. - After publishing the report, run
git worktree list. Each subagent's worktree is disposable, and the harness usually auto-prunes it once the subagent stops — but not always: stray worktrees from a past run have been found still sitting there, unrelated to the current run, confusing enough on their own (no tracked-file changes, just an old untracked clone) that they were once mistaken for two agents having collided by accident. If any remain,git worktree remove --forcethem and delete the matchingworktree-agent-*branch — don't leave this for "whoever runs it next."