Gå til hovedinnhold

kapi rules

kapi rules

The rules are what your project keeps to: names and their spelling, words to avoid, and the voice's measures and patterns. An assistant suggests a rule when it notices one in your files. Checks report a suggestion, and none fails on it until you keep it.

With suggestions waiting, kapi rules asks about each one in turn: which form your files use, or whether to keep it. Before you answer, it shows what keeping it does: how many blocks a check then reports, and where the rule applies.

k keep n not a rule l later a number picks another form, or types one of your own (Other…)

A kept name or word fails a check from then on. A kept note is stated to writers and assistants, and no check reads it. Outside a terminal, kapi rules lists the questions with the id each decision takes:

--keep <id> keep a suggestion (repeatable); --use picks the form --drop <id> not a rule: set a suggestion or a kept rule aside --later <id> leave it waiting; it keeps advising --choose <id> keep one side where two suggestions disagree

kapi context review records the same decisions for an assistant.

Commandrules
Groupwork
Try it

Runs in your browser against a small sample file. Edit the command before running, or press Run to execute it as shown.

kapi rules
Flags
FlagTypeDefaultDescription
--advisory boolfalsewith a keep: the rule reports without failing a check (--advisory=false makes it fail)
--choose stringkeep this side where two suggestions disagree and set the other aside
--drop stringArraynot a rule: set a suggestion or a kept rule aside by id (repeatable)
--keep stringArraykeep a suggestion by id (repeatable)
--later stringArrayleave a suggestion waiting by id (repeatable); it keeps advising
--note stringwhy
--project , -pstringpath to a kapi.yaml project recipe or its directory (auto-discovered from cwd if omitted)
--use stringwith one --keep or --choose: the form the rule says to write
More examples
kapi rules list
kapi rules --keep 0n794e2gk7 --use "Sign in"
kapi rules keep 0n794e2gk7
kapi rules drop 0n794e2gk7
kapi rules narrow 0n794e2gk7 --to docs
kapi rules find "sign in"

← Back to the Command Reference