docopslab-dev 0.1.0 → 0.2.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 (99) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +645 -318
  3. data/docopslab-dev.gemspec +2 -3
  4. data/docs/agent/index.md +4 -8
  5. data/docs/agent/misc/bash-styles.md +470 -0
  6. data/docs/agent/missions/conduct-release.md +161 -87
  7. data/docs/agent/missions/setup-new-project.md +228 -134
  8. data/docs/agent/roles/devops-release-engineer.md +60 -17
  9. data/docs/agent/roles/docops-engineer.md +84 -20
  10. data/docs/agent/roles/planner-architect.md +22 -0
  11. data/docs/agent/roles/product-engineer.md +63 -15
  12. data/docs/agent/roles/product-manager.md +57 -24
  13. data/docs/agent/roles/project-manager.md +48 -12
  14. data/docs/agent/roles/qa-testing-engineer.md +48 -14
  15. data/docs/agent/roles/tech-docs-manager.md +63 -17
  16. data/docs/agent/roles/tech-writer.md +68 -14
  17. data/docs/agent/skills/asciidoc.md +65 -238
  18. data/docs/agent/skills/bash-cli-dev.md +135 -0
  19. data/docs/agent/skills/code-commenting.md +143 -106
  20. data/docs/agent/skills/fix-broken-links.md +145 -100
  21. data/docs/agent/skills/fix-jekyll-asciidoc-build-errors.md +1 -10
  22. data/docs/agent/skills/fix-spelling-issues.md +0 -3
  23. data/docs/agent/skills/git.md +69 -34
  24. data/docs/agent/skills/github-issues.md +110 -71
  25. data/docs/agent/skills/rake-cli-dev.md +1 -1
  26. data/docs/agent/skills/readme-driven-dev.md +1 -0
  27. data/docs/agent/skills/release-history.md +1 -7
  28. data/docs/agent/skills/ruby.md +18 -7
  29. data/docs/agent/skills/schemagraphy-sgyml.md +3 -0
  30. data/docs/agent/skills/tests-running.md +22 -14
  31. data/docs/agent/skills/tests-writing.md +51 -28
  32. data/docs/agent/skills/write-the-docs.md +71 -9
  33. data/docs/agent/topics/common-project-paths.md +122 -70
  34. data/docs/agent/topics/dev-tooling-usage.md +70 -77
  35. data/docs/agent/topics/devops-ci-cd.md +3 -1
  36. data/docs/agent/topics/product-docs-deployment.md +18 -12
  37. data/docs/library-readme.adoc +39 -0
  38. data/lib/docopslab/dev/cast_ops.rb +199 -0
  39. data/lib/docopslab/dev/config_manager.rb +6 -6
  40. data/lib/docopslab/dev/data_utils.rb +42 -0
  41. data/lib/docopslab/dev/file_utils.rb +18 -7
  42. data/lib/docopslab/dev/git_branch.rb +201 -0
  43. data/lib/docopslab/dev/git_hooks.rb +17 -11
  44. data/lib/docopslab/dev/initializer.rb +13 -4
  45. data/lib/docopslab/dev/library/cache.rb +167 -0
  46. data/lib/docopslab/dev/library/fetch.rb +209 -0
  47. data/lib/docopslab/dev/library.rb +328 -0
  48. data/lib/docopslab/dev/linters.rb +63 -12
  49. data/lib/docopslab/dev/manifest.rb +28 -0
  50. data/lib/docopslab/dev/paths.rb +0 -17
  51. data/lib/docopslab/dev/script_manager.rb +12 -6
  52. data/lib/docopslab/dev/skim.rb +109 -0
  53. data/lib/docopslab/dev/spell_check.rb +2 -2
  54. data/lib/docopslab/dev/sync_ops.rb +94 -33
  55. data/lib/docopslab/dev/tasks.rb +58 -18
  56. data/lib/docopslab/dev/version.rb +1 -1
  57. data/lib/docopslab/dev.rb +75 -35
  58. data/specs/data/default-manifest.yml +15 -5
  59. data/specs/data/library-index.yml +22 -0
  60. data/specs/data/manifest-schema.yaml +142 -4
  61. data/specs/data/tasks-def.yml +122 -10
  62. metadata +28 -39
  63. data/assets/config-packs/actionlint/base.yml +0 -13
  64. data/assets/config-packs/actionlint/project.yml +0 -13
  65. data/assets/config-packs/htmlproofer/base.yml +0 -27
  66. data/assets/config-packs/htmlproofer/project.yml +0 -25
  67. data/assets/config-packs/rubocop/base.yml +0 -130
  68. data/assets/config-packs/rubocop/project.yml +0 -8
  69. data/assets/config-packs/shellcheck/base.shellcheckrc +0 -14
  70. data/assets/config-packs/subtxt/ai-asciidoc-antipatterns.sub.txt +0 -11
  71. data/assets/config-packs/vale/asciidoc/ExplicitSectionIDs.yml +0 -8
  72. data/assets/config-packs/vale/asciidoc/ExtraLineBeforeLevel1.yml +0 -7
  73. data/assets/config-packs/vale/asciidoc/OneSentencePerLine.yml +0 -8
  74. data/assets/config-packs/vale/asciidoc/PreferSourceBlocks.yml +0 -8
  75. data/assets/config-packs/vale/asciidoc/ProperAdmonitions.yml +0 -8
  76. data/assets/config-packs/vale/asciidoc/ProperDLs.yml +0 -7
  77. data/assets/config-packs/vale/asciidoc/UncleanListStart.yml +0 -8
  78. data/assets/config-packs/vale/authoring/ButParagraph.yml +0 -8
  79. data/assets/config-packs/vale/authoring/ExNotEg.yml +0 -8
  80. data/assets/config-packs/vale/authoring/LiteralTerms.yml +0 -20
  81. data/assets/config-packs/vale/authoring/Spelling.yml +0 -679
  82. data/assets/config-packs/vale/base.ini +0 -38
  83. data/assets/config-packs/vale/config/scripts/ExplicitSectionIDs.tengo +0 -56
  84. data/assets/config-packs/vale/config/scripts/ExtraLineBeforeLevel1.tengo +0 -121
  85. data/assets/config-packs/vale/config/scripts/OneSentencePerLine.tengo +0 -53
  86. data/assets/config-packs/vale/project.ini +0 -5
  87. data/assets/hooks/pre-commit +0 -63
  88. data/assets/hooks/pre-push +0 -72
  89. data/assets/scripts/adoc_section_ids.rb +0 -50
  90. data/assets/scripts/build-common.sh +0 -193
  91. data/assets/scripts/build-docker.sh +0 -64
  92. data/assets/scripts/build.sh +0 -56
  93. data/assets/scripts/parse_jekyll_asciidoc_logs.rb +0 -467
  94. data/assets/templates/Gemfile +0 -7
  95. data/assets/templates/Rakefile +0 -3
  96. data/assets/templates/gitignore +0 -69
  97. data/assets/templates/jekyll-asciidoc-fix.prompt.yml +0 -17
  98. data/assets/templates/spellcheck.prompt.yml +0 -16
  99. data/docs/agent/AGENTS.md +0 -229
@@ -11,17 +11,17 @@ LLM-backed tools and linters are used to review comments and enforce adherence t
11
11
  Table of Contents
12
12
 
13
13
  - Code Comments Orientation
14
- - Kinds of Comments
15
- - Flavors of Code
16
- - General Style Rules
14
+ - Kinds of Comments
15
+ - Flavors of Code
16
+ - General Style Rules
17
17
  - Expository Comments: Use and Abuse
18
- - Principles
19
- - General Examples
20
- - Style
21
- - Examples
18
+ - Principles
19
+ - General Examples
20
+ - Style
21
+ - Examples
22
22
  - Comment Protocols by Language
23
- - Ruby Commenting Protocols
24
- - YAML Commenting Protocols
23
+ - Ruby Commenting Protocols
24
+ - YAML Commenting Protocols
25
25
 
26
26
  ## Code Comments Orientation
27
27
 
@@ -31,81 +31,101 @@ To begin, we will standardize our understanding of what types of comments are ap
31
31
 
32
32
  Code comments come in several distinct types.
33
33
 
34
- **documentation** :
35
- Code comments used to build downstream-facing reference docs for methods, classes, functions, data objects, and so forth.
36
-
37
- _Docstrings_ are specifically comments used in the generation of rich-text reference docs. That they also happen to “document” the code to which they are adjacent is secondary.
38
-
39
- **expository** :
40
- Code comments that explain the purpose or function of code blocks, algorithms, or complex logic, strictly in natural language. Also called “inline comments”, these arbitrary remarks are mainly what is governed by this protocol guide.
41
-
42
- **rationale** :
43
- Comments that explain the reasoning behind a particular implementation choice, design pattern, or data structure.
44
-
45
- **status** :
46
- Stability and lifecycle markers: `DEPRECATED:`, `EXPERIMENTAL:`, `INTERNAL:`, `UNSTABLE:`. May also include planned removal dates, version gates, feature flags.
47
-
48
- **admonition** :
49
- Developer-facing warnings, notes, or tips embedded in code. Use `WARNING:`, `NOTE:`, and `TIP:` prefixes to mark these comments distinctly.
50
-
51
- **task** :
52
- Comments like `TODO:` and `FIXME:` are used to mark code that needs further work.
53
-
54
- **instructional** :
55
- Code comments left in template, stub, or sample files for interactive use. These comments tend to be intended for a downstream user who will interact directly with the file or one based on it.
56
-
57
- **label** :
58
- Comments that simply annotate sections of code by category or general purpose, to help with demarcation and navigation. These comments are usually brief and may use special formatting to stand out.
59
-
60
- **directive** :
61
- In some languages, we use special character patterns to signify that a comment has a special purpose, other than for generating reference docs. These comments may mark code for special parsing, content transclusion, or other operations.
62
-
63
- In AsciiDoc, comments like `// tag::example[]` and `// end::example[]` are used to mark content for inclusion elsewhere.
64
-
65
- The popular linter Vale recognizes HTML comments like `<!-- vale off -→` and `<!-- vale on -→` to disable and re-enable content linting.
66
-
67
- **sequential/collection** :
68
- Comments that number or order logical stages in a complex or lengthy process or members of a set. Usually something like `# STEP 1:`, `# PHASE 1:`, and so forth, or else `# GROUP A:`, `# SECTION 1:`, etc. Always use uppercase for these markers (ex: `# STEP:` not `# Step:`).
34
+ <dl>
35
+ <dt class="hdlist1">documentation</dt>
36
+ <dd>
37
+ Code comments used to build downstream-facing reference docs for methods, classes, functions, data objects, and so forth.
38
+
39
+ _Docstrings_ are specifically comments used in the generation of rich-text reference docs. That they also happen to “document” the code to which they are adjacent is secondary.
40
+ </dd>
41
+ <dt class="hdlist1">expository</dt>
42
+ <dd>
43
+ Code comments that explain the purpose or function of code blocks, algorithms, or complex logic, strictly in natural language. Also called “inline comments”, these arbitrary remarks are mainly what is governed by this protocol guide.
44
+ </dd>
45
+ <dt class="hdlist1">rationale</dt>
46
+ <dd>
47
+ Comments that explain the reasoning behind a particular implementation choice, design pattern, or data structure.
48
+ </dd>
49
+ <dt class="hdlist1">status</dt>
50
+ <dd>
51
+ Stability and lifecycle markers: `DEPRECATED:`, `EXPERIMENTAL:`, `INTERNAL:`, `UNSTABLE:`. May also include planned removal dates, version gates, feature flags.
52
+ </dd>
53
+ <dt class="hdlist1">admonition</dt>
54
+ <dd>
55
+ Developer-facing warnings, notes, or tips embedded in code. Use `WARNING:`, `NOTE:`, and `TIP:` prefixes to mark these comments distinctly.
56
+ </dd>
57
+ <dt class="hdlist1">task</dt>
58
+ <dd>
59
+ Comments like `TODO:` and `FIXME:` are used to mark code that needs further work.
60
+ </dd>
61
+ <dt class="hdlist1">instructional</dt>
62
+ <dd>
63
+ Code comments left in template, stub, or sample files for interactive use. These comments tend to be intended for a downstream user who will interact directly with the file or one based on it.
64
+ </dd>
65
+ <dt class="hdlist1">label</dt>
66
+ <dd>
67
+ Comments that simply annotate sections of code by category or general purpose, to help with demarcation and navigation. These comments are usually brief and may use special formatting to stand out.
68
+ </dd>
69
+ <dt class="hdlist1">directive</dt>
70
+ <dd>
71
+ In some languages, we use special character patterns to signify that a comment has a special purpose, other than for generating reference docs. These comments may mark code for special parsing, content transclusion, or other operations.
72
+
73
+ In AsciiDoc, comments like `// tag::example[]` and `// end::example[]` are used to mark content for inclusion elsewhere.
74
+
75
+ The popular linter Vale recognizes HTML comments like `<!-- vale off -→` and `<!-- vale on -→` to disable and re-enable content linting.
76
+ </dd>
77
+ <dt class="hdlist1">sequential/collection</dt>
78
+ <dd>
79
+ Comments that number or order logical stages in a complex or lengthy process or members of a set. Usually something like `# STEP 1:`, `# PHASE 1:`, and so forth, or else `# GROUP A:`, `# SECTION 1:`, etc. Always use uppercase for these markers (ex: `# STEP:` not `# Step:`).
80
+ </dd>
81
+ </dl>
69
82
 
70
83
  ### Flavors of Code
71
84
 
72
- **Ruby** :
73
- The most robust environment for code comments, Ruby supports RDoc/YARD-style documentation comments that can be used to generate reference documentation. See Ruby Commenting Protocols for more.
74
-
75
- **Bash** :
76
- We make extensive use of comments in Bash scripts, but Bash has no standard for documentation comments or structured comments.
77
-
78
- **AsciiDoc** :
79
- Comments in `.adoc` files tend to be labels, tasks, and directives (AsciiDoc tags). AsciiDoc files tend not to have expository comments, since the content is already documentation.
80
-
81
- **YAML/SGYML** :
82
- YAML files use copious label and instructional comments to help downstream users navigate and understand large or complex data structures. Comments can also be used to annotate nesting depth. See YAML Commenting Protocols for more.
83
-
84
- **Liquid** :
85
- Our use of Liquid comments is inconsistent at best. Part of the problem is their terrible format with explicit `{% comment %}` and `{% endcomment %}` tags. While Liquid 5 has greatly improved that, DocOps Lab tooling is standardized on Liquid 4 at this time.
86
-
87
- **HTML** :
88
- We don’t code much HTML directly. It is mostly either converted from lightweight markup or rendered by Liquid templates (or JavaScript). Comments are usually to mark nested objects for convenience, to label major structures or to highlight/clarify obscure asset references, or as directives such as `<!-- vale off -→`, which disables content linting.
89
-
90
- **JavaScript** :
91
- We are not a JavaScript shop, but we do write a good bit of vanilla JavaScript. Comments are used mainly to establish our bearings in the code and therefor are sometimes heavier than with other languages.
92
-
93
- **CSS/SCSS** :
94
- We mainly write CSS as SCSS, and commenting is mainly to express the intent upon compiling.
85
+ <dl>
86
+ <dt class="hdlist1">Ruby</dt>
87
+ <dd>
88
+ The most robust environment for code comments, Ruby supports RDoc/YARD-style documentation comments that can be used to generate reference documentation. See Ruby Commenting Protocols for more.
89
+ </dd>
90
+ <dt class="hdlist1">Bash</dt>
91
+ <dd>
92
+ We make extensive use of comments in Bash scripts, but Bash has no standard for documentation comments or structured comments.
93
+ </dd>
94
+ <dt class="hdlist1">AsciiDoc</dt>
95
+ <dd>
96
+ Comments in `.adoc` files tend to be labels, tasks, and directives (AsciiDoc tags). AsciiDoc files tend not to have expository comments, since the content is already documentation.
97
+ </dd>
98
+ <dt class="hdlist1">YAML/SGYML</dt>
99
+ <dd>
100
+ YAML files use copious label and instructional comments to help downstream users navigate and understand large or complex data structures. Comments can also be used to annotate nesting depth. See YAML Commenting Protocols for more.
101
+ </dd>
102
+ <dt class="hdlist1">Liquid</dt>
103
+ <dd>
104
+ Our use of Liquid comments is inconsistent at best. Part of the problem is their terrible format with explicit `{% comment %}` and `{% endcomment %}` tags. While Liquid 5 has greatly improved that, DocOps Lab tooling is standardized on Liquid 4 at this time.
105
+ </dd>
106
+ <dt class="hdlist1">HTML</dt>
107
+ <dd>
108
+ We don’t code much HTML directly. It is mostly either converted from lightweight markup or rendered by Liquid templates (or JavaScript). Comments are usually to mark nested objects for convenience, to label major structures or to highlight/clarify obscure asset references, or as directives such as `<!-- vale off -→`, which disables content linting.
109
+ </dd>
110
+ <dt class="hdlist1">JavaScript</dt>
111
+ <dd>
112
+ We are not a JavaScript shop, but we do write a good bit of vanilla JavaScript. Comments are used mainly to establish our bearings in the code and therefor are sometimes heavier than with other languages.
113
+ </dd>
114
+ <dt class="hdlist1">CSS/SCSS</dt>
115
+ <dd>
116
+ We mainly write CSS as SCSS, and commenting is mainly to express the intent upon compiling.
117
+ </dd>
118
+ </dl>
95
119
 
96
120
  ### General Style Rules
97
121
 
98
122
  - Do not use em dashes or en dashes or (` - `).
99
123
 
100
- - Use colons (`: `) to prefix a comment with a classification.
101
- - Use semicolons (`; `) to break up clauses.
102
124
  - Use sentence-style capitalization.
125
+
103
126
  - Do not use terminal punctuation (periods, exclamation points, question marks) unless the comment is multiple sentences.
104
- - Hard wrap comments around 110-120 characters.
105
127
 
106
- - Use one-sentence per line.
107
- - Try not to wrap anything _except_ full sentences.
108
- - When wrapping multi-line sentences, indent subsequent lines by an additional space.
128
+ - Hard wrap comments around 110-120 characters.
109
129
 
110
130
  ## Expository Comments: Use and Abuse
111
131
 
@@ -119,28 +139,38 @@ This guide exists to help with comment evaluation.
119
139
 
120
140
  Expository comments (and their authors) should adhere to these principles:
121
141
 
122
- **1) Express purpose, not implementation.**:
123
- Comments should explain why code exists or what it is intended to do, rather than how it does it. (Rationale comments are available for explaining design/engineering choices, if necessary.)
124
-
125
- **2) Summarize peculiar or complex implementation (without violating #1).**:
126
- Expository comments may _include_ a _brief_ reference to an explicit design choice. Still not a _rationale comment_ (too brief, in passing) nor a _task comment_ (no further action prescribed), just a nod to an unusual or non-obvious implementation detail.
127
-
128
- **3) Use natural, imperative language.**:
129
- Comments should not contain code, and they should be formatted as English clauses or sentences. Comments should be phrased as commands or instructions, focusing on the action being performed, from the perspective of what the code is to do.
130
-
131
- **4) Be concise.**:
132
- Comments should be as brief as possible. Multi-sentence comments should be the exception. In fact, comments should not typically be complete sentences.
133
-
134
- **5) Maintain relevance and accuracy.**:
135
- Comments should be reviewed and updated as code changes to ensure they remain accurate and relevant.
136
-
137
- **6) Never cover straightforward code (except…​).**:
138
- Not all blocks need comments at all. The main criterion is whether the code’s purpose or function would not be _immediately_ clear from the code itself to a newcomer with beginner or intermediate knowledge of the language and little familiarity with the application architecture.
139
-
140
- Exception: Sometimes an oddity or pivotal point needs to be highlighted even in otherwise straightforward code.
141
-
142
- **7} Do not use comments as notes to reviewers.** :
143
- Temporary comments intended to guide code reviewers should be avoided. Code used to help with flag logical points or communicate during pair programming or pre-commit review should be denoted as admonitions (such as `# LOGIC: ` or `# REVIEW: `) or `# TEMP: ` and removed before merging.
142
+ <dl>
143
+ <dt class="hdlist1">1) Express purpose, not implementation.</dt>
144
+ <dd>
145
+ Comments should explain why code exists or what it is intended to do, rather than how it does it. (Rationale comments are available for explaining design/engineering choices, if necessary.)
146
+ </dd>
147
+ <dt class="hdlist1">2) Summarize peculiar or complex implementation (without violating #1).</dt>
148
+ <dd>
149
+ Expository comments may _include_ a _brief_ reference to an explicit design choice. Still not a _rationale comment_ (too brief, in passing) nor a _task comment_ (no further action prescribed), just a nod to an unusual or non-obvious implementation detail.
150
+ </dd>
151
+ <dt class="hdlist1">3) Use natural, imperative language.</dt>
152
+ <dd>
153
+ Comments should not contain code, and they should be formatted as English clauses or sentences. Comments should be phrased as commands or instructions, focusing on the action being performed, from the perspective of what the code is to do.
154
+ </dd>
155
+ <dt class="hdlist1">4) Be concise.</dt>
156
+ <dd>
157
+ Comments should be as brief as possible. Multi-sentence comments should be the exception. In fact, comments should not typically be complete sentences.
158
+ </dd>
159
+ <dt class="hdlist1">5) Maintain relevance and accuracy.</dt>
160
+ <dd>
161
+ Comments should be reviewed and updated as code changes to ensure they remain accurate and relevant.
162
+ </dd>
163
+ <dt class="hdlist1">6) Never cover straightforward code (except…​).</dt>
164
+ <dd>
165
+ Not all blocks need comments at all. The main criterion is whether the code’s purpose or function would not be _immediately_ clear from the code itself to a newcomer with beginner or intermediate knowledge of the language and little familiarity with the application architecture.
166
+
167
+ Exception: Sometimes an oddity or pivotal point needs to be highlighted even in otherwise straightforward code.
168
+ </dd>
169
+ <dt class="hdlist1">7} Do not use comments as notes to reviewers.</dt>
170
+ <dd>
171
+ Temporary comments intended to guide code reviewers should be avoided. Code used to help with flag logical points or communicate during pair programming or pre-commit review should be denoted as admonitions (such as `# LOGIC: ` or `# REVIEW: `) or `# TEMP: ` and removed before merging.
172
+ </dd>
173
+ </dl>
144
174
 
145
175
  ### General Examples
146
176
 
@@ -272,17 +302,24 @@ Never describe a method just by what it returns or what parameters it takes. Des
272
302
 
273
303
  When documenting Ruby classes and methods with YARD, follow these patterns:
274
304
 
275
- **class descriptions** :
276
- Keep class descriptions focused on the class’s primary responsibility and role within the system. Avoid overselling capabilities or implementation details.
277
-
278
- **method descriptions** :
279
- Lead with what the method accomplishes, not just its signature. Example: "Processes the provided attributes to populate Change properties" rather than "Initializes a new Change object."
280
-
281
- **capitalization consistency** :
282
- When referring to class objects conceptually or as an instance (not variable names), use CamelCase names. Use lowercase for most instances where the term refers to a real-world object or concept.
283
-
284
- **voice consistency** :
285
- Use descriptive, present-tense “voice” for API documentation and YARD comments.
305
+ <dl>
306
+ <dt class="hdlist1">class descriptions</dt>
307
+ <dd>
308
+ Keep class descriptions focused on the class’s primary responsibility and role within the system. Avoid overselling capabilities or implementation details.
309
+ </dd>
310
+ <dt class="hdlist1">method descriptions</dt>
311
+ <dd>
312
+ Lead with what the method accomplishes, not just its signature. Example: "Processes the provided attributes to populate Change properties" rather than "Initializes a new Change object."
313
+ </dd>
314
+ <dt class="hdlist1">capitalization consistency</dt>
315
+ <dd>
316
+ When referring to class objects conceptually or as an instance (not variable names), use CamelCase names. Use lowercase for most instances where the term refers to a real-world object or concept.
317
+ </dd>
318
+ <dt class="hdlist1">voice consistency</dt>
319
+ <dd>
320
+ Use descriptive, present-tense “voice” for API documentation and YARD comments.
321
+ </dd>
322
+ </dl>
286
323
 
287
324
  #### Exceptions
288
325
 
@@ -16,54 +16,68 @@ This guide focuses on the methodologies for tracing link sources rather than spe
16
16
  Table of Contents
17
17
 
18
18
  - Common Link Failure Patterns
19
- - External Link Failures
20
- - Internal Link Failures
19
+ - External Link Failures
20
+ - Internal Link Failures
21
21
  - Debugging Methodology
22
- - Step 1: Run HTMLProofer and Categorize Failures
23
- - Step 2: Identify High-Impact Patterns
24
- - Step 3: Trace Link Sources
25
- - Step 4: Apply Appropriate Fix Strategy
22
+ - Step 1: Run HTMLProofer and Categorize Failures
23
+ - Step 2: Identify High-Impact Patterns
24
+ - Step 3: Trace Link Sources
25
+ - Step 4: Apply Appropriate Fix Strategy
26
26
  - Data-Driven Link Debugging
27
- - YAML Data Sources
28
- - Dependency Tracing Process
29
- - Example Trace: AsciiDocsy Links
27
+ - YAML Data Sources
28
+ - Dependency Tracing Process
29
+ - Example Trace: AsciiDocsy Links
30
30
  - Pre-Publication Link Strategy
31
31
  - Validation and Testing
32
- - Rebuild and Verify
33
- - Test Cycle
32
+ - Rebuild and Verify
33
+ - Test Cycle
34
34
  - Prevention Strategies
35
- - Development Practices
36
- - Configuration Management
35
+ - Development Practices
36
+ - Configuration Management
37
37
 
38
38
  ## Common Link Failure Patterns
39
39
 
40
40
  ### External Link Failures
41
41
 
42
- **Network timeouts** :
43
- Temporary connectivity issues that resolve after rebuild
44
-
45
- **404 errors** :
46
- Missing pages or incorrect URLs
47
-
48
- **Pre-publication links** :
49
- Links to repositories or resources not yet available
50
-
51
- **Malformed URLs** :
52
- Missing repository names or incorrect paths
42
+ <dl>
43
+ <dt class="hdlist1">Network timeouts</dt>
44
+ <dd>
45
+ Temporary connectivity issues that resolve after rebuild
46
+ </dd>
47
+ <dt class="hdlist1">404 errors</dt>
48
+ <dd>
49
+ Missing pages or incorrect URLs
50
+ </dd>
51
+ <dt class="hdlist1">Pre-publication links</dt>
52
+ <dd>
53
+ Links to repositories or resources not yet available
54
+ </dd>
55
+ <dt class="hdlist1">Malformed URLs</dt>
56
+ <dd>
57
+ Missing repository names or incorrect paths
58
+ </dd>
59
+ </dl>
53
60
 
54
61
  ### Internal Link Failures
55
62
 
56
- **Missing project anchors** :
57
- Data/template mismatches in generated content
58
-
59
- **Section anchor mismatches** :
60
- ID generation vs link target differences
61
-
62
- **Template variable errors** :
63
- Unprocessed variables in URLs
64
-
65
- **Missing pages** :
66
- Links to pages that don’t exist
63
+ <dl>
64
+ <dt class="hdlist1">Missing project anchors</dt>
65
+ <dd>
66
+ Data/template mismatches in generated content
67
+ </dd>
68
+ <dt class="hdlist1">Section anchor mismatches</dt>
69
+ <dd>
70
+ ID generation vs link target differences
71
+ </dd>
72
+ <dt class="hdlist1">Template variable errors</dt>
73
+ <dd>
74
+ Unprocessed variables in URLs
75
+ </dd>
76
+ <dt class="hdlist1">Missing pages</dt>
77
+ <dd>
78
+ Links to pages that don’t exist
79
+ </dd>
80
+ </dl>
67
81
 
68
82
  ## Debugging Methodology
69
83
 
@@ -92,7 +106,9 @@ grep "internally linking" .agent/scratch/link-failures.txt | wc -l
92
106
  Look for repeated failures across multiple pages:
93
107
 
94
108
  - Same broken link appearing on 3+ pages = template/data issue
109
+
95
110
  - Similar link patterns = systematic problem
111
+
96
112
  - Timeout clusters = network/rebuild issue
97
113
 
98
114
  ### Step 3: Trace Link Sources
@@ -101,59 +117,60 @@ Look for repeated failures across multiple pages:
101
117
 
102
118
  If the problem is an anchor that does not exist, either the pointer or the anchor must be wrong.
103
119
 
104
- ****Consider how the page was generated:**** :
105
- - Is it a standard `.adoc` file?
106
- - Is it a Liquid-rendered HTML page?
107
- - Is it a Liquid-rendered AsciiDoc file (usually `*.adoc.liquid` or `*.asciidoc`)
120
+ <dl>
121
+ <dt class="hdlist1"> **Consider how the page was generated:** </dt>
122
+ <dd>
123
+ - Is it a standard `.adoc` file?
108
124
 
109
- ****For standard AsciiDoc files…​**** :
110
- The offending link source will likely be:
125
+ - Is it a Liquid-rendered HTML page?
111
126
 
112
- 1. an AsciiDoc xref (`<<anchor-slug>>` or `xref:anchor-slug[]`)
113
- 2. a pre-generated xref in the form of an attribute placeholder (`{xref_scope_anchor-slug_link}`) that has resolved to a proper AsciiDoc xref
114
- 3. a hybrid reference (`link:{xref_scope_anchor-slug_url}[some text]`)
127
+ - Is it a Liquid-rendered AsciiDoc file (usually `*.adoc.liquid` or `*.asciidoc`)
128
+ </dd>
129
+ <dt class="hdlist1"> **For standard AsciiDoc files…​** </dt>
130
+ <dd>
131
+ The offending link source will likely be:
115
132
 
116
- In any case, the `anchor-slug` portion should correspond literally to the reported missing anchor. If these are rendering properly and do not contain obvious misspellings, consider how the intended target might be misspelled or missing and address the source of the anchor itself.
133
+ 1. an AsciiDoc xref (`<<anchor-slug>>` or `xref:anchor-slug[]`)
117
134
 
118
- ****For Liquid-rendered pages…​**** :
119
- The offending link source will likely be a misspelled or poorly constructed link.
135
+ 2. a pre-generated xref in the form of an attribute placeholder (`{xref_scope_anchor-slug_link}`) that has resolved to a proper AsciiDoc xref
120
136
 
121
- 1. a hard-coded link in Liquid/HTML (`"a href="#anchor-slug">`)
122
- 2. a data-driven link in Liquid/HTML (`"a href="#{{ variable | slugify }}">`)
123
- 3. a data-driven link in Liquid/AsciiDoc (`link:#{{ variable | slugify }}`)
124
- 4. a pre-generated xref in the form of an attribute placeholder (`{xref_some-scope_some-slug-string_link}`; generated from Liquid such as: `{xref_{{ scope }}_{{ variable }}_link}`)
137
+ 3. a hybrid reference (`link:{xref_scope_anchor-slug_url}[some text]`)
125
138
 
126
- Other than for hard-coded links, you will need to trace the source to one of the following:
139
+ In any case, the `anchor-slug` portion should correspond literally to the reported missing anchor. If these are rendering properly and do not contain obvious misspellings, consider how the intended target might be misspelled or missing and address the source of the anchor itself.
140
+ </dd>
141
+ <dt class="hdlist1"> **For Liquid-rendered pages…​** </dt>
142
+ <dd>
143
+ The offending link source will likely be a misspelled or poorly constructed link.
127
144
 
128
- - A YAML file, typically in a `_data/` or `data/` directory.
145
+ 1. a hard-coded link in Liquid/HTML (`"a href="#anchor-slug">`)
129
146
 
130
- Search for the offending anchor
147
+ 2. a data-driven link in Liquid/HTML (`"a href="#{{ variable | slugify }}">`)
131
148
 
132
- ```
133
- grep -rn "broken-anchor-slug" --include \*.yml --include \*.yaml
134
- ```
149
+ 3. a data-driven link in Liquid/AsciiDoc (`link:#{{ variable | slugify }}`)
135
150
 
136
- > **NOTE:** If there are numerous errors of this kind, the problem _could_ be in the code that generates the attributes from the YAML source.
137
- - Attributes derived from a file like `README.adoc`.
151
+ 4. a pre-generated xref in the form of an attribute placeholder (`{xref_some-scope_some-slug-string_link}`; generated from Liquid such as: `{xref_{{ scope }}_{{ variable }}_link}`)
138
152
 
139
- Search for the offending attribute
153
+ Other than for hard-coded links, you will need to trace the source to one of the following:
140
154
 
141
- ```
142
- grep -rn "^:.*broken-anchor.*:" --include \*.adoc
143
- ```
155
+ - A YAML file, typically in a `_data/` or `data/` directory.
144
156
 
145
- ****Other tips for investigating broken anchors:**** :
146
- Check what anchors actually exist
157
+ - Attributes derived from a file like `README.adoc`.
158
+ </dd>
159
+ <dt class="hdlist1"> **Other tips for investigating broken anchors:** </dt>
160
+ <dd>
161
+ Check what anchors actually exist
147
162
 
148
- ```
149
- grep -on 'id="[^"]*"' _site/page-slug/index.html
150
- ```
163
+ ```
164
+ grep -on 'id="[^"]*"' _site/page-slug/index.html
165
+ ```
151
166
 
152
- Find template generating the links
167
+ Find template generating the links
153
168
 
154
- ```
155
- grep -rn "distinct identifier string" _includes _pages _templates
156
- ```
169
+ ```
170
+ grep -rn "distinct identifier string" _includes _pages _templates
171
+ ```
172
+ </dd>
173
+ </dl>
157
174
 
158
175
  ### Step 4: Apply Appropriate Fix Strategy
159
176
 
@@ -202,21 +219,31 @@ Misspelled anchor ID
202
219
 
203
220
  Key files that commonly generate broken links:
204
221
 
205
- **`_data/docops-lab-projects.yml`** :
206
- Project dependencies and metadata
207
-
208
- **`_data/pages/*.yml`** :
209
- Navigation and cross-references
210
-
211
- **Individual frontmatter** :
212
- Local link definitions
222
+ <dl>
223
+ <dt class="hdlist1">`_data/docops-lab-projects.yml`</dt>
224
+ <dd>
225
+ Project dependencies and metadata
226
+ </dd>
227
+ <dt class="hdlist1">`_data/pages/*.yml`</dt>
228
+ <dd>
229
+ Navigation and cross-references
230
+ </dd>
231
+ <dt class="hdlist1">Individual frontmatter</dt>
232
+ <dd>
233
+ Local link definitions
234
+ </dd>
235
+ </dl>
213
236
 
214
237
  ### Dependency Tracing Process
215
238
 
216
239
  1. **Identify the broken link pattern** : `#missing-anchor`
240
+
217
241
  2. **Find the data source** : Search YAML files for dependency names
242
+
218
243
  3. **Trace template processing** : Follow Liquid template logic
244
+
219
245
  4. **Compare with reality** : Check actual generated IDs
246
+
220
247
  5. **Apply data fix** : Update dependency to match actual slug
221
248
 
222
249
  ### Example Trace: AsciiDocsy Links
@@ -248,12 +275,14 @@ grep 'id=".*asciidoc.*"' _site/projects/index.html
248
275
  For links to resources not yet available:
249
276
 
250
277
  1. **Tag with FIXME-PREPUB** : Add comments for easy identification
278
+
251
279
  2. **Document in notes** : Track what needs to be updated at publication
280
+
252
281
  3. **Use conditional logic** : Hide pre-pub links in production builds
253
282
 
254
283
  ```asciidoc
255
284
  // FIXME-PREPUB: Update when DocOps/box repository is published
256
- See the link:https://github.com/DocOps/box[DocOps Box repository] for details.
285
+ See the link:https://github.com/DocOps/docops-box[DocOps Box repository] for details.
257
286
  ```
258
287
 
259
288
  ## Validation and Testing
@@ -274,36 +303,52 @@ grep "#fixed-anchor" _site/target-page.html
274
303
  ### Test Cycle
275
304
 
276
305
  1. Fix high-impact patterns first (3+ occurrences)
306
+
277
307
  2. Rebuild and validate after each batch of fixes
308
+
278
309
  3. Document fixes for future reference
310
+
279
311
  4. Test both internal and external link resolution
280
312
 
281
313
  ## Prevention Strategies
282
314
 
283
315
  ### Development Practices
284
316
 
285
- **Consistent naming** :
286
- Align dependency names with actual project slugs
287
-
288
- **Template validation** :
289
- Test link generation logic with sample data
290
-
291
- **Documentation standards** :
292
- Document expected anchor patterns
293
-
294
- **Regular validation** :
295
- Include link checking in CI/CD pipelines
317
+ <dl>
318
+ <dt class="hdlist1">Consistent naming</dt>
319
+ <dd>
320
+ Align dependency names with actual project slugs
321
+ </dd>
322
+ <dt class="hdlist1">Template validation</dt>
323
+ <dd>
324
+ Test link generation logic with sample data
325
+ </dd>
326
+ <dt class="hdlist1">Documentation standards</dt>
327
+ <dd>
328
+ Document expected anchor patterns
329
+ </dd>
330
+ <dt class="hdlist1">Regular validation</dt>
331
+ <dd>
332
+ Include link checking in CI/CD pipelines
333
+ </dd>
334
+ </dl>
296
335
 
297
336
  ### Configuration Management
298
337
 
299
- **Default values** :
300
- Define link patterns in configuration rather than hardcoding
301
-
302
- **Validation rules** :
303
- Create checks for common link anti-patterns
304
-
305
- **Documentation** :
306
- Maintain mapping between logical names and actual slugs
338
+ <dl>
339
+ <dt class="hdlist1">Default values</dt>
340
+ <dd>
341
+ Define link patterns in configuration rather than hardcoding
342
+ </dd>
343
+ <dt class="hdlist1">Validation rules</dt>
344
+ <dd>
345
+ Create checks for common link anti-patterns
346
+ </dd>
347
+ <dt class="hdlist1">Documentation</dt>
348
+ <dd>
349
+ Maintain mapping between logical names and actual slugs
350
+ </dd>
351
+ </dl>
307
352
 
308
353
  This systematic approach transforms broken link debugging from a frustrating manual process into a predictable, methodical workflow that scales across projects and team members.
309
354