# Documentation

> XML documentation and inline comment conventions for C# code. Load when writing documentation or comments. Use when this capability is needed.

- Skill: `tomevault-io/documentation-32` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/documentation-32`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/documentation-32/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/documentation-32

---


# Documentation Conventions

## XML Documentation

Required for all members regardless of visibility. Follow this structure:

```csharp
/// <summary>
///   Processes the <paramref name="data"/> asynchronously.
/// </summary>
///
/// <param name="data">The data to process.</param>
/// <param name="cancellationToken">A token that can be used to signal a request for cancellation.</param>
///
/// <returns>The processed result.</returns>
///
/// <exception cref="ArgumentNullException">Thrown when data is null.</exception>
///
```

**Required tags**: `<summary>` for all APIs, `<param>` for all parameters, `<exception>` for documented exceptions, `<seealso>` for related documentation.

### Descriptive Parameter Documentation

Parameter docs must describe the **purpose, behavior, or context** — avoid restating the parameter name or type.

```csharp
// ❌ BAD: Restates the name.
/// <param name="cancellationToken">The cancellation token.</param>
/// <param name="gameState">The game state.</param>

// ✅ GOOD: Describes purpose or behavior.
/// <param name="cancellationToken">A token that can be used to signal a request for cancellation.</param>
/// <param name="gameState">The current state of the game, including board positions and turn tracking.</param>
```

### `<inheritdoc />` Usage

Use `<inheritdoc />` for **well-known standard members** where the base documentation is sufficient and widely understood (e.g., `ToString()`, `Equals()`, `GetHashCode()`, `Dispose()`).

Prefer **explicit documentation** for domain-specific members where readers benefit from the locality of information — especially interface implementations with project-specific behavior.

```csharp
// ✅ GOOD: inheritdoc for well-known standard members.
/// <inheritdoc />
public override string ToString() => $"Move({Player}, {PositionIndex}, {Token})";

// ✅ GOOD: Explicit docs for domain-specific interface implementation.
/// <summary>
///   Plays a turn by prompting the console user for input and validating the response.
/// </summary>
///
public async Task<Move> PlayTurnAsync(GameState gameState, CancellationToken cancellationToken = default)
```

## Inline Comments

Inline comments must be **full sentences ending with periods**, followed by a **blank line** before the next code statement.

```csharp
// Set up test data for the validation scenario.

var gameState = CreateValidGameState();
```

---
> Source: [jsquire/Portfolio](https://github.com/jsquire/Portfolio) — distributed by [TomeVault](https://tomevault.io).
<!-- tomevault:4.0:skill_md:2026-06-16 -->

