This work order converts inline documentation code examples into standalone, buildable, and testable files. It provides a high-level project management framework for the process that is detailed in docs/contributing/docs/examples.rst.
<module>/design.md: To plan the conversion, listing the source .rst files, the examples to convert, and the new files and build targets to be created.<module>/tasks.md: To track the status of each example conversion.design.md Skeleton# Compile Docs Examples: [Module Name] ## 1. Background - **1.1. Goal:** Convert inline code examples in the documentation for the `[Module Name]` module into buildable and testable examples. - **1.2. Source Documentation:** - `docs.rst` - (List other relevant `.rst` files here) ## 2. Plan - **Source File:** `docs.rst` - **Example:** Example of X feature - **Compilable:** Yes - **Action:** Convert to new file `x_feature_test.cc` - **Source File:** `docs.rst` - **Example:** Pseudo-code for Y concept - **Compilable:** No - **Action:** Leave as-is in a `code-block`
tasks.md Skeleton# Tasks: Compile Docs Examples - [Module Name] **Work order:** compile_docs_examples: [Module Name] - [ ] **Setup:** Scaffolding documents created. - [ ] **Planning:** - [ ] `design.md` complete. - [ ] `tasks.md` complete. - [ ] **Critic:** - [ ] Stage 1: Initial Review complete. - [ ] Stage 2: Deep Expert Review complete. - [ ] **Implementation:** - [ ] `x_feature_test.cc` created and compiling. - [ ] `docs.rst` updated with `literalinclude` for X feature. - [ ] **Verification:** - [ ] `//docs` build successful. - [ ] HTML output for `[Module Name]` verified. - [ ] **Work order review (Optional):** - [ ] Stage 1: Initial Feedback complete. - [ ] Stage 2: Deep Analysis complete. - [ ] **Integration & Cleanup:** - [ ] Scaffolding files deleted. - [ ] Final commit ready.
During this work order, the following file must be loaded into the context, as it is the primary source of truth for the implementation steps:
docs/contributing/docs/examples.rstSetup:
pw_string).<module>/design.md and <module>/tasks.md files..rst files) to find inline code examples (.. code-block:: cpp).design.md with a list of the documentation files and the specific examples to be converted.tasks.md with a checklist for each identified example.Planning:
design.md with the user.docs/contributing/docs/examples.rst to decide which examples should be made buildable. Confirm with the user.Critic:
design.md.docs/contributing/docs/examples.rst.DOCSTAGS are consistent with Pigweed conventions.Implementation:
docs/contributing/docs/examples.rst, convert the examples.tasks.md as each example is successfully converted and verified.Verification:
tasks.md are complete.Work order review (Optional):
Completion:
design.md and tasks.md scaffolding files.