Skip to content

chore: add ecosystem records that follow CI's build, test and lint commands - #572

Merged
kyle-sexton merged 1 commit into
mainfrom
chore/ecosystem-records-15722
Nov 16, 2026
Merged

kyle-sexton merged 1 commit into
mainfrom
chore/ecosystem-records-15722

Conversation

@kyle-sexton

Copy link
Copy Markdown
Member

Refs: melodic-software/claude-code-plugins#15722

Summary

This repository now resolves its build, test and lint commands from its own ecosystem records, one schema-valid file per ecosystem it uses: .claude/ecosystems/{go,bash,powershell,javascript,markdown,yaml,cross-cutting}.yaml. Each command, flag and pinned version follows what .github/workflows/pr-require-checks.yml runs, including the ci-workflows composites it pins (944d346, v0.74.0) and the reusables it calls at main (pr-run-checks-go.yml and pr-audit-workflows.yml, read at ci-workflows cd84496). javascript is a new id: no bundled default matches *.cjs, and CI runs node --test .github/scripts/*.test.cjs. No record exists for dotnet, python or typescript: no tracked file matches their bundled globs.

Fix

Each intended difference from toolchain's bundled defaults (plugins/toolchain/reference/ecosystems/ in claude-code-plugins), with the CI source that sets it:

Ecosystem Difference from the bundled default Rule source
go build-cmd is CI's Windows cross-compile of the two commands, -ldflags=-H=windowsgui on the controller, linked to /dev/null (bundled go build ./...) pr-require-checks.yml:331-353 (build-go-windows; CI writes to /tmp)
go test-cmd go test -race -count=1 -timeout=10m ./... (bundled go test ./...) pr-run-checks-go.yml@main:170
go check-cmd runs golangci-lint config verify --config .golangci.yml, then run --config .golangci.yml --timeout=10m --max-issues-per-linter=0 --max-same-issues=0 ./..., then gofmt -l over tracked *.go, failing on any output (bundled golangci-lint run ./...); --issues-exit-code=42 is dropped, since any non-zero exit fails here; pin golangci-lint 2.14.0 pr-run-checks-go.yml@main:33, :111-115, :129-133; pr-require-checks.yml:329
go gates: go-mod-tidy-drift runs env GOWORK=off go mod tidy -diff (bundled without GOWORK=off); go-mod-verify added pr-run-checks-go.yml@main:151, :165
bash check-cmd is shellcheck --rcfile="$REPO_ROOT/.shellcheckrc" <files> and shfmt -d <files>, both run, either failure fails (bundled shellcheck -x -S warning <files> && shfmt -d <files>); pins shellcheck 0.11.0, shfmt 3.14.1 pr-require-checks.yml:95-121; shellcheck composite run.sh:172-175 (--rcfile, --severity only when set), action.yml:66; shfmt action.yml:22
bash test-cmd is CI's node step, because verify-existing-release.test.cjs runs .github/scripts/verify-existing-release.sh (bundled null) pr-require-checks.yml:317
powershell test-cmd is the whole test-policy-contracts job: the node suites (which drive the scripts/*.ps1 files through pwsh), then scripts/Test-ReleasePins.ps1 (bundled null); pin node 26.13.0 pr-require-checks.yml:296-320
powershell check-cmd null (bundled Invoke-ScriptAnalyzer -Path . -Recurse, which exits 0 on findings): CI runs no PowerShell linter and the repository's hooks run none pr-require-checks.yml (no such lane); lefthook.yml uses only the guardrails remote config
javascript new record: globs *.cjs, test-cmd node --test "$REPO_ROOT"/.github/scripts/*.test.cjs, check-cmd null; pin node 26.13.0 pr-require-checks.yml:309-317
markdown check-cmd/fix-cmd call markdownlint-cli2 --config "$REPO_ROOT/.markdownlint-cli2.jsonc" <files> from PATH (bundled npx markdownlint-cli2 <files>); pin 0.23.3 markdownlint composite action.yml:24 and its npx --yes "markdownlint-cli2@$VERSION" --config "$CONFIG" line (:57); pr-require-checks.yml:93
yaml check-cmd is actionlint, check-jsonschema --builtin-schema vendor.dependabot .github/dependabot.yml, check-jsonschema --builtin-schema vendor.github-workflows .github/workflows/*.yml and zizmor --persona=regular --strict-collection --offline ., each run, any failure fails (bundled: actionlint plus two comment lines); pins actionlint 1.17.0 (kjanat fork), check-jsonschema 0.38.2, zizmor 1.30.0 pr-require-checks.yml:197-229, :280-294; actionlint action.yml:25; check-jsonschema action.yml:39; pr-audit-workflows.yml@main:125 (PINNED_VERSION), :222-231 (args), :281-304 (fail-on-severity: low blocks on any exit of 11 or above)
cross-cutting typos --config _typos.toml ., gitleaks dir . --config .gitleaks.toml --no-banner --redact (bundled gitleaks detect --no-git), "$EC_BIN" -config .editorconfig-checker.json, lychee --offline --no-progress --config lychee.toml "**/*.md", each run, any failure fails; pins typos 1.50.3, gitleaks 8.30.1, editorconfig-checker 4.0.2, lychee 0.24.2 pr-require-checks.yml:123-182; typos action.yml:46, :104; gitleaks action.yml:52, scan.sh:113, :136; editorconfig-checker action.yml:35, :90; lychee-offline action.yml:22, run.sh:33
all seven Every key set explicitly (enabled, project-discovery, gates, null for absent commands); every value on one line, because the code-metrics plugin's YAML subset rejects block scalars plugins/code-metrics/scripts/yaml_subset.py in claude-code-plugins (first draft failed it: "block scalars (| and >) are outside the subset")

Where a record differs from CI on purpose:

  • zizmor runs with --offline, narrower than CI's online audits with a GitHub token, so a local run spends no GitHub API calls. It keeps zizmor's exit codes, so a finding fails locally as it does in CI.
  • markdownlint calls the installed binary on the changed files; CI runs npx --yes [email protected] over **/*.md.
  • go build-cmd links to /dev/null instead of /tmp/*.exe.
  • CI lanes with no local record: check-windows (Windows runner), govulncheck 1.7.0, fuzz-go (scheduled), build-worker-image and scripts/verify-worker-image.sh (need a Docker daemon), check-comment-markers, check-exec-bit, check-machine-paths, check-line-endings and dependency review. The go, bash and cross-cutting notes name them.

Verification

Range. f04e5d8ea0d2f04452c36482c3295988bf4cb1a5 (base, excluded) to 4a7a83dfe757f91883804d3de064edc6903d588a (head, this branch's base): 34 first-parent commits from #533 to #571 (base f04e5d8 is #531), 2026-11-08 to 2026-11-16, 48 files. It is the smallest first-parent window ending at main that touches every ecosystem the repository has: .go and go.mod, scripts/verify-worker-image.sh (#533, the only shell change since #531), four scripts/*.ps1, 11 markdown files, nine .github YAML files, four .github/scripts/*.test.cjs.

Method. A throwaway git clone --shared of this branch's worktree, on a branch at 4a7a83d with refs/remotes/origin/main and origin/HEAD set to f04e5d8, so the skills' branch-diff detection yields exactly the range (48 files each run). Every command ran as env -C <clone> <command>. For the record runs the records were copied in and hidden from git status through the clone's .git/info/exclude; diff -r against this branch's records printed nothing. toolchain 1.4.0 (installed). Load average before run 1: 11.05 on 24 CPUs.

Run Skill Records Start End Overall
1 /toolchain:check all bundled defaults 11:29 PM EST 11:30 PM EST FAIL (1 of 4 ecosystems failed, 1 gate passed; go: Lint FAIL (golangci-lint 2.15.0, 3 errcheck))
2 /toolchain:lint bundled defaults 11:30 PM EST 11:31 PM EST FAIL (1 of 6 ecosystems failed; go: Lint FAIL (golangci-lint 2.15.0, 3 errcheck))
3 /toolchain:check all this branch 11:34 PM EST 11:37 PM EST FAIL (1 of 5 ecosystems failed, 2 gates passed; go: Lint FAIL (golangci-lint 2.15.0 on PATH, pin 2.14.0: 6 errcheck))
4 /toolchain:lint this branch 11:37 PM EST 11:38 PM EST FAIL (1 of 7 ecosystems failed; go: Lint FAIL (golangci-lint 2.15.0 on PATH, pin 2.14.0: 6 errcheck))

No run printed a skip (unresolved cell (toolchain 1.4.0 has no such cell; it is the state the records prevent once bundled defaults stop resolving).

The go Lint FAIL is this machine's golangci-lint, not the record. This host has golangci-lint 2.15.0; the record pins CI's 2.14.0. The errcheck findings are in internal/controller/*_test.go files that CI's 2.14.0 run with the same flags passed on the same head: PR Run Checks Go / Check Linux. Run 3 reports 6 findings where run 1 reports 3 because the record passes CI's --max-same-issues=0. Per the owner's rule the record keeps CI's version.

Baseline command lists (bundled defaults).

# run 1, /toolchain:check all
go build ./...                                             # pass
go test ./...                                              # pass
golangci-lint run ./...                                    # FAIL, 3 errcheck (2.15.0)
gate go-mod-tidy-drift: go mod tidy -diff                  # pass
shellcheck -x -S warning scripts/verify-worker-image.sh    # pass
shfmt -d scripts/verify-worker-image.sh                    # pass
pwsh -NoProfile -Command 'Invoke-ScriptAnalyzer -Path . -Recurse'   # exit 0 with 33 Warning/Information findings
npx markdownlint-cli2 <11 md>                              # 0 issues (resolved 0.24.0 from PATH, no download)
dotnet, python, typescript: no project -> nothing ran
Outside every ecosystem: the four .github/scripts/*.test.cjs plus 13 other files

# run 2, /toolchain:lint: the go, bash, powershell and markdown lines above, plus
actionlint                                                 # pass
typos; gitleaks detect --source . --redact --no-banner --no-git; "$EC_BIN"; lychee --offline --no-progress './**/*.md'   # clean; 208 links, 0 errors

Record command lists (runs 3 and 4).

# run 3, /toolchain:check all
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -trimpath -o /dev/null ./cmd/ci-runner && ... -ldflags=-H=windowsgui -o /dev/null ./cmd/ci-runner-controller   # pass
go test -race -count=1 -timeout=10m ./...                  # pass
golangci-lint config verify ...; golangci-lint run --config .golangci.yml --timeout=10m --max-issues-per-linter=0 --max-same-issues=0 ./...; gofmt -l   # FAIL, 6 errcheck (2.15.0); verify and gofmt clean
gate go-mod-tidy-drift: env GOWORK=off go mod tidy -diff   # pass
gate go-mod-verify: go mod verify                          # pass
node --test "$REPO_ROOT"/.github/scripts/*.test.cjs        # bash and javascript test: 38 pass
node --test ... && pwsh -NoProfile -File "$REPO_ROOT/scripts/Test-ReleasePins.ps1"   # powershell test: pass
shellcheck --rcfile="$REPO_ROOT/.shellcheckrc" <1 sh>; shfmt -d <1 sh>   # pass
markdownlint-cli2 --config "$REPO_ROOT/.markdownlint-cli2.jsonc" <11 md>   # 0 issues
Outside every ecosystem: .cursor/environment.json, .github/standards/dependabot-policy/policy.json, .gitignore, Dockerfile, LICENSE, docs/conventions/source-control.yaml, docs/conventions/work-items.yaml, release/dependencies.json, release/dependency-drift-review.json

# run 4, /toolchain:lint: the go, bash and markdown lint lines above, plus
actionlint; check-jsonschema vendor.dependabot; check-jsonschema vendor.github-workflows .github/workflows/*.yml; zizmor --persona=regular --strict-collection --offline .   # exit 0, no findings
typos --config _typos.toml .; gitleaks dir . --config .gitleaks.toml --no-banner --redact; ec -config .editorconfig-checker.json; lychee --offline --no-progress --config lychee.toml "**/*.md"   # exit 0; 208 links, 0 errors
powershell, javascript: check-cmd null

Apart from the intended differences in Fix, the record lists match the baselines: the same files reach the same tools.

Run noise, not record findings. Run 3's first attempt used a clone under another repository's .work/, where an empty package.json above the clone broke release-transaction.test.cjs (ERR_INVALID_PACKAGE_CONFIG), and the first build-cmd draft (no -o) wrote ci-runner.exe into the tree. Run 3 restarted in a clean clone under this worktree's ignored .work/, with build-cmd linking to /dev/null; the results above are from that clone.

Installed versions that differ from the pins: golangci-lint 2.15.0 (pin 2.14.0), node 24.21.0 (26.13.0), markdownlint-cli2 0.24.0 (0.23.3), actionlint rhysd 1.7.12 (kjanat 1.17.0), check-jsonschema 0.39.0 (0.38.2), zizmor 1.32.0 (1.30.0), typos 1.52.2 (1.50.3), editorconfig-checker 3.11.1 (4.0.2). shellcheck 0.11.0, shfmt 3.14.1, gitleaks 8.30.1 and lychee 0.24.2 match. Only golangci-lint changed a result.

Schema. check-jsonschema --schemafile ecosystem.schema.json (claude-code-plugins main blob 26f92e2, check-jsonschema 0.39.0) over all seven files: ok -- validation done. Every key was also checked against the schema's properties by hand, and code-metrics' yaml_subset.load parses all seven. typos, editorconfig-checker and gitleaks are clean on the new files; the lefthook pre-commit and commit-msg hooks passed.

Remaining

Done-when items of melodic-software/claude-code-plugins#15722 this PR does not finish by itself:

  • AC5 holds once this PR merges (.claude/ecosystems/ non-empty on main).
  • The merged PR's URL is posted on #15722, by the session that tracks it.

Related

🤖 Generated with Claude Code

…mmands

Add one ecosystem-commands record per ecosystem this repository uses
(go, bash, powershell, javascript for the .cjs workflow-script tests,
markdown, yaml, cross-cutting) under .claude/ecosystems/, so the
toolchain skills resolve the commands and pinned versions
pr-require-checks.yml and the ci-workflows composites it calls run,
instead of the marketplace's bundled defaults.

Refs: melodic-software/claude-code-plugins#15722

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 16, 2026 04:42
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T04:44:14.754662Z dbf0a8d Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

claude-review reviewed dbf0a8d44ece309d20fedc3393dc0fe344899a02: 0 finding(s), 0 as inline comments.

Code review: no findings

The PR adds seven .claude/ecosystems/*.yaml records (go, bash, powershell, javascript, markdown, yaml, cross-cutting). It changes no Go code or workflows, so I reviewed it for fidelity to CI and for correctness of the shell one-liners.

What I checked

  • Command logic. The aggregate check-cmd strings (rc=0; … || rc=1; test "$rc" -eq 0) run every tool and fail if any fails, as the notes say. The gofmt step is unformatted=$(git ls-files -z … | xargs -0 gofmt -l) || rc=1, then a non-empty check. It reports files and fails correctly.
  • Workflow references. The line ranges the comments cite (markdownlint 80-93, shellcheck 95-108, shfmt 110-121, the ci-workflows composites 123-182, actionlint 197-208, jsonschema 210-229, zizmor 280-294, Go reusable 322-329) match the job layout in pr-require-checks.yml at head.
  • Pins. node 26.13.0 matches pr-require-checks.yml:314. golangci-lint 2.14.0 matches the version AGENTS.md says CI uses. The other tool pins come from the external ci-workflows composites at 944d346 and main, which I could not read here, so I treat them as author-claimed and unverified.
  • Path-scoped rules. .claude/rules/pr-body-contract.md has no paths: glob that matches these files. The PR body opens with Refs: #…, as the contract describes.
  • Closing issue. The PR uses Refs: rather than Closes, so no closing issue supplies acceptance criteria, and I report nothing against one. The context file points to Add ecosystem records to ci-runner claude-code-plugins#15722, which I did not read.

Not verified

  • The PR's verification runs (the four toolchain runs, the 6 errcheck findings under 2.15.0 versus CI's clean 2.14.0 run) are author-claimed. I did not run the toolchain skills or the linters myself.
  • $REPO_ROOT, $EC_BIN and <files> are placeholders the toolchain plugin must supply. I could not check how it resolves them from this repository. The cross-cutting record fails loudly if EC_BIN is empty, so a missing binary does not pass silently.

Verifier dropped 0 of 0 candidates.

@github-actions

Copy link
Copy Markdown

claude-security-review reviewed dbf0a8d44ece309d20fedc3393dc0fe344899a02: 0 finding(s), 0 as inline comments.

Security review, PR #572 (head dbf0a8d): no findings.

The diff adds seven declarative ecosystem records under .claude/ecosystems/: bash, cross-cutting, go, javascript, markdown, powershell and yaml. They mirror the commands CI already runs, such as go test, golangci-lint, shellcheck, shfmt, markdownlint-cli2, typos, gitleaks, actionlint and zizmor.

  • Secrets and credentials: none. The files hold only command strings, tool version pins and URLs to public release pages. The gitleaks command uses --redact.
  • Trust controls: none of the changed files match the trusted-path globs or any control in the trust-controls list. The diff touches no .github/actions/, workflow, CODEOWNERS, .gitmodules or pr-pipeline.yaml, so nothing widens who or what the automation trusts and no token scope grows.
  • Plugin manifests: no plugin.json or marketplace.json changes, so no manifest <field> lines apply.
  • Instruction-surface deletions: nothing is deleted, narrowed or softened. The files are new and add no standing instruction that overrides a guardrail.
  • Command surfaces: the new check-cmd, test-cmd and gate strings run only on a developer's or agent's checkout, through the toolchain plugin's own substitution of <files>. They add no workflow, no new trigger and no CI code path to this repository. $REPO_ROOT is quoted wherever it is used. How the plugin substitutes <files> is outside this diff and not reviewed here.
  • Install hints: the URLs are public project release pages. Installs are pinned (uv tool install check-jsonschema==0.38.2, zizmor==1.30.0, npm i -g [email protected]). Nothing here fetches or executes anything by itself.
  • Working tree: the git status snapshot showed these files as deleted ( D). I read that as checkout state and not part of the PR, and I reviewed the diff as given.

critical-findings: 0

@kyle-sexton
kyle-sexton merged commit f6cb62a into main Nov 16, 2026
30 checks passed
@kyle-sexton
kyle-sexton deleted the chore/ecosystem-records-15722 branch November 16, 2026 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant