Add AGENTS.md for AI coding agent guidance#969
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new AGENTS.md contributor guide intended to help (AI and human) contributors understand eCapture’s architecture, build/test workflow, and conventions.
Changes:
- Introduces
AGENTS.mddocumenting project architecture and key directories. - Documents Linux-only build workflow (Make targets, tags, cross-compile/Android notes) and testing entry points.
- Provides a checklist/conventions section for adding new probes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| - **`internal/errors/`** — Structured error types with error codes (e.g., `ErrCodeProbeStart = 202`). | ||
| - **`internal/output/`** — Writers (`file`, `pcap`, `keylog`, `tcp`, `websocket`) and encoders (`json`, `plain`, `protobuf`). | ||
| - **`cli/cmd/`** — One file per subcommand (`tls.go`, `bash.go`, `gotls.go`, etc.). Commands wire probe config flags and invoke the factory. | ||
| - **`pkg/event_processor/`** — HTTP/2 request/response parsing from captured TLS data. |
There was a problem hiding this comment.
pkg/event_processor/ is described as only doing HTTP/2 parsing, but the directory also contains HTTP/1.x parsers (e.g., http_request.go, http_response.go). Please update this line to reflect that it handles both HTTP/1.x and HTTP/2 (or more generally HTTP parsing from captured TLS data).
| - **`pkg/event_processor/`** — HTTP/2 request/response parsing from captured TLS data. | |
| - **`pkg/event_processor/`** — HTTP request/response parsing (HTTP/1.x and HTTP/2) from captured TLS data. |
| ## Testing | ||
| ```sh | ||
| # Unit tests (on Linux) | ||
| make test-race # go test -race -tags dynamic,ebpfassets ./... |
There was a problem hiding this comment.
The make test-race description omits that the Makefile also writes a coverage profile (-coverprofile=coverage.out). Consider updating the comment so contributors know it generates coverage.out as well.
| make test-race # go test -race -tags dynamic,ebpfassets ./... | |
| make test-race # go test -race -coverprofile=coverage.out -tags dynamic,ebpfassets ./... (generates coverage.out) |
This pull request adds a comprehensive
AGENTS.mddocumentation file, providing an architectural and operational guide for the eCapture project. The new document outlines the project structure, build and test procedures, conventions, and a checklist for adding new probes, making it easier for contributors (including AI agents) to understand and extend the codebase.Documentation improvements:
AGENTS.md, a detailed guide covering the eCapture project architecture, directory structure, build system requirements, testing procedures, code conventions, and step-by-step instructions for adding new probes.