How rules work
When you create a rule, Detail’s AI analyzes the context you provide and generates a rule file that captures the pattern. That rule is stored against your repository and applied as an additional lens on every subsequent scan. Rules work alongside Detail’s built-in analysis — they don’t replace it. Rule creation is asynchronous. When you submit a request you receive a request ID (formattedrcr_...) that you can use to check progress. When the rule is ready, it appears in your rule list with a stable rule ID (rule_...).
Creating rules from the CLI
You can create a rule from three kinds of input, or combine them in a single request:Proposing rules automatically
If you’re not sure where to start, let Detail analyze your bug history and propose rules for you:Checking rule creation status
Rule creation runs asynchronously. Use therequests subcommands to track progress:
Viewing and using rules
Once rules are created, you can inspect and manage them with the following commands:detail rules pull writes the rule files into .claude/skills/detail-rules/ in your current directory by default. You can specify a different output directory with --output:
Claude Code Skills integration
Rules pulled withdetail rules pull are written as Claude Code skill files. This means the same patterns Detail uses in your cloud scans can guide your AI coding assistant when writing new code locally — closing the loop between detection and prevention.
Rule creation is asynchronous. After running
detail rules create or detail rules propose, you receive a request ID (rcr_...). Poll progress with detail rules requests show <rcr_id> and retrieve the finished rule with detail rules show <rule_id> once the request completes.Reference
| Command | Description |
|---|---|
detail rules create | Submit a rule creation request using a description, bug IDs, or commit SHAs |
detail rules propose | Ask Detail to propose rules based on your bug history |
detail rules list | List all completed rules for the current repository |
detail rules show <rule_id> | Display the content of a specific rule |
detail rules pull <rule_id> | Download rule files locally into .claude/skills/detail-rules/ |
detail rules requests list | List all rule creation requests for the current repository |
detail rules requests show <rcr_id> | Check the status of a specific rule creation request |