Skip to content

Feat/plugin source - #1

Merged
Dave3130 merged 2 commits into
mainfrom
feat/plugin-source
Aug 31, 2026
Merged

Feat/plugin source#1
Dave3130 merged 2 commits into
mainfrom
feat/plugin-source

Conversation

@ruturaj-browserstack

Copy link
Copy Markdown
Collaborator

No description provided.

ruturaj-browserstack and others added 2 commits August 31, 2026 13:45
…uild

Brings the plugin source into this repo: a skill (`rca-build`), a per-test
coordinator subagent, the deterministic `bin/` + `lib/` harness, the bundled
`bstack` MCP server definition, and 337 tests.

What it does: point it at a red BrowserStack build and it reads every failed test,
clusters them by failure signature, gathers evidence through whatever tools the user
already has — code, logs, cluster, metrics, CI — and drives BrowserStack's analysis
agent to a root cause per test, naming the pull request most likely responsible. The
report lands on the Test Observability dashboard; the terminal gets a short table and
a link.

Setup is a one-time interview that verifies every answer with a live read and commits
the result to `.rca-context.json` in the user's own project, so a teammate who clones
inherits it. GitHub is the only hard requirement — without the code and its merged
PRs there is no culprit PR, which is the deliverable. Everything else is offered and
skippable, and each skip is recorded and declared as evidence that was unavailable.

Copied from the development repo via `git archive HEAD`, deliberately rather than
`cp -R`: that excludes gitignored paths, untracked leftovers, and — the reason it
matters — a working-tree `.mcp.json` carrying live BrowserStack credentials and a
local absolute path to a dev build of the MCP server. What ships is the committed
version: `${BROWSERSTACK_USERNAME}` placeholders and the published
`npx @browserstack/mcp-server@1.2.27-beta.1`.

This repo's own scaffold is preserved where it was better than the source's:

- `.github/workflows/Semgrep.yml` — kept this repo's, which carries `id-token: none`
  explicit denies and the maintained `semgrep/semgrep` image; the source still
  referenced the deprecated `returntocorp/semgrep`.
- `CODEOWNERS` — kept `@browserstack/ai-tfa-dev`; the source said `ai-rmt-dev`.
- `.npmrc` — untouched.

`README.md` replaced the placeholder and is written for someone installing this, not
for someone building it: prerequisites, install, how to run, what the first run asks,
and a table of every way the plugin refuses with what to do about each. `SETUP.md`
covers the two things the plugin cannot start without — the MCP server authenticating
and a GitHub route existing — and hands off rather than duplicating the interview.

Three URL sites now agree with this repo's `origin` (the source pointed all three at
the old development repo): `plugin.json` `homepage`, a new `package.json`
`repository`, and the README's clone command.

`claude plugin validate .` passes, `--strict` included. It did not before: the
coordinator's YAML frontmatter failed to parse because three continuation lines of a
multi-line `description` began at column 0, which a strict parser reads as a new
document-level sequence. The validator's own words for the consequence — "this agent
loads with its name taken from the filename and every other frontmatter field
silently dropped" — mean `tools:` and `model: sonnet` were being discarded at runtime.
Indenting the continuations fixed it.

Known and deliberate: `plugin.json` declares MIT and no LICENSE file is present yet,
and `.gitignore` excludes `docs/` — both inherited, both worth a separate decision.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`/plugin marketplace add browserstack/ai-tfa-plugins` failed: that command looks for
`.claude-plugin/marketplace.json` and the repo carried only
`.claude-plugin/plugin.json`. Those are different manifests — one says "this directory
IS a plugin", the other says "this repo SERVES plugins". Without the second, the only
install route was cloning and passing `--plugin-dir`, which the README documented and
which is a poor first experience for anyone who just wants to use it.

A repo can be both. `source: "./"` points the marketplace entry at this repo's own
root, where `plugin.json` and the components already live, so there is no second copy
of anything.

Marketplace name is `browserstack-ai-tfa`, deliberately distinct from the plugin name
`tfa-rca`, because both appear in the install command and identical names read as a
typo:

    /plugin marketplace add browserstack/ai-tfa-plugins
    /plugin install tfa-rca@browserstack-ai-tfa

The entry carries `description`, `category` and `keywords` — the fields a user sees
when browsing — and deliberately omits `version`, `author`, `license`, `homepage` and
`repository`. Those already live in `plugin.json`, and duplicating them here would
create two places to update and one to forget; `version` in particular would drift on
the first release that touched only one file.

README now leads with the marketplace install and keeps the clone route in a collapsed
block for development, rather than presenting the harder path as the only one. It also
points at the setup skill for credentials instead of assuming a `.env`, since a
marketplace install has no `.env.example` to copy.

Verified: `claude plugin validate .claude-plugin/marketplace.json` passes, the repo
passes plain and `--strict`, and the README's two commands are cross-checked against
both manifests — the plugin name matches `plugin.json`, the `@marketplace` suffix
matches `marketplace.json`'s `name`, and the `marketplace add` argument matches the
actual repo path. 337 tests still pass.

This is independent of the plugin-directory submission: it enables the
serve-your-own-marketplace route immediately, without waiting on review, and does not
conflict with submitting for the official directory later.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@ruturaj-browserstack
ruturaj-browserstack requested a review from a team as a code owner August 31, 2026 08:44
@Dave3130
Dave3130 merged commit 420b376 into main Aug 31, 2026
4 checks passed
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