Understanding Categories
Last updated 2026-03-13
Overview
Every standard in CodeContext belongs to one of four categories. Categories help your AI tools understand the intent behind each standard — whether it is a hard requirement, a suggested approach, a step-by-step process, or a factual reference.
Rule
A strict guideline that must always be followed. Rules are non-negotiable conventions your team has agreed on. AI tools treat rules as hard constraints when generating or reviewing code.
Example: "Always use parameterized SQL queries — never use string concatenation for query values."
Pattern
A reusable code pattern or template to follow. Patterns show the preferred way to solve a recurring problem. They typically include a code example that can be adapted.
Example: "React error boundary wrapper — wrap page-level components with this ErrorBoundary HOC to catch rendering errors."
Workflow
A multi-step process or procedure. Workflows describe how to carry out a task from start to finish, such as deploying a service, onboarding a new team member, or handling an incident.
Example: "PR review and merge process — open draft PR, request review, address feedback, squash-merge to main, delete branch."
Reference
Factual information like environment variables, API formats, or utility functions. References are lookup material that AI tools can cite when answering questions about your codebase.
Example: "Environment variable reference — DATABASE_URL, STRIPE_SECRET_KEY, NEXT_PUBLIC_APP_URL, and their expected formats."
Choosing the Right Category
Use this decision tree to pick the right category:
- Is it a hard requirement? If violating it would be a bug or a code review rejection, it is a Rule.
- Is it a code template or example to copy? If it shows how to structure code for a recurring scenario, it is a Pattern.
- Is it a sequence of steps? If it describes a process with a beginning and end, it is a Workflow.
- Is it factual data to look up? If it lists config values, API shapes, or utility inventories, it is a Reference.
When in doubt, choose the category that best matches how your team would use the standard. You can always change it later.
Related Articles
Still need help?
Our support team is happy to help with any questions you may have.
support@codecontext.app