bdd-feature-generator
Generates Gherkin BDD documentation by analyzing tr69hostif source code.
Install
mkdir -p .claude/skills/bdd-feature-generator && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17875" && unzip -o skill.zip -d .claude/skills/bdd-feature-generator && rm skill.zipInstalls to .claude/skills/bdd-feature-generator
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Generate BDD (Behavior Driven Development) feature files from tr69hostif source code analysis. Use for creating Gherkin-format documentation of TR-181 parameter handlers, daemon lifecycle, WebPA/Parodus communication, HTTP server protocol, and RFC store behavior. Produces gap analysis between feature files and L2 test implementations.Key capabilities
- →Generate BDD feature files from tr69hostif source code
- →Create functional documentation for TR-181 parameter handlers
- →Produce test specifications for L2 functional tests
- →Perform gap analysis between L2 tests and source implementation
How it works
The skill analyzes the tr69hostif source code, including build configurations and handler implementations, to automatically generate Gherkin-formatted BDD feature files.
Inputs & outputs
When to use bdd-feature-generator
- →Generate test specs for TR-181 parameters
- →Create BDD documentation for existing handlers
- →Analyze gaps between tests and implementation
About this skill
BDD Feature Generator for tr69hostif
Purpose
Automatically generate BDD feature files in Gherkin format by analyzing the tr69hostif source code. This skill creates comprehensive behavioral documentation that can serve as:
- Functional documentation of TR-181 data model parameter handlers (GET/SET)
- Test specifications for L2 functional tests (
test/functional-tests/) - Requirements traceability linking handler source code to observable behavior
- Gap analysis baseline for comparing L2 tests vs implemented handlers
Usage
Invoke this skill when:
- Documenting existing tr69hostif parameter handlers in BDD format
- Creating test specifications for new TR-181 parameters
- Generating feature files for untested profiles (WiFi, MoCA, Ethernet, etc.)
- Performing gap analysis between L2 tests and source implementation
- Onboarding new team members with behavioral documentation of the daemon
Project Context
tr69hostif is a TR-069/TR-181 host interface daemon for RDK devices. It:
- Exposes ~708 TR-181 parameters via rbus DML and HTTP/WDMP-C interfaces
- Communicates with Parodus/WebPA for cloud management
- Calls Thunder JSON-RPC plugins for device state (NetworkManager, AuthService, etc.)
- Manages RFC, Bootstrap, and Non-RFC parameter stores backed by INI files
- Runs as a systemd service with multiple initialization threads
Prerequisites
Before running this skill:
- Review the build system —
src/Makefile.amandsrc/hostif/profiles/Makefile.am - Identify compiled profiles — Only document profiles that are actually built
- Review existing feature files — Match the format in
docs/features/andtest/functional-tests/features/ - Check existing coverage — Read
test/docs/L2_Test_Coverage.mdfor current gap data - Understand test interfaces — L2 tests use
rbuscli(rbus DML), mockparodusbinary (WebPA), and log scraping
Process
Step 1: Analyze Build Configuration
The tr69hostif build is Autotools-based. Identify compiled components from the Makefile chain:
# Top-level: identifies src/ as the main SUBDIR
cat Makefile.am | grep "SUBDIRS"
# → SUBDIRS = $(SUBDIRS_MOCA) $(SUBDIRS_WIFI) src
# Source level: identifies compiled subsystems
cat src/Makefile.am | grep "SUBDIRS"
# → SUBDIRS = hostif/handlers hostif/profiles
# → SUBDIRS += hostif/parodusClient
# → SUBDIRS += hostif/httpserver (if !WITH_NEW_HTTP_SERVER_DISABLE)
# Profile level: identifies compiled TR-181 profile directories
cat src/hostif/profiles/Makefile.am | grep "SUBDIRS"
# → SUBDIRS = STBService Device DeviceInfo Ethernet IP Time
# → SUBDIRS += DHCPv4 (if WITH_DHCP_PROFILE)
# → SUBDIRS += StorageService (if WITH_STORAGESERVICE_PROFILE)
# → SUBDIRS += InterfaceStack (if WITH_INTFSTACK_PROFILE)
# → SUBDIRS += wifi (if WITH_WIFI_PROFILE)
Always compiled profiles:
| Profile Directory | TR-181 Namespace | Key Source Files |
|---|---|---|
profiles/STBService/ | Device.Services.STBService.* | Components_AudioOutput.cpp, Components_HDMI.cpp, Components_XrdkEMMC.cpp, etc. |
profiles/Device/ | Device.* (x_rdk) | x_rdk_profile.cpp |
profiles/DeviceInfo/ | Device.DeviceInfo.* | Device_DeviceInfo.cpp, XrdkBlueTooth.cpp, XrdkCentralComRFC.cpp, XrdkCentralComBSStore.cpp |
profiles/Ethernet/ | Device.Ethernet.* | Device_Ethernet_Interface.cpp, Device_Ethernet_Interface_Stats.cpp |
profiles/IP/ | Device.IP.* | Device_IP.cpp, Device_IP_Interface.cpp, Device_IP_Interface_IPv4Address.cpp, Device_IP_Interface_IPv6Address.cpp, Device_IP_Interface_Stats.cpp |
profiles/Time/ | Device.Time.* | Device_Time.cpp |
Conditionally compiled profiles:
| Profile Directory | Build Flag | TR-181 Namespace |
|---|---|---|
profiles/DHCPv4/ | WITH_DHCP_PROFILE | Device.DHCPv4.* |
profiles/StorageService/ | WITH_STORAGESERVICE_PROFILE | Device.StorageService.* |
profiles/InterfaceStack/ | WITH_INTFSTACK_PROFILE | Device.InterfaceStack.* |
profiles/wifi/ | WITH_WIFI_PROFILE | Device.WiFi.* |
Always compiled non-profile components:
| Component | Key Source Files | Purpose |
|---|---|---|
handlers/ | hostIf_rbus_Dml_Provider.cpp, hostIf_msgHandler.cpp, hostIf_jsonReqHandlerThread.cpp, etc. | Request routing, rbus DML registration |
parodusClient/ | Parodus/WebPA client | Cloud management interface |
httpserver/ (conditional) | http_server.cpp, request_handler.cpp, XrdkCentralComRFCVar.cpp | libsoup HTTP server for WDMP-C JSON |
Exclude from feature generation:
src/hostif/include/— Headers onlysrc/hostif/handlers/src/gtest/,src/hostif/profiles/*/gtest/— Unit tests (L1)src/hostif/*/docs/— Existing documentationtest/— Test infrastructurescripts/— Build/validation utilities
Step 2: Analyze Source Code Structure
For each compiled profile/component:
- Read the header file (
.h) — Identify allget_*andset_*handler declarations - Read the implementation (
.cpp) — Extract TR-181 parameter names from string comparisons, Thunder plugin calls, file I/O paths - Identify the request handler — Map the profile to its
hostIf_*_ReqHandler.cppinhandlers/src/ - Note conditional compilation —
#ifdef USE_WIFI_PROFILE,#ifdef BLE_TILE_PROFILE, etc. - Note Thunder dependencies — Any
JSONRPCLinkororg.rdk.*plugin invocations - Note file-backed parameters — INI files, RFC stores,
/opt/secure/RFC/paths
Key elements to extract for each profile:
| Element | Where to Find | Example |
|---|---|---|
| GET handler functions | .h class declaration | get_Device_DeviceInfo_ModelName() |
| SET handler functions | .h class declaration | set_Device_DeviceInfo_X_RDKCENTRAL_COM_FirmwareToDownload() |
| TR-181 parameter paths | .cpp string comparisons | "Device.DeviceInfo.ModelName" |
| Thunder plugin calls | .cpp Invoke() calls | org.rdk.NetworkManager.GetIPSettings |
| File-backed state | .cpp file open/write | /opt/secure/RFC/bootstrap.ini |
| Error return codes | .cpp return statements | NOK, OK |
| Compile guards | .h / .cpp #ifdef | USE_WIFI_PROFILE, BLE_TILE_PROFILE |
Step 3: Create Feature File Structure
Feature files are generated to docs/features/.
mkdir -p docs/features
Naming convention for tr69hostif:
| Source | Feature File | Description |
|---|---|---|
profiles/DeviceInfo/ | deviceinfo_parameters.feature | DeviceInfo standard + custom params |
profiles/DeviceInfo/XrdkBlueTooth.cpp | bluetooth_parameters.feature | BLE/Tile parameters |
profiles/IP/ | ip_interface.feature | IP, IPv4Address, IPv6Address, Stats |
profiles/Ethernet/ | ethernet_interface.feature | Ethernet interface + stats |
profiles/wifi/ | wifi_parameters.feature | WiFi Radio, SSID, AccessPoint, EndPoint |
profiles/moca/ | moca_interface.feature | MoCA interface, stats, QoS, mesh |
profiles/Time/ | time_parameters.feature | Time, NTP, Chrony |
profiles/STBService/ | stbservice_components.feature | AudioOutput, HDMI, eMMC, SDCard, etc. |
profiles/StorageService/ | storage_service.feature | PhysicalMedium |
profiles/DHCPv4/ | dhcpv4_client.feature | DHCPv4 client params |
profiles/InterfaceStack/ | interface_stack.feature | HigherLayer/LowerLayer |
handlers/src/hostIf_rbus_Dml_Provider.cpp | rbus_dml_registration.feature | rbus data element registration |
httpserver/ | http_server.feature | WDMP-C HTTP server protocol |
parodusClient/ | webpa_parodus.feature | WebPA/Parodus communication |
| Daemon lifecycle | bootup_sequence.feature | Init, threads, shutdown |
| RFC/Bootstrap stores | rfc_store.feature | RFC, Bootstrap, rfcVariable persistence |
Step 4: Generate Feature Files
Use this template for tr69hostif feature files:
####################################################################################
# If not stated otherwise in this file or this component's Licenses.txt file the
# following copyright and licenses apply:
#
# Copyright [YEAR] RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
####################################################################################
# Source: src/hostif/profiles/{ProfileDir}/{SourceFile}.cpp
Feature: {TR-181 Namespace} Parameter Handlers
Background:
Given the tr69hostif daemon is running and initialized
And rbuscli is available on the system
Scenario: GET {TR-181 Parameter Path}
When I GET "{parameter.path}" via rbus
Then the rbus response should not contain an error
And the rbus response should contain a valid value
Scenario: SET and GET {TR-181 Parameter Path}
When I SET "{parameter.path}" to "{test_value}" as {type} via rbus
And I GET "{parameter.path}" via rbus
Then the rbus response should not contain an error
And the rbus response should contain "{test_value}"
Step 5: Map Handler Code to Scenarios
For each TR-181 parameter handler, create scenarios covering:
- GET happy path — Normal successful GET returning expected value
- SET + GET roundtrip — SET a value, GET it back, verify match (for writable params)
- Error conditions — GET/SET on invalid instance, wrong data type
- File-backed persistence — Verify SET writes to INI file (for RFC/Bootstrap params)
- **Thunder
Content truncated.
When not to use it
- →When documenting components outside of tr69hostif
- →When the goal is not BDD feature file generation
- →When the project is not an RDK device project
Limitations
- →Specific to tr69hostif source code analysis
- →Generates documentation in Gherkin format only
- →Requires understanding of Autotools-based build system
How it compares
This skill automates the creation of behavioral documentation and test specifications directly from source code, which is more efficient than manual documentation and helps identify gaps between implementation and tests.
Compared to similar skills
bdd-feature-generator side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| bdd-feature-generator (this skill) | 0 | 17d | Review | Advanced |
| svelte-expert | 11 | 9mo | No flags | Intermediate |
| agent-implementer-sparc-coder | 1 | 5mo | Review | Intermediate |
| squirrel | 0 | 1mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by rdkcentral
View all by rdkcentral →You might also like
svelte-expert
Raudbjorn
Expert Svelte/SvelteKit development assistant for building components, utilities, and applications. Use when creating Svelte components, SvelteKit applications, implementing reactive patterns, handling state management, working with stores, transitions, animations, or any Svelte/SvelteKit development task. Includes comprehensive documentation access, code validation with svelte-autofixer, and playground link generation.
agent-implementer-sparc-coder
ruvnet
Agent skill for implementer-sparc-coder - invoke with $agent-implementer-sparc-coder
squirrel
Youssef-Ashraf2099
Full-cycle AI coding skill: plans, builds, tests, lints, fixes bugs, and writes production-grade docs. Auto-detects project state and adapts its 8-phase pipeline.
scaffold-feature
niklasbrandt
Scaffold a complete full-stack feature: FastAPI endpoint, dashboard Web Component, i18n keys, test stubs, and documentation checks.
coder
eq-lab
Implement a planned Pipeline GitHub Issue by number. Use when Codex is asked to execute an active plan end-to-end, update code/tests/docs, mark plan steps complete, run the relevant verification commands, and report results without editing issue labels, closing the Issue, moving the plan, or committ
specX
TreeX-X
Spec-driven coding workflow for coderX agents. Use this skill whenever implementing, fixing, refactoring, or iterating code from hybrid docs or specified requirements, especially when file index, knowledge index, or evaluator findings are present.