-
Notifications
You must be signed in to change notification settings - Fork 167
[RUM-13811] Add feature doc sync system for *_FEATURE.md files #2886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mariedm
wants to merge
10
commits into
develop
Choose a base branch
from
mariedm/RUM-13811/feature-docs-sync
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1d647e0
[RUM-13811] Add feature doc sync system for *_FEATURE.md files
mariedm 42e02d2
[RUM-13811] Fix update-feature-docs skill directory structure
mariedm cb8acd4
RUM-13811 Address comment + Improve script instructions
mariedm 058d261
RUM-13811 Update registries + Confluence workflow
mariedm 0590f4d
RUM-13811 Verify each doc is registered in workflow paths: AND cp block
mariedm 76e731a
RUM-13811 Fail when tracked_files references a missing path
mariedm c96e865
RUM-13811 Fix RUM and SR doc gaps and prevent recurrence in the skill
mariedm 09008a0
RUM-13811 Reorder trackSlowFrames in RUM doc snippet to match init
mariedm a3e45cb
RUM-13811 Use full clone in the Feature Docs Verify GitLab job
mariedm 743ff7e
Fix commit in SR doc
mariedm File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| --- | ||
| name: dd-sdk-ios:update-feature-docs | ||
| description: Use when public API changes have been made to review and update all *_FEATURE.md documentation files, or to audit whether they are still accurate. | ||
| --- | ||
|
|
||
| # update-feature-docs | ||
|
|
||
| Review and update the feature documentation files to match the current public API. | ||
|
|
||
| ## When to use | ||
|
|
||
| - After adding or modifying a public API (configuration options, new types, new methods) | ||
| - Before opening a release PR, to make sure docs are in sync | ||
| - Any time you want to audit whether feature docs are still accurate | ||
|
|
||
| ## What this skill covers | ||
|
|
||
| All `*_FEATURE.md` files in the repo. Each doc's frontmatter is the source of truth: | ||
| - `verified_against_commit` — the commit the doc was last verified against | ||
| - `tracked_files` — the public API source files whose changes should trigger a doc update | ||
|
|
||
| To add a new feature doc to the system, just create a `*_FEATURE.md` file with the correct frontmatter — no script changes needed. | ||
|
|
||
| ## Steps | ||
|
|
||
| 1. **Discover feature docs** — find all `*_FEATURE.md` files in the repo (excluding `build/` and `artifacts/`). | ||
|
|
||
| 2. **For each doc, read its frontmatter** — extract `verified_against_commit` and `tracked_files`. | ||
| - If `tracked_files` is missing, derive the list from the doc's "Key Files" section (every source file path it references). Treat the doc as fully out of date and proceed to step 4 — the diff in step 3 cannot be computed. | ||
| - If `verified_against_commit` is missing, treat the doc as fully out of date and proceed to step 4 — the diff in step 3 cannot be computed. | ||
| - **Audit `tracked_files` coverage** against the doc's "Key Files" section. Every public-API source file path referenced in "Key Files" must also appear in `tracked_files`. This audit must happen *here*, before step 3 — otherwise drift in untracked files is silently ignored. If any are missing, add them to `tracked_files` and treat the doc as fully out of date so the newly-tracked files are inspected in step 4. | ||
|
|
||
| 3. **Get the diff since that commit** — run: | ||
| ``` | ||
| git diff <verified_against_commit>..HEAD -- <tracked_files> | ||
| ``` | ||
| If there is no diff for a doc, it is up to date — skip steps 4–7 for that doc and move to the next one. **Do not skip step 8** — registry coverage must be checked even when every doc is fresh. | ||
|
|
||
| 4. **Read the current source files in full** — read each tracked source file to understand the current public API surface. | ||
|
|
||
| 5. **Compare against the feature doc** — identify every discrepancy: | ||
| - New configuration options or parameters missing from the doc | ||
| - Removed or renamed options still mentioned in the doc | ||
| - Changed defaults, behaviors, or platform availability | ||
| - New types, enums, or feature flags not documented | ||
| - **Deprecated public cases not documented** — walk every public enum case, method, and property, including those marked `@available(*, deprecated, message:)`. Deprecated cases stay on the public API and must appear in the doc with a clear deprecation note, otherwise customers reading the doc won't know they exist or that they're being phased out. | ||
| - Outdated code examples | ||
|
|
||
| 6. **Update the feature doc** — apply all necessary changes: | ||
| - Update the Quick Start example to reflect the current API | ||
| - Update the Configuration Categories section | ||
| - Update Troubleshooting if relevant | ||
| - Fix any stale descriptions or defaults | ||
|
|
||
| 7. **Update the frontmatter** — set: | ||
| - `tracked_files` → if it was missing or out of date, write the list derived in step 2 | ||
| - `verified_against_commit` → current HEAD commit hash (use `git rev-parse --short=9 HEAD`) | ||
| - `sdk_version` → current version from `DatadogCore.podspec` | ||
| - `last_updated` → today's date (YYYY-MM-DD) | ||
|
|
||
| 8. **Update the registries** — when adding, renaming, or removing a `*_FEATURE.md` file, also update every place that hand-lists feature docs. `tools/feature-docs-verify.sh` enforces these and will fail CI otherwise: | ||
| - **`.github/workflows/changelog-to-confluence.yaml`** — both the `paths:` filter and the `cp` block. Use the relative path **without a leading slash** (`DatadogRUM/RUM_FEATURE.md`, not `/DatadogRUM/RUM_FEATURE.md`) — leading slashes silently never match in GitHub Actions `paths:` filters. The publish filename is kebab-case derived from the module + doc (`DatadogRUM/RUM_FEATURE.md` → `dd-sdk-ios-rum-feature.md`). | ||
| - **`AGENTS.md`** — add the doc to the file tree under "Feature-specific docs" and to the routing table ("Where to Look First"). | ||
| - **`docs/LLM_FEATURE_DOCS_GUIDELINES.md`** — add the doc to the expected feature-docs list. | ||
|
|
||
| ## Notes | ||
|
|
||
| - Only update docs for features whose tracked source files actually changed. | ||
| - Do not rewrite sections that are still accurate — only fix what is wrong or missing. | ||
| - The Quick Start example should always compile against the current API. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.