Open Knowledge CLI Documentation
Frontmatter5 fields
type
Command Documentation
title
openknowledge prompt rules
description
Lists, renders, and explicitly applies canonical maintenance rules.
timestamp

openknowledge prompt rules

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
OptionDefaultDescription
--path <wiki>.openknowledgeBundle used for configured and custom rules.
--target <target>inferred/genericRender for generic, codex, claude, or cursor.
--listoffList the resolved rule catalog.
apply --file <file>discovered/promptedInstruction file to update.
apply --yesoffAuto-select or create AGENTS.md and skip confirmation.
apply --dry-runoffPrint the proposed file. Do not write the file.

Built-in IDs are project, docs, decisions, changelog, research, bugs, schemas, summary, and agents. A wiki can define additional rules under rules/. Command-line selections override configured defaults.

This wiki defines the asd-ste100 rule. Its [rules].enabled configuration selects project and asd-ste100 by default.

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.

Powered by OpenKnowledge.sh