Jsonspecs rule author
Skill jsonspecs/jsonspecs-rule-author/skills/jsonspecs-rule-author
Author, review, refactor, migrate, package, and validate jsonspecs rules projects for @jsonspecs/rules v4, jsonspecs-cli v4, and jsonspecs/spec 1.0.0-rc.7. Use for formatVersion 2 snapshots, manifest.json authoring metadata, exported pipelines, rule/condition/pipeline/dictionary artifacts, RC.7 wildcard guards, samples, custom {schema,evaluate} operators, sourceHash, Sandbox metadata, package boundaries, and migration from older jsonspecs releases.From its SKILL.md
npx -y skills add jsonspecs/jsonspecs-rule-author --skill jsonspecs-rule-authorAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
9.3 KB, ~2.0k tokens by cl100k_base, as published. Nobody here has run it
jsonspecs Rule Author
Produce maintainable authoring projects whose executable output is a closed
formatVersion: 2 snapshot accepted by @jsonspecs/rules v4.
Baseline
- Treat
jsonspecs/spec1.0.0-rc.7as the behavior contract,@jsonspecs/rulesv4 as the Node.js implementation target, andjsonspecs-cliv4 as the canonical authoring tool. Prefer published packages plus a lockfile unless the task explicitly targets an unreleased revision. Require Node.js 20 or newer. - Separate normative snapshot fields from authoring metadata.
manifest.json, source fileid, folders, catalog labels, ownership, package version, and build information are builder conventions; they do not belong in the executable snapshot. - Keep the runtime result closed:
status,issues,ruleset, anderroronly onABORT. Do not addcontrol,trace, engine version, package version, or operator-pack identity to the normative result. - Parse authoring JSON, samples, and Sandbox requests at the strict I-JSON boundary.
Use CLI v4 for that proof; ordinary
JSON.parse-based audits cannot detect duplicate members or malformed raw UTF-8 after conversion.
Workflow
- Inspect
manifest.json,package.json,rules/,samples/,operators/,docs/,dist/snapshot.json, and project build scripts before editing. - Before designing new rules or scenarios, study the task and describe the proposed solution to the user: the business behavior, inputs and context, branches, issue semantics, and the boundary between validation and application logic.
- Search the package for existing exported and internal pipelines, rules, conditions, dictionaries, and operators that can implement the task. Search by business terms, payload and context paths, issue codes and messages, and artifact ids. Prefer composing or extending compatible artifacts. Create a new artifact only after recording why the existing candidates do not match the same field contract and business meaning; do not duplicate an existing scenario or check.
- Confirm the execution boundary: what is validated, what remains application logic, which pipelines are public, and how the snapshot and operator packs are deployed.
- Read
references/rules-v4-contract.md, then build a matrix of exported pipelines, payload paths,$context.*paths, rules, issue codes and levels, dictionaries, conditions, and custom operators. - Keep scenario-local artifacts local. Promote an artifact to
rules/library/only when reuse is real and its field contract and issue meaning are the same. - Update authoring metadata for exports, fields, visible artifacts, and operator descriptions. Never copy that metadata into the snapshot.
- Use built-in operators where possible. For a custom operator, define one immutable
name bound to
{ schema, evaluate }; pass runtime dependencies throughfield,value_field, or namedinputs, and constants throughparams. - Express requiredness with a presence rule. Remember that value operators skip an
absent
fieldorvalue_field; namedinputsare different and let a custom operator observe missing members. - Compose flows with string
steps. Use conditions to gate checks whose meaning depends on type, format, dictionary membership, or another business prerequisite. - Add samples for every exported pipeline: success, each major blocking family, warnings and exceptions where applicable, branch edges, wildcard empty/mixed cases, omitted members after the final wildcard, malformed JSON-safe inputs for custom operators, and every reachable issue code or a documented exclusion with a reason.
- Run
jsonspecs validate --fail-on-warningandjsonspecs testwith the project-local CLI v4. Build through CLI v4 when distribution files must change, then compare any checked-in snapshot with an independent in-memory rebuild. - Run
jsonspecs sandboxwhen labels, condition trees, flow links, or sample execution need visual inspection. Never expose Sandbox as a production service. - Report boundary decisions, public exports, custom-operator rationale, validation commands, snapshot identity, and residual warnings.
Reference routing
- Read
references/rules-v4-contract.mdfor every Rules v4, CLI v4, or RC.7 task. - Read
references/artifact-layout.mdwhen creating, moving, naming, or migrating artifacts and snapshots. - Read
references/rule-layer-design.mdwhen deciding what belongs in the rules layer. - Read
references/scenario-composition.mdbefore designing exported pipelines, conditions, or reusable validation blocks. - Read
references/guard-patterns.mdwhen ordering presence, type, format, dictionary, date, identifier, wildcard, or cross-field checks. - Read
references/business-language.mdfor catalog labels and issue messages. - Read
references/operator-policy.mdbefore adding or approving a custom operator. - Read
references/issue-semantics.mdfor issue codes, fields, aggregate issues, and multi-field checks. - Read
references/manifest-catalog.mdwhen editing authoring metadata. - Read
references/package-boundary.md,references/distribution-options.md, andreferences/rule-governance.mdfor packaging, deployment, or governance work. - Read
references/validation-checklist.mdbefore final delivery.
Hard rules
- Build a snapshot with exactly
format,formatVersion,specVersion,sourceHash,exports, andartifacts. - Use an object map for
artifacts; remove sourceidfrom each artifact value. - Use a sorted, unique
exportsarray of pipeline ids. Do not use pipelineentrypoint. - Use non-empty string
steps. Do not useflow, object steps, orstepId. - Put
level,code,message, and optionalmetainsiderule.issue. A rule used as a step must haveissue; a rule used only inwhenmay omit it. - Keep issue codes unique across the snapshot.
- Do not use
role,strict,required_context, snapshotmeta,engine, orrequiresin the executable graph. - Add
aggregateexactly whenfieldcontains[*]. UseALL,ANY, orCOUNT. - Do not put
[*]invalue_field, namedinputs, or$context.*. - Under RC.7, every real array index reached by
[*]creates a structural candidate. Use a wildcardnot_emptyrule to require a child member in every item andissueMode: "EACH"for concrete missing paths.onEmptyhandles zero candidates, not an omitted member in an existing item. - Treat exact index tokens as decimal path text with no implementation-sized upper
bound. Never round them through JavaScript
Numberor another limited numeric type. - Ensure every artifact is reachable from
exports, includingwhenrules and dictionaries. - Keep package version and operator-pack identity in build/deployment records, not in the normative runtime result.
Bundled validation
Run from a rules project root or pass the project path explicitly:
node /path/to/scripts/audit-manifest-coverage.mjs .
node /path/to/scripts/audit-rule-graph.mjs .
node /path/to/scripts/audit-guard-order.mjs .
node /path/to/scripts/audit-business-language.mjs .
node /path/to/scripts/audit-sample-matrix.mjs .
node /path/to/scripts/validate-package.mjs .
The audit scripts are read-only. Use validate-package.mjs . --static for an untrusted
project: it reads JSON and text only and does not load project JavaScript. Without
--static, the verifier loads the project's installed Rules v4 and operator modules,
runs the project-local CLI v4 validate and test commands, compiles an independent
snapshot, executes samples, and checks committed build files. Run that mode only for
trusted project code. Add --strict to fail on audit warnings. Neither mode downloads
packages or writes dist/.
Completion criteria
jsonspecs validate --fail-on-warningandjsonspecs testpass under CLI v4.- The independent in-memory snapshot compiles under
@jsonspecs/rulesv4 forspecVersion: 1.0.0-rc.7with the deployment's operator registry. - Every export has catalog metadata and executable samples.
- Samples cover every reachable issue code and applicable boundary class, or record an intentional issue-code exclusion with a non-empty reason.
- Required payload and
$context.*fields are enforced by analyst-authored presence rules in the corresponding pipelines and documented outside the snapshot. - Guard ordering prevents misleading dependent failures.
- Custom operators use the v4 contract and have deterministic pass/fail/skip vectors.
- The full graph is reachable, acyclic, and free of legacy fields.
- A checked-in snapshot, if present, matches the in-memory rebuild byte-for-data after
JSON parsing, including
sourceHash. - The repository's continuous-integration job installs from the lockfile, validates the package, and runs all samples on a supported Node.js version.
What ships with it: 21 files
116.1 KB alongside SKILL.md, 7 of them executable
agents/
- openai.yaml293 B
references/
- artifact-layout.md3.9 KB
- business-language.md2.0 KB
- distribution-options.md2.1 KB
- guard-patterns.md5.2 KB
- issue-semantics.md3.1 KB
- manifest-catalog.md4.6 KB
- operator-policy.md3.5 KB
- package-boundary.md2.5 KB
- rule-governance.md2.0 KB
- rule-layer-design.md2.3 KB
- rules-v4-contract.md10.9 KB
- scenario-composition.md2.7 KB
- validation-checklist.md7.8 KB
scripts/
- audit-business-language.mjsruns2.3 KB
- audit-guard-order.mjsruns6.2 KB
- audit-manifest-coverage.mjsruns12.0 KB
- audit-rule-graph.mjsruns4.0 KB
- audit-sample-matrix.mjsruns13.4 KB
- lib/project.mjsruns13.0 KB
- validate-package.mjsruns12.6 KB