Extending RDF
All content starts in canonical/. Never edit generated output, because rdf generate overwrites it.
Add a command
- Create
canonical/commands/<name>.mdas pure markdown with no frontmatter. - Run
rdf generate claude-code && rdf deploy claude-code. A new command needs the deploy step, because each skill is its own symlink. - Add it to
docs/commands.md.rdf doctorfails until you do. - Update the counts in
WORKFORCE.md,RDF.md,canonical/reference/framework.md,docs/index.mdand the README banner.rdf doctorreports each one that drifted.
Commands use /r-<name> for lifecycle work and /r-util-<subject>-<verb> for utilities.
Add an agent
- Create
canonical/agents/<name>.md. -
Add its metadata to
adapters/claude-code/agent-meta.json:"<name>": { "name": "rdf-<name>", "description": "...", "tools": ["Bash", "Read", "Glob", "Grep"], "model": "opus", "effort": "medium" } - Run
rdf generate claude-codeand check the frontmatter.
model is a Claude Code alias (opus, sonnet, haiku, fable, inherit) or a claude-* id, and effort is low through max. An optional "variants": {"<key>": {"effort": "...", "description": "..."}} emits rdf-<name>-<key> from the same body at a different effort.
Add a profile
- Add an entry to
profiles/registry.jsonandprofiles/registry.md. - Create
profiles/<name>/governance-template.mdand areference/directory. - Add detection rules to
profiles/detection-rules.md. - Add the name to
_KNOWN_PROFILESand a detection branch to_detect_profilesinlib/cmd/init.sh.rdf initreads those, notdetection-rules.md. - Run
rdf profile install <name>, thenrdf generate claude-code.
Add an adapter
- Create
adapters/<tool>/adapter.shimplementing<prefix>_generate_all(). - Add a case branch in
lib/cmd/generate.sh. - Use
adapters/claude-code/adapter.shas your reference.
An adapter reads from ${RDF_CANONICAL} and writes to its own output/. It never modifies canonical.
Onboard a project
rdf init /path/to/project --type shell --github
This creates CLAUDE.md from the governance template, MEMORY.md and the .git/info/exclude entries, plus GitHub labels and a project board with --github.
Before you open a PR
See CONTRIBUTING.md for shell standards, tests and the commit format.