Agentic development and maintenance support #278
Conversation
Includes reusable instructions, agents and skills based on scenario
Add quality check on demand workflow and agent skill Include sample documentations generated by agent
There was a problem hiding this comment.
Pull request overview
This PR introduces an “agentic development” setup (Copilot instructions/skills/agents + a quality-checks workflow) and adds a large set of Telemetry 2.0 documentation pages (root README, architecture overview, public API docs, and component docs). It also removes the in-repo container build assets for the mock/native-platform environments and updates container guidance to reference prebuilt images.
Changes:
- Add documentation set: architecture overview, public API reference, and component READMEs (bulkdata, scheduler), plus docs index + root README.
- Add agentic development scaffolding under
.github/(instructions, skills, agents) and a manual “Copilot Quality Checks” workflow. - Remove container/mock-xconf/native-platform implementation files and scripts, and update
containers/README.mdto reference external images.
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| source/docs/scheduler/README.md | Adds scheduler component documentation (architecture/API/testing sections). |
| source/docs/bulkdata/README.md | Adds bulkdata component documentation (structures/flows/testing sections). |
| docs/architecture/overview.md | Adds a high-level system architecture overview with diagrams and models. |
| docs/api/public-api.md | Adds public API reference documentation and examples. |
| docs/README.md | Adds documentation hub/index and navigation. |
| containers/native-platform/mock-rfc-providers/rfc_provider.c | Removes mock RFC provider implementation. |
| containers/native-platform/mock-rfc-providers/configure.ac | Removes autotools config for mock RFC provider. |
| containers/native-platform/mock-rfc-providers/Makefile.am | Removes build rules for mock RFC provider. |
| containers/native-platform/log4crc | Removes log4c configuration from native-platform container assets. |
| containers/native-platform/entrypoint.sh | Removes native-platform container entrypoint script. |
| containers/native-platform/dependent_rdk_pkg_installer.sh | Removes script that cloned/built dependent RDK packages in-container. |
| containers/native-platform/debug.ini | Removes debug.ini logging configuration asset. |
| containers/native-platform/Dockerfile | Removes native-platform Dockerfile (previously built in-repo). |
| containers/mock-xconf/xconf-dcm-response1.json | Removes mock XConf response fixture. |
| containers/mock-xconf/xconf-dcm-response.json | Removes mock XConf response fixture. |
| containers/mock-xconf/index.html | Removes mock XConf HTML selector page. |
| containers/mock-xconf/getT2DCMSettings.js | Removes mock XConf settings server implementation. |
| containers/mock-xconf/entrypoint.sh | Removes mock-xconf container entrypoint. |
| containers/mock-xconf/data.json | Removes mock data fixture. |
| containers/mock-xconf/data-lake-mock.js | Removes mock data lake server implementation. |
| containers/mock-xconf/Dockerfile | Removes mock-xconf Dockerfile (previously built in-repo). |
| containers/compose.yaml | Removes docker compose file used to run local container stack. |
| containers/build.sh | Removes local container build script. |
| containers/README.md | Updates container documentation to reference prebuilt images. |
| containers/CHANGELOG.md | Removes container changelog file. |
| README.md | Adds new root project README with quick start and documentation links. |
| .github/workflows/copilot-quality-checks.yml | Adds a workflow to run cppcheck/valgrind/helgrind/build verification in a container. |
| .github/skills/thread-safety-analyzer/SKILL.md | Adds thread-safety analyzer skill documentation. |
| .github/skills/technical-documentation-writer/SKILL.md | Adds technical documentation writer skill documentation. |
| .github/skills/quality-checker/SKILL.md | Adds container-based quality checker skill documentation. |
| .github/skills/quality-checker/README.md | Adds quick-start usage for the quality-checker skill. |
| .github/skills/platform-portability-checker/SKILL.md | Adds platform portability checker skill documentation. |
| .github/skills/memory-safety-analyzer/SKILL.md | Adds memory safety analyzer skill documentation. |
| .github/instructions/shell-scripts.instructions.md | Adds shell scripting standards for the repo. |
| .github/instructions/cpp-testing.instructions.md | Adds C++/gtest testing standards for the repo. |
| .github/instructions/c-embedded.instructions.md | Adds embedded C coding standards for the repo. |
| .github/instructions/build-system.instructions.md | Adds Autotools/build-system standards for the repo. |
| .github/copilot-instructions.md | Adds top-level Copilot instructions for repo constraints and practices. |
| .github/agents/legacy-refactor-specialist.agent.md | Adds a legacy refactoring specialist agent definition. |
| .github/agents/embedded-c-expert.agent.md | Adds an embedded C expert agent definition. |
| .github/README.md | Adds an overview of the agentic development system and how to use it. |
| .github/DOCUMENTATION_GUIDE.md | Adds a documentation framework/setup summary and usage guide. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 42 out of 42 changed files in this pull request and generated 18 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 40 out of 41 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| - [Architecture Overview](architecture/overview.md) - System design and components | ||
| - [API Reference](api/public-api.md) - Public API documentation | ||
| - [Developer Guide](integration/developer-guide.md) - Getting started for developers | ||
| - [Build Setup](integration/build-setup.md) - Build environment configuration | ||
| - [Testing Guide](integration/testing.md) - Test procedures and coverage | ||
|
|
There was a problem hiding this comment.
The docs index references a docs/integration/ and docs/troubleshooting/ structure (and links to multiple files under them), but those directories/files aren’t part of this PR and don’t exist in the repo. Consider either adding those stub docs now, or removing/marking these links as TODO so readers don’t hit dead links.
| Individual component documentation is in [`source/docs/`](source/docs/): | ||
|
|
||
| - [Bulk Data System](source/docs/bulkdata/README.md) - Profile and marker management | ||
| - [HTTP Protocol](source/docs/protocol/README.md) - Communication layer | ||
| - [Scheduler](source/docs/scheduler/README.md) - Report scheduling | ||
| - [XConf Client](source/docs/xconf-client/README.md) - Configuration retrieval |
There was a problem hiding this comment.
This section links to source/docs/... component documentation files, but there is no source/docs/ directory in the repository (current source tree is under source/ without a docs subdir). Either add the component docs in the referenced locations or update these links to the actual paths (e.g., source/protocol/ for the CURL doc added in this PR).
| Individual component documentation is in [`source/docs/`](source/docs/): | |
| - [Bulk Data System](source/docs/bulkdata/README.md) - Profile and marker management | |
| - [HTTP Protocol](source/docs/protocol/README.md) - Communication layer | |
| - [Scheduler](source/docs/scheduler/README.md) - Report scheduling | |
| - [XConf Client](source/docs/xconf-client/README.md) - Configuration retrieval | |
| Individual component documentation is in [`source/`](source/): | |
| - [Bulk Data System](source/bulkdata/README.md) - Profile and marker management | |
| - [HTTP Protocol](source/protocol/README.md) - Communication layer | |
| - [Scheduler](source/scheduler/README.md) - Report scheduling | |
| - [XConf Client](source/xconf-client/README.md) - Configuration retrieval |
| ```c | ||
| // Profile list protection | ||
| static pthread_mutex_t g_profile_list_mutex = PTHREAD_MUTEX_INITIALIZER; | ||
|
|
||
| // Connection pool protection | ||
| static pthread_mutex_t g_pool_mutex = PTHREAD_MUTEX_INITIALIZER; | ||
| static pthread_cond_t g_pool_cond = PTHREAD_COND_INITIALIZER; | ||
|
|
||
| // Event queue protection | ||
| static pthread_mutex_t g_event_queue_mutex = PTHREAD_MUTEX_INITIALIZER; | ||
| static pthread_cond_t g_event_queue_cond = PTHREAD_COND_INITIALIZER; | ||
|
|
||
| // Marker cache protection | ||
| static pthread_rwlock_t g_marker_cache_lock = PTHREAD_RWLOCK_INITIALIZER; | ||
|
|
There was a problem hiding this comment.
The synchronization primitive examples use names like g_pool_mutex, g_profile_list_mutex, and g_marker_cache_lock, but these identifiers don’t exist in the codebase (e.g., profile list uses plMutex, the curl pool uses pool_mutex). Either align the names with the real globals or clearly label this block as pseudocode and provide a mapping to the actual symbols/files to avoid confusion during debugging.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…280) * Initial plan * fix docs: correct Event Receiver queue type and size in architecture overview Co-authored-by: shibu-kv <89052442+shibu-kv@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: shibu-kv <89052442+shibu-kv@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 40 out of 40 changed files in this pull request and generated 13 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| - **Purpose**: Match events to profile markers | ||
| - **Algorithm**: Hash table lookup (O(1) average) | ||
| - **Concurrency**: Read-write lock for parallel matching | ||
| - **Files**: `source/bulkdata/t2markers.c` |
There was a problem hiding this comment.
Marker Matcher concurrency is documented as using a read-write lock, but source/bulkdata/t2markers.c uses pthread_mutex_t (t2MarkersMutex / t2CompListMutex) for synchronization. Please update the concurrency description so it matches the actual locking strategy.
| # GOOD: Use set -e for fail-fast | ||
| set -e # Exit on any error | ||
| set -u # Exit on undefined variable | ||
| set -o pipefail # Catch errors in pipes | ||
|
|
There was a problem hiding this comment.
This guidance conflicts with the earlier “Use POSIX Shell” section: set -o pipefail is not POSIX and isn’t supported by all /bin/sh implementations. Consider either removing it, or explicitly calling out it as optional/conditional on shell support (and keep examples POSIX-compatible).
| ``` | ||
| docs/ | ||
| ├── architecture/ # System architecture and design | ||
| │ ├── overview.md # High-level system architecture | ||
| │ ├── components.md # Component relationships | ||
| │ ├── threading-model.md # Threading and synchronization | ||
| │ └── data-flow.md # Data flow and state machines | ||
| ├── api/ # API documentation | ||
| │ ├── public-api.md # Public API reference | ||
| │ ├── internal-api.md # Internal API reference | ||
| │ └── error-codes.md # Error codes and meanings | ||
| ├── integration/ # Integration and setup guides | ||
| │ ├── developer-guide.md # Getting started guide | ||
| │ ├── build-setup.md # Build configuration | ||
| │ ├── platform-porting.md # Porting to new platforms | ||
| │ └── testing.md # Testing procedures | ||
| └── troubleshooting/ # Debug and troubleshooting | ||
| ├── memory-issues.md # Memory debugging | ||
| ├── threading-issues.md # Thread debugging | ||
| └── common-errors.md # Common error solutions |
There was a problem hiding this comment.
The “Documentation Structure” section lists multiple files that aren’t present (e.g., architecture/components.md, api/internal-api.md, troubleshooting/common-errors.md). This makes the documentation index misleading; either add these files or remove/mark them as future work with a clear note.
|
|
||
| Documentation improvements are welcome! When contributing: | ||
|
|
||
| 1. Follow the [Documentation Style Guide](.github/skills/technical-documentation-writer/SKILL.md) |
There was a problem hiding this comment.
This relative link is incorrect from docs/README.md (it points to docs/.github/...). It should reference the repository root, e.g. ../.github/skills/technical-documentation-writer/SKILL.md, or another valid path.
| | `T2ERROR_SUCCESS` | `0` | Operation succeeded | | ||
| | `T2ERROR_FAILURE` | `1` | Generic failure | | ||
| | `T2ERROR_INVALID_ARGS` | — | NULL or invalid parameter passed | | ||
| | `T2ERROR_MEMALLOC_FAILED` | — | Memory allocation failed | | ||
| | `T2ERROR_COMPONENT_NULL` | — | `t2_init()` not called before event send | |
There was a problem hiding this comment.
The Error Codes “Value” column is inconsistent with the actual T2ERROR enum in include/telemetry2_0.h (values are sequential and T2ERROR_INVALID_ARGS, T2ERROR_MEMALLOC_FAILED, T2ERROR_COMPONENT_NULL, etc. do have numeric values). Please either fill in the correct numeric values or remove the “Value” column to avoid implying they’re undefined.
| - `t2_event_d()` - Numeric events | ||
| - `t2_event_f()` - Formatted events | ||
| - **Thread Safety**: Fully thread-safe | ||
| - **Files**: `source/telemetry2_0.c`, `include/telemetry2_0.h` |
There was a problem hiding this comment.
The Public API “Files” pointers are incorrect: t2_init/t2_event_* are declared in include/telemetry_busmessage_sender.h and implemented in source/commonlib/telemetry_busmessage_sender.c, not include/telemetry2_0.h / source/telemetry2_0.c. Please update the file references to match the actual API location.
| - [Component Documentation](../../source/docs/) - Detailed component docs | ||
| - [Threading Model](threading-model.md) - Thread safety details | ||
| - [API Reference](../api/public-api.md) - Public API | ||
| - [Build System](../integration/build-setup.md) - Build configuration | ||
| - [Testing Guide](../integration/testing.md) - Test procedures |
There was a problem hiding this comment.
These “See Also” links currently point to files/directories that aren’t present (threading-model.md, ../integration/*). Either add the referenced docs or adjust the links to existing pages to avoid broken navigation.
| T2Warn("Report send failed (attempt %d): %d\n", | ||
| retry_count + 1, ret); | ||
|
|
||
| usleep(backoff_ms * 1000); | ||
| backoff_ms *= 2; // Exponential backoff | ||
| retry_count++; |
There was a problem hiding this comment.
The example uses T2Warn(...), but the codebase defines T2Warning(...) (see source/utils/t2log_wrapper.h) and doesn’t appear to define T2Warn. Please update the snippet to use the correct logging macro name.
| **Returns:** | ||
| - `T2ERROR_SUCCESS` - Event sent or queued | ||
| - `T2ERROR_FAILURE` - Send failed or event filtered | ||
|
|
||
| **Thread Safety:** Thread-safe. Can be called from any thread. | ||
|
|
||
| **Notes:** | ||
| - Event matched against active profile markers | ||
| - Empty value (`""`) or value `"0"` is ignored without sending | ||
| - Returns `T2ERROR_FAILURE` if `t2_init()` has not been called | ||
|
|
There was a problem hiding this comment.
The documented return behavior for t2_event_s() is inaccurate: when eventing is filtered out, filtered_event_send returns 0 and t2_event_s reports T2ERROR_SUCCESS (i.e., filtering is treated as success). Also, if t2_init() was not called, the function returns T2ERROR_COMPONENT_NULL, not T2ERROR_FAILURE. Please update the Returns/Notes to reflect the actual T2ERROR values.
No description provided.