diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 8f62fb5..c338168 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -7,8 +7,12 @@ "plugins": [ { "name": "doc-tools", - "source": "./", - "description": "Diataxis and ASD-STE100 documentation skill" + "source": "./skills", + "strict": false, + "skills": ["./documentation"], + "description": "Diataxis and ASD-STE100 documentation skill", + "license": "MIT", + "repository": "https://github.com/OpenRAE/doc-tools" } ] } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json deleted file mode 100644 index e68ea2d..0000000 --- a/.claude-plugin/plugin.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "doc-tools", - "description": "Diataxis and ASD-STE100 documentation skill", - "license": "MIT", - "repository": "https://github.com/OpenRAE/doc-tools" -} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2db4b52..2a041de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -91,7 +91,7 @@ jobs: fetch-depth: 0 persist-credentials: false - name: SonarCloud scan - uses: SonarSource/sonarqube-scan-action@4d1dc0c91ee400dcf8a6dddf2f705ac36542e304 # v8.4.0 + uses: SonarSource/sonarqube-scan-action@e805d875275f728fac1885b413934be6d7c63f65 # v8.4.1 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} with: diff --git a/.github/workflows/ground-control-phase-e.yml b/.github/workflows/ground-control-phase-e.yml index 748c8e8..c1ac6cd 100644 --- a/.github/workflows/ground-control-phase-e.yml +++ b/.github/workflows/ground-control-phase-e.yml @@ -57,7 +57,7 @@ jobs: ref: ${{ github.event.pull_request.merge_commit_sha || github.sha }} fetch-depth: 0 persist-credentials: false - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 22 - name: Finalize the merged delivery diff --git a/.github/workflows/pr-title-lint.yml b/.github/workflows/pr-title-lint.yml index c1c1120..0690dd0 100644 --- a/.github/workflows/pr-title-lint.yml +++ b/.github/workflows/pr-title-lint.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Validate conventional-commit title # amannn/action-semantic-pull-request v5.5.3 - uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 + uses: amannn/action-semantic-pull-request@2252a14e810aa9b85c2d560bd7070c802206ecf6 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 52cae22..0aa82a1 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -37,6 +37,6 @@ jobs: retention-days: 7 - name: Upload SARIF to code scanning - uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 + uses: github/codeql-action/upload-sarif@33d7b85da1a04171e211befe2c739303b9a4c066 # v4.39.3 with: sarif_file: results.sarif diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 702d76f..f659a1e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,7 +22,7 @@ repos: - id: gitleaks - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.15.18 + rev: v0.17.3 hooks: - id: ruff - id: ruff-format diff --git a/README.md b/README.md index 7c1f9e6..0608044 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,8 @@ bash tools/ste-lint.sh docs/how-to-install.md Install the skill in Claude Code: ```text -/plugin install doc-tools --marketplace OpenRAE/doc-tools +/plugin marketplace add OpenRAE/doc-tools#v0.1.1 +/plugin install doc-tools@openrae-doc-tools ``` ## Documentation diff --git a/docs/how-to-install.md b/docs/how-to-install.md index 1ef86f6..21e1eb7 100644 --- a/docs/how-to-install.md +++ b/docs/how-to-install.md @@ -17,7 +17,7 @@ Do not copy the package files into the consumer repository. 4. Download and verify the archive with the recorded values: ```shell - VERSION=0.1.0 + VERSION=0.1.1 SHA256= ARCHIVE="doc-tools-${VERSION}.tar.gz" curl --proto '=https' --fail --silent --show-error --location -o "$ARCHIVE" \ @@ -49,7 +49,7 @@ A checksum mismatch stops the installation and the check. 1. Add the release `DocTools.zip` URL to `Packages` in `.vale.ini`: ```ini - Packages = https://github.com/OpenRAE/doc-tools/releases/download/v0.1.0/DocTools.zip + Packages = https://github.com/OpenRAE/doc-tools/releases/download/v0.1.1/DocTools.zip ``` 2. Add `DocTools` to `BasedOnStyles`. @@ -69,24 +69,32 @@ Two skills with the same name can both show. Add the marketplace at a release tag, then install the plugin: ```text -/plugin marketplace add OpenRAE/doc-tools#v0.1.0 +/plugin marketplace add OpenRAE/doc-tools#v0.1.1 /plugin install doc-tools@openrae-doc-tools ``` -To share the marketplace with a repository team, run this command in the repository. -Then commit the `.claude/settings.json` file that it writes: +To share the plugin with a repository team, run these commands in the repository: ```shell -claude plugin marketplace add OpenRAE/doc-tools#v0.1.0 --scope project +claude plugin marketplace add OpenRAE/doc-tools#v0.1.1 --scope project +claude plugin install doc-tools@openrae-doc-tools --scope project ``` +The first command adds the marketplace to `.claude/settings.json`. +The second command enables the plugin in the same file. +Commit `.claude/settings.json`. +Each team member runs the same two commands in a clone to download the plugin. + +The plugin contains only the `documentation` skill. +It adds no MCP server, hook, agent, or LSP server. + ### Codex Run the script of the preinstalled `skill-installer` skill with the repository, path, and release tag: ```shell python3 "${CODEX_HOME:-$HOME/.codex}/skills/.system/skill-installer/scripts/install-skill-from-github.py" \ - --repo OpenRAE/doc-tools --path skills/documentation --ref v0.1.0 + --repo OpenRAE/doc-tools --path skills/documentation --ref v0.1.1 ``` You can also give the same repository, path, and tag to `$skill-installer` in a Codex session. diff --git a/docs/reference.md b/docs/reference.md index b0dd83d..e8fb0cf 100644 --- a/docs/reference.md +++ b/docs/reference.md @@ -9,7 +9,7 @@ | `.ste.yml` | ste-cli configuration. | | `vale/DocTools/` | Vale style rules. The release asset `DocTools.zip` contains this directory. | | `skills/documentation/` | Agent skill and its license notice. | -| `.claude-plugin/` | Claude Code marketplace `openrae-doc-tools` and plugin `doc-tools`. | +| `.claude-plugin/marketplace.json` | Claude Code marketplace `openrae-doc-tools`. Its plugin `doc-tools` uses `skills/` as the plugin root and contains only the `documentation` skill. | | `tests/` | Behavior tests for the checks, the style, and the package layout. | ## `tools/ste-lint.sh` diff --git a/tests/test_package.py b/tests/test_package.py index fd1751e..c133013 100644 --- a/tests/test_package.py +++ b/tests/test_package.py @@ -37,16 +37,19 @@ def test_skill_has_client_frontmatter_and_license() -> None: assert "Tudor Andrei Dumitrascu" in notice -def test_claude_marketplace_lists_the_root_plugin() -> None: +def test_claude_plugin_contains_only_the_skill() -> None: marketplace = json.loads((ROOT / ".claude-plugin/marketplace.json").read_text()) - plugin = json.loads((ROOT / ".claude-plugin/plugin.json").read_text()) assert marketplace["owner"]["name"] [entry] = marketplace["plugins"] - assert entry["name"] == plugin["name"] - assert entry["source"] == "./" + assert entry["name"] == "doc-tools" + # The plugin root must not be the repository root: Claude Code loads the root .mcp.json as a plugin server. + assert entry["source"] == "./skills" + assert entry["strict"] is False + assert entry["skills"] == ["./documentation"] assert "version" not in entry - assert "version" not in plugin - assert (ROOT / "skills" / "documentation" / "SKILL.md").is_file() + assert not (ROOT / ".claude-plugin/plugin.json").exists() + assert sorted(path.name for path in (ROOT / "skills").iterdir()) == ["documentation"] + assert sorted(path.name for path in SKILL.iterdir()) == ["LICENSE", "SKILL.md"] def test_vale_style_rules_are_portable() -> None: