1. Determine whether the task is create mode or update mode.
2. Inspect the component implementation and any related files needed to understand its public surface area and internal structure.
3. Use [assets/documentation-template.md](assets/documentation-template.md) as the shared documentation scaffold.
4. Apply the mode-specific rules in [references/create-mode.md](references/create-mode.md) or [references/update-mode.md](references/update-mode.md).
5. Produce or revise the documentation so that diagrams, examples, interfaces, dependencies, and quality attributes reflect the current implementation.