openknowledge prompt rules
August 11, 2026 ยท View on GitHub
This advanced command gives access to the maintenance rule catalog. The
default mode prints Markdown instructions. --list shows built-in and
wiki-local rules.
The apply subcommand inserts or replaces a marked block in an agent
instruction file. Repeated application produces the same block.
Usage
okn prompt rules --list --path Wiki
okn prompt rules asd-ste100 --path Wiki
okn prompt rules docs,changelog --path Wiki
okn prompt rules docs --target codex
okn prompt rules apply docs,changelog --path Wiki --file AGENTS.md
okn prompt rules apply docs --path Wiki --dry-run
| Option | Default | Description |
|---|---|---|
--path <wiki> | .openknowledge | Bundle used for configured and custom rules. |
--target <target> | inferred/generic | Render for generic, codex, claude, or cursor. |
--list | off | List the resolved rule catalog. |
apply --file <file> | discovered/prompted | Instruction file to update. |
apply --yes | off | Auto-select or create AGENTS.md and skip confirmation. |
apply --dry-run | off | Print the proposed file. Do not write the file. |
Built-in IDs are project, writing, iso-plain-language, docs,
decisions, changelog, research, bugs, schemas, summary, and
agents. A wiki can define additional rules under rules/.
Without an explicit selection, the command uses [rules].enabled. The fallback
selection is project and writing. Command-line selections override both.
The writing rule supplies the common editorial baseline. Select
iso-plain-language when a knowledge base needs stronger reader-centered
plain-language instructions. That rule applies principles based on ISO
24495-1. It does not claim certification or full compliance.
This wiki defines the asd-ste100 rule. Its [rules].enabled configuration
selects project, writing, and asd-ste100.
When possible, target inference selects the instruction format from the
destination. Otherwise, it uses generic. In a terminal, warnings follow the
rendered output. When a caller redirects stdout, warnings go to stderr.
Rule review is separate and advisory. Use
okn prompt review rules Wiki. Deterministic validation verifies
structure and configured validation policies. It does not evaluate subjective
compliance.
Open Knowledge removed the old top-level openknowledge rules form before
1.0.
Source anchors
packages/cli/internal/okf/rules.gopackages/cli/internal/okf/rule_catalog.gopackages/cli/cmd/openknowledge/prompt_command.go