Skip to content

Add .github/copilot-instructions.md for LLM guidance#829

Draft
Copilot wants to merge 3 commits intomasterfrom
copilot/add-skill-for-llm-guidance
Draft

Add .github/copilot-instructions.md for LLM guidance#829
Copilot wants to merge 3 commits intomasterfrom
copilot/add-skill-for-llm-guidance

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 20, 2026

LLM pre-training data lacks sufficient libhv-specific knowledge, making AI assistants less effective when working with this codebase.

Adds .github/copilot-instructions.md covering:

  • Project overview — architecture, C99/C++11 codebase, relationship to libevent/libev/libuv
  • Directory structurebase/, event/, evpp/, http/, ssl/, mqtt/, etc.
  • Build system — Makefile and CMake with all WITH_* options
  • Coding conventions — naming (hv_ prefix for C, PascalCase in hv:: namespace), header guards, export macros, memory management patterns
  • Key API patterns — event loop, TcpServer/TcpClient, HTTP server (gin-style routing), requests-style HTTP client, WebSocket server/client
  • HTTP handler chainheaderHandler → preprocessor → middleware → processor → postprocessor, handler types, return value semantics (HTTP_STATUS_NEXT/HTTP_STATUS_CLOSE)
  • Thread safety — which operations are safe cross-thread (hio_write, hloop_post_event, channel->write)
  • Common pitfalls — Windows DELETE macro conflict, HLOOP_FLAG_AUTO_FREE lifetime, async handler return values, IO thread blocking

Copilot AI linked an issue Apr 20, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Add new skill to guide LLM with libhv information Add .github/copilot-instructions.md for LLM guidance Apr 20, 2026
Copilot AI requested a review from ithewei April 20, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

希望为本项目增加一个skill

2 participants