Skip to content

chore: rename npm package to guardrails-md - #23

Open
irony wants to merge 5 commits into
mainfrom
chore/rename-npm-guardrails-md
Open

irony wants to merge 5 commits into
mainfrom
chore/rename-npm-guardrails-md

Conversation

@irony

@irony irony commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

One package, two uses: npx guardrails-md pre-commit (CLI) and "plugin": ["guardrails-md"] (opencode plugin). The old scoped package will be deprecated.

One package, two uses: npx guardrails-md pre-commit (CLI) and
'plugin': ['guardrails-md'] (opencode plugin). The old scoped package
(@bergetai/opencode-guardrails-md) will be deprecated with a pointer.
@github-actions

Copy link
Copy Markdown

AI Review could not run

Could not reach the model provider at https://api.berget.ai/v1: The operation timed out.

Caution

The model provider returned an authentication or availability error. Check the API key and provider status.

Berget AI (berget/zai-org/GLM-5.3-Flash)

@berget-ai berget-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review

Summary

Renames the npm package from the scoped @bergetai/guardrails-md to the harness-neutral unscoped guardrails-md (description em-dash re-encoded as \u2014, EOF newline dropped), and updates the metadata test to match.

Risk

MEDIUM — the diff itself is mechanically correct, but it renames a package that is live on npm (@bergetai/guardrails-md@0.7.0 is the current latest; verified via registry), which orphans existing installs and breaks the OIDC trusted-publishing setup until registry-side config is updated.

Issues

  • 🟠 warning package.json:2 — Verified on the npm registry: @bergetai/guardrails-md is published at 0.7.0 and guardrails-md is free; consumers installing the scoped name will silently stop receiving updates and the PR ships no migration note (README:97–98 documents the previous rename at 0.5.1 but is not updated for this one). Plan a deprecation (npm deprecate @bergetai/guardrails-md "renamed to guardrails-md") plus a README migration section before releasing.
  • 🟠 warning package.json:2 — .github/workflows/publish.yml publishes via OIDC trusted publishing, which npm binds per package name (the workflow comment at lines 26–28 says the Trusted Publisher is configured for @bergetai on this repo); a Trusted Publisher entry for the new unscoped guardrails-md must be created on npmjs.com before the next release or npm publish will fail.
  • 🟡 nit package.json:66 — Trailing newline at EOF was dropped (git shows \ No newline at end of file), which adds diff noise to future edits.
  • 🟡 nit package-lock.json:2 — Lockfile root still says @bergetai/guardrails-md (lines 2 and 8); empirically npm ci --dry-run still succeeds, but regenerate with npm install to keep metadata in sync. (File not in diff — prose only.)
  • 🟡 nit README.md:93,97-98,106 and SECURITY.md:15-16 — Install instructions ("plugin": ["@bergetai/guardrails-md"], pi install npm:@bergetai/guardrails-md) and the published-package reference in SECURITY.md now contradict the new canonical name. (Files not in diff — prose only.)

Suggestions

  • package.json — After merge, release as guardrails-md@0.7.1 (or 0.8.0) only after configuring the npm Trusted Publisher for the new name, then npm deprecate @bergetai/guardrails-md and update README/SECURITY install snippets.
  • package.json — Restore the trailing newline: printf '\n' >> package.json.

Architecture

No structural change; .claude-plugin/plugin.json and marketplace.json already use guardrails-md, so this aligns package.json with existing plugin metadata — the accompanying test update keeps the version-sync invariant intact.

Code quality score: 9/10 — minimal, test-updated-in-lockstep metadata change; the only real work left is release hygiene outside the diff.


Berget AI (berget/zai-org/GLM-5.3-Flash) | PR #23

Comment thread package.json
@@ -1,7 +1,7 @@
{
"name": "@bergetai/guardrails-md",
"name": "guardrails-md",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 warning — Renaming a published package (verified live: @bergetai/guardrails-md@0.7.0 on npm) orphans existing consumers — add a npm deprecate/migration plan like the 0.5.1 rename documented in README.

Comment thread package.json
@@ -1,7 +1,7 @@
{
"name": "@bergetai/guardrails-md",
"name": "guardrails-md",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟠 warning — publish.yml uses OIDC trusted publishing bound to the old name — configure a Trusted Publisher for guardrails-md on npmjs.com before the next release or publish fails.

Comment thread package.json Outdated
"vitest": "^5.0.3"
}
}
} No newline at end of file

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 nit — Trailing newline at EOF was dropped; restore it to avoid diff noise.

Comment thread package.test.ts
it("Given one package for every harness, When package.json is checked, Then it has the harness-neutral name and the pi-package keyword", () => {
const pkg = JSON.parse(readFileSync(join(import.meta.dirname, "package.json"), "utf8"))
expect(pkg.name).toBe("@bergetai/guardrails-md")
expect(pkg.name).toBe("guardrails-md")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ good — Test updated in lockstep with the rename, keeping the metadata invariant enforced.

Comment thread SECURITY.md
- The gate code in this repository (core.ts and the opencode and pi adapters
in adapters/, and the Claude Code hooks module in hooks/register.ts).
- The published npm package `@bergetai/guardrails-md` (formerly
- The published npm package `guardrails-md` (formerly

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 nit — The "formerly" chain skips the 0.6.x–0.7.0 era name @bergetai/guardrails-md — add it so users of that package can trace the rename (guardrails-md, formerly @bergetai/guardrails-md, formerly @bergetai/opencode-guardrails-md).

@berget-ai

berget-ai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Follow-up review

New changes: 2 commits — 37ec658 restores the package.json EOF newline and genuinely regenerates package-lock.json (the context's file list omits it, but git show confirms the lockfile edit); 2c211fc updates the README/SECURITY install references to the unscoped name.

Previous findings:

New findings:

  • 🟡 nit SECURITY.md:15 — the "formerly" chain now skips the 0.6.0–0.7.0 era name @bergetai/guardrails-md, so users of that package have no rename trail in the docs at all.

Credit where due: the lockfile/newline follow-up was done exactly as requested.

Inline findings


Berget AI (berget/zai-org/GLM-5.3-Flash) | PR #23

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