| name | update-docs |
| description | Verify and update documentation examples to match a component's current public API |
| argument-hint | ["component-path-or-folder"] |
| context | fork |
| agent | general-purpose |
Update Documentation: $ARGUMENTS
If $ARGUMENTS is empty, ask the user for a component path or folder before proceeding.
Verify that documentation examples are in sync with the component's current public API. If a path to a component is given, find its corresponding docs. If a docs path is given, find the component it documents.
Phase 1: Map component to docs
Component locations: libs/core/<component>/ or libs/platform/<component>/
Docs locations: libs/docs/core/<component>/ or libs/docs/platform/<component>/
Read:
- The component
.ts file — extract all input(), output(), model(), @Input(), @Output() declarations
- The docs component (e.g.
<component>-docs.component.ts and .html)
- All example files in the docs
examples/ folder
Phase 2: Audit
API coverage
For each public input/output/model on the component:
Flag inputs/outputs that exist in the component but are not documented anywhere.
Example quality
For each example file:
Description accuracy
For each <description> block in the docs HTML:
Phase 3: Fix
For each issue found:
- Missing documentation — Add the input/output to an existing example's description, or add it to an existing example template if it can be demonstrated inline
- Stale references — Update
<code> tags and descriptions to match current API
- Convention violations — Replace deprecated module imports, replace inline styles with common-css classes
Phase 4: Verify
yarn format
nx run docs:build
Report what was updated and what remains undocumented (with rationale if intentional, e.g. internal-only inputs).
Output
## Docs Sync Report: [component name]
### Updated
- [file:line] What was changed and why
### Undocumented API
| Input/Output | Type | Reason |
|-------------|------|--------|
| `appendTo` | input | Not demonstrated — added to description |
| `_internalFlag` | input | Internal — intentionally undocumented |
### Convention Fixes
- [file] Replaced ModuleX with individual imports
- [file] Replaced inline styles with sap-flex classes