Skip to content

Commit 6eca661

Browse files
authored
Feature/add agents md (#814)
* Add initial AGENTS.md
1 parent 55f059e commit 6eca661

File tree

2 files changed

+92
-0
lines changed

2 files changed

+92
-0
lines changed

AGENTS.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
<!--
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with
4+
this work for additional information regarding copyright ownership.
5+
The ASF licenses this file to You under the Apache License, Version 2.0
6+
(the "License"); you may not use this file except in compliance with
7+
the License. You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
18+
# Project overview
19+
20+
Apache Celix is an implementation of the OSGi specification adapted for C (C11) and C++ (C++14).
21+
It enables a dynamic, modular software architecture using bundles, services, and components.
22+
23+
Key Concepts
24+
- Bundles: Deployment units (zip files) containing libraries and resources.
25+
- Services: Function pointer structs (C) or abstract classes (C++) registered in a framework-wide registry.
26+
- Components: Logic units managed by the Dependency Manager (DM) that handle service lifecycle (init, start, stop, deinit) declaratively.
27+
- Containers: Executables created via add_celix_container that launch a framework instance with preconfigured bundles.
28+
29+
## Building (Offline Priority)
30+
31+
Assume no internet connection. Request confirmation before installing system packages.
32+
33+
```bash
34+
35+
# Initial configure build:
36+
cmake \
37+
-DCMAKE_FETCHCONTENT_FULLY_DISCONNECTED=ON \
38+
-DENABLE_TESTING=ON \
39+
-DRSA_JSON_RPC=ON \
40+
-DRSA_REMOTE_SERVICE_ADMIN_SHM_V2=ON \
41+
-DCMAKE_BUILD_TYPE=Debug \
42+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
43+
-G Ninja \
44+
-S . -B build
45+
46+
# Initial configure build, if a download is needed:
47+
cmake \
48+
-DENABLE_TESTING=ON \
49+
-DRSA_JSON_RPC=ON \
50+
-DRSA_REMOTE_SERVICE_ADMIN_SHM_V2=ON \
51+
-DCMAKE_BUILD_TYPE=Debug \
52+
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
53+
-G Ninja \
54+
-S . -B build
55+
56+
# Compile:
57+
cmake --build build --parallel
58+
```
59+
60+
# Test Execution
61+
62+
After building, run the tests for the components you changed. Run `ctest` from
63+
the appropriate `build` subdirectory when possible.
64+
For example, to test the shell bundles:
65+
66+
Scoped:
67+
```bash
68+
ctest --output-on-failure --test-dir build/<sub-dir>
69+
```
70+
71+
Full Suite:
72+
```bash
73+
ctest --output-on-failure --test-dir build
74+
```
75+
76+
With exception of documentation changes, always build and run the test before submitting changes.
77+
78+
# Quality Standards
79+
80+
- Line Coverage: New code must aim for >95% line coverage.
81+
- Error Injection: Use or extend the Apache Celix error_injector libraries to inject errors in unit tests to ensure high code coverage.
82+
83+
# Coding Style
84+
85+
- Refer to the [development guide](documents/development/README.md) for the project's coding conventions.
86+
- New files should be formatted with the project's `.clang-format` configuration.
87+

documents/development/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ Note that not all existing code adheres to these conventions.
2828
New code should adhere to these conventions, and when possible, existing code should be updated to adhere to these
2929
conventions.
3030

31+
## Using Generative AI
32+
33+
- You own any code you submit, including AI-assisted changes. GenAI suggestions do not transfer ownership or responsibility.
34+
- Review AI-produced code critically for structure, threading behavior, resource handling, coding conventions, and test coverage.
35+
3136
## Naming Conventions
3237

3338
### C/C++ Variables

0 commit comments

Comments
 (0)