docopslab-dev 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +21 -0
  3. data/README.adoc +904 -0
  4. data/assets/config-packs/actionlint/base.yml +13 -0
  5. data/assets/config-packs/actionlint/project.yml +13 -0
  6. data/assets/config-packs/htmlproofer/base.yml +27 -0
  7. data/assets/config-packs/htmlproofer/project.yml +25 -0
  8. data/assets/config-packs/rubocop/base.yml +130 -0
  9. data/assets/config-packs/rubocop/project.yml +8 -0
  10. data/assets/config-packs/shellcheck/base.shellcheckrc +14 -0
  11. data/assets/config-packs/subtxt/ai-asciidoc-antipatterns.sub.txt +11 -0
  12. data/assets/config-packs/vale/asciidoc/ExplicitSectionIDs.yml +8 -0
  13. data/assets/config-packs/vale/asciidoc/ExtraLineBeforeLevel1.yml +7 -0
  14. data/assets/config-packs/vale/asciidoc/OneSentencePerLine.yml +8 -0
  15. data/assets/config-packs/vale/asciidoc/PreferSourceBlocks.yml +8 -0
  16. data/assets/config-packs/vale/asciidoc/ProperAdmonitions.yml +8 -0
  17. data/assets/config-packs/vale/asciidoc/ProperDLs.yml +7 -0
  18. data/assets/config-packs/vale/asciidoc/UncleanListStart.yml +8 -0
  19. data/assets/config-packs/vale/authoring/ButParagraph.yml +8 -0
  20. data/assets/config-packs/vale/authoring/ExNotEg.yml +8 -0
  21. data/assets/config-packs/vale/authoring/LiteralTerms.yml +20 -0
  22. data/assets/config-packs/vale/authoring/Spelling.yml +679 -0
  23. data/assets/config-packs/vale/base.ini +38 -0
  24. data/assets/config-packs/vale/config/scripts/ExplicitSectionIDs.tengo +56 -0
  25. data/assets/config-packs/vale/config/scripts/ExtraLineBeforeLevel1.tengo +121 -0
  26. data/assets/config-packs/vale/config/scripts/OneSentencePerLine.tengo +53 -0
  27. data/assets/config-packs/vale/project.ini +5 -0
  28. data/assets/hooks/pre-commit +63 -0
  29. data/assets/hooks/pre-push +72 -0
  30. data/assets/scripts/adoc_section_ids.rb +50 -0
  31. data/assets/scripts/build-common.sh +193 -0
  32. data/assets/scripts/build-docker.sh +64 -0
  33. data/assets/scripts/build.sh +56 -0
  34. data/assets/scripts/parse_jekyll_asciidoc_logs.rb +467 -0
  35. data/assets/templates/Gemfile +7 -0
  36. data/assets/templates/Rakefile +3 -0
  37. data/assets/templates/gitignore +69 -0
  38. data/assets/templates/jekyll-asciidoc-fix.prompt.yml +17 -0
  39. data/assets/templates/spellcheck.prompt.yml +16 -0
  40. data/docopslab-dev.gemspec +56 -0
  41. data/docs/agent/AGENTS.md +229 -0
  42. data/docs/agent/index.md +80 -0
  43. data/docs/agent/missions/conduct-release.md +224 -0
  44. data/docs/agent/missions/setup-new-project.md +250 -0
  45. data/docs/agent/roles/devops-release-engineer.md +152 -0
  46. data/docs/agent/roles/docops-engineer.md +193 -0
  47. data/docs/agent/roles/planner-architect.md +74 -0
  48. data/docs/agent/roles/product-engineer.md +153 -0
  49. data/docs/agent/roles/product-manager.md +130 -0
  50. data/docs/agent/roles/project-manager.md +139 -0
  51. data/docs/agent/roles/qa-testing-engineer.md +115 -0
  52. data/docs/agent/roles/tech-docs-manager.md +143 -0
  53. data/docs/agent/roles/tech-writer.md +163 -0
  54. data/docs/agent/skills/asciidoc.md +609 -0
  55. data/docs/agent/skills/code-commenting.md +347 -0
  56. data/docs/agent/skills/fix-broken-links.md +309 -0
  57. data/docs/agent/skills/fix-jekyll-asciidoc-build-errors.md +23 -0
  58. data/docs/agent/skills/fix-spelling-issues.md +13 -0
  59. data/docs/agent/skills/git.md +170 -0
  60. data/docs/agent/skills/github-issues.md +135 -0
  61. data/docs/agent/skills/product-release-rollback-and-patching.md +71 -0
  62. data/docs/agent/skills/rake-cli-dev.md +57 -0
  63. data/docs/agent/skills/readme-driven-dev.md +13 -0
  64. data/docs/agent/skills/release-history.md +29 -0
  65. data/docs/agent/skills/ruby.md +192 -0
  66. data/docs/agent/skills/schemagraphy-sgyml.md +18 -0
  67. data/docs/agent/skills/tests-running.md +25 -0
  68. data/docs/agent/skills/tests-writing.md +45 -0
  69. data/docs/agent/skills/write-the-docs.md +54 -0
  70. data/docs/agent/topics/common-project-paths.md +117 -0
  71. data/docs/agent/topics/dev-tooling-usage.md +202 -0
  72. data/docs/agent/topics/devops-ci-cd.md +55 -0
  73. data/docs/agent/topics/product-docs-deployment.md +25 -0
  74. data/lib/docopslab/dev/auto_fix_asciidoc.rb +46 -0
  75. data/lib/docopslab/dev/checkers.rb +108 -0
  76. data/lib/docopslab/dev/config_manager.rb +241 -0
  77. data/lib/docopslab/dev/file_utils.rb +140 -0
  78. data/lib/docopslab/dev/git_hooks.rb +140 -0
  79. data/lib/docopslab/dev/help.rb +121 -0
  80. data/lib/docopslab/dev/initializer.rb +95 -0
  81. data/lib/docopslab/dev/linters.rb +451 -0
  82. data/lib/docopslab/dev/log_parser.rb +31 -0
  83. data/lib/docopslab/dev/paths.rb +46 -0
  84. data/lib/docopslab/dev/script_manager.rb +136 -0
  85. data/lib/docopslab/dev/spell_check.rb +194 -0
  86. data/lib/docopslab/dev/sync_ops.rb +468 -0
  87. data/lib/docopslab/dev/tasks.rb +440 -0
  88. data/lib/docopslab/dev/tool_execution.rb +68 -0
  89. data/lib/docopslab/dev/version.rb +8 -0
  90. data/lib/docopslab/dev.rb +392 -0
  91. data/specs/data/default-manifest.yml +64 -0
  92. data/specs/data/manifest-schema.yaml +63 -0
  93. data/specs/data/tasks-def.yml +321 -0
  94. data/specs/data/tools.yml +60 -0
  95. metadata +362 -0
@@ -0,0 +1,609 @@
1
+ # AI Agent’s Guide to Writing in AsciiDoc
2
+
3
+ This document is intended for AI agents operating within a DocOps Lab environment.
4
+
5
+ Original sources for this document include:
6
+
7
+ <!-- detect the origin url based on the slug (origin) -->
8
+ - [Documentation Style Guide](/docs/asciidoc-styles/)
9
+
10
+ If you learn nothing else form this guide, learn this: DocOps Lab is an AsciiDoc shop, and we _do not_ author in Markdown; we instead try to model excellent AsciiDoc authoring and syntax.
11
+
12
+ Table of Contents
13
+
14
+ - Avoid Slop Syntax
15
+ - Automated Style Enforcement
16
+ - General AsciiDoc Syntax Guidelines
17
+ - DocOps Lab Specific Syntax Guidelines
18
+ - Inline Syntax
19
+ - Inline Semantics
20
+ - Syntax Preferences
21
+ - Block Syntax
22
+ - Block Semantics
23
+ - Use Delimited Blocks
24
+ - Tables
25
+ - Example Blocks
26
+ - Special Syntax
27
+ - Attributes
28
+ - Attribute Formatting
29
+ - Vale Configuration and Usage
30
+ - Consumer Mode (Other Projects)
31
+
32
+ ## Avoid Slop Syntax
33
+
34
+ The biggest mistake AI agents make when writing AsciiDoc syntax is that they slip into Markdown.
35
+
36
+ **DO NOT use Markdown** syntax or conventions when generating AsciiDoc markup.
37
+
38
+ Use AsciiDoc description-list markup instead of bulleted lists when topical or parameterized information is to be conveyed.
39
+
40
+ DO use DLs
41
+
42
+ ```asciidoc
43
+ some topic or term::
44
+ The description of that term, possibly as a complete sentence or paragraph with a period.
45
+ ```
46
+
47
+ DO NOT use arbitrarily formatted lists
48
+
49
+ ```asciidoc
50
+ * *This kind of thing*: Followed by more information, is non-semantic.
51
+ ```
52
+
53
+ Definition DO NOT do it in Markdown
54
+
55
+ ```markdown
56
+ - **That awful double-asterisk notation** : Followed by a colon outside the bolding (no!) and then the "description". Just don't.
57
+ ```
58
+
59
+ You will almost NEVER be asked to author in Markdown, except when leaving notes to yourself, in which case your unfortunate bias towards Markdown is acceptable.
60
+
61
+ DocOps Lab is an AsciiDoc shop. With a few exceptions, all technical documentation is sourced in AsciiDoc format using a particular (standards-compliant) syntax style.
62
+
63
+ Structured/reference documentation is typically stored in YAML-formatted files, often with AsciiDoc-formatted text blocks.
64
+
65
+ Some documentation in DocOps Lab projects is written in Markdown format, such as documents intended for AI consumption (such as for agent orientation/instruction or for RAG retrieval).
66
+
67
+ ## Automated Style Enforcement
68
+
69
+ DocOps Lab projects using the `docopslab-dev` tool automatically enforce documentation style guidelines. This is done using [**Vale**](https://vale.sh), a prose and source-syntax linter.
70
+
71
+ To check documentation style:
72
+
73
+ Check prose for style issues
74
+
75
+ ```
76
+ bundle exec rake labdev:lint:text
77
+ ```
78
+
79
+ Check for AsciiDoc markup syntax issues
80
+
81
+ ```
82
+ bundle exec rake labdev:lint:adoc
83
+ ```
84
+
85
+ Check both syntax markup _and_ prose
86
+
87
+ ```
88
+ bundle exec rake labdev:lint:docs
89
+ ```
90
+
91
+ DocOps Lab maintains a general-audience style guide in the AYL DocStack project repository and website. That guide is reproduced here.
92
+
93
+ ## General AsciiDoc Syntax Guidelines
94
+
95
+ DocOps Lab documentation largely follows the conventions outlined in the [Recommended Practices](https://asciidoctor.org/docs/asciidoc-recommended-practices/) and[Writer’s Guide](https://asciidoctor.org/docs/asciidoc-writers-guide/) documents maintained by the Asciidoctor project.
96
+
97
+ Reinforcements and exceptions:
98
+
99
+ - Use `.adoc` extensions _execpt_ for Liquid templates used to render AsciiDoc files, which use `.asciidoc`.
100
+ - Use one sentence per line formatting.
101
+
102
+ - Let hard-returns signal spaces between sentences.
103
+ - Also do this for major colon- or semicolon-delimited sentences.
104
+ - Use ATX-style titles and section headings.
105
+ - For DRYness, use attributes for common URLs and paths (see Attribute Formatting).
106
+
107
+ ## DocOps Lab Specific Syntax Guidelines
108
+
109
+ ## Inline Syntax
110
+
111
+ ### Inline Semantics
112
+
113
+ The main purpose of inline semantics is to provide a clear indication of the role of the text to the reader — including artificial readers.
114
+
115
+ We can convey semantics by way of:
116
+
117
+ - declaration by element, role, or class
118
+ - text style based on declaration
119
+ - browser effects based on declaration and additional data
120
+
121
+ We use the following inline semantic coding in DocOps Lab publications.
122
+
123
+ ### Syntax Preferences
124
+
125
+ Use inline semantics liberally, even if you only insert the heavier syntax on a second or third pass.
126
+
127
+ Formatting with simple `*`, `_`, and ``` characters on first drafting makes lots of sense — or even missing some of these altogether until the second pass.
128
+
129
+ But before you merge new text documents into your codebase, add role-based inline semantics wherever they are supported.
130
+
131
+ Let the reader know and make use of special text, most importantly any **verbatim inline text**.
132
+
133
+ Even if you are not ready to add such fine-grained tests to your pipeline, consider the value of having all your commands for a given runtime app labeled ahead of time (such as `.app-ruby`), and the advantage to the reader, as well.
134
+
135
+ ## Block Syntax
136
+
137
+ ### Block Semantics
138
+
139
+ Use semantic indicators deliberately.
140
+
141
+ The more you assert about a block of text you are writing, the better the placement and content of that block will be.
142
+
143
+ Semantic assertions reside in the source markup, which may convey means of interpreting that same data visually in the output, as an indication to the reader.
144
+
145
+ For instance, _warning_ admonitions should only deliver warning content, and the user should clearly see that a warning is interrupting the flow of the content in which it appears.
146
+
147
+ ```asciidoc
148
+ [WARNING]
149
+ ====
150
+ Avoid misusing or overusing admonition blocks.
151
+ ====
152
+ ```
153
+
154
+ Semantic notations in our source remind us to treat the content properly.
155
+
156
+ ```asciidoc
157
+ [WARNING]
158
+ ====
159
+ Avoid misusing or overusing admonition blocks.
160
+ This will be hypocritically violated throughout this guide.
161
+ ====
162
+ ```
163
+
164
+ True as it may be, the second sentence in that admonition should be removed from the block. It can either be its own block, or it can be allowed to fade into the surrounding content.
165
+
166
+ Sometimes the entire admonition may end up deserving this treatment.
167
+
168
+ ### Use Delimited Blocks
169
+
170
+ Generally, use explicit boundary lines to wrap significant blocks, rather than relying on other syntax cues to establish the “type” of block is intended. These lines are called [_linewise delimiters_](https://docs.asciidoctor.org/asciidoc/latest/blocks/delimited/#linewise-delimiters).
171
+
172
+ For example, use the following syntax to wrap the contents of an admonition block:
173
+
174
+ Example 1. Example admonition block syntax with linewise delimiter
175
+
176
+ ```asciidoc
177
+ [NOTE]
178
+ ====
179
+ The content of an admonition block should be sandwiched between `====` lines.
180
+ Use one-sentence-per-line even in admonitions.
181
+ ====
182
+ ```
183
+
184
+ The standard linewise delimiters for various AsciiDoc blocks are as follows:
185
+
186
+ <table>
187
+ <tr>
188
+ <td class="hdlist1">
189
+ <code>====</code>
190
+ </td>
191
+ <td class="hdlist2">
192
+ <p>For <em>admonitions</em> and <em>examples</em></p>
193
+ </td>
194
+ </tr>
195
+ <tr>
196
+ <td class="hdlist1">
197
+ <code>----</code>
198
+ </td>
199
+ <td class="hdlist2">
200
+ <p>For code listing (verbatim) blocks</p>
201
+ </td>
202
+ </tr>
203
+ <tr>
204
+ <td class="hdlist1">
205
+ <code>....</code>
206
+ </td>
207
+ <td class="hdlist2">
208
+ <p>For literal (verbatim) blocks</p>
209
+ </td>
210
+ </tr>
211
+ <tr>
212
+ <td class="hdlist1">
213
+ <code> **** </code>
214
+ </td>
215
+ <td class="hdlist2">
216
+ <p>For sidebar blocks</p>
217
+ </td>
218
+ </tr>
219
+ <tr>
220
+ <td class="hdlist1">
221
+ <code>|===</code>
222
+ </td>
223
+ <td class="hdlist2">
224
+ <p>For tables</p>
225
+ </td>
226
+ </tr>
227
+ <tr>
228
+ <td class="hdlist1">
229
+ <code> ____ </code>
230
+ </td>
231
+ <td class="hdlist2">
232
+ <p>For quote blocks</p>
233
+ </td>
234
+ </tr>
235
+ <tr>
236
+ <td class="hdlist1">
237
+ <code>++++</code>
238
+ </td>
239
+ <td class="hdlist2">
240
+ <p>For raw/passthrough blocks</p>
241
+ </td>
242
+ </tr>
243
+ <tr>
244
+ <td class="hdlist1">
245
+ <code>--</code>
246
+ </td>
247
+ <td class="hdlist2">
248
+ <p>For open blocks</p>
249
+ </td>
250
+ </tr>
251
+ </table>
252
+
253
+ For code listings, literals, or really any block that might contain text that could be confused with the delimiter, vary the length by using a greater number of delimiter characters on the _outer_ block.
254
+
255
+ Example “example” block containing an admonition block
256
+
257
+ ```asciidoc
258
+ [example]
259
+ ========
260
+ [NOTE]
261
+ ====
262
+ This is an example block containing an admonition block.
263
+ ====
264
+ ========
265
+ ```
266
+
267
+ #### Exception: Brief admonitions
268
+
269
+ Some blocks do not require delimiters. In cases of _repeated_, _nearly identical_ blocks, containing just one line of content, you can use the _single-line_ syntax where it is available.
270
+
271
+ Example single-line admonition block syntax
272
+
273
+ ```asciidoc
274
+ NOTE: This is a single-line admonition block.
275
+ ```
276
+
277
+ **Exception to this exception** :
278
+ We do not recommend the same-line syntax for admonition blocks other than `NOTE` and `TIP`. For `IMPORTANT`, `CAUTION`, and `WARNING`, use at least the 2-line syntax, if not explicit delimiters.
279
+
280
+ ```asciidoc
281
+ [IMPORTANT]
282
+ This is a critical notice, but it's not warning you of danger.
283
+ ```
284
+
285
+ #### Exception: Single-line terminal commands
286
+
287
+ Another common case is 1-line terminal commands, for which this guide recommends using a literal block with a `prompt` role added.
288
+
289
+ ```asciidoc
290
+ [.prompt]
291
+ echo "Hello, world!"
292
+ ```
293
+
294
+ The single preceding space notation affirms the use of a literal block for any consecutive lines of content preceded by a single space. For multi-line terminal commands/output, use the `…​.` syntax to distinguish the block.
295
+
296
+ #### Exception to the exceptions
297
+
298
+ Whenever additional options must be set for a block, such as a title or role, use the linewise delimiter syntax — even in one-liner cases.
299
+
300
+ ```asciidoc
301
+ [.prompt,subs="+attributes"]
302
+ ....
303
+ echo "Hello, {what}!"
304
+ ....
305
+ ```
306
+
307
+ ### Tables
308
+
309
+ Tables are a special case of block content, and they have their own syntax and limited semantics in AsciiDoc.
310
+
311
+ ```asciidoc
312
+ [options="header",cols=">1,^1,^1,^1,^1,^1,^1,^1"]
313
+ |===
314
+ | Format | Human | Cmmts | Nesting | Langs | Apps | Git | Total
315
+
316
+ | YAML
317
+ | 5
318
+ | 5
319
+ | 5
320
+ | 4
321
+ | 4
322
+ | 5
323
+ | 28
324
+
325
+ | TOML
326
+ | 5
327
+ | 5
328
+ | 5
329
+ | 3
330
+ | 2
331
+ | 5
332
+ | 26
333
+
334
+ | XML
335
+ | 2
336
+ | 4
337
+ | 5
338
+ | 5
339
+ | 2
340
+ | 2
341
+ | 20
342
+
343
+ | JSON
344
+ | 3
345
+ | 1
346
+ | 5
347
+ | 5
348
+ | 3
349
+ | 3
350
+ | 20
351
+
352
+ | CSV
353
+ | 4
354
+ | 0
355
+ | 0
356
+ | 5
357
+ | 1
358
+ | 3
359
+ | 13
360
+ |===
361
+ ```
362
+
363
+ At least for tables of roughly this size and complexity, the AsciiDoc table syntax is mostly legible pre-conversion.
364
+
365
+ And such tables convert fairly nicely to HTML, PDF, and even ePub output formats.
366
+
367
+ Example 2. Example table output
368
+
369
+ <table class="tableblock frame-all grid-all stretch">
370
+ <colgroup>
371
+ <col style="width: 12.5%;">
372
+ <col style="width: 12.5%;">
373
+ <col style="width: 12.5%;">
374
+ <col style="width: 12.5%;">
375
+ <col style="width: 12.5%;">
376
+ <col style="width: 12.5%;">
377
+ <col style="width: 12.5%;">
378
+ <col style="width: 12.5%;">
379
+ </colgroup>
380
+ <thead>
381
+ <tr>
382
+ <th class="tableblock halign-right valign-top">Format</th>
383
+ <th class="tableblock halign-center valign-top">Human</th>
384
+ <th class="tableblock halign-center valign-top">Cmmts</th>
385
+ <th class="tableblock halign-center valign-top">Nesting</th>
386
+ <th class="tableblock halign-center valign-top">Langs</th>
387
+ <th class="tableblock halign-center valign-top">Apps</th>
388
+ <th class="tableblock halign-center valign-top">Git</th>
389
+ <th class="tableblock halign-center valign-top">Total</th>
390
+ </tr>
391
+ </thead>
392
+ <tbody>
393
+ <tr>
394
+ <td class="tableblock halign-right valign-top"><p class="tableblock">YAML</p></td>
395
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
396
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
397
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
398
+ <td class="tableblock halign-center valign-top"><p class="tableblock">4</p></td>
399
+ <td class="tableblock halign-center valign-top"><p class="tableblock">4</p></td>
400
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
401
+ <td class="tableblock halign-center valign-top"><p class="tableblock">28</p></td>
402
+ </tr>
403
+ <tr>
404
+ <td class="tableblock halign-right valign-top"><p class="tableblock">TOML</p></td>
405
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
406
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
407
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
408
+ <td class="tableblock halign-center valign-top"><p class="tableblock">3</p></td>
409
+ <td class="tableblock halign-center valign-top"><p class="tableblock">2</p></td>
410
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
411
+ <td class="tableblock halign-center valign-top"><p class="tableblock">26</p></td>
412
+ </tr>
413
+ <tr>
414
+ <td class="tableblock halign-right valign-top"><p class="tableblock">XML</p></td>
415
+ <td class="tableblock halign-center valign-top"><p class="tableblock">2</p></td>
416
+ <td class="tableblock halign-center valign-top"><p class="tableblock">4</p></td>
417
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
418
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
419
+ <td class="tableblock halign-center valign-top"><p class="tableblock">2</p></td>
420
+ <td class="tableblock halign-center valign-top"><p class="tableblock">2</p></td>
421
+ <td class="tableblock halign-center valign-top"><p class="tableblock">20</p></td>
422
+ </tr>
423
+ <tr>
424
+ <td class="tableblock halign-right valign-top"><p class="tableblock">JSON</p></td>
425
+ <td class="tableblock halign-center valign-top"><p class="tableblock">3</p></td>
426
+ <td class="tableblock halign-center valign-top"><p class="tableblock">1</p></td>
427
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
428
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
429
+ <td class="tableblock halign-center valign-top"><p class="tableblock">3</p></td>
430
+ <td class="tableblock halign-center valign-top"><p class="tableblock">3</p></td>
431
+ <td class="tableblock halign-center valign-top"><p class="tableblock">20</p></td>
432
+ </tr>
433
+ <tr>
434
+ <td class="tableblock halign-right valign-top"><p class="tableblock">CSV</p></td>
435
+ <td class="tableblock halign-center valign-top"><p class="tableblock">4</p></td>
436
+ <td class="tableblock halign-center valign-top"><p class="tableblock">0</p></td>
437
+ <td class="tableblock halign-center valign-top"><p class="tableblock">0</p></td>
438
+ <td class="tableblock halign-center valign-top"><p class="tableblock">5</p></td>
439
+ <td class="tableblock halign-center valign-top"><p class="tableblock">1</p></td>
440
+ <td class="tableblock halign-center valign-top"><p class="tableblock">3</p></td>
441
+ <td class="tableblock halign-center valign-top"><p class="tableblock">13</p></td>
442
+ </tr>
443
+ </tbody>
444
+ </table>
445
+
446
+ ### Example Blocks
447
+
448
+ Use example blocks liberally. If something fits the description of being an example — especially if the words “example” or “sample” are used in the title, caption, or surrounding text referring to a given block of _anything_…​ then **wrap it in an example block**.
449
+
450
+ Instances of the following block types may commonly be instances of examples, and just as commonly they may not be.
451
+
452
+ - figures (diagrams, illustrations, screenshots)
453
+ - tables
454
+ - code listings
455
+ - literal blocks (sample prompts, logs, etc)
456
+ - rich-text snippets (rendered results, a user story, etc)
457
+
458
+ Whenever any such instances _are examples_, prepend and append them with example blocks, and prefer to title them at the exampple-block level rather than the inner-content level.
459
+
460
+ Example of a code block treated as an example
461
+
462
+ ```asciidoc
463
+ :example-caption: Example
464
+
465
+ .require statement in Ruby
466
+ ====
467
+ [source,ruby]
468
+ ----
469
+ require 'jekyll'
470
+ ----
471
+ ====
472
+ ```
473
+
474
+ ## Special Syntax
475
+
476
+ ### Attributes
477
+
478
+ ### Attribute Formatting
479
+
480
+ AsciiDoc attributes are often used to store reusable matter. In certain contexts, attributes should follow a formatting convention that makes them easier to name and recall.
481
+
482
+ #### Boolean Attributes
483
+
484
+ Use toggles to set or conditionalize states such as:
485
+
486
+ - intended audience type or role
487
+
488
+ - `audience-agent`
489
+ - `audience-beginner`
490
+ - ``
491
+ - target platform or format
492
+
493
+ - `env-github`
494
+ - `site-gen-jekyll`
495
+ - `backend-pdf`
496
+
497
+ These kinds of attributes are passed depending on how the AsciiDoc is converted. Platform and format indicators tend to get argued by the converter at runtime.
498
+
499
+ But you can also look check for statuses that might be set in previous files depending on the use-case of the output.
500
+
501
+ Testing for _existence_ of a target platform
502
+
503
+ ```asciidoc
504
+ ifdef::audience-level-beginner[]
505
+ As a beginner, you will see extra content in parts of this guide.
506
+
507
+ If you are an expert, skip to the <<expert-guide>>.
508
+ endif::[]
509
+ ```
510
+
511
+ Testing for _non-existence_ of a target audience type.
512
+
513
+ ```asciidoc
514
+ ifndef::audience-agent[]
515
+ This content is _not_ to appear in docs generated for AI agents.
516
+ endif::[]
517
+ ```
518
+
519
+ It is generally advised to create two versions of any such indicator that may need to be resolve a variable placeholder later.
520
+
521
+ Setting open-ended key and boolean simultaneously
522
+
523
+ ```asciidoc
524
+ :audience-level: beginner
525
+ :audience-level-beginner: true
526
+
527
+ Later we can reference the {audience-level}, which might be overwritten by an attribute passed at runtime.
528
+ ```
529
+
530
+ #### URL Attributes
531
+
532
+ Format URL-storing attributes like so:
533
+
534
+ ```asciidoc
535
+ :syntax_area_descriptive-slug_form:
536
+ ```
537
+
538
+ Where:
539
+
540
+ - `syntax_` is one of
541
+
542
+ - `href_` (external)
543
+ - `xref_` (local)
544
+ - none (skip it — presumed to be a straight URL)
545
+ - `area_` is a component or category like `docs_` or `pages_`, mainly to ensure unique slugs across divisions
546
+ - `form` is the way the resource is presented:
547
+
548
+ - `link` (includes linked text _and_ the URL)
549
+ - `url` (just the URL)
550
+
551
+ Examples
552
+
553
+ ```asciidoc
554
+ :docopslab_hub_url: https://github.com/DocOps
555
+ :href_docopslab_aylstack_url: {docopslab_hub_url}/aylstack/
556
+ :href_docopslab_aylstack_link: link:{href_docopslab_aylstack_url}[AYL DocStack]
557
+ ```
558
+
559
+ ## Vale Configuration and Usage
560
+
561
+ Vale configuration and styles are managed in coordination with the link:`docopslab-dev` gem.
562
+
563
+ Our implementation of Vale allows for local project overrides while maintaining a centralized database of styles.
564
+
565
+ Linting for documentation quality and consistency, both AsciiDoc markup syntax and prose quality/correctness.
566
+
567
+ This tool provides a custom styles package and a modified configuration system, enabling multi-file merging.
568
+
569
+ **Base config** :
570
+ `.config/.vendor/docopslab/vale.ini` (from source)
571
+
572
+ **Project config** :
573
+ `.config/vale.local.ini` (inherits via `BasedOnStyles`)
574
+
575
+ **Ephemeral config** :
576
+ `.config/vale.ini` (merged from base and target)
577
+
578
+ **Sync command** :
579
+ `bundle exec rake labdev:sync:vale`
580
+
581
+ ### Consumer Mode (Other Projects)
582
+
583
+ For all other projects, the gem works in a standard package consumption mode:
584
+
585
+ - The project’s `vale.ini` should list all desired packages, including a URL to the stable, published `DocOpsLabStyles.zip`.
586
+ - The `labdev:sync:styles` task simply runs `vale sync` in the proper context, downloading all listed packages into a local `.vale/styles` directory.
587
+
588
+ > **TIP:** The `labdev:sync:vale` task updates both the base config and the styles package.
589
+
590
+ The `.config/vale.ini` for consumer projects (based on the gem’s template) should look like this:
591
+
592
+ ```ini
593
+ # CONSUMER MODE CONFIG
594
+
595
+ StylesPath = .vale/styles
596
+
597
+ # List all packages, including the URL to the central DocOpsLabStyles package.
598
+ # TODO: Update with the real URL.
599
+ Packages = RedHat, proselint, write-good, https://example.com/path/to/DocOpsLabStyles.zip
600
+
601
+ [*.adoc]
602
+ BasedOnStyles = RedHat, DocOpsLab-Authoring, DocOpsLab-AsciiDoc
603
+ ```
604
+
605
+ This dual-mode system provides a robust workflow for both developing and consuming the centralized Vale styles.
606
+
607
+ > **NOTE:** For full Vale configuration settings (“keys”) reference, see [the Vale documentation](https://vale.sh/docs/configuration).
608
+ > **NOTE:** For information on managing DocOps Lab’s Vale styles, see [the `docopslab-dev` gem README](https://github.com/DocOps/lab/blob/main/gems/docopslab-dev/README.adoc).
609
+