For the complete documentation index, see llms.txt. This page is also available as Markdown.

Edit rule (editrule)

Update an existing style guide rule.

Update an existing style guide rule.

Request

See HTTP API Overview.

Parameters

Parameter
Type
Required
Default
Notes

cmd

string

Yes

style_guide

Command name.

action

string

Yes

editrule

Action name.

lang

string

No

common

Language scope that contains the rule (example: en_US or en).

rule

string

Yes

Rule ID to update. Use lang + rule to uniquely target it.

patterns

string[]

No

New patterns. Replaces the whole array.

suggestions

string[]

No

New suggestions. Replaces the whole array.

state

boolean

No

Enables/disables the rule.

context_include

string[]

No

New include context. Replaces the whole array.

context_exclude

string[]

No

New exclude context. Replaces the whole array.

description

string

No

New message.

Provide at least one updatable field.

You can’t choose a rule ID.

The rule ID is generated as a hash of patterns + context_include. If you update patterns or context_include, the rule will get a new ID.

Behavior

  • Updates only the provided fields.

  • Returns the updated rule in result.

Response

Updated single rule object with updated rule ID is returned.

See Response schema.

Errors

See:

Examples

Example: disable a rule

Last updated

Was this helpful?