From 5da5ef171f1890bc0212df61460d49f6e513c47a Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 29 Nov 2026 03:24:31 -0600 Subject: [PATCH 1/2] fix(plugins): harden release generator, OpenAI packaging, docs, and validation --- .claude-plugin/marketplace.json | 30 +- .github/workflows/validate.yml | 9 +- LICENSE | 9 - README.md | 68 +- catalog.toml | 166 ++ .../bmad-loop/.antigravity-plugin/plugin.json | 24 +- plugins/bmad-loop/.claude-plugin/plugin.json | 2 +- plugins/bmad-loop/.codex-plugin/plugin.json | 14 +- plugins/bmad-loop/.cursor-plugin/plugin.json | 4 +- plugins/bmad-loop/LICENSE | 21 + plugins/bmad-loop/README.md | 13 +- plugins/bmad/.antigravity-plugin/plugin.json | 24 +- plugins/bmad/.claude-plugin/plugin.json | 2 +- plugins/bmad/.codex-plugin/plugin.json | 14 +- plugins/bmad/.cursor-plugin/plugin.json | 4 +- plugins/bmad/LICENSE | 21 + plugins/bmad/README.md | 8 +- .../.antigravity-plugin/plugin.json | 24 +- plugins/core-tools/.claude-plugin/plugin.json | 2 +- plugins/core-tools/.codex-plugin/plugin.json | 14 +- plugins/core-tools/.cursor-plugin/plugin.json | 4 +- plugins/core-tools/LICENSE | 21 + plugins/core-tools/README.md | 13 +- .../creative/.antigravity-plugin/plugin.json | 24 +- plugins/creative/.claude-plugin/plugin.json | 2 +- plugins/creative/.codex-plugin/plugin.json | 14 +- plugins/creative/.cursor-plugin/plugin.json | 4 +- plugins/creative/LICENSE | 21 + plugins/creative/README.md | 15 +- .../founder/.antigravity-plugin/plugin.json | 24 +- plugins/founder/.claude-plugin/plugin.json | 2 +- plugins/founder/.codex-plugin/plugin.json | 14 +- plugins/founder/.cursor-plugin/plugin.json | 4 +- plugins/founder/LICENSE | 21 + plugins/founder/README.md | 15 +- .../method/.antigravity-plugin/plugin.json | 24 +- plugins/method/.claude-plugin/plugin.json | 2 +- plugins/method/.codex-plugin/plugin.json | 14 +- plugins/method/.cursor-plugin/plugin.json | 4 +- plugins/method/LICENSE | 21 + plugins/method/README.md | 15 +- plugins/tea/.antigravity-plugin/plugin.json | 24 +- plugins/tea/.claude-plugin/plugin.json | 2 +- plugins/tea/.codex-plugin/plugin.json | 14 +- plugins/tea/.cursor-plugin/plugin.json | 4 +- plugins/tea/LICENSE | 21 + plugins/tea/README.md | 15 +- .../toolsmith/.antigravity-plugin/plugin.json | 24 +- plugins/toolsmith/.claude-plugin/plugin.json | 2 +- plugins/toolsmith/.codex-plugin/plugin.json | 14 +- plugins/toolsmith/.cursor-plugin/plugin.json | 4 +- plugins/toolsmith/LICENSE | 21 + plugins/toolsmith/README.md | 15 +- release.py | 1682 ++++++++++------- test_release.py | 528 ++++-- 55 files changed, 2048 insertions(+), 1073 deletions(-) create mode 100644 catalog.toml create mode 100644 plugins/bmad-loop/LICENSE create mode 100644 plugins/bmad/LICENSE create mode 100644 plugins/core-tools/LICENSE create mode 100644 plugins/creative/LICENSE create mode 100644 plugins/founder/LICENSE create mode 100644 plugins/method/LICENSE create mode 100644 plugins/tea/LICENSE create mode 100644 plugins/toolsmith/LICENSE diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 4db47c7..b84b11c 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -4,14 +4,13 @@ "name": "Brian (BMad) Madison" }, "metadata": { - "description": "Breakthrough Method of Agile Ai Driven Development — modular BMad v7 skills for software delivery, facilitation, toolsmithing, startups, creative work, and QA." + "description": "Breakthrough Method of Agile AI-Driven Development — modular BMad v7 skills for software delivery, facilitation, toolsmithing, startups, creative work, QA, and unattended loops." }, "plugins": [ { "name": "bmad-core-tools", - "source": "./plugins/core-tools", - "description": "BMad Agent (setup, updates, help), adaptive document facilitation, brainstorming, deep research, party mode, and multi-lens review.", "version": "7.0.0", + "description": "BMad Agent (setup, updates, help), adaptive document facilitation, brainstorming, deep research, party mode, and multi-lens review.", "author": { "name": "Brian (BMad) Madison" }, @@ -27,14 +26,14 @@ "review", "skills" ], + "source": "./plugins/core-tools", "category": "Productivity", "strict": true }, { "name": "bmad-method", - "source": "./plugins/method", - "description": "AI software delivery from idea to release with Mary, John, Sally, Winston, Sofia, and Amelia, plus right-sized build and review workflows.", "version": "7.0.0", + "description": "AI software delivery from idea to release with Mary, John, Sally, Winston, Sofia, and Amelia, plus right-sized build and review workflows.", "author": { "name": "Brian (BMad) Madison" }, @@ -50,14 +49,14 @@ "tickets", "development" ], + "source": "./plugins/method", "category": "Developer Tools", "strict": true }, { "name": "bmad-toolsmith", - "source": "./plugins/toolsmith", - "description": "Build, convert, review, package, migrate, and evaluate standalone or BMad skills, memory agents, and custom modules with Smithy and bmad-eval.", "version": "7.0.0", + "description": "Build, convert, review, package, migrate, and evaluate standalone or BMad skills, memory agents, and custom modules with Smithy and bmad-eval.", "author": { "name": "Brian (BMad) Madison" }, @@ -72,14 +71,14 @@ "agents", "modules" ], + "source": "./plugins/toolsmith", "category": "Developer Tools", "strict": true }, { "name": "bmad-founder", - "source": "./plugins/founder", - "description": "Nadia, the Founder Advisor: startup diagnostics, customer evidence, Python runway and cap-table math, pitch decks, and an investor Pitch Room.", "version": "7.0.0", + "description": "Nadia, the Founder Advisor: startup diagnostics, customer evidence, Python runway and cap-table math, pitch decks, and an investor Pitch Room.", "author": { "name": "Brian (BMad) Madison" }, @@ -95,14 +94,14 @@ "pricing", "runway" ], + "source": "./plugins/founder", "category": "Productivity", "strict": true }, { "name": "bmad-creative", - "source": "./plugins/creative", - "description": "Clio, the Creative Director: voice-grounded talks, essays, scripts, stories, worlds, visual decks, and non-code creative problem solving.", "version": "7.0.0", + "description": "Clio, the Creative Director: voice-grounded talks, essays, scripts, stories, worlds, visual decks, and non-code creative problem solving.", "author": { "name": "Brian (BMad) Madison" }, @@ -117,14 +116,14 @@ "talks", "presentations" ], + "source": "./plugins/creative", "category": "Productivity", "strict": true }, { "name": "bmad-tea", - "source": "./plugins/tea", - "description": "Murat, the Test Architect: risk-based test strategy, framework setup, automation, test review, NFR assessment, traceability, and release gates.", "version": "4.6.2", + "description": "Murat, the Test Architect: risk-based test strategy, framework setup, automation, test review, NFR assessment, traceability, and release gates.", "author": { "name": "Brian (BMad) Madison" }, @@ -139,14 +138,14 @@ "traceability", "tea" ], + "source": "./plugins/tea", "category": "Developer Tools", "strict": true }, { "name": "bmad-loop", - "source": "./plugins/bmad-loop", - "description": "Unattended ticket-tree build orchestrator: wires and resolves autonomous implementation, verification, and commit loops across coding agents.", "version": "0.13.2", + "description": "Unattended ticket-tree build orchestrator: wires and resolves autonomous implementation, verification, and commit loops across coding agents.", "author": { "name": "Brian (BMad) Madison" }, @@ -161,6 +160,7 @@ "tickets", "loop" ], + "source": "./plugins/bmad-loop", "category": "Developer Tools", "strict": true } diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 57b7b32..f74a373 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -5,6 +5,9 @@ on: branches: [main] pull_request: +permissions: + contents: read + jobs: validate: runs-on: ubuntu-latest @@ -13,7 +16,9 @@ jobs: - uses: actions/setup-python@v5 with: python-version: "3.11" - - name: Run release script tests + - name: Run release script unit tests run: python3 -m unittest -v test_release.py - - name: Validate plugin manifests, skills, and marketplaces + - name: Validate checked-in plugins, manifests, and marketplaces run: python3 release.py --validate + - name: Export and validate OpenAI/Codex portal .zip packages offline + run: python3 release.py --zip-existing diff --git a/LICENSE b/LICENSE index 557212d..339ade9 100644 --- a/LICENSE +++ b/LICENSE @@ -2,9 +2,6 @@ MIT License Copyright (c) 2025 BMad Code, LLC -This project incorporates contributions from the open source community. -See [CONTRIBUTORS.md](CONTRIBUTORS.md) for contributor attribution. - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -22,9 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -TRADEMARK NOTICE: -BMad™, BMad Method™, and BMad Core™ are trademarks of BMad Code, LLC, covering all -casings and variations (including BMAD, bmad, BMadMethod, BMAD-METHOD, etc.). The use of -these trademarks in this software does not grant any rights to use the trademarks -for any other purpose. See [TRADEMARK.md](TRADEMARK.md) for detailed guidelines. diff --git a/README.md b/README.md index 9617be1..f9cbc12 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # BMad Method — Plugins -Multi-platform plugin distribution and marketplace for [BMad Method v7](https://github.com/bmad-code-org/BMAD-METHOD) across Claude Code, OpenAI Codex, Cursor, Antigravity, GitHub Copilot CLI, and Qwen Code. For Skills CLI (`npx bmad-method` / `npx skills add`), install straight from [bmad-code-org/BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD). +Multi-platform plugin distribution and marketplaces for [BMad Method v7](https://github.com/bmad-code-org/BMAD-METHOD) (Claude Code, GitHub Copilot CLI, Qwen Code, OpenAI Codex, and Cursor) plus standalone plugin bundles for Antigravity. For Skills CLI (`npx bmad-method` / `npx skills add`), install straight from [bmad-code-org/BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD). -> **Generated distribution repository:** Please star, file issues, and open pull requests in the upstream source repositories — [bmad-code-org/BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) (plus [bmad-method-test-architecture-enterprise](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise) and [bmad-loop](https://github.com/bmad-code-org/bmad-loop)). Direct PRs to generated skill trees here will be overwritten on release. +> **Generated distribution repository:** Please star, file issues, and open pull requests in the upstream source repositories — [bmad-code-org/BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD), [bmad-method-test-architecture-enterprise](https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise), and [bmad-loop](https://github.com/bmad-code-org/bmad-loop). Direct PRs to generated plugin directories here will be overwritten on release. ## Marketplace Plugins (Modular) @@ -10,25 +10,25 @@ Self-hosted marketplaces expose 7 modular plugins with zero overlapping skills. | Plugin | Path | What it ships | Requires | | --- | --- | --- | --- | -| **`bmad-core-tools`** | `plugins/core-tools/` | BMad Agent (`bmad`), `bmad-facilitate`, `bmad-customize`, brainstorming, deep research, party mode, review, ingest, shard-pro | — | -| **`bmad-method`** | `plugins/method/` | Mary, John, Sally, Winston, Sofia, Amelia, ticket trees, `bmad-build`, `bmad-code-review`, `bmad-walkthrough`, `bmad-retrospective` | `bmad-core-tools` | +| **`bmad-core-tools`** | `plugins/core-tools/` | BMad Agent (`bmad`), facilitation, customization, brainstorming, deep research, party mode, review, ingest, sharding | — | +| **`bmad-method`** | `plugins/method/` | Mary, John, Sally, Winston, Sofia, Amelia, ticket trees, build, code review, walkthrough, retrospective | `bmad-core-tools` | | **`bmad-toolsmith`** | `plugins/toolsmith/` | Smithy (`bmad-toolsmith`) and `bmad-eval` for building and evaluating skills, memory agents, and modules | `bmad-core-tools` | -| **`bmad-founder`** | `plugins/founder/` | Nadia (`bmad-founder-agent-advisor`) for startup diagnostics, financial math, fundraising, and pitch rehearsal | `bmad-core-tools` | +| **`bmad-founder`** | `plugins/founder/` | Nadia (`bmad-founder-agent-advisor`) for startup diagnostics, Python financial math, fundraising, and pitch rehearsal | `bmad-core-tools` | | **`bmad-creative`** | `plugins/creative/` | Clio (`bmad-creative-agent-director`) for voice-grounded writing, talks, decks, and creative studio rooms | `bmad-core-tools` | | **`bmad-tea`** | `plugins/tea/` | Murat (`bmad-tea`) and test-architecture workflows | `bmad-core-tools` | | **`bmad-loop`** | `plugins/bmad-loop/` | Skills for the unattended `bmad-loop` ticket-tree orchestrator | `bmad-core-tools`, `bmad-method` | ## Self-Contained Portal Bundle -`plugins/bmad/` (`bmad`) bundles **`core-tools` + `method` + `toolsmith`** into one dependency-free plugin for official directories (Anthropic Developer Portal subdirectory `plugins/bmad`, OpenAI Plugin Portal rootless `.zip` via `release.py --zip`, and standalone Antigravity or Cursor installs). It is intentionally omitted from the self-hosted `marketplace.json` indexes so marketplace users do not hit duplicate skill copies alongside `bmad-core-tools`. +`plugins/bmad/` (`bmad`) bundles **`core-tools` + `method` + `toolsmith`** into one dependency-free plugin for official directories (Anthropic Developer Portal subdirectory `plugins/bmad/`, OpenAI Plugin Portal rootless `.zip` via `release.py --zip`, and standalone Antigravity or Cursor installs). It is intentionally omitted from the self-hosted `marketplace.json` catalogs so marketplace users do not hit duplicate skill copies alongside `bmad-core-tools`. ## Install -Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` inside your project after installing the plugin(s). +Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then initialize `_bmad/` in your project after installing your plugins. -### Claude Code / GitHub Copilot CLI / Qwen +### Claude Code -Add the marketplace and install plugins inside your session: +In an active session: ```text /plugin marketplace add bmad-code-org/bmad-plugins @@ -36,14 +36,33 @@ Add the marketplace and install plugins inside your session: /plugin install bmad-method@bmad ``` -Or install directly from your terminal with the Claude CLI: +Or from your terminal: ```bash claude plugin install bmad-core-tools --marketplace bmad-code-org/bmad-plugins claude plugin install bmad-method --marketplace bmad-code-org/bmad-plugins ``` -Add any other module plugins you want (`bmad-toolsmith@bmad`, `bmad-founder@bmad`, `bmad-creative@bmad`, `bmad-tea@bmad`, `bmad-loop@bmad`). +Claude Code namespaces plugin slash commands as `/:`. After installing modular plugins, run `/bmad-core-tools:bmad setup` (or `/bmad:bmad setup` when using the self-contained `bmad` bundle), or simply ask Claude to run BMad setup in natural language. + +Optional add-ons: `bmad-toolsmith@bmad`, `bmad-founder@bmad`, `bmad-creative@bmad`, `bmad-tea@bmad`, `bmad-loop@bmad`. + +### GitHub Copilot CLI + +```bash +copilot plugin marketplace add bmad-code-org/bmad-plugins +copilot plugin install bmad-core-tools@bmad +copilot plugin install bmad-method@bmad +``` + +### Qwen Code + +```bash +qwen extensions install bmad-code-org/bmad-plugins:bmad-core-tools +qwen extensions install bmad-code-org/bmad-plugins:bmad-method +``` + +Or run `qwen extensions install bmad-code-org/bmad-plugins` to pick plugins interactively. ### OpenAI Codex @@ -51,15 +70,15 @@ Add any other module plugins you want (`bmad-toolsmith@bmad`, `bmad-founder@bmad codex plugin marketplace add bmad-code-org/bmad-plugins ``` -Or select `bmad-core-tools` and add-on plugins via `/plugins` in Codex CLI / Codex App. +Then run `/plugins` in Codex CLI or open the plugin browser in the Codex App to install `bmad-core-tools` and any add-on plugins (`bmad-method`, `bmad-toolsmith`, `bmad-founder`, `bmad-creative`, `bmad-tea`, `bmad-loop`). Start a new session after installing. ### Cursor -Register this repository's `.cursor-plugin/marketplace.json` in Cursor or install `bmad-core-tools` and add-on plugins from `plugins//`. +Register this repository's `.cursor-plugin/marketplace.json` in Cursor (`Settings -> Plugins / Marketplaces` or workspace plugin config) to pick from the 7 modular plugins, or load a plugin folder directly (`plugins//` or the self-contained `plugins/bmad/` bundle). ### Antigravity -Clone this repository locally and install either the self-contained bundle or individual plugin directories under `plugins/`: +Clone this repository locally and install either the self-contained `plugins/bmad` bundle or individual plugin directories under `plugins/`: ```bash git clone --depth 1 https://github.com/bmad-code-org/bmad-plugins.git @@ -68,18 +87,27 @@ agy plugin install ./bmad-plugins/plugins/bmad ## Maintainers -Requires Python 3.11+ (stdlib only): +Requires Python 3.11+ (stdlib only); metadata lives in `catalog.toml`: ```bash -# Rebuild all 7 modular plugins + the portal bundle from upstream main branches +# Rebuild all 7 modular plugins + portal bundle from upstream default branches (main) python3 release.py -# Also export clean rootless Codex/OpenAI portal .zip packages into dist/ +# Rebuild and export validated rootless OpenAI/Codex portal .zip packages into dist/ python3 release.py --zip -# Validate checked-in plugins, manifests, and marketplaces offline -python3 release.py --validate +# Rehearse against a local checkout before pushing upstream main +python3 release.py --source bmad-code-org/BMAD-METHOD=/path/to/BMAD-METHOD --zip + +# Rebuild a subset of plugins cleanly (keeping marketplace metadata valid) +python3 release.py --only bmad-tea -# Run generator and validator unit tests +# Offline checks (run automatically by CI) +python3 release.py --validate +python3 release.py --zip-existing python3 -m unittest -v test_release.py ``` + +## License & Trademarks + +MIT — see [LICENSE](LICENSE). See the upstream [Trademark Notice](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/TRADEMARK.md) and [Contributors](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CONTRIBUTORS.md) in [BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD). diff --git a/catalog.toml b/catalog.toml new file mode 100644 index 0000000..583dc8f --- /dev/null +++ b/catalog.toml @@ -0,0 +1,166 @@ +[meta] +author_name = "Brian (BMad) Madison" +developer_name = "BMad Code Open Source Team" +license = "MIT" +marketplace_name = "bmad" +marketplace_display_name = "BMad" +marketplace_description = "Breakthrough Method of Agile AI-Driven Development — modular BMad v7 skills for software delivery, facilitation, toolsmithing, startups, creative work, QA, and unattended loops." + +[[sources]] +slug = "bmad-code-org/BMAD-METHOD" +modules = ["core-tools", "method", "toolsmith", "founder", "creative"] +grouped = true + +[[sources]] +slug = "bmad-code-org/bmad-method-test-architecture-enterprise" +modules = ["tea"] +grouped = false + +[[sources]] +slug = "bmad-code-org/bmad-loop" +modules = ["bmad-loop"] +grouped = false + +[[plugins]] +dir_name = "core-tools" +name = "bmad-core-tools" +display_name = "BMad Core Tools" +short_description = "BMad Agent & core tools" +description = "BMad Agent (setup, updates, help), adaptive document facilitation, brainstorming, deep research, party mode, and multi-lens review." +long_description = "Required foundation for every BMad module: the BMad Agent (bmad) for project setup, status, updates, migrations, and modular help, alongside shared facilitation, research, review, and ideation skills." +category = "Productivity" +keywords = ["bmad", "agents", "facilitation", "brainstorming", "research", "review", "skills"] +suggested_prompts = [ + "Initialize BMad in this project", + "Brainstorm and stress-test an idea with BMad", +] +homepage = "https://github.com/bmad-code-org/BMAD-METHOD" +repository = "https://github.com/bmad-code-org/BMAD-METHOD" +modules = ["core-tools"] +requires_note = "" + +[[plugins]] +dir_name = "method" +name = "bmad-method" +display_name = "BMad Method" +short_description = "AI software delivery suite" +description = "AI software delivery from idea to release with Mary, John, Sally, Winston, Sofia, and Amelia, plus right-sized build and review workflows." +long_description = "Full-lifecycle AI software delivery suite featuring Analyst, PM, UX Designer, Architect, Product Owner, and Developer personas plus specs, fractal ticket trees, builds, code reviews, walkthroughs, and retrospectives." +category = "Developer Tools" +keywords = ["bmad", "agile", "specs", "architecture", "ux", "tickets", "development"] +suggested_prompts = [ + "Plan and build a new feature with BMad Method", + "Run a multi-lens code review on my current branch", +] +homepage = "https://github.com/bmad-code-org/BMAD-METHOD" +repository = "https://github.com/bmad-code-org/BMAD-METHOD" +modules = ["method"] +requires_note = "Requires **bmad-core-tools** (`bmad` and `bmad-facilitate`)." + +[[plugins]] +dir_name = "toolsmith" +name = "bmad-toolsmith" +display_name = "BMad Toolsmith" +short_description = "Build & eval AI skills" +description = "Build, convert, review, package, migrate, and evaluate standalone or BMad skills, memory agents, and custom modules with Smithy and bmad-eval." +long_description = "Smithy (bmad-toolsmith) coaches and builds standalone or BMad skills, agents, memory agents, templates, and BMOD modules, paired with bmad-eval for clean-room quality and trigger benchmarks." +category = "Developer Tools" +keywords = ["bmad", "toolsmith", "skills", "evals", "agents", "modules"] +suggested_prompts = [ + "Build and evaluate a new custom skill with Smithy", + "Convert these prompts into a skill with trigger evals", +] +homepage = "https://github.com/bmad-code-org/BMAD-METHOD" +repository = "https://github.com/bmad-code-org/BMAD-METHOD" +modules = ["toolsmith"] +requires_note = "Requires **bmad-core-tools** (`bmad` and `bmad-facilitate`)." + +[[plugins]] +dir_name = "founder" +name = "bmad-founder" +display_name = "BMad Founder" +short_description = "Startup & pitch advisor" +description = "Nadia, the Founder Advisor: startup diagnostics, customer evidence, Python runway and cap-table math, pitch decks, and an investor Pitch Room." +long_description = "Nadia coaches startup strategy, pricing, unit economics, market sizing, fundraising, and investor pitch rehearsal using deterministic Python math in one shared business record." +category = "Productivity" +keywords = ["bmad", "founder", "startup", "fundraising", "pitch", "pricing", "runway"] +suggested_prompts = [ + "Run a startup diagnostic and calculate runway with Nadia", + "Craft a pitch deck and rehearse in the Pitch Room", +] +homepage = "https://github.com/bmad-code-org/BMAD-METHOD" +repository = "https://github.com/bmad-code-org/BMAD-METHOD" +modules = ["founder"] +requires_note = "Requires **bmad-core-tools** (`bmad` and `bmad-facilitate`)." + +[[plugins]] +dir_name = "creative" +name = "bmad-creative" +display_name = "BMad Creative" +short_description = "Creative writing & studio" +description = "Clio, the Creative Director: voice-grounded talks, essays, scripts, stories, worlds, visual decks, and non-code creative problem solving." +long_description = "Clio replaces the Creative Intelligence Suite with a persistent voice guide, anti-slop prose linter, coached creative writing workflows, and collaborative studio rooms." +category = "Productivity" +keywords = ["bmad", "creative", "writing", "storytelling", "talks", "presentations"] +suggested_prompts = [ + "Outline a conference keynote in my voice with Clio", + "Convene the Creative Studio on a tough problem", +] +homepage = "https://github.com/bmad-code-org/BMAD-METHOD" +repository = "https://github.com/bmad-code-org/BMAD-METHOD" +modules = ["creative"] +requires_note = "Requires **bmad-core-tools** (`bmad` and `bmad-facilitate`)." + +[[plugins]] +dir_name = "tea" +name = "bmad-tea" +display_name = "BMad Test Architect (TEA)" +short_description = "Risk-based test architecture" +description = "Murat, the Test Architect: risk-based test strategy, framework setup, automation, test review, NFR assessment, traceability, and release gates." +long_description = "Test Architect (TEA) adds Murat and workflows for risk-based test design, framework scaffolding, ATDD and automation, test review, NFR evaluation, and release-gate traceability." +category = "Developer Tools" +keywords = ["bmad", "testing", "qa", "automation", "traceability", "tea"] +suggested_prompts = [ + "Design a risk-based test strategy with Murat", + "Run test traceability and check release gate readiness", +] +homepage = "https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise" +repository = "https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise" +modules = ["tea"] +requires_note = "Requires **bmad-core-tools** (`bmad`)." + +[[plugins]] +dir_name = "bmad-loop" +name = "bmad-loop" +display_name = "BMad Loop" +short_description = "Autonomous ticket-tree loops" +description = "Unattended ticket-tree build orchestrator: wires and resolves autonomous implementation, verification, and commit loops across coding agents." +long_description = "BMad Loop integrates the unattended bmad-loop CLI/TUI orchestrator with your v7 ticket tree for autonomous multi-agent execution, verification, and deferred work sweeps." +category = "Developer Tools" +keywords = ["bmad", "automation", "orchestrator", "autonomous", "tickets", "loop"] +suggested_prompts = [ + "Set up bmad-loop for unattended ticket execution", + "Prepare an epic sweep for autonomous ticket builds", +] +homepage = "https://github.com/bmad-code-org/bmad-loop" +repository = "https://github.com/bmad-code-org/bmad-loop" +modules = ["bmad-loop"] +requires_note = "Requires **bmad-core-tools** and **bmad-method**." + +[[portal_bundles]] +dir_name = "bmad" +name = "bmad" +display_name = "BMad" +short_description = "BMad Core, Method & Toolsmith" +description = "Self-contained BMad bundle combining Core Tools, BMad Method, and Toolsmith for end-to-end AI software delivery and skill authoring." +long_description = "Self-contained official portal bundle combining BMad Core Tools (bmad agent, facilitation, brainstorming, research, review), BMad Method (planning, UX, architecture, ticket trees, builds), and Toolsmith (Smithy and bmad-eval) in one dependency-free plugin." +category = "Developer Tools" +keywords = ["bmad", "agile", "agents", "specs", "architecture", "toolsmith", "skills"] +suggested_prompts = [ + "Initialize BMad in this project", + "Plan and build a new feature end to end with BMad Method", +] +homepage = "https://github.com/bmad-code-org/BMAD-METHOD" +repository = "https://github.com/bmad-code-org/BMAD-METHOD" +modules = ["core-tools", "method", "toolsmith"] +requires_note = "" diff --git a/plugins/bmad-loop/.antigravity-plugin/plugin.json b/plugins/bmad-loop/.antigravity-plugin/plugin.json index 59c6204..342fb20 100644 --- a/plugins/bmad-loop/.antigravity-plugin/plugin.json +++ b/plugins/bmad-loop/.antigravity-plugin/plugin.json @@ -1,13 +1,13 @@ { "name": "bmad-loop", - "displayName": "BMad Loop", "version": "0.13.2", "description": "Unattended ticket-tree build orchestrator: wires and resolves autonomous implementation, verification, and commit loops across coding agents.", - "suggestedPrompts": [ - "Set up bmad-loop in this repository with /bmad-loop-setup", - "Prepare an epic sweep for unattended ticket execution" - ], - "category": "Developer Tools", + "author": { + "name": "Brian (BMad) Madison" + }, + "homepage": "https://github.com/bmad-code-org/bmad-loop", + "repository": "https://github.com/bmad-code-org/bmad-loop", + "license": "MIT", "keywords": [ "bmad", "automation", @@ -16,11 +16,11 @@ "tickets", "loop" ], - "author": { - "name": "Brian (BMad) Madison" - }, - "homepage": "https://github.com/bmad-code-org/bmad-loop", - "repository": "https://github.com/bmad-code-org/bmad-loop", - "license": "MIT", + "displayName": "BMad Loop", + "category": "Developer Tools", + "suggestedPrompts": [ + "Set up bmad-loop for unattended ticket execution", + "Prepare an epic sweep for autonomous ticket builds" + ], "logo": "assets/icon.png" } diff --git a/plugins/bmad-loop/.claude-plugin/plugin.json b/plugins/bmad-loop/.claude-plugin/plugin.json index 9a98a28..0ecf333 100644 --- a/plugins/bmad-loop/.claude-plugin/plugin.json +++ b/plugins/bmad-loop/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "bmad-loop", - "description": "Unattended ticket-tree build orchestrator: wires and resolves autonomous implementation, verification, and commit loops across coding agents.", "version": "0.13.2", + "description": "Unattended ticket-tree build orchestrator: wires and resolves autonomous implementation, verification, and commit loops across coding agents.", "author": { "name": "Brian (BMad) Madison" }, diff --git a/plugins/bmad-loop/.codex-plugin/plugin.json b/plugins/bmad-loop/.codex-plugin/plugin.json index 6a00a84..c9adba2 100644 --- a/plugins/bmad-loop/.codex-plugin/plugin.json +++ b/plugins/bmad-loop/.codex-plugin/plugin.json @@ -18,12 +18,20 @@ ], "interface": { "displayName": "BMad Loop", - "shortDescription": "Setup, resolution, and epic sweep skills for the unattended bmad-loop orchestrator.", - "longDescription": "BMad Loop integrates the bmad-loop CLI/TUI orchestrator with your v7 ticket tree via bmad-loop-setup, bmad-loop-resolve, and bmad-loop-sweep.", + "shortDescription": "Autonomous ticket-tree loops", + "longDescription": "BMad Loop integrates the unattended bmad-loop CLI/TUI orchestrator with your v7 ticket tree for autonomous multi-agent execution, verification, and deferred work sweeps.", "developerName": "BMad Code Open Source Team", "category": "Developer Tools", + "capabilities": [ + "Interactive" + ], "websiteURL": "https://github.com/bmad-code-org/bmad-loop", - "logo": "./assets/icon.png" + "defaultPrompt": [ + "Set up bmad-loop for unattended ticket execution", + "Prepare an epic sweep for autonomous ticket builds" + ], + "logo": "./assets/icon.png", + "composerIcon": "./assets/icon.png" }, "skills": "./skills/" } diff --git a/plugins/bmad-loop/.cursor-plugin/plugin.json b/plugins/bmad-loop/.cursor-plugin/plugin.json index 4714a5c..cb7c9c4 100644 --- a/plugins/bmad-loop/.cursor-plugin/plugin.json +++ b/plugins/bmad-loop/.cursor-plugin/plugin.json @@ -1,8 +1,7 @@ { "name": "bmad-loop", - "displayName": "BMad Loop", - "description": "Unattended ticket-tree build orchestrator: wires and resolves autonomous implementation, verification, and commit loops across coding agents.", "version": "0.13.2", + "description": "Unattended ticket-tree build orchestrator: wires and resolves autonomous implementation, verification, and commit loops across coding agents.", "author": { "name": "Brian (BMad) Madison" }, @@ -17,6 +16,7 @@ "tickets", "loop" ], + "displayName": "BMad Loop", "skills": "./skills/", "logo": "./assets/icon.png" } diff --git a/plugins/bmad-loop/LICENSE b/plugins/bmad-loop/LICENSE new file mode 100644 index 0000000..339ade9 --- /dev/null +++ b/plugins/bmad-loop/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 BMad Code, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/bmad-loop/README.md b/plugins/bmad-loop/README.md index 26390c6..0a29757 100644 --- a/plugins/bmad-loop/README.md +++ b/plugins/bmad-loop/README.md @@ -1,6 +1,6 @@ # BMad Loop -BMad Loop integrates the bmad-loop CLI/TUI orchestrator with your v7 ticket tree via bmad-loop-setup, bmad-loop-resolve, and bmad-loop-sweep. +BMad Loop integrates the unattended bmad-loop CLI/TUI orchestrator with your v7 ticket tree for autonomous multi-agent execution, verification, and deferred work sweeps. - **Plugin:** `bmad-loop` (`0.13.2`) - **Modules bundled:** `bmad-loop` @@ -12,15 +12,16 @@ Requires **bmad-core-tools** and **bmad-method**. ## Install -```bash -claude plugin install bmad-loop --marketplace bmad-code-org/bmad-plugins -``` +- **Claude Code:** `claude plugin install bmad-loop --marketplace bmad-code-org/bmad-plugins` (or `/plugin marketplace add bmad-code-org/bmad-plugins` then `/plugin install bmad-loop@bmad`) +- **GitHub Copilot CLI:** `copilot plugin marketplace add bmad-code-org/bmad-plugins` then `copilot plugin install bmad-loop@bmad` +- **OpenAI Codex:** `codex plugin marketplace add bmad-code-org/bmad-plugins`, then install `bmad-loop` via `/plugins` in Codex CLI / Codex App +- **Qwen Code:** `qwen extensions install bmad-code-org/bmad-plugins:bmad-loop` -Or inside Claude Code: `/plugin marketplace add bmad-code-org/bmad-plugins`, then `/plugin install bmad-loop@bmad`. +In Claude Code, plugin skills are namespaced as `/:` (for example, `/bmad-loop:...`), or invoke them naturally by describing what you want. ## Setup -Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` in your project. +Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run BMad setup inside your project (ask your agent to set up BMad, or run `/bmad-core-tools:bmad setup` in Claude Code). ## Included Skills (4) diff --git a/plugins/bmad/.antigravity-plugin/plugin.json b/plugins/bmad/.antigravity-plugin/plugin.json index 16abde3..4f394a7 100644 --- a/plugins/bmad/.antigravity-plugin/plugin.json +++ b/plugins/bmad/.antigravity-plugin/plugin.json @@ -1,13 +1,13 @@ { "name": "bmad", - "displayName": "BMad", "version": "7.0.0", "description": "Self-contained BMad bundle combining Core Tools, BMad Method, and Toolsmith for end-to-end AI software delivery and skill authoring.", - "suggestedPrompts": [ - "Initialize BMad in this project with /bmad setup", - "Plan and build a new feature end to end with BMad Method" - ], - "category": "Developer Tools", + "author": { + "name": "Brian (BMad) Madison" + }, + "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", + "repository": "https://github.com/bmad-code-org/BMAD-METHOD", + "license": "MIT", "keywords": [ "bmad", "agile", @@ -17,11 +17,11 @@ "toolsmith", "skills" ], - "author": { - "name": "Brian (BMad) Madison" - }, - "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", - "repository": "https://github.com/bmad-code-org/BMAD-METHOD", - "license": "MIT", + "displayName": "BMad", + "category": "Developer Tools", + "suggestedPrompts": [ + "Initialize BMad in this project", + "Plan and build a new feature end to end with BMad Method" + ], "logo": "assets/icon.png" } diff --git a/plugins/bmad/.claude-plugin/plugin.json b/plugins/bmad/.claude-plugin/plugin.json index ecce0a3..fa9db20 100644 --- a/plugins/bmad/.claude-plugin/plugin.json +++ b/plugins/bmad/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "bmad", - "description": "Self-contained BMad bundle combining Core Tools, BMad Method, and Toolsmith for end-to-end AI software delivery and skill authoring.", "version": "7.0.0", + "description": "Self-contained BMad bundle combining Core Tools, BMad Method, and Toolsmith for end-to-end AI software delivery and skill authoring.", "author": { "name": "Brian (BMad) Madison" }, diff --git a/plugins/bmad/.codex-plugin/plugin.json b/plugins/bmad/.codex-plugin/plugin.json index e9c6228..3a75e91 100644 --- a/plugins/bmad/.codex-plugin/plugin.json +++ b/plugins/bmad/.codex-plugin/plugin.json @@ -19,12 +19,20 @@ ], "interface": { "displayName": "BMad", - "shortDescription": "Complete self-contained BMad bundle: Core Tools + BMad Method + Toolsmith.", - "longDescription": "Official portal distribution bundling Core Tools (bmad agent, facilitation, brainstorming, research, review, party mode), BMad Method (Mary, John, Sally, Winston, Sofia, Amelia, ticket trees, builds, code reviews, walkthroughs), and Toolsmith (Smithy + bmad-eval) in one dependency-free plugin.", + "shortDescription": "BMad Core, Method & Toolsmith", + "longDescription": "Self-contained official portal bundle combining BMad Core Tools (bmad agent, facilitation, brainstorming, research, review), BMad Method (planning, UX, architecture, ticket trees, builds), and Toolsmith (Smithy and bmad-eval) in one dependency-free plugin.", "developerName": "BMad Code Open Source Team", "category": "Developer Tools", + "capabilities": [ + "Interactive" + ], "websiteURL": "https://github.com/bmad-code-org/BMAD-METHOD", - "logo": "./assets/icon.png" + "defaultPrompt": [ + "Initialize BMad in this project", + "Plan and build a new feature end to end with BMad Method" + ], + "logo": "./assets/icon.png", + "composerIcon": "./assets/icon.png" }, "skills": "./skills/" } diff --git a/plugins/bmad/.cursor-plugin/plugin.json b/plugins/bmad/.cursor-plugin/plugin.json index d66a4f3..e271c49 100644 --- a/plugins/bmad/.cursor-plugin/plugin.json +++ b/plugins/bmad/.cursor-plugin/plugin.json @@ -1,8 +1,7 @@ { "name": "bmad", - "displayName": "BMad", - "description": "Self-contained BMad bundle combining Core Tools, BMad Method, and Toolsmith for end-to-end AI software delivery and skill authoring.", "version": "7.0.0", + "description": "Self-contained BMad bundle combining Core Tools, BMad Method, and Toolsmith for end-to-end AI software delivery and skill authoring.", "author": { "name": "Brian (BMad) Madison" }, @@ -18,6 +17,7 @@ "toolsmith", "skills" ], + "displayName": "BMad", "skills": "./skills/", "logo": "./assets/icon.png" } diff --git a/plugins/bmad/LICENSE b/plugins/bmad/LICENSE new file mode 100644 index 0000000..339ade9 --- /dev/null +++ b/plugins/bmad/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 BMad Code, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/bmad/README.md b/plugins/bmad/README.md index d12ae52..af14846 100644 --- a/plugins/bmad/README.md +++ b/plugins/bmad/README.md @@ -1,14 +1,18 @@ # BMad -Official portal distribution bundling Core Tools (bmad agent, facilitation, brainstorming, research, review, party mode), BMad Method (Mary, John, Sally, Winston, Sofia, Amelia, ticket trees, builds, code reviews, walkthroughs), and Toolsmith (Smithy + bmad-eval) in one dependency-free plugin. +Self-contained official portal bundle combining BMad Core Tools (bmad agent, facilitation, brainstorming, research, review), BMad Method (planning, UX, architecture, ticket trees, builds), and Toolsmith (Smithy and bmad-eval) in one dependency-free plugin. - **Plugin:** `bmad` (`7.0.0`) - **Modules bundled:** `core-tools`, `method`, `toolsmith` - **Repository:** [https://github.com/bmad-code-org/BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) +## Standalone Install + +This self-contained bundle is intended for official plugin directories and local directory installs (`agy plugin install ./bmad-plugins/plugins/bmad`, Cursor directory install, or OpenAI portal upload). + ## Setup -Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` in your project. +Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run BMad setup inside your project (ask your agent to set up BMad, or run `/bmad:bmad setup` in Claude Code). ## Included Skills (29) diff --git a/plugins/core-tools/.antigravity-plugin/plugin.json b/plugins/core-tools/.antigravity-plugin/plugin.json index 09f6596..f417f0a 100644 --- a/plugins/core-tools/.antigravity-plugin/plugin.json +++ b/plugins/core-tools/.antigravity-plugin/plugin.json @@ -1,13 +1,13 @@ { "name": "bmad-core-tools", - "displayName": "BMad Core Tools", "version": "7.0.0", "description": "BMad Agent (setup, updates, help), adaptive document facilitation, brainstorming, deep research, party mode, and multi-lens review.", - "suggestedPrompts": [ - "Set up BMad in this project with /bmad setup", - "Let's brainstorm and stress-test an idea with BMad" - ], - "category": "Productivity", + "author": { + "name": "Brian (BMad) Madison" + }, + "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", + "repository": "https://github.com/bmad-code-org/BMAD-METHOD", + "license": "MIT", "keywords": [ "bmad", "agents", @@ -17,11 +17,11 @@ "review", "skills" ], - "author": { - "name": "Brian (BMad) Madison" - }, - "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", - "repository": "https://github.com/bmad-code-org/BMAD-METHOD", - "license": "MIT", + "displayName": "BMad Core Tools", + "category": "Productivity", + "suggestedPrompts": [ + "Initialize BMad in this project", + "Brainstorm and stress-test an idea with BMad" + ], "logo": "assets/icon.png" } diff --git a/plugins/core-tools/.claude-plugin/plugin.json b/plugins/core-tools/.claude-plugin/plugin.json index f439a5a..b14189c 100644 --- a/plugins/core-tools/.claude-plugin/plugin.json +++ b/plugins/core-tools/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "bmad-core-tools", - "description": "BMad Agent (setup, updates, help), adaptive document facilitation, brainstorming, deep research, party mode, and multi-lens review.", "version": "7.0.0", + "description": "BMad Agent (setup, updates, help), adaptive document facilitation, brainstorming, deep research, party mode, and multi-lens review.", "author": { "name": "Brian (BMad) Madison" }, diff --git a/plugins/core-tools/.codex-plugin/plugin.json b/plugins/core-tools/.codex-plugin/plugin.json index d1f444c..4c79abb 100644 --- a/plugins/core-tools/.codex-plugin/plugin.json +++ b/plugins/core-tools/.codex-plugin/plugin.json @@ -19,12 +19,20 @@ ], "interface": { "displayName": "BMad Core Tools", - "shortDescription": "The BMad Agent and shared facilitation, research, review, and ideation skills.", - "longDescription": "Required foundation for every BMad module: the BMad Agent (bmad) for setup, status, updates, migrations, and modular help, plus bmad-facilitate, bmad-customize, bmad-advanced-elicitation, bmad-brainstorming, bmad-deep-recon, bmad-forge-idea, bmad-ingest, bmad-party-mode, bmad-review, and bmad-shard-pro.", + "shortDescription": "BMad Agent & core tools", + "longDescription": "Required foundation for every BMad module: the BMad Agent (bmad) for project setup, status, updates, migrations, and modular help, alongside shared facilitation, research, review, and ideation skills.", "developerName": "BMad Code Open Source Team", "category": "Productivity", + "capabilities": [ + "Interactive" + ], "websiteURL": "https://github.com/bmad-code-org/BMAD-METHOD", - "logo": "./assets/icon.png" + "defaultPrompt": [ + "Initialize BMad in this project", + "Brainstorm and stress-test an idea with BMad" + ], + "logo": "./assets/icon.png", + "composerIcon": "./assets/icon.png" }, "skills": "./skills/" } diff --git a/plugins/core-tools/.cursor-plugin/plugin.json b/plugins/core-tools/.cursor-plugin/plugin.json index a4c98e6..34766be 100644 --- a/plugins/core-tools/.cursor-plugin/plugin.json +++ b/plugins/core-tools/.cursor-plugin/plugin.json @@ -1,8 +1,7 @@ { "name": "bmad-core-tools", - "displayName": "BMad Core Tools", - "description": "BMad Agent (setup, updates, help), adaptive document facilitation, brainstorming, deep research, party mode, and multi-lens review.", "version": "7.0.0", + "description": "BMad Agent (setup, updates, help), adaptive document facilitation, brainstorming, deep research, party mode, and multi-lens review.", "author": { "name": "Brian (BMad) Madison" }, @@ -18,6 +17,7 @@ "review", "skills" ], + "displayName": "BMad Core Tools", "skills": "./skills/", "logo": "./assets/icon.png" } diff --git a/plugins/core-tools/LICENSE b/plugins/core-tools/LICENSE new file mode 100644 index 0000000..339ade9 --- /dev/null +++ b/plugins/core-tools/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 BMad Code, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/core-tools/README.md b/plugins/core-tools/README.md index d579777..4f86a8c 100644 --- a/plugins/core-tools/README.md +++ b/plugins/core-tools/README.md @@ -1,6 +1,6 @@ # BMad Core Tools -Required foundation for every BMad module: the BMad Agent (bmad) for setup, status, updates, migrations, and modular help, plus bmad-facilitate, bmad-customize, bmad-advanced-elicitation, bmad-brainstorming, bmad-deep-recon, bmad-forge-idea, bmad-ingest, bmad-party-mode, bmad-review, and bmad-shard-pro. +Required foundation for every BMad module: the BMad Agent (bmad) for project setup, status, updates, migrations, and modular help, alongside shared facilitation, research, review, and ideation skills. - **Plugin:** `bmad-core-tools` (`7.0.0`) - **Modules bundled:** `core-tools` @@ -8,15 +8,16 @@ Required foundation for every BMad module: the BMad Agent (bmad) for setup, stat ## Install -```bash -claude plugin install bmad-core-tools --marketplace bmad-code-org/bmad-plugins -``` +- **Claude Code:** `claude plugin install bmad-core-tools --marketplace bmad-code-org/bmad-plugins` (or `/plugin marketplace add bmad-code-org/bmad-plugins` then `/plugin install bmad-core-tools@bmad`) +- **GitHub Copilot CLI:** `copilot plugin marketplace add bmad-code-org/bmad-plugins` then `copilot plugin install bmad-core-tools@bmad` +- **OpenAI Codex:** `codex plugin marketplace add bmad-code-org/bmad-plugins`, then install `bmad-core-tools` via `/plugins` in Codex CLI / Codex App +- **Qwen Code:** `qwen extensions install bmad-code-org/bmad-plugins:bmad-core-tools` -Or inside Claude Code: `/plugin marketplace add bmad-code-org/bmad-plugins`, then `/plugin install bmad-core-tools@bmad`. +In Claude Code, plugin skills are namespaced as `/:` (for example, `/bmad-core-tools:...`), or invoke them naturally by describing what you want. ## Setup -Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` in your project. +Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run BMad setup inside your project (ask your agent to set up BMad, or run `/bmad-core-tools:bmad setup` in Claude Code). ## Included Skills (12) diff --git a/plugins/creative/.antigravity-plugin/plugin.json b/plugins/creative/.antigravity-plugin/plugin.json index 0afebb1..59eb0af 100644 --- a/plugins/creative/.antigravity-plugin/plugin.json +++ b/plugins/creative/.antigravity-plugin/plugin.json @@ -1,13 +1,13 @@ { "name": "bmad-creative", - "displayName": "BMad Creative", "version": "7.0.0", "description": "Clio, the Creative Director: voice-grounded talks, essays, scripts, stories, worlds, visual decks, and non-code creative problem solving.", - "suggestedPrompts": [ - "Ask Clio to help me outline a conference keynote in my own voice", - "Convene the Creative Studio to crack a tough non-code problem" - ], - "category": "Productivity", + "author": { + "name": "Brian (BMad) Madison" + }, + "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", + "repository": "https://github.com/bmad-code-org/BMAD-METHOD", + "license": "MIT", "keywords": [ "bmad", "creative", @@ -16,11 +16,11 @@ "talks", "presentations" ], - "author": { - "name": "Brian (BMad) Madison" - }, - "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", - "repository": "https://github.com/bmad-code-org/BMAD-METHOD", - "license": "MIT", + "displayName": "BMad Creative", + "category": "Productivity", + "suggestedPrompts": [ + "Outline a conference keynote in my voice with Clio", + "Convene the Creative Studio on a tough problem" + ], "logo": "assets/icon.png" } diff --git a/plugins/creative/.claude-plugin/plugin.json b/plugins/creative/.claude-plugin/plugin.json index b0e77c0..7bc0180 100644 --- a/plugins/creative/.claude-plugin/plugin.json +++ b/plugins/creative/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "bmad-creative", - "description": "Clio, the Creative Director: voice-grounded talks, essays, scripts, stories, worlds, visual decks, and non-code creative problem solving.", "version": "7.0.0", + "description": "Clio, the Creative Director: voice-grounded talks, essays, scripts, stories, worlds, visual decks, and non-code creative problem solving.", "author": { "name": "Brian (BMad) Madison" }, diff --git a/plugins/creative/.codex-plugin/plugin.json b/plugins/creative/.codex-plugin/plugin.json index 3b8845c..b7b3ed4 100644 --- a/plugins/creative/.codex-plugin/plugin.json +++ b/plugins/creative/.codex-plugin/plugin.json @@ -18,12 +18,20 @@ ], "interface": { "displayName": "BMad Creative", - "shortDescription": "Voice-grounded writing, keynote decks, worldbuilding, and creative studio rooms.", - "longDescription": "Clio (bmad-creative-agent-director) replaces the Creative Intelligence Suite with a persistent voice guide, anti-slop linter, eight coached creative document templates, and three multi-persona studio rooms.", + "shortDescription": "Creative writing & studio", + "longDescription": "Clio replaces the Creative Intelligence Suite with a persistent voice guide, anti-slop prose linter, coached creative writing workflows, and collaborative studio rooms.", "developerName": "BMad Code Open Source Team", "category": "Productivity", + "capabilities": [ + "Interactive" + ], "websiteURL": "https://github.com/bmad-code-org/BMAD-METHOD", - "logo": "./assets/icon.png" + "defaultPrompt": [ + "Outline a conference keynote in my voice with Clio", + "Convene the Creative Studio on a tough problem" + ], + "logo": "./assets/icon.png", + "composerIcon": "./assets/icon.png" }, "skills": "./skills/" } diff --git a/plugins/creative/.cursor-plugin/plugin.json b/plugins/creative/.cursor-plugin/plugin.json index 6860883..448740e 100644 --- a/plugins/creative/.cursor-plugin/plugin.json +++ b/plugins/creative/.cursor-plugin/plugin.json @@ -1,8 +1,7 @@ { "name": "bmad-creative", - "displayName": "BMad Creative", - "description": "Clio, the Creative Director: voice-grounded talks, essays, scripts, stories, worlds, visual decks, and non-code creative problem solving.", "version": "7.0.0", + "description": "Clio, the Creative Director: voice-grounded talks, essays, scripts, stories, worlds, visual decks, and non-code creative problem solving.", "author": { "name": "Brian (BMad) Madison" }, @@ -17,6 +16,7 @@ "talks", "presentations" ], + "displayName": "BMad Creative", "skills": "./skills/", "logo": "./assets/icon.png" } diff --git a/plugins/creative/LICENSE b/plugins/creative/LICENSE new file mode 100644 index 0000000..339ade9 --- /dev/null +++ b/plugins/creative/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 BMad Code, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/creative/README.md b/plugins/creative/README.md index 2315477..e534204 100644 --- a/plugins/creative/README.md +++ b/plugins/creative/README.md @@ -1,6 +1,6 @@ # BMad Creative -Clio (bmad-creative-agent-director) replaces the Creative Intelligence Suite with a persistent voice guide, anti-slop linter, eight coached creative document templates, and three multi-persona studio rooms. +Clio replaces the Creative Intelligence Suite with a persistent voice guide, anti-slop prose linter, coached creative writing workflows, and collaborative studio rooms. - **Plugin:** `bmad-creative` (`7.0.0`) - **Modules bundled:** `creative` @@ -8,19 +8,20 @@ Clio (bmad-creative-agent-director) replaces the Creative Intelligence Suite wit ## Prerequisites -Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`). +Requires **bmad-core-tools** (`bmad` and `bmad-facilitate`). ## Install -```bash -claude plugin install bmad-creative --marketplace bmad-code-org/bmad-plugins -``` +- **Claude Code:** `claude plugin install bmad-creative --marketplace bmad-code-org/bmad-plugins` (or `/plugin marketplace add bmad-code-org/bmad-plugins` then `/plugin install bmad-creative@bmad`) +- **GitHub Copilot CLI:** `copilot plugin marketplace add bmad-code-org/bmad-plugins` then `copilot plugin install bmad-creative@bmad` +- **OpenAI Codex:** `codex plugin marketplace add bmad-code-org/bmad-plugins`, then install `bmad-creative` via `/plugins` in Codex CLI / Codex App +- **Qwen Code:** `qwen extensions install bmad-code-org/bmad-plugins:bmad-creative` -Or inside Claude Code: `/plugin marketplace add bmad-code-org/bmad-plugins`, then `/plugin install bmad-creative@bmad`. +In Claude Code, plugin skills are namespaced as `/:` (for example, `/bmad-creative:...`), or invoke them naturally by describing what you want. ## Setup -Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` in your project. +Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run BMad setup inside your project (ask your agent to set up BMad, or run `/bmad-core-tools:bmad setup` in Claude Code). ## Included Skills (1) diff --git a/plugins/founder/.antigravity-plugin/plugin.json b/plugins/founder/.antigravity-plugin/plugin.json index 2f76555..9d9e63b 100644 --- a/plugins/founder/.antigravity-plugin/plugin.json +++ b/plugins/founder/.antigravity-plugin/plugin.json @@ -1,13 +1,13 @@ { "name": "bmad-founder", - "displayName": "BMad Founder", "version": "7.0.0", "description": "Nadia, the Founder Advisor: startup diagnostics, customer evidence, Python runway and cap-table math, pitch decks, and an investor Pitch Room.", - "suggestedPrompts": [ - "Ask Nadia to run a startup diagnostic and calculate our runway", - "Help me craft our pitch deck and rehearse in the Pitch Room" - ], - "category": "Productivity", + "author": { + "name": "Brian (BMad) Madison" + }, + "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", + "repository": "https://github.com/bmad-code-org/BMAD-METHOD", + "license": "MIT", "keywords": [ "bmad", "founder", @@ -17,11 +17,11 @@ "pricing", "runway" ], - "author": { - "name": "Brian (BMad) Madison" - }, - "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", - "repository": "https://github.com/bmad-code-org/BMAD-METHOD", - "license": "MIT", + "displayName": "BMad Founder", + "category": "Productivity", + "suggestedPrompts": [ + "Run a startup diagnostic and calculate runway with Nadia", + "Craft a pitch deck and rehearse in the Pitch Room" + ], "logo": "assets/icon.png" } diff --git a/plugins/founder/.claude-plugin/plugin.json b/plugins/founder/.claude-plugin/plugin.json index c90df74..c39269a 100644 --- a/plugins/founder/.claude-plugin/plugin.json +++ b/plugins/founder/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "bmad-founder", - "description": "Nadia, the Founder Advisor: startup diagnostics, customer evidence, Python runway and cap-table math, pitch decks, and an investor Pitch Room.", "version": "7.0.0", + "description": "Nadia, the Founder Advisor: startup diagnostics, customer evidence, Python runway and cap-table math, pitch decks, and an investor Pitch Room.", "author": { "name": "Brian (BMad) Madison" }, diff --git a/plugins/founder/.codex-plugin/plugin.json b/plugins/founder/.codex-plugin/plugin.json index 32325c5..6b57e49 100644 --- a/plugins/founder/.codex-plugin/plugin.json +++ b/plugins/founder/.codex-plugin/plugin.json @@ -19,12 +19,20 @@ ], "interface": { "displayName": "BMad Founder", - "shortDescription": "Startup advisory, financial modeling, fundraising docs, and investor pitch rehearsal.", - "longDescription": "Nadia (bmad-founder-agent-advisor) coaches 17 business documents in one living business record, computes runway, unit economics, market sizing, and cap tables in Python, and hosts an investor Pitch Room in bmad-party-mode.", + "shortDescription": "Startup & pitch advisor", + "longDescription": "Nadia coaches startup strategy, pricing, unit economics, market sizing, fundraising, and investor pitch rehearsal using deterministic Python math in one shared business record.", "developerName": "BMad Code Open Source Team", "category": "Productivity", + "capabilities": [ + "Interactive" + ], "websiteURL": "https://github.com/bmad-code-org/BMAD-METHOD", - "logo": "./assets/icon.png" + "defaultPrompt": [ + "Run a startup diagnostic and calculate runway with Nadia", + "Craft a pitch deck and rehearse in the Pitch Room" + ], + "logo": "./assets/icon.png", + "composerIcon": "./assets/icon.png" }, "skills": "./skills/" } diff --git a/plugins/founder/.cursor-plugin/plugin.json b/plugins/founder/.cursor-plugin/plugin.json index fd59189..ca57e80 100644 --- a/plugins/founder/.cursor-plugin/plugin.json +++ b/plugins/founder/.cursor-plugin/plugin.json @@ -1,8 +1,7 @@ { "name": "bmad-founder", - "displayName": "BMad Founder", - "description": "Nadia, the Founder Advisor: startup diagnostics, customer evidence, Python runway and cap-table math, pitch decks, and an investor Pitch Room.", "version": "7.0.0", + "description": "Nadia, the Founder Advisor: startup diagnostics, customer evidence, Python runway and cap-table math, pitch decks, and an investor Pitch Room.", "author": { "name": "Brian (BMad) Madison" }, @@ -18,6 +17,7 @@ "pricing", "runway" ], + "displayName": "BMad Founder", "skills": "./skills/", "logo": "./assets/icon.png" } diff --git a/plugins/founder/LICENSE b/plugins/founder/LICENSE new file mode 100644 index 0000000..339ade9 --- /dev/null +++ b/plugins/founder/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 BMad Code, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/founder/README.md b/plugins/founder/README.md index b987488..ea7a228 100644 --- a/plugins/founder/README.md +++ b/plugins/founder/README.md @@ -1,6 +1,6 @@ # BMad Founder -Nadia (bmad-founder-agent-advisor) coaches 17 business documents in one living business record, computes runway, unit economics, market sizing, and cap tables in Python, and hosts an investor Pitch Room in bmad-party-mode. +Nadia coaches startup strategy, pricing, unit economics, market sizing, fundraising, and investor pitch rehearsal using deterministic Python math in one shared business record. - **Plugin:** `bmad-founder` (`7.0.0`) - **Modules bundled:** `founder` @@ -8,19 +8,20 @@ Nadia (bmad-founder-agent-advisor) coaches 17 business documents in one living b ## Prerequisites -Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`). +Requires **bmad-core-tools** (`bmad` and `bmad-facilitate`). ## Install -```bash -claude plugin install bmad-founder --marketplace bmad-code-org/bmad-plugins -``` +- **Claude Code:** `claude plugin install bmad-founder --marketplace bmad-code-org/bmad-plugins` (or `/plugin marketplace add bmad-code-org/bmad-plugins` then `/plugin install bmad-founder@bmad`) +- **GitHub Copilot CLI:** `copilot plugin marketplace add bmad-code-org/bmad-plugins` then `copilot plugin install bmad-founder@bmad` +- **OpenAI Codex:** `codex plugin marketplace add bmad-code-org/bmad-plugins`, then install `bmad-founder` via `/plugins` in Codex CLI / Codex App +- **Qwen Code:** `qwen extensions install bmad-code-org/bmad-plugins:bmad-founder` -Or inside Claude Code: `/plugin marketplace add bmad-code-org/bmad-plugins`, then `/plugin install bmad-founder@bmad`. +In Claude Code, plugin skills are namespaced as `/:` (for example, `/bmad-founder:...`), or invoke them naturally by describing what you want. ## Setup -Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` in your project. +Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run BMad setup inside your project (ask your agent to set up BMad, or run `/bmad-core-tools:bmad setup` in Claude Code). ## Included Skills (1) diff --git a/plugins/method/.antigravity-plugin/plugin.json b/plugins/method/.antigravity-plugin/plugin.json index d7dc0f8..e9b4b56 100644 --- a/plugins/method/.antigravity-plugin/plugin.json +++ b/plugins/method/.antigravity-plugin/plugin.json @@ -1,13 +1,13 @@ { "name": "bmad-method", - "displayName": "BMad Method", "version": "7.0.0", "description": "AI software delivery from idea to release with Mary, John, Sally, Winston, Sofia, and Amelia, plus right-sized build and review workflows.", - "suggestedPrompts": [ - "Let's plan and build a new feature using BMad Method", - "Run a multi-lens code review on my current branch" - ], - "category": "Developer Tools", + "author": { + "name": "Brian (BMad) Madison" + }, + "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", + "repository": "https://github.com/bmad-code-org/BMAD-METHOD", + "license": "MIT", "keywords": [ "bmad", "agile", @@ -17,11 +17,11 @@ "tickets", "development" ], - "author": { - "name": "Brian (BMad) Madison" - }, - "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", - "repository": "https://github.com/bmad-code-org/BMAD-METHOD", - "license": "MIT", + "displayName": "BMad Method", + "category": "Developer Tools", + "suggestedPrompts": [ + "Plan and build a new feature with BMad Method", + "Run a multi-lens code review on my current branch" + ], "logo": "assets/icon.png" } diff --git a/plugins/method/.claude-plugin/plugin.json b/plugins/method/.claude-plugin/plugin.json index 69975b3..d796d51 100644 --- a/plugins/method/.claude-plugin/plugin.json +++ b/plugins/method/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "bmad-method", - "description": "AI software delivery from idea to release with Mary, John, Sally, Winston, Sofia, and Amelia, plus right-sized build and review workflows.", "version": "7.0.0", + "description": "AI software delivery from idea to release with Mary, John, Sally, Winston, Sofia, and Amelia, plus right-sized build and review workflows.", "author": { "name": "Brian (BMad) Madison" }, diff --git a/plugins/method/.codex-plugin/plugin.json b/plugins/method/.codex-plugin/plugin.json index 04c3f9a..a8f47d5 100644 --- a/plugins/method/.codex-plugin/plugin.json +++ b/plugins/method/.codex-plugin/plugin.json @@ -19,12 +19,20 @@ ], "interface": { "displayName": "BMad Method", - "shortDescription": "Full-lifecycle AI software delivery agents, specs, ticket trees, builds, and reviews.", - "longDescription": "The BMad Method software delivery suite: Mary (Analyst), John (PM), Sally (UX Designer), Winston (Architect), Sofia (Product Owner), and Amelia (Developer), together with bmad-build, bmad-build-auto, bmad-code-review, bmad-walkthrough, bmad-project-context, bmad-qa-generate-e2e-tests, and bmad-retrospective.", + "shortDescription": "AI software delivery suite", + "longDescription": "Full-lifecycle AI software delivery suite featuring Analyst, PM, UX Designer, Architect, Product Owner, and Developer personas plus specs, fractal ticket trees, builds, code reviews, walkthroughs, and retrospectives.", "developerName": "BMad Code Open Source Team", "category": "Developer Tools", + "capabilities": [ + "Interactive" + ], "websiteURL": "https://github.com/bmad-code-org/BMAD-METHOD", - "logo": "./assets/icon.png" + "defaultPrompt": [ + "Plan and build a new feature with BMad Method", + "Run a multi-lens code review on my current branch" + ], + "logo": "./assets/icon.png", + "composerIcon": "./assets/icon.png" }, "skills": "./skills/" } diff --git a/plugins/method/.cursor-plugin/plugin.json b/plugins/method/.cursor-plugin/plugin.json index de00582..19a9946 100644 --- a/plugins/method/.cursor-plugin/plugin.json +++ b/plugins/method/.cursor-plugin/plugin.json @@ -1,8 +1,7 @@ { "name": "bmad-method", - "displayName": "BMad Method", - "description": "AI software delivery from idea to release with Mary, John, Sally, Winston, Sofia, and Amelia, plus right-sized build and review workflows.", "version": "7.0.0", + "description": "AI software delivery from idea to release with Mary, John, Sally, Winston, Sofia, and Amelia, plus right-sized build and review workflows.", "author": { "name": "Brian (BMad) Madison" }, @@ -18,6 +17,7 @@ "tickets", "development" ], + "displayName": "BMad Method", "skills": "./skills/", "logo": "./assets/icon.png" } diff --git a/plugins/method/LICENSE b/plugins/method/LICENSE new file mode 100644 index 0000000..339ade9 --- /dev/null +++ b/plugins/method/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 BMad Code, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/method/README.md b/plugins/method/README.md index cae3dfd..f6bfd1d 100644 --- a/plugins/method/README.md +++ b/plugins/method/README.md @@ -1,6 +1,6 @@ # BMad Method -The BMad Method software delivery suite: Mary (Analyst), John (PM), Sally (UX Designer), Winston (Architect), Sofia (Product Owner), and Amelia (Developer), together with bmad-build, bmad-build-auto, bmad-code-review, bmad-walkthrough, bmad-project-context, bmad-qa-generate-e2e-tests, and bmad-retrospective. +Full-lifecycle AI software delivery suite featuring Analyst, PM, UX Designer, Architect, Product Owner, and Developer personas plus specs, fractal ticket trees, builds, code reviews, walkthroughs, and retrospectives. - **Plugin:** `bmad-method` (`7.0.0`) - **Modules bundled:** `method` @@ -8,19 +8,20 @@ The BMad Method software delivery suite: Mary (Analyst), John (PM), Sally (UX De ## Prerequisites -Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`). +Requires **bmad-core-tools** (`bmad` and `bmad-facilitate`). ## Install -```bash -claude plugin install bmad-method --marketplace bmad-code-org/bmad-plugins -``` +- **Claude Code:** `claude plugin install bmad-method --marketplace bmad-code-org/bmad-plugins` (or `/plugin marketplace add bmad-code-org/bmad-plugins` then `/plugin install bmad-method@bmad`) +- **GitHub Copilot CLI:** `copilot plugin marketplace add bmad-code-org/bmad-plugins` then `copilot plugin install bmad-method@bmad` +- **OpenAI Codex:** `codex plugin marketplace add bmad-code-org/bmad-plugins`, then install `bmad-method` via `/plugins` in Codex CLI / Codex App +- **Qwen Code:** `qwen extensions install bmad-code-org/bmad-plugins:bmad-method` -Or inside Claude Code: `/plugin marketplace add bmad-code-org/bmad-plugins`, then `/plugin install bmad-method@bmad`. +In Claude Code, plugin skills are namespaced as `/:` (for example, `/bmad-method:...`), or invoke them naturally by describing what you want. ## Setup -Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` in your project. +Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run BMad setup inside your project (ask your agent to set up BMad, or run `/bmad-core-tools:bmad setup` in Claude Code). ## Included Skills (14) diff --git a/plugins/tea/.antigravity-plugin/plugin.json b/plugins/tea/.antigravity-plugin/plugin.json index 6c33d0b..1439d61 100644 --- a/plugins/tea/.antigravity-plugin/plugin.json +++ b/plugins/tea/.antigravity-plugin/plugin.json @@ -1,13 +1,13 @@ { "name": "bmad-tea", - "displayName": "BMad Test Architect (TEA)", "version": "4.6.2", "description": "Murat, the Test Architect: risk-based test strategy, framework setup, automation, test review, NFR assessment, traceability, and release gates.", - "suggestedPrompts": [ - "Ask Murat to design a risk-based test strategy for this repo", - "Run test traceability and check our release gate readiness" - ], - "category": "Developer Tools", + "author": { + "name": "Brian (BMad) Madison" + }, + "homepage": "https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise", + "repository": "https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise", + "license": "MIT", "keywords": [ "bmad", "testing", @@ -16,11 +16,11 @@ "traceability", "tea" ], - "author": { - "name": "Brian (BMad) Madison" - }, - "homepage": "https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise", - "repository": "https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise", - "license": "MIT", + "displayName": "BMad Test Architect (TEA)", + "category": "Developer Tools", + "suggestedPrompts": [ + "Design a risk-based test strategy with Murat", + "Run test traceability and check release gate readiness" + ], "logo": "assets/icon.png" } diff --git a/plugins/tea/.claude-plugin/plugin.json b/plugins/tea/.claude-plugin/plugin.json index cc4e39e..1535f22 100644 --- a/plugins/tea/.claude-plugin/plugin.json +++ b/plugins/tea/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "bmad-tea", - "description": "Murat, the Test Architect: risk-based test strategy, framework setup, automation, test review, NFR assessment, traceability, and release gates.", "version": "4.6.2", + "description": "Murat, the Test Architect: risk-based test strategy, framework setup, automation, test review, NFR assessment, traceability, and release gates.", "author": { "name": "Brian (BMad) Madison" }, diff --git a/plugins/tea/.codex-plugin/plugin.json b/plugins/tea/.codex-plugin/plugin.json index 0a04493..5537323 100644 --- a/plugins/tea/.codex-plugin/plugin.json +++ b/plugins/tea/.codex-plugin/plugin.json @@ -18,12 +18,20 @@ ], "interface": { "displayName": "BMad Test Architect (TEA)", - "shortDescription": "Enterprise risk-based test architecture, automation, traceability, and release gates.", - "longDescription": "Test Architect (TEA) adds Murat (bmad-tea) and eight testing workflows for test design, framework scaffolding, ATDD/automation, test review, NFR evaluation, and release-gate traceability.", + "shortDescription": "Risk-based test architecture", + "longDescription": "Test Architect (TEA) adds Murat and workflows for risk-based test design, framework scaffolding, ATDD and automation, test review, NFR evaluation, and release-gate traceability.", "developerName": "BMad Code Open Source Team", "category": "Developer Tools", + "capabilities": [ + "Interactive" + ], "websiteURL": "https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise", - "logo": "./assets/icon.png" + "defaultPrompt": [ + "Design a risk-based test strategy with Murat", + "Run test traceability and check release gate readiness" + ], + "logo": "./assets/icon.png", + "composerIcon": "./assets/icon.png" }, "skills": "./skills/" } diff --git a/plugins/tea/.cursor-plugin/plugin.json b/plugins/tea/.cursor-plugin/plugin.json index 94879b4..21fcac6 100644 --- a/plugins/tea/.cursor-plugin/plugin.json +++ b/plugins/tea/.cursor-plugin/plugin.json @@ -1,8 +1,7 @@ { "name": "bmad-tea", - "displayName": "BMad Test Architect (TEA)", - "description": "Murat, the Test Architect: risk-based test strategy, framework setup, automation, test review, NFR assessment, traceability, and release gates.", "version": "4.6.2", + "description": "Murat, the Test Architect: risk-based test strategy, framework setup, automation, test review, NFR assessment, traceability, and release gates.", "author": { "name": "Brian (BMad) Madison" }, @@ -17,6 +16,7 @@ "traceability", "tea" ], + "displayName": "BMad Test Architect (TEA)", "skills": "./skills/", "logo": "./assets/icon.png" } diff --git a/plugins/tea/LICENSE b/plugins/tea/LICENSE new file mode 100644 index 0000000..339ade9 --- /dev/null +++ b/plugins/tea/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 BMad Code, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/tea/README.md b/plugins/tea/README.md index 048943d..b8dea40 100644 --- a/plugins/tea/README.md +++ b/plugins/tea/README.md @@ -1,6 +1,6 @@ # BMad Test Architect (TEA) -Test Architect (TEA) adds Murat (bmad-tea) and eight testing workflows for test design, framework scaffolding, ATDD/automation, test review, NFR evaluation, and release-gate traceability. +Test Architect (TEA) adds Murat and workflows for risk-based test design, framework scaffolding, ATDD and automation, test review, NFR evaluation, and release-gate traceability. - **Plugin:** `bmad-tea` (`4.6.2`) - **Modules bundled:** `tea` @@ -8,19 +8,20 @@ Test Architect (TEA) adds Murat (bmad-tea) and eight testing workflows for test ## Prerequisites -Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`). +Requires **bmad-core-tools** (`bmad`). ## Install -```bash -claude plugin install bmad-tea --marketplace bmad-code-org/bmad-plugins -``` +- **Claude Code:** `claude plugin install bmad-tea --marketplace bmad-code-org/bmad-plugins` (or `/plugin marketplace add bmad-code-org/bmad-plugins` then `/plugin install bmad-tea@bmad`) +- **GitHub Copilot CLI:** `copilot plugin marketplace add bmad-code-org/bmad-plugins` then `copilot plugin install bmad-tea@bmad` +- **OpenAI Codex:** `codex plugin marketplace add bmad-code-org/bmad-plugins`, then install `bmad-tea` via `/plugins` in Codex CLI / Codex App +- **Qwen Code:** `qwen extensions install bmad-code-org/bmad-plugins:bmad-tea` -Or inside Claude Code: `/plugin marketplace add bmad-code-org/bmad-plugins`, then `/plugin install bmad-tea@bmad`. +In Claude Code, plugin skills are namespaced as `/:` (for example, `/bmad-tea:...`), or invoke them naturally by describing what you want. ## Setup -Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` in your project. +Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run BMad setup inside your project (ask your agent to set up BMad, or run `/bmad-core-tools:bmad setup` in Claude Code). ## Included Skills (10) diff --git a/plugins/toolsmith/.antigravity-plugin/plugin.json b/plugins/toolsmith/.antigravity-plugin/plugin.json index 4014633..afe61c5 100644 --- a/plugins/toolsmith/.antigravity-plugin/plugin.json +++ b/plugins/toolsmith/.antigravity-plugin/plugin.json @@ -1,13 +1,13 @@ { "name": "bmad-toolsmith", - "displayName": "BMad Toolsmith", "version": "7.0.0", "description": "Build, convert, review, package, migrate, and evaluate standalone or BMad skills, memory agents, and custom modules with Smithy and bmad-eval.", - "suggestedPrompts": [ - "Help me build and evaluate a new custom skill with Smithy", - "Convert these prompts into a reusable skill and run trigger evals" - ], - "category": "Developer Tools", + "author": { + "name": "Brian (BMad) Madison" + }, + "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", + "repository": "https://github.com/bmad-code-org/BMAD-METHOD", + "license": "MIT", "keywords": [ "bmad", "toolsmith", @@ -16,11 +16,11 @@ "agents", "modules" ], - "author": { - "name": "Brian (BMad) Madison" - }, - "homepage": "https://github.com/bmad-code-org/BMAD-METHOD", - "repository": "https://github.com/bmad-code-org/BMAD-METHOD", - "license": "MIT", + "displayName": "BMad Toolsmith", + "category": "Developer Tools", + "suggestedPrompts": [ + "Build and evaluate a new custom skill with Smithy", + "Convert these prompts into a skill with trigger evals" + ], "logo": "assets/icon.png" } diff --git a/plugins/toolsmith/.claude-plugin/plugin.json b/plugins/toolsmith/.claude-plugin/plugin.json index 7b32aba..9f63998 100644 --- a/plugins/toolsmith/.claude-plugin/plugin.json +++ b/plugins/toolsmith/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "bmad-toolsmith", - "description": "Build, convert, review, package, migrate, and evaluate standalone or BMad skills, memory agents, and custom modules with Smithy and bmad-eval.", "version": "7.0.0", + "description": "Build, convert, review, package, migrate, and evaluate standalone or BMad skills, memory agents, and custom modules with Smithy and bmad-eval.", "author": { "name": "Brian (BMad) Madison" }, diff --git a/plugins/toolsmith/.codex-plugin/plugin.json b/plugins/toolsmith/.codex-plugin/plugin.json index 25ae3ea..9017045 100644 --- a/plugins/toolsmith/.codex-plugin/plugin.json +++ b/plugins/toolsmith/.codex-plugin/plugin.json @@ -18,12 +18,20 @@ ], "interface": { "displayName": "BMad Toolsmith", - "shortDescription": "Author, optimize, migrate, and benchmark AI skills, memory agents, and modules.", - "longDescription": "Smithy (bmad-toolsmith) coaches and builds standalone or BMad skills, agents, memory agents, document templates, and shareable BMOD modules, while bmad-eval runs clean-room quality, baseline, variant, and trigger-matrix benchmarks.", + "shortDescription": "Build & eval AI skills", + "longDescription": "Smithy (bmad-toolsmith) coaches and builds standalone or BMad skills, agents, memory agents, templates, and BMOD modules, paired with bmad-eval for clean-room quality and trigger benchmarks.", "developerName": "BMad Code Open Source Team", "category": "Developer Tools", + "capabilities": [ + "Interactive" + ], "websiteURL": "https://github.com/bmad-code-org/BMAD-METHOD", - "logo": "./assets/icon.png" + "defaultPrompt": [ + "Build and evaluate a new custom skill with Smithy", + "Convert these prompts into a skill with trigger evals" + ], + "logo": "./assets/icon.png", + "composerIcon": "./assets/icon.png" }, "skills": "./skills/" } diff --git a/plugins/toolsmith/.cursor-plugin/plugin.json b/plugins/toolsmith/.cursor-plugin/plugin.json index bead7d9..0ea7fe2 100644 --- a/plugins/toolsmith/.cursor-plugin/plugin.json +++ b/plugins/toolsmith/.cursor-plugin/plugin.json @@ -1,8 +1,7 @@ { "name": "bmad-toolsmith", - "displayName": "BMad Toolsmith", - "description": "Build, convert, review, package, migrate, and evaluate standalone or BMad skills, memory agents, and custom modules with Smithy and bmad-eval.", "version": "7.0.0", + "description": "Build, convert, review, package, migrate, and evaluate standalone or BMad skills, memory agents, and custom modules with Smithy and bmad-eval.", "author": { "name": "Brian (BMad) Madison" }, @@ -17,6 +16,7 @@ "agents", "modules" ], + "displayName": "BMad Toolsmith", "skills": "./skills/", "logo": "./assets/icon.png" } diff --git a/plugins/toolsmith/LICENSE b/plugins/toolsmith/LICENSE new file mode 100644 index 0000000..339ade9 --- /dev/null +++ b/plugins/toolsmith/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 BMad Code, LLC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/plugins/toolsmith/README.md b/plugins/toolsmith/README.md index 0a60c6d..e6191cc 100644 --- a/plugins/toolsmith/README.md +++ b/plugins/toolsmith/README.md @@ -1,6 +1,6 @@ # BMad Toolsmith -Smithy (bmad-toolsmith) coaches and builds standalone or BMad skills, agents, memory agents, document templates, and shareable BMOD modules, while bmad-eval runs clean-room quality, baseline, variant, and trigger-matrix benchmarks. +Smithy (bmad-toolsmith) coaches and builds standalone or BMad skills, agents, memory agents, templates, and BMOD modules, paired with bmad-eval for clean-room quality and trigger benchmarks. - **Plugin:** `bmad-toolsmith` (`7.0.0`) - **Modules bundled:** `toolsmith` @@ -8,19 +8,20 @@ Smithy (bmad-toolsmith) coaches and builds standalone or BMad skills, agents, me ## Prerequisites -Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`). +Requires **bmad-core-tools** (`bmad` and `bmad-facilitate`). ## Install -```bash -claude plugin install bmad-toolsmith --marketplace bmad-code-org/bmad-plugins -``` +- **Claude Code:** `claude plugin install bmad-toolsmith --marketplace bmad-code-org/bmad-plugins` (or `/plugin marketplace add bmad-code-org/bmad-plugins` then `/plugin install bmad-toolsmith@bmad`) +- **GitHub Copilot CLI:** `copilot plugin marketplace add bmad-code-org/bmad-plugins` then `copilot plugin install bmad-toolsmith@bmad` +- **OpenAI Codex:** `codex plugin marketplace add bmad-code-org/bmad-plugins`, then install `bmad-toolsmith` via `/plugins` in Codex CLI / Codex App +- **Qwen Code:** `qwen extensions install bmad-code-org/bmad-plugins:bmad-toolsmith` -Or inside Claude Code: `/plugin marketplace add bmad-code-org/bmad-plugins`, then `/plugin install bmad-toolsmith@bmad`. +In Claude Code, plugin skills are namespaced as `/:` (for example, `/bmad-toolsmith:...`), or invoke them naturally by describing what you want. ## Setup -Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` in your project. +Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run BMad setup inside your project (ask your agent to set up BMad, or run `/bmad-core-tools:bmad setup` in Claude Code). ## Included Skills (3) diff --git a/release.py b/release.py index a8dab66..0d31c70 100644 --- a/release.py +++ b/release.py @@ -1,16 +1,17 @@ #!/usr/bin/env python3 -"""Rebuild BMad plugin distributions and marketplaces from v7 source repos. +"""Rebuild, package, and validate BMad multi-platform plugins from v7 source repos. Clones (or reads locally via `--source`) each skill source repository, discovers v7 modules from their `bmod.toml` records, copies each plugin's skill folders -with `update_source` / `[skill].source` rewritten to `plugin:`, stamps -per-platform manifests (Claude Code, OpenAI Codex, Cursor, Antigravity), updates -the root marketplace indexes for the 7 modular plugins, and optionally exports -clean rootless `.zip` archives for OpenAI plugin portal uploads. +with `[bmod].update_source` and `[skill].source` rewritten to `plugin:`, +stamps per-platform manifests (Claude Code, OpenAI Codex, Cursor, Antigravity), +updates the three root marketplace indexes, and optionally exports and validates +clean rootless `.zip` archives under `dist/` for OpenAI Plugin Portal uploads. Stdlib only (Python 3.11+). Usage: python3 release.py [--source SLUG=URL_OR_PATH ...] [--zip] [--only NAME,...] python3 release.py --validate + python3 release.py --zip-existing """ from __future__ import annotations @@ -27,37 +28,60 @@ import zipfile from dataclasses import dataclass from pathlib import Path +from typing import Any, NoReturn REPO_ROOT = Path(__file__).resolve().parent -DIST_DIR = REPO_ROOT / "dist" -LICENSE_PATH = REPO_ROOT / "LICENSE" - -AUTHOR_NAME = "Brian (BMad) Madison" -DEVELOPER_NAME = "BMad Code Open Source Team" -BMAD_HOMEPAGE = "https://github.com/bmad-code-org/BMAD-METHOD" -TEA_HOMEPAGE = "https://github.com/bmad-code-org/bmad-method-test-architecture-enterprise" -LOOP_HOMEPAGE = "https://github.com/bmad-code-org/bmad-loop" - -CLAUDE_MARKETPLACE = REPO_ROOT / ".claude-plugin" / "marketplace.json" -CODEX_MARKETPLACE = REPO_ROOT / ".agents" / "plugins" / "marketplace.json" -CURSOR_MARKETPLACE = REPO_ROOT / ".cursor-plugin" / "marketplace.json" - -COPY_IGNORE = shutil.ignore_patterns( +CATALOG_REL = Path("catalog.toml") +LICENSE_REL = Path("LICENSE") +ICON_REL = Path("assets/icon.png") +DIST_REL = Path("dist") + +CLAUDE_MP_REL = Path(".claude-plugin/marketplace.json") +CODEX_MP_REL = Path(".agents/plugins/marketplace.json") +CURSOR_MP_REL = Path(".cursor-plugin/marketplace.json") + +ROOT_PLUGIN_REL = Path("plugin.json") +CLAUDE_PLUGIN_REL = Path(".claude-plugin/plugin.json") +CODEX_PLUGIN_REL = Path(".codex-plugin/plugin.json") +CURSOR_PLUGIN_REL = Path(".cursor-plugin/plugin.json") +AGY_PLUGIN_REL = Path(".antigravity-plugin/plugin.json") + +IGNORED_DIR_NAMES = frozenset({ "__pycache__", - "*.pyc", - "*.pyo", ".pytest_cache", ".eval-results", - ".DS_Store", -) + ".ruff_cache", + ".venv", + "node_modules", + ".git", +}) +IGNORED_FILE_NAMES = frozenset({".DS_Store"}) +IGNORED_SUFFIXES = frozenset({".pyc", ".pyo"}) ZIP_EXCLUDE_TOP_DIRS = frozenset({".claude-plugin", ".cursor-plugin", ".antigravity-plugin"}) - -TABLE_HEADER_RE = re.compile(r"^[ \t]*(\[\[?)([^\[\]\n]+?)(\]\]?)[ \t]*(?:#[^\n]*)?\r?\n?$") -UPDATE_SOURCE_RE = re.compile( - r'^(?P[ \t]*update_source[ \t]*=[ \t]*)(?:"[^"\n]*"|\'[^\'\n]*\')(?P[ \t]*(?:#[^\n]*)?\r?\n?)$' -) -SKILL_SOURCE_RE = re.compile( - r'^(?P[ \t]*source[ \t]*=[ \t]*)(?:"[^"\n]*"|\'[^\'\n]*\')(?P[ \t]*(?:#[^\n]*)?\r?\n?)$' +ZIP_FIXED_DT = (2026, 1, 1, 0, 0, 0) + +OPENAI_SCHEMA = "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json" +AGENT_PLUGINS_ROOT_KEYS = frozenset({ + "$schema", + "name", + "version", + "description", + "author", + "homepage", + "repository", + "license", + "keywords", + "extensions", +}) +MAX_DISPLAY_NAME = 30 +MAX_SHORT_DESCRIPTION = 30 +MAX_LONG_DESCRIPTION = 4000 +MAX_PROMPT_LEN = 128 +MAX_PROMPTS = 3 + +IDENT_RE = re.compile(r"^[a-z0-9][a-z0-9-]*$") +SEMVER_RE = re.compile( + r"^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z.-]+))?(?:\+[0-9A-Za-z.-]+)?$" ) @@ -73,8 +97,8 @@ class PluginSpec: dir_name: str name: str display_name: str - description: str short_description: str + description: str long_description: str category: str keywords: tuple[str, ...] @@ -86,6 +110,18 @@ class PluginSpec: marketplace: bool = True +@dataclass(frozen=True) +class Catalog: + meta: dict[str, str] + sources: tuple[SourceSpec, ...] + plugins: tuple[PluginSpec, ...] + portal_bundles: tuple[PluginSpec, ...] + + @property + def all_specs(self) -> tuple[PluginSpec, ...]: + return (*self.plugins, *self.portal_bundles) + + @dataclass(frozen=True) class DiscoveredModule: code: str @@ -96,216 +132,160 @@ class DiscoveredModule: skill_dirs: tuple[Path, ...] -SOURCES: tuple[SourceSpec, ...] = ( - SourceSpec( - slug="bmad-code-org/BMAD-METHOD", - modules=("core-tools", "method", "toolsmith", "founder", "creative"), - grouped=True, - ), - SourceSpec( - slug="bmad-code-org/bmad-method-test-architecture-enterprise", - modules=("tea",), - grouped=False, - ), - SourceSpec( - slug="bmad-code-org/bmad-loop", - modules=("bmad-loop",), - grouped=False, - ), -) +def fail(message: str) -> NoReturn: + """Print error message to stderr and exit non-zero.""" + print(f"error: {message}", file=sys.stderr) + sys.exit(1) -PLUGINS: tuple[PluginSpec, ...] = ( - PluginSpec( - dir_name="core-tools", - name="bmad-core-tools", - display_name="BMad Core Tools", - description="BMad Agent (setup, updates, help), adaptive document facilitation, brainstorming, deep research, party mode, and multi-lens review.", - short_description="The BMad Agent and shared facilitation, research, review, and ideation skills.", - long_description=( - "Required foundation for every BMad module: the BMad Agent (bmad) for setup, status, " - "updates, migrations, and modular help, plus bmad-facilitate, bmad-customize, " - "bmad-advanced-elicitation, bmad-brainstorming, bmad-deep-recon, bmad-forge-idea, " - "bmad-ingest, bmad-party-mode, bmad-review, and bmad-shard-pro." - ), - category="Productivity", - keywords=("bmad", "agents", "facilitation", "brainstorming", "research", "review", "skills"), - suggested_prompts=( - "Set up BMad in this project with /bmad setup", - "Let's brainstorm and stress-test an idea with BMad", - ), - homepage=BMAD_HOMEPAGE, - repository=BMAD_HOMEPAGE, - modules=("core-tools",), - ), - PluginSpec( - dir_name="method", - name="bmad-method", - display_name="BMad Method", - description="AI software delivery from idea to release with Mary, John, Sally, Winston, Sofia, and Amelia, plus right-sized build and review workflows.", - short_description="Full-lifecycle AI software delivery agents, specs, ticket trees, builds, and reviews.", - long_description=( - "The BMad Method software delivery suite: Mary (Analyst), John (PM), Sally (UX Designer), " - "Winston (Architect), Sofia (Product Owner), and Amelia (Developer), together with " - "bmad-build, bmad-build-auto, bmad-code-review, bmad-walkthrough, bmad-project-context, " - "bmad-qa-generate-e2e-tests, and bmad-retrospective." - ), - category="Developer Tools", - keywords=("bmad", "agile", "specs", "architecture", "ux", "tickets", "development"), - suggested_prompts=( - "Let's plan and build a new feature using BMad Method", - "Run a multi-lens code review on my current branch", - ), - homepage=BMAD_HOMEPAGE, - repository=BMAD_HOMEPAGE, - modules=("method",), - requires_note="Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`).", - ), - PluginSpec( - dir_name="toolsmith", - name="bmad-toolsmith", - display_name="BMad Toolsmith", - description="Build, convert, review, package, migrate, and evaluate standalone or BMad skills, memory agents, and custom modules with Smithy and bmad-eval.", - short_description="Author, optimize, migrate, and benchmark AI skills, memory agents, and modules.", - long_description=( - "Smithy (bmad-toolsmith) coaches and builds standalone or BMad skills, agents, memory agents, " - "document templates, and shareable BMOD modules, while bmad-eval runs clean-room quality, " - "baseline, variant, and trigger-matrix benchmarks." - ), - category="Developer Tools", - keywords=("bmad", "toolsmith", "skills", "evals", "agents", "modules"), - suggested_prompts=( - "Help me build and evaluate a new custom skill with Smithy", - "Convert these prompts into a reusable skill and run trigger evals", - ), - homepage=BMAD_HOMEPAGE, - repository=BMAD_HOMEPAGE, - modules=("toolsmith",), - requires_note="Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`).", - ), - PluginSpec( - dir_name="founder", - name="bmad-founder", - display_name="BMad Founder", - description="Nadia, the Founder Advisor: startup diagnostics, customer evidence, Python runway and cap-table math, pitch decks, and an investor Pitch Room.", - short_description="Startup advisory, financial modeling, fundraising docs, and investor pitch rehearsal.", - long_description=( - "Nadia (bmad-founder-agent-advisor) coaches 17 business documents in one living business " - "record, computes runway, unit economics, market sizing, and cap tables in Python, and " - "hosts an investor Pitch Room in bmad-party-mode." - ), - category="Productivity", - keywords=("bmad", "founder", "startup", "fundraising", "pitch", "pricing", "runway"), - suggested_prompts=( - "Ask Nadia to run a startup diagnostic and calculate our runway", - "Help me craft our pitch deck and rehearse in the Pitch Room", - ), - homepage=BMAD_HOMEPAGE, - repository=BMAD_HOMEPAGE, - modules=("founder",), - requires_note="Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`).", - ), - PluginSpec( - dir_name="creative", - name="bmad-creative", - display_name="BMad Creative", - description="Clio, the Creative Director: voice-grounded talks, essays, scripts, stories, worlds, visual decks, and non-code creative problem solving.", - short_description="Voice-grounded writing, keynote decks, worldbuilding, and creative studio rooms.", - long_description=( - "Clio (bmad-creative-agent-director) replaces the Creative Intelligence Suite with a " - "persistent voice guide, anti-slop linter, eight coached creative document templates, and " - "three multi-persona studio rooms." - ), - category="Productivity", - keywords=("bmad", "creative", "writing", "storytelling", "talks", "presentations"), - suggested_prompts=( - "Ask Clio to help me outline a conference keynote in my own voice", - "Convene the Creative Studio to crack a tough non-code problem", - ), - homepage=BMAD_HOMEPAGE, - repository=BMAD_HOMEPAGE, - modules=("creative",), - requires_note="Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`).", - ), - PluginSpec( - dir_name="tea", - name="bmad-tea", - display_name="BMad Test Architect (TEA)", - description="Murat, the Test Architect: risk-based test strategy, framework setup, automation, test review, NFR assessment, traceability, and release gates.", - short_description="Enterprise risk-based test architecture, automation, traceability, and release gates.", - long_description=( - "Test Architect (TEA) adds Murat (bmad-tea) and eight testing workflows for test design, " - "framework scaffolding, ATDD/automation, test review, NFR evaluation, and release-gate traceability." - ), - category="Developer Tools", - keywords=("bmad", "testing", "qa", "automation", "traceability", "tea"), - suggested_prompts=( - "Ask Murat to design a risk-based test strategy for this repo", - "Run test traceability and check our release gate readiness", - ), - homepage=TEA_HOMEPAGE, - repository=TEA_HOMEPAGE, - modules=("tea",), - requires_note="Requires **bmad-core-tools** (`bmad` + `bmad-facilitate`).", - ), - PluginSpec( - dir_name="bmad-loop", - name="bmad-loop", - display_name="BMad Loop", - description="Unattended ticket-tree build orchestrator: wires and resolves autonomous implementation, verification, and commit loops across coding agents.", - short_description="Setup, resolution, and epic sweep skills for the unattended bmad-loop orchestrator.", - long_description=( - "BMad Loop integrates the bmad-loop CLI/TUI orchestrator with your v7 ticket tree via " - "bmad-loop-setup, bmad-loop-resolve, and bmad-loop-sweep." - ), - category="Developer Tools", - keywords=("bmad", "automation", "orchestrator", "autonomous", "tickets", "loop"), - suggested_prompts=( - "Set up bmad-loop in this repository with /bmad-loop-setup", - "Prepare an epic sweep for unattended ticket execution", - ), - homepage=LOOP_HOMEPAGE, - repository=LOOP_HOMEPAGE, - modules=("bmad-loop",), - requires_note="Requires **bmad-core-tools** and **bmad-method**.", - ), -) -PORTAL_BUNDLES: tuple[PluginSpec, ...] = ( - PluginSpec( - dir_name="bmad", - name="bmad", - display_name="BMad", - description="Self-contained BMad bundle combining Core Tools, BMad Method, and Toolsmith for end-to-end AI software delivery and skill authoring.", - short_description="Complete self-contained BMad bundle: Core Tools + BMad Method + Toolsmith.", - long_description=( - "Official portal distribution bundling Core Tools (bmad agent, facilitation, brainstorming, " - "research, review, party mode), BMad Method (Mary, John, Sally, Winston, Sofia, Amelia, " - "ticket trees, builds, code reviews, walkthroughs), and Toolsmith (Smithy + bmad-eval) " - "in one dependency-free plugin." - ), - category="Developer Tools", - keywords=("bmad", "agile", "agents", "specs", "architecture", "toolsmith", "skills"), - suggested_prompts=( - "Initialize BMad in this project with /bmad setup", - "Plan and build a new feature end to end with BMad Method", - ), - homepage=BMAD_HOMEPAGE, - repository=BMAD_HOMEPAGE, - modules=("core-tools", "method", "toolsmith"), - marketplace=False, - ), -) +def is_ignored_relpath(rel: Path) -> bool: + """Return True for cache, VCS, virtualenv, or OS junk paths.""" + return ( + any(part in IGNORED_DIR_NAMES for part in rel.parts[:-1]) + or rel.name in IGNORED_DIR_NAMES + or rel.name in IGNORED_FILE_NAMES + or rel.suffix in IGNORED_SUFFIXES + ) -ALL_SPECS: tuple[PluginSpec, ...] = (*PLUGINS, *PORTAL_BUNDLES) +def _copytree_ignore(_directory: str, names: list[str]) -> set[str]: + return { + name + for name in names + if name in IGNORED_DIR_NAMES or name in IGNORED_FILE_NAMES or Path(name).suffix in IGNORED_SUFFIXES + } -def fail(message: str) -> None: - print(f"error: {message}", file=sys.stderr) - sys.exit(1) +def _load_toml(path: Path, label: str) -> dict[str, Any]: + if not path.is_file(): + fail(f"missing {path}") + try: + return tomllib.loads(path.read_text(encoding="utf-8-sig")) + except (OSError, UnicodeError, tomllib.TOMLDecodeError) as error: + fail(f"{label}: cannot parse {path.name}: {error}") -def clone_url(slug: str) -> str: - return f"https://github.com/{slug}" + +def _load_json(path: Path) -> dict[str, Any]: + if not path.is_file(): + fail(f"missing {path}") + try: + data = json.loads(path.read_text(encoding="utf-8")) + except (OSError, UnicodeError, json.JSONDecodeError) as error: + fail(f"{path}: invalid JSON: {error}") + if not isinstance(data, dict): + fail(f"{path}: expected JSON object") + return data + + +def _write_json(path: Path, payload: dict[str, Any]) -> None: + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(json.dumps(payload, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") + + +def _require_str(raw: dict[str, Any], key: str, label: str) -> str: + val = raw.get(key) + if not isinstance(val, str) or not val.strip(): + fail(f"{label}: {key!r} must be a non-empty string") + return val + + +def _require_str_list(raw: dict[str, Any], key: str, label: str) -> tuple[str, ...]: + val = raw.get(key) + if not isinstance(val, list) or not val or not all(isinstance(x, str) and x.strip() for x in val): + fail(f"{label}: {key!r} must be a non-empty list of strings") + return tuple(val) + + +def _parse_plugin_spec(raw: dict[str, Any], *, marketplace: bool, label: str) -> PluginSpec: + if not isinstance(raw, dict): + fail(f"{label}: plugin entry must be a TOML table") + spec = PluginSpec( + dir_name=_require_str(raw, "dir_name", label), + name=_require_str(raw, "name", label), + display_name=_require_str(raw, "display_name", label), + short_description=_require_str(raw, "short_description", label), + description=_require_str(raw, "description", label), + long_description=_require_str(raw, "long_description", label), + category=_require_str(raw, "category", label), + keywords=_require_str_list(raw, "keywords", label), + suggested_prompts=_require_str_list(raw, "suggested_prompts", label), + homepage=_require_str(raw, "homepage", label), + repository=_require_str(raw, "repository", label), + modules=_require_str_list(raw, "modules", label), + requires_note=str(raw.get("requires_note", "")), + marketplace=marketplace, + ) + for ident_key, ident_val in (("dir_name", spec.dir_name), ("name", spec.name)): + if not IDENT_RE.match(ident_val): + fail(f"{label} ({spec.name}): invalid {ident_key} {ident_val!r}") + if len(spec.display_name) > MAX_DISPLAY_NAME: + fail(f"{label} ({spec.name}): display_name exceeds {MAX_DISPLAY_NAME} chars") + if len(spec.short_description) > MAX_SHORT_DESCRIPTION: + fail(f"{label} ({spec.name}): short_description must be <= {MAX_SHORT_DESCRIPTION} chars") + if len(spec.long_description) > MAX_LONG_DESCRIPTION: + fail(f"{label} ({spec.name}): long_description exceeds {MAX_LONG_DESCRIPTION} chars") + if len(spec.suggested_prompts) > MAX_PROMPTS: + fail(f"{label} ({spec.name}): suggested_prompts must have <= {MAX_PROMPTS} entries") + for prompt in spec.suggested_prompts: + if len(prompt) > MAX_PROMPT_LEN or "@" in prompt: + fail(f"{label} ({spec.name}): invalid prompt {prompt!r}") + return spec + + +def load_catalog(catalog_path: Path | None = None) -> Catalog: + """Load and validate catalog.toml.""" + path = catalog_path or (REPO_ROOT / CATALOG_REL) + data = _load_toml(path, str(path)) + raw_meta = data.get("meta") + if not isinstance(raw_meta, dict): + fail(f"{path}: missing [meta] table") + required_meta = ( + "author_name", + "developer_name", + "license", + "marketplace_name", + "marketplace_display_name", + "marketplace_description", + ) + meta = {k: _require_str(raw_meta, k, f"{path}:[meta]") for k in required_meta} + + raw_sources = data.get("sources") + if not isinstance(raw_sources, list) or not raw_sources: + fail(f"{path}: missing [[sources]] list") + sources: list[SourceSpec] = [] + for idx, raw in enumerate(raw_sources): + if not isinstance(raw, dict) or not isinstance(raw.get("grouped"), bool): + fail(f"{path}: [[sources]][{idx}] requires table with boolean 'grouped'") + sources.append( + SourceSpec( + slug=_require_str(raw, "slug", f"{path}:sources[{idx}]"), + modules=_require_str_list(raw, "modules", f"{path}:sources[{idx}]"), + grouped=raw["grouped"], + ) + ) + + plugins = tuple(_parse_plugin_spec(p, marketplace=True, label=f"{path}:plugins") for p in data.get("plugins", [])) + bundles = tuple(_parse_plugin_spec(p, marketplace=False, label=f"{path}:portal_bundles") for p in data.get("portal_bundles", [])) + if not plugins or not bundles: + fail(f"{path}: expected non-empty plugins and portal_bundles tables") + + all_specs = (*plugins, *bundles) + if len({s.name for s in all_specs}) != len(all_specs): + fail(f"{path}: duplicate plugin 'name' entries") + if len({s.dir_name for s in all_specs}) != len(all_specs): + fail(f"{path}: duplicate plugin 'dir_name' entries") + + source_modules = {m for s in sources for m in s.modules} + for spec in all_specs: + unknown = [m for m in spec.modules if m not in source_modules] + if unknown: + fail(f"{path} ({spec.name}): unknown module(s): {', '.join(unknown)}") + for bundle in bundles: + for mod_code in bundle.modules: + if not any(p.modules == (mod_code,) for p in plugins): + fail(f"{path} ({bundle.name}): bundled module {mod_code!r} lacks a modular plugin") + + return Catalog(meta=meta, sources=tuple(sources), plugins=plugins, portal_bundles=bundles) def _has_skill_marker(folder: Path) -> bool: @@ -317,22 +297,11 @@ def _discover_skill_folders(skills_root: Path, *, grouped: bool) -> list[Path]: for top in sorted(p for p in skills_root.iterdir() if p.is_dir()): if _has_skill_marker(top): folders.append(top) - continue - if grouped: - for child in sorted(p for p in top.iterdir() if p.is_dir()): - if _has_skill_marker(child): - folders.append(child) + elif grouped: + folders.extend(child for child in sorted(p for p in top.iterdir() if p.is_dir()) if _has_skill_marker(child)) return folders -def _load_toml(path: Path, label: str) -> dict: - try: - return tomllib.loads(path.read_text(encoding="utf-8-sig")) - except (OSError, UnicodeError, tomllib.TOMLDecodeError) as error: - fail(f"{label}: cannot parse {path.name}: {error}") - raise AssertionError("unreachable") - - def collect_modules(repo_root: Path, spec: SourceSpec) -> dict[str, DiscoveredModule]: """Discover and validate all expected v7 modules inside one source repository.""" skills_root = repo_root / "skills" @@ -341,19 +310,17 @@ def collect_modules(repo_root: Path, spec: SourceSpec) -> dict[str, DiscoveredMo discovered = _discover_skill_folders(skills_root, grouped=spec.grouped) by_name: dict[str, Path] = {} - parsed: dict[str, dict] = {} + parsed: dict[str, dict[str, Any]] = {} for folder in discovered: if folder.name in by_name: fail(f"{spec.slug}: duplicate skill folder name {folder.name!r}") - manifest = folder / "bmod.toml" - if not manifest.is_file(): - fail(f"{spec.slug}/{folder.relative_to(repo_root).as_posix()}: missing bmod.toml") if not (folder / "SKILL.md").is_file(): fail(f"{spec.slug}/{folder.relative_to(repo_root).as_posix()}: missing SKILL.md") + parsed[folder.name] = _load_toml(folder / "bmod.toml", f"{spec.slug}/{folder.name}") by_name[folder.name] = folder - parsed[folder.name] = _load_toml(manifest, f"{spec.slug}/{folder.name}") modules: dict[str, DiscoveredModule] = {} + claimed: set[str] = set() for folder_name, folder in sorted(by_name.items()): data = parsed[folder_name] bmod = data.get("bmod") @@ -364,14 +331,12 @@ def collect_modules(repo_root: Path, spec: SourceSpec) -> dict[str, DiscoveredMo update_src = bmod.get("update_source") if not isinstance(code, str) or not code: fail(f"{spec.slug}/{folder_name}: [bmod].code must be a non-empty string") - if not isinstance(version, str) or not version: - fail(f"{spec.slug}/{folder_name}: [bmod].version must be a non-empty string") + if not isinstance(version, str) or not SEMVER_RE.match(version.strip()): + fail(f"{spec.slug}/{folder_name}: [bmod].version must be SemVer, got {version!r}") rel_parent = folder.parent.relative_to(repo_root).as_posix() expected_source = f"github:{spec.slug}/{rel_parent}" if update_src != expected_source: - fail( - f"{spec.slug}/{folder_name}: [bmod].update_source must be {expected_source!r}, got {update_src!r}" - ) + fail(f"{spec.slug}/{folder_name}: [bmod].update_source must be {expected_source!r}, got {update_src!r}") if code not in spec.modules: fail(f"{spec.slug}/{folder_name}: unexpected module code {code!r}") if code in modules: @@ -379,33 +344,32 @@ def collect_modules(repo_root: Path, spec: SourceSpec) -> dict[str, DiscoveredMo listed = bmod.get("skills") if listed is None: - if "skill" not in data: + if not isinstance(data.get("skill"), dict): fail(f"{spec.slug}/{folder_name}: [bmod] without skills list must also define [skill]") member_names = [folder_name] - elif isinstance(listed, list) and all(isinstance(item, str) and item for item in listed): + elif isinstance(listed, list) and listed and all(isinstance(item, str) and item for item in listed): member_names = list(dict.fromkeys(listed)) else: - fail(f"{spec.slug}/{folder_name}: [bmod].skills must be a list of non-empty strings") + fail(f"{spec.slug}/{folder_name}: [bmod].skills must be a non-empty list of non-empty strings") skill_dirs: list[Path] = [folder] + claimed.add(folder_name) for member_name in member_names: member_dir = by_name.get(member_name) if member_dir is None: fail(f"{spec.slug}/{folder_name}: lists missing skill {member_name!r}") + if spec.grouped and member_dir.parent != folder.parent: + fail(f"{spec.slug}/{folder_name}: member {member_name!r} is outside group {folder.parent.name!r}") + claimed.add(member_name) if member_name == folder_name: continue member_skill = parsed[member_name].get("skill") if not isinstance(member_skill, dict): fail(f"{spec.slug}/{member_name}: missing [skill] table") if member_skill.get("bmod") != folder_name: - fail( - f"{spec.slug}/{member_name}: [skill].bmod must be {folder_name!r}, got {member_skill.get('bmod')!r}" - ) + fail(f"{spec.slug}/{member_name}: [skill].bmod must be {folder_name!r}, got {member_skill.get('bmod')!r}") if member_skill.get("source") != expected_source: - fail( - f"{spec.slug}/{member_name}: [skill].source must be {expected_source!r}, " - f"got {member_skill.get('source')!r}" - ) + fail(f"{spec.slug}/{member_name}: [skill].source must be {expected_source!r}, got {member_skill.get('source')!r}") skill_dirs.append(member_dir) modules[code] = DiscoveredModule( @@ -417,6 +381,9 @@ def collect_modules(repo_root: Path, spec: SourceSpec) -> dict[str, DiscoveredMo skill_dirs=tuple(skill_dirs), ) + orphans = sorted(set(by_name) - claimed) + if orphans: + fail(f"{spec.slug}: orphan skill folder(s) not listed by any [bmod]: {', '.join(orphans)}") missing = [code for code in spec.modules if code not in modules] if missing: fail(f"{spec.slug}: missing expected modules: {', '.join(missing)}") @@ -424,31 +391,28 @@ def collect_modules(repo_root: Path, spec: SourceSpec) -> dict[str, DiscoveredMo def _scan_toml_line_state(line: str, triple_quote: str | None, bracket_depth: int) -> tuple[str | None, int]: - """Track multiline triple-quoted strings and array brackets outside strings.""" + """Track multiline triple-quoted strings (including 4/5-quote closers) and brackets.""" i = 0 n = len(line) in_single = False in_double = False while i < n: + ch = line[i] if triple_quote is not None: - if line.startswith(triple_quote, i): - if triple_quote == '"""' and i > 0 and line[i - 1] == "\\": - # Count consecutive backslashes to avoid misreading escaped quotes. - bs = 0 - j = i - 1 - while j >= 0 and line[j] == "\\": - bs += 1 - j -= 1 - if bs % 2 == 1: - i += 1 - continue - triple_quote = None - i += 3 + if triple_quote == '"""' and ch == "\\": + i += 2 + continue + if ch == triple_quote[0]: + run = 1 + while i + run < n and line[i + run] == ch: + run += 1 + if run >= 3: + triple_quote = None + i += run continue i += 1 continue - ch = line[i] if in_double: if ch == "\\": i += 2 @@ -485,51 +449,139 @@ def _scan_toml_line_state(line: str, triple_quote: str | None, bracket_depth: in return triple_quote, bracket_depth +def _decode_table_header(line: str) -> str | None: + """Return top-level single table name (`'bmod'` or `'skill'`) or None for others / [[arrays]].""" + if line.lstrip(" \t").startswith("[["): + return None + try: + probe = tomllib.loads(f"{line.rstrip()}\n__k__ = 1\n") + except tomllib.TOMLDecodeError: + return None + if len(probe) == 1: + key, child = next(iter(probe.items())) + if child == {"__k__": 1}: + return key + return None + + +def _string_literal_end(rhs: str) -> int | None: + """Return index immediately after a single-line TOML string literal at start of `rhs`.""" + n = len(rhs) + if rhs.startswith('"""') or rhs.startswith("'''"): + quote = rhs[0] + i = 3 + while i < n: + if quote == '"' and rhs[i] == "\\": + i += 2 + continue + if rhs[i] == quote: + run = 1 + while i + run < n and rhs[i + run] == quote: + run += 1 + i += run + if run >= 3: + return i + continue + i += 1 + return None + if rhs.startswith('"'): + i = 1 + while i < n: + if rhs[i] == "\\": + i += 2 + continue + if rhs[i] == '"': + return i + 1 + i += 1 + return None + if rhs.startswith("'"): + end = rhs.find("'", 1) + return end + 1 if end != -1 else None + return None + + +def _rewrite_source_assignment( + line: str, current_table: str | None, *, at_root: bool, target: str +) -> tuple[str, str] | None: + """If `line` assigns `[bmod].update_source` or `[skill].source`, return `(kind, rewritten_line)`.""" + stripped = line.lstrip(" \t") + if not stripped or stripped[0] in {"#", "["} or "=" not in stripped: + return None + try: + parsed_line = tomllib.loads(line) + except tomllib.TOMLDecodeError: + return None + + kind: str | None = None + if current_table == "bmod" and set(parsed_line) == {"update_source"}: + kind = "bmod" + elif current_table == "skill" and set(parsed_line) == {"source"}: + kind = "skill" + elif at_root: + if isinstance(parsed_line.get("bmod"), dict) and set(parsed_line["bmod"]) == {"update_source"}: + kind = "bmod" + elif isinstance(parsed_line.get("skill"), dict) and set(parsed_line["skill"]) == {"source"}: + kind = "skill" + if kind is None: + return None + + eq_idx = line.find("=") + ws_end = eq_idx + 1 + while ws_end < len(line) and line[ws_end] in " \t": + ws_end += 1 + rhs = line[ws_end:] + lit_end = _string_literal_end(rhs) + if lit_end is None: + return None + return kind, f'{line[:ws_end]}"{target}"{rhs[lit_end:]}' + + def rewrite_bmod_toml(original: str, plugin_name: str, expected_source: str, label: str = "bmod.toml") -> str: - """Rewrite [bmod].update_source and top-level [skill].source to plugin:.""" - orig_data = tomllib.loads(original) - target = f"plugin:{plugin_name}" + """Rewrite `[bmod].update_source` and `[skill].source` to `plugin:` preserving comments.""" + original = original.removeprefix("\ufeff") + try: + orig_data = tomllib.loads(original) + except tomllib.TOMLDecodeError as error: + fail(f"{label}: invalid TOML: {error}") - lines = original.splitlines(keepends=True) + target = f"plugin:{plugin_name}" out: list[str] = [] current_table: str | None = None + at_root = True triple_quote: str | None = None bracket_depth = 0 - bmod_updates = 0 - skill_updates = 0 + counts = {"bmod": 0, "skill": 0} - for line in lines: + for line in original.splitlines(keepends=True): if triple_quote is None and bracket_depth == 0: - header_match = TABLE_HEADER_RE.match(line) - if header_match: - current_table = header_match.group(2).strip() + if line.lstrip(" \t").startswith("["): + at_root = False + current_table = _decode_table_header(line) out.append(line) + triple_quote, bracket_depth = _scan_toml_line_state(line, triple_quote, bracket_depth) + continue + rewritten_line = _rewrite_source_assignment(line, current_table, at_root=at_root, target=target) + if rewritten_line is not None: + kind, new_line = rewritten_line + counts[kind] += 1 + out.append(new_line) continue - if current_table == "bmod": - m = UPDATE_SOURCE_RE.match(line) - if m: - out.append(f'{m.group("head")}"{target}"{m.group("tail")}') - bmod_updates += 1 - continue - elif current_table == "skill": - m = SKILL_SOURCE_RE.match(line) - if m: - out.append(f'{m.group("head")}"{target}"{m.group("tail")}') - skill_updates += 1 - continue triple_quote, bracket_depth = _scan_toml_line_state(line, triple_quote, bracket_depth) out.append(line) rewritten = "".join(out) - new_data = tomllib.loads(rewritten) + try: + new_data = tomllib.loads(rewritten) + except tomllib.TOMLDecodeError as error: + fail(f"{label}: rewritten TOML invalid: {error}") expected = copy.deepcopy(orig_data) if isinstance(expected.get("bmod"), dict) and "update_source" in expected["bmod"]: - if orig_data["bmod"]["update_source"] != expected_source or bmod_updates != 1: + if orig_data["bmod"]["update_source"] != expected_source or counts["bmod"] != 1: fail(f"{label}: expected exactly one [bmod].update_source = {expected_source!r}") expected["bmod"]["update_source"] = target if isinstance(expected.get("skill"), dict) and "source" in expected["skill"]: - if orig_data["skill"]["source"] != expected_source or skill_updates != 1: + if orig_data["skill"]["source"] != expected_source or counts["skill"] != 1: fail(f"{label}: expected exactly one [skill].source = {expected_source!r}") expected["skill"]["source"] = target @@ -538,16 +590,29 @@ def rewrite_bmod_toml(original: str, plugin_name: str, expected_source: str, lab return rewritten -def _write_json(path: Path, payload: dict) -> None: - path.parent.mkdir(parents=True, exist_ok=True) - path.write_text(json.dumps(payload, indent=2, ensure_ascii=False) + "\n", encoding="utf-8") +def _semver_key(version: str) -> tuple[int, int, int, int, tuple[tuple[int, int | str], ...]]: + match = SEMVER_RE.match(version.strip()) + if not match: + fail(f"invalid SemVer version {version!r}") + major, minor, patch, pre = match.groups() + if pre is None: + return (int(major), int(minor), int(patch), 1, ()) + pre_parts = tuple((0, int(seg)) if seg.isdigit() else (1, seg) for seg in pre.split(".")) + return (int(major), int(minor), int(patch), 0, pre_parts) + +def _resolve_bundle_version(discovered_modules: list[DiscoveredModule]) -> str: + """Return highest semantic version across bundled modules.""" + if not discovered_modules: + fail("plugin must bundle at least one module") + return max((mod.version for mod in discovered_modules), key=_semver_key) -def _render_plugin_readme(spec: PluginSpec, version: str, skill_names: list[str]) -> str: + +def _render_repo_plugin_readme(spec: PluginSpec, version: str, skill_names: list[str]) -> str: lines = [ f"# {spec.display_name}", "", - f"{spec.long_description}", + spec.long_description, "", f"- **Plugin:** `{spec.name}` (`{version}`)", f"- **Modules bundled:** {', '.join(f'`{m}`' for m in spec.modules)}", @@ -557,21 +622,36 @@ def _render_plugin_readme(spec: PluginSpec, version: str, skill_names: list[str] if spec.requires_note: lines.extend(["## Prerequisites", "", spec.requires_note, ""]) if spec.marketplace: + setup_cmd = f"`/{spec.name}:bmad setup`" if spec.name == "bmad-core-tools" else "`/bmad-core-tools:bmad setup`" lines.extend([ "## Install", "", - "```bash", - f"claude plugin install {spec.name} --marketplace bmad-code-org/bmad-plugins", - "```", + f"- **Claude Code:** `claude plugin install {spec.name} --marketplace bmad-code-org/bmad-plugins` " + f"(or `/plugin marketplace add bmad-code-org/bmad-plugins` then `/plugin install {spec.name}@bmad`)", + f"- **GitHub Copilot CLI:** `copilot plugin marketplace add bmad-code-org/bmad-plugins` " + f"then `copilot plugin install {spec.name}@bmad`", + "- **OpenAI Codex:** `codex plugin marketplace add bmad-code-org/bmad-plugins`, " + f"then install `{spec.name}` via `/plugins` in Codex CLI / Codex App", + f"- **Qwen Code:** `qwen extensions install bmad-code-org/bmad-plugins:{spec.name}`", "", - "Or inside Claude Code: `/plugin marketplace add bmad-code-org/bmad-plugins`, then `/plugin install " - f"{spec.name}@bmad`.", + f"In Claude Code, plugin skills are namespaced as `/:` (for example, `/{spec.name}:...`), " + "or invoke them naturally by describing what you want.", + "", + ]) + else: + setup_cmd = "`/bmad:bmad setup`" + lines.extend([ + "## Standalone Install", + "", + "This self-contained bundle is intended for official plugin directories and local directory installs " + "(`agy plugin install ./bmad-plugins/plugins/bmad`, Cursor directory install, or OpenAI portal upload).", "", ]) lines.extend([ "## Setup", "", - "Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run `/bmad setup` in your project.", + "Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then run BMad setup inside your project " + f"(ask your agent to set up BMad, or run {setup_cmd} in Claude Code).", "", f"## Included Skills ({len(skill_names)})", "", @@ -581,118 +661,114 @@ def _render_plugin_readme(spec: PluginSpec, version: str, skill_names: list[str] return "\n".join(lines) -def _bundle_version(discovered_modules: list[DiscoveredModule], spec: PluginSpec) -> str: - versions = {mod.version for mod in discovered_modules} - if len(versions) != 1: - detail = ", ".join(f"{mod.code}={mod.version!r}" for mod in discovered_modules) - fail(f"plugin {spec.name!r} modules disagree on version: {detail}") - return discovered_modules[0].version - - -def _write_plugin_manifests( - plugin_root: Path, - spec: PluginSpec, - version: str, - skill_names: list[str], - *, - has_icon: bool, -) -> None: - author = {"name": AUTHOR_NAME} - - # Claude Code & Anthropic Official Directory (.claude-plugin/plugin.json) - # Claude directory auto-discovers `assets/icon.png` without needing extra manifest keys. - _write_json( - plugin_root / ".claude-plugin" / "plugin.json", - { - "name": spec.name, - "description": spec.description, - "version": version, - "author": author, - "homepage": spec.homepage, - "repository": spec.repository, - "license": "MIT", - "keywords": list(spec.keywords), - }, - ) +def _render_portal_zip_readme(spec: PluginSpec, version: str, skill_names: list[str]) -> str: + """Platform-neutral README packaged inside OpenAI/Codex portal `.zip` archives.""" + lines = [ + f"# {spec.display_name}", + "", + spec.long_description, + "", + f"- **Plugin:** `{spec.name}` (`{version}`)", + f"- **Modules bundled:** {', '.join(f'`{m}`' for m in spec.modules)}", + f"- **Source Repository:** [{spec.repository}]({spec.repository})", + "", + ] + if spec.requires_note: + lines.extend(["## Prerequisites", "", spec.requires_note, ""]) + lines.extend([ + "## Setup", + "", + "Make sure [uv](https://docs.astral.sh/uv/) (Python 3.11+) is installed, then invoke the BMad Agent " + "(`bmad` setup) in your workspace.", + "", + f"## Included Skills ({len(skill_names)})", + "", + *[f"- `{name}`" for name in skill_names], + "", + ]) + return "\n".join(lines) - # OpenAI Codex / ChatGPT Portal (.codex-plugin/plugin.json) - codex_interface: dict[str, object] = { - "displayName": spec.display_name, - "shortDescription": spec.short_description, - "longDescription": spec.long_description, - "developerName": DEVELOPER_NAME, - "category": spec.category, - "websiteURL": spec.homepage, - } - if has_icon: - codex_interface["logo"] = "./assets/icon.png" - _write_json( - plugin_root / ".codex-plugin" / "plugin.json", - { - "name": spec.name, - "version": version, - "description": spec.description, - "author": author, - "homepage": spec.homepage, - "repository": spec.repository, - "license": "MIT", - "keywords": list(spec.keywords), - "interface": codex_interface, - "skills": "./skills/", - }, - ) - # Cursor (.cursor-plugin/plugin.json) - cursor_manifest: dict[str, object] = { +def _common_manifest(spec: PluginSpec, version: str, meta: dict[str, str]) -> dict[str, Any]: + return { "name": spec.name, - "displayName": spec.display_name, - "description": spec.description, "version": version, - "author": author, + "description": spec.description, + "author": {"name": meta["author_name"]}, "homepage": spec.homepage, "repository": spec.repository, - "license": "MIT", + "license": meta["license"], "keywords": list(spec.keywords), - "skills": "./skills/", } - if has_icon: - cursor_manifest["logo"] = "./assets/icon.png" - _write_json(plugin_root / ".cursor-plugin" / "plugin.json", cursor_manifest) - # Antigravity (.antigravity-plugin/plugin.json) - agy_manifest: dict[str, object] = { - "name": spec.name, + +def _openai_interface(spec: PluginSpec, meta: dict[str, str]) -> dict[str, Any]: + return { "displayName": spec.display_name, - "version": version, - "description": spec.description, - "suggestedPrompts": list(spec.suggested_prompts), + "shortDescription": spec.short_description, + "longDescription": spec.long_description, + "developerName": meta["developer_name"], "category": spec.category, - "keywords": list(spec.keywords), - "author": author, - "homepage": spec.homepage, - "repository": spec.repository, - "license": "MIT", + "capabilities": ["Interactive"], + "websiteURL": spec.homepage, + "defaultPrompt": list(spec.suggested_prompts), + "logo": "./assets/icon.png", + "composerIcon": "./assets/icon.png", } - if has_icon: - agy_manifest["logo"] = "assets/icon.png" - _write_json(plugin_root / ".antigravity-plugin" / "plugin.json", agy_manifest) - (plugin_root / "README.md").write_text( - _render_plugin_readme(spec, version, skill_names), - encoding="utf-8", + +def _write_plugin_manifests( + plugin_root: Path, + spec: PluginSpec, + version: str, + skill_names: list[str], + meta: dict[str, str], +) -> None: + common = _common_manifest(spec, version, meta) + _write_json(plugin_root / CLAUDE_PLUGIN_REL, common) + _write_json( + plugin_root / CODEX_PLUGIN_REL, + {**common, "interface": _openai_interface(spec, meta), "skills": "./skills/"}, + ) + _write_json( + plugin_root / CURSOR_PLUGIN_REL, + {**common, "displayName": spec.display_name, "skills": "./skills/", "logo": "./assets/icon.png"}, + ) + _write_json( + plugin_root / AGY_PLUGIN_REL, + { + **common, + "displayName": spec.display_name, + "category": spec.category, + "suggestedPrompts": list(spec.suggested_prompts), + "logo": "assets/icon.png", + }, ) + (plugin_root / "README.md").write_text(_render_repo_plugin_readme(spec, version, skill_names), encoding="utf-8") -def rebuild_plugin(repo_root: Path, spec: PluginSpec, all_modules: dict[str, DiscoveredModule]) -> str: +def _stage_plugin( + dest_dir: Path, + repo_root: Path, + spec: PluginSpec, + all_modules: dict[str, DiscoveredModule], + meta: dict[str, str], +) -> str: + icon_src = repo_root / ICON_REL + license_src = repo_root / LICENSE_REL + if not icon_src.is_file(): + fail(f"missing {icon_src}") + if not license_src.is_file(): + fail(f"missing {license_src}") + + missing_mods = [code for code in spec.modules if code not in all_modules] + if missing_mods: + fail(f"plugin {spec.name!r}: missing discovered module(s): {', '.join(missing_mods)}") discovered = [all_modules[code] for code in spec.modules] - version = _bundle_version(discovered, spec) + version = _resolve_bundle_version(discovered) - plugin_root = repo_root / "plugins" / spec.dir_name - if plugin_root.exists(): - shutil.rmtree(plugin_root) - plugin_root.mkdir(parents=True) - - skills_dest = plugin_root / "skills" + dest_dir.mkdir(parents=True) + skills_dest = dest_dir / "skills" skills_dest.mkdir() copied_names: list[str] = [] @@ -703,11 +779,10 @@ def rebuild_plugin(repo_root: Path, spec: PluginSpec, all_modules: dict[str, Dis fail(f"plugin {spec.name!r}: duplicate skill {skill_dir.name!r}") seen.add(skill_dir.name) dest_skill = skills_dest / skill_dir.name - shutil.copytree(skill_dir, dest_skill, ignore=COPY_IGNORE) + shutil.copytree(skill_dir, dest_skill, ignore=_copytree_ignore) bmod_path = dest_skill / "bmod.toml" - raw = bmod_path.read_text(encoding="utf-8-sig") rewritten = rewrite_bmod_toml( - raw, + bmod_path.read_text(encoding="utf-8-sig"), spec.name, mod.expected_source, label=f"plugins/{spec.dir_name}/skills/{skill_dir.name}/bmod.toml", @@ -715,56 +790,41 @@ def rebuild_plugin(repo_root: Path, spec: PluginSpec, all_modules: dict[str, Dis bmod_path.write_text(rewritten, encoding="utf-8") copied_names.append(skill_dir.name) - icon_src = repo_root / "assets" / "icon.png" - has_icon = icon_src.is_file() - if has_icon: - icon_dest = plugin_root / "assets" / "icon.png" - icon_dest.parent.mkdir(parents=True, exist_ok=True) - shutil.copy2(icon_src, icon_dest) + icon_dest = dest_dir / ICON_REL + icon_dest.parent.mkdir(parents=True, exist_ok=True) + shutil.copy2(icon_src, icon_dest) + shutil.copy2(license_src, dest_dir / LICENSE_REL) + _write_plugin_manifests(dest_dir, spec, version, copied_names, meta) - _write_plugin_manifests(plugin_root, spec, version, copied_names, has_icon=has_icon) sources_str = ", ".join(dict.fromkeys(mod.source_slug for mod in discovered)) print(f"plugins/{spec.dir_name}: {len(copied_names)} skills ({sources_str}), version {version}") return version -def write_marketplaces(repo_root: Path, versions: dict[str, str]) -> None: - marketplace_specs = [spec for spec in PLUGINS if spec.marketplace] +def write_marketplaces(repo_root: Path, catalog: Catalog, versions: dict[str, str]) -> None: + """Write `.claude-plugin`, `.agents/plugins`, and `.cursor-plugin` marketplace indexes.""" + meta = catalog.meta + specs = catalog.plugins - # Claude Code / Copilot CLI / Qwen (.claude-plugin/marketplace.json) - # Keep top-level fields strictly to schema-recognized keys so `claude plugin validate --strict` passes. claude_payload = { - "name": "bmad", - "owner": {"name": AUTHOR_NAME}, - "metadata": { - "description": ( - "Breakthrough Method of Agile Ai Driven Development — modular BMad v7 skills " - "for software delivery, facilitation, toolsmithing, startups, creative work, and QA." - ), - }, + "name": meta["marketplace_name"], + "owner": {"name": meta["author_name"]}, + "metadata": {"description": meta["marketplace_description"]}, "plugins": [ { - "name": spec.name, + **_common_manifest(spec, versions[spec.name], meta), "source": f"./plugins/{spec.dir_name}", - "description": spec.description, - "version": versions[spec.name], - "author": {"name": AUTHOR_NAME}, - "homepage": spec.homepage, - "repository": spec.repository, - "license": "MIT", - "keywords": list(spec.keywords), "category": spec.category, "strict": True, } - for spec in marketplace_specs + for spec in specs ], } - _write_json(repo_root / ".claude-plugin" / "marketplace.json", claude_payload) + _write_json(repo_root / CLAUDE_MP_REL, claude_payload) - # OpenAI Codex (.agents/plugins/marketplace.json) codex_payload = { - "name": "bmad", - "interface": {"displayName": "BMad"}, + "name": meta["marketplace_name"], + "interface": {"displayName": meta["marketplace_display_name"]}, "plugins": [ { "name": spec.name, @@ -772,185 +832,352 @@ def write_marketplaces(repo_root: Path, versions: dict[str, str]) -> None: "policy": {"installation": "AVAILABLE", "authentication": "ON_INSTALL"}, "category": spec.category, } - for spec in marketplace_specs + for spec in specs ], } - _write_json(repo_root / ".agents" / "plugins" / "marketplace.json", codex_payload) + _write_json(repo_root / CODEX_MP_REL, codex_payload) - # Cursor (.cursor-plugin/marketplace.json) cursor_payload = { - "name": "bmad", - "owner": {"name": AUTHOR_NAME}, + "name": meta["marketplace_name"], + "owner": {"name": meta["author_name"]}, "plugins": [ - { - "name": spec.name, - "source": f"plugins/{spec.dir_name}", - "description": spec.description, - } - for spec in marketplace_specs + {"name": spec.name, "source": f"plugins/{spec.dir_name}", "description": spec.description} + for spec in specs ], } - _write_json(repo_root / ".cursor-plugin" / "marketplace.json", cursor_payload) + _write_json(repo_root / CURSOR_MP_REL, cursor_payload) - summary = ", ".join(f"{spec.name} {versions[spec.name]}" for spec in marketplace_specs) + summary = ", ".join(f"{spec.name} {versions[spec.name]}" for spec in specs) print(f"marketplaces updated: {summary}") -def export_codex_zip(repo_root: Path, spec: PluginSpec, version: str, out_dir: Path) -> Path: - """Package a rootless Codex/OpenAI portal .zip containing .codex-plugin/, skills/, README.md, LICENSE.""" +def _zip_writestr(zf: zipfile.ZipFile, arcname: str, data: bytes, mode: int = 0o644) -> None: + info = zipfile.ZipInfo(arcname, date_time=ZIP_FIXED_DT) + info.compress_type = zipfile.ZIP_DEFLATED + info.external_attr = mode << 16 + zf.writestr(info, data) + + +def export_codex_zip( + repo_root: Path, + spec: PluginSpec, + version: str, + out_dir: Path, + meta: dict[str, str], +) -> Path: + """Export a deterministic rootless `.zip` for OpenAI Plugin Portal and Codex uploads.""" plugin_root = repo_root / "plugins" / spec.dir_name + license_file = repo_root / LICENSE_REL + if not license_file.is_file(): + fail(f"missing {license_file}") + if not plugin_root.is_dir(): + fail(f"missing plugin directory {plugin_root}") + + skills_dir = plugin_root / "skills" + skill_names = sorted(p.name for p in skills_dir.iterdir() if p.is_dir()) if skills_dir.is_dir() else [] + out_dir.mkdir(parents=True, exist_ok=True) zip_path = out_dir / f"{spec.name}-{version}.zip" - license_file = repo_root / "LICENSE" + + common = _common_manifest(spec, version, meta) + root_manifest = { + "$schema": OPENAI_SCHEMA, + **common, + "extensions": {"com.openai": {"interface": _openai_interface(spec, meta)}}, + } + neutral_readme = _render_portal_zip_readme(spec, version, skill_names).encode("utf-8") with zipfile.ZipFile(zip_path, "w", compression=zipfile.ZIP_DEFLATED) as zf: + _zip_writestr(zf, ROOT_PLUGIN_REL.as_posix(), (json.dumps(root_manifest, indent=2, ensure_ascii=False) + "\n").encode("utf-8")) + _zip_writestr(zf, "README.md", neutral_readme) + _zip_writestr(zf, "LICENSE", license_file.read_bytes()) + for file_path in sorted(plugin_root.rglob("*")): if not file_path.is_file(): continue rel = file_path.relative_to(plugin_root) - if rel.parts[0] in ZIP_EXCLUDE_TOP_DIRS: - continue - if any(part in {"__pycache__", ".pytest_cache", ".eval-results"} for part in rel.parts): + if not rel.parts or rel.parts[0] in ZIP_EXCLUDE_TOP_DIRS or rel.as_posix() in {"README.md", "LICENSE", ROOT_PLUGIN_REL.as_posix()}: continue - if rel.name == ".DS_Store" or rel.suffix in {".pyc", ".pyo"}: + if is_ignored_relpath(rel): continue - zf.write(file_path, arcname=rel.as_posix()) - if license_file.is_file(): - zf.write(license_file, arcname="LICENSE") + mode = 0o755 if (file_path.stat().st_mode & 0o111) else 0o644 + _zip_writestr(zf, rel.as_posix(), file_path.read_bytes(), mode=mode) + validate_zip(zip_path, spec, version, meta) print(f"zip: {zip_path.relative_to(repo_root) if zip_path.is_relative_to(repo_root) else zip_path}") return zip_path -def _load_json(path: Path) -> dict: - if not path.is_file(): - fail(f"missing {path}") - try: - data = json.loads(path.read_text(encoding="utf-8")) - except (OSError, UnicodeError, json.JSONDecodeError) as error: - fail(f"{path}: invalid JSON: {error}") - raise AssertionError("unreachable") - if not isinstance(data, dict): - fail(f"{path}: expected JSON object") - return data - - -def _validate_marketplace_entries( - path: Path, - expected_names: list[str], - source_checker, -) -> dict[str, dict]: - data = _load_json(path) - raw_plugins = data.get("plugins") - if not isinstance(raw_plugins, list): - fail(f"{path}: plugins must be a list") - - by_name: dict[str, dict] = {} - for entry in raw_plugins: - if not isinstance(entry, dict) or not isinstance(entry.get("name"), str) or not entry["name"]: - fail(f"{path}: each marketplace entry must have a non-empty string name") - name = entry["name"] - if name in by_name: - fail(f"{path}: duplicate marketplace entry {name!r}") - by_name[name] = entry - - if "bmad" in by_name: - fail(f"{path}: portal bundle 'bmad' must not appear in marketplace catalog") - if list(by_name) != expected_names: - fail( - f"{path}: plugin entries must be exactly {', '.join(expected_names)}; " - f"found {', '.join(by_name) or 'none'}" - ) - - specs_by_name = {spec.name: spec for spec in PLUGINS} - for name, entry in by_name.items(): - source_checker(path, specs_by_name[name], entry) - return by_name - - -def validate_repo(repo_root: Path) -> None: - """Validate checked-in assets, manifests, skill bmod.toml rewrites, and marketplaces offline.""" - if not (repo_root / "LICENSE").is_file(): - fail(f"missing {repo_root / 'LICENSE'}") - if not (repo_root / "assets" / "icon.png").is_file(): - fail(f"missing {repo_root / 'assets' / 'icon.png'}") - - expected_names = [spec.name for spec in PLUGINS if spec.marketplace] - - def _check_claude_entry(path: Path, spec: PluginSpec, entry: dict) -> None: - expected_src = f"./plugins/{spec.dir_name}" - if entry.get("source") != expected_src: - fail(f"{path}: {spec.name} source must be {expected_src!r}, got {entry.get('source')!r}") +def _validate_openai_interface(iface: dict[str, Any], spec: PluginSpec, existing_paths: set[str], *, label: str) -> None: + if iface.get("displayName") != spec.display_name or len(spec.display_name) > MAX_DISPLAY_NAME: + fail(f"{label}: interface.displayName mismatch or > {MAX_DISPLAY_NAME} chars") + short = iface.get("shortDescription") + if not isinstance(short, str) or not short or len(short) > MAX_SHORT_DESCRIPTION: + fail(f"{label}: interface.shortDescription must be 1..{MAX_SHORT_DESCRIPTION} chars, got {len(str(short))}") + long_desc = iface.get("longDescription") + if not isinstance(long_desc, str) or not long_desc or len(long_desc) > MAX_LONG_DESCRIPTION: + fail(f"{label}: interface.longDescription must be 1..{MAX_LONG_DESCRIPTION} chars") + prompts = iface.get("defaultPrompt") + if not isinstance(prompts, list) or not 1 <= len(prompts) <= MAX_PROMPTS or len(set(prompts)) != len(prompts): + fail(f"{label}: interface.defaultPrompt must contain 1..{MAX_PROMPTS} unique items") + for p in prompts: + if not isinstance(p, str) or not p or len(p) > MAX_PROMPT_LEN or "@" in p: + fail(f"{label}: invalid defaultPrompt entry {p!r}") + for icon_key in ("logo", "composerIcon"): + icon_ref = iface.get(icon_key) + if not isinstance(icon_ref, str) or icon_ref.removeprefix("./") not in existing_paths: + fail(f"{label}: interface.{icon_key} {icon_ref!r} missing in plugin") + + +def validate_zip(zip_path: Path, spec: PluginSpec, version: str, meta: dict[str, str]) -> None: + """Verify Agent Plugins 1.0 schema, Codex fallback, license, README, and hygiene inside `.zip`.""" + if not zip_path.is_file(): + fail(f"missing zip archive {zip_path}") + with zipfile.ZipFile(zip_path) as zf: + names = zf.namelist() + if len(names) != len(set(names)): + fail(f"{zip_path}: contains duplicate zip entries") + name_set = set(names) + for req in (ROOT_PLUGIN_REL.as_posix(), CODEX_PLUGIN_REL.as_posix(), ICON_REL.as_posix(), "README.md", "LICENSE"): + if req not in name_set: + fail(f"{zip_path}: missing {req}") + for entry in names: + rel = Path(entry) + if not rel.parts or entry.startswith(("./", "/")): + fail(f"{zip_path}: invalid archive path {entry!r}") + if rel.parts[0] in ZIP_EXCLUDE_TOP_DIRS: + fail(f"{zip_path}: forbidden directory entry {entry}") + if is_ignored_relpath(rel): + fail(f"{zip_path}: junk/cache entry {entry}") + if not any(n.startswith("skills/") and n.endswith("/SKILL.md") for n in names): + fail(f"{zip_path}: missing bundled skills/*/SKILL.md") + + root_json = json.loads(zf.read(ROOT_PLUGIN_REL.as_posix()).decode("utf-8")) + if set(root_json) != AGENT_PLUGINS_ROOT_KEYS: + fail(f"{zip_path}: root plugin.json keys mismatch Agent Plugins 1.0 schema: {sorted(set(root_json) ^ AGENT_PLUGINS_ROOT_KEYS)}") + if root_json.get("$schema") != OPENAI_SCHEMA: + fail(f"{zip_path}: unexpected root plugin.json $schema") + expected_common = _common_manifest(spec, version, meta) + for key, expected_val in expected_common.items(): + if root_json.get(key) != expected_val: + fail(f"{zip_path}: root plugin.json {key!r} mismatch") + + iface = root_json.get("extensions", {}).get("com.openai", {}).get("interface") + if not isinstance(iface, dict): + fail(f"{zip_path}: missing extensions.com.openai.interface") + _validate_openai_interface(iface, spec, name_set, label=f"{zip_path}:root:plugin.json") + + codex_json = json.loads(zf.read(CODEX_PLUGIN_REL.as_posix()).decode("utf-8")) + if codex_json.get("skills") != "./skills/" or codex_json.get("version") != version: + fail(f"{zip_path}: {CODEX_PLUGIN_REL} skills or version mismatch") + if not isinstance(codex_json.get("interface"), dict): + fail(f"{zip_path}: {CODEX_PLUGIN_REL} missing interface") + _validate_openai_interface(codex_json["interface"], spec, name_set, label=f"{zip_path}:{CODEX_PLUGIN_REL}") + + readme_text = zf.read("README.md").decode("utf-8") + for forbidden in ("claude plugin install", "/plugin marketplace add", "copilot plugin", "qwen extensions"): + if forbidden in readme_text: + fail(f"{zip_path}: README.md contains marketplace CLI instructions ({forbidden!r})") + + +def _validate_marketplace_catalogs(repo_root: Path, catalog: Catalog) -> dict[str, dict[str, Any]]: + """Validate `.claude-plugin`, `.agents/plugins`, and `.cursor-plugin` marketplace catalogs.""" + meta = catalog.meta + specs = catalog.plugins + expected_names = [s.name for s in specs] + specs_by_name = {s.name: s for s in specs} + + def _index_entries(path: Path, data: dict[str, Any]) -> dict[str, dict[str, Any]]: + raw = data.get("plugins") + if not isinstance(raw, list): + fail(f"{path}: plugins must be a list") + entries: dict[str, dict[str, Any]] = {} + for item in raw: + if not isinstance(item, dict) or not isinstance(item.get("name"), str) or not item["name"]: + fail(f"{path}: each entry must have a non-empty string name") + if item["name"] in entries: + fail(f"{path}: duplicate entry {item['name']!r}") + entries[item["name"]] = item + if list(entries) != expected_names: + fail(f"{path}: entries must be {', '.join(expected_names)}; found {', '.join(entries) or 'none'}") + return entries + + # Claude marketplace + claude_path = repo_root / CLAUDE_MP_REL + claude_data = _load_json(claude_path) + if ( + claude_data.get("name") != meta["marketplace_name"] + or claude_data.get("owner") != {"name": meta["author_name"]} + or claude_data.get("metadata") != {"description": meta["marketplace_description"]} + ): + fail(f"{claude_path}: top-level marketplace metadata mismatch") + claude_entries = _index_entries(claude_path, claude_data) + for name, entry in claude_entries.items(): + spec = specs_by_name[name] + if ( + entry.get("source") != f"./plugins/{spec.dir_name}" + or entry.get("category") != spec.category + or entry.get("strict") is not True + or entry.get("description") != spec.description + or entry.get("license") != meta["license"] + ): + fail(f"{claude_path}: entry {name!r} metadata/source/strict mismatch") + + # Codex marketplace + codex_path = repo_root / CODEX_MP_REL + codex_data = _load_json(codex_path) + if ( + codex_data.get("name") != meta["marketplace_name"] + or codex_data.get("interface") != {"displayName": meta["marketplace_display_name"]} + ): + fail(f"{codex_path}: top-level marketplace metadata mismatch") + for name, entry in _index_entries(codex_path, codex_data).items(): + spec = specs_by_name[name] + if ( + entry.get("source") != {"source": "local", "path": f"./plugins/{spec.dir_name}"} + or entry.get("policy") != {"installation": "AVAILABLE", "authentication": "ON_INSTALL"} + or entry.get("category") != spec.category + ): + fail(f"{codex_path}: entry {name!r} metadata/policy/source mismatch") + + # Cursor marketplace + cursor_path = repo_root / CURSOR_MP_REL + cursor_data = _load_json(cursor_path) + if cursor_data.get("name") != meta["marketplace_name"] or cursor_data.get("owner") != {"name": meta["author_name"]}: + fail(f"{cursor_path}: top-level marketplace metadata mismatch") + for name, entry in _index_entries(cursor_path, cursor_data).items(): + spec = specs_by_name[name] + if entry.get("source") != f"plugins/{spec.dir_name}" or entry.get("description") != spec.description: + fail(f"{cursor_path}: entry {name!r} source/description mismatch") + + return claude_entries + + +def _validate_skill_frontmatter(skill_md: Path, expected_name: str) -> None: + lines = skill_md.read_text(encoding="utf-8-sig").splitlines() + if not lines or lines[0].strip() != "---": + fail(f"{skill_md}: missing YAML frontmatter") + end_idx = next((idx for idx, line in enumerate(lines[1:], 1) if line.strip() == "---"), -1) + if end_idx == -1: + fail(f"{skill_md}: unterminated YAML frontmatter") + + fm_lines = lines[1:end_idx] + name_val: str | None = None + has_desc = False + for idx, line in enumerate(fm_lines): + if line.startswith("name:"): + name_val = line[5:].strip().strip('"').strip("'") + elif line.startswith("description:"): + rest = line[12:].strip() + if rest and rest not in {"|", "|-", "|+", ">", ">-", ">+"}: + has_desc = True + else: + for nxt in fm_lines[idx + 1 :]: + if not nxt.strip(): + continue + if not nxt[0].isspace(): + break + has_desc = True + break + if name_val != expected_name: + fail(f"{skill_md}: frontmatter name {name_val!r} != folder {expected_name!r}") + if not has_desc: + fail(f"{skill_md}: frontmatter missing non-empty description") + if not any(line.strip() for line in lines[end_idx + 1 :]): + fail(f"{skill_md}: empty skill instruction body") + + +def _validate_plugin_manifests( + plugin_root: Path, + spec: PluginSpec, + meta: dict[str, str], + mp_version: str | None, +) -> str: + manifest_rels = (CLAUDE_PLUGIN_REL, CODEX_PLUGIN_REL, CURSOR_PLUGIN_REL, AGY_PLUGIN_REL) + loaded: dict[Path, dict[str, Any]] = {} + versions: set[str] = set() + existing_paths = {p.relative_to(plugin_root).as_posix() for p in plugin_root.rglob("*") if p.is_file()} + + for rel in manifest_rels: + mpath = plugin_root / rel + mdata = _load_json(mpath) + for key, expected_val in ( + ("name", spec.name), + ("homepage", spec.homepage), + ("repository", spec.repository), + ("license", meta["license"]), + ("author", {"name": meta["author_name"]}), + ("description", spec.description), + ("keywords", list(spec.keywords)), + ): + if mdata.get(key) != expected_val: + fail(f"{mpath}: {key!r} mismatch") + version = mdata.get("version") + if not isinstance(version, str) or not SEMVER_RE.match(version.strip()): + fail(f"{mpath}: invalid SemVer version {version!r}") + versions.add(version) + loaded[rel] = mdata - def _check_codex_entry(path: Path, spec: PluginSpec, entry: dict) -> None: - expected_src = {"source": "local", "path": f"./plugins/{spec.dir_name}"} - if entry.get("source") != expected_src: - fail(f"{path}: {spec.name} source must be {expected_src!r}, got {entry.get('source')!r}") + if len(versions) != 1: + fail(f"plugins/{spec.dir_name}: platform manifests disagree on version") + plugin_version = next(iter(versions)) + if mp_version is not None and mp_version != plugin_version: + fail(f"{CLAUDE_MP_REL}: {spec.name} version {mp_version!r} != plugin version {plugin_version!r}") + + codex_m = loaded[CODEX_PLUGIN_REL] + if codex_m.get("skills") != "./skills/" or not isinstance(codex_m.get("interface"), dict): + fail(f"{plugin_root / CODEX_PLUGIN_REL}: invalid skills or interface") + _validate_openai_interface(codex_m["interface"], spec, existing_paths, label=str(plugin_root / CODEX_PLUGIN_REL)) + + cursor_m = loaded[CURSOR_PLUGIN_REL] + if cursor_m.get("skills") != "./skills/" or cursor_m.get("displayName") != spec.display_name: + fail(f"{plugin_root / CURSOR_PLUGIN_REL}: invalid skills or displayName") + if str(cursor_m.get("logo", "")).removeprefix("./") not in existing_paths: + fail(f"{plugin_root / CURSOR_PLUGIN_REL}: logo missing") + + agy_m = loaded[AGY_PLUGIN_REL] + if agy_m.get("displayName") != spec.display_name or agy_m.get("suggestedPrompts") != list(spec.suggested_prompts): + fail(f"{plugin_root / AGY_PLUGIN_REL}: invalid displayName or suggestedPrompts") + if str(agy_m.get("logo", "")).removeprefix("./") not in existing_paths: + fail(f"{plugin_root / AGY_PLUGIN_REL}: logo missing") + + return plugin_version + + +def validate_repo(repo_root: Path, catalog: Catalog | None = None) -> None: + """Validate assets, directory hygiene, manifests, skill records, and marketplaces offline.""" + cat = catalog or load_catalog(repo_root / CATALOG_REL) + if not (repo_root / LICENSE_REL).is_file(): + fail(f"missing {repo_root / LICENSE_REL}") + if not (repo_root / ICON_REL).is_file(): + fail(f"missing {repo_root / ICON_REL}") + + plugins_dir = repo_root / "plugins" + if not plugins_dir.is_dir(): + fail(f"missing {plugins_dir}") + actual_dirs = {p.name for p in plugins_dir.iterdir() if p.is_dir()} + expected_dirs = {spec.dir_name for spec in cat.all_specs} + if actual_dirs != expected_dirs: + fail(f"plugins/ directories must be exactly {sorted(expected_dirs)}; found {sorted(actual_dirs)}") + + claude_entries = _validate_marketplace_catalogs(repo_root, cat) - def _check_cursor_entry(path: Path, spec: PluginSpec, entry: dict) -> None: - expected_src = f"plugins/{spec.dir_name}" - if entry.get("source") != expected_src: - fail(f"{path}: {spec.name} source must be {expected_src!r}, got {entry.get('source')!r}") + seen_marketplace_skills: dict[str, str] = {} + plugin_skill_sets: dict[str, set[str]] = {} + plugin_module_versions: dict[str, dict[str, str]] = {} - claude_entries = _validate_marketplace_entries( - repo_root / ".claude-plugin" / "marketplace.json", - expected_names, - _check_claude_entry, - ) - _validate_marketplace_entries( - repo_root / ".agents" / "plugins" / "marketplace.json", - expected_names, - _check_codex_entry, - ) - _validate_marketplace_entries( - repo_root / ".cursor-plugin" / "marketplace.json", - expected_names, - _check_cursor_entry, - ) + for spec in cat.all_specs: + plugin_root = plugins_dir / spec.dir_name + for req in ("README.md", LICENSE_REL.as_posix(), ICON_REL.as_posix()): + if not (plugin_root / req).is_file(): + fail(f"plugins/{spec.dir_name}: missing {req}") - seen_marketplace_skills: dict[str, str] = {} - manifest_relpaths = ( - ".claude-plugin/plugin.json", - ".codex-plugin/plugin.json", - ".cursor-plugin/plugin.json", - ".antigravity-plugin/plugin.json", - ) + for item in plugin_root.rglob("*"): + if is_ignored_relpath(item.relative_to(plugin_root)): + fail(f"plugins/{spec.dir_name}: disallowed cache/junk path {item.relative_to(plugin_root).as_posix()}") - for spec in ALL_SPECS: - plugin_root = repo_root / "plugins" / spec.dir_name - if not plugin_root.is_dir(): - fail(f"missing plugin directory {plugin_root}") - for required_file in ("README.md", "assets/icon.png"): - if not (plugin_root / required_file).is_file(): - fail(f"plugins/{spec.dir_name}: missing {required_file}") - - versions_seen: dict[str, str] = {} - for relpath in manifest_relpaths: - mpath = plugin_root / relpath - mdata = _load_json(mpath) - if mdata.get("name") != spec.name: - fail(f"{mpath}: name must be {spec.name!r}, got {mdata.get('name')!r}") - version = mdata.get("version") - if not isinstance(version, str) or not version.strip(): - fail(f"{mpath}: version must be a non-empty string") - if mdata.get("homepage") != spec.homepage: - fail(f"{mpath}: homepage must be {spec.homepage!r}, got {mdata.get('homepage')!r}") - if mdata.get("repository") != spec.repository: - fail(f"{mpath}: repository must be {spec.repository!r}, got {mdata.get('repository')!r}") - versions_seen[relpath] = version - - if len(set(versions_seen.values())) != 1: - detail = ", ".join(f"{k}={v!r}" for k, v in versions_seen.items()) - fail(f"plugins/{spec.dir_name}: manifests disagree on version: {detail}") - plugin_version = next(iter(versions_seen.values())) - - if spec.marketplace: - mp_version = claude_entries[spec.name].get("version") - if mp_version != plugin_version: - fail( - f".claude-plugin/marketplace.json: {spec.name} version {mp_version!r} " - f"does not match plugin version {plugin_version!r}" - ) + mp_version = claude_entries[spec.name].get("version") if spec.marketplace else None + plugin_version = _validate_plugin_manifests(plugin_root, spec, cat.meta, mp_version) skills_dir = plugin_root / "skills" if not skills_dir.is_dir(): @@ -960,128 +1187,235 @@ def _check_cursor_entry(path: Path, spec: PluginSpec, entry: dict) -> None: fail(f"plugins/{spec.dir_name}: skills/ directory is empty") expected_plugin_source = f"plugin:{spec.name}" + skill_names = {p.name for p in skill_folders} + plugin_skill_sets[spec.name] = skill_names + + bmod_records: dict[str, tuple[str, dict[str, Any]]] = {} + skill_entries: dict[str, dict[str, Any]] = {} for skill_dir in skill_folders: - if not (skill_dir / "SKILL.md").is_file(): - fail(f"plugins/{spec.dir_name}/skills/{skill_dir.name}: missing SKILL.md") - bmod_path = skill_dir / "bmod.toml" - if not bmod_path.is_file(): - fail(f"plugins/{spec.dir_name}/skills/{skill_dir.name}: missing bmod.toml") - bmod_data = _load_toml(bmod_path, f"plugins/{spec.dir_name}/skills/{skill_dir.name}") + _validate_skill_frontmatter(skill_dir / "SKILL.md", skill_dir.name) + bmod_data = _load_toml(skill_dir / "bmod.toml", f"plugins/{spec.dir_name}/skills/{skill_dir.name}") bmod_tbl = bmod_data.get("bmod") skill_tbl = bmod_data.get("skill") if not isinstance(bmod_tbl, dict) and not isinstance(skill_tbl, dict): - fail(f"{bmod_path}: must contain [bmod] and/or [skill]") - if isinstance(bmod_tbl, dict) and bmod_tbl.get("update_source") != expected_plugin_source: - fail( - f"{bmod_path}: [bmod].update_source must be {expected_plugin_source!r}, " - f"got {bmod_tbl.get('update_source')!r}" - ) + fail(f"{skill_dir / 'bmod.toml'}: must contain [bmod] and/or [skill]") + if isinstance(bmod_tbl, dict): + if bmod_tbl.get("update_source") != expected_plugin_source: + fail(f"{skill_dir / 'bmod.toml'}: [bmod].update_source must be {expected_plugin_source!r}") + code = str(bmod_tbl.get("code", "")) + if code in bmod_records: + fail(f"plugins/{spec.dir_name}: duplicate [bmod].code {code!r}") + bmod_records[code] = (skill_dir.name, bmod_tbl) if isinstance(skill_tbl, dict) and ("source" in skill_tbl or not isinstance(bmod_tbl, dict)): if skill_tbl.get("source") != expected_plugin_source: - fail( - f"{bmod_path}: [skill].source must be {expected_plugin_source!r}, " - f"got {skill_tbl.get('source')!r}" - ) + fail(f"{skill_dir / 'bmod.toml'}: [skill].source must be {expected_plugin_source!r}") + skill_entries[skill_dir.name] = skill_tbl if spec.marketplace: prior = seen_marketplace_skills.get(skill_dir.name) if prior is not None: - fail( - f"duplicate skill {skill_dir.name!r} across marketplace plugins " - f"{prior!r} and {spec.name!r}" - ) + fail(f"duplicate skill {skill_dir.name!r} across marketplace plugins {prior!r} and {spec.name!r}") seen_marketplace_skills[skill_dir.name] = spec.name - print( - f"validated {len(ALL_SPECS)} plugins ({len(seen_marketplace_skills)} modular skills, " - "0 marketplace overlaps) and 3 marketplaces" - ) + if set(bmod_records) != set(spec.modules): + fail(f"plugins/{spec.dir_name}: expected [bmod] codes {list(spec.modules)}, found {sorted(bmod_records)}") + + mod_versions = {code: str(tbl.get("version", "")) for code, (_, tbl) in bmod_records.items()} + plugin_module_versions[spec.name] = mod_versions + if max(mod_versions.values(), key=_semver_key) != plugin_version: + fail(f"plugins/{spec.dir_name}: plugin version {plugin_version!r} does not match bmod versions {mod_versions}") + + claimed_members: set[str] = set() + record_folders = {rec_folder for rec_folder, _ in bmod_records.values()} + for rec_folder, tbl in bmod_records.values(): + claimed_members.add(rec_folder) + members = tbl.get("skills") + if members is not None: + if not isinstance(members, list) or not all(isinstance(m, str) for m in members): + fail(f"plugins/{spec.dir_name}: {rec_folder} [bmod].skills must be a list of strings") + for member in members: + if member not in skill_names: + fail(f"plugins/{spec.dir_name}: {rec_folder} lists missing skill {member!r}") + claimed_members.add(member) + for sname, stbl in skill_entries.items(): + if stbl.get("bmod") not in record_folders: + fail(f"plugins/{spec.dir_name}: skill {sname!r} references missing [skill].bmod {stbl.get('bmod')!r}") + if claimed_members != skill_names: + fail(f"plugins/{spec.dir_name}: unclaimed skills {sorted(skill_names - claimed_members)}") + + modular_by_code = {p.modules[0]: p for p in cat.plugins if len(p.modules) == 1} + for bundle in cat.portal_bundles: + expected_union: set[str] = set() + for mod_code in bundle.modules: + owner = modular_by_code.get(mod_code) + if owner is None: + fail(f"catalog error: no modular plugin owns {mod_code!r}") + expected_union.update(plugin_skill_sets[owner.name]) + bundle_mod_ver = plugin_module_versions[bundle.name].get(mod_code) + owner_mod_ver = plugin_module_versions[owner.name].get(mod_code) + if bundle_mod_ver != owner_mod_ver: + fail( + f"plugins/{bundle.dir_name}: {mod_code} version {bundle_mod_ver!r} " + f"is out of sync with plugins/{owner.dir_name} ({owner_mod_ver!r})" + ) + if plugin_skill_sets[bundle.name] != expected_union: + fail(f"plugins/{bundle.dir_name}: skills do not match union of {', '.join(bundle.modules)}") + print(f"validated {len(cat.all_specs)} plugins ({len(seen_marketplace_skills)} modular skills, 0 overlaps) and 3 marketplaces") -def _resolve_source_repo(tmp_dir: Path, slug: str, override: str | None) -> Path: - if override is not None: - candidate = Path(override).expanduser() - if candidate.is_dir(): - return candidate.resolve() - url = override or clone_url(slug) - dest = tmp_dir / slug.replace("/", "_") - clone = subprocess.run( - ["git", "clone", "--quiet", "--depth", "1", url, str(dest)], - capture_output=True, - text=True, - ) + +def _git_clone(url: str, dest: Path) -> Path: + clone = subprocess.run(["git", "clone", "--quiet", "--depth", "1", url, str(dest)], capture_output=True, text=True) if clone.returncode != 0: fail(f"git clone {url} failed: {clone.stderr.strip()}") return dest -def main(argv: list[str] | None = None) -> int: +def _resolve_source_repo(tmp_dir: Path, slug: str, override: str | None) -> Path: + dest = tmp_dir / slug.replace("/", "_") + if override is None: + return _git_clone(f"https://github.com/{slug}", dest) + + if "://" not in override and not override.startswith("git@"): + candidate = Path(override).expanduser() + if not candidate.is_dir(): + fail(f"{slug}: local source directory does not exist: {override}") + resolved = candidate.resolve() + return _git_clone(str(resolved), dest) if (resolved / ".git").exists() else resolved + + return _git_clone(override, dest) + + +def _expand_only_selection(catalog: Catalog, wanted_arg: str) -> tuple[PluginSpec, ...]: + wanted = {item.strip() for item in wanted_arg.split(",") if item.strip()} + if not wanted: + fail("--only requires at least one plugin name or directory") + selected = [spec for spec in catalog.all_specs if spec.name in wanted or spec.dir_name in wanted] + missing = wanted - {s.name for s in selected} - {s.dir_name for s in selected} + if missing: + fail(f"unknown --only entries: {', '.join(sorted(missing))}") + + selected_modules = {code for spec in selected for code in spec.modules} + selected_names = {spec.name for spec in selected} + for bundle in catalog.portal_bundles: + if bundle.name not in selected_names and any(code in selected_modules for code in bundle.modules): + print(f"note: also rebuilding portal bundle {bundle.name!r} to stay in sync with {', '.join(sorted(selected_modules & set(bundle.modules)))}") + selected.append(bundle) + selected_names.add(bundle.name) + + order = {spec.name: idx for idx, spec in enumerate(catalog.all_specs)} + return tuple(sorted(selected, key=lambda s: order[s.name])) + + +def _commit_staged_plugins( + repo_root: Path, staged_dir: Path, selected: tuple[PluginSpec, ...], all_specs: tuple[PluginSpec, ...] +) -> None: + plugins_dir = repo_root / "plugins" + plugins_dir.mkdir(parents=True, exist_ok=True) + for spec in selected: + target = plugins_dir / spec.dir_name + if target.exists(): + shutil.rmtree(target) + shutil.move(str(staged_dir / spec.dir_name), str(target)) + if len(selected) == len(all_specs): + keep = {spec.dir_name for spec in all_specs} + for child in list(plugins_dir.iterdir()): + if child.is_dir() and child.name not in keep: + shutil.rmtree(child) + + +def main(argv: list[str] | None = None, *, repo_root: Path | None = None) -> int: + """CLI entry point for rebuilding, exporting, and validating plugins.""" + root = repo_root or REPO_ROOT + catalog = load_catalog(root / CATALOG_REL) + parser = argparse.ArgumentParser(description=__doc__.splitlines()[0]) parser.add_argument( "--source", action="append", default=[], metavar="SLUG=URL_OR_PATH", - help="use a local directory or alternate git URL for SLUG instead of GitHub main (repeatable)", - ) - parser.add_argument( - "--zip", - action="store_true", - help="also build clean rootless Codex/OpenAI portal .zip packages under dist/", - ) - parser.add_argument( - "--only", - default="", - help="comma-separated plugin names or dirs to rebuild (skips rewriting root marketplace manifests)", - ) - parser.add_argument( - "--validate", - action="store_true", - help="validate checked-in plugins, manifests, and marketplaces offline without cloning", + help="use a local directory or git URL for SLUG instead of GitHub default branch (repeatable)", ) + parser.add_argument("--zip", action="store_true", help="export and validate rootless OpenAI/Codex portal .zip packages under dist/") + parser.add_argument("--only", default=None, help="comma-separated plugin names or dirs to rebuild") + parser.add_argument("--validate", action="store_true", help="validate checked-in plugins, manifests, and marketplaces offline") + parser.add_argument("--zip-existing", action="store_true", help="export and validate dist/*.zip packages from checked-in plugins offline") args = parser.parse_args(argv) + if (args.validate or args.zip_existing) and (args.source or args.only is not None or args.zip or (args.validate and args.zip_existing)): + fail("--validate and --zip-existing are standalone offline commands and cannot be combined with build flags") + if args.validate: - validate_repo(REPO_ROOT) + validate_repo(root, catalog) + return 0 + + if args.zip_existing: + validate_repo(root, catalog) + for spec in catalog.all_specs: + ver = str(_load_json(root / "plugins" / spec.dir_name / CLAUDE_PLUGIN_REL)["version"]) + export_codex_zip(root, spec, ver, root / DIST_REL, catalog.meta) return 0 - source_map = {spec.slug: spec for spec in SOURCES} + source_map = {spec.slug: spec for spec in catalog.sources} overrides: dict[str, str] = {} for item in args.source: slug, sep, url = item.partition("=") - if not sep or slug not in source_map: - fail(f"--source wants SLUG=URL_OR_PATH with SLUG in {', '.join(source_map)}; got {item!r}") - overrides[slug] = url - - selected: tuple[PluginSpec, ...] = ALL_SPECS - partial = bool(args.only.strip()) - if partial: - wanted = {item.strip() for item in args.only.split(",") if item.strip()} - selected = tuple(spec for spec in ALL_SPECS if spec.name in wanted or spec.dir_name in wanted) - missing = wanted - {s.name for s in selected} - {s.dir_name for s in selected} - if missing: - fail(f"unknown --only entries: {', '.join(sorted(missing))}") + if not sep or slug not in source_map or not url.strip(): + fail(f"--source wants SLUG=URL_OR_PATH with non-empty URL/path and SLUG in {', '.join(source_map)}; got {item!r}") + overrides[slug] = url.strip() + + all_specs = catalog.all_specs + partial = args.only is not None + selected = _expand_only_selection(catalog, args.only) if partial else all_specs needed_modules = {code for spec in selected for code in spec.modules} - needed_sources = [spec for spec in SOURCES if any(m in needed_modules for m in spec.modules)] + needed_sources = [spec for spec in catalog.sources if any(m in needed_modules for m in spec.modules)] all_modules: dict[str, DiscoveredModule] = {} - with tempfile.TemporaryDirectory() as tmp: - tmp_dir = Path(tmp) + built_versions: dict[str, str] = {} + with tempfile.TemporaryDirectory(prefix="bmad-stage-") as stage_tmp: + stage_root = Path(stage_tmp) for src_spec in needed_sources: - checkout = _resolve_source_repo(tmp_dir, src_spec.slug, overrides.get(src_spec.slug)) + checkout = _resolve_source_repo(stage_root, src_spec.slug, overrides.get(src_spec.slug)) all_modules.update(collect_modules(checkout, src_spec)) - versions: dict[str, str] = {} + # Assemble complete target tree inside temporary staging dir and validate BEFORE mutating repo_root. + target_view = stage_root / "repo" + target_view.mkdir() + shutil.copy2(root / CATALOG_REL, target_view / CATALOG_REL) + shutil.copy2(root / LICENSE_REL, target_view / LICENSE_REL) + (target_view / "assets").mkdir() + if not (root / ICON_REL).is_file(): + fail(f"missing {root / ICON_REL}") + shutil.copy2(root / ICON_REL, target_view / ICON_REL) + + selected_names = {spec.name for spec in selected} + all_versions: dict[str, str] = {} + staged_plugins = target_view / "plugins" + staged_plugins.mkdir() + for spec in all_specs: + if spec.name in selected_names: + ver = _stage_plugin(staged_plugins / spec.dir_name, root, spec, all_modules, catalog.meta) + built_versions[spec.name] = ver + all_versions[spec.name] = ver + else: + existing_plugin = root / "plugins" / spec.dir_name + if not existing_plugin.is_dir(): + fail(f"--only requires existing plugins/{spec.dir_name} (run a full build first)") + ver = str(_load_json(existing_plugin / CLAUDE_PLUGIN_REL)["version"]) + all_versions[spec.name] = ver + shutil.copytree(existing_plugin, staged_plugins / spec.dir_name) + + write_marketplaces(target_view, catalog, all_versions) + validate_repo(target_view, catalog) + + _commit_staged_plugins(root, staged_plugins, selected, all_specs) + write_marketplaces(root, catalog, all_versions) + + if args.zip: for spec in selected: - versions[spec.name] = rebuild_plugin(REPO_ROOT, spec, all_modules) - - if not partial: - write_marketplaces(REPO_ROOT, versions) - - if args.zip: - for spec in selected: - export_codex_zip(REPO_ROOT, spec, versions[spec.name], DIST_DIR) + export_codex_zip(root, spec, built_versions[spec.name], root / DIST_REL, catalog.meta) return 0 diff --git a/test_release.py b/test_release.py index ae3c84b..ae7f76a 100644 --- a/test_release.py +++ b/test_release.py @@ -1,4 +1,6 @@ import json +import shutil +import subprocess import tempfile import tomllib import unittest @@ -7,32 +9,172 @@ import release +REPO_ROOT = Path(__file__).resolve().parent + def _write(path: Path, text: str) -> None: path.parent.mkdir(parents=True, exist_ok=True) path.write_text(text, encoding="utf-8") -class ReleaseScriptTests(unittest.TestCase): - def test_rewrite_bmod_toml_only_updates_plugin_sources(self) -> None: +def _write_skill(root: Path, rel_parent: str, folder: str, bmod_toml: str, extra_name: str | None = None) -> Path: + skill_dir = root / rel_parent / folder + skill_name = extra_name or folder + _write( + skill_dir / "SKILL.md", + f"---\nname: {skill_name}\ndescription: Test skill {skill_name}.\n---\n# {skill_name}\n", + ) + _write(skill_dir / "bmod.toml", bmod_toml) + return skill_dir + + +def _build_synthetic_sources(root: Path) -> dict[str, Path]: + """Create synthetic grouped and ungrouped v7 upstream source repositories.""" + src_root = root / "upstream" + paths: dict[str, Path] = {} + + bmad_repo = src_root / "BMAD-METHOD" + paths["bmad-code-org/BMAD-METHOD"] = bmad_repo + _write_skill( + bmad_repo, + "skills/core-tools", + "bmod-core-tools", + '[bmod]\ncode = "core-tools"\nversion = "7.0.0"\n' + 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/core-tools"\n' + 'skills = ["bmad"]\n', + ) + _write_skill( + bmad_repo, + "skills/core-tools", + "bmad", + '[skill]\nbmod = "bmod-core-tools"\n' + 'source = "github:bmad-code-org/BMAD-METHOD/skills/core-tools"\n', + ) + _write_skill( + bmad_repo, + "skills/method", + "bmod-method", + "[bmod]\ncode = 'method'\nversion = '7.0.0'\n" + "update_source = 'github:bmad-code-org/BMAD-METHOD/skills/method'\n" + "skills = ['bmad-build']\n" + "required_skills = [\n" + " { skill = 'bmad', version = '7.0.0', source = 'github:bmad-code-org/BMAD-METHOD/skills/core-tools' },\n" + "]\n", + ) + _write_skill( + bmad_repo, + "skills/method", + "bmad-build", + "[skill]\nbmod = 'bmod-method'\n" + "source = 'github:bmad-code-org/BMAD-METHOD/skills/method'\n" + "recommended_skills = [\n" + " { skill = 'bmad-tea', source = 'github:bmad-code-org/bmad-method-test-architecture-enterprise/skills' },\n" + "]\n", + ) + _write_skill( + bmad_repo, + "skills/toolsmith", + "bmod-toolsmith", + '[bmod]\ncode = "toolsmith"\nversion = "7.0.0"\n' + 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/toolsmith"\n' + 'skills = ["bmad-toolsmith"]\n', + ) + _write_skill( + bmad_repo, + "skills/toolsmith", + "bmad-toolsmith", + '[skill]\nbmod = "bmod-toolsmith"\n' + 'source = "github:bmad-code-org/BMAD-METHOD/skills/toolsmith"\n', + ) + _write_skill( + bmad_repo, + "skills/founder", + "bmad-founder-agent-advisor", + '[bmod]\ncode = "founder"\nversion = "7.0.0"\n' + 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/founder"\n\n' + '[skill]\nrecommended_skills = []\n', + ) + _write_skill( + bmad_repo, + "skills/creative", + "bmad-creative-agent-director", + '[bmod]\ncode = "creative"\nversion = "7.0.0"\n' + 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/creative"\n\n' + '[skill]\nrecommended_skills = []\n', + ) + + tea_repo = src_root / "tea" + paths["bmad-code-org/bmad-method-test-architecture-enterprise"] = tea_repo + _write_skill( + tea_repo, + "skills", + "bmod-tea", + "[bmod]\ncode = 'tea'\nversion = '4.6.2'\n" + "update_source = 'github:bmad-code-org/bmad-method-test-architecture-enterprise/skills'\n" + "skills = ['bmad-tea']\n", + ) + _write_skill( + tea_repo, + "skills", + "bmad-tea", + "[skill]\nbmod = 'bmod-tea'\n" + "source = 'github:bmad-code-org/bmad-method-test-architecture-enterprise/skills'\n", + ) + + loop_repo = src_root / "bmad-loop" + paths["bmad-code-org/bmad-loop"] = loop_repo + _write_skill( + loop_repo, + "skills", + "bmod-bmad-loop", + '[bmod]\ncode = "bmad-loop"\nversion = "0.13.2"\n' + 'update_source = "github:bmad-code-org/bmad-loop/skills"\n' + 'skills = ["bmad-loop-setup"]\n', + ) + _write_skill( + loop_repo, + "skills", + "bmad-loop-setup", + '[skill]\nbmod = "bmod-bmad-loop"\n' + 'source = "github:bmad-code-org/bmad-loop/skills"\n', + ) + return paths + + +def _init_plugins_repo(root: Path) -> Path: + repo = root / "plugins-repo" + repo.mkdir(parents=True) + shutil.copy2(REPO_ROOT / "catalog.toml", repo / "catalog.toml") + shutil.copy2(REPO_ROOT / "LICENSE", repo / "LICENSE") + (repo / "assets").mkdir() + shutil.copy2(REPO_ROOT / "assets/icon.png", repo / "assets/icon.png") + return repo + + +class TomlRewriterTests(unittest.TestCase): + def test_rewrite_handles_single_triple_bom_escaped_four_quotes_and_inline_arrays(self) -> None: original = ( - '[bmod]\n' + '\ufeff["bmod"] # quoted table header\n' 'code = "method"\n' - 'version = "7.0.0"\n' - 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/method"\n' - 'skills = ["bmad-build"]\n' 'required_skills = [\n' ' { skill = "bmad", version = "7.0.0", source = "github:bmad-code-org/BMAD-METHOD/skills/core-tools" },\n' ']\n' - 'post_install_message = """\n' - 'source = "should not touch inside multiline string"\n' - '"""\n\n' - '[skill]\n' + 'notes = [\n' + ' """She said "hi"""" ,\n' + " '''ends with quote'''',\n" + ' """escaped \\" quote \\""""\n' + ']\n' + "update_source = 'github:bmad-code-org/BMAD-METHOD/skills/method' # single quotes\n\n" + '[other."a[b]"]\n' + 'source = "github:bmad-code-org/BMAD-METHOD/skills/method"\n\n' + '[[bmod_extra]]\n' + 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/method"\n\n' + "['skill']\n" 'bmod = "bmod-method"\n' - 'source = "github:bmad-code-org/BMAD-METHOD/skills/method"\n' 'recommended_skills = [\n' ' { skill = "bmad-tea", source = "github:bmad-code-org/bmad-method-test-architecture-enterprise/skills" },\n' ']\n' + 'source = """github:bmad-code-org/BMAD-METHOD/skills/method"""\n' ) rewritten = release.rewrite_bmod_toml( original, @@ -50,174 +192,240 @@ def test_rewrite_bmod_toml_only_updates_plugin_sources(self) -> None: data["skill"]["recommended_skills"][0]["source"], "github:bmad-code-org/bmad-method-test-architecture-enterprise/skills", ) - self.assertIn('source = "should not touch inside multiline string"', data["bmod"]["post_install_message"]) + self.assertEqual(data["other"]["a[b]"]["source"], "github:bmad-code-org/BMAD-METHOD/skills/method") + self.assertEqual(data["bmod_extra"][0]["update_source"], "github:bmad-code-org/BMAD-METHOD/skills/method") + self.assertIn("# single quotes", rewritten) + + def test_rewrite_root_dotted_keys_and_ignores_nested_bmod_dotted_under_other_table(self) -> None: + original = ( + 'bmod.update_source = "github:org/repo/skills"\n' + 'skill.source = "github:org/repo/skills"\n' + '[other]\n' + 'bmod.update_source = "github:org/repo/skills"\n' + ) + rewritten = release.rewrite_bmod_toml(original, "bmad-x", "github:org/repo/skills") + data = tomllib.loads(rewritten) + self.assertEqual(data["bmod"]["update_source"], "plugin:bmad-x") + self.assertEqual(data["skill"]["source"], "plugin:bmad-x") + self.assertEqual(data["other"]["bmod"]["update_source"], "github:org/repo/skills") + + def test_rewrite_rejects_bad_expected_source_and_bad_toml(self) -> None: + with self.assertRaises(SystemExit): + release.rewrite_bmod_toml('[bmod]\nupdate_source = "github:wrong"\n', "p", "github:right") + with self.assertRaises(SystemExit): + release.rewrite_bmod_toml("not valid toml === [", "p", "github:right") - def test_collect_rebuild_and_zip_grouped_single_skill_and_bundle(self) -> None: + +class CollectorAndVersionTests(unittest.TestCase): + def test_collect_modules_ungrouped_and_error_paths(self) -> None: with tempfile.TemporaryDirectory() as tmp: root = Path(tmp) - src = root / "BMAD-METHOD" - out = root / "plugins-repo" - (out / ".claude-plugin").mkdir(parents=True) - _write(out / "LICENSE", "MIT\n") - _write(out / "assets/icon.png", "png-bytes") - - # core-tools (grouped multi-skill) - _write(src / "skills/core-tools/bmod-core-tools/SKILL.md", "---\nname: bmod-core-tools\n---\n") - _write( - src / "skills/core-tools/bmod-core-tools/bmod.toml", - '[bmod]\ncode = "core-tools"\nversion = "7.0.0"\n' - 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/core-tools"\n' - 'skills = ["bmad"]\n', - ) - _write(src / "skills/core-tools/bmad/SKILL.md", "---\nname: bmad\n---\n") - _write( - src / "skills/core-tools/bmad/bmod.toml", - '[skill]\nbmod = "bmod-core-tools"\n' - 'source = "github:bmad-code-org/BMAD-METHOD/skills/core-tools"\n', - ) - _write(src / "skills/core-tools/bmad/__pycache__/junk.pyc", "x") - - # founder (grouped single-skill) - _write(src / "skills/founder/bmad-founder-agent-advisor/SKILL.md", "---\nname: bmad-founder-agent-advisor\n---\n") - _write( - src / "skills/founder/bmad-founder-agent-advisor/bmod.toml", - '[bmod]\ncode = "founder"\nversion = "7.0.0"\n' - 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/founder"\n' - 'required_skills = [{ skill = "bmad", version = "7.0.0", source = "github:bmad-code-org/BMAD-METHOD/skills/core-tools" }]\n\n' - '[skill]\n' - 'recommended_skills = [{ skill = "bmad-party-mode", source = "github:bmad-code-org/BMAD-METHOD/skills/core-tools" }]\n', - ) + sources = _build_synthetic_sources(root) - # method (grouped multi-skill) - _write(src / "skills/method/bmod-method/SKILL.md", "---\nname: bmod-method\n---\n") - _write( - src / "skills/method/bmod-method/bmod.toml", - '[bmod]\ncode = "method"\nversion = "7.0.0"\n' - 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/method"\n' - 'skills = ["bmad-build"]\n', - ) - _write(src / "skills/method/bmad-build/SKILL.md", "---\nname: bmad-build\n---\n") - _write( - src / "skills/method/bmad-build/bmod.toml", - '[skill]\nbmod = "bmod-method"\n' - 'source = "github:bmad-code-org/BMAD-METHOD/skills/method"\n', + tea_mods = release.collect_modules( + sources["bmad-code-org/bmad-method-test-architecture-enterprise"], + release.SourceSpec("bmad-code-org/bmad-method-test-architecture-enterprise", ("tea",), grouped=False), ) + self.assertEqual(tea_mods["tea"].version, "4.6.2") + self.assertEqual([p.name for p in tea_mods["tea"].skill_dirs], ["bmod-tea", "bmad-tea"]) - modules = release.collect_modules( - src, - release.SourceSpec(slug="bmad-code-org/BMAD-METHOD", modules=("core-tools", "method", "founder"), grouped=True), + # Orphan skill folder must fail + _write_skill( + sources["bmad-code-org/bmad-loop"], + "skills", + "orphan-skill", + '[skill]\nbmod = "bmod-bmad-loop"\nsource = "github:bmad-code-org/bmad-loop/skills"\n', ) - self.assertEqual(set(modules), {"core-tools", "method", "founder"}) + with self.assertRaises(SystemExit): + release.collect_modules( + sources["bmad-code-org/bmad-loop"], + release.SourceSpec("bmad-code-org/bmad-loop", ("bmad-loop",), grouped=False), + ) - # Single-skill plugin - founder_spec = next(s for s in release.PLUGINS if s.name == "bmad-founder") - self.assertEqual(release.rebuild_plugin(out, founder_spec, modules), "7.0.0") - founder_bmod = tomllib.loads( - (out / "plugins/founder/skills/bmad-founder-agent-advisor/bmod.toml").read_text() - ) - self.assertEqual(founder_bmod["bmod"]["update_source"], "plugin:bmad-founder") - self.assertEqual( - founder_bmod["bmod"]["required_skills"][0]["source"], - "github:bmad-code-org/BMAD-METHOD/skills/core-tools", + # Empty skills = [] must fail + empty_repo = root / "empty-skills-list" + _write_skill( + empty_repo, + "skills", + "bmod-tea", + '[bmod]\ncode = "tea"\nversion = "1.0.0"\nupdate_source = "github:o/r/skills"\nskills = []\n', ) + with self.assertRaises(SystemExit): + release.collect_modules(empty_repo, release.SourceSpec("o/r", ("tea",), grouped=False)) - # Multi-module bundle - bundle_spec = release.PluginSpec( - dir_name="bmad", - name="bmad", - display_name="BMad", - description="Combined bundle", - short_description="Combined", - long_description="Combined", - category="Developer Tools", - keywords=("bmad",), - suggested_prompts=("Run /bmad setup",), - homepage=release.BMAD_HOMEPAGE, - repository=release.BMAD_HOMEPAGE, - modules=("core-tools", "method"), - marketplace=False, - ) - self.assertEqual(release.rebuild_plugin(out, bundle_spec, modules), "7.0.0") - self.assertFalse((out / "plugins/bmad/skills/bmad/__pycache__").exists()) - self.assertEqual( - tomllib.loads((out / "plugins/bmad/skills/bmad/bmod.toml").read_text())["skill"]["source"], - "plugin:bmad", + # Grouped repo skill in wrong group folder must fail + bad_group = root / "bad-group" + _write_skill( + bad_group, + "skills/core-tools", + "bmod-core-tools", + '[bmod]\ncode = "core-tools"\nversion = "7.0.0"\n' + 'update_source = "github:o/r/skills/core-tools"\nskills = ["bmad"]\n', ) - self.assertEqual( - tomllib.loads((out / "plugins/bmad/skills/bmod-method/bmod.toml").read_text())["bmod"]["update_source"], - "plugin:bmad", + _write_skill( + bad_group, + "skills/method", + "bmad", + '[skill]\nbmod = "bmod-core-tools"\nsource = "github:o/r/skills/core-tools"\n', ) + with self.assertRaises(SystemExit): + release.collect_modules(bad_group, release.SourceSpec("o/r", ("core-tools",), grouped=True)) - # Rootless zip omits Claude/Cursor/Antigravity dotdirs - zip_path = release.export_codex_zip(out, bundle_spec, "7.0.0", out / "dist") - with zipfile.ZipFile(zip_path) as zf: - names = set(zf.namelist()) - self.assertIn(".codex-plugin/plugin.json", names) - self.assertIn("assets/icon.png", names) - self.assertIn("README.md", names) - self.assertIn("LICENSE", names) - self.assertIn("skills/bmad/SKILL.md", names) - self.assertIn("skills/bmad-build/SKILL.md", names) - self.assertFalse(any(name.startswith((".claude-plugin/", ".cursor-plugin/", ".antigravity-plugin/")) for name in names)) - codex_meta = json.loads((out / "plugins/bmad/.codex-plugin/plugin.json").read_text()) - self.assertEqual(codex_meta["skills"], "./skills/") - - def test_validate_repo_accepts_full_build_and_rejects_overlap_or_raw_source(self) -> None: + def test_bundle_version_prefers_highest_semver_including_prerelease_numbers(self) -> None: + with tempfile.TemporaryDirectory() as tmp: + d = Path(tmp) + mods = [ + release.DiscoveredModule("core-tools", "7.0.0", "s", "e", d, ()), + release.DiscoveredModule("method", "7.0.2-alpha.10", "s", "e", d, ()), + release.DiscoveredModule("toolsmith", "7.0.2-alpha.2", "s", "e", d, ()), + ] + self.assertEqual(release._resolve_bundle_version(mods), "7.0.2-alpha.10") + + def test_validate_skill_frontmatter_edge_cases(self) -> None: + with tempfile.TemporaryDirectory() as tmp: + p = Path(tmp) / "SKILL.md" + # Unindented next key after empty multiline block must fail + p.write_text("---\nname: s\ndescription: |\nmetadata:\n author: x\n---\nbody\n", encoding="utf-8") + with self.assertRaises(SystemExit): + release._validate_skill_frontmatter(p, "s") + # Fake ---foo closer must fail + p.write_text("---\nname: s\ndescription: ok\n---foo\nbody\n", encoding="utf-8") + with self.assertRaises(SystemExit): + release._validate_skill_frontmatter(p, "s") + # Empty body must fail + p.write_text("---\nname: s\ndescription: ok\n---\n \n", encoding="utf-8") + with self.assertRaises(SystemExit): + release._validate_skill_frontmatter(p, "s") + + +class EndToEndBuildAndValidateTests(unittest.TestCase): + def test_full_cli_only_bundle_sync_zip_schema_and_negative_checks(self) -> None: with tempfile.TemporaryDirectory() as tmp: root = Path(tmp) - src = root / "src" - out = root / "plugins-repo" - _write(out / "LICENSE", "MIT\n") - _write(out / "assets/icon.png", "png-bytes") - - modules: dict[str, release.DiscoveredModule] = {} - versions: dict[str, str] = {} - for src_spec in release.SOURCES: - for code in src_spec.modules: - skill_name = f"bmad-test-{code}" - if src_spec.grouped: - parent_rel = f"skills/{code}" - else: - parent_rel = "skills" - skill_dir = src / src_spec.slug.split("/")[-1] / parent_rel / skill_name - expected_src = f"github:{src_spec.slug}/{parent_rel}" - _write(skill_dir / "SKILL.md", f"---\nname: {skill_name}\n---\n") - _write( - skill_dir / "bmod.toml", - f'[bmod]\ncode = "{code}"\nversion = "7.0.0"\n' - f'update_source = "{expected_src}"\n', - ) - modules[code] = release.DiscoveredModule( - code=code, - version="7.0.0", - source_slug=src_spec.slug, - expected_source=expected_src, - record_dir=skill_dir, - skill_dirs=(skill_dir,), - ) - - for spec in release.ALL_SPECS: - versions[spec.name] = release.rebuild_plugin(out, spec, modules) - release.write_marketplaces(out, versions) - - release.validate_repo(out) - - # Introducing an unrewritten github: source must fail validation. - bad_bmod = out / "plugins/founder/skills/bmad-test-founder/bmod.toml" - original_bmod = bad_bmod.read_text() - bad_bmod.write_text( - original_bmod.replace("plugin:bmad-founder", "github:bmad-code-org/BMAD-METHOD/skills/founder") + sources = _build_synthetic_sources(root) + repo = _init_plugins_repo(root) + catalog = release.load_catalog(repo / "catalog.toml") + + # Clean git-clone isolation test against dirty untracked file + bmad_dir = sources["bmad-code-org/BMAD-METHOD"] + subprocess.run(["git", "init", "-q"], cwd=bmad_dir, check=True) + subprocess.run(["git", "config", "user.email", "t@example.com"], cwd=bmad_dir, check=True) + subprocess.run(["git", "config", "user.name", "Test"], cwd=bmad_dir, check=True) + subprocess.run(["git", "add", "-A"], cwd=bmad_dir, check=True) + subprocess.run(["git", "commit", "-q", "-m", "init"], cwd=bmad_dir, check=True) + _write(bmad_dir / "skills/core-tools/bmad/UNTRACKED_DIRTY.txt", "must not leak") + + _write(repo / "plugins/toolbox/stale.txt", "old") + + argv = [ + f"--source=bmad-code-org/BMAD-METHOD={sources['bmad-code-org/BMAD-METHOD']}", + f"--source=bmad-code-org/bmad-method-test-architecture-enterprise={sources['bmad-code-org/bmad-method-test-architecture-enterprise']}", + f"--source=bmad-code-org/bmad-loop={sources['bmad-code-org/bmad-loop']}", + "--zip", + ] + self.assertEqual(release.main(argv, repo_root=repo), 0) + self.assertFalse((repo / "plugins/toolbox").exists()) + self.assertFalse((repo / "plugins/core-tools/skills/bmad/UNTRACKED_DIRTY.txt").exists()) + + # Verify closed Agent Plugins 1.0 schema (no "skills"), composerIcon, neutral README + bmad_dir_out = repo / "plugins/bmad" + codex_m = json.loads((bmad_dir_out / ".codex-plugin/plugin.json").read_text()) + self.assertEqual(codex_m["interface"]["composerIcon"], "./assets/icon.png") + self.assertLessEqual(len(codex_m["interface"]["shortDescription"]), 30) + + zip_path = repo / "dist/bmad-7.0.0.zip" + with zipfile.ZipFile(zip_path) as zf: + names = zf.namelist() + self.assertIn("plugin.json", names) + self.assertEqual(zf.getinfo("plugin.json").date_time, release.ZIP_FIXED_DT) + root_json = json.loads(zf.read("plugin.json").decode("utf-8")) + self.assertEqual(set(root_json), release.AGENT_PLUGINS_ROOT_KEYS) + self.assertNotIn("skills", root_json) + iface = root_json["extensions"]["com.openai"]["interface"] + self.assertEqual(iface["composerIcon"], "./assets/icon.png") + self.assertNotIn("claude plugin install", zf.read("README.md").decode("utf-8")) + + # Verify --zip reject on extra top-level "skills" key + bad_zip = root / "bad.zip" + with zipfile.ZipFile(zip_path) as src_zf, zipfile.ZipFile(bad_zip, "w") as dst_zf: + for item in src_zf.infolist(): + data = src_zf.read(item.filename) + if item.filename == "plugin.json": + obj = json.loads(data.decode("utf-8")) + obj["skills"] = "./skills/" + data = json.dumps(obj).encode("utf-8") + dst_zf.writestr(item, data) + bmad_spec = next(s for s in catalog.all_specs if s.name == "bmad") + with self.assertRaises(SystemExit): + release.validate_zip(bad_zip, bmad_spec, "7.0.0", catalog.meta) + + # Bumping method with --only=bmad-method must auto-rebuild plugins/bmad & sync marketplaces + _write_skill( + sources["bmad-code-org/BMAD-METHOD"], + "skills/method", + "bmod-method", + '[bmod]\ncode = "method"\nversion = "7.0.1"\n' + 'update_source = "github:bmad-code-org/BMAD-METHOD/skills/method"\n' + 'skills = ["bmad-build"]\n', + ) + subprocess.run(["git", "add", "-A"], cwd=bmad_dir, check=True) + subprocess.run(["git", "commit", "-q", "-m", "bump method"], cwd=bmad_dir, check=True) + + self.assertEqual( + release.main( + [f"--source=bmad-code-org/BMAD-METHOD={bmad_dir}", "--only=bmad-method"], + repo_root=repo, + ), + 0, ) + self.assertEqual(json.loads((repo / "plugins/method/.claude-plugin/plugin.json").read_text())["version"], "7.0.1") + self.assertEqual(json.loads((repo / "plugins/bmad/.claude-plugin/plugin.json").read_text())["version"], "7.0.1") + self.assertTrue((repo / ".agents/plugins/marketplace.json").is_file()) + self.assertTrue((repo / ".cursor-plugin/marketplace.json").is_file()) + self.assertEqual(release.main(["--validate"], repo_root=repo), 0) + + # Negative CLI flag checks + for bad_argv in ( + ["--validate", "--zip"], + ["--zip-existing", "--only=bmad"], + ["--only=,"], + ["--only=nonexistent"], + ["--source=bmad-code-org/bmad-loop="], + [f"--source=bmad-code-org/bmad-loop={root / 'missing-dir'}"], + ): + with self.assertRaises(SystemExit): + release.main(bad_argv, repo_root=repo) + + # Negative validate_repo checks: junk, stray dir, bad SKILL.md, bmod mismatch, skill overlap + junk = repo / "plugins/bmad/__pycache__/bad.pyc" + _write(junk, "x") + with self.assertRaises(SystemExit): + release.validate_repo(repo) + shutil.rmtree(junk.parent) + + stray = repo / "plugins/stray-plugin" + stray.mkdir() with self.assertRaises(SystemExit): - release.validate_repo(out) - bad_bmod.write_text(original_bmod) + release.validate_repo(repo) + stray.rmdir() - # Introducing an overlapping skill across two marketplace plugins must fail validation. - dup_skill = out / "plugins/founder/skills/bmad-test-core-tools" - _write(dup_skill / "SKILL.md", "---\nname: bmad-test-core-tools\n---\n") - _write(dup_skill / "bmod.toml", '[skill]\nsource = "plugin:bmad-founder"\n') + founder_bmod = repo / "plugins/founder/skills/bmad-founder-agent-advisor/bmod.toml" + orig_fb = founder_bmod.read_text() + founder_bmod.write_text(orig_fb.replace('version = "7.0.0"', 'version = "9.9.9"')) + with self.assertRaises(SystemExit): + release.validate_repo(repo) + founder_bmod.write_text(orig_fb) + + dup_dir = repo / "plugins/founder/skills/bmad" + _write_skill( + repo / "plugins/founder", + "skills", + "bmad", + '[skill]\nbmod = "bmad-founder-agent-advisor"\nsource = "plugin:bmad-founder"\n', + ) with self.assertRaises(SystemExit): - release.validate_repo(out) + release.validate_repo(repo) + shutil.rmtree(dup_dir) if __name__ == "__main__": From f0193f3a402539895312c41d82dc5cf615f3b8fe Mon Sep 17 00:00:00 2001 From: Brian Date: Sun, 29 Nov 2026 03:30:03 -0600 Subject: [PATCH 2/2] docs(license): ship TRADEMARK.md alongside MIT LICENSE in repo, plugins, and zips --- README.md | 2 +- TRADEMARK.md | 55 +++++++++++++++++++++++++++++++++ plugins/bmad-loop/TRADEMARK.md | 55 +++++++++++++++++++++++++++++++++ plugins/bmad/TRADEMARK.md | 55 +++++++++++++++++++++++++++++++++ plugins/core-tools/TRADEMARK.md | 55 +++++++++++++++++++++++++++++++++ plugins/creative/TRADEMARK.md | 55 +++++++++++++++++++++++++++++++++ plugins/founder/TRADEMARK.md | 55 +++++++++++++++++++++++++++++++++ plugins/method/TRADEMARK.md | 55 +++++++++++++++++++++++++++++++++ plugins/tea/TRADEMARK.md | 55 +++++++++++++++++++++++++++++++++ plugins/toolsmith/TRADEMARK.md | 55 +++++++++++++++++++++++++++++++++ release.py | 40 ++++++++++++++++++------ test_release.py | 3 ++ 12 files changed, 530 insertions(+), 10 deletions(-) create mode 100644 TRADEMARK.md create mode 100644 plugins/bmad-loop/TRADEMARK.md create mode 100644 plugins/bmad/TRADEMARK.md create mode 100644 plugins/core-tools/TRADEMARK.md create mode 100644 plugins/creative/TRADEMARK.md create mode 100644 plugins/founder/TRADEMARK.md create mode 100644 plugins/method/TRADEMARK.md create mode 100644 plugins/tea/TRADEMARK.md create mode 100644 plugins/toolsmith/TRADEMARK.md diff --git a/README.md b/README.md index f9cbc12..7f3a94a 100644 --- a/README.md +++ b/README.md @@ -110,4 +110,4 @@ python3 -m unittest -v test_release.py ## License & Trademarks -MIT — see [LICENSE](LICENSE). See the upstream [Trademark Notice](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/TRADEMARK.md) and [Contributors](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CONTRIBUTORS.md) in [BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD). +MIT — see [LICENSE](LICENSE) and [TRADEMARK.md](TRADEMARK.md). See [Contributors](https://github.com/bmad-code-org/BMAD-METHOD/blob/main/CONTRIBUTORS.md) in [BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD). diff --git a/TRADEMARK.md b/TRADEMARK.md new file mode 100644 index 0000000..e6ae578 --- /dev/null +++ b/TRADEMARK.md @@ -0,0 +1,55 @@ +# Trademark Notice & Guidelines + +## Trademark Ownership + +The following names and logos are trademarks of BMad Code, LLC: + +- **BMad** (word mark, all casings: BMad, bmad, BMAD) +- **BMad Method** (word mark, includes BMadMethod, BMAD-METHOD, and all variations) +- **BMad Core** (word mark, includes BMadCore, BMAD-CORE, and all variations) +- **BMad Code** (word mark) +- BMad Method logo and visual branding +- The "Build More, Architect Dreams" tagline + +**All casings, stylings, and variations** of the above names (with or without hyphens, spaces, or specific capitalization) are covered by these trademarks. + +These trademarks are protected under trademark law and are **not** licensed under the MIT License. The MIT License applies to the software code only, not to the BMad brand identity. + +## What This Means + +You may: + +- Use the BMad software under the terms of the MIT License +- Refer to BMad to accurately describe compatibility or integration (e.g., "Compatible with BMad Method v6") +- Link to +- Fork the software and distribute your own version under a different name + +You may **not**: + +- Use "BMad" or any confusingly similar variation as your product name, service name, company name, or domain name +- Present your product as officially endorsed, approved, or certified by BMad Code, LLC when it is not, without written consent from an authorized representative of BMad Code, LLC +- Use BMad logos or branding in a way that suggests your product is an official or endorsed BMad product +- Register domain names, social media handles, or trademarks that incorporate BMad branding + +## Examples + +| Permitted | Not Permitted | +| ------------------------------------------------------ | -------------------------------------------- | +| "My workflow tool, compatible with BMad Method" | "BMadFlow" or "BMad Studio" | +| "An alternative implementation inspired by BMad" | "BMad Pro" or "BMad Enterprise" | +| "My Awesome Healthcare Module (Bmad Community Module)" | "The Official BMad Core Healthcare Module" | +| Accurately stating you use BMad as a dependency | Implying official endorsement or partnership | + +## Commercial Use + +You may sell products that incorporate or work with BMad software. However: + +- Your product must have its own distinct name and branding +- You must not use BMad trademarks in your marketing, domain names, or product identity +- You may truthfully describe technical compatibility (e.g., "Works with BMad Method") + +## Questions? + +If you have questions about trademark usage or would like to discuss official partnership or endorsement opportunities, please reach out: + +- **Email**: diff --git a/plugins/bmad-loop/TRADEMARK.md b/plugins/bmad-loop/TRADEMARK.md new file mode 100644 index 0000000..e6ae578 --- /dev/null +++ b/plugins/bmad-loop/TRADEMARK.md @@ -0,0 +1,55 @@ +# Trademark Notice & Guidelines + +## Trademark Ownership + +The following names and logos are trademarks of BMad Code, LLC: + +- **BMad** (word mark, all casings: BMad, bmad, BMAD) +- **BMad Method** (word mark, includes BMadMethod, BMAD-METHOD, and all variations) +- **BMad Core** (word mark, includes BMadCore, BMAD-CORE, and all variations) +- **BMad Code** (word mark) +- BMad Method logo and visual branding +- The "Build More, Architect Dreams" tagline + +**All casings, stylings, and variations** of the above names (with or without hyphens, spaces, or specific capitalization) are covered by these trademarks. + +These trademarks are protected under trademark law and are **not** licensed under the MIT License. The MIT License applies to the software code only, not to the BMad brand identity. + +## What This Means + +You may: + +- Use the BMad software under the terms of the MIT License +- Refer to BMad to accurately describe compatibility or integration (e.g., "Compatible with BMad Method v6") +- Link to +- Fork the software and distribute your own version under a different name + +You may **not**: + +- Use "BMad" or any confusingly similar variation as your product name, service name, company name, or domain name +- Present your product as officially endorsed, approved, or certified by BMad Code, LLC when it is not, without written consent from an authorized representative of BMad Code, LLC +- Use BMad logos or branding in a way that suggests your product is an official or endorsed BMad product +- Register domain names, social media handles, or trademarks that incorporate BMad branding + +## Examples + +| Permitted | Not Permitted | +| ------------------------------------------------------ | -------------------------------------------- | +| "My workflow tool, compatible with BMad Method" | "BMadFlow" or "BMad Studio" | +| "An alternative implementation inspired by BMad" | "BMad Pro" or "BMad Enterprise" | +| "My Awesome Healthcare Module (Bmad Community Module)" | "The Official BMad Core Healthcare Module" | +| Accurately stating you use BMad as a dependency | Implying official endorsement or partnership | + +## Commercial Use + +You may sell products that incorporate or work with BMad software. However: + +- Your product must have its own distinct name and branding +- You must not use BMad trademarks in your marketing, domain names, or product identity +- You may truthfully describe technical compatibility (e.g., "Works with BMad Method") + +## Questions? + +If you have questions about trademark usage or would like to discuss official partnership or endorsement opportunities, please reach out: + +- **Email**: diff --git a/plugins/bmad/TRADEMARK.md b/plugins/bmad/TRADEMARK.md new file mode 100644 index 0000000..e6ae578 --- /dev/null +++ b/plugins/bmad/TRADEMARK.md @@ -0,0 +1,55 @@ +# Trademark Notice & Guidelines + +## Trademark Ownership + +The following names and logos are trademarks of BMad Code, LLC: + +- **BMad** (word mark, all casings: BMad, bmad, BMAD) +- **BMad Method** (word mark, includes BMadMethod, BMAD-METHOD, and all variations) +- **BMad Core** (word mark, includes BMadCore, BMAD-CORE, and all variations) +- **BMad Code** (word mark) +- BMad Method logo and visual branding +- The "Build More, Architect Dreams" tagline + +**All casings, stylings, and variations** of the above names (with or without hyphens, spaces, or specific capitalization) are covered by these trademarks. + +These trademarks are protected under trademark law and are **not** licensed under the MIT License. The MIT License applies to the software code only, not to the BMad brand identity. + +## What This Means + +You may: + +- Use the BMad software under the terms of the MIT License +- Refer to BMad to accurately describe compatibility or integration (e.g., "Compatible with BMad Method v6") +- Link to +- Fork the software and distribute your own version under a different name + +You may **not**: + +- Use "BMad" or any confusingly similar variation as your product name, service name, company name, or domain name +- Present your product as officially endorsed, approved, or certified by BMad Code, LLC when it is not, without written consent from an authorized representative of BMad Code, LLC +- Use BMad logos or branding in a way that suggests your product is an official or endorsed BMad product +- Register domain names, social media handles, or trademarks that incorporate BMad branding + +## Examples + +| Permitted | Not Permitted | +| ------------------------------------------------------ | -------------------------------------------- | +| "My workflow tool, compatible with BMad Method" | "BMadFlow" or "BMad Studio" | +| "An alternative implementation inspired by BMad" | "BMad Pro" or "BMad Enterprise" | +| "My Awesome Healthcare Module (Bmad Community Module)" | "The Official BMad Core Healthcare Module" | +| Accurately stating you use BMad as a dependency | Implying official endorsement or partnership | + +## Commercial Use + +You may sell products that incorporate or work with BMad software. However: + +- Your product must have its own distinct name and branding +- You must not use BMad trademarks in your marketing, domain names, or product identity +- You may truthfully describe technical compatibility (e.g., "Works with BMad Method") + +## Questions? + +If you have questions about trademark usage or would like to discuss official partnership or endorsement opportunities, please reach out: + +- **Email**: diff --git a/plugins/core-tools/TRADEMARK.md b/plugins/core-tools/TRADEMARK.md new file mode 100644 index 0000000..e6ae578 --- /dev/null +++ b/plugins/core-tools/TRADEMARK.md @@ -0,0 +1,55 @@ +# Trademark Notice & Guidelines + +## Trademark Ownership + +The following names and logos are trademarks of BMad Code, LLC: + +- **BMad** (word mark, all casings: BMad, bmad, BMAD) +- **BMad Method** (word mark, includes BMadMethod, BMAD-METHOD, and all variations) +- **BMad Core** (word mark, includes BMadCore, BMAD-CORE, and all variations) +- **BMad Code** (word mark) +- BMad Method logo and visual branding +- The "Build More, Architect Dreams" tagline + +**All casings, stylings, and variations** of the above names (with or without hyphens, spaces, or specific capitalization) are covered by these trademarks. + +These trademarks are protected under trademark law and are **not** licensed under the MIT License. The MIT License applies to the software code only, not to the BMad brand identity. + +## What This Means + +You may: + +- Use the BMad software under the terms of the MIT License +- Refer to BMad to accurately describe compatibility or integration (e.g., "Compatible with BMad Method v6") +- Link to +- Fork the software and distribute your own version under a different name + +You may **not**: + +- Use "BMad" or any confusingly similar variation as your product name, service name, company name, or domain name +- Present your product as officially endorsed, approved, or certified by BMad Code, LLC when it is not, without written consent from an authorized representative of BMad Code, LLC +- Use BMad logos or branding in a way that suggests your product is an official or endorsed BMad product +- Register domain names, social media handles, or trademarks that incorporate BMad branding + +## Examples + +| Permitted | Not Permitted | +| ------------------------------------------------------ | -------------------------------------------- | +| "My workflow tool, compatible with BMad Method" | "BMadFlow" or "BMad Studio" | +| "An alternative implementation inspired by BMad" | "BMad Pro" or "BMad Enterprise" | +| "My Awesome Healthcare Module (Bmad Community Module)" | "The Official BMad Core Healthcare Module" | +| Accurately stating you use BMad as a dependency | Implying official endorsement or partnership | + +## Commercial Use + +You may sell products that incorporate or work with BMad software. However: + +- Your product must have its own distinct name and branding +- You must not use BMad trademarks in your marketing, domain names, or product identity +- You may truthfully describe technical compatibility (e.g., "Works with BMad Method") + +## Questions? + +If you have questions about trademark usage or would like to discuss official partnership or endorsement opportunities, please reach out: + +- **Email**: diff --git a/plugins/creative/TRADEMARK.md b/plugins/creative/TRADEMARK.md new file mode 100644 index 0000000..e6ae578 --- /dev/null +++ b/plugins/creative/TRADEMARK.md @@ -0,0 +1,55 @@ +# Trademark Notice & Guidelines + +## Trademark Ownership + +The following names and logos are trademarks of BMad Code, LLC: + +- **BMad** (word mark, all casings: BMad, bmad, BMAD) +- **BMad Method** (word mark, includes BMadMethod, BMAD-METHOD, and all variations) +- **BMad Core** (word mark, includes BMadCore, BMAD-CORE, and all variations) +- **BMad Code** (word mark) +- BMad Method logo and visual branding +- The "Build More, Architect Dreams" tagline + +**All casings, stylings, and variations** of the above names (with or without hyphens, spaces, or specific capitalization) are covered by these trademarks. + +These trademarks are protected under trademark law and are **not** licensed under the MIT License. The MIT License applies to the software code only, not to the BMad brand identity. + +## What This Means + +You may: + +- Use the BMad software under the terms of the MIT License +- Refer to BMad to accurately describe compatibility or integration (e.g., "Compatible with BMad Method v6") +- Link to +- Fork the software and distribute your own version under a different name + +You may **not**: + +- Use "BMad" or any confusingly similar variation as your product name, service name, company name, or domain name +- Present your product as officially endorsed, approved, or certified by BMad Code, LLC when it is not, without written consent from an authorized representative of BMad Code, LLC +- Use BMad logos or branding in a way that suggests your product is an official or endorsed BMad product +- Register domain names, social media handles, or trademarks that incorporate BMad branding + +## Examples + +| Permitted | Not Permitted | +| ------------------------------------------------------ | -------------------------------------------- | +| "My workflow tool, compatible with BMad Method" | "BMadFlow" or "BMad Studio" | +| "An alternative implementation inspired by BMad" | "BMad Pro" or "BMad Enterprise" | +| "My Awesome Healthcare Module (Bmad Community Module)" | "The Official BMad Core Healthcare Module" | +| Accurately stating you use BMad as a dependency | Implying official endorsement or partnership | + +## Commercial Use + +You may sell products that incorporate or work with BMad software. However: + +- Your product must have its own distinct name and branding +- You must not use BMad trademarks in your marketing, domain names, or product identity +- You may truthfully describe technical compatibility (e.g., "Works with BMad Method") + +## Questions? + +If you have questions about trademark usage or would like to discuss official partnership or endorsement opportunities, please reach out: + +- **Email**: diff --git a/plugins/founder/TRADEMARK.md b/plugins/founder/TRADEMARK.md new file mode 100644 index 0000000..e6ae578 --- /dev/null +++ b/plugins/founder/TRADEMARK.md @@ -0,0 +1,55 @@ +# Trademark Notice & Guidelines + +## Trademark Ownership + +The following names and logos are trademarks of BMad Code, LLC: + +- **BMad** (word mark, all casings: BMad, bmad, BMAD) +- **BMad Method** (word mark, includes BMadMethod, BMAD-METHOD, and all variations) +- **BMad Core** (word mark, includes BMadCore, BMAD-CORE, and all variations) +- **BMad Code** (word mark) +- BMad Method logo and visual branding +- The "Build More, Architect Dreams" tagline + +**All casings, stylings, and variations** of the above names (with or without hyphens, spaces, or specific capitalization) are covered by these trademarks. + +These trademarks are protected under trademark law and are **not** licensed under the MIT License. The MIT License applies to the software code only, not to the BMad brand identity. + +## What This Means + +You may: + +- Use the BMad software under the terms of the MIT License +- Refer to BMad to accurately describe compatibility or integration (e.g., "Compatible with BMad Method v6") +- Link to +- Fork the software and distribute your own version under a different name + +You may **not**: + +- Use "BMad" or any confusingly similar variation as your product name, service name, company name, or domain name +- Present your product as officially endorsed, approved, or certified by BMad Code, LLC when it is not, without written consent from an authorized representative of BMad Code, LLC +- Use BMad logos or branding in a way that suggests your product is an official or endorsed BMad product +- Register domain names, social media handles, or trademarks that incorporate BMad branding + +## Examples + +| Permitted | Not Permitted | +| ------------------------------------------------------ | -------------------------------------------- | +| "My workflow tool, compatible with BMad Method" | "BMadFlow" or "BMad Studio" | +| "An alternative implementation inspired by BMad" | "BMad Pro" or "BMad Enterprise" | +| "My Awesome Healthcare Module (Bmad Community Module)" | "The Official BMad Core Healthcare Module" | +| Accurately stating you use BMad as a dependency | Implying official endorsement or partnership | + +## Commercial Use + +You may sell products that incorporate or work with BMad software. However: + +- Your product must have its own distinct name and branding +- You must not use BMad trademarks in your marketing, domain names, or product identity +- You may truthfully describe technical compatibility (e.g., "Works with BMad Method") + +## Questions? + +If you have questions about trademark usage or would like to discuss official partnership or endorsement opportunities, please reach out: + +- **Email**: diff --git a/plugins/method/TRADEMARK.md b/plugins/method/TRADEMARK.md new file mode 100644 index 0000000..e6ae578 --- /dev/null +++ b/plugins/method/TRADEMARK.md @@ -0,0 +1,55 @@ +# Trademark Notice & Guidelines + +## Trademark Ownership + +The following names and logos are trademarks of BMad Code, LLC: + +- **BMad** (word mark, all casings: BMad, bmad, BMAD) +- **BMad Method** (word mark, includes BMadMethod, BMAD-METHOD, and all variations) +- **BMad Core** (word mark, includes BMadCore, BMAD-CORE, and all variations) +- **BMad Code** (word mark) +- BMad Method logo and visual branding +- The "Build More, Architect Dreams" tagline + +**All casings, stylings, and variations** of the above names (with or without hyphens, spaces, or specific capitalization) are covered by these trademarks. + +These trademarks are protected under trademark law and are **not** licensed under the MIT License. The MIT License applies to the software code only, not to the BMad brand identity. + +## What This Means + +You may: + +- Use the BMad software under the terms of the MIT License +- Refer to BMad to accurately describe compatibility or integration (e.g., "Compatible with BMad Method v6") +- Link to +- Fork the software and distribute your own version under a different name + +You may **not**: + +- Use "BMad" or any confusingly similar variation as your product name, service name, company name, or domain name +- Present your product as officially endorsed, approved, or certified by BMad Code, LLC when it is not, without written consent from an authorized representative of BMad Code, LLC +- Use BMad logos or branding in a way that suggests your product is an official or endorsed BMad product +- Register domain names, social media handles, or trademarks that incorporate BMad branding + +## Examples + +| Permitted | Not Permitted | +| ------------------------------------------------------ | -------------------------------------------- | +| "My workflow tool, compatible with BMad Method" | "BMadFlow" or "BMad Studio" | +| "An alternative implementation inspired by BMad" | "BMad Pro" or "BMad Enterprise" | +| "My Awesome Healthcare Module (Bmad Community Module)" | "The Official BMad Core Healthcare Module" | +| Accurately stating you use BMad as a dependency | Implying official endorsement or partnership | + +## Commercial Use + +You may sell products that incorporate or work with BMad software. However: + +- Your product must have its own distinct name and branding +- You must not use BMad trademarks in your marketing, domain names, or product identity +- You may truthfully describe technical compatibility (e.g., "Works with BMad Method") + +## Questions? + +If you have questions about trademark usage or would like to discuss official partnership or endorsement opportunities, please reach out: + +- **Email**: diff --git a/plugins/tea/TRADEMARK.md b/plugins/tea/TRADEMARK.md new file mode 100644 index 0000000..e6ae578 --- /dev/null +++ b/plugins/tea/TRADEMARK.md @@ -0,0 +1,55 @@ +# Trademark Notice & Guidelines + +## Trademark Ownership + +The following names and logos are trademarks of BMad Code, LLC: + +- **BMad** (word mark, all casings: BMad, bmad, BMAD) +- **BMad Method** (word mark, includes BMadMethod, BMAD-METHOD, and all variations) +- **BMad Core** (word mark, includes BMadCore, BMAD-CORE, and all variations) +- **BMad Code** (word mark) +- BMad Method logo and visual branding +- The "Build More, Architect Dreams" tagline + +**All casings, stylings, and variations** of the above names (with or without hyphens, spaces, or specific capitalization) are covered by these trademarks. + +These trademarks are protected under trademark law and are **not** licensed under the MIT License. The MIT License applies to the software code only, not to the BMad brand identity. + +## What This Means + +You may: + +- Use the BMad software under the terms of the MIT License +- Refer to BMad to accurately describe compatibility or integration (e.g., "Compatible with BMad Method v6") +- Link to +- Fork the software and distribute your own version under a different name + +You may **not**: + +- Use "BMad" or any confusingly similar variation as your product name, service name, company name, or domain name +- Present your product as officially endorsed, approved, or certified by BMad Code, LLC when it is not, without written consent from an authorized representative of BMad Code, LLC +- Use BMad logos or branding in a way that suggests your product is an official or endorsed BMad product +- Register domain names, social media handles, or trademarks that incorporate BMad branding + +## Examples + +| Permitted | Not Permitted | +| ------------------------------------------------------ | -------------------------------------------- | +| "My workflow tool, compatible with BMad Method" | "BMadFlow" or "BMad Studio" | +| "An alternative implementation inspired by BMad" | "BMad Pro" or "BMad Enterprise" | +| "My Awesome Healthcare Module (Bmad Community Module)" | "The Official BMad Core Healthcare Module" | +| Accurately stating you use BMad as a dependency | Implying official endorsement or partnership | + +## Commercial Use + +You may sell products that incorporate or work with BMad software. However: + +- Your product must have its own distinct name and branding +- You must not use BMad trademarks in your marketing, domain names, or product identity +- You may truthfully describe technical compatibility (e.g., "Works with BMad Method") + +## Questions? + +If you have questions about trademark usage or would like to discuss official partnership or endorsement opportunities, please reach out: + +- **Email**: diff --git a/plugins/toolsmith/TRADEMARK.md b/plugins/toolsmith/TRADEMARK.md new file mode 100644 index 0000000..e6ae578 --- /dev/null +++ b/plugins/toolsmith/TRADEMARK.md @@ -0,0 +1,55 @@ +# Trademark Notice & Guidelines + +## Trademark Ownership + +The following names and logos are trademarks of BMad Code, LLC: + +- **BMad** (word mark, all casings: BMad, bmad, BMAD) +- **BMad Method** (word mark, includes BMadMethod, BMAD-METHOD, and all variations) +- **BMad Core** (word mark, includes BMadCore, BMAD-CORE, and all variations) +- **BMad Code** (word mark) +- BMad Method logo and visual branding +- The "Build More, Architect Dreams" tagline + +**All casings, stylings, and variations** of the above names (with or without hyphens, spaces, or specific capitalization) are covered by these trademarks. + +These trademarks are protected under trademark law and are **not** licensed under the MIT License. The MIT License applies to the software code only, not to the BMad brand identity. + +## What This Means + +You may: + +- Use the BMad software under the terms of the MIT License +- Refer to BMad to accurately describe compatibility or integration (e.g., "Compatible with BMad Method v6") +- Link to +- Fork the software and distribute your own version under a different name + +You may **not**: + +- Use "BMad" or any confusingly similar variation as your product name, service name, company name, or domain name +- Present your product as officially endorsed, approved, or certified by BMad Code, LLC when it is not, without written consent from an authorized representative of BMad Code, LLC +- Use BMad logos or branding in a way that suggests your product is an official or endorsed BMad product +- Register domain names, social media handles, or trademarks that incorporate BMad branding + +## Examples + +| Permitted | Not Permitted | +| ------------------------------------------------------ | -------------------------------------------- | +| "My workflow tool, compatible with BMad Method" | "BMadFlow" or "BMad Studio" | +| "An alternative implementation inspired by BMad" | "BMad Pro" or "BMad Enterprise" | +| "My Awesome Healthcare Module (Bmad Community Module)" | "The Official BMad Core Healthcare Module" | +| Accurately stating you use BMad as a dependency | Implying official endorsement or partnership | + +## Commercial Use + +You may sell products that incorporate or work with BMad software. However: + +- Your product must have its own distinct name and branding +- You must not use BMad trademarks in your marketing, domain names, or product identity +- You may truthfully describe technical compatibility (e.g., "Works with BMad Method") + +## Questions? + +If you have questions about trademark usage or would like to discuss official partnership or endorsement opportunities, please reach out: + +- **Email**: diff --git a/release.py b/release.py index 0d31c70..85dc522 100644 --- a/release.py +++ b/release.py @@ -33,6 +33,7 @@ REPO_ROOT = Path(__file__).resolve().parent CATALOG_REL = Path("catalog.toml") LICENSE_REL = Path("LICENSE") +TRADEMARK_REL = Path("TRADEMARK.md") ICON_REL = Path("assets/icon.png") DIST_REL = Path("dist") @@ -756,10 +757,13 @@ def _stage_plugin( ) -> str: icon_src = repo_root / ICON_REL license_src = repo_root / LICENSE_REL + trademark_src = repo_root / TRADEMARK_REL if not icon_src.is_file(): fail(f"missing {icon_src}") if not license_src.is_file(): fail(f"missing {license_src}") + if not trademark_src.is_file(): + fail(f"missing {trademark_src}") missing_mods = [code for code in spec.modules if code not in all_modules] if missing_mods: @@ -794,6 +798,7 @@ def _stage_plugin( icon_dest.parent.mkdir(parents=True, exist_ok=True) shutil.copy2(icon_src, icon_dest) shutil.copy2(license_src, dest_dir / LICENSE_REL) + shutil.copy2(trademark_src, dest_dir / TRADEMARK_REL) _write_plugin_manifests(dest_dir, spec, version, copied_names, meta) sources_str = ", ".join(dict.fromkeys(mod.source_slug for mod in discovered)) @@ -868,8 +873,11 @@ def export_codex_zip( """Export a deterministic rootless `.zip` for OpenAI Plugin Portal and Codex uploads.""" plugin_root = repo_root / "plugins" / spec.dir_name license_file = repo_root / LICENSE_REL + trademark_file = repo_root / TRADEMARK_REL if not license_file.is_file(): fail(f"missing {license_file}") + if not trademark_file.is_file(): + fail(f"missing {trademark_file}") if not plugin_root.is_dir(): fail(f"missing plugin directory {plugin_root}") @@ -891,12 +899,17 @@ def export_codex_zip( _zip_writestr(zf, ROOT_PLUGIN_REL.as_posix(), (json.dumps(root_manifest, indent=2, ensure_ascii=False) + "\n").encode("utf-8")) _zip_writestr(zf, "README.md", neutral_readme) _zip_writestr(zf, "LICENSE", license_file.read_bytes()) + _zip_writestr(zf, TRADEMARK_REL.as_posix(), trademark_file.read_bytes()) for file_path in sorted(plugin_root.rglob("*")): if not file_path.is_file(): continue rel = file_path.relative_to(plugin_root) - if not rel.parts or rel.parts[0] in ZIP_EXCLUDE_TOP_DIRS or rel.as_posix() in {"README.md", "LICENSE", ROOT_PLUGIN_REL.as_posix()}: + if ( + not rel.parts + or rel.parts[0] in ZIP_EXCLUDE_TOP_DIRS + or rel.as_posix() in {"README.md", "LICENSE", TRADEMARK_REL.as_posix(), ROOT_PLUGIN_REL.as_posix()} + ): continue if is_ignored_relpath(rel): continue @@ -938,7 +951,14 @@ def validate_zip(zip_path: Path, spec: PluginSpec, version: str, meta: dict[str, if len(names) != len(set(names)): fail(f"{zip_path}: contains duplicate zip entries") name_set = set(names) - for req in (ROOT_PLUGIN_REL.as_posix(), CODEX_PLUGIN_REL.as_posix(), ICON_REL.as_posix(), "README.md", "LICENSE"): + for req in ( + ROOT_PLUGIN_REL.as_posix(), + CODEX_PLUGIN_REL.as_posix(), + ICON_REL.as_posix(), + "README.md", + "LICENSE", + TRADEMARK_REL.as_posix(), + ): if req not in name_set: fail(f"{zip_path}: missing {req}") for entry in names: @@ -1149,6 +1169,8 @@ def validate_repo(repo_root: Path, catalog: Catalog | None = None) -> None: cat = catalog or load_catalog(repo_root / CATALOG_REL) if not (repo_root / LICENSE_REL).is_file(): fail(f"missing {repo_root / LICENSE_REL}") + if not (repo_root / TRADEMARK_REL).is_file(): + fail(f"missing {repo_root / TRADEMARK_REL}") if not (repo_root / ICON_REL).is_file(): fail(f"missing {repo_root / ICON_REL}") @@ -1168,7 +1190,7 @@ def validate_repo(repo_root: Path, catalog: Catalog | None = None) -> None: for spec in cat.all_specs: plugin_root = plugins_dir / spec.dir_name - for req in ("README.md", LICENSE_REL.as_posix(), ICON_REL.as_posix()): + for req in ("README.md", LICENSE_REL.as_posix(), TRADEMARK_REL.as_posix(), ICON_REL.as_posix()): if not (plugin_root / req).is_file(): fail(f"plugins/{spec.dir_name}: missing {req}") @@ -1383,12 +1405,12 @@ def main(argv: list[str] | None = None, *, repo_root: Path | None = None) -> int # Assemble complete target tree inside temporary staging dir and validate BEFORE mutating repo_root. target_view = stage_root / "repo" target_view.mkdir() - shutil.copy2(root / CATALOG_REL, target_view / CATALOG_REL) - shutil.copy2(root / LICENSE_REL, target_view / LICENSE_REL) - (target_view / "assets").mkdir() - if not (root / ICON_REL).is_file(): - fail(f"missing {root / ICON_REL}") - shutil.copy2(root / ICON_REL, target_view / ICON_REL) + for req_rel in (CATALOG_REL, LICENSE_REL, TRADEMARK_REL, ICON_REL): + if not (root / req_rel).is_file(): + fail(f"missing {root / req_rel}") + dest_file = target_view / req_rel + dest_file.parent.mkdir(parents=True, exist_ok=True) + shutil.copy2(root / req_rel, dest_file) selected_names = {spec.name for spec in selected} all_versions: dict[str, str] = {} diff --git a/test_release.py b/test_release.py index ae7f76a..2c5892b 100644 --- a/test_release.py +++ b/test_release.py @@ -146,6 +146,7 @@ def _init_plugins_repo(root: Path) -> Path: repo.mkdir(parents=True) shutil.copy2(REPO_ROOT / "catalog.toml", repo / "catalog.toml") shutil.copy2(REPO_ROOT / "LICENSE", repo / "LICENSE") + shutil.copy2(REPO_ROOT / "TRADEMARK.md", repo / "TRADEMARK.md") (repo / "assets").mkdir() shutil.copy2(REPO_ROOT / "assets/icon.png", repo / "assets/icon.png") return repo @@ -329,6 +330,7 @@ def test_full_cli_only_bundle_sync_zip_schema_and_negative_checks(self) -> None: # Verify closed Agent Plugins 1.0 schema (no "skills"), composerIcon, neutral README bmad_dir_out = repo / "plugins/bmad" + self.assertTrue((bmad_dir_out / "TRADEMARK.md").is_file()) codex_m = json.loads((bmad_dir_out / ".codex-plugin/plugin.json").read_text()) self.assertEqual(codex_m["interface"]["composerIcon"], "./assets/icon.png") self.assertLessEqual(len(codex_m["interface"]["shortDescription"]), 30) @@ -337,6 +339,7 @@ def test_full_cli_only_bundle_sync_zip_schema_and_negative_checks(self) -> None: with zipfile.ZipFile(zip_path) as zf: names = zf.namelist() self.assertIn("plugin.json", names) + self.assertIn("TRADEMARK.md", names) self.assertEqual(zf.getinfo("plugin.json").date_time, release.ZIP_FIXED_DT) root_json = json.loads(zf.read("plugin.json").decode("utf-8")) self.assertEqual(set(root_json), release.AGENT_PLUGINS_ROOT_KEYS)