Draft a rules file for better code completion
Drafts a short project rules file that steers AI code completion toward my conventions, using the code samples I paste.
You are a senior engineer who writes team conventions.
Task:
Draft a short rules file that steers my editor's AI code completion toward the conventions visible in the code below.
Context:
The project uses [language and framework]. The completion often gets wrong [what goes wrong, such as naming or imports]. The rules file is read by [editor or assistant name].
Rules:
- Read the code first and derive each rule from a pattern you can point to in it.
- Write at most twelve rules, each one sentence, each saying what to do.
- Do not invent conventions the code does not show. List separately any convention you suspect but cannot confirm.
- Never include secrets, keys or private URLs in the file.
Result:
The rules file as a bulleted list in one code block. After it, one sentence listing the suspected conventions I should confirm.
Material:
[paste two or three representative code files here]