Code Documentation for Traceability

Enforce traceability comment conventions with stable IDs in code.

26|6|Updated Jan 4, 2026
One-click install
npx skills add https://github.com/AminAlam/meddev-agent-skills --skill code-documentation-for-traceability
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Code Documentation for Traceability
Source: https://github.com/AminAlam/meddev-agent-skills/tree/main/documentation/code-comments
Command: npx skills add https://github.com/AminAlam/meddev-agent-skills --skill code-documentation-for-traceability

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining clear traceability between code, requirements, and risk controls, which is crucial for regulatory compliance and effective impact analysis in medical device development.

Core Features & Use Cases

  • Traceability Tagging: Embeds stable IDs (e.g., REQ-###, RISK-CTRL-###) directly in code comments to link implementations to external artifacts.
  • API Documentation Standards: Enforces documentation for public interfaces, including purpose, parameters, ranges, and error codes.
  • Use Case: When implementing a new safety feature, developers can add comments like // REQ-123: Implement safety interlock to ensure the code is directly linked to the requirement, simplifying audits and future modifications.

Quick Start

Add traceability tags to the code comments for the function process_sensor_data.

Frequently Asked Questions about Code Documentation for Traceability

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I link code to requirements and risk controls for IEC 62304 compliance?

Link code to requirements by embedding stable IDs like REQ-### and RISK-CTRL-### directly in code comments. This enforces traceability conventions for safety-related code, interfaces, and tests, simplifying regulatory compliance and impact analysis.

What are the API documentation standards for medical device code traceability?

API documentation standards for traceability require documenting public interfaces with purpose, parameters, ranges, and error codes. This ensures clarity and brevity for safety-related code while maintaining comprehensive interface definitions.

How do I add traceability tags to code comments for safety features?

Add traceability tags to code comments by including stable requirement IDs, such as writing // REQ-123: Implement safety interlock. This directly links implementations and modifications to external artifacts and risk controls for auditing.

Do I need to document change history in code comments for ISO 14971 risk management?

No, you do not need to document change history in code comments for ISO 14971 risk management. The convention relies on the Version Control System (VCS) for change history, requiring only minimal necessary explanations and stable IDs in comments.

When do I need to use traceability tagging in code comments?

Traceability tagging in code comments is needed when implementing or modifying requirements, risk controls, safety-related code, interfaces, and tests. It ensures regulatory compliance and effective impact analysis during medical device development.