Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .claude/ecosystems/bash.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Shell in this repository. Contract and schema:
# https://github.com/melodic-software/claude-code-plugins/tree/main/docs/contracts/ecosystem-commands
Comment thread
kyle-sexton marked this conversation as resolved.
Resolved
# shellcheck with the root .shellcheckrc and no severity filter, as CI's
# shellcheck lane runs it (.github/workflows/pr-require-checks.yml:294-307 calls
# the ci-workflows shellcheck composite @594987a, whose run.sh passes
# --rcfile and leaves --severity unset). Commands run from the repository root.
enabled: true
globs: ["*.sh", "*.bash"]
project-discovery: []
build-cmd: null
test-cmd: null
check-cmd: 'shellcheck --rcfile="$REPO_ROOT/.shellcheckrc" <files>'
fix-cmd: "shfmt -w <files>"
code-fix-cmd: null
opt-in: "shellcheck always applies to shell files"
install-hint: "winget install ShellCheck.ShellCheck mvdan.shfmt | brew install shellcheck shfmt"
tool-pin:
shellcheck: "0.11.0"
gates: []
notes: "CI runs no shell tests: .cursor/install-prefix.test.sh exists but no CI lane or hook runs it, so test-cmd is null. No CI lane runs shfmt; fix-cmd follows the shfmt style .editorconfig declares for shell files and can reformat lines beyond the change. Shell embedded in workflow run: blocks is linted by actionlint (yaml.yaml), not here."
40 changes: 40 additions & 0 deletions .claude/ecosystems/cross-cutting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Repository-wide text checks in this repository. Contract and schema:
# https://github.com/melodic-software/claude-code-plugins/tree/main/docs/contracts/ecosystem-commands
# Lint-only: /toolchain:lint runs it, /toolchain:check does not. CI's typos,
# editorconfig-checker, gitleaks and check-links lanes
# (.github/workflows/pr-require-checks.yml:104-196), each with its root config
# as the ci-workflows composites @594987a pass it. typos checks "." and then the
# hidden tracked files by name, as the typos lane's second step does (:118-141).
# lychee gets CI's three globs (:193-196). Every check runs and any failure
# fails the command, as CI's ci-status gate fails on any lane. Commands run
# from the repository root.
enabled: true
globs: ["**"]
project-discovery: []
build-cmd: null
test-cmd: null
check-cmd: |
rc=0
typos --config _typos.toml . || rc=1
git ls-files | grep '^\.' | while IFS= read -r p; do if [ -f "$p" ]; then printf '%s\n' "$p"; fi; done | xargs typos --config _typos.toml || rc=1
gitleaks dir . --config .gitleaks.toml --no-banner --redact || rc=1
# editorconfig-checker: binary name varies by install method (ec / editorconfig-checker / ec-windows-amd64)
if [ -n "$EC_BIN" ]; then "$EC_BIN" -config .editorconfig-checker.json || rc=1; else echo 'editorconfig-checker: no binary resolved (EC_BIN is empty)' >&2; rc=1; fi
# lychee-offline: on-disk link and anchor integrity, no network
lychee --offline --no-progress --config lychee.toml '**/*.md' '.claude/**/*.md' '.github/**/*.md' || rc=1
test "$rc" -eq 0
fix-cmd: null
code-fix-cmd: null
opt-in: "each tool's own config at the repository root (_typos.toml, .gitleaks.toml, .editorconfig-checker.json, lychee.toml)"
install-hint: |
typos: winget install Crate-CI.Typos | brew install typos-cli
gitleaks: winget install Gitleaks.Gitleaks | brew install gitleaks
editorconfig-checker: winget install EditorConfig-Checker.EditorConfig-Checker | brew install editorconfig-checker
lychee: winget install lycheeverse.lychee | brew install lychee
tool-pin:
typos: "1.50.3"
gitleaks: "8.30.1"
editorconfig-checker: "4.0.2"
lychee: "0.24.2"
gates: []
notes: "Lint-only: owned by /toolchain:lint. Pins are the composite defaults at 594987a (actions/typos/action.yml:46, actions/gitleaks/action.yml:50 with scan.sh:136 for the dir-mode flags, actions/editorconfig-checker/action.yml:35, actions/lychee-offline/action.yml:19). .cursor/install.sh pins older versions of typos, editorconfig-checker and check-jsonschema; these pins follow CI. CI's check-line-endings lane (pr-require-checks.yml:309-320) re-stages the whole index with git add --renormalize, so it has no read-only local command here; bash .cursor/check.sh runs a safe copy of it."
21 changes: 21 additions & 0 deletions .claude/ecosystems/markdown.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Markdown in this repository. Contract and schema:
# https://github.com/melodic-software/claude-code-plugins/tree/main/docs/contracts/ecosystem-commands
# markdownlint-cli2 with the root config, as CI's markdownlint lane runs it
# (.github/workflows/pr-require-checks.yml:89-102 calls the ci-workflows
# markdownlint composite @594987a, which runs markdownlint-cli2 0.23.2 with
# --config .markdownlint-cli2.jsonc). Run from PATH; no command here installs
# anything. Commands run from the repository root.
enabled: true
globs: ["*.md"]
project-discovery: []
build-cmd: null
test-cmd: null
check-cmd: 'markdownlint-cli2 --config "$REPO_ROOT/.markdownlint-cli2.jsonc" <files>'
fix-cmd: 'markdownlint-cli2 --config "$REPO_ROOT/.markdownlint-cli2.jsonc" --fix <files>'
code-fix-cmd: null
opt-in: ".markdownlint-cli2.jsonc at the repository root"
install-hint: "npm i -g markdownlint-cli2@0.23.2 (the version CI runs) puts it on PATH"
tool-pin:
markdownlint-cli2: "0.23.2"
gates: []
notes: "CI runs npx --yes markdownlint-cli2@0.23.2 over every **/*.md; this record runs the PATH binary over the changed files only, so it never downloads."
18 changes: 18 additions & 0 deletions .claude/ecosystems/typescript.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# JavaScript in this repository: the two drift checkers under .github/scripts/,
# plain Node ES modules with node:test suites. Contract and schema:
# https://github.com/melodic-software/claude-code-plugins/tree/main/docs/contracts/ecosystem-commands
# The test calls CI makes (.github/workflows/pr-require-checks.yml:340 and :362,
# "Test the drift checker"). No package.json, tsconfig or linter config is
# tracked and CI lints no JavaScript, so there is no build or check command.
# Commands run from the repository root.
enabled: true
globs: ["*.mjs", "*.js"]
project-discovery: []
build-cmd: null
test-cmd: "node --test .github/scripts/pr-section-drift.test.mjs .github/scripts/issue-form-drift.test.mjs"
check-cmd: null
fix-cmd: null
code-fix-cmd: null
install-hint: "Node.js 24 (node --test is built in); no npm install is needed"
gates: []
notes: "CI runs each test file in its own lane and both lanes are advisory, outside ci-status needs:; one call here runs both. CI's node is the ubuntu-latest image's, which this repository does not pin, so the record sets no tool-pin."
35 changes: 35 additions & 0 deletions .claude/ecosystems/yaml.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# GitHub workflow, issue-form, Dependabot and Claude settings files in this
# repository. Contract and schema:
# https://github.com/melodic-software/claude-code-plugins/tree/main/docs/contracts/ecosystem-commands
# Lint-only: /toolchain:lint runs it, /toolchain:check does not. CI's actionlint
# lane (.github/workflows/pr-require-checks.yml:198-209; actionlint auto-discovers
# the workflows) and its jsonschema lane (:211-285), each check-jsonschema call
# with the builtin schema or schemafile CI passes. Issue forms are every
# .github/ISSUE_TEMPLATE/*.yml or *.yaml except config.yml, the roster CI derives
# (:238-265). Every check runs and any failure fails the command, as CI's
# ci-status gate fails on any lane. Commands run from the repository root.
enabled: true
globs: [".github/**/*.yml", ".github/**/*.yaml", ".claude/settings.json"]
project-discovery: []
build-cmd: null
test-cmd: null
check-cmd: |
rc=0
actionlint || rc=1
check-jsonschema --builtin-schema vendor.dependabot .github/dependabot.yml || rc=1
check-jsonschema --builtin-schema vendor.github-workflows $(git ls-files '.github/workflows/*.yml') || rc=1
check-jsonschema --builtin-schema vendor.github-issue-forms $(git ls-files '.github/ISSUE_TEMPLATE/*.yml' '.github/ISSUE_TEMPLATE/*.yaml' | grep -v '/config\.yml$') || rc=1
check-jsonschema --builtin-schema vendor.github-issue-config .github/ISSUE_TEMPLATE/config.yml || rc=1
check-jsonschema --schemafile https://json.schemastore.org/claude-code-settings.json .claude/settings.json || rc=1
test "$rc" -eq 0
fix-cmd: null
code-fix-cmd: null
opt-in: "GitHub Actions workflows present"
install-hint: |
actionlint: rhysd/actionlint 1.7.12 from https://github.com/rhysd/actionlint/releases (the release CI's actionlint composite installs)
check-jsonschema: uv tool install check-jsonschema==0.38.2
tool-pin:
actionlint: "1.7.12"
check-jsonschema: "0.38.2"
gates: []
notes: "Lint-only: owned by /toolchain:lint. Pins are the ci-workflows composite defaults at the SHA CI calls, 594987a (actions/actionlint/action.yml:20, actions/check-jsonschema/action.yml:39). The Claude settings check fetches its schema from json.schemastore.org, as CI does, so it needs the network. CI also runs two advisory drift lanes, check-pr-sections and check-issue-forms (pr-require-checks.yml:329-364); their tests are typescript.yaml's test-cmd, and their comparison scripts are not run here because CI does not gate on them."
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ link lane for the same reason.
`.claude/rules/pr-body-contract.md`, synced from `standards`, states the
pull-request body contract; `.claude/ai-slop.json` configures the AI-writing
audit for this repository.
`.claude/ecosystems/*.yaml` (bash, markdown, yaml, typescript, cross-cutting)
are owned here: each replaces the toolchain plugin's bundled build, test and
lint commands for its ecosystem with the ones
`.github/workflows/pr-require-checks.yml` runs.
`CLAUDE.md` is the agent-loaded entry point: it routes to this file rather
than restating it, and carries only what no other file states.
`AGENTS.md` holds the `## Code Review Rules` section the Codex pull-request
Expand Down
Loading