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,170 @@
1
+ # AI Agent Instructions for Git Operations
2
+
3
+ This document is intended for AI agents operating within a DocOps Lab environment.
4
+
5
+ You are an AI agent that helps with git operations.
6
+
7
+ This document describes protocols for committing and pushing changes to a git DocOps Lab Git repository and interacting with GitHub on behalf of a DocOps Lab contributor.
8
+
9
+ Table of Contents
10
+
11
+ - The Basics
12
+ - Repository State
13
+ - Development Procedures
14
+ - Commit Message Conventions
15
+ - Merging Changes
16
+ - Dev Branch Rules
17
+ - Commit Messages
18
+ - General Style (Conventional Commits)
19
+ - Commit Description
20
+ - Commit Types
21
+ - Commit Body Conventions
22
+ - Use `gh` the GitHub CLI Tool
23
+
24
+ ## The Basics
25
+
26
+ 1. Follow proper branching procedures as outlined in Repository State.
27
+ 2. Commit messages should be concise and easy for users to edit.
28
+ See Commit Messages for guidance.
29
+ 3. Always prompt user to approve commits before pushing.
30
+ 4. Use `gh` for interacting with GitHub whenever possible.
31
+ See Use `gh` the GitHub CLI Tool for more information.
32
+
33
+ ## Repository State
34
+
35
+ Development is done on development _trunk_ branches named like `dev/x.y`, where `x` is the major version and `y` is the minor.
36
+
37
+ To start development on a new release version:
38
+
39
+ ```
40
+ git checkout main
41
+ git pull origin main
42
+ git checkout -b dev/1.2
43
+ git checkout -b chore/bump-version-1.2.0
44
+ git commit -am "Bumped version attributes in README"
45
+ git checkout dev/1.2
46
+ git merge chore/bump-version-1.2.0
47
+ git push -u origin dev/1.2
48
+ ```
49
+
50
+ ## Development Procedures
51
+
52
+ Work on feature or fix branches off the corresponding `dev/x.y` trunk.
53
+
54
+ ```
55
+ git checkout dev/1.2
56
+ git checkout -b feat/add-widget
57
+ … implement …
58
+ git add .
59
+ git commit -m "feat: add widget"
60
+ git push -u origin feat/add-widget
61
+ gh pr create --base dev/1.2 --title "feat: add widget" --body "Adds a new widget to the dashboard."
62
+ ```
63
+
64
+ **Branch naming conventions** :
65
+ - `feat/…​` for new features OR improvements
66
+ - `fix/…​` for bugfixes
67
+ - `chore/…​` for version bumps and sundry tasks with no product impact
68
+ - `epic/…​` for large features or changes that span releases
69
+
70
+ ### Commit Message Conventions
71
+
72
+ **Description (first line) conventions**:
73
+ - Use present-tense descriptive verbs (“adds widget”, not “added” or “add”)
74
+ - `feat: …​` for new features OR improvements
75
+ - `fix: …​` for bugfixes
76
+ - `chore: …​` for version bumps and sundry tasks with no product impact
77
+ - `docs: …​` for documentation changes
78
+ - `test: …​` for test code changes
79
+ - `refactor: …​` for code restructuring with no functional changes
80
+ - `style: …​` for formatting, missing semi-colons, etc; no functional changes
81
+ - `perf: …​` for performance improvements
82
+ - `auto: …​` for changes to CI/CD pipelines and build system
83
+
84
+ **Body conventions** :
85
+ - Use the body to explain what and why vs. how.
86
+ - Reference issues and pull requests as needed.
87
+ - Use bullet points (`- text`) and paragraphs as needed for clarity.
88
+ - Do not hard-wrap lines, but _do_:
89
+
90
+ - use 1-sentence per line
91
+ - keep sentences short
92
+
93
+ ### Merging Changes
94
+
95
+ Squash-merge branches back into `dev/x.y`:
96
+
97
+ ```
98
+ git checkout dev/1.2
99
+ git checkout -b feat/add-widget
100
+ … implement …
101
+ git add .
102
+ git commit -m "feat: add widget"
103
+ git merge --squash feat/add-widget
104
+ git commit -m "feat: add widget"
105
+ git push origin dev/1.2
106
+ ```
107
+
108
+ Delete merged branches.
109
+
110
+ ## Dev Branch Rules
111
+
112
+ - Always branch from `dev/x.y`.
113
+ - Always squash-merge into `dev/x.y`.
114
+ - Never merge directly into `main`.
115
+
116
+ ## Commit Messages
117
+
118
+ This document outlines the protocols for authoring Git commit messages in DocOps Lab projects.
119
+
120
+ ### General Style (Conventional Commits)
121
+
122
+ DocOps Lab _loosely_ follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for Git commit messages.
123
+
124
+ Enforcement is not strict, but using Conventional Commits style is encouraged for consistency and clarity.
125
+
126
+ > **NOTE:** Most DocOps Lab projects do not base Changelog/Release Notes generation on commit messages.
127
+
128
+ The basic outline for a Conventional Commit message is:
129
+
130
+ ```
131
+ <type>[optional scope]: <description>
132
+
133
+ [optional body]
134
+
135
+ [optional footer(s)]
136
+ ```
137
+
138
+ ### Commit Description
139
+
140
+ The commit description should be concise and to the point, summarizing the change in 50 characters or less.
141
+
142
+ Use the _past tense_ rather than imperative mood (e.g., "Added feature X" instead of "Add feature X").
143
+
144
+ ### Commit Types
145
+
146
+ - Use present-tense descriptive verbs (“adds widget”, not “added” or “add”)
147
+ - `feat: …​` for new features OR improvements
148
+ - `fix: …​` for bugfixes
149
+ - `chore: …​` for version bumps and sundry tasks with no product impact
150
+ - `docs: …​` for documentation changes
151
+ - `test: …​` for test code changes
152
+ - `refactor: …​` for code restructuring with no functional changes
153
+ - `style: …​` for formatting, missing semi-colons, etc; no functional changes
154
+ - `perf: …​` for performance improvements
155
+ - `auto: …​` for changes to CI/CD pipelines and build system
156
+
157
+ ### Commit Body Conventions
158
+
159
+ - Use the body to explain what and why vs. how.
160
+ - Reference issues and pull requests as needed.
161
+ - Use bullet points (`- text`) and paragraphs as needed for clarity.
162
+ - Do not hard-wrap lines, but _do_:
163
+
164
+ - use 1-sentence per line
165
+ - keep sentences short
166
+
167
+ ## Use `gh` the GitHub CLI Tool
168
+
169
+ For interacting with GitHub, always prefer using the [GitHub CLI (`gh`)](https://cli.github.com/) tool for issues, PRs, and other GH operations.
170
+
@@ -0,0 +1,135 @@
1
+ # GitHub Issues Management for AI Agents
2
+
3
+ This document is intended for AI agents operating within a DocOps Lab environment.
4
+
5
+ AI agents assisting in DocOps Lab development tasks should use the Issuer and `gh` CLI tools to manage GitHub issues in project repositories.
6
+
7
+ Table of Contents
8
+
9
+ - Managing GitHub Issues with `gh`
10
+ - Bulk-posting Issues with Issuer
11
+ - Issue Types
12
+ - Issue Labels
13
+ - Project-specific Labels
14
+ - Standard Documentation Labels
15
+ - Admonition Labels
16
+ - Other Standard Labels
17
+
18
+ ## Managing GitHub Issues with `gh`
19
+
20
+ The GitHub CLI tool, `gh`, can be used to manage issues from the command line.
21
+
22
+ See [GitHub CLI Manual: gh issue](https://cli.github.com/manual/gh_issue) for details on using `gh` to create, view, edit, and manage issues and issue metadata.
23
+
24
+ Some common commands:
25
+
26
+ Create a new issue.
27
+
28
+ ```
29
+ gh issue create --title "Issue Title" --body "Issue description." --label "bug,component:docs" --assignee "username"
30
+ ```
31
+
32
+ List open issues.
33
+
34
+ ```
35
+ gh issue list --state open
36
+ ```
37
+
38
+ View a specific issue.
39
+
40
+ ```
41
+ gh issue view <issue-number>
42
+ ```
43
+
44
+ ## Bulk-posting Issues with Issuer
45
+
46
+ The `issuer` tool can be used to bulk-post issues to any repository from a YAML file.
47
+
48
+ Follow the instructions at [Issuer](https://github.com/DocOps/issuer) to install and use the tool.
49
+
50
+ ## Issue Types
51
+
52
+ **Task** :
53
+ A specific piece of work that does not directly lead to a change to the product. Used for research, infrastructure management, and other sundry/chore tasks not necessarily associated with repository code changes.
54
+
55
+ **Bug** :
56
+ Reports describing unexpected behavior or malfunctions in the product. Bug issues are used directly and become bugfixes (no technical type change) once resolved.
57
+
58
+ **Feature** :
59
+ Requests or ideas for new functionality in the product.
60
+
61
+ **Improvement** :
62
+ Enhancements of existing features or capabilities.
63
+
64
+ **Epic** :
65
+ An issue or collection of issues with a common goal that may involve work performed across release versions (“milestones”).
66
+
67
+ ## Issue Labels
68
+
69
+ All DocOps Lab projects use a common convention around GitHub issue labels to categorize and manage issues.
70
+
71
+ ### Project-specific Labels
72
+
73
+ **`component:<part>`** :
74
+ Label prefix for arbitrarily named product aspects, modules, interfaces, or subsystems. Common components include `component:docker`, `component:cli`, and `component:docs` (see next section). These correspond to the `part` property in ReleaseHx change records.
75
+
76
+ ### Standard Documentation Labels
77
+
78
+ **`component:docs`** :
79
+ Indicates the issue pertains to documentation infrastructure, layout, deployment, but not core content.
80
+
81
+ **`documentation`** :
82
+ The issue relates to documentation _content_ updates or improvements.
83
+
84
+ **`needs:docs`** :
85
+ The issue requires documentation updates as part of its resolution. Documentation updates will likely be in a sub-issue with a `documentation` label.
86
+
87
+ **`needs:note`** :
88
+ The issue requires a note in the release history when resolved. Release notes are appended to the description body under `## Release Note`.
89
+
90
+ **`changelog`** :
91
+ The issue summary should be included in the changelog for the next release, even if no release note is included.
92
+
93
+ ### Admonition Labels
94
+
95
+ **`REMOVAL`** :
96
+ Removes functionality or features.
97
+
98
+ **`DEPRECATION`** :
99
+ Announces planned removal of functionality or features in a future release. (Only appropriate for `documentation` issues.)
100
+
101
+ **`BREAKING`** :
102
+ Includes one or more changes that are not backward-compatible.
103
+
104
+ **`SECURITY`** :
105
+ Addresses or documents a security vulnerability or risk.
106
+
107
+ ### Other Standard Labels
108
+
109
+ **`question`** :
110
+ User or community member inquiries about the product or project.
111
+
112
+ **`priority:high`** :
113
+ Indicates that the issue is important and should be prioritized for release as soon as possible.
114
+
115
+ **`priority:low`** :
116
+ The issue is not urgent and can be addressed in a future release.
117
+
118
+ **`priority:stretch`** :
119
+ Issue is slated for the next release but can be bumped if it’s holding up releasee.
120
+
121
+ **`wontfix`** :
122
+ The issue will not be addressed. Comment from maintainers should explain why.
123
+
124
+ **`duplicate`** :
125
+ The issue is a duplicate of another issue, which should be linked in the comments.
126
+
127
+ **`posted-by-issuer`** :
128
+ Indicates that the issue was created by the Issuer tool.
129
+
130
+ **`good first issue`** :
131
+ Designates an issue suitable for new contributors to the project.
132
+
133
+ **`help wanted`** :
134
+ Indicates that maintainers are seeking assistance from the community to resolve the issue.
135
+
@@ -0,0 +1,71 @@
1
+ # Rolling Back and/or Patching a Product Release
2
+
3
+ This document is intended for AI agents operating within a DocOps Lab environment.
4
+
5
+ As an AI agent, you can assist DocOps Lab developers in executing product-release patching and rolling back.
6
+
7
+ Table of Contents
8
+
9
+ - Rollback Failsafe
10
+ - Standard Patching
11
+
12
+ ## Rollback Failsafe
13
+
14
+ If a release must be rolled back and retracted, you must revert the changes and “yank” the artifacts.
15
+
16
+ ```
17
+ git tag -d v<$tok.majmin>.<$tok.patch>
18
+ git push origin :refs/tags/v<$tok.majmin>.<$tok.patch>
19
+ git revert -m 1 <merge-commit>
20
+ git push origin main
21
+ ```
22
+
23
+ Retract or yank the artifacts (DockerHub, RubyGems, etc) and nullify the GH release.
24
+
25
+ ```
26
+ gh release delete v<$tok.majmin>.<$tok.patch>
27
+ gem yank --version <$tok.majmin>.<$tok.patch> <gemname>
28
+ docker rmi <image>:<$tok.majmin>.<$tok.patch>
29
+ ```
30
+
31
+ Be sure to un-publish any additional artifacts specific to the project.
32
+
33
+ ## Standard Patching
34
+
35
+ Perform patch work against the earliest affected `release/x.y`. These examples use `1.1`, `1.2`, and `1.2.1` as example versions.
36
+
37
+ Patch development procedure
38
+
39
+ ```
40
+ git checkout release/1.1
41
+ git checkout -b fix/parser-typo
42
+ # … FIX …
43
+ git add .
44
+ git commit -m "fix: correct parser typo"
45
+ git push origin fix/parser-typo
46
+ # … TEST …
47
+ git checkout release/1.1
48
+ git merge --squash fix/parser-typo
49
+ git commit -m "fix: correct parser typo"
50
+ git push origin release/1.1
51
+ git tag -a v1.2 -m "Patch release 1.2"
52
+ git push origin v1.2
53
+ ```
54
+
55
+ Example forward porting procedure
56
+
57
+ ```
58
+ git checkout release/1.2
59
+ git cherry-pick <commit-hash>
60
+ # … TEST …
61
+ git push origin release/1.2
62
+ git tag -a v1.2.1 -m "Patch release 1.2.1"
63
+ git push origin v1.2.1
64
+ ```
65
+
66
+ > **NOTE:** Be sure to change `1.1`, `1.2`, and `1.2.1` to the actual affected branches and versions.
67
+
68
+ Repeat for every affected branch then release the patched versions.
69
+
70
+ > **NOTE:** Between minor versions, patch versions may vary due to inconsistent applicability of patches.
71
+
@@ -0,0 +1,57 @@
1
+ # Agent Rake CLI Guide
2
+
3
+ This document is intended for AI agents operating within a DocOps Lab environment.
4
+
5
+ If you need to add or modify Rake tasks for the current project, follow the guidelines in this document.
6
+
7
+ Table of Contents
8
+
9
+ - Rake CLIs
10
+ - Rake CLI Model
11
+
12
+ ## Rake CLIs
13
+
14
+ We use Rake for internal repo tasks and chores, including build operations, test-suite execution, unconventional testing, code linting and cleanup, etc.
15
+
16
+ Users of our released products should never be asked to use `rake` commands during the normal course of daily operations, if ever.
17
+
18
+ Rake is less versatile than Thor, but it is simpler for executing straightforward methods and series of methods. It likewise requires (and permits) considerably less application-specific creativity and customization.
19
+
20
+ Innovative UIs are not justified for internal tooling. Our developer-facing utilities are fairly robust, but the UI for executing them need not be.
21
+
22
+ At DocOps Lab, we save inventive interfaces for domain-optimized operations.
23
+
24
+ ### Rake CLI Model
25
+
26
+ ```
27
+ rake domain:action:target[option1,option2]
28
+ ```
29
+
30
+ Where both `domain`` and `target` are optional, as of course are arguments that go in the braces.
31
+
32
+ Think of the domain as a component “scope” within the codebase or project.
33
+
34
+ Domains either indicate a distinct module or component within the codebase or general tasks using upstream dependencies.
35
+
36
+ No domain means local, project-specific tasks.
37
+
38
+ Example 3-part task with an optional argument
39
+
40
+ ```
41
+ rake labdev:lint:docs[README.adoc]
42
+ ```
43
+
44
+ In the above case, the domain is from the `docopslab-dev` library/gem.
45
+
46
+ Example 3-part task with a local domain reference
47
+
48
+ ```
49
+ rake gemdo:build
50
+ ```
51
+
52
+ The above command has a local domain `gemdo` for referencing commands that affect a gem that happens to be embedded in a larger repo. A code repo containing more than one gem might use:
53
+
54
+ ```
55
+ rake gemdo:build:gemname
56
+ ```
57
+
@@ -0,0 +1,13 @@
1
+ # README-driven Development
2
+
3
+ This document is intended for AI agents operating within a DocOps Lab environment.
4
+
5
+ DocOps Lab practices software development that revolves around `README.adoc` and uses other AsciiDoc and YAML files to radically single source all product and documentation code.
6
+
7
+ We will eventually provide detailed documentation of the conventions and protocols involved in this method.
8
+
9
+ For now, Agents should:
10
+
11
+ - Peruse the local `README.adoc` and `specs/data/*.{yml,yaml}`
12
+ - Prompt their Operators to provide examples from relevant/neighboring projects.
13
+
@@ -0,0 +1,29 @@
1
+ # Preparing a Version Release History Document
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
+ - [Product Change Tracking and Documentation](/docs/product-change-docs/)
9
+
10
+ ReleaseHx automatically generates release notes and changelogs from GitHub Issues and PRs when properly labeled.
11
+
12
+ > **NOTE:** Every DocOps Lab project implements ReleaseHx differently as a way of “eating our own dog food”.
13
+
14
+ Refer to any given project’s documentation for specific instructions on how to prepare changes for inclusion in release notes and changelogs.
15
+
16
+ The general procedure is as follows:
17
+
18
+ 1. Generate a draft release history in YAML.
19
+
20
+ ```
21
+ bundle exec rhx <version> --yaml --fetch
22
+ ```
23
+ 2. Edit the generated YAML to ensure clarity and completeness.
24
+ 3. Generate the Markdown version.
25
+
26
+ ```
27
+ bundle exec rhx <version> --md docs/release/<version>.md
28
+ ```
29
+
@@ -0,0 +1,192 @@
1
+ # Ruby Coding Guide for DocOps Lab AI Agents
2
+
3
+ This document is intended for AI agents operating within a DocOps Lab environment.
4
+
5
+ ## Conventions
6
+
7
+ DocOps Lab largely follows Ruby’s community conventions, with some exceptions. Conventions are either reiterated or clarified here.
8
+
9
+ However, conventions are not exhaustively listed, and deviations are rarely pointed out as such.
10
+
11
+ ### Naming Conventions
12
+
13
+ - Use `snake_case` for variable and method names.
14
+ - Use `CamelCase` for class and module names.
15
+ - Use `SCREAMING_SNAKE_CASE` for constants.
16
+ - Use descriptive names that convey the purpose of the variable, method, or class.
17
+ - Avoid abbreviations unless they are widely understood.
18
+ - Use verbs for method names to indicate actions.
19
+ - Use nouns for class and module names to indicate entities.
20
+
21
+ ### Architectural Conventions
22
+
23
+ - Use classes and class instance methods for objects that work like _objects_ — they have state and do not act on other objects' state.
24
+ - Use module methods acting on objects or carrying out general operations/utility functions.
25
+ - Use Rake for internal (developer) CLI; use Thor for user-facing CLI
26
+ - Gems may begin life as a module within another gem.
27
+
28
+ ### Path Conventions
29
+
30
+ - Use `lib/` for main application code.
31
+
32
+ - `lib/<project_name>.rb` for the main file
33
+ - `lib/<project_name>/` for supporting files and modules
34
+ - `lib/<project_name>/<module_name>/` for submodules
35
+ - Use `spec/` for specifications and tests.
36
+ - Use `docs/` or `_docs/` for documentation.
37
+ - Use `build/` for pre-runtime artifacts.
38
+ - Use `_build/` as default in applications that generate files at runtime, unless another path is more appropriate (ex: `_site/` in Jekyll-centric apps).
39
+ - Do NOT assume or insist upon perfect alignment with Ruby path conventions:
40
+
41
+ - `SomeModule` or `SomeClass` may be sourced at `lib/some_module.rb` or `lib/some_class.rb` instead of `lib/some/module.rb` or `lib/some/class.rb`.
42
+ - Some modules like `SchemaGraphy` and `AsciiDoc` are never broken up into `schema_graphy` or `ascii_doc` namespaces.
43
+ - Modules with multiple parallel sibling modules in a category like (`WriteOps`, `DraftOps`) belong in paths like `lib/ops/write.rb` instead of `lib/write_ops.rb` or `lib/write/ops.rb`.
44
+
45
+ ### Syntax Conventions
46
+
47
+ - Use 2 spaces for indentation.
48
+ - Limit lines to 120 characters or so when possible.
49
+ - Use parentheses for method calls with arguments, but omit them for methods without arguments.
50
+ - Do not use parentheses in method definitions (`def method_name arg1, arg2`).
51
+ - Use single quotes for strings that do not require interpolation or special symbols.
52
+ - Use double quotes for strings that require interpolation or special symbols.
53
+
54
+ ### Commenting Conventions
55
+
56
+ See [DocOps Lab Code Commenting Guidance](/docs/code-commenting/) for detailed commenting conventions.
57
+
58
+ ## RuboCop Config
59
+
60
+ ```
61
+ # RuboCop configuration for DocOps Lab projects
62
+ # This is the baseline configuration distributed via docopslab-dev
63
+
64
+ plugins:
65
+ - rubocop-rspec
66
+
67
+ AllCops:
68
+ TargetRubyVersion: 3.2
69
+ NewCops: enable
70
+ DisplayCopNames: true
71
+ DisplayStyleGuide: true
72
+
73
+ Style/MethodDefParentheses:
74
+ EnforcedStyle: require_no_parentheses
75
+
76
+ Style/MethodCallWithArgsParentheses:
77
+ EnforcedStyle: require_parentheses
78
+ AllowParenthesesInMultilineCall: true
79
+ AllowParenthesesInChaining: true
80
+
81
+ # Allow longer lines for documentation
82
+ Layout/LineLength:
83
+ Max: 120
84
+ AllowedPatterns:
85
+ - '\A\s*#.*\z' # Comments
86
+ - '\A\s*\*.*\z' # Rdoc comments
87
+
88
+ Metrics/MethodLength:
89
+ Max: 25
90
+
91
+ # Allow longer blocks for Rake tasks and RSpec
92
+ Metrics/BlockLength:
93
+ AllowedMethods:
94
+ - describe
95
+ - context
96
+ - feature
97
+ - scenario
98
+ - let
99
+ - let!
100
+ - subject
101
+ - task
102
+ - namespace
103
+ Max: 50
104
+
105
+ # Documentation not required for internal tooling
106
+ Style/Documentation:
107
+ Enabled: false
108
+
109
+ # Allow TODO comments
110
+ Style/CommentAnnotation:
111
+ Keywords:
112
+ - TODO
113
+ - FIXME
114
+ - OPTIMIZE
115
+ - HACK
116
+ - REVIEW
117
+
118
+ Style/CommentedKeyword:
119
+ Enabled: false
120
+
121
+ Style/StringLiterals:
122
+ Enabled: true
123
+ EnforcedStyle: single_quotes
124
+
125
+ Style/StringLiteralsInInterpolation:
126
+ Enabled: true
127
+ EnforcedStyle: single_quotes
128
+
129
+ Style/FrozenStringLiteralComment:
130
+ Enabled: true
131
+ EnforcedStyle: always
132
+
133
+ Layout/FirstParameterIndentation:
134
+ EnforcedStyle: consistent
135
+
136
+ Layout/ParameterAlignment:
137
+ EnforcedStyle: with_fixed_indentation
138
+
139
+ Layout/MultilineMethodCallBraceLayout:
140
+ EnforcedStyle: same_line
141
+
142
+ Layout/MultilineMethodCallIndentation:
143
+ EnforcedStyle: aligned
144
+
145
+ Layout/FirstMethodArgumentLineBreak:
146
+ Enabled: true
147
+
148
+ Layout/TrailingWhitespace:
149
+ Enabled: true
150
+
151
+ Layout/EmptyLineAfterGuardClause:
152
+ Enabled: true
153
+
154
+ Layout/HashAlignment:
155
+ Enabled: false
156
+
157
+ Layout/SpaceAroundOperators:
158
+ Enabled: false
159
+
160
+ Layout/SpaceAroundEqualsInParameterDefault:
161
+ Enabled: false
162
+ EnforcedStyle: no_space
163
+
164
+ Metrics/AbcSize:
165
+ Enabled: false
166
+
167
+ Metrics/CyclomaticComplexity:
168
+ Enabled: false
169
+
170
+ Metrics/PerceivedComplexity:
171
+ Enabled: false
172
+
173
+ Lint/UnusedMethodArgument:
174
+ Enabled: true
175
+
176
+ Lint/UselessAssignment:
177
+ Enabled: true
178
+
179
+ Lint/IneffectiveAccessModifier:
180
+ Enabled: true
181
+
182
+ Security/YAMLLoad:
183
+ Enabled: false # Projects may intentionally use unsafe YAML loading
184
+
185
+ Security/Eval:
186
+ Enabled: true # Catch and replace with safer alternatives
187
+
188
+ # Disable Naming/PredicateMethod - we use generate_, run_, sync_, etc for actions
189
+ Naming/PredicateMethod:
190
+ Enabled: false
191
+ ```
192
+
@@ -0,0 +1,18 @@
1
+ # SchemaGraphy/SGYML 101
2
+
3
+ This document is intended for AI agents operating within a DocOps Lab environment.
4
+
5
+ SGYML stands for SchemaGraphy YAML-based Modeling Language, a format designed, standardized, and maintained by DocOps Lab.
6
+
7
+ It is a specialized YAML preprocessing syntax that provides:
8
+
9
+ - A human-readable schema model that can define, govern, and parse the structure and contents of complex data objects and text documents alike
10
+ - An extension for YAML documents to incorporate new properties like `$ref` transclusion directives and inheritance/overlay properties
11
+ - A standardization around a base subset of YAML capabilities to constrain the complexity of YAML documents and support thereof
12
+ - Highly semantic data-typing to replace YAML’s clunky model
13
+
14
+ SchemaGraphy Schemas and the SGYML and tooling to support them are in a nascent stage, still under development.
15
+
16
+ Check [SchemaGraphy](/projects/schemagraphy/) for the latest information on SchemaGraphy and SGYML.
17
+
18
+ > **TIP:** If the codebase you are working on uses SGYML or SchemaGraphy Schemas, check for a path `../schemagraphy/` (relative to the project root).