A minimal rulepack.json
Required fields: who the pack is (name), what version (version), the license and access policy (license, visibility), and which memory files it ships (memories).
{
"name": "@ichi/nextjs",
"version": "1.0.0",
"license": "MIT",
"visibility": "public",
"memories": {
"claude": "CLAUDE.md"
}
}The full shape
Everything optional layered on: discovery metadata, custom memories, files to bundle, and consumer dependencies on other packs.
{
"name": "@ichi/nextjs",
"version": "1.4.0",
"description": "Strict Next.js rules for Claude Code + Cursor",
"license": "MIT",
"visibility": "public",
"keywords": ["nextjs", "typescript", "strict"],
"memories": {
"agents": "AGENTS.md",
"claude": "CLAUDE.md",
"cursor": ".cursor/rules/main.mdc",
"custom": {
"launch-plan": {
"path": "docs/launch-plan.md",
"description": "Launch and social media plan",
"readWhen": "when planning launch posts or growth strategy",
"priority": "normal",
"tags": ["marketing", "launch"]
}
}
},
"files": ["rulepack.json", "CLAUDE.md", ".cursor/rules/**", "AGENTS.md", "docs/launch-plan.md", "LICENSE"],
"dependencies": {
"@rulepack/typescript": "^0.1.0"
}
}Where it lives
Always at the repository root — /rulepack.json. Tooling resolves it from the current working directory the same way npm finds package.json, so a root manifest is what rulepack publish and rulepack add expect.
Every field
A published pack is an author manifest: it needs name, version, license, visibility, and at least one memories entry. A consumer project can also use dependencies to record installed packs.
| Field | Type | Meaning |
|---|---|---|
| name * | string | Pack identity in @scope/name form. Scope and name use lowercase letters, digits, and internal hyphens. |
| version * | string | Semver. Published versions are immutable, so every content change needs a new version. |
| license * | string | SPDX identifier such as MIT or Apache-2.0, or UNLICENSED. A matching LICENSE file should be shipped when possible. |
| visibility * | "public" | "private" | "pay" | Registry access policy. It controls who can read memory files and install the pack. |
| memories * | object | The core map of memory files. Standard keys point to agent-specific files; custom holds project-level Markdown memories. |
| description | string | One-line summary, up to 280 characters. Used in search results and pack pages. |
| author | string | Optional human-readable author or organization name. |
| homepage | string | Optional http(s) URL for source, docs, or the project page. |
| keywords | string[] | Discovery tags. Up to 20 strings, each up to 40 characters. |
| files | string[] | Optional tarball globs. The CLI always includes rulepack.json and every path declared in memories. |
| dependencies | object | Consumer-side map from @scope/name to a semver range. rulepack add writes this when a project has rulepack.json. |
* Required for published packs.
Memory keys
Each standard key in memories points to one file. Use memories.custom for project plans, handoffs, research notes, or any Markdown memory that is not tied to a single agent.
| Key | Memory | Default path |
|---|---|---|
| agents | AGENTS.md | AGENTS.md |
| claude | Claude Code | CLAUDE.md |
| cursor | Cursor | .cursor/rules/main.mdc |
| cline | Cline | .clinerules |
| windsurf | Windsurf | .windsurfrules |
| gemini | Gemini CLI | GEMINI.md |
| copilot | GitHub Copilot | .github/copilot-instructions.md |
| custom.* | Project memory | docs/plan.md |
Custom memories
memories.custom is for reusable Markdown that is not owned by one agent: project plans, architecture notes, launch docs, runbooks, prompts, research summaries, or handoff notes. A custom value can be a bare path string, or an object with metadata.
{
"memories": {
"agents": "AGENTS.md",
"custom": {
"plan": "docs/plan.md",
"launch": {
"path": "docs/launch-plan.md",
"description": "Launch and social media plan",
"readWhen": "when planning launch posts or growth strategy",
"priority": "normal",
"tags": ["marketing", "launch"]
}
}
}
}| Field | Type | Meaning |
|---|---|---|
| path * | string | Required path to the Markdown memory file. It must be relative to the pack root. |
| description | string | Short label shown in UI and useful to agents when choosing what to read. |
| readWhen | string | A hint for when this memory matters, such as when planning launch posts or debugging auth. |
| priority | "low" | "normal" | "high" | Optional loading hint. Use high for memories the agent should consider early. |
| tags | string[] | Optional discovery and routing tags. Up to 20 short strings. |
Visibility
visibility changes registry access, not the file format. Public, private, and pay packs all publish the same kind of rulepack.json and memory files.
| Value | Access |
|---|---|
| public | Anyone can view metadata, read memory files, download the tarball, and install the pack. |
| private | Only authorized users or teams can view memory files, download the tarball, and install the pack. |
| pay | Metadata and purchase surfaces can be public; memory files and tarball access require purchase. |
files and tarballs
files is optional and behaves like npm pack allow-listing. rulepack publish always forces rulepack.json and every path declared in memories into the tarball, even if you forget to list them. Add README, LICENSE, and extra supporting files explicitly.
Consumer dependencies
The same filename is used in projects that install packs. In that role, dependencies records installed packs and semver ranges. A consumer-only rulepack.json does not need name, version, or memories.
{
"dependencies": {
"@rulepack/nextjs": "^0.1.0",
"@rulepack/typescript": "^0.1.0"
}
}Validation rules
- name must be @scope/name. Scope is 1-39 chars; pack name is 1-64 chars; both use lowercase alphanumerics with internal hyphens.
- version must be valid semver, for example 1.0.0 or 1.2.0-beta.1.
- license is required and must be a non-empty string up to 64 characters.
- visibility must be exactly public, private, or pay.
- memories must declare at least one standard memory file or one custom memory.
- All paths must be relative, non-empty, under 512 characters, and cannot contain absolute paths, empty segments, dot segments, .., or NUL.
- custom memory keys must be 1-64 characters and start with an alphanumeric; ., _, and - are allowed after that.
- homepage must be an http(s) URL. javascript: and data: URLs are rejected.
- dependency keys must be @scope/name and values must be valid semver ranges such as ^1.2.3, ~1.0.0, or >=1.0.0 <2.0.0.
Need a walkthrough?
This page is the complete manifest reference. The docs are for tutorials, publishing flow, and CLI examples.