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,321 @@
1
+ # Defines the structure and semantics of the labdev: subtasks.
2
+ # Provides documentation for non-alias, non-inert subtasks and sub-subtasks
3
+ # Namespacing adheres to this model:
4
+ # labdev:<verb>:<scope|object|class>
5
+ # The 1st-tier subtask is always an action word.
6
+ # The 2nd-tier subtask is what is being acted upon:
7
+ # - a class such as 'styles' or 'script'
8
+ # - a tool such as 'vale' or 'htmlproofer'
9
+ # - a collection such as 'scripts' or
10
+ # - a format category such as 'html' or 'ruby' or 'docs'
11
+ # - a scope such as 'local'
12
+ # - 'all' to indicate running all subtasks
13
+ # If there is a 3rd-tier subtask, it is a scope (local, upstream)
14
+ # Scopes default to "all" or "both" when unlisted.
15
+ # Use _alias: <primary:task> to indicate when a subtask is an alias of a task.
16
+ labdev:
17
+ check:
18
+ _desc: Run assessments on the project environment and managed assets
19
+ env:
20
+ _desc: Assess the local environment and configuration
21
+ updates:
22
+ _desc: Check for updates to managed assets from upstream
23
+ all:
24
+ _alias: "labdev:check"
25
+ init:
26
+ all:
27
+ _desc: Bootstrap the development environment for this project
28
+ docs:
29
+ _desc: Sync agent documentation files to project
30
+ run:
31
+ # there is no labdev:run:all
32
+ script:
33
+ _desc: Run a script with automatic discovery (local first, then vendor)
34
+ _args:
35
+ script:
36
+ summ: The script to be executed.
37
+ docs: |
38
+ The script to be executed in the environment.
39
+ Use `labdev:show:scripts` to see the available scripts.
40
+ required: true
41
+ opts:
42
+ summ: Additional arguments to pass to the script.
43
+ docs: |
44
+ Use like:
45
+ bundle exec rake 'labdev:run:script["script","--option1 --option2"]'
46
+ required: false
47
+ _test:
48
+ - bundle exec rake 'labdev:run:script[build]'
49
+ - bundle exec rake 'labdev:run:script[build,--no-color]'
50
+ rubocop:
51
+ _desc: Run the base rubocop command and options.
52
+ _args:
53
+ opts:
54
+ summ: Additional arguments to pass to the rubocop command.
55
+ docs: |
56
+ Use like:
57
+ bundle exec rake 'labdev:run:rubocop["--auto-correct --only Layout/LineLength"]
58
+ required: false
59
+ _test:
60
+ - bundle exec rake 'labdev:run:rubocop'
61
+ - bundle exec rake 'labdev:run:rubocop["--only Style/StringLiterals"]'
62
+ vale:
63
+ _desc: Run the base vale command and options.
64
+ _args:
65
+ opts:
66
+ summ: Additional arguments to pass to the vale command.
67
+ docs: |
68
+ Use like:
69
+ bundle exec rake 'labdev:run:vale["--minAlertLevel=warning"]'
70
+ required: false
71
+ _test:
72
+ - bundle exec rake 'labdev:run:vale'
73
+ - bundle exec rake 'labdev:run:vale["--no-wrap --minAlertLevel=error"]'
74
+ # Removed from 0.1.0 for incongruent options between CLI and API
75
+ # htmlproofer:
76
+ # _desc: Run the base htmlproofer command and options.
77
+ # _args:
78
+ # opts:
79
+ # summ: Additional arguments to pass to the htmlproofer command.
80
+ # docs: |
81
+ # Use like:
82
+ # bundle exec rake 'labdev:run:htmlproofer["--check-html --disable-external"]'
83
+ # required: false
84
+ # _test:
85
+ # - bundle exec rake 'labdev:run:htmlproofer'
86
+ # - bundle exec rake 'labdev:run:htmlproofer["--disable-external --check-favicon"]'
87
+ shellcheck:
88
+ _desc: Run the base shellcheck command and options.
89
+ _args:
90
+ opts:
91
+ summ: Additional arguments to pass to the shellcheck command.
92
+ docs: |
93
+ Use like:
94
+ bundle exec rake 'labdev:run:shellcheck["--enable=all --format=gcc"]'
95
+ required: false
96
+ _test:
97
+ - bundle exec rake 'labdev:run:shellcheck'
98
+ - bundle exec rake 'labdev:run:shellcheck["--enable=all --format=gcc"]'
99
+ actionlint:
100
+ _desc: Run the base actionlint command and options.
101
+ _args:
102
+ opts:
103
+ summ: Additional arguments to pass to the actionlint command.
104
+ docs: |
105
+ Use like:
106
+ bundle exec rake 'labdev:run:actionlint["-oneline -verbose"]'
107
+ required: false
108
+ _test:
109
+ - bundle exec rake 'labdev:run:actionlint'
110
+ - bundle exec rake 'labdev:run:actionlint["-oneline -verbose"]'
111
+ sync:
112
+ _desc: Sync all managed files (configs, scripts, docs, styles, etc)
113
+ all:
114
+ _alias: "labdev:sync"
115
+ configs:
116
+ _desc: Sync configuration files from config pack
117
+ scripts:
118
+ _desc: Update non-local (`.vendor/`) scripts from upstream
119
+ docs:
120
+ _desc: Sync files to untracked local paths
121
+ # _args:
122
+ # force:
123
+ # GET RID OF docs[force], this makes no sense, we always overwrite
124
+ styles:
125
+ _desc: Sync Vale styles from gem source to project
126
+ local:
127
+ _desc: Sync only custom Vale styles from gem (no remote packages)
128
+ all:
129
+ _desc: Sync custom styles from gem and download remote packages
130
+ hooks:
131
+ _desc: Update git hooks from templates (interactive)
132
+ vale:
133
+ _desc: Sync Vale config and all styles (custom + remote packages)
134
+ local:
135
+ _desc: Sync Vale config and custom styles only (no remote packages)
136
+ all:
137
+ _desc: Sync Vale config, custom styles, and remote packages
138
+ lint:
139
+ all:
140
+ _desc: Run all enabled linters
141
+ ruby:
142
+ _desc: Run RuboCop on Ruby files
143
+ _args:
144
+ path:
145
+ summ: Optional path to specific file(s) to lint
146
+ required: false
147
+ rule:
148
+ summ: Optional specific rule to check
149
+ required: false
150
+ opts:
151
+ summ: Additional options to pass to RuboCop
152
+ required: false
153
+ _test:
154
+ - bundle exec rake labdev:lint:ruby
155
+ - bundle exec rake 'labdev:lint:ruby[lib/file.rb]'
156
+ - bundle exec rake 'labdev:lint:ruby[,Style/StringLiterals]'
157
+ - bundle exec rake 'labdev:lint:ruby[lib/file.rb,Style/StringLiterals,--autocorrect]'
158
+ bash:
159
+ _desc: Run ShellCheck on Bash files
160
+ _args:
161
+ path:
162
+ summ: Optional path to specific file(s) to lint
163
+ required: false
164
+ rule:
165
+ summ: Optional specific rule to check
166
+ required: false
167
+ opts:
168
+ summ: Additional options to pass to ShellCheck
169
+ required: false
170
+ _test:
171
+ - bundle exec rake labdev:lint:bash
172
+ - bundle exec rake 'labdev:lint:bash[scripts/build.sh]'
173
+ - bundle exec rake 'labdev:lint:bash[,SC2086]'
174
+ - bundle exec rake 'labdev:lint:bash[scripts/build.sh,SC2086,--enable=all]'
175
+ html:
176
+ _desc: Run HTMLProofer on generated HTML
177
+ _docs: |
178
+ HTML linting does not accept additional arguments at this time.
179
+ Invoke htmlproofer directly to enable CLI options.
180
+ adoc:
181
+ _desc: Run Vale on raw AsciiDoc syntax
182
+ _args:
183
+ path:
184
+ summ: Optional path to specific file(s) to lint
185
+ required: false
186
+ rule:
187
+ summ: Optional specific Vale rule name to check
188
+ required: false
189
+ opts:
190
+ summ: Additional options to pass to Vale
191
+ required: false
192
+ _test:
193
+ - bundle exec rake labdev:lint:adoc
194
+ - bundle exec rake 'labdev:lint:adoc[README.adoc]'
195
+ - bundle exec rake 'labdev:lint:adoc[,DocOpsLab-AsciiDoc.ExplicitSectionIDs]'
196
+ - bundle exec rake 'labdev:lint:adoc[README.adoc,DocOpsLab-AsciiDoc.ExplicitSectionIDs,--minAlertLevel=warning]'
197
+ - bundle exec rake 'labdev:lint:adoc[README.adoc,,--minAlertLevel=suggestion]'
198
+ asciidoc:
199
+ _alias: "labdev:lint:adoc"
200
+ text:
201
+ _desc: Run Vale on rendered prose (grammar/style)
202
+ _args:
203
+ path:
204
+ summ: Optional path to specific file(s) to lint
205
+ required: false
206
+ rule:
207
+ summ: Optional specific Vale rule to check
208
+ required: false
209
+ opts:
210
+ summ: Additional options to pass to Vale
211
+ required: false
212
+ _test:
213
+ - bundle exec rake labdev:lint:text
214
+ - bundle exec rake 'labdev:lint:text[_docs/task/development.adoc]'
215
+ - bundle exec rake 'labdev:lint:text[,DocOpsLab-Authoring.ExNotEg]'
216
+ - bundle exec rake 'labdev:lint:text[_docs/task/development.adoc,DocOpsLab-Authoring.ExNotEg,--minAlertLevel=warning]'
217
+ - bundle exec rake 'labdev:lint:text[_docs/task/development.adoc,,--minAlertLevel=suggestion]'
218
+ docs:
219
+ _desc: Run Vale on documentation (markup & prose)
220
+ _args:
221
+ path:
222
+ summ: Optional path to specific file(s) to lint
223
+ required: false
224
+ rule:
225
+ summ: Optional specific Vale rule to check
226
+ required: false
227
+ opts:
228
+ summ: Additional options to pass to Vale
229
+ required: false
230
+ _test:
231
+ - bundle exec rake labdev:lint:docs
232
+ - bundle exec rake 'labdev:lint:docs[_docs/reference/testing.adoc]'
233
+ workflows:
234
+ _desc: Run actionlint on GitHub Actions workflows
235
+ _args:
236
+ path:
237
+ summ: Optional path to specific file(s) to check
238
+ required: false
239
+ opts:
240
+ summ: Additional options to pass to actionlint
241
+ required: false
242
+ spellcheck:
243
+ _desc: Generate spellcheck report on content files
244
+ _args:
245
+ path:
246
+ summ: Optional path to specific file to spellcheck
247
+ required: false
248
+ opts:
249
+ summ: Additional options (currently unused)
250
+ required: false
251
+ _test:
252
+ - bundle exec rake labdev:lint:spellcheck
253
+ - bundle exec rake 'labdev:lint:spellcheck[README.adoc]'
254
+ logs:
255
+ _desc: Parse build tool logs for issues and warnings
256
+ _args:
257
+ type:
258
+ summ: Type of log to parse (jekyll-asciidoc)
259
+ required: true
260
+ path:
261
+ summ: Path to the log file to analyze
262
+ required: true
263
+ outdir:
264
+ summ: Optional directory for generated reports
265
+ required: false
266
+ _test:
267
+ - bundle exec rake 'labdev:lint:logs[jekyll-asciidoc,.agent/build.log]'
268
+ heal:
269
+ all:
270
+ _desc: Perform all available auto-fixes on all applicable files
271
+ ruby:
272
+ _desc: Auto-fix Ruby issues
273
+ _args:
274
+ path:
275
+ summ: Optional path to specific file(s) to auto-fix
276
+ docs: |
277
+ If no path is provided, all Ruby files will be auto-fixed.
278
+ required: false
279
+ adoc:
280
+ _desc: Auto-fix AsciiDoc issues
281
+ _args:
282
+ path:
283
+ summ: Optional path to specific file(s) to auto-fix
284
+ docs: |
285
+ If no path is provided, all AsciiDoc files will be auto-fixed.
286
+ required: false
287
+ show:
288
+ scripts:
289
+ _desc: List available script templatest
290
+ hooks:
291
+ _desc: List available hook templates
292
+ rule:
293
+ _desc: Show details about a specific linting rule
294
+ _args:
295
+ tool:
296
+ summ: The linter tool for the rule.
297
+ required: true
298
+ rule:
299
+ summ: The specific rule to show details for.
300
+ required: true
301
+ _test:
302
+ - bundle exec rake 'labdev:show:rule[rubocop,Layout/LineLength]'
303
+ - bundle exec rake 'labdev:show:rule[vale,DocOpsLab-Authoring.ExNotEg]'
304
+ # ADDING:
305
+ help:
306
+ _desc: Show help information about labdev tasks
307
+ _docs: |
308
+ Default behavior is to show general help information.
309
+
310
+ Use like:
311
+ bundle exec rake 'labdev:help[lint:ruby]'
312
+ _args:
313
+ task_string:
314
+ summ: (Optional) The specific task to show help for.
315
+ docs: |
316
+ If no task is specified, shows general help information.
317
+
318
+ When a task_string is passed, shows all docstrings from this file for that task.
319
+ required: false
320
+ _test: []
321
+
@@ -0,0 +1,60 @@
1
+ - slug: rubocop
2
+ name: RuboCop
3
+ config:
4
+ inheritance: native # Uses inherit_from property
5
+ uses_vendor_base: true # Syncs base config to .vendor/
6
+ format: YAML
7
+
8
+ - slug: vale
9
+ name: Vale
10
+ config:
11
+ inheritance: vale_ini # Custom inheritance for Vale INI format
12
+ uses_vendor_base: true # Syncs base config with rule customizations
13
+ format: INI
14
+ package_based: true # Uses Vale package system
15
+ packaging:
16
+ artifact: DocOpsLabStyles.zip
17
+ packages:
18
+ - target: DocOpsLab-AsciiDoc
19
+ source: asciidoc
20
+ - target: DocOpsLab-Authoring
21
+ source: authoring
22
+ paths:
23
+ patterns:
24
+ - "**/*.adoc"
25
+ ignored_paths:
26
+ - ".bundle"
27
+ - ".git"
28
+ - ".github"
29
+ - ".jekyll-cache"
30
+ - ".vscode"
31
+ - "_site"
32
+ - "gems"
33
+ - "node_modules"
34
+ - "scripts"
35
+ - "tmp"
36
+ - "vendor"
37
+ - ".config/.vendor"
38
+ - "artifacts"
39
+ git_tracked_only: true
40
+
41
+ - slug: htmlproofer
42
+ name: HTMLProofer
43
+ config:
44
+ inheritance: yaml_merge # Uses docopslab-dev YAML merge
45
+ uses_vendor_base: true # Syncs base config to .vendor/
46
+ format: YAML
47
+
48
+ - slug: shellcheck
49
+ name: ShellCheck
50
+ config:
51
+ inheritance: none # No inheritance support
52
+ uses_vendor_base: true
53
+ format: Bash
54
+
55
+ - slug: actionlint
56
+ name: actionlint
57
+ config:
58
+ inheritance: native # Supports standard YAML patterns
59
+ uses_vendor_base: true # Syncs base config to .vendor/
60
+ format: YAML