Add OpenClaw plugin manifest + entry, bump to 0.9.0#1
Merged
Conversation
rulespec stays a standalone CLI + library; this commit adds the optional
OpenClaw plugin layer so it can be installed via
`openclaw plugins install rulespec` (and discovered by gateways looking
for skill-bearing plugins).
- New `openclaw.plugin.json` declares `id`, `name`, `description`, and
publishes `skills/rulespec/` (the bundled SKILL.md) into agents'
`<available_skills>`. No `contracts.tools` — rulespec doesn't register
native OpenClaw tools; agents call the documented `rulespec` CLI via
`exec` instead.
- New `src/plugin/index.ts` is the minimal plugin entry — a default
export with `{ id, register }`, where `register` is a no-op (the
manifest's `skills` field is what wires the skill in).
- `src/index.ts` re-exports the plugin default so `dist/index.js`
exposes both the OpenClaw plugin entry AND the public library
surface (`loadRules`, `compileRule`, etc.). Standalone consumers
see no change.
- `package.json` adds an `openclaw` block (`extensions`, `compat`,
`build`) pinning compatibility to `>=2026.5.2` (the release that
enforced `contracts.tools`) and includes `skills/**/*` plus
`openclaw.plugin.json` in the published tarball.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an opt-in OpenClaw plugin layer to rulespec. The package keeps working as a standalone CLI + library; this commit just makes it installable via
openclaw plugins install rulespecso the bundled skill ships through the same path as other OpenClaw plugins.What changes
openclaw.plugin.json— declaresid: "rulespec",skills: ["./skills/rulespec"], emptyconfigSchema. Nocontracts.toolssince rulespec doesn't register native tools; agents continue to use the documentedrulespecCLI viaexec.src/plugin/index.ts— minimal plugin entry:export default { id: "rulespec", register: () => {} }. The manifest'sskillsfield handles publication;registeris a no-op.src/index.ts— re-exports the plugin default so the compileddist/index.jsexposes both the OpenClaw plugin entry and the public library surface (loadRules,compileRule, etc.). Standalone library consumers see no behavioral change.package.json:openclawblock (extensions,compat >= 2026.5.2,build.openclawVersion: 2026.5.12).skills/**/*andopenclaw.plugin.jsonto the published files.0.9.0.Why these versions
OpenClaw 2026.5.2 began enforcing
contracts.toolsas the manifest ownership contract for plugin tool registration. rulespec has no runtime tools so the enforcement is a no-op for us, but pinning compat to>=2026.5.2makes the version baseline explicit.Test plan
npm run buildcleannode -e "import('./dist/index.js')..."confirmsdefault = { id, register }AND library exports (loadRules,compileRule, …) coexist on the same modulenpm ci && npm run build && npm test) to validate