From jtbd-tools
Extracts Jobs-To-Be-Done records from modular AsciiDoc documentation repos. Analyzes assemblies, includes, conditionals via reduction, source mapping, and chunked analysis for user goals.
npx claudepluginhub redhat-documentation/redhat-docs-agent-tools --plugin jtbd-toolsThis skill is limited to using the following tools:
Extract Jobs-To-Be-Done records from AsciiDoc documentation repositories, specifically Red Hat modular docs that use assemblies, modules, includes, attributes, and conditionals.
Runs end-to-end JTBD workflow for AsciiDoc repos with master.adoc: analyze JTBD records, generate TOC, compare structures, produce consolidation reports. Batch processing supported.
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.
Flattens AsciiDoc assemblies by expanding all include directives into a single self-contained document using asciidoctor-reducer. Useful for reducing, resolving, or normalizing nested documentation.
Share bugs, ideas, or general feedback.
Extract Jobs-To-Be-Done records from AsciiDoc documentation repositories, specifically Red Hat modular docs that use assemblies, modules, includes, attributes, and conditionals.
# Analyze a book (master.adoc)
/jtbd-analyze-adoc ~/Documents/RHAI_DOCUMENTATION/openshift-ai-documentation/deploying-models/master.adoc --variant self-managed
# Analyze an assembly
/jtbd-analyze-adoc ~/Documents/RHAI_DOCUMENTATION/openshift-ai-documentation/assemblies/deploying-models.adoc --variant self-managed
# With research config
/jtbd-analyze-adoc path/to/master.adoc --variant self-managed --research redhat-ai
# With custom output
/jtbd-analyze-adoc path/to/master.adoc --variant self-managed --output analysis/rhoai-adoc/deploying-models/
master.adocself-managed or cloud-service to resolve conditionalsanalysis/<book-name>-adoc/<doc>/gem install asciidoctor-reducer
If Ruby/gem is not available:
brew install ruby # macOS
asciidoctor-reducer is availableasciidoctor-reducer to flatten the assembly/book into a single file, resolving all include:: directives--variant is specified, sets the conditional attribute so ifdef::self-managed[] / ifdef::cloud-service[] blocks are resolved<book>-<variant>-reduced.adoc<doc>-include-graph.json for Phase 2 refactoring use=, ==, ===, etc.)methodology.md--skip-validation)| Reduced File Size | Strategy |
|---|---|
| < 500 lines | Single pass processing |
| >= 500 lines | Chunked subagent processing |
For small reduced files:
methodology.md)For large reduced files:
Task(subagent_type="general-purpose", prompt=chunk_analysis_prompt)
Unless --skip-validation is passed, run the grounding validation described in methodology.md Step 9:
evidence field to extract the source file, section heading, and line rangesection field matches an actual heading in the reduced file (mechanical check)validation_status and validation_flags on each recordProcessing strategy:
Red Hat modular docs follow naming conventions:
con-*.adoc = CONCEPT modules (explanatory content)proc-*.adoc = PROCEDURE modules (step-by-step instructions)ref-*.adoc = REFERENCE modules (tables, lists, specifications)snip-*.adoc = SNIPPET modules (reusable fragments)assembly-*.adoc or assembly_*.adoc = ASSEMBLY files (collections of modules)AsciiDoc uses = for headings (unlike markdown's #):
= Level 1 (Document Title)
== Level 2 (Chapter)
=== Level 3 (Section)
==== Level 4 (Subsection)
Each JTBD record's evidence and notes fields are enriched with AsciiDoc-specific provenance:
{
"evidence": "deploying-models-reduced.adoc -> Section 'Deploying models...', lines 45-120 [module: upstream-modules/proc-deploying-models.adoc, type: PROCEDURE]",
"notes": "Source module: upstream-modules/proc-deploying-models.adoc (PROCEDURE). Assembly: assemblies/deploying-models.adoc"
}
When --variant is specified:
ifdef::self-managed[] blocks are included (or excluded for cloud-service)ifdef::cloud-service[] blocks are included (or excluded for self-managed)# Step 1: Reduce and analyze
/jtbd-analyze-adoc path/to/deploying-models/master.adoc --variant self-managed
# Step 2: Review results
cat analysis/rhoai-adoc/deploying-models/deploying-models-jtbd.jsonl
# Step 3: Check include graph
cat analysis/rhoai-adoc/deploying-models/deploying-models-include-graph.json
# Step 4: Generate TOC from records
/jtbd-toc analysis/rhoai-adoc/deploying-models/
# Step 5: Compare with current structure
/jtbd-compare --project rhoai-adoc --doc deploying-models
Default:
analysis/<book-name>-adoc/<doc>/<doc>-jtbd.jsonl
analysis/<book-name>-adoc/<doc>/<doc>-jtbd.csv
analysis/<book-name>-adoc/<doc>/<doc>-toc-new_taxonomy.md
analysis/<book-name>-adoc/<doc>/<doc>-include-graph.json
analysis/<book-name>-adoc/<doc>/<doc>-<variant>-reduced.adoc
Same as /jtbd-analyze, plus:
include:: directives)no_evidence records (evidence citations resolve to real content)The complete JTBD extraction methodology is shared with /jtbd-analyze:
methodology.md for extraction rulesschema.md for record schema