| name | ctx-add-convention |
| description | Record a coding convention. Use when a repeated pattern should be codified so all sessions follow it consistently. |
| tools | ["bash"] |
Record a coding convention in CONVENTIONS.md.
When to Use
- When a pattern has been used 2-3 times and should be standardized
- When establishing a naming, formatting, or structural rule
- When a new contributor would need to know "how we do things here"
- When the user says "codify that" or "make that a convention"
When NOT to Use
- One-off implementation details (use code comments instead)
- Architectural decisions with trade-offs (use
ctx-add-decision)
- Debugging insights or gotchas (use
ctx-add-learning)
- Rules that are already enforced by linters or formatters
Gathering Information
Conventions are simpler than decisions or learnings. You need:
- Name: What is the convention called?
- Rule: What is the rule? One clear sentence.
- Section: Where does it belong in CONVENTIONS.md?
If the user provides only a description, infer the section from the
topic. Check existing sections in CONVENTIONS.md first to place it
correctly: don't create a new section if an existing one fits.
Execution
ctx convention add "Use kebab-case for all CLI flag names" --section "Naming"
Quality Checklist