1# Keep documentation up-to-date | Codex use cases1---
2name: Keep documentation up-to-date
3tagline: Use code and other sources to automate docs updates.
4summary: Use Codex to compare source code changes, public docs, release notes,
5 and PR context, then draft focused documentation updates with verification
6 steps before publishing.
7skills:
8 - token: github
9 url: https://github.com/openai/plugins/tree/main/plugins/github
10 description: Read issues, pull requests, comments, review threads, and failed
11 checks when GitHub is part of your bug intake.
12bestFor:
13 - Developer docs, READMEs, runbooks, examples, and migration notes that need
14 to track behavior that changes frequently.
15 - Teams that maintain documentation for a technical product.
16starterPrompt:
17 title: Update Docs From Source Changes
18 body: >-
19 Update the [product/feature] documentation based on the following sources:
2 20
3Codex use cases21 - the changed source files in [this repo/source linked repo]
4 22
523 - the existing docs pages that mention a new behavior
6 24
725 - any linked issue, PR, release note, or public reference I provide below
8 26
9Codex use case
10 27
11# Keep documentation up-to-date28 Then:
12 29
13Use code and other sources to automate docs updates.30 - identify what is user-facing
14 31
15Difficulty **Easy**32 - update only the docs that need to change
16 33
17Time horizon **30m**34 - keep unpublished roadmap, private customer details, and internal-only
35 context out of public docs
18 36
19Use Codex to compare source code changes, public docs, release notes, and PR context, then draft focused documentation updates with verification steps before publishing.37 - preserve the existing docs structure, terminology, and cross-links
20 38
21## Best for39 - run the docs checks that fit the change
22 40
23- Developer docs, READMEs, runbooks, examples, and migration notes that need to track behavior that changes frequently.
24- Teams that maintain documentation for a technical product.
25 41
26# Contents42 Before finalizing, summarize what changed, what you verified, and any claims
43 you could not prove from trusted sources.
27 44
28[← All use cases](https://developers.openai.com/codex/use-cases)
29 45
30Copy page [Export as PDF](https://developers.openai.com/codex/use-cases/update-documentation/?export=pdf)46 [link release notes or other references here]
31 47relatedLinks:
32Use Codex to compare source code changes, public docs, release notes, and PR context, then draft focused documentation updates with verification steps before publishing.48 - label: Workflows
33 49 url: /codex/prompting
34Easy50---
35
3630m
37
38Related links
39
40[Workflows](https://developers.openai.com/codex/workflows)
41
42## Best for
43
44- Developer docs, READMEs, runbooks, examples, and migration notes that need to track behavior that changes frequently.
45- Teams that maintain documentation for a technical product.
46
47## Skills & Plugins
48
49- [GitHub](https://github.com/openai/plugins/tree/main/plugins/github)
50
51 Read issues, pull requests, comments, review threads, and failed checks when GitHub is part of your bug intake.
52
53| Skill | Why use it |
54| --- | --- |
55| [GitHub](https://github.com/openai/plugins/tree/main/plugins/github) | Read issues, pull requests, comments, review threads, and failed checks when GitHub is part of your bug intake. |
56
57## Starter prompt
58
59Update the [product/feature] documentation based on the following sources:
60- the changed source files in [this repo/source linked repo]
61- the existing docs pages that mention a new behavior
62- any linked issue, PR, release note, or public reference I provide below
63Then:
64- identify what is user-facing
65- update only the docs that need to change
66- keep unpublished roadmap, private customer details, and internal-only context out of public docs
67- preserve the existing docs structure, terminology, and cross-links
68- run the docs checks that fit the change
69Before finalizing, summarize what changed, what you verified, and any claims you could not prove from trusted sources.
70[link release notes or other references here]
71
72Open in the Codex app
73
74Update the [product/feature] documentation based on the following sources:
75- the changed source files in [this repo/source linked repo]
76- the existing docs pages that mention a new behavior
77- any linked issue, PR, release note, or public reference I provide below
78Then:
79- identify what is user-facing
80- update only the docs that need to change
81- keep unpublished roadmap, private customer details, and internal-only context out of public docs
82- preserve the existing docs structure, terminology, and cross-links
83- run the docs checks that fit the change
84Before finalizing, summarize what changed, what you verified, and any claims you could not prove from trusted sources.
85[link release notes or other references here]
86 51
87## Introduction52## Introduction
88 53
108## What to give Codex78## What to give Codex
109 79
110| Source | Why it helps |80| Source | Why it helps |
111| --- | --- |81| ------------------------------------ | -------------------------------------------------------------------------- |
112| Changed code and tests | Lets Codex analyze actual behavior to draft focused documentation updates. |82| Changed code and tests | Lets Codex analyze actual behavior to draft focused documentation updates. |
113| Public release notes or product docs | Helps Codex match public terminology, availability, and feature status. |83| Public release notes or product docs | Helps Codex match public terminology, availability, and feature status. |
114| Pull request or issue context | Explains why the change happened and which user-facing behavior matters. |84| Pull request or issue context | Explains why the change happened and which user-facing behavior matters. |
118 88
119## Make the workflow repeatable89## Make the workflow repeatable
120 90
121For a repo-wide convention, add documentation expectations to [AGENTS.md](https://developers.openai.com/codex/guides/agents-md). For example:91For a repo-wide convention, add documentation expectations to [AGENTS.md](https://developers.openai.com/codex/agent-configuration/agents-md). For example:
122 92
123```93```md
124## Documentation94## Documentation
125 95
126- When user-facing behavior changes, check whether docs, examples, or changelogs need updates.96- When user-facing behavior changes, check whether docs, examples, or changelogs need updates.
129- Run the docs formatting and build checks before final handoff.99- Run the docs formatting and build checks before final handoff.
130```100```
131 101
132If the process has more steps, turn it into a [skill](https://developers.openai.com/codex/skills) so future Codex threads can follow the same source-checking, drafting, and verification loop. See [Save workflows as skills](https://developers.openai.com/codex/use-cases/reusable-codex-skills) that shares more details on this pattern.102If the process has more steps, turn it into a [skill](https://developers.openai.com/codex/build-skills) so future Codex tasks can follow the same source-checking, drafting, and verification loop. See [Save workflows as skills](https://developers.openai.com/codex/use-cases/reusable-codex-skills) for more details on this pattern.
133
134You can also turn this workflow into a [thread automation](https://developers.openai.com/codex/app/automations#thread-automations) by asking Codex to run it on a schedule, asking to fetch all the recent PRs from GitHub to automatically keep docs up-to-date, for example on a weekly basis:
135
136Create an automation that does the same as the workflow above, fetching all the recent PRs in [this repo/linked repo] and update docs based on the changes.
137
138## Related use cases
139
140[
141
142### Create a CLI Codex can use
143
144Ask Codex to create a composable CLI it can run from any folder, combine with repo scripts...
145
146Engineering Code](https://developers.openai.com/codex/use-cases/agent-friendly-clis)[
147
148### Create browser-based games
149
150Use Codex to turn a game brief into first a well-defined plan, and then a real browser-based...
151
152Engineering Code](https://developers.openai.com/codex/use-cases/browser-games)[
153
154### Follow a goal
155
156Use `/goal` when a task needs Codex to keep working across turns toward a verifiable...
157
158Engineering Automation](https://developers.openai.com/codex/use-cases/follow-goals)
159 103
104You can also [schedule this workflow from the current task](https://developers.openai.com/codex/automations#schedule-work-from-a-task). For example, ask Codex to fetch recent GitHub pull requests and keep the docs current every week: