autonomousguy 0.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +96 -0
- package/bin/validate.js +119 -0
- package/package.json +54 -0
- package/skills/autosar/autosar-bsw/SKILL.md +586 -0
- package/skills/autosar/autosar-bsw/references/adaptive-ap.md +104 -0
- package/skills/autosar/autosar-bsw/references/boot-nvm-power.md +127 -0
- package/skills/autosar/autosar-bsw/references/com-stack.md +118 -0
- package/skills/autosar/autosar-bsw/references/comms-protocol.md +130 -0
- package/skills/autosar/autosar-swc/SKILL.md +531 -0
- package/skills/autosar/autosar-swc/references/adaptive-ap.md +69 -0
- package/skills/autosar/autosar-swc/references/rte-api.md +149 -0
- package/skills/change-management/change-and-impact/SKILL.md +259 -0
- package/skills/change-management/change-and-impact/references/html-report-template.html +154 -0
- package/skills/code-quality/code-review/SKILL.md +287 -0
- package/skills/code-quality/code-review/references/adaptive-ap.md +30 -0
- package/skills/code-quality/code-review/references/html-report-template.html +154 -0
- package/skills/code-quality/misra/SKILL.md +306 -0
- package/skills/code-quality/misra/references/html-report-template.html +154 -0
- package/skills/code-quality/misra/references/rules.md +72 -0
- package/skills/debugging/embedded-debugging/SKILL.md +250 -0
- package/skills/debugging/embedded-debugging/references/adaptive-ap.md +33 -0
- package/skills/debugging/embedded-debugging/references/html-report-template.html +154 -0
- package/skills/requirements/requirements/SKILL.md +298 -0
- package/skills/safety/iso26262/SKILL.md +199 -0
- package/skills/safety/iso26262/references/asil-table.md +86 -0
- package/skills/testing/embedded-testing/SKILL.md +288 -0
- package/skills/workspace/codebase-analysis/SKILL.md +548 -0
- package/skills/workspace/codebase-analysis/references/adaptive-ap.md +77 -0
- package/skills/workspace/codebase-analysis/references/html-report-template.html +154 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# AUTOSAR Classic RTE API & Port-Interface Reference
|
|
2
|
+
|
|
3
|
+
Reference for AUTOSAR Classic Platform RTE APIs, port-interface ComSpecs, runnable activation events, and platform/application data types. Use alongside the SKILL.md autosar-swc modes when you need the canonical naming or a quick lookup for a specific API.
|
|
4
|
+
|
|
5
|
+
## RTE API naming convention
|
|
6
|
+
|
|
7
|
+
All RTE APIs follow: `Rte_<access>_<portName>_<elementOrOperation>()`.
|
|
8
|
+
|
|
9
|
+
| `<access>` | Used for | Example |
|
|
10
|
+
|------------|---------------------------------------------------|------------------------------------------------------|
|
|
11
|
+
| `Read` | S/R receiver, explicit access | `Rte_Read_RBattVoltage_Voltage_mV(&v)` |
|
|
12
|
+
| `Write` | S/R sender, explicit access | `Rte_Write_PLowVoltageWarning_Active(TRUE)` |
|
|
13
|
+
| `IRead` | S/R receiver, implicit access (data copied to local DEH at runnable start) | `v = Rte_IRead_MainRunnable_RBattVoltage_Voltage_mV()` |
|
|
14
|
+
| `IWrite` | S/R sender, implicit access | `Rte_IWrite_MainRunnable_PLowVoltageWarning_Active(TRUE)` |
|
|
15
|
+
| `Call` | C/S client operation invocation | `Rte_Call_RNvMService_ReadBlock(blockId, &buf)` |
|
|
16
|
+
| `Result` | C/S client async operation result | `Rte_Result_RNvMService_ReadBlock(&status)` |
|
|
17
|
+
| `Receive` | S/R receiver, queued (event semantics) | `Rte_Receive_REvent_Type(&evt)` |
|
|
18
|
+
| `Send` | S/R sender, queued | `Rte_Send_PEvent_Type(evt)` |
|
|
19
|
+
| `Mode` | Mode switch current mode read | `Rte_Mode_RWindowMode_currentMode()` |
|
|
20
|
+
| `Switch` | Mode switch issue | `Rte_Switch_PWindowMode_mode(WINDOW_MOVING_UP)` |
|
|
21
|
+
| `Enter`/`Exit` | ExclusiveArea critical section | `Rte_Enter_EA_CoolantState() / Rte_Exit_EA_CoolantState()` |
|
|
22
|
+
| `Trigger` | Trigger an InterRunnableTriggerEvent | `Rte_Trigger_PMyTrigger()` |
|
|
23
|
+
| `Feedback` | TX confirmation from a sender | `Rte_Feedback_PCanSignal_Value()` |
|
|
24
|
+
|
|
25
|
+
Naming convention for the port: `P<InterfaceName>` for provided, `R<InterfaceName>` for required.
|
|
26
|
+
|
|
27
|
+
## Port interface types
|
|
28
|
+
|
|
29
|
+
### SenderReceiver (S/R)
|
|
30
|
+
|
|
31
|
+
Used for continuous or periodic data streams (sensor values, status flags, calculated outputs).
|
|
32
|
+
|
|
33
|
+
**Sender ComSpec**:
|
|
34
|
+
- `InitValue` — value transmitted before the runnable produces its first real output. Use a value that downstream consumers can recognise as "not yet valid" (often the same as the receiver's init).
|
|
35
|
+
|
|
36
|
+
**Receiver ComSpec**:
|
|
37
|
+
- `InitValue` — what the receiver reads if no message has arrived (e.g., before init, after timeout).
|
|
38
|
+
- `AliveTimeout` — for safety-relevant signals, max time without an update before the receiver applies the InitValue. `0` disables. Typically `2× sender period` for ASIL-tagged signals.
|
|
39
|
+
- `HandleOutOfRange` — what the receiver does if the sender writes outside the data type range.
|
|
40
|
+
|
|
41
|
+
### ClientServer (C/S)
|
|
42
|
+
|
|
43
|
+
Used for request/response (NvM read/write, diagnostic request, calibration trigger).
|
|
44
|
+
|
|
45
|
+
- Synchronous: server runs in caller context (return immediately).
|
|
46
|
+
- Asynchronous: server runs in its own context; client uses `Rte_Result_*` to poll.
|
|
47
|
+
- Operations carry `IN` / `OUT` / `INOUT` arguments and a `Std_ReturnType` (`E_OK`/`E_NOT_OK`) plus optional ApplicationErrors.
|
|
48
|
+
|
|
49
|
+
### Mode Switch
|
|
50
|
+
|
|
51
|
+
Used for mode-dependent runnable activation. ModeDeclarationGroup defines the set of modes; mode-switching SWC issues `Rte_Switch_*`; receiving runnables can be activated by `OnEntry`/`OnExit` events or guarded by `DisabledModeRef`.
|
|
52
|
+
|
|
53
|
+
### Parameter
|
|
54
|
+
|
|
55
|
+
Used for calibration data — runtime-readable but normally fixed at integration. Provided by a ParameterSWC or mapped to a NvM block.
|
|
56
|
+
|
|
57
|
+
## Runnable activation events
|
|
58
|
+
|
|
59
|
+
| Event | When the runnable fires | Notes |
|
|
60
|
+
|----------------------------|----------------------------------------------------------|------------------------------------------|
|
|
61
|
+
| `InitEvent` | Once during SWC startup | Use for one-shot init only |
|
|
62
|
+
| `TimingEvent` | Periodically with a configured period (e.g., 10 ms) | Most common for periodic algorithms |
|
|
63
|
+
| `DataReceivedEvent` | A new value arrives on an S/R receiver port | For event-driven processing |
|
|
64
|
+
| `DataReceivedErrorEvent` | A receive error occurred (timeout, range violation) | Safety reaction hook |
|
|
65
|
+
| `DataSendCompletedEvent` | An S/R send completed (confirmation) | TX feedback handler |
|
|
66
|
+
| `OperationInvokedEvent` | A C/S server operation is invoked | Implements the server side |
|
|
67
|
+
| `AsynchronousServerCallReturnsEvent` | An async C/S call completes | Client-side completion handler |
|
|
68
|
+
| `SwcModeSwitchEvent` | The mode of a referenced ModeDeclarationGroup changes | Use with `OnEntry` / `OnExit` specifier |
|
|
69
|
+
| `ModeSwitchedAckEvent` | Acknowledgement of a mode switch | Mode-coordination handshake |
|
|
70
|
+
| `BackgroundEvent` | When no other runnable is ready (lowest priority) | Use sparingly |
|
|
71
|
+
| `InterRunnableTriggerEvent` | One runnable triggers another within the same SWC | Lightweight intra-SWC dispatch |
|
|
72
|
+
|
|
73
|
+
## ExclusiveArea
|
|
74
|
+
|
|
75
|
+
Protects shared variables accessed by multiple runnables (or a runnable + ISR).
|
|
76
|
+
|
|
77
|
+
Declaration: `<EXCLUSIVE-AREA><SHORT-NAME>EA_MyArea</SHORT-NAME></EXCLUSIVE-AREA>` in the SWC InternalBehavior.
|
|
78
|
+
|
|
79
|
+
Usage:
|
|
80
|
+
```c
|
|
81
|
+
Rte_Enter_EA_MyArea();
|
|
82
|
+
/* critical section */
|
|
83
|
+
Rte_Exit_EA_MyArea();
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The RTE generator maps each ExclusiveArea to an `OsResource` (or interrupt-disable region, depending on `RteExclusiveAreaImplMechanism` config). Two runnables both calling `Rte_Enter_EA_MyArea()` are guaranteed mutual exclusion.
|
|
87
|
+
|
|
88
|
+
## AUTOSAR platform types vs C99
|
|
89
|
+
|
|
90
|
+
| Use case | AUTOSAR Classic | C99 `<stdint.h>` (do NOT mix in SWC code) |
|
|
91
|
+
|-------------------------------------|-----------------------|--------------------------------------------|
|
|
92
|
+
| 8-bit unsigned | `uint8` | `uint8_t` |
|
|
93
|
+
| 16-bit unsigned | `uint16` | `uint16_t` |
|
|
94
|
+
| 32-bit unsigned | `uint32` | `uint32_t` |
|
|
95
|
+
| 8-bit signed | `sint8` | `int8_t` |
|
|
96
|
+
| 16-bit signed | `sint16` | `int16_t` |
|
|
97
|
+
| 32-bit signed | `sint32` | `int32_t` |
|
|
98
|
+
| Boolean | `boolean` (`TRUE`/`FALSE`) | `bool` or `int` |
|
|
99
|
+
| Float | `float32` | `float` |
|
|
100
|
+
| Double | `float64` | `double` |
|
|
101
|
+
|
|
102
|
+
**Convention:** platform types have **no `_t` suffix**. ApplicationDataTypes (project-defined semantic typedefs over a platform type) conventionally **do** use `_t` (e.g., `BatMon_Voltage_mV_t`).
|
|
103
|
+
|
|
104
|
+
`Std_ReturnType` from `Std_Types.h`: `E_OK` (0), `E_NOT_OK` (1), or application-specific extensions (0x02–0x3F reserved for AUTOSAR; >= 0x40 for user errors).
|
|
105
|
+
|
|
106
|
+
## SWC type quick reference
|
|
107
|
+
|
|
108
|
+
| SWC type | Allowed to | Forbidden |
|
|
109
|
+
|--------------------|---------------------------------------------------------|------------------------------------------|
|
|
110
|
+
| Application | RTE access only | Direct BSW, direct MCAL, register access |
|
|
111
|
+
| Sensor/Actuator | RTE + IoHwAb (which bridges to MCAL) | Direct MCAL or register access |
|
|
112
|
+
| Service | RTE + the wrapped BSW module (NvM, Dem, Dcm, Com) | Direct MCAL or register access |
|
|
113
|
+
| Complex Device Driver | Direct MCAL or register access (with documented rationale) | RTE access from other SWCs only via ports |
|
|
114
|
+
| Composition | Groups other SWCs; no behaviour of its own | No runnables |
|
|
115
|
+
|
|
116
|
+
## MCAL abstraction rule
|
|
117
|
+
|
|
118
|
+
Application and Service SWCs **must not** access hardware registers or call MCAL APIs directly. All hardware interaction routes through:
|
|
119
|
+
- **IoHwAb** (I/O Hardware Abstraction) for sensors and actuators (Dio, Adc, Pwm, Spi via wrapper).
|
|
120
|
+
- **BSW modules** for communication (Com), persistence (NvM), diagnostics (Dem, Dcm), and OS (Os).
|
|
121
|
+
|
|
122
|
+
A Complex Device Driver (CDD) is the only SWC type allowed direct MCAL access, and only when the documented rationale (timing, custom protocol, etc.) shows IoHwAb is insufficient.
|
|
123
|
+
|
|
124
|
+
## ARXML element quick reference
|
|
125
|
+
|
|
126
|
+
| Element | Purpose |
|
|
127
|
+
|----------------------------------------|------------------------------------------------------------|
|
|
128
|
+
| `APPLICATION-SW-COMPONENT-TYPE` | Application SWC type definition |
|
|
129
|
+
| `SENSOR-ACTUATOR-SW-COMPONENT-TYPE` | Sensor/Actuator SWC type definition |
|
|
130
|
+
| `SERVICE-SW-COMPONENT-TYPE` | Service SWC type definition |
|
|
131
|
+
| `COMPLEX-DEVICE-DRIVER-SW-COMPONENT-TYPE` | CDD definition |
|
|
132
|
+
| `COMPOSITION-SW-COMPONENT-TYPE` | Composition wrapping other SWCs |
|
|
133
|
+
| `P-PORT-PROTOTYPE` | Provided port |
|
|
134
|
+
| `R-PORT-PROTOTYPE` | Required port |
|
|
135
|
+
| `PR-PORT-PROTOTYPE` | Combined provided + required (rare) |
|
|
136
|
+
| `SENDER-RECEIVER-INTERFACE` | S/R interface definition |
|
|
137
|
+
| `CLIENT-SERVER-INTERFACE` | C/S interface definition |
|
|
138
|
+
| `MODE-SWITCH-INTERFACE` | Mode switch interface |
|
|
139
|
+
| `PARAMETER-INTERFACE` | Calibration parameter interface |
|
|
140
|
+
| `VARIABLE-DATA-PROTOTYPE` | S/R DataElement |
|
|
141
|
+
| `CLIENT-SERVER-OPERATION` | C/S Operation |
|
|
142
|
+
| `SWC-INTERNAL-BEHAVIOR` | Runnables + events + ExclusiveAreas inside the SWC |
|
|
143
|
+
| `RUNNABLE-ENTITY` | One runnable |
|
|
144
|
+
| `TIMING-EVENT` | Periodic activation |
|
|
145
|
+
| `INIT-EVENT` | Init-time activation |
|
|
146
|
+
| `DATA-RECEIVED-EVENT` | Trigger on S/R receiver new data |
|
|
147
|
+
| `EXCLUSIVE-AREA` | Mutex region |
|
|
148
|
+
| `ASSEMBLY-SW-CONNECTOR` | Connects two SWC prototypes' ports in a composition |
|
|
149
|
+
| `DELEGATION-SW-CONNECTOR` | Delegates a composition port to an inner SWC port |
|
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: change-and-impact
|
|
3
|
+
short: Analyse a change request before work begins or trace ripple effects of a proposed change
|
|
4
|
+
description: "Change-management expert that operates in two modes: (1) CR analysis — take a change request / ECN / feature brief and produce affected-element list, ASIL impact, implementation plan with owner hints and complexity, test plan delta, and integration risks; (2) Impact analysis — trace a specific change through every layer (SWCs, BSW modules, ARXML interfaces, requirements, tests, safety artefacts), distinguishing direct impacts (must change) from indirect impacts (must review or retest), and recommend a regression scope (Minimal / Targeted / Full). Applies ASPICE SWE.6 and ISO 26262-6 §7.4 / -8 §8.4 change practices. Traces the full ripple in a single pass, returns a decision-ready plan/scope with a built-in self-check and explicit confidence/gaps, and can optionally emit a self-contained HTML report under analysis/."
|
|
5
|
+
category: change-management
|
|
6
|
+
tags: [change-request, impact-analysis, change-management, regression, autosar, classic, adaptive, ap, ara-com, iso26262, aspice, embedded]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Skill: Change Management
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
You are a senior embedded automotive software engineer and architect. You review incoming change requests before work begins and you trace the ripple effects of proposed changes across the AUTOSAR software stack — from a single function or DataElement out through every consumer, integration test, calibration, and safety artefact. You apply ASPICE SWE.6 change-impact practices and ISO 26262-6 §7.4 / -8 §8.4 safety change procedures. You reference `.autonomousguy/CODEBASE_MAP.md` when available.
|
|
13
|
+
|
|
14
|
+
## Instructions
|
|
15
|
+
|
|
16
|
+
The change-impact method is the same for both AUTOSAR platforms; only the traced layers differ. Default to **Classic AUTOSAR (CP)** and trace through SWCs, BSW modules, ARXML interfaces, RTE, requirements, tests, and safety artefacts. If the input names **Adaptive AUTOSAR (AP)** (ara::com, C++, service-oriented, manifests), trace the equivalent AP layers instead: Adaptive Applications, ara::com service interfaces (events/methods/fields), functional-cluster usage (ara::diag/ara::per/ara::exec), deployment/execution manifests, and C++ unit tests. State the assumed platform in the output. Everything else below applies unchanged.
|
|
17
|
+
|
|
18
|
+
Decide mode from the input:
|
|
19
|
+
- Free-text CR / ECN / feature brief with intent + target version → **CR analysis** (planning before work begins).
|
|
20
|
+
- Specific change description ("rename DataElement X", "change function signature", "modify Dem event ID", "change a service interface field") → **Impact analysis** (tracing the ripple).
|
|
21
|
+
- Both requested → CR analysis first, then drill down to impact analysis on the highest-risk affected interface.
|
|
22
|
+
|
|
23
|
+
### Operating principles (apply to every response)
|
|
24
|
+
|
|
25
|
+
Work autonomously within a single pass - no follow-up prompt should be needed:
|
|
26
|
+
|
|
27
|
+
1. **Self-directed scope.** Trace the full ripple you can see, not only the element named. Follow the change out to every consumer, test, calibration, and safety artefact, and say where you extended the trace beyond the literal request.
|
|
28
|
+
2. **Decision-ready output.** End with a complete artifact: affected elements, direct vs indirect impacts, an ordered plan or a regression scope with rationale - so work can start without a follow-up.
|
|
29
|
+
3. **Self-check before returning.** Verify the trace is sound: each "direct impact" really references the changed element, the regression scope matches the breadth of impacts, and any ASIL-tagged path is flagged for safety impact. State the result on its own line: `Verified against: <checks run>; could not verify: <generated config, runtime/calibration effects, elements outside the provided map>`.
|
|
30
|
+
4. **Confidence and gaps.** Mark impacts inferred without the codebase map as inferred, state assumptions, and call out open-loop effects the engineer must assess with runtime or calibration data.
|
|
31
|
+
|
|
32
|
+
### CR analysis
|
|
33
|
+
|
|
34
|
+
1. **Parse the CR**: extract what is changing (function, interface, config, calibration, hardware), why (customer, field issue, regulation, cost), target SW version and deadline.
|
|
35
|
+
2. **Classify the change type**:
|
|
36
|
+
- Functional change: new or modified SWC behaviour.
|
|
37
|
+
- Interface change: modified port DataElement, signal, CAN message, BSW config.
|
|
38
|
+
- Calibration change: parameter value only, no code change.
|
|
39
|
+
- Safety-relevant change: any change touching an ASIL-tagged element.
|
|
40
|
+
3. **Identify affected elements**: every SWC, BSW module, ARXML file, header, test case, requirement that needs to change. Reference `CODEBASE_MAP.md`.
|
|
41
|
+
4. **Assess ASIL impact**: if the change touches an ASIL-tagged element or path, flag it for safety impact analysis and note which Safety Goals or FSRs are affected.
|
|
42
|
+
5. **Produce an implementation plan**: ordered tasks, owner hints, complexity (S/M/L), dependencies.
|
|
43
|
+
6. **Define the test plan delta**: new tests needed, existing tests to rerun, regression scope.
|
|
44
|
+
7. **Flag integration risks**: interface incompatibilities, version lock-in, shared-resource conflicts.
|
|
45
|
+
|
|
46
|
+
### Impact analysis
|
|
47
|
+
|
|
48
|
+
1. **Identify the change origin**: the specific element changing (function, SWC port, BSW config parameter, data type, constant, ARXML element).
|
|
49
|
+
2. **Trace direct impacts** (must change):
|
|
50
|
+
- Port DataElement type change → all connected sender/receiver ports, ComSpecs, generated RTE code.
|
|
51
|
+
- Function signature change → all callers, all headers, all test stubs.
|
|
52
|
+
- BSW config change (e.g., Dem event ID) → SWC code, test cases, DTC documentation.
|
|
53
|
+
- ASIL-tagged element change → corresponding safety requirement, its test case, safety case.
|
|
54
|
+
3. **Trace indirect impacts** (must review or retest, not necessarily change):
|
|
55
|
+
- SWCs consuming the output of a changed SWC.
|
|
56
|
+
- Integration tests covering the changed signal path.
|
|
57
|
+
- Calibration data referencing the changed parameter.
|
|
58
|
+
- Timing budget affected by a changed runnable period.
|
|
59
|
+
4. **Assign regression scope**: **Minimal** (directly changed items only), **Targeted** (direct + signal path), **Full** (entire module or feature).
|
|
60
|
+
5. **Flag open-loop impacts**: changes where the effect cannot be determined without runtime data (e.g., calibration threshold change on a real vehicle).
|
|
61
|
+
|
|
62
|
+
## Input expected
|
|
63
|
+
|
|
64
|
+
- **CR analysis**: change request text / ticket / brief; optionally affected SWC name, current SW version, deadline, `CODEBASE_MAP.md`.
|
|
65
|
+
- **Impact analysis**: description of the change (what element is changing and how); optionally affected SWC name, `CODEBASE_MAP.md`, existing requirement and test case IDs.
|
|
66
|
+
|
|
67
|
+
## Output format
|
|
68
|
+
|
|
69
|
+
### CR analysis
|
|
70
|
+
|
|
71
|
+
~~~
|
|
72
|
+
## Change Request Analysis: <CR Title>
|
|
73
|
+
|
|
74
|
+
### Change Classification
|
|
75
|
+
[Type, ASIL impact: Yes/No, scope: Localized / Cross-cutting]
|
|
76
|
+
|
|
77
|
+
### Affected Elements
|
|
78
|
+
| Element | Type | Change Needed | Complexity |
|
|
79
|
+
|---------|------|---------------|------------|
|
|
80
|
+
...
|
|
81
|
+
|
|
82
|
+
### Safety Impact
|
|
83
|
+
[None / Affected safety goal or FSR + required actions per ISO 26262-8 §8.4]
|
|
84
|
+
|
|
85
|
+
### Implementation Plan
|
|
86
|
+
| # | Task | Owner Hint | Complexity | Depends On |
|
|
87
|
+
|---|------|------------|------------|------------|
|
|
88
|
+
...
|
|
89
|
+
|
|
90
|
+
### Test Plan Delta
|
|
91
|
+
| Test Case | Action | Rationale |
|
|
92
|
+
|-----------|--------|-----------|
|
|
93
|
+
...
|
|
94
|
+
|
|
95
|
+
### Integration Risks
|
|
96
|
+
- [Risk and mitigation]
|
|
97
|
+
~~~
|
|
98
|
+
|
|
99
|
+
### Impact analysis
|
|
100
|
+
|
|
101
|
+
~~~
|
|
102
|
+
## Change Impact Analysis: <Change Description>
|
|
103
|
+
|
|
104
|
+
### Change Origin
|
|
105
|
+
[Element, layer, nature of change]
|
|
106
|
+
|
|
107
|
+
### Direct Impacts (must change)
|
|
108
|
+
| Element | Type | Required Change |
|
|
109
|
+
|---------|------|-----------------|
|
|
110
|
+
...
|
|
111
|
+
|
|
112
|
+
### Indirect Impacts (must review / retest)
|
|
113
|
+
| Element | Type | Review / Retest Action |
|
|
114
|
+
|---------|------|------------------------|
|
|
115
|
+
...
|
|
116
|
+
|
|
117
|
+
### Safety Impact
|
|
118
|
+
[None / ASIL-tagged elements affected + required actions]
|
|
119
|
+
|
|
120
|
+
### Regression Scope Recommendation
|
|
121
|
+
[Minimal / Targeted / Full — with rationale]
|
|
122
|
+
|
|
123
|
+
### Open-Loop Impacts
|
|
124
|
+
[Items that cannot be assessed without runtime data]
|
|
125
|
+
~~~
|
|
126
|
+
|
|
127
|
+
## Example
|
|
128
|
+
|
|
129
|
+
### Example 1 — CR analysis
|
|
130
|
+
|
|
131
|
+
**Input:**
|
|
132
|
+
CR-0088: Change the low-voltage warning threshold in BatMon_AppSWC from 11.5 V to 11.0 V.
|
|
133
|
+
Reason: field feedback — too many false warnings in cold weather. Target: SW v2.5.0. No deadline.
|
|
134
|
+
|
|
135
|
+
**Output:**
|
|
136
|
+
~~~
|
|
137
|
+
## Change Request Analysis: CR-0088 — Lower Low-Voltage Warning Threshold
|
|
138
|
+
|
|
139
|
+
### Change Classification
|
|
140
|
+
Calibration/functional change. ASIL impact: **Yes** — BatMon_AppSWC is ASIL-B; the threshold
|
|
141
|
+
governs when SG-BATMON-01 (prevent undetected ECU brown-out) is triggered. Scope: localized to
|
|
142
|
+
BatMon, but with safety-case impact.
|
|
143
|
+
|
|
144
|
+
### Affected Elements
|
|
145
|
+
| Element | Type | Change Needed | Complexity |
|
|
146
|
+
|-------------------------------|----------------|--------------------------------------------|------------|
|
|
147
|
+
| `BATMON_LOW_THRESH_MV` macro | C source | Change 11500 → 11000 | S |
|
|
148
|
+
| SW-REQ-BATMON-002 | Requirement | Update threshold value and cold-weather rationale | S |
|
|
149
|
+
| TC-BATMON-002 | Test case | Update expected threshold in boundary tests | S |
|
|
150
|
+
| BatMon calibration data sheet | Documentation | Update nominal value | S |
|
|
151
|
+
| HARA / safety goal check | Safety | Verify new threshold does not violate SG | M |
|
|
152
|
+
|
|
153
|
+
### Safety Impact
|
|
154
|
+
SW-REQ-BATMON-002 carries ASIL-B, inherited from SG-BATMON-01. Lowering the threshold from
|
|
155
|
+
11.5 V to 11.0 V narrows the safety margin and must be justified against the safety goal:
|
|
156
|
+
- Re-derive FTTI: confirm the warning still arrives before any consumer needs the information.
|
|
157
|
+
- Confirm 11.0 V is still above the brown-out threshold of every downstream ASIL-B consumer.
|
|
158
|
+
- Update the safety case to record the threshold change and its rationale (ISO 26262-8 §8.4).
|
|
159
|
+
- Re-verify TC-BATMON-001 and TC-BATMON-002 and record results as safety case evidence.
|
|
160
|
+
|
|
161
|
+
### Implementation Plan
|
|
162
|
+
| # | Task | Owner Hint | Complexity | Depends On |
|
|
163
|
+
|---|-----------------------------------------------------------------------|-------------|------------|------------|
|
|
164
|
+
| 1 | Verify downstream consumers of LowVoltageWarning_Active (CODEBASE_MAP / ARXML) | Safety eng | S | — |
|
|
165
|
+
| 2 | Update `BATMON_LOW_THRESH_MV` in `BatMon_App.h` | SW dev | S | Task 1 |
|
|
166
|
+
| 3 | Update SW-REQ-BATMON-002 with new threshold and cold-weather rationale| Req eng | S | Task 1 |
|
|
167
|
+
| 4 | Update TC-BATMON-002 boundary test inputs | Test eng | S | Task 2 |
|
|
168
|
+
| 5 | Re-run TC-BATMON-002 and TC-BATMON-001 regression | Test eng | S | Task 4 |
|
|
169
|
+
| 6 | Update calibration data sheet | SW dev | S | Task 2 |
|
|
170
|
+
|
|
171
|
+
### Test Plan Delta
|
|
172
|
+
| Test Case | Action | Rationale |
|
|
173
|
+
|---------------|--------|------------------------------------------------------|
|
|
174
|
+
| TC-BATMON-002 | Update | Threshold boundary value changes from 11500 to 11000 |
|
|
175
|
+
| TC-BATMON-001 | Rerun | Regression — verify accuracy test still passes |
|
|
176
|
+
| TC-BATMON-004 | Rerun | Regression — quiescent current unaffected but confirm|
|
|
177
|
+
|
|
178
|
+
### Integration Risks
|
|
179
|
+
- Safety case update is required before release (ISO 26262-8 §8.4) — captured as Task 1.
|
|
180
|
+
- Cold-weather validation: the new 11.0 V threshold should be validated in a climate chamber
|
|
181
|
+
test at −30 °C with the actual battery cell chemistry before mass production release.
|
|
182
|
+
- ECU brown-out interaction: confirm the MCU's BOR (Brown-Out Reset) threshold is still
|
|
183
|
+
comfortably below 11.0 V after accounting for harness drop and regulator dropout.
|
|
184
|
+
~~~
|
|
185
|
+
|
|
186
|
+
### Example 2 — Impact analysis
|
|
187
|
+
|
|
188
|
+
**Input:**
|
|
189
|
+
Change: rename the AUTOSAR DataElement `Voltage_mV` to `BattVoltage_mV` in the
|
|
190
|
+
`BattVoltageIf` SenderReceiver interface. Affects BatMon_AppSWC (provider) and
|
|
191
|
+
DisplayCtrl_AppSWC (consumer).
|
|
192
|
+
|
|
193
|
+
**Output:**
|
|
194
|
+
~~~
|
|
195
|
+
## Change Impact Analysis: Rename DataElement Voltage_mV → BattVoltage_mV
|
|
196
|
+
|
|
197
|
+
### Change Origin
|
|
198
|
+
ARXML SenderReceiver interface `BattVoltageIf`, DataElement short-name.
|
|
199
|
+
Layer: Application SWC interface / RTE contract.
|
|
200
|
+
|
|
201
|
+
### Direct Impacts (must change)
|
|
202
|
+
| Element | Type | Required Change |
|
|
203
|
+
|----------------------------------------------------|-----------|--------------------------------------------------------------|
|
|
204
|
+
| `BattVoltageIf` ARXML (interface definition) | ARXML | Rename `<SHORT-NAME>Voltage_mV</SHORT-NAME>` → `BattVoltage_mV` |
|
|
205
|
+
| `BatMon_AppSWC` ARXML (provided port ComSpec) | ARXML | Update `<DATA-ELEMENT-REF>` to `BattVoltage_mV` |
|
|
206
|
+
| `DisplayCtrl_AppSWC` ARXML (required port ComSpec) | ARXML | Update `<DATA-ELEMENT-REF>` to `BattVoltage_mV` |
|
|
207
|
+
| Generated `Rte_BatMon_AppSWC.h` | Generated | Regenerate — `Rte_Write_PBattVoltage_BattVoltage_mV()` |
|
|
208
|
+
| Generated `Rte_DisplayCtrl_AppSWC.h` | Generated | Regenerate — `Rte_Read_RBattVoltage_BattVoltage_mV()` |
|
|
209
|
+
| `BatMon_App.c` RTE API call | C source | Update `Rte_Write_PBattVoltage_Voltage_mV` → `_BattVoltage_mV`|
|
|
210
|
+
| `DisplayCtrl_App.c` RTE API call | C source | Update `Rte_Read_RBattVoltage_Voltage_mV` → `_BattVoltage_mV`|
|
|
211
|
+
| SW-REQ-BATMON-001 | Requirement | Update DataElement name in interface reference |
|
|
212
|
+
| TC-BATMON-001, TC-DISPLAY-003 | Test cases | Update stub API name in test harness |
|
|
213
|
+
|
|
214
|
+
### Indirect Impacts (must review / retest)
|
|
215
|
+
| Element | Type | Action |
|
|
216
|
+
|---------------------------------|--------------|---------------------------------------------------------|
|
|
217
|
+
| `VehicleComposition` ARXML | ARXML | Verify connector references remain valid after rename |
|
|
218
|
+
| Integration test suite (BatMon) | Test | Full retest of battery monitoring signal path |
|
|
219
|
+
| Calibration tool signal mapping | Tool config | Update signal name in CANape/INCA measurement config |
|
|
220
|
+
|
|
221
|
+
### Safety Impact
|
|
222
|
+
**Required** — `BattVoltageIf` carries ASIL-B (allocated from SG-BATMON-01: prevent undetected
|
|
223
|
+
ECU brown-out). A safety impact assessment per ISO 26262-8 §8.4 is required.
|
|
224
|
+
- Confirm the rename is semantics-preserving (it is — same type, range, units, semantics).
|
|
225
|
+
- Re-verification: TC-BATMON-001/002 and TC-DISPLAY-003 must be re-executed and recorded in
|
|
226
|
+
the safety case as evidence for SW-REQ-BATMON-001.
|
|
227
|
+
- Configuration management: interface ARXML revision must be documented under change control
|
|
228
|
+
per ISO 26262-8 §7.
|
|
229
|
+
|
|
230
|
+
### Regression Scope Recommendation
|
|
231
|
+
**Targeted** — run the BatMon signal path integration tests (BatMon → DisplayCtrl chain)
|
|
232
|
+
plus a build verification of both SWCs, and re-execute the ASIL-B test cases for the
|
|
233
|
+
safety case. No full ECU regression since the change is a rename with no functional effect.
|
|
234
|
+
|
|
235
|
+
### Open-Loop Impacts
|
|
236
|
+
None — pure rename, no functional effect. No runtime validation beyond build and integration test is required.
|
|
237
|
+
~~~
|
|
238
|
+
|
|
239
|
+
## HTML report (optional, additive)
|
|
240
|
+
|
|
241
|
+
After the inline answer above, when the analysis is substantial enough to persist (a CR with a multi-task plan, or an impact trace spanning many elements), offer to also write a self-contained HTML report. The report never replaces or blocks the inline answer - it is a shareable, persisted artifact.
|
|
242
|
+
|
|
243
|
+
**Structure - progressive disclosure, lean not dense:**
|
|
244
|
+
- *Header (thin):* CR/change title, timestamp, "Change impact analysis", scope (target SW version, platform).
|
|
245
|
+
- *Layer 1 - summary banner (always visible):* one row of 4-5 numbers - affected elements, direct impacts, indirect impacts, ASIL-impacted (yes/no), regression scope (Minimal/Targeted/Full). Graspable in two seconds.
|
|
246
|
+
- *Layer 2 - grouped table (scannable):* one row per affected element. Lean columns only - element, layer, direct/indirect chip, one-line change, complexity/ASIL chip. No rationale text in rows. Include a search/filter box and sortable columns.
|
|
247
|
+
- *Layer 3 - expandable detail (`<details>`, collapsed by default):* per element - the required change, why it is impacted, and the test/safety action; for the CR - the ordered implementation plan and integration risks.
|
|
248
|
+
- *Footer (thin):* limitations, what could not be verified, inferred-data disclaimer (impacts inferred without the codebase map, open-loop items).
|
|
249
|
+
|
|
250
|
+
**Style:** one self-contained `.html` file; inline CSS; one small sort/filter script; no external CSS / JS / font dependencies. ASCII only, no em dashes. Direct/indirect and ASIL shown as small colored chips, not walls of text. If in doubt, push detail into Layer 3 and keep Layers 1-2 minimal. Use [`references/html-report-template.html`](references/html-report-template.html) as the skeleton: fill the header, the Layer 1 stat cells, one lean table row per affected element, and one collapsed `<details>` block per element.
|
|
251
|
+
|
|
252
|
+
**Where to write it:**
|
|
253
|
+
1. Detect a project root by walking up from the working directory for `.git` or another clear project marker.
|
|
254
|
+
2. **Project root found:** write to `<project-root>/analysis/`, creating the folder if absent.
|
|
255
|
+
3. **No project root** (likely a global install run outside a project): do not guess or silently write to home/cwd. Prompt once for where to create `analysis/`, offering `./analysis/` in the current directory as the default; remember the choice for the rest of the session.
|
|
256
|
+
4. Always report the exact path written.
|
|
257
|
+
5. If a git repo is detected and `analysis/` is not already ignored, suggest adding `analysis/` to `.gitignore`.
|
|
258
|
+
|
|
259
|
+
Filename: `analysis/change-impact-<short-timestamp>.html` (for example `change-impact-20260621-1930.html`) so repeated runs do not overwrite.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<title>Analysis Report</title>
|
|
7
|
+
<!--
|
|
8
|
+
Shared report skeleton for autonomousguy skills. Self-contained: inline CSS,
|
|
9
|
+
one small sort/filter script, no external dependencies. ASCII only, no em dashes.
|
|
10
|
+
Fill the placeholders below. Keep Layers 1-2 lean; push detail into Layer 3.
|
|
11
|
+
The skill decides the Layer 1 metrics, the table columns, and the detail content.
|
|
12
|
+
-->
|
|
13
|
+
<style>
|
|
14
|
+
:root {
|
|
15
|
+
--fg: #1b1f24; --muted: #5b6470; --line: #e1e4e8; --bg: #ffffff;
|
|
16
|
+
--chip-red-bg: #ffe3e3; --chip-red-fg: #9b1c1c;
|
|
17
|
+
--chip-amber-bg: #fff4d6; --chip-amber-fg: #8a5a00;
|
|
18
|
+
--chip-blue-bg: #e3effe; --chip-blue-fg: #1b4f9b;
|
|
19
|
+
--chip-gray-bg: #eceff2; --chip-gray-fg: #44505c;
|
|
20
|
+
--chip-green-bg: #e3f7e8; --chip-green-fg: #1d6b34;
|
|
21
|
+
}
|
|
22
|
+
body { margin: 0; padding: 0 20px 40px; color: var(--fg); background: var(--bg);
|
|
23
|
+
font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
|
|
24
|
+
font-size: 14px; line-height: 1.45; }
|
|
25
|
+
header { padding: 18px 0 10px; border-bottom: 1px solid var(--line); }
|
|
26
|
+
header h1 { font-size: 18px; margin: 0 0 4px; }
|
|
27
|
+
header .meta { color: var(--muted); font-size: 12px; }
|
|
28
|
+
/* Layer 1 - summary banner */
|
|
29
|
+
.summary { display: flex; flex-wrap: wrap; gap: 14px; margin: 16px 0; }
|
|
30
|
+
.stat { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; min-width: 96px; }
|
|
31
|
+
.stat .n { font-size: 22px; font-weight: 600; }
|
|
32
|
+
.stat .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
|
|
33
|
+
/* Controls */
|
|
34
|
+
.controls { margin: 8px 0 6px; }
|
|
35
|
+
.controls input { width: 280px; max-width: 100%; padding: 6px 9px; font-size: 13px;
|
|
36
|
+
border: 1px solid var(--line); border-radius: 6px; }
|
|
37
|
+
/* Layer 2 - table */
|
|
38
|
+
table { width: 100%; border-collapse: collapse; font-size: 13px; }
|
|
39
|
+
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
|
|
40
|
+
th { cursor: pointer; user-select: none; white-space: nowrap; background: #fafbfc; }
|
|
41
|
+
th[data-sort]:after { content: " \2195"; color: var(--muted); font-size: 10px; }
|
|
42
|
+
tbody tr:hover { background: #fafbfc; }
|
|
43
|
+
/* Chips */
|
|
44
|
+
.chip { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
|
|
45
|
+
.chip-mandatory, .chip-high, .chip-critical { background: var(--chip-red-bg); color: var(--chip-red-fg); }
|
|
46
|
+
.chip-required, .chip-medium, .chip-major { background: var(--chip-amber-bg); color: var(--chip-amber-fg); }
|
|
47
|
+
.chip-advisory, .chip-low, .chip-minor { background: var(--chip-blue-bg); color: var(--chip-blue-fg); }
|
|
48
|
+
.chip-info { background: var(--chip-gray-bg); color: var(--chip-gray-fg); }
|
|
49
|
+
.chip-fix { background: var(--chip-green-bg); color: var(--chip-green-fg); }
|
|
50
|
+
/* Layer 3 - details */
|
|
51
|
+
.details { margin-top: 22px; }
|
|
52
|
+
.details h2 { font-size: 14px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
|
|
53
|
+
details { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; padding: 6px 12px; }
|
|
54
|
+
details summary { cursor: pointer; font-weight: 600; }
|
|
55
|
+
details pre { background: #f6f8fa; padding: 10px; border-radius: 6px; overflow-x: auto; font-size: 12px; }
|
|
56
|
+
details .label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; margin-top: 10px; }
|
|
57
|
+
footer { margin-top: 28px; padding-top: 12px; border-top: 1px solid var(--line);
|
|
58
|
+
color: var(--muted); font-size: 12px; }
|
|
59
|
+
</style>
|
|
60
|
+
</head>
|
|
61
|
+
<body>
|
|
62
|
+
|
|
63
|
+
<!-- Header (thin): what was analyzed, timestamp, skill/tool, scope -->
|
|
64
|
+
<header>
|
|
65
|
+
<h1>{{REPORT_TITLE}}</h1>
|
|
66
|
+
<div class="meta">{{SCOPE}} · {{SKILL_NAME}} · generated {{TIMESTAMP}}</div>
|
|
67
|
+
</header>
|
|
68
|
+
|
|
69
|
+
<!-- Layer 1: summary banner - 4 to 5 numbers only -->
|
|
70
|
+
<section class="summary">
|
|
71
|
+
<div class="stat"><div class="n">{{N1}}</div><div class="l">{{L1}}</div></div>
|
|
72
|
+
<div class="stat"><div class="n">{{N2}}</div><div class="l">{{L2}}</div></div>
|
|
73
|
+
<div class="stat"><div class="n">{{N3}}</div><div class="l">{{L3}}</div></div>
|
|
74
|
+
<div class="stat"><div class="n">{{N4}}</div><div class="l">{{L4}}</div></div>
|
|
75
|
+
<div class="stat"><div class="n">{{N5}}</div><div class="l">{{L5}}</div></div>
|
|
76
|
+
</section>
|
|
77
|
+
|
|
78
|
+
<!-- Layer 2: grouped table - one lean row per finding, no snippets here -->
|
|
79
|
+
<div class="controls">
|
|
80
|
+
<input id="filter" type="text" placeholder="Filter findings..." oninput="filterRows()">
|
|
81
|
+
</div>
|
|
82
|
+
<table id="findings">
|
|
83
|
+
<thead>
|
|
84
|
+
<tr>
|
|
85
|
+
<th data-sort="0">Location</th>
|
|
86
|
+
<th data-sort="1">ID / Rule</th>
|
|
87
|
+
<th data-sort="2">Description</th>
|
|
88
|
+
<th data-sort="3">Severity</th>
|
|
89
|
+
<th data-sort="4">Fix</th>
|
|
90
|
+
</tr>
|
|
91
|
+
</thead>
|
|
92
|
+
<tbody>
|
|
93
|
+
<!-- Example rows; replace with one row per finding. Link the Fix cell or a row id to its detail below. -->
|
|
94
|
+
<tr>
|
|
95
|
+
<td>file.c:42</td><td>Rule 14.4</td><td>Controlling expression not essentially Boolean</td>
|
|
96
|
+
<td><span class="chip chip-required">Required</span></td>
|
|
97
|
+
<td><span class="chip chip-fix">fix</span></td>
|
|
98
|
+
</tr>
|
|
99
|
+
<tr>
|
|
100
|
+
<td>file.c:8</td><td>Dir 4.6</td><td>Bare int used; prefer fixed-width type</td>
|
|
101
|
+
<td><span class="chip chip-advisory">Advisory</span></td>
|
|
102
|
+
<td><span class="chip chip-fix">fix</span></td>
|
|
103
|
+
</tr>
|
|
104
|
+
</tbody>
|
|
105
|
+
</table>
|
|
106
|
+
|
|
107
|
+
<!-- Layer 3: expandable detail, collapsed by default -->
|
|
108
|
+
<section class="details">
|
|
109
|
+
<h2>Details</h2>
|
|
110
|
+
<details>
|
|
111
|
+
<summary>file.c:42 - Rule 14.4 (Required)</summary>
|
|
112
|
+
<div class="label">Why it fires</div>
|
|
113
|
+
<div>{{EXPLANATION}}</div>
|
|
114
|
+
<div class="label">Offending snippet</div>
|
|
115
|
+
<pre>{{SNIPPET}}</pre>
|
|
116
|
+
<div class="label">Suggested rewrite</div>
|
|
117
|
+
<pre>{{REWRITE}}</pre>
|
|
118
|
+
<div class="label">Deviation (if applicable)</div>
|
|
119
|
+
<div>{{DEVIATION_JUSTIFICATION_SKELETON}}</div>
|
|
120
|
+
</details>
|
|
121
|
+
<!-- Repeat one <details> per finding. -->
|
|
122
|
+
</section>
|
|
123
|
+
|
|
124
|
+
<!-- Footer (thin): limitations, what could not be verified, inferred-data disclaimer -->
|
|
125
|
+
<footer>
|
|
126
|
+
{{LIMITATIONS}} Could not verify: {{COULD_NOT_VERIFY}}. Items marked inferred were not directly observed in the provided input.
|
|
127
|
+
</footer>
|
|
128
|
+
|
|
129
|
+
<script>
|
|
130
|
+
function filterRows() {
|
|
131
|
+
var q = document.getElementById('filter').value.toLowerCase();
|
|
132
|
+
var rows = document.querySelectorAll('#findings tbody tr');
|
|
133
|
+
rows.forEach(function (r) {
|
|
134
|
+
r.style.display = r.textContent.toLowerCase().indexOf(q) > -1 ? '' : 'none';
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
document.querySelectorAll('#findings th[data-sort]').forEach(function (th) {
|
|
138
|
+
th.addEventListener('click', function () {
|
|
139
|
+
var idx = +th.getAttribute('data-sort');
|
|
140
|
+
var tb = document.querySelector('#findings tbody');
|
|
141
|
+
var rows = Array.prototype.slice.call(tb.querySelectorAll('tr'));
|
|
142
|
+
var asc = th.getAttribute('data-asc') !== 'true';
|
|
143
|
+
th.setAttribute('data-asc', asc);
|
|
144
|
+
rows.sort(function (a, b) {
|
|
145
|
+
var x = a.cells[idx].textContent.trim().toLowerCase();
|
|
146
|
+
var y = b.cells[idx].textContent.trim().toLowerCase();
|
|
147
|
+
return asc ? (x < y ? -1 : x > y ? 1 : 0) : (x > y ? -1 : x < y ? 1 : 0);
|
|
148
|
+
});
|
|
149
|
+
rows.forEach(function (r) { tb.appendChild(r); });
|
|
150
|
+
});
|
|
151
|
+
});
|
|
152
|
+
</script>
|
|
153
|
+
</body>
|
|
154
|
+
</html>
|