Skip to content
Skills Library
Programming · Writing

meddev-inline-docs

/meddev-inline-docs

Provide concise, high-value inline documentation practices (comments and short docblocks) that improve safety, maintainability, and traceability without cluttering code. Use when working on inline docs in medical device software.

Licence
MIT
Last repository change
19.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 19.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Provide concise, high-value inline documentation practices (comments and short docblocks) that improve safety, maintainability, and traceability without cluttering code. Use when working on inline docs in medical device software.

Original author description

Provide concise, high-value inline documentation practices (comments and short docblocks) that improve safety, maintainability, and traceability without cluttering code. Use when working on inline docs in medical device software.

How it works

  1. Purpose
  2. When to Apply
  3. Requirements (testable)
  4. Recommended Practices
  5. Patterns
  6. Anti-Patterns (risks)
  7. Verification Checklist
  8. Traceability
  9. References
  10. Changelog
Original SKILL.md headings · 77 lines, 452 words
SKILL.md preview
---
name: meddev-inline-docs
description: Provide concise, high-value inline documentation practices (comments and short docblocks) that improve safety, maintainability, and traceability without cluttering code. Use when working on inline docs in medical device software.
license: MIT
metadata:
  skill_id: DOC-INLINE
  version: 1.0.0
  last_updated: '2026-01-04'
  applies_to: Class A, Class B, Class C
  jurisdiction: Global
  prerequisites: DOC-CODE-COMMENTS, DOC-TRACEABILITY
  category: documentation
---

# Inline Documentation

## Purpose
Provide concise, high-value inline documentation practices (comments and short docblocks) that improve safety, maintainability, and traceability without cluttering code.

## When to Apply
- Safety-relevant code paths, interfaces, state machines, and algorithms.
- Boundary validations, error handling, and concurrency/interrupt sections.
- Any location requiring traceability to requirements/risks/tests.

## Requirements (testable)
1. Comment Value: Inline docs must add intent, rationale, constraints, or traceability—not restate code. Rationale: clarity without noise.
2. Traceability Tags: Use stable IDs (REQ-###, RISK-CTRL-###, TEST-###) adjacent to safety/requirement code. Rationale: audit and impact analysis.
3. Boundary Notes: Document assumptions (units, ranges, timing, concurrency/ISR safety) at boundaries. Rationale: correct usage and safety.
4. API Docblocks: Public APIs include purpose, params, ranges, return codes, side effects; keep brief and consistent. Rationale: safe integration.
5. Staleness Control: Remove/update comments when behavior changes; no inline history logs. Rationale: avoid misinformation.

## Recommended Practices
- Prefer short comments over long narratives; move detailed rationale to design docs, link by ID.
- Note non-obvious tradeoffs (performance vs safety) and mitigations.
- For concurrency/ISR-sensitive sections, document which locks/ordering guarantees apply.
- Keep language precise and ASCII; avoid ambiguous abbreviations.

## Patterns
Traceability + constraint:
```c
// REQ-PWR-BATT-01: shutdown <VBAT_CRIT; RISK-CTRL-55; TEST-PWR-04
if (vbat < VBAT_CRIT) { enter_safe_shutdown(); }
```

API docblock:
```c
/**
 * @brief Encrypt payload with device key (Class C path).
 * @param out must have room for len+TAG_LEN; len <= MAX_PAYLOAD.
 * @return 0 on success, -EIO on crypto failure.
 * REQ-ENC-AEAD-01, TEST-ENC-04
 */
int secure_encrypt(uint8_t *out, size_t len, const uint8_t *in);
```

Concurrency note:
```c
// Holds tx_mutex <= 2 ms; ISR-safe: no lock taken in ISR
```

## Anti-Patterns (risks)
- Comments that mirror code or go stale -> risk: misleads reviewers.
- Missing range/unit notes on APIs -> risk: misuse and safety defects.
- No traceability tags on safety logic -> risk: audit gaps.
- Inline change logs -> risk: divergence from VCS truth.

## Verification Checklist
- [ ] Comments add intent/constraints/traceability, not restate code.
- [ ] Traceability tags present on safety/requirement code.
- [ ] API docblocks include ranges, errors, side effects.
- [ ] Boundary assumptions (units/timing/concurrency) documented.
- [ ] Stale or inline history comments removed/updated.

## Traceability
- Use IDs from requirements/hazards/tests in inline comments; ensure they match external artifacts. Link to design docs by ID when more detail is needed.

## References
- IEC 62304 traceability expectations.
- ISO 14971 for risk-control linkage.
- DOC-CODE-COMMENTS and DOC-TRACEABILITY skills for complementary guidance.

## Changelog
- 1.0.0 (2026-01-04): Initial inline documentation skill with traceability, API docblocks, and boundary note guidance.

## Audit History
- **2026-01-04**: Audit performed. Verified:
  - IEC 62304 traceability expectations correctly referenced
  - ISO 14971 risk-control linkage accurate

Versions

The database has no other skills named meddev-inline-docs.

Database snapshot: 13.11.2026 · package version d81a7e4f2566 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100meddev-code-comments
    Provide conventions for code comments that support traceability to requirements, risks, and tests, while maintaining clarity and brevity. Use when working on code comments in medical device software.
  • 100meddev-design-docs
    Guide creation and maintenance of Software Architecture (SAD) and Design Descriptions (SDD) that support safety, traceability, and compliance. Use when working on design docs in medical device software.
  • 100clean-comments-review
    Use when reviewing comments in code artifacts — public DocBlocks, inline maintainer notes, history breadcrumbs, TODO prose. Produces a critique document, not code edits.
  • 100writing-docblocks
    Use when adding or fixing a docblock, docstring, or inline comment in code, including PHPDoc, JSDoc, TSDoc, WordPress inline documentation, CSS section comments and SassDoc. Also use when the user says a function is undocumented, asks you to document a class or method, says the…
  • 100docs-update
    Use when the user needs to update, improve, audit, or maintain documentation in a project. Covers READMEs, changelogs, API docs, inline comments, missing docs, and overall documentation quality. Works well before releases or when documentation has fallen behind the code.
  • 100writing-documentation
    Use when writing or rewriting documentation the user will actually read or ship, including README.md, docs/*.md, package docs, and skill bodies. Also use when they say the docs are verbose, bloated, disconnected, hard to scan, or out of date, or when a change needs its…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.