edge-ai-libraries
Copilot instructions177 starsChanged 7 months agoApache-2.0View on GitHub
Edge AI Libraries is a monorepo of optimized libraries, microservices, tools, and sample applications for building and deploying real-time AI solutions on edge devices. Components span computer vision, multimedia analytics, generative AI, time-series analytics, and model lifecycle management. Components are independently versioned and deployable. Each component under libraries/, microservices/, tools/, frameworks/, and sample-applications/ is self-contained with its own Dockerfile, Makefile, Helm chart, and tests. All files must include: Consult these based on the code you're working with. Skills reside under…
- Installs packages
We split this copilot-instructions.md into the rules it gives an agent
24 rules. About 1 is common, 12 are distinctive, and 11 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈12
Distinctive · estimate
This author's own choices. Worth a look.
11
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
Prefer least privilege across code, services, identities, file permissions, APIs, containers, and workflows.
- Distinctive: line 35
Treat all external input as untrusted and validate format, type, range, and length at trust boundaries.
- Distinctive: line 36
Never hard-code or introduce secrets, credentials, keys, tokens, or passwords in source, tests, configs, or templates.
- Common: line 37
Avoid exposing sensitive data in logs, traces, errors, metrics, or test artifacts.
- Distinctive: line 39
Prefer trusted, actively maintained dependencies and images.
- Distinctive: line 40
Avoid deprecated, unmaintained, or ambiguous packages.
- Distinctive: line 41
Do not suggest bypassing or weakening existing security checks or validations.
- Distinctive: line 42
Keep authorization checks server-side and close to protected resources.
- Very specific: line 43
Avoid unsafe dynamic execution patterns (eval, exec, untrusted command construction).
- Distinctive: line 45
Do not assume trusted inputs, networks, or environments.
- Distinctive: line 51
Treat AI-generated output as untrusted draft code until reviewed and tested.
- Distinctive: line 116
Update when publishing new component versions
- Distinctive: line 162
Update documentation immediately when making any of these changes:
- Very specific: line 179
When adding a new microservice under microservices/:
- Very specific: line 181
Create folder with Dockerfile, Makefile, src/, requirements.txt (or pyproject.toml)
- Very specific: line 182
Add standard Makefile targets: build, lint, test, coverage, help
- Very specific: line 183
Add docker/docker-compose.yml for local development
- Very specific: line 184
Add Helm chart under helm/ with Chart.yaml, values.yaml, and templates
- Very specific: line 185
Create tests in tests/ with appropriate test runner configuration
- Very specific: line 186
Add a CI workflow under .github/workflows/ for PR validation and scanning
- Very specific: line 187
Create README.md and docs/ with user guide and API reference
- Very specific: line 188
Add document-versions.yaml for documentation versioning
- Distinctive: line 189
Ensure SPDX license headers are present in all source files
- Very specific: line 191
Run security review (.github/skills/security-review/SKILL.md) on Dockerfile, Helm chart, and CI/CD workflow before merging
≈ “Common” is an estimate: at least 1 in 5 of the 3,669 Copilot instructions files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Edge AI Libraries – AI Agent Instructions
Edge AI Libraries is a monorepo of optimized libraries, microservices, tools, and sample applications for building and deploying real-time AI solutions on edge devices. Components span computer vision, multimedia analytics, generative AI, time-series analytics, and model lifecycle management.
Components are independently versioned and deployable. Each component under libraries/, microservices/, tools/, frameworks/, and sample-applications/ is self-contained with its own Dockerfile, Makefile, Helm chart, and tests.
Licensing Requirements (Critical – All Files)
All files must include:
- SPDX license header:
SPDX-License-Identifier: Apache-2.0 - Copyright line:
(C) <YEAR> Intel Corporation(use current year for new files) - Example:
# SPDX-FileCopyrightText: (C) 2026 Intel Corporation # SPDX-License-Identifier: Apache-2.0 - Enforcement: REUSE/license compliance checked in CI (see
codeql.yaml,zizmor-scan.yaml)
Language-Specific Skills (Load On-Demand)
Consult these based on the code you're working with. Skills reside under .github/skills/.
| Skill file | When to load |
.github/skills/security-review/SKILL.md | Dockerfile, Compose, Helm, auth/authz, input parsing, file handling, secrets/logging, dependency upgrades, CI/CD workflow changes, privilege elevation |
Instruction Placement Policy: Keep this file focused on high-level routing and architecture context. Detailed procedural checklists belong in skill files under
.github/skills/. Avoid duplicating checklist content between this file and skills.
Security Defaults (Always-On)
Apply secure-by-default behavior across all code generation, changes, and reviews, regardless of language or component.
- Prefer least privilege across code, services, identities, file permissions, APIs, containers, and workflows; avoid insecure defaults.
- Treat all external input as untrusted and validate format, type, range, and length at trust boundaries.
- Never hard-code or introduce secrets, credentials, keys, tokens, or passwords in source, tests, configs, or templates; use environment variables or approved secret-management mechanisms.
- Avoid exposing sensitive data in logs, traces, errors, metrics, or test artifacts.
- Prevent injection vulnerabilities by avoiding unsafe string construction and using safe, context-appropriate APIs.
- Prefer trusted, actively maintained dependencies and images; verify sources and pin versions where feasible.
- Avoid deprecated, unmaintained, or ambiguous packages.
- Do not suggest bypassing or weakening existing security checks or validations.
- Keep authorization checks server-side and close to protected resources.
- Avoid unsafe dynamic execution patterns (
eval,exec, untrusted command construction). - Prevent time-of-check/time-of-use (TOCTOU) race conditions in state-dependent checks (e.g., certificate validation.
- Do not assume trusted inputs, networks, or environments.
- Be explicit about assumptions and limitations.
- Fail safely and visibly.
AI Output Trust Model
Treat AI-generated output as untrusted draft code until reviewed and tested. Reject suggestions that bypass security controls for convenience or introduce unsafe defaults.
For detailed security review guidance, follow:
.github/skills/security-review/SKILL.md.
Repository Structure
edge-ai-libraries/
├── libraries/ # Reusable AI/ML libraries (anomalib, datumaro, geti-sdk, model_api, …)
├── microservices/ # Standalone deployable services (dlstreamer-pipeline-server, model-registry,
│ # time-series-analytics, audio-analyzer, …)
├── sample-applications/# End-to-end reference apps (chat-qna, document-summarization, …)
├── tools/ # Developer tooling (npu-monitor-tool, visual-pipeline-evaluation, …)
├── frameworks/ # Edge device enablement framework
└── .github/
├── workflows/ # Per-component CI (dlsps-*, timeseries-*, GENAI-*, modelregistry-*, …)
└── skills/ # On-demand AI agent skill filesComponent Layout Convention
Each component follows a consistent layout:
<component>/
├── Dockerfile # Container build definition
├── Makefile # Standard targets: build, lint, test, coverage
├── README.md # Quick start
├── helm/ or chart/ # Helm chart for Kubernetes deployment
├── docker/ # Docker Compose files and supporting config
├── src/ # Application source code
├── tests/ # Unit and integration tests
├── docs/ # Component documentation
├── requirements.txt # Python runtime dependencies (or pyproject.toml / uv.lock)
└── document-versions.yaml # Tracks documentation versioningSome newer components use
pyproject.toml+uv.lockinstead ofrequirements.txt. Preferuvfor lock-file-based installs in those components.
Code Patterns & Conventions
Python packaging:
- Most microservices use
src/layout withrequirements.txt(orpyproject.toml) - Newer components (
model-download) useuvwith auv.locklockfile — preferuv syncoverpip installin those components
REST APIs:
- Services expose HTTP REST APIs; refer to each component's
docs/orREADME.mdfor endpoint definitions - OpenAPI specs, where available, are under
docs/orsrc/rest_api/
Helm / Kubernetes:
- Helm charts are under
<component>/helm/or<component>/chart/ - Values files follow
values.yaml(defaults) with override patterns documented in componentdocs/
Configuration injection:
- Runtime configuration via environment variables and mounted config files
- Secrets must use Docker Compose secrets, Kubernetes Secrets, or environment variable injection — never baked into images
Observability:
- OpenTelemetry instrumentation is present in some components (e.g.,
dlstreamer-pipeline-server/src/opentelemetry/) - Enable via environment variables; refer to component documentation
Documentation versioning:
document-versions.yamlin each component tracks doc artifact versions- Update when publishing new component versions
Common Developer Workflows
Modifying a microservice (example: model-registry):
- Edit source in
<component>/src/ - Rebuild image:
make build - Run tests:
make test - Start service:
docker compose -f docker/docker-compose.yml up - Review logs:
docker compose -f docker/docker-compose.yml logs -f
Adding a Python dependency:
requirements.txt-based: add torequirements.txt, rebuild imagepyproject.toml/uv-based:uv add <package>, commit updateduv.lock- Dependency upgrades are a security-review trigger — load
.github/skills/security-review/SKILL.mdto check for CVE-related concerns and lockfile hygiene
Running linters:
make lint
# or directly
pylint src/
yamllint .Integration Points & Dependencies
External runtime services (component-specific, declared in docker/docker-compose.yml):
- Vector databases: Milvus (semantic-search, vector-retriever, visual-data-preparation)
- LLM backends: OpenAI-compatible API or local OpenVINO model server
- Message brokers: Kafka or MQTT (where applicable in pipeline-server)
- Object storage: MinIO or equivalent (model-download, document-ingestion)
OpenVINO:
- Used across inference-serving microservices for optimized edge inference
- Model format: IR (
.xml+.bin) or ONNX; see individual component docs
DLStreamer:
- GStreamer-based video analytics pipeline server
- Pipeline definitions via JSON or REST API; see
dlstreamer-pipeline-server/docs/
Documentation Requirements (Always-On)
When to update documentation
Update documentation immediately when making any of these changes:
- Adding new features, APIs, endpoints, or configuration options
- Modifying request/response formats or default behaviors
- Changing build targets, Makefile commands, or deployment procedures
- Updating dependencies or system requirements
- Adding or removing environment variables
- Publishing a new component version (update
document-versions.yaml)
Key documentation locations (per component)
<component>/README.md— Quick start and overview<component>/docs/user-guide/— Full user guide, API reference, build-from-source guidedocs.openedgeplatform.intel.com— Published cross-component documentation
Quick Reference: New Microservice Checklist
When adding a new microservice under microservices/:
- Create folder with
Dockerfile,Makefile,src/,requirements.txt(orpyproject.toml) - Add standard Makefile targets:
build,lint,test,coverage,help - Add
docker/docker-compose.ymlfor local development - Add Helm chart under
helm/withChart.yaml,values.yaml, and templates - Create tests in
tests/with appropriate test runner configuration - Add a CI workflow under
.github/workflows/for PR validation and scanning - Create
README.mdanddocs/with user guide and API reference - Add
document-versions.yamlfor documentation versioning - Ensure SPDX license headers are present in all source files
- Register component in root
README.mdcomponent table - Run security review (
.github/skills/security-review/SKILL.md) on Dockerfile, Helm chart, and CI/CD workflow before merging
Where files are headingNew Copilot instructions files have more rules about branches and pull requests, and fewer about code style.
Of the Copilot instructions files we read, the 2,297 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- generate-changelogSkill
- generate-release-notesSkill
- security-reviewSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

