Skip to content

Commit 073c6a5

Browse files
committed
feat(agent): instructions
1 parent 99b6378 commit 073c6a5

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

copilot-instructions.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Instructions
2+
3+
Purpose
4+
- Help contributors and code-assistants make focused, minimal, and correct changes to the codebase.
5+
- When producing code, follow the repository's structure and conventions and keep changes small and localized.
6+
7+
General guidance
8+
- Always write and explain code in English.
9+
- When adding comments in code, limit them to describing implementation details and intent. Do not use comments to introduce new features or design changes.
10+
- Avoid implementing security checks or validations unless the maintainer explicitly requests them.
11+
- Do not create or modify test files; tests and migrations are not to be generated.
12+
- All changes that interact with persistent data (database reads/writes/migrations) must be implemented inside the repository's existing database modules or clearly designated DB files (e.g., app/db.py, app/database/, or equivalent). Do not embed DB operations in handlers, controllers, or utility files unless that is the project's established pattern.
13+
14+
Python-specific guidance
15+
- Follow PEP 8 formatting and idiomatic Python practices (use typing where helpful), ignore linting tools from py.
16+
- Keep functions and modules small and focused.
17+
- Prefer composing behavior via modules and functions already present in the repo rather than adding new top-level packages or modules unless necessary.
18+
- Use existing configuration and dependency-loading patterns in the project; do not introduce new secrets or env-loading systems.
19+
20+
Kotlin-specific guidance
21+
- Keep Kotlin code consistent with the project's conventions (naming, packaging).
22+
- Make small, well-scoped changes and prefer reusing existing utilities.
23+
24+
HTML / Frontend guidance
25+
- Keep templates minimal and descriptive. Use existing CSS/JS conventions in the repo.
26+
- Do not extend the frontend with new major frameworks or build systems.
27+
28+
Database operations
29+
- Identify and use the project's designated DB layer for all database operations.
30+
- If a suitable DB module exists, add or modify functions there; do not perform raw DB access in business logic or route handlers.
31+
- Keep DB schema changes and migration logic separate and documented — but do not create migrations unless explicitly requested.
32+
33+
External services and network calls
34+
- The repo delegates embedding and coding/chat model calls to an external service while keeping local data. When adding or modifying code that calls external services:
35+
- Keep calls isolated in a single module or client class.
36+
- Avoid spreading network logic across modules.
37+
- Do not add retries, rate-limiting, or security wrappers unless asked.
38+
39+
Documentation and comments
40+
- Add inline comments only to explain non-obvious implementation details.
41+
- Do not use comments to discuss potential features, speculative refactors, or TODOs that introduce new scope.
42+
- When editing README or docs, keep content factual and limited to how the code currently behaves.
43+
44+
Commits and pull requests
45+
- Keep commits focused and small. Each commit should have a clear purpose and message.
46+
- In PR descriptions: explain what changed, where database or external calls were modified (if any), and any required manual steps (e.g., config keys).
47+
- Do not include speculative or optional enhancements in the same PR as a bugfix.
48+
49+
When asked to refactor
50+
- Ignore breaking changes unless the maintainer explicitly requests to document.
51+
- Refactor in small steps with clear explanation comments that describe the transformation.
52+
- Move DB logic to the DB module if you find it mixed into other layers.
53+
54+
When asked to document code
55+
- Provide concise explanations and annotate tricky parts with comments.
56+
- Do not invent missing features or implementation details; document only what the code does.
57+
58+
When interacting with the maintainer's requests
59+
- If the maintainer specifically requests security checks, tests, or DB migrations, follow their exact instructions.
60+
- If something is ambiguous about where DB code should go, ask for the exact file or module name before proceeding.
61+
62+
Example minimal checklist before submitting a change
63+
- Changes are localized and small.
64+
- No tests added or modified.
65+
- No security checks added unless requested.
66+
- All DB operations are inside the repository's DB layer.
67+
- Comments describe code behavior only and are written in English.
68+
- PR description clearly states the change and files touched.

0 commit comments

Comments
 (0)