From dita-tools
Adds missing .Procedure block titles before first ordered lists in AsciiDoc procedure modules (:_mod-docs-content-type: PROCEDURE) for DITA task mapping. Use to fix procedure markers or prep for DITA conversion.
npx claudepluginhub redhat-documentation/redhat-docs-agent-tools --plugin dita-toolsThis skill is limited to using the following tools:
Add missing `.Procedure` block title to procedure modules for DITA compatibility.
Fixes missing list continuation markers (+) in AsciiDoc procedure steps for DITA compatibility using Ruby script task_step.rb. Useful when fixing task steps or preparing procedures for DITA.
Reviews AsciiDoc (.adoc) files for Red Hat modular documentation compliance: module types (concept, procedure, reference), assembly structure, anchor IDs with _{context}, context variables, and include directives.
Assesses CQA parameters P12, Q12-Q16 for procedure quality in Red Hat modular docs: prerequisites label/formatting/count/language, step limits, command examples, optional steps, verification, resources.
Share bugs, ideas, or general feedback.
Add missing .Procedure block title to procedure modules for DITA compatibility.
This skill uses the task_contents.rb Ruby script to find procedure modules that are missing the .Procedure block title and adds it before the first ordered list (the procedure steps).
The Vale rule TaskContents.yml detects procedure modules (files with :_mod-docs-content-type: PROCEDURE) that do not have a .Procedure or ..Procedure block title.
Before:
:_mod-docs-content-type: PROCEDURE
[id="installing-software"]
= Installing the software
[role="_abstract"]
Install the software using the package manager.
.Prerequisites
* You have admin access.
* The repository is configured.
. Download the package.
. Run the installer.
. Verify the installation.
After:
:_mod-docs-content-type: PROCEDURE
[id="installing-software"]
= Installing the software
[role="_abstract"]
Install the software using the package manager.
.Prerequisites
* You have admin access.
* The repository is configured.
.Procedure
. Download the package.
. Run the installer.
. Verify the installation.
The .Procedure block title is required to properly map procedure steps to DITA task elements. Without it, the converter cannot identify where the task steps begin.
When the user asks to fix procedure titles:
:_mod-docs-content-type: PROCEDURE)ruby scripts/task_contents.rb <file>
To preview changes without modifying files:
ruby scripts/task_contents.rb <file> --dry-run
ruby scripts/task_contents.rb <file> -o <output.adoc>
find <folder> -name "*.adoc" -exec ruby scripts/task_contents.rb {} \;
:_mod-docs-content-type: PROCEDURE are skipped.Procedure are not modified.Procedure title is inserted before the first ordered list after any Prerequisites section<file>: Added .Procedure title before line N
Or:
<file>: .Procedure title already exists
Or:
<file>: Not a procedure module (skipped)
Or:
<file>: No ordered list found for procedure steps
The Ruby script is located at: scripts/task_contents.rb
This skill addresses the warning from: .vale/styles/AsciiDocDITA/TaskContents.yml