Releases: pallaoro/rulespec
v0.10.2 — fix registerTool field name
Renames inputSchema to parameters in all 16 api.registerTool({...}) calls so the OpenClaw plugin loader stops reporting:
plugin tool is malformed (rulespec): <tool> missing parameters object
OpenClaw's host validates factory-returned tools via isRecord(tool.parameters) (openclaw/src/plugins/tools.ts). There is no inputSchema fallback — the field name is load-bearing. The schema shape is unchanged.
v0.10.1 — Dual-skill pattern
v0.10.0 shipped 16 native tools but agents kept reaching for the CLI because the published SKILL.md still documented only npx rulespec. This release fixes that by splitting the skill into two variants.
Changes
skills/rulespec-plugin/SKILL.md(NEW) — documents the 16 native tools (rulespec_init,rulespec_add_rule,rulespec_emit, …) as the primary interface. Workflow example uses tool calls.rulespec_emitapproval-gate config documented.skills/rulespec/SKILL.md(existing, lightly amended) — stays the CLI-focused doc for standalone consumers (Claude Code, Cursor, Codex, etc.). Top-of-file note points OpenClaw users at the plugin variant.openclaw.plugin.json—skillsfield now points at./skills/rulespec-plugin. Onopenclaw plugins install rulespec, that's the SKILL.md published to~/.openclaw/plugin-skills/rulespec/SKILL.md.
Both variants ship in the npm tarball — files: ["dist", "skills/**/*"]. The plugin manifest just selects which one OpenClaw publishes on install.
No code changes; same 16 tools register, same plugin behavior, same compat range.
PR: #4
v0.10.0 — Native OpenClaw plugin tools
rulespec is now a real OpenClaw plugin with 16 native tools — agents manage rulespec files without shelling out to the CLI.
Tools
- Setup:
rulespec_init,rulespec_set_domain - Rules:
rulespec_list,rulespec_add_rule,rulespec_edit_rule,rulespec_remove_rule - Sources:
rulespec_add_source,rulespec_remove_source - Examples:
rulespec_add_example,rulespec_remove_example,rulespec_add_rule_example,rulespec_remove_rule_example - Build:
rulespec_compile,rulespec_validate,rulespec_emit - Bulk:
rulespec_replace
Approval gate
Only rulespec_emit is gated (it publishes compiled SKILL.md that agents will follow). All other writes run silently. Configurable per host:
"plugins": {
"entries": {
"rulespec": {
"config": {
"approval": {
"enabled": true,
"skipSessionPatterns": ["email"]
}
}
}
}
}Compatibility
- Standalone CLI (
npx rulespec) and library exports unchanged. - Plugin install:
openclaw plugins install rulespec.
PR: #3
v0.9.0 — OpenClaw plugin layer
Adds an opt-in OpenClaw plugin layer to rulespec. The package keeps working as a standalone CLI + library; this release makes it installable via openclaw plugins install rulespec so the bundled skill ships through the same path as other OpenClaw plugins.
What's new
openclaw.plugin.json— declaresid: "rulespec", publishesskills/rulespec/(the canonical SKILL.md) into agents'<available_skills>. Nocontracts.tools; agents continue to use the documentedrulespecCLI viaexec.- Plugin entry under
src/plugin/index.ts— minimal{ id, register }default export.src/index.tsre-exports it sodist/index.jsexposes both the plugin entry and the public library surface (loadRules,compileRule, etc.) — standalone consumers see no behavioral change. package.json.openclaw— addsextensions,compat: { pluginApi: ">=2026.5.2", minGatewayVersion: ">=2026.5.2" },build.openclawVersion: "2026.5.12". Thefilesarray now includesskills/**/*andopenclaw.plugin.jsonso the npm tarball ships the plugin assets.
Usage
# Standalone (unchanged):
npx rulespec init --domain "..."
# As an OpenClaw plugin:
openclaw plugins install rulespecv0.8.0 — agent-targeted skill folders
Set the agent location once at init — never repeat it
`rulespec init -a ` drops the skill folder right where that agent looks. Every later command (`add`, `edit`, `emit`, …) auto-discovers it. No flag-juggling on every invocation.
```bash
Project-scoped — committed with your repo
rulespec init --domain payments -a claude-code
→ .claude/skills/payments/
User-global — shared across all projects
rulespec init --domain payments -a claude-code -g
→ ~/.claude/skills/payments/
Default (no -a) unchanged
rulespec init --domain payments
→ skills/payments/
```
Supported agents
`claude-code`, `cursor`, `openclaw`, `codex`, `opencode`, `windsurf`, `amp`, `augment`, `gemini-cli`, `github-copilot`. Path mappings vendored from vercel-labs/skills. Anywhere else: pass `--outdir `.
Per-emit override
You can still retarget a single emit without reconfiguring:
```bash
rulespec emit -a cursor # writes SKILL.md to .agents/skills// instead
```
Other changes
- Discovery now walks every known agent's project + global skills dir
- `emit` writes `SKILL.md` next to the discovered source by default — folder stays self-contained no matter where it lives
- Short-flag support for `-a` (`--agent`) and `-g` (`--global`)
- Clear errors for unknown agent and `--outdir` + `--agent` conflict
Upgrade notes
Fully back-compat. Existing `skills//` folders and legacy `*.rulespec.yaml` at project root still work unchanged.
v0.7.1 — skill-folder scaffolding
Changes
Scaffold each domain as a self-contained skill folder
`rulespec init --domain payments` now creates `skills/payments/rulespec.yaml` (inside the skill folder) instead of a loose `payments.rulespec.yaml` at project root. Running `rulespec emit` writes `SKILL.md` right next to it — so each domain folder is a complete, agent-loadable skill out of the box.
```
skills/
payments/
rulespec.yaml ← authored source
SKILL.md ← emitted (agent-loadable)
```
Auto-discovery now walks skills/*/rulespec.yaml
All CLI commands (`add`, `edit`, `list`, `emit`, …) find your source automatically under the new layout. Legacy `*.rulespec.yaml` at the project root still works — existing projects keep functioning unchanged.
Upgrade notes
No action required. Existing projects continue to work. New `init` invocations use the skill-folder layout.
v0.7.0
Breaking changes:
rulespec initnow requires--domainand creates{domain}.rulespec.yaml(e.g.invoice-processing.rulespec.yaml)- Example field
descriptionrenamed tonote(--notein CLI)
New features:
rulespec emitscans all*.rulespec.yamlfiles and emits all domains at once- Auto-detection: if only one
*.rulespec.yamlexists, all commands use it automatically - Multiple files: use
--fileto target a specific one add-rule-exampleandadd-exampleaccept--notefor context- Legacy
rulespec.yamlstill works as fallback
v0.6.0
Clean emitted output for agent prompt injection.
- Moved "do not edit" warning to YAML comment in frontmatter — agents no longer see meta-instructions about CLI usage
- Emitted SKILL.md now contains only rules, sources, and intent tags — optimized for prompt injection
- Two audiences: manager agent gets CLI instructions (
skills/rulespec/SKILL.md), worker agent gets clean policy (skills/{domain}/SKILL.md) - Updated README with agent-specific install examples and file-based examples
- Added ClawHub install path