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.
- checksums.yaml +7 -0
- data/LICENSE +21 -0
- data/README.adoc +904 -0
- data/assets/config-packs/actionlint/base.yml +13 -0
- data/assets/config-packs/actionlint/project.yml +13 -0
- data/assets/config-packs/htmlproofer/base.yml +27 -0
- data/assets/config-packs/htmlproofer/project.yml +25 -0
- data/assets/config-packs/rubocop/base.yml +130 -0
- data/assets/config-packs/rubocop/project.yml +8 -0
- data/assets/config-packs/shellcheck/base.shellcheckrc +14 -0
- data/assets/config-packs/subtxt/ai-asciidoc-antipatterns.sub.txt +11 -0
- data/assets/config-packs/vale/asciidoc/ExplicitSectionIDs.yml +8 -0
- data/assets/config-packs/vale/asciidoc/ExtraLineBeforeLevel1.yml +7 -0
- data/assets/config-packs/vale/asciidoc/OneSentencePerLine.yml +8 -0
- data/assets/config-packs/vale/asciidoc/PreferSourceBlocks.yml +8 -0
- data/assets/config-packs/vale/asciidoc/ProperAdmonitions.yml +8 -0
- data/assets/config-packs/vale/asciidoc/ProperDLs.yml +7 -0
- data/assets/config-packs/vale/asciidoc/UncleanListStart.yml +8 -0
- data/assets/config-packs/vale/authoring/ButParagraph.yml +8 -0
- data/assets/config-packs/vale/authoring/ExNotEg.yml +8 -0
- data/assets/config-packs/vale/authoring/LiteralTerms.yml +20 -0
- data/assets/config-packs/vale/authoring/Spelling.yml +679 -0
- data/assets/config-packs/vale/base.ini +38 -0
- data/assets/config-packs/vale/config/scripts/ExplicitSectionIDs.tengo +56 -0
- data/assets/config-packs/vale/config/scripts/ExtraLineBeforeLevel1.tengo +121 -0
- data/assets/config-packs/vale/config/scripts/OneSentencePerLine.tengo +53 -0
- data/assets/config-packs/vale/project.ini +5 -0
- data/assets/hooks/pre-commit +63 -0
- data/assets/hooks/pre-push +72 -0
- data/assets/scripts/adoc_section_ids.rb +50 -0
- data/assets/scripts/build-common.sh +193 -0
- data/assets/scripts/build-docker.sh +64 -0
- data/assets/scripts/build.sh +56 -0
- data/assets/scripts/parse_jekyll_asciidoc_logs.rb +467 -0
- data/assets/templates/Gemfile +7 -0
- data/assets/templates/Rakefile +3 -0
- data/assets/templates/gitignore +69 -0
- data/assets/templates/jekyll-asciidoc-fix.prompt.yml +17 -0
- data/assets/templates/spellcheck.prompt.yml +16 -0
- data/docopslab-dev.gemspec +56 -0
- data/docs/agent/AGENTS.md +229 -0
- data/docs/agent/index.md +80 -0
- data/docs/agent/missions/conduct-release.md +224 -0
- data/docs/agent/missions/setup-new-project.md +250 -0
- data/docs/agent/roles/devops-release-engineer.md +152 -0
- data/docs/agent/roles/docops-engineer.md +193 -0
- data/docs/agent/roles/planner-architect.md +74 -0
- data/docs/agent/roles/product-engineer.md +153 -0
- data/docs/agent/roles/product-manager.md +130 -0
- data/docs/agent/roles/project-manager.md +139 -0
- data/docs/agent/roles/qa-testing-engineer.md +115 -0
- data/docs/agent/roles/tech-docs-manager.md +143 -0
- data/docs/agent/roles/tech-writer.md +163 -0
- data/docs/agent/skills/asciidoc.md +609 -0
- data/docs/agent/skills/code-commenting.md +347 -0
- data/docs/agent/skills/fix-broken-links.md +309 -0
- data/docs/agent/skills/fix-jekyll-asciidoc-build-errors.md +23 -0
- data/docs/agent/skills/fix-spelling-issues.md +13 -0
- data/docs/agent/skills/git.md +170 -0
- data/docs/agent/skills/github-issues.md +135 -0
- data/docs/agent/skills/product-release-rollback-and-patching.md +71 -0
- data/docs/agent/skills/rake-cli-dev.md +57 -0
- data/docs/agent/skills/readme-driven-dev.md +13 -0
- data/docs/agent/skills/release-history.md +29 -0
- data/docs/agent/skills/ruby.md +192 -0
- data/docs/agent/skills/schemagraphy-sgyml.md +18 -0
- data/docs/agent/skills/tests-running.md +25 -0
- data/docs/agent/skills/tests-writing.md +45 -0
- data/docs/agent/skills/write-the-docs.md +54 -0
- data/docs/agent/topics/common-project-paths.md +117 -0
- data/docs/agent/topics/dev-tooling-usage.md +202 -0
- data/docs/agent/topics/devops-ci-cd.md +55 -0
- data/docs/agent/topics/product-docs-deployment.md +25 -0
- data/lib/docopslab/dev/auto_fix_asciidoc.rb +46 -0
- data/lib/docopslab/dev/checkers.rb +108 -0
- data/lib/docopslab/dev/config_manager.rb +241 -0
- data/lib/docopslab/dev/file_utils.rb +140 -0
- data/lib/docopslab/dev/git_hooks.rb +140 -0
- data/lib/docopslab/dev/help.rb +121 -0
- data/lib/docopslab/dev/initializer.rb +95 -0
- data/lib/docopslab/dev/linters.rb +451 -0
- data/lib/docopslab/dev/log_parser.rb +31 -0
- data/lib/docopslab/dev/paths.rb +46 -0
- data/lib/docopslab/dev/script_manager.rb +136 -0
- data/lib/docopslab/dev/spell_check.rb +194 -0
- data/lib/docopslab/dev/sync_ops.rb +468 -0
- data/lib/docopslab/dev/tasks.rb +440 -0
- data/lib/docopslab/dev/tool_execution.rb +68 -0
- data/lib/docopslab/dev/version.rb +8 -0
- data/lib/docopslab/dev.rb +392 -0
- data/specs/data/default-manifest.yml +64 -0
- data/specs/data/manifest-schema.yaml +63 -0
- data/specs/data/tasks-def.yml +321 -0
- data/specs/data/tools.yml +60 -0
- metadata +362 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# actionlint configuration for DocOps Lab projects
|
|
2
|
+
# This file is synced from docopslab-dev gem
|
|
3
|
+
|
|
4
|
+
# Disable overly strict rules for common patterns
|
|
5
|
+
ignore:
|
|
6
|
+
# Allow commonly used but deprecated actions (we'll upgrade gradually)
|
|
7
|
+
- 'SC2086:' # shellcheck rule about double quotes
|
|
8
|
+
- 'the runner of "ubuntu-latest" is deprecated'
|
|
9
|
+
|
|
10
|
+
# Custom shell for shellcheck integration
|
|
11
|
+
shellcheck:
|
|
12
|
+
enable: true
|
|
13
|
+
shell-options: "-e SC2086" # Allow some globbing patterns
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# actionlint configuration for this project
|
|
2
|
+
# References DocOps Lab base configuration
|
|
3
|
+
|
|
4
|
+
# Project-specific ignores (add as needed):
|
|
5
|
+
ignore:
|
|
6
|
+
# Example: Ignore specific workflow patterns
|
|
7
|
+
# - 'workflow "deploy.yml"'
|
|
8
|
+
# - '"ubuntu-20.04" is deprecated'
|
|
9
|
+
|
|
10
|
+
# Project-specific overrides:
|
|
11
|
+
shellcheck:
|
|
12
|
+
enable: true
|
|
13
|
+
# shell-options: "-e SC2016" # Add project-specific ShellCheck exclusions
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
# DocOps Lab HTML-Proofer Base Configuration
|
|
3
|
+
# This provides sensible defaults for DocOps Lab projects
|
|
4
|
+
|
|
5
|
+
# URL checking options
|
|
6
|
+
check_external_hash: false # Skip checking external URL fragments (can be slow)
|
|
7
|
+
check_img_http: false # Allow HTTP images for now
|
|
8
|
+
enforce_https: false # Don't enforce HTTPS for all links
|
|
9
|
+
|
|
10
|
+
# URLs to ignore (patterns and strings)
|
|
11
|
+
ignore_urls:
|
|
12
|
+
- /localhost/ # Skip local development URLs
|
|
13
|
+
- /127\.0\.0\.1/ # Skip local IPs
|
|
14
|
+
- /example\.com/ # Skip example URLs
|
|
15
|
+
- /foo\.bar/ # Skip placeholder URLs
|
|
16
|
+
- /fonts.googleapis.com/ # Skip Google Fonts
|
|
17
|
+
- /fonts.gstatic.com/ # Skip Google Fonts static
|
|
18
|
+
|
|
19
|
+
# Files to ignore (patterns)
|
|
20
|
+
ignore_files:
|
|
21
|
+
- slides/ # Skip slides directories
|
|
22
|
+
|
|
23
|
+
# Other options
|
|
24
|
+
check_favicon: false # Don't require favicon
|
|
25
|
+
check_html: true # Check HTML structure
|
|
26
|
+
check_opengraph: false # Skip OpenGraph validation
|
|
27
|
+
disable_external: false # Check external links (can be disabled for speed)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# DocOps Lab HTML-Proofer Configuration
|
|
2
|
+
# Combined base and project configuration for consistent HTML validation
|
|
3
|
+
# URL checking options
|
|
4
|
+
check_external_hash: false # Skip checking external URL fragments (can be slow)
|
|
5
|
+
check_img_http: false # Allow HTTP images for now
|
|
6
|
+
enforce_https: false # Don't enforce HTTPS for all links
|
|
7
|
+
check_favicon: false # Don't require favicon
|
|
8
|
+
check_html: true # Check HTML structure
|
|
9
|
+
check_opengraph: false # Skip OpenGraph validation
|
|
10
|
+
disable_external: false # Check external links (can be disabled for speed)
|
|
11
|
+
|
|
12
|
+
# URLs to ignore (patterns and strings)
|
|
13
|
+
ignore_urls:
|
|
14
|
+
- /localhost/ # Skip local development URLs
|
|
15
|
+
- /127\.0\.0\.1/ # Skip local IPs
|
|
16
|
+
- /example\.com/ # Skip example URLs
|
|
17
|
+
- /foo\.bar/ # Skip placeholder URLs
|
|
18
|
+
- /fonts\.googleapis\.com/ # Skip Google Fonts
|
|
19
|
+
- /fonts\.gstatic\.com/ # Skip Google Fonts static
|
|
20
|
+
# Add project-specific URL ignores below:
|
|
21
|
+
|
|
22
|
+
# Files to ignore (patterns)
|
|
23
|
+
ignore_files:
|
|
24
|
+
- slides/ # Skip slides directories
|
|
25
|
+
# Add project-specific file ignores below:
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
# RuboCop configuration for DocOps Lab projects
|
|
2
|
+
# This is the baseline configuration distributed via docopslab-dev
|
|
3
|
+
|
|
4
|
+
plugins:
|
|
5
|
+
- rubocop-rspec
|
|
6
|
+
|
|
7
|
+
AllCops:
|
|
8
|
+
TargetRubyVersion: 3.2
|
|
9
|
+
NewCops: enable
|
|
10
|
+
DisplayCopNames: true
|
|
11
|
+
DisplayStyleGuide: true
|
|
12
|
+
|
|
13
|
+
Style/MethodDefParentheses:
|
|
14
|
+
EnforcedStyle: require_no_parentheses
|
|
15
|
+
|
|
16
|
+
Style/MethodCallWithArgsParentheses:
|
|
17
|
+
EnforcedStyle: require_parentheses
|
|
18
|
+
AllowParenthesesInMultilineCall: true
|
|
19
|
+
AllowParenthesesInChaining: true
|
|
20
|
+
|
|
21
|
+
# Allow longer lines for documentation
|
|
22
|
+
Layout/LineLength:
|
|
23
|
+
Max: 120
|
|
24
|
+
AllowedPatterns:
|
|
25
|
+
- '\A\s*#.*\z' # Comments
|
|
26
|
+
- '\A\s*\*.*\z' # Rdoc comments
|
|
27
|
+
|
|
28
|
+
Metrics/MethodLength:
|
|
29
|
+
Max: 25
|
|
30
|
+
|
|
31
|
+
# Allow longer blocks for Rake tasks and RSpec
|
|
32
|
+
Metrics/BlockLength:
|
|
33
|
+
AllowedMethods:
|
|
34
|
+
- describe
|
|
35
|
+
- context
|
|
36
|
+
- feature
|
|
37
|
+
- scenario
|
|
38
|
+
- let
|
|
39
|
+
- let!
|
|
40
|
+
- subject
|
|
41
|
+
- task
|
|
42
|
+
- namespace
|
|
43
|
+
Max: 50
|
|
44
|
+
|
|
45
|
+
# Documentation not required for internal tooling
|
|
46
|
+
Style/Documentation:
|
|
47
|
+
Enabled: false
|
|
48
|
+
|
|
49
|
+
# Allow TODO comments
|
|
50
|
+
Style/CommentAnnotation:
|
|
51
|
+
Keywords:
|
|
52
|
+
- TODO
|
|
53
|
+
- FIXME
|
|
54
|
+
- OPTIMIZE
|
|
55
|
+
- HACK
|
|
56
|
+
- REVIEW
|
|
57
|
+
|
|
58
|
+
Style/CommentedKeyword:
|
|
59
|
+
Enabled: false
|
|
60
|
+
|
|
61
|
+
Style/StringLiterals:
|
|
62
|
+
Enabled: true
|
|
63
|
+
EnforcedStyle: single_quotes
|
|
64
|
+
|
|
65
|
+
Style/StringLiteralsInInterpolation:
|
|
66
|
+
Enabled: true
|
|
67
|
+
EnforcedStyle: single_quotes
|
|
68
|
+
|
|
69
|
+
Style/FrozenStringLiteralComment:
|
|
70
|
+
Enabled: true
|
|
71
|
+
EnforcedStyle: always
|
|
72
|
+
|
|
73
|
+
Layout/FirstParameterIndentation:
|
|
74
|
+
EnforcedStyle: consistent
|
|
75
|
+
|
|
76
|
+
Layout/ParameterAlignment:
|
|
77
|
+
EnforcedStyle: with_fixed_indentation
|
|
78
|
+
|
|
79
|
+
Layout/MultilineMethodCallBraceLayout:
|
|
80
|
+
EnforcedStyle: same_line
|
|
81
|
+
|
|
82
|
+
Layout/MultilineMethodCallIndentation:
|
|
83
|
+
EnforcedStyle: aligned
|
|
84
|
+
|
|
85
|
+
Layout/FirstMethodArgumentLineBreak:
|
|
86
|
+
Enabled: true
|
|
87
|
+
|
|
88
|
+
Layout/TrailingWhitespace:
|
|
89
|
+
Enabled: true
|
|
90
|
+
|
|
91
|
+
Layout/EmptyLineAfterGuardClause:
|
|
92
|
+
Enabled: true
|
|
93
|
+
|
|
94
|
+
Layout/HashAlignment:
|
|
95
|
+
Enabled: false
|
|
96
|
+
|
|
97
|
+
Layout/SpaceAroundOperators:
|
|
98
|
+
Enabled: false
|
|
99
|
+
|
|
100
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
|
101
|
+
Enabled: false
|
|
102
|
+
EnforcedStyle: no_space
|
|
103
|
+
|
|
104
|
+
Metrics/AbcSize:
|
|
105
|
+
Enabled: false
|
|
106
|
+
|
|
107
|
+
Metrics/CyclomaticComplexity:
|
|
108
|
+
Enabled: false
|
|
109
|
+
|
|
110
|
+
Metrics/PerceivedComplexity:
|
|
111
|
+
Enabled: false
|
|
112
|
+
|
|
113
|
+
Lint/UnusedMethodArgument:
|
|
114
|
+
Enabled: true
|
|
115
|
+
|
|
116
|
+
Lint/UselessAssignment:
|
|
117
|
+
Enabled: true
|
|
118
|
+
|
|
119
|
+
Lint/IneffectiveAccessModifier:
|
|
120
|
+
Enabled: true
|
|
121
|
+
|
|
122
|
+
Security/YAMLLoad:
|
|
123
|
+
Enabled: false # Projects may intentionally use unsafe YAML loading
|
|
124
|
+
|
|
125
|
+
Security/Eval:
|
|
126
|
+
Enabled: true # Catch and replace with safer alternatives
|
|
127
|
+
|
|
128
|
+
# Disable Naming/PredicateMethod - we use generate_, run_, sync_, etc for actions
|
|
129
|
+
Naming/PredicateMethod:
|
|
130
|
+
Enabled: false
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# ShellCheck configuration for DocOps Lab projects
|
|
2
|
+
# This file is synced from docopslab-dev gem
|
|
3
|
+
|
|
4
|
+
# Disable some overly strict rules for our use cases
|
|
5
|
+
disable=SC2034 # Variable appears unused (common in sourced scripts)
|
|
6
|
+
disable=SC2086 # Double quote to prevent globbing (sometimes we want globbing)
|
|
7
|
+
disable=SC2181 # Check exit code directly with e.g. 'if mycmd;', not indirectly with $?
|
|
8
|
+
|
|
9
|
+
# Set default shell to bash (most of our scripts are bash)
|
|
10
|
+
shell=bash
|
|
11
|
+
|
|
12
|
+
# Enable additional optional checks
|
|
13
|
+
enable=quote-safe-variables
|
|
14
|
+
enable=require-variable-braces
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: script
|
|
3
|
+
scope: raw
|
|
4
|
+
level: warning
|
|
5
|
+
message: "Section heading must be preceded by an explicit ID in format [[section-id]] on the line above."
|
|
6
|
+
link: https://docs.asciidoctor.org/asciidoc/latest/sections/custom-ids/
|
|
7
|
+
description: "Ensures all section headings have explicit IDs for better cross-referencing and stable links."
|
|
8
|
+
script: ExplicitSectionIDs.tengo
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: script
|
|
3
|
+
scope: raw
|
|
4
|
+
level: warning
|
|
5
|
+
message: "Each sentence should be on its own line for better version control diffs and readability."
|
|
6
|
+
link: https://docs.asciidoctor.org/asciidoc/latest/writing/style/#one-sentence-per-line
|
|
7
|
+
description: "Encourages writing one sentence per line to improve readability and version control diffs."
|
|
8
|
+
script: OneSentencePerLine.tengo
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: existence
|
|
3
|
+
scope: raw
|
|
4
|
+
level: error
|
|
5
|
+
message: "Use '[source,lang]' with '----' delimiters instead of markdown-style code blocks with '```'."
|
|
6
|
+
link: https://docs.asciidoctor.org/asciidoc/latest/verbatim/source-blocks/
|
|
7
|
+
raw:
|
|
8
|
+
- '```\w*\n[\s\S]*?\n```'
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: existence
|
|
3
|
+
scope: raw
|
|
4
|
+
level: error
|
|
5
|
+
message: "Use proper AsciiDoc admonition blocks instead of manual formatting."
|
|
6
|
+
link: https://docs.asciidoctor.org/asciidoc/latest/blocks/admonitions/
|
|
7
|
+
raw:
|
|
8
|
+
- '^\*\*NOTE:\*\*|^\*\*TIP:\*\*|^\*\*IMPORTANT:\*\*|^\*\*CAUTION:\*\*|^\*\*WARNING:\*\*'
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
extends: existence
|
|
2
|
+
message: "Use AsciiDoc definition list syntax (term:: definition) instead of bold/italic text followed by a colon."
|
|
3
|
+
link: https://docs.asciidoctor.org/asciidoc/latest/lists/description/
|
|
4
|
+
level: error
|
|
5
|
+
scope: raw
|
|
6
|
+
raw:
|
|
7
|
+
- (?m)^(\* )?\*\*?(.+)(:\*\*?|\*\*?:)[\s\n]+(.+)$
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
extends: existence
|
|
2
|
+
message: |
|
|
3
|
+
Add a blank line before starting a list after a sentence ending in a colon.
|
|
4
|
+
level: warning
|
|
5
|
+
scope: raw
|
|
6
|
+
raw:
|
|
7
|
+
- '(?m)^.*(?<!:):[ \t]*$(?=\n[\*\.]\s)'
|
|
8
|
+
link: "Tip: run sed -E '/^[^:]+:[^:]*$/ { N; s/:\n([*.])/:\\n\\1/ }' -i yourfile.adoc"
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
extends: substitution
|
|
3
|
+
scope: text
|
|
4
|
+
level: suggestion
|
|
5
|
+
message: "Consider using monospace formatting for '%s'."
|
|
6
|
+
link: https://docs.asciidoctor.org/asciidoc/latest/text/monospace/
|
|
7
|
+
# Technical terms that should typically be in monospace
|
|
8
|
+
swap:
|
|
9
|
+
'(?i)\bREADME\b': '`README.adoc`'
|
|
10
|
+
'(?i)\bGemfile\b': '`Gemfile`'
|
|
11
|
+
'(?i)\bRakefile\b': '`Rakefile`'
|
|
12
|
+
'(?i)\bDockerfile\b': '`Dockerfile`'
|
|
13
|
+
'(?i)\b\.env\b': '`.env`'
|
|
14
|
+
'(?i)\b\.gitignore\b': '`.gitignore`'
|
|
15
|
+
'(?i)\b\.yml\b': '`.yml`'
|
|
16
|
+
'(?i)\b\.yaml\b': '`.yaml`'
|
|
17
|
+
'(?i)\b\.json\b': '`.json`'
|
|
18
|
+
'(?i)\b\.rb\b': '`.rb`'
|
|
19
|
+
'(?i)\b\.md\b': '`.md`'
|
|
20
|
+
'(?i)\b\.adoc\b': '`.adoc`'
|