docopslab-dev 0.2.0 → 0.3.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 +4 -4
- data/README.adoc +42 -11
- data/docopslab-dev.gemspec +2 -2
- data/lib/docopslab/dev/docker_aware.rb +40 -0
- data/lib/docopslab/dev/initializer.rb +21 -7
- data/lib/docopslab/dev/library.rb +14 -1
- data/lib/docopslab/dev/linters.rb +10 -3
- data/lib/docopslab/dev/version.rb +1 -1
- data/lib/docopslab/dev.rb +2 -1
- data/specs/data/default-manifest.yml +8 -0
- metadata +4 -38
- data/docs/agent/index.md +0 -76
- data/docs/agent/misc/bash-styles.md +0 -470
- data/docs/agent/missions/conduct-release.md +0 -298
- data/docs/agent/missions/setup-new-project.md +0 -344
- data/docs/agent/roles/devops-release-engineer.md +0 -195
- data/docs/agent/roles/docops-engineer.md +0 -257
- data/docs/agent/roles/planner-architect.md +0 -96
- data/docs/agent/roles/product-engineer.md +0 -201
- data/docs/agent/roles/product-manager.md +0 -163
- data/docs/agent/roles/project-manager.md +0 -175
- data/docs/agent/roles/qa-testing-engineer.md +0 -149
- data/docs/agent/roles/tech-docs-manager.md +0 -189
- data/docs/agent/roles/tech-writer.md +0 -217
- data/docs/agent/skills/asciidoc.md +0 -436
- data/docs/agent/skills/bash-cli-dev.md +0 -135
- data/docs/agent/skills/code-commenting.md +0 -384
- data/docs/agent/skills/fix-broken-links.md +0 -354
- data/docs/agent/skills/fix-jekyll-asciidoc-build-errors.md +0 -14
- data/docs/agent/skills/fix-spelling-issues.md +0 -10
- data/docs/agent/skills/git.md +0 -205
- data/docs/agent/skills/github-issues.md +0 -174
- data/docs/agent/skills/product-release-rollback-and-patching.md +0 -71
- data/docs/agent/skills/rake-cli-dev.md +0 -57
- data/docs/agent/skills/readme-driven-dev.md +0 -14
- data/docs/agent/skills/release-history.md +0 -23
- data/docs/agent/skills/ruby.md +0 -203
- data/docs/agent/skills/schemagraphy-sgyml.md +0 -21
- data/docs/agent/skills/tests-running.md +0 -33
- data/docs/agent/skills/tests-writing.md +0 -68
- data/docs/agent/skills/write-the-docs.md +0 -116
- data/docs/agent/topics/common-project-paths.md +0 -169
- data/docs/agent/topics/dev-tooling-usage.md +0 -195
- data/docs/agent/topics/devops-ci-cd.md +0 -57
- data/docs/agent/topics/product-docs-deployment.md +0 -31
- data/docs/library-readme.adoc +0 -39
|
@@ -1,354 +0,0 @@
|
|
|
1
|
-
# Fix Broken Links
|
|
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
|
-
- [Fix Broken Links](/docs/agent/fix-broken-links/)
|
|
9
|
-
|
|
10
|
-
A systematic approach to debugging and fixing broken links in DocOps Lab websites or sites generated with DocOps Lab tooling.
|
|
11
|
-
|
|
12
|
-
Due to complex sourcing procedures at work in DocOps Lab projects, where a particular link comes from is not always obvious.
|
|
13
|
-
|
|
14
|
-
This guide focuses on the methodologies for tracing link sources rather than specific solutions, making it applicable across different Jekyll/AsciiDoc sites.
|
|
15
|
-
|
|
16
|
-
Table of Contents
|
|
17
|
-
|
|
18
|
-
- Common Link Failure Patterns
|
|
19
|
-
- External Link Failures
|
|
20
|
-
- Internal Link Failures
|
|
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
|
|
26
|
-
- Data-Driven Link Debugging
|
|
27
|
-
- YAML Data Sources
|
|
28
|
-
- Dependency Tracing Process
|
|
29
|
-
- Example Trace: AsciiDocsy Links
|
|
30
|
-
- Pre-Publication Link Strategy
|
|
31
|
-
- Validation and Testing
|
|
32
|
-
- Rebuild and Verify
|
|
33
|
-
- Test Cycle
|
|
34
|
-
- Prevention Strategies
|
|
35
|
-
- Development Practices
|
|
36
|
-
- Configuration Management
|
|
37
|
-
|
|
38
|
-
## Common Link Failure Patterns
|
|
39
|
-
|
|
40
|
-
### External Link Failures
|
|
41
|
-
|
|
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>
|
|
60
|
-
|
|
61
|
-
### Internal Link Failures
|
|
62
|
-
|
|
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>
|
|
81
|
-
|
|
82
|
-
## Debugging Methodology
|
|
83
|
-
|
|
84
|
-
### Step 1: Run HTMLProofer and Categorize Failures
|
|
85
|
-
|
|
86
|
-
Run link validation
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
bundle exec rake labdev:lint:html 2>&1 | tee .agent/scratch/link-failures.txt
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Extract external failure patterns
|
|
93
|
-
|
|
94
|
-
```
|
|
95
|
-
grep "External link.*failed" .agent/scratch/link-failures.txt | wc -l
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
Extract internal failure patterns
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
grep "internally linking" .agent/scratch/link-failures.txt | wc -l
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Step 2: Identify High-Impact Patterns
|
|
105
|
-
|
|
106
|
-
Look for repeated failures across multiple pages:
|
|
107
|
-
|
|
108
|
-
- Same broken link appearing on 3+ pages = template/data issue
|
|
109
|
-
|
|
110
|
-
- Similar link patterns = systematic problem
|
|
111
|
-
|
|
112
|
-
- Timeout clusters = network/rebuild issue
|
|
113
|
-
|
|
114
|
-
### Step 3: Trace Link Sources
|
|
115
|
-
|
|
116
|
-
#### For Missing Anchors (Internal Links and X-refs)
|
|
117
|
-
|
|
118
|
-
If the problem is an anchor that does not exist, either the pointer or the anchor must be wrong.
|
|
119
|
-
|
|
120
|
-
<dl>
|
|
121
|
-
<dt class="hdlist1"> **Consider how the page was generated:** </dt>
|
|
122
|
-
<dd>
|
|
123
|
-
- Is it a standard `.adoc` file?
|
|
124
|
-
|
|
125
|
-
- Is it a Liquid-rendered HTML page?
|
|
126
|
-
|
|
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:
|
|
132
|
-
|
|
133
|
-
1. an AsciiDoc xref (`<<anchor-slug>>` or `xref:anchor-slug[]`)
|
|
134
|
-
|
|
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
|
|
136
|
-
|
|
137
|
-
3. a hybrid reference (`link:{xref_scope_anchor-slug_url}[some text]`)
|
|
138
|
-
|
|
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.
|
|
144
|
-
|
|
145
|
-
1. a hard-coded link in Liquid/HTML (`"a href="#anchor-slug">`)
|
|
146
|
-
|
|
147
|
-
2. a data-driven link in Liquid/HTML (`"a href="#{{ variable | slugify }}">`)
|
|
148
|
-
|
|
149
|
-
3. a data-driven link in Liquid/AsciiDoc (`link:#{{ variable | slugify }}`)
|
|
150
|
-
|
|
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}`)
|
|
152
|
-
|
|
153
|
-
Other than for hard-coded links, you will need to trace the source to one of the following:
|
|
154
|
-
|
|
155
|
-
- A YAML file, typically in a `_data/` or `data/` directory.
|
|
156
|
-
|
|
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
|
|
162
|
-
|
|
163
|
-
```
|
|
164
|
-
grep -on 'id="[^"]*"' _site/page-slug/index.html
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
Find template generating the links
|
|
168
|
-
|
|
169
|
-
```
|
|
170
|
-
grep -rn "distinct identifier string" _includes _pages _templates
|
|
171
|
-
```
|
|
172
|
-
</dd>
|
|
173
|
-
</dl>
|
|
174
|
-
|
|
175
|
-
### Step 4: Apply Appropriate Fix Strategy
|
|
176
|
-
|
|
177
|
-
#### Option A: Fix the Data (Recommended for Project Links)
|
|
178
|
-
|
|
179
|
-
Update dependency names to match actual project slugs:
|
|
180
|
-
|
|
181
|
-
```yaml
|
|
182
|
-
# Before
|
|
183
|
-
deps: [jekyll-asciidoc-ui, AsciiDocsy]
|
|
184
|
-
|
|
185
|
-
# After
|
|
186
|
-
deps: [jekyll-asciidoc-ui, asciidocsy-jekyll-theme]
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
#### Option B: Fix the Template
|
|
190
|
-
|
|
191
|
-
Update link generation to use project lookup:
|
|
192
|
-
|
|
193
|
-
```liquid
|
|
194
|
-
{% assign dep_project = projects | where: 'slug', dep | first %}
|
|
195
|
-
{% unless dep_project %}{% assign dep_project = projects | where: 'name', dep | first %}{% endunless %}
|
|
196
|
-
<a href="/projects/#{{ dep_project.slug | default: dep | slugify }}">
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
#### Option C: Fix the Anchors/IDs
|
|
200
|
-
|
|
201
|
-
Update actual IDs to match expected links. Use this solution only when the link source is wrong or the target anchor ID is wrong where it is designated or missing.
|
|
202
|
-
|
|
203
|
-
Misspelled link source
|
|
204
|
-
|
|
205
|
-
```asciidoc
|
|
206
|
-
See xref:sectione-one[Section One] for details.
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Misspelled anchor ID
|
|
210
|
-
|
|
211
|
-
```asciidoc
|
|
212
|
-
[[secton-one]]
|
|
213
|
-
=== Section One
|
|
214
|
-
```
|
|
215
|
-
|
|
216
|
-
## Data-Driven Link Debugging
|
|
217
|
-
|
|
218
|
-
### YAML Data Sources
|
|
219
|
-
|
|
220
|
-
Key files that commonly generate broken links:
|
|
221
|
-
|
|
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>
|
|
236
|
-
|
|
237
|
-
### Dependency Tracing Process
|
|
238
|
-
|
|
239
|
-
1. **Identify the broken link pattern** : `#missing-anchor`
|
|
240
|
-
|
|
241
|
-
2. **Find the data source** : Search YAML files for dependency names
|
|
242
|
-
|
|
243
|
-
3. **Trace template processing** : Follow Liquid template logic
|
|
244
|
-
|
|
245
|
-
4. **Compare with reality** : Check actual generated IDs
|
|
246
|
-
|
|
247
|
-
5. **Apply data fix** : Update dependency to match actual slug
|
|
248
|
-
|
|
249
|
-
### Example Trace: AsciiDocsy Links
|
|
250
|
-
|
|
251
|
-
```bash
|
|
252
|
-
# 1. Broken link found
|
|
253
|
-
# internally linking to /projects/#asciidocsy
|
|
254
|
-
|
|
255
|
-
# 2. Find template source
|
|
256
|
-
grep -r "#asciidocsy" _includes/
|
|
257
|
-
# Found in: _includes/project-profile.html line 76
|
|
258
|
-
|
|
259
|
-
# 3. Check template logic
|
|
260
|
-
# href="/projects/#{{ dep | slugify }}"
|
|
261
|
-
|
|
262
|
-
# 4. Find data source
|
|
263
|
-
grep -n "AsciiDocsy" _data/docops-lab-projects.yml
|
|
264
|
-
# Found: deps: [..., AsciiDocsy]
|
|
265
|
-
|
|
266
|
-
# 5. Check actual anchor
|
|
267
|
-
grep 'id=".*asciidoc.*"' _site/projects/index.html
|
|
268
|
-
# Found: id="asciidocsy-jekyll-theme"
|
|
269
|
-
|
|
270
|
-
# 6. Fix: Change AsciiDocsy → asciidocsy-jekyll-theme
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
## Pre-Publication Link Strategy
|
|
274
|
-
|
|
275
|
-
For links to resources not yet available:
|
|
276
|
-
|
|
277
|
-
1. **Tag with FIXME-PREPUB** : Add comments for easy identification
|
|
278
|
-
|
|
279
|
-
2. **Document in notes** : Track what needs to be updated at publication
|
|
280
|
-
|
|
281
|
-
3. **Use conditional logic** : Hide pre-pub links in production builds
|
|
282
|
-
|
|
283
|
-
```asciidoc
|
|
284
|
-
// FIXME-PREPUB: Update when DocOps/box repository is published
|
|
285
|
-
See the link:https://github.com/DocOps/docops-box[DocOps Box repository] for details.
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
## Validation and Testing
|
|
289
|
-
|
|
290
|
-
### Rebuild and Verify
|
|
291
|
-
|
|
292
|
-
```bash
|
|
293
|
-
# Rebuild site with fixes
|
|
294
|
-
bundle exec rake build
|
|
295
|
-
|
|
296
|
-
# Re-run validation
|
|
297
|
-
bundle exec rake labdev:lint:html
|
|
298
|
-
|
|
299
|
-
# Check specific fix
|
|
300
|
-
grep "#fixed-anchor" _site/target-page.html
|
|
301
|
-
```
|
|
302
|
-
|
|
303
|
-
### Test Cycle
|
|
304
|
-
|
|
305
|
-
1. Fix high-impact patterns first (3+ occurrences)
|
|
306
|
-
|
|
307
|
-
2. Rebuild and validate after each batch of fixes
|
|
308
|
-
|
|
309
|
-
3. Document fixes for future reference
|
|
310
|
-
|
|
311
|
-
4. Test both internal and external link resolution
|
|
312
|
-
|
|
313
|
-
## Prevention Strategies
|
|
314
|
-
|
|
315
|
-
### Development Practices
|
|
316
|
-
|
|
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>
|
|
335
|
-
|
|
336
|
-
### Configuration Management
|
|
337
|
-
|
|
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>
|
|
352
|
-
|
|
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.
|
|
354
|
-
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
# Fix Jekyll AsciiDoc Build Errors
|
|
2
|
-
|
|
3
|
-
This document is intended for AI agents operating within a DocOps Lab environment.
|
|
4
|
-
|
|
5
|
-
As an AI agent, you can help fix Asciidoctor errors in Jekyll builds.
|
|
6
|
-
|
|
7
|
-
1. Perform a basic Jekyll build that writes verbose output to a local file.
|
|
8
|
-
|
|
9
|
-
2. Run the analysis task on the exported file.
|
|
10
|
-
|
|
11
|
-
3. Open the YAML file relayed in the response message (example: `Jekyll AsciiDoc issues report generated: .agent/reports/jekyll-asciidoc-issues-20251214_085323.yml`).
|
|
12
|
-
|
|
13
|
-
4. Follow the instructions in the report to address the issues found.
|
|
14
|
-
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Fix Spelling Issues in Documentation
|
|
2
|
-
|
|
3
|
-
This document is intended for AI agents operating within a DocOps Lab environment.
|
|
4
|
-
|
|
5
|
-
As an AI agent, you can help DocOps Lab developers fix spelling issues in documentation by following the procedure below.
|
|
6
|
-
|
|
7
|
-
1. Use the spellcheck task to generate a spelling report.
|
|
8
|
-
|
|
9
|
-
2. Follow the prompts in the generated report.
|
|
10
|
-
|
data/docs/agent/skills/git.md
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
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
|
-
|
|
28
|
-
2. Commit messages should be concise and easy for users to edit.
|
|
29
|
-
See Commit Messages for guidance.
|
|
30
|
-
|
|
31
|
-
3. Always prompt user to approve commits before pushing.
|
|
32
|
-
|
|
33
|
-
4. Use `gh` for interacting with GitHub whenever possible.
|
|
34
|
-
See Use `gh` the GitHub CLI Tool for more information.
|
|
35
|
-
|
|
36
|
-
## Repository State
|
|
37
|
-
|
|
38
|
-
Development is done on development _trunk_ branches named like `dev/x.y`, where `x` is the major version and `y` is the minor.
|
|
39
|
-
|
|
40
|
-
To start development on a new release version:
|
|
41
|
-
|
|
42
|
-
```
|
|
43
|
-
git checkout main
|
|
44
|
-
git pull origin main
|
|
45
|
-
git checkout -b dev/1.2
|
|
46
|
-
git checkout -b chore/bump-version-1.2.0
|
|
47
|
-
git commit -am "Bumped version attributes in README"
|
|
48
|
-
git checkout dev/1.2
|
|
49
|
-
git merge chore/bump-version-1.2.0
|
|
50
|
-
git push -u origin dev/1.2
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Development Procedures
|
|
54
|
-
|
|
55
|
-
Work on feature or fix branches off the corresponding `dev/x.y` trunk.
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
git checkout dev/1.2
|
|
59
|
-
git checkout -b feat/add-widget
|
|
60
|
-
… implement …
|
|
61
|
-
git add .
|
|
62
|
-
git commit -m "feat: add widget"
|
|
63
|
-
git push -u origin feat/add-widget
|
|
64
|
-
gh pr create --base dev/1.2 --title "feat: add widget" --body "Adds a new widget to the dashboard."
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
<dl>
|
|
68
|
-
<dt class="hdlist1">Branch naming conventions</dt>
|
|
69
|
-
<dd>
|
|
70
|
-
- `feat/…` for new features OR improvements
|
|
71
|
-
|
|
72
|
-
- `fix/…` for bugfixes
|
|
73
|
-
|
|
74
|
-
- `chore/…` for version bumps and sundry tasks with no product impact
|
|
75
|
-
|
|
76
|
-
- `epic/…` for large features or changes that span releases
|
|
77
|
-
</dd>
|
|
78
|
-
</dl>
|
|
79
|
-
|
|
80
|
-
### Commit Message Conventions
|
|
81
|
-
|
|
82
|
-
<dl>
|
|
83
|
-
<dt class="hdlist1">Description (first line) conventions</dt>
|
|
84
|
-
<dd>
|
|
85
|
-
- Use present-tense descriptive verbs (“adds widget”, not “added” or “add”)
|
|
86
|
-
|
|
87
|
-
- `feat: …` for new features OR improvements
|
|
88
|
-
|
|
89
|
-
- `fix: …` for bugfixes
|
|
90
|
-
|
|
91
|
-
- `chore: …` for version bumps and sundry tasks with no product impact
|
|
92
|
-
|
|
93
|
-
- `docs: …` for documentation changes
|
|
94
|
-
|
|
95
|
-
- `test: …` for test code changes
|
|
96
|
-
|
|
97
|
-
- `refactor: …` for code restructuring with no functional changes
|
|
98
|
-
|
|
99
|
-
- `style: …` for formatting, missing semi-colons, etc; no functional changes
|
|
100
|
-
|
|
101
|
-
- `perf: …` for performance improvements
|
|
102
|
-
|
|
103
|
-
- `auto: …` for changes to CI/CD pipelines and build system
|
|
104
|
-
</dd>
|
|
105
|
-
<dt class="hdlist1">Body conventions</dt>
|
|
106
|
-
<dd>
|
|
107
|
-
- Use the body to explain what and why vs. how.
|
|
108
|
-
|
|
109
|
-
- Reference issues and pull requests as needed.
|
|
110
|
-
|
|
111
|
-
- Use bullet points (`- text`) and paragraphs as needed for clarity.
|
|
112
|
-
|
|
113
|
-
- Do not hard-wrap lines, but _do_:
|
|
114
|
-
</dd>
|
|
115
|
-
</dl>
|
|
116
|
-
|
|
117
|
-
### Merging Changes
|
|
118
|
-
|
|
119
|
-
Squash-merge branches back into `dev/x.y`:
|
|
120
|
-
|
|
121
|
-
```
|
|
122
|
-
git checkout dev/1.2
|
|
123
|
-
git checkout -b feat/add-widget
|
|
124
|
-
… implement …
|
|
125
|
-
git add .
|
|
126
|
-
git commit -m "feat: add widget"
|
|
127
|
-
git merge --squash feat/add-widget
|
|
128
|
-
git commit -m "feat: add widget"
|
|
129
|
-
git push origin dev/1.2
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Delete merged branches.
|
|
133
|
-
|
|
134
|
-
## Dev Branch Rules
|
|
135
|
-
|
|
136
|
-
- Always branch from `dev/x.y`.
|
|
137
|
-
|
|
138
|
-
- Always squash-merge into `dev/x.y`.
|
|
139
|
-
|
|
140
|
-
- Never merge directly into `main`.
|
|
141
|
-
|
|
142
|
-
## Commit Messages
|
|
143
|
-
|
|
144
|
-
This document outlines the protocols for authoring Git commit messages in DocOps Lab projects.
|
|
145
|
-
|
|
146
|
-
### General Style (Conventional Commits)
|
|
147
|
-
|
|
148
|
-
DocOps Lab _loosely_ follows the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for Git commit messages.
|
|
149
|
-
|
|
150
|
-
Enforcement is not strict, but using Conventional Commits style is encouraged for consistency and clarity.
|
|
151
|
-
|
|
152
|
-
> **NOTE:** Most DocOps Lab projects do not base Changelog/Release Notes generation on commit messages.
|
|
153
|
-
|
|
154
|
-
The basic outline for a Conventional Commit message is:
|
|
155
|
-
|
|
156
|
-
```
|
|
157
|
-
<type>[optional scope]: <description>
|
|
158
|
-
|
|
159
|
-
[optional body]
|
|
160
|
-
|
|
161
|
-
[optional footer(s)]
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### Commit Description
|
|
165
|
-
|
|
166
|
-
The commit description should be concise and to the point, summarizing the change in 50 characters or less.
|
|
167
|
-
|
|
168
|
-
Use the _past tense_ rather than imperative mood (e.g., "Added feature X" instead of "Add feature X").
|
|
169
|
-
|
|
170
|
-
### Commit Types
|
|
171
|
-
|
|
172
|
-
- Use present-tense descriptive verbs (“adds widget”, not “added” or “add”)
|
|
173
|
-
|
|
174
|
-
- `feat: …` for new features OR improvements
|
|
175
|
-
|
|
176
|
-
- `fix: …` for bugfixes
|
|
177
|
-
|
|
178
|
-
- `chore: …` for version bumps and sundry tasks with no product impact
|
|
179
|
-
|
|
180
|
-
- `docs: …` for documentation changes
|
|
181
|
-
|
|
182
|
-
- `test: …` for test code changes
|
|
183
|
-
|
|
184
|
-
- `refactor: …` for code restructuring with no functional changes
|
|
185
|
-
|
|
186
|
-
- `style: …` for formatting, missing semi-colons, etc; no functional changes
|
|
187
|
-
|
|
188
|
-
- `perf: …` for performance improvements
|
|
189
|
-
|
|
190
|
-
- `auto: …` for changes to CI/CD pipelines and build system
|
|
191
|
-
|
|
192
|
-
### Commit Body Conventions
|
|
193
|
-
|
|
194
|
-
- Use the body to explain what and why vs. how.
|
|
195
|
-
|
|
196
|
-
- Reference issues and pull requests as needed.
|
|
197
|
-
|
|
198
|
-
- Use bullet points (`- text`) and paragraphs as needed for clarity.
|
|
199
|
-
|
|
200
|
-
- Do not hard-wrap lines, but _do_:
|
|
201
|
-
|
|
202
|
-
## Use `gh` the GitHub CLI Tool
|
|
203
|
-
|
|
204
|
-
For interacting with GitHub, always prefer using the [GitHub CLI (`gh`)](https://cli.github.com/) tool for issues, PRs, and other GH operations.
|
|
205
|
-
|