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.
- checksums.yaml +4 -4
- data/README.adoc +645 -318
- data/docopslab-dev.gemspec +2 -3
- data/docs/agent/index.md +4 -8
- data/docs/agent/misc/bash-styles.md +470 -0
- data/docs/agent/missions/conduct-release.md +161 -87
- data/docs/agent/missions/setup-new-project.md +228 -134
- data/docs/agent/roles/devops-release-engineer.md +60 -17
- data/docs/agent/roles/docops-engineer.md +84 -20
- data/docs/agent/roles/planner-architect.md +22 -0
- data/docs/agent/roles/product-engineer.md +63 -15
- data/docs/agent/roles/product-manager.md +57 -24
- data/docs/agent/roles/project-manager.md +48 -12
- data/docs/agent/roles/qa-testing-engineer.md +48 -14
- data/docs/agent/roles/tech-docs-manager.md +63 -17
- data/docs/agent/roles/tech-writer.md +68 -14
- data/docs/agent/skills/asciidoc.md +65 -238
- data/docs/agent/skills/bash-cli-dev.md +135 -0
- data/docs/agent/skills/code-commenting.md +143 -106
- data/docs/agent/skills/fix-broken-links.md +145 -100
- data/docs/agent/skills/fix-jekyll-asciidoc-build-errors.md +1 -10
- data/docs/agent/skills/fix-spelling-issues.md +0 -3
- data/docs/agent/skills/git.md +69 -34
- data/docs/agent/skills/github-issues.md +110 -71
- data/docs/agent/skills/rake-cli-dev.md +1 -1
- data/docs/agent/skills/readme-driven-dev.md +1 -0
- data/docs/agent/skills/release-history.md +1 -7
- data/docs/agent/skills/ruby.md +18 -7
- data/docs/agent/skills/schemagraphy-sgyml.md +3 -0
- data/docs/agent/skills/tests-running.md +22 -14
- data/docs/agent/skills/tests-writing.md +51 -28
- data/docs/agent/skills/write-the-docs.md +71 -9
- data/docs/agent/topics/common-project-paths.md +122 -70
- data/docs/agent/topics/dev-tooling-usage.md +70 -77
- data/docs/agent/topics/devops-ci-cd.md +3 -1
- data/docs/agent/topics/product-docs-deployment.md +18 -12
- data/docs/library-readme.adoc +39 -0
- data/lib/docopslab/dev/cast_ops.rb +199 -0
- data/lib/docopslab/dev/config_manager.rb +6 -6
- data/lib/docopslab/dev/data_utils.rb +42 -0
- data/lib/docopslab/dev/file_utils.rb +18 -7
- data/lib/docopslab/dev/git_branch.rb +201 -0
- data/lib/docopslab/dev/git_hooks.rb +17 -11
- data/lib/docopslab/dev/initializer.rb +13 -4
- data/lib/docopslab/dev/library/cache.rb +167 -0
- data/lib/docopslab/dev/library/fetch.rb +209 -0
- data/lib/docopslab/dev/library.rb +328 -0
- data/lib/docopslab/dev/linters.rb +63 -12
- data/lib/docopslab/dev/manifest.rb +28 -0
- data/lib/docopslab/dev/paths.rb +0 -17
- data/lib/docopslab/dev/script_manager.rb +12 -6
- data/lib/docopslab/dev/skim.rb +109 -0
- data/lib/docopslab/dev/spell_check.rb +2 -2
- data/lib/docopslab/dev/sync_ops.rb +94 -33
- data/lib/docopslab/dev/tasks.rb +58 -18
- data/lib/docopslab/dev/version.rb +1 -1
- data/lib/docopslab/dev.rb +75 -35
- data/specs/data/default-manifest.yml +15 -5
- data/specs/data/library-index.yml +22 -0
- data/specs/data/manifest-schema.yaml +142 -4
- data/specs/data/tasks-def.yml +122 -10
- metadata +28 -39
- data/assets/config-packs/actionlint/base.yml +0 -13
- data/assets/config-packs/actionlint/project.yml +0 -13
- data/assets/config-packs/htmlproofer/base.yml +0 -27
- data/assets/config-packs/htmlproofer/project.yml +0 -25
- data/assets/config-packs/rubocop/base.yml +0 -130
- data/assets/config-packs/rubocop/project.yml +0 -8
- data/assets/config-packs/shellcheck/base.shellcheckrc +0 -14
- data/assets/config-packs/subtxt/ai-asciidoc-antipatterns.sub.txt +0 -11
- data/assets/config-packs/vale/asciidoc/ExplicitSectionIDs.yml +0 -8
- data/assets/config-packs/vale/asciidoc/ExtraLineBeforeLevel1.yml +0 -7
- data/assets/config-packs/vale/asciidoc/OneSentencePerLine.yml +0 -8
- data/assets/config-packs/vale/asciidoc/PreferSourceBlocks.yml +0 -8
- data/assets/config-packs/vale/asciidoc/ProperAdmonitions.yml +0 -8
- data/assets/config-packs/vale/asciidoc/ProperDLs.yml +0 -7
- data/assets/config-packs/vale/asciidoc/UncleanListStart.yml +0 -8
- data/assets/config-packs/vale/authoring/ButParagraph.yml +0 -8
- data/assets/config-packs/vale/authoring/ExNotEg.yml +0 -8
- data/assets/config-packs/vale/authoring/LiteralTerms.yml +0 -20
- data/assets/config-packs/vale/authoring/Spelling.yml +0 -679
- data/assets/config-packs/vale/base.ini +0 -38
- data/assets/config-packs/vale/config/scripts/ExplicitSectionIDs.tengo +0 -56
- data/assets/config-packs/vale/config/scripts/ExtraLineBeforeLevel1.tengo +0 -121
- data/assets/config-packs/vale/config/scripts/OneSentencePerLine.tengo +0 -53
- data/assets/config-packs/vale/project.ini +0 -5
- data/assets/hooks/pre-commit +0 -63
- data/assets/hooks/pre-push +0 -72
- data/assets/scripts/adoc_section_ids.rb +0 -50
- data/assets/scripts/build-common.sh +0 -193
- data/assets/scripts/build-docker.sh +0 -64
- data/assets/scripts/build.sh +0 -56
- data/assets/scripts/parse_jekyll_asciidoc_logs.rb +0 -467
- data/assets/templates/Gemfile +0 -7
- data/assets/templates/Rakefile +0 -3
- data/assets/templates/gitignore +0 -69
- data/assets/templates/jekyll-asciidoc-fix.prompt.yml +0 -17
- data/assets/templates/spellcheck.prompt.yml +0 -16
- data/docs/agent/AGENTS.md +0 -229
data/lib/docopslab/dev/tasks.rb
CHANGED
|
@@ -54,11 +54,6 @@ module DocOpsLab
|
|
|
54
54
|
Dev.check_standard_rake_tasks
|
|
55
55
|
end
|
|
56
56
|
|
|
57
|
-
desc desc_for('check:updates')
|
|
58
|
-
task :updates do
|
|
59
|
-
Dev.check_hook_updates
|
|
60
|
-
end
|
|
61
|
-
|
|
62
57
|
desc desc_for('check:all')
|
|
63
58
|
task :all do
|
|
64
59
|
Rake::Task['labdev:check:env'].invoke
|
|
@@ -89,6 +84,11 @@ module DocOpsLab
|
|
|
89
84
|
puts '⚠️ Agent docs sync skipped or failed'
|
|
90
85
|
end
|
|
91
86
|
end
|
|
87
|
+
|
|
88
|
+
desc desc_for('init:templates')
|
|
89
|
+
task :templates do
|
|
90
|
+
CastOps.init_cast_targets(Dev)
|
|
91
|
+
end
|
|
92
92
|
end
|
|
93
93
|
|
|
94
94
|
# ============================================================
|
|
@@ -135,9 +135,10 @@ module DocOpsLab
|
|
|
135
135
|
# end
|
|
136
136
|
|
|
137
137
|
desc desc_for('run:shellcheck')
|
|
138
|
-
task :shellcheck, [
|
|
138
|
+
task :shellcheck, %i[path opts] => [] do |_t, args|
|
|
139
|
+
path = args[:path]
|
|
139
140
|
opts = args[:opts] || ''
|
|
140
|
-
Dev.run_shellcheck(
|
|
141
|
+
Dev.run_shellcheck(path, opts)
|
|
141
142
|
end
|
|
142
143
|
|
|
143
144
|
desc desc_for('run:actionlint')
|
|
@@ -167,6 +168,13 @@ module DocOpsLab
|
|
|
167
168
|
Dev.sync_docs(force: true)
|
|
168
169
|
end
|
|
169
170
|
|
|
171
|
+
desc desc_for('sync:templates')
|
|
172
|
+
task :templates, %i[path dry] => [] do |_t, args|
|
|
173
|
+
target = args[:path]
|
|
174
|
+
dry = args[:dry].to_s.downcase == 'dry'
|
|
175
|
+
CastOps.sync_cast_targets(Dev, target_filter: target, dry_run: dry)
|
|
176
|
+
end
|
|
177
|
+
|
|
170
178
|
namespace :styles do
|
|
171
179
|
desc desc_for('sync:styles:local')
|
|
172
180
|
task :local do
|
|
@@ -210,11 +218,22 @@ module DocOpsLab
|
|
|
210
218
|
|
|
211
219
|
desc desc_for('sync:all')
|
|
212
220
|
task :all do
|
|
213
|
-
|
|
214
|
-
Dev.sync_scripts
|
|
215
|
-
Dev.sync_docs
|
|
221
|
+
Library.sync!
|
|
216
222
|
Dev.install_missing_hooks
|
|
217
223
|
Dev.sync_vale_styles
|
|
224
|
+
CastOps.sync_cast_targets(Dev)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
desc desc_for('sync:library')
|
|
228
|
+
task :library do
|
|
229
|
+
Library.sync!
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
namespace :library do
|
|
233
|
+
desc desc_for('sync:library:stage')
|
|
234
|
+
task :stage, [:path] => [] do |_t, args|
|
|
235
|
+
Library.stage!(source_path: args[:path])
|
|
236
|
+
end
|
|
218
237
|
end
|
|
219
238
|
end
|
|
220
239
|
|
|
@@ -262,17 +281,12 @@ module DocOpsLab
|
|
|
262
281
|
|
|
263
282
|
desc desc_for('lint:docs')
|
|
264
283
|
task :docs, %i[path rule opts] => [] do |_t, args|
|
|
265
|
-
path = args[:path]
|
|
284
|
+
path = args[:path] || '.'
|
|
266
285
|
rule = args[:rule]
|
|
267
286
|
opts = args[:opts]
|
|
268
287
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
target = path || nil
|
|
272
|
-
Dev.run_vale(target, opts || '', filter: filter)
|
|
273
|
-
else
|
|
274
|
-
Dev.run_linter_group('AsciiDoc', %w[vale])
|
|
275
|
-
end
|
|
288
|
+
filter = rule ? ".Name==#{rule}" : nil
|
|
289
|
+
Dev.run_vale(path, opts || '', filter: filter)
|
|
276
290
|
end
|
|
277
291
|
|
|
278
292
|
desc desc_for('lint:html')
|
|
@@ -398,6 +412,27 @@ module DocOpsLab
|
|
|
398
412
|
Help.show_task_help('heal')
|
|
399
413
|
end
|
|
400
414
|
|
|
415
|
+
# ============================================================
|
|
416
|
+
# SKIM tasks; Skim source files for machine-oriented outlines
|
|
417
|
+
# ============================================================
|
|
418
|
+
|
|
419
|
+
desc desc_for('skim')
|
|
420
|
+
task :skim, %i[path form syntax] => [] do |_t, args|
|
|
421
|
+
Skim.run(args[:path], form: args[:form], syntax: args[:syntax])
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
namespace :skim do
|
|
425
|
+
desc desc_for('skim:adoc')
|
|
426
|
+
task :adoc, %i[path form syntax] => [] do |_t, args|
|
|
427
|
+
Skim.run_adoc(args[:path], form: args[:form], syntax: args[:syntax])
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
desc desc_for('skim:md')
|
|
431
|
+
task :md, %i[path form syntax] => [] do |_t, args|
|
|
432
|
+
Skim.run_md(args[:path], form: args[:form], syntax: args[:syntax])
|
|
433
|
+
end
|
|
434
|
+
end
|
|
435
|
+
|
|
401
436
|
# ============================================================
|
|
402
437
|
# SHOW and HELP tasks; Display information
|
|
403
438
|
# ============================================================
|
|
@@ -427,6 +462,11 @@ module DocOpsLab
|
|
|
427
462
|
|
|
428
463
|
Dev.show_lint_rule(tool, rule)
|
|
429
464
|
end
|
|
465
|
+
|
|
466
|
+
desc desc_for('show:library')
|
|
467
|
+
task :library do
|
|
468
|
+
Library.print_status
|
|
469
|
+
end
|
|
430
470
|
end
|
|
431
471
|
|
|
432
472
|
desc desc_for('help')
|
data/lib/docopslab/dev.rb
CHANGED
|
@@ -8,16 +8,22 @@ require 'pathname'
|
|
|
8
8
|
require 'shellwords'
|
|
9
9
|
require_relative 'dev/version' # includes RUBY_TARGET
|
|
10
10
|
require_relative 'dev/paths'
|
|
11
|
+
require_relative 'dev/manifest'
|
|
11
12
|
require_relative 'dev/spell_check'
|
|
12
13
|
require_relative 'dev/log_parser'
|
|
14
|
+
require_relative 'dev/skim'
|
|
13
15
|
require_relative 'dev/tasks'
|
|
14
16
|
require_relative 'dev/git_hooks'
|
|
15
17
|
require_relative 'dev/tool_execution'
|
|
18
|
+
require_relative 'dev/git_branch'
|
|
16
19
|
require_relative 'dev/linters'
|
|
17
20
|
require_relative 'dev/config_manager'
|
|
18
21
|
require_relative 'dev/file_utils'
|
|
19
22
|
require_relative 'dev/script_manager'
|
|
23
|
+
require_relative 'dev/library'
|
|
20
24
|
require_relative 'dev/sync_ops'
|
|
25
|
+
require_relative 'dev/data_utils'
|
|
26
|
+
require_relative 'dev/cast_ops'
|
|
21
27
|
require_relative 'dev/checkers'
|
|
22
28
|
require_relative 'dev/initializer'
|
|
23
29
|
require_relative 'dev/auto_fix_asciidoc'
|
|
@@ -37,45 +43,74 @@ module DocOpsLab
|
|
|
37
43
|
end
|
|
38
44
|
end
|
|
39
45
|
|
|
40
|
-
# Path constants
|
|
41
|
-
# Project paths (local/runtime)
|
|
46
|
+
# Path constants (Backwards compatibility)
|
|
42
47
|
MANIFEST_PATH = '.config/docopslab-dev.yml'
|
|
43
|
-
|
|
44
|
-
HOOKS_DIR = '.git/hooks'
|
|
45
|
-
|
|
46
|
-
# Runtime/generated config files (merged from base + local)
|
|
47
|
-
CONFIG_PATHS = Paths::CONFIG_FILES
|
|
48
|
-
|
|
49
|
-
# Shorthand for rubocop (most commonly referenced)
|
|
50
|
-
RUBOCOP_CONFIG_PATH = CONFIG_PATHS[:rubocop]
|
|
51
|
-
|
|
52
|
-
# Gem source paths (assets bundled with gem)
|
|
53
|
-
MANIFEST_DEF_PATH = File.join(GEM_ROOT, 'specs', 'data', 'default-manifest.yml')
|
|
54
|
-
TOOLS_DEF_PATH = File.join(GEM_ROOT, 'specs', 'data', 'tools.yml')
|
|
55
|
-
CONFIG_PACKS_SOURCE_DIR = Paths.gem_config_packs
|
|
56
|
-
SCRIPTS_SOURCE_DIR = Paths.gem_scripts
|
|
57
|
-
HOOKS_SOURCE_DIR = Paths.gem_hooks
|
|
58
|
-
TEMPLATES_DIR = File.join(GEM_ROOT, 'assets', 'templates')
|
|
59
|
-
GITIGNORE_STUB_SOURCE_PATH = File.join(TEMPLATES_DIR, 'gitignore')
|
|
60
|
-
GEMFILE_STUB_SOURCE_PATH = File.join(TEMPLATES_DIR, 'Gemfile')
|
|
61
|
-
RAKEFILE_STUB_SOURCE_PATH = File.join(TEMPLATES_DIR, 'Rakefile')
|
|
62
|
-
|
|
63
|
-
# Cached data
|
|
64
|
-
@manifest = nil
|
|
65
|
-
@tools_data = nil
|
|
48
|
+
XDG_CACHE_SUBPATH = 'docopslab/dev/library'
|
|
66
49
|
|
|
67
50
|
class << self
|
|
68
51
|
attr_accessor :manifest, :tools_data
|
|
52
|
+
attr_writer :manifest_path, :xdg_cache_subpath
|
|
69
53
|
|
|
70
|
-
|
|
54
|
+
def manifest_path
|
|
55
|
+
@manifest_path || MANIFEST_PATH
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def xdg_cache_subpath
|
|
59
|
+
@xdg_cache_subpath || XDG_CACHE_SUBPATH
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Upstream library defaults
|
|
63
|
+
def default_library_repo
|
|
64
|
+
'DocOps/lab'
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def default_library_branch
|
|
68
|
+
'labdev-library'
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Project paths (local/runtime)
|
|
72
|
+
def config_vendor_dir
|
|
73
|
+
Paths.config_vendor_dir
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def hooks_dir
|
|
77
|
+
'.git/hooks'
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Runtime/generated config files (merged from base + local)
|
|
81
|
+
def config_paths
|
|
82
|
+
Paths::CONFIG_FILES
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Shorthand for rubocop (most commonly referenced)
|
|
86
|
+
def rubocop_config_path
|
|
87
|
+
config_paths[:rubocop]
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Gem data paths (bundled with gem in specs/data/)
|
|
91
|
+
def manifest_def_path
|
|
92
|
+
File.join(GEM_ROOT, 'specs', 'data', 'default-manifest.yml')
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
def tools_def_path
|
|
96
|
+
File.join(GEM_ROOT, 'specs', 'data', 'tools.yml')
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Asset paths are resolved at runtime from the remote library cache.
|
|
100
|
+
# Use Library.resolve('config-packs/...'), Library.resolve('templates/...') etc.
|
|
101
|
+
def library_path subpath=nil
|
|
102
|
+
return Library::Cache.current_path unless subpath
|
|
103
|
+
|
|
104
|
+
File.join(Library::Cache.current_path, subpath)
|
|
105
|
+
end
|
|
71
106
|
|
|
72
107
|
def load_manifest force_reload: false
|
|
73
108
|
return @manifest if @manifest && !force_reload
|
|
74
109
|
|
|
75
|
-
@manifest = YAML.load_file(
|
|
110
|
+
@manifest = YAML.load_file(manifest_path) if File.exist?(manifest_path)
|
|
76
111
|
@manifest
|
|
77
112
|
rescue StandardError => e
|
|
78
|
-
warn "Failed to load manifest: #{e.message}"
|
|
113
|
+
warn "Failed to load manifest at #{manifest_path}: #{e.message}"
|
|
79
114
|
nil
|
|
80
115
|
end
|
|
81
116
|
|
|
@@ -83,8 +118,8 @@ module DocOpsLab
|
|
|
83
118
|
return @tools_data if @tools_data
|
|
84
119
|
|
|
85
120
|
@tools_data = begin
|
|
86
|
-
if File.exist?(
|
|
87
|
-
YAML.load_file(
|
|
121
|
+
if File.exist?(tools_def_path)
|
|
122
|
+
YAML.load_file(tools_def_path)
|
|
88
123
|
else
|
|
89
124
|
[]
|
|
90
125
|
end
|
|
@@ -205,6 +240,10 @@ module DocOpsLab
|
|
|
205
240
|
SyncOps.sync_docs(self, force: force)
|
|
206
241
|
end
|
|
207
242
|
|
|
243
|
+
def sync_templates force: false
|
|
244
|
+
SyncOps.sync_templates(self, force: force)
|
|
245
|
+
end
|
|
246
|
+
|
|
208
247
|
# Checkers & Finders
|
|
209
248
|
|
|
210
249
|
def tool_available? tool_name
|
|
@@ -317,8 +356,9 @@ module DocOpsLab
|
|
|
317
356
|
end
|
|
318
357
|
|
|
319
358
|
def run_vale file_path=nil, opts_string='', output_format: :cli, filter: nil, style_override: nil
|
|
320
|
-
Linters.run_vale
|
|
321
|
-
|
|
359
|
+
Linters.run_vale(
|
|
360
|
+
self, file_path, opts_string,
|
|
361
|
+
output_format: output_format, filter: filter, style_override: style_override)
|
|
322
362
|
end
|
|
323
363
|
|
|
324
364
|
def lint_file file_path
|
|
@@ -357,12 +397,12 @@ style_override: style_override
|
|
|
357
397
|
puts "❌ Vale rule file not found: #{style_path}"
|
|
358
398
|
return
|
|
359
399
|
end
|
|
360
|
-
config = File.read(
|
|
400
|
+
config = File.read(Paths::CONFIG_FILES[:vale])
|
|
361
401
|
config.lines.each do |line|
|
|
362
402
|
next unless line.strip.start_with?("#{package}.#{rule_name} =")
|
|
363
403
|
|
|
364
404
|
rule_setting = line.strip.split('=', 2).last.strip
|
|
365
|
-
puts "⚙️ Rule setting from #{
|
|
405
|
+
puts "⚙️ Rule setting from #{Paths::CONFIG_FILES[:vale]}: '#{rule_setting}'"
|
|
366
406
|
break
|
|
367
407
|
end
|
|
368
408
|
unless File.exist?(style_path)
|
|
@@ -376,7 +416,7 @@ style_override: style_override
|
|
|
376
416
|
|
|
377
417
|
def print_cop rule
|
|
378
418
|
puts "📄 RuboCop cop documentation for: #{rule}"
|
|
379
|
-
cmd = "bundle exec rubocop --show-cops #{rule} --config #{
|
|
419
|
+
cmd = "bundle exec rubocop --show-cops #{rule} --config #{File.join(Paths.config_vendor_dir, 'rubocop.yml')}"
|
|
380
420
|
success = system(cmd)
|
|
381
421
|
puts '❌ Failed to retrieve RuboCop cop documentation' unless success
|
|
382
422
|
end
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
source:
|
|
2
2
|
repo: DocOps/lab
|
|
3
3
|
ref: v1
|
|
4
|
-
root: gems/docopslab-dev/assets/config-packs
|
|
5
|
-
|
|
6
4
|
docs:
|
|
7
|
-
- source: docs/agent/AGENTS.md
|
|
8
|
-
target: AGENTS.md
|
|
9
|
-
synced: false
|
|
10
5
|
- source: docs/agent/skills/*.md
|
|
11
6
|
target: .agent/docs/skills/
|
|
12
7
|
synced: true
|
|
@@ -17,6 +12,15 @@ docs:
|
|
|
17
12
|
target: .agent/docs/roles/
|
|
18
13
|
synced: true
|
|
19
14
|
|
|
15
|
+
templates:
|
|
16
|
+
manifest:
|
|
17
|
+
- source: templates/AGENTS.markdown
|
|
18
|
+
target: ./AGENTS.md
|
|
19
|
+
- source: templates/gitignore
|
|
20
|
+
target: .gitignore
|
|
21
|
+
- source: templates/README.asciidoc
|
|
22
|
+
target: README.adoc
|
|
23
|
+
|
|
20
24
|
tools:
|
|
21
25
|
- tool: rubocop
|
|
22
26
|
files:
|
|
@@ -62,3 +66,9 @@ tools:
|
|
|
62
66
|
- source: actionlint/project.yml
|
|
63
67
|
target: .config/actionlint.yml
|
|
64
68
|
synced: false
|
|
69
|
+
|
|
70
|
+
library:
|
|
71
|
+
enabled: true
|
|
72
|
+
source:
|
|
73
|
+
repo: DocOps/lab
|
|
74
|
+
ref: labdev-library
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
categories:
|
|
2
|
+
- dest: README.adoc
|
|
3
|
+
source: gems/docopslab-dev/docs/library-readme.adoc
|
|
4
|
+
|
|
5
|
+
- dest: config-packs
|
|
6
|
+
source: gems/docopslab-dev/assets/config-packs
|
|
7
|
+
|
|
8
|
+
- dest: hooks
|
|
9
|
+
source: gems/docopslab-dev/assets/hooks
|
|
10
|
+
|
|
11
|
+
- dest: scripts
|
|
12
|
+
source: gems/docopslab-dev/assets/scripts
|
|
13
|
+
|
|
14
|
+
- dest: templates
|
|
15
|
+
source: gems/docopslab-dev/assets/templates
|
|
16
|
+
|
|
17
|
+
- dest: docs/agent
|
|
18
|
+
source: gems/docopslab-dev/docs/agent
|
|
19
|
+
prebuild: gemdo:gen_agent_docs
|
|
20
|
+
|
|
21
|
+
- dest: templates/AGENTS.markdown
|
|
22
|
+
source: _docs/templates/AGENTS.markdown
|
|
@@ -5,7 +5,7 @@ $schema:
|
|
|
5
5
|
version: v1
|
|
6
6
|
properties:
|
|
7
7
|
_meta:
|
|
8
|
-
req: [source,tools]
|
|
8
|
+
req: [source,tools,docs,library,attributes,templates]
|
|
9
9
|
source:
|
|
10
10
|
type: Map
|
|
11
11
|
properties:
|
|
@@ -26,7 +26,7 @@ $schema:
|
|
|
26
26
|
default: config-packs
|
|
27
27
|
tools:
|
|
28
28
|
type: ArrayTable
|
|
29
|
-
desc:
|
|
29
|
+
desc: Registry of config targets to sync & tools to permit.
|
|
30
30
|
properties:
|
|
31
31
|
_meta:
|
|
32
32
|
req: [tool,files]
|
|
@@ -43,7 +43,7 @@ $schema:
|
|
|
43
43
|
default: false
|
|
44
44
|
files:
|
|
45
45
|
type: ArrayTable
|
|
46
|
-
desc:
|
|
46
|
+
desc: Manifest of upstream/local file pairs
|
|
47
47
|
properties:
|
|
48
48
|
_meta:
|
|
49
49
|
req: [upstream,local]
|
|
@@ -60,4 +60,142 @@ $schema:
|
|
|
60
60
|
enabled:
|
|
61
61
|
type: Boolean
|
|
62
62
|
desc: Whether this file mapping is active
|
|
63
|
-
default: true
|
|
63
|
+
default: true
|
|
64
|
+
paths:
|
|
65
|
+
desc: Additional path-based config for tools that support it
|
|
66
|
+
type: Map
|
|
67
|
+
properties:
|
|
68
|
+
lint:
|
|
69
|
+
type: ArrayList
|
|
70
|
+
desc: List of paths to include in linting (relative to project root)
|
|
71
|
+
skip:
|
|
72
|
+
type: ArrayList
|
|
73
|
+
desc: List of paths to exclude from linting (relative to project root)
|
|
74
|
+
exts:
|
|
75
|
+
type: ArrayList
|
|
76
|
+
desc: |
|
|
77
|
+
List of file extensions to include in linting (ex: ['adoc', 'md'])
|
|
78
|
+
docs:
|
|
79
|
+
type: ArrayTable
|
|
80
|
+
desc: Registry of documentation targets to sync.
|
|
81
|
+
properties:
|
|
82
|
+
_meta:
|
|
83
|
+
req: [source,target]
|
|
84
|
+
source:
|
|
85
|
+
type: Path
|
|
86
|
+
desc: Upstream path, relative to the library source path (usually `library/`) (supports globs)
|
|
87
|
+
target:
|
|
88
|
+
type: Path
|
|
89
|
+
desc: Local destination path within the project repo (directory if source is glob)
|
|
90
|
+
synced:
|
|
91
|
+
type: Boolean
|
|
92
|
+
desc: |
|
|
93
|
+
Whether to auto-sync this file from upstream.
|
|
94
|
+
WARNING: This overwrites local changes.
|
|
95
|
+
default: true
|
|
96
|
+
templates:
|
|
97
|
+
type: ArrayTable
|
|
98
|
+
desc: Registry of templates used to sync local file content.
|
|
99
|
+
properties:
|
|
100
|
+
_meta:
|
|
101
|
+
req: [source,target]
|
|
102
|
+
source:
|
|
103
|
+
type: Path
|
|
104
|
+
desc: Upstream path to a template file, relative to the library source path (usually `library/`).
|
|
105
|
+
docs: |
|
|
106
|
+
The base path for this value is established by the `library.source.path` property.
|
|
107
|
+
target:
|
|
108
|
+
type: Path
|
|
109
|
+
desc: |
|
|
110
|
+
Local destination path within the project repo, including filename and extension.
|
|
111
|
+
synced:
|
|
112
|
+
type: Boolean
|
|
113
|
+
desc: |
|
|
114
|
+
Whether to auto-sync this file from upstream.
|
|
115
|
+
If properly conigured, local modifications outside canonical blocks.
|
|
116
|
+
default: true
|
|
117
|
+
data:
|
|
118
|
+
type: Map
|
|
119
|
+
desc: Optional data to render the template with.
|
|
120
|
+
|
|
121
|
+
library:
|
|
122
|
+
type: Map
|
|
123
|
+
desc: |
|
|
124
|
+
Configuration for remote library fetch and host-wide cache.
|
|
125
|
+
This feature is for using an alternate library on a per-repo basis.
|
|
126
|
+
It can be used to cache and use non-standard libraries stored in a distinct path on the host.
|
|
127
|
+
properties:
|
|
128
|
+
_meta:
|
|
129
|
+
acc: [enabled,source,sync,catalog]
|
|
130
|
+
enabled:
|
|
131
|
+
type: Boolean
|
|
132
|
+
desc: Whether library sync operations are active.
|
|
133
|
+
default: true
|
|
134
|
+
source:
|
|
135
|
+
type: Map
|
|
136
|
+
desc: Remote source configuration for the library.
|
|
137
|
+
properties:
|
|
138
|
+
_meta:
|
|
139
|
+
req: [repo,ref]
|
|
140
|
+
type:
|
|
141
|
+
type: Slug
|
|
142
|
+
desc: Fetch strategy (git-branch | git-repo | http-archive)
|
|
143
|
+
default: git-branch
|
|
144
|
+
repo:
|
|
145
|
+
type: String
|
|
146
|
+
desc: |
|
|
147
|
+
Git repository to fetch library from, either on Git (`owner/name`) or a local path on host (value starting: `~` for relative to home, `.` for relevant to present directory, or `/` for asbolute paths).
|
|
148
|
+
default: DocOps/lab
|
|
149
|
+
ref:
|
|
150
|
+
type: String
|
|
151
|
+
desc: Branch or tag to fetch from.
|
|
152
|
+
default: labdev-library
|
|
153
|
+
path:
|
|
154
|
+
type: Path
|
|
155
|
+
desc: Path within the repository to the library root. Defaults to the branch root if omitted.
|
|
156
|
+
sync:
|
|
157
|
+
type: Map
|
|
158
|
+
desc: Caching and sync behaviour.
|
|
159
|
+
properties:
|
|
160
|
+
_meta:
|
|
161
|
+
req: []
|
|
162
|
+
mode:
|
|
163
|
+
type: Slug
|
|
164
|
+
desc: Fetch mode. Currently only latest-only is supported.
|
|
165
|
+
default: latest-only
|
|
166
|
+
cache_root:
|
|
167
|
+
type: Path
|
|
168
|
+
desc: |
|
|
169
|
+
Override the XDG-derived cache root for the library snapshot.
|
|
170
|
+
Defaults the the host's `$XDG_CACHE_HOME/docopslab/dev/library` (usually `~/.cache/docopslab/dev/library`).
|
|
171
|
+
|
|
172
|
+
local_path:
|
|
173
|
+
type: Path
|
|
174
|
+
desc: |
|
|
175
|
+
Local directory pointing to the active library snapshot (e.g. `library/current`).
|
|
176
|
+
When set and the catalog is present, this acts as the primary cache source and
|
|
177
|
+
the remote SHA check is skipped entirely; intended for the library maintainer's
|
|
178
|
+
own repo (monorepo use). Its parent directory is used as the effective cache root.
|
|
179
|
+
Downstream consumer projects omit this and rely on the XDG cache or `sync.cache_root`.
|
|
180
|
+
catalog:
|
|
181
|
+
type: Map
|
|
182
|
+
desc: Optional asset-level overrides; replaces any external library index file.
|
|
183
|
+
properties:
|
|
184
|
+
_meta:
|
|
185
|
+
overrides:
|
|
186
|
+
type: ArrayTable
|
|
187
|
+
desc: Per-asset path override entries applied after cache resolution.
|
|
188
|
+
properties:
|
|
189
|
+
_meta:
|
|
190
|
+
req: [path]
|
|
191
|
+
path:
|
|
192
|
+
type: Path
|
|
193
|
+
desc: |
|
|
194
|
+
Relative path within the library (ex: templates/README.asciidoc).
|
|
195
|
+
category:
|
|
196
|
+
type: Slug
|
|
197
|
+
desc: Override the inferred category label for this asset.
|
|
198
|
+
exclude:
|
|
199
|
+
type: Boolean
|
|
200
|
+
desc: Exclude this path from resolution results.
|
|
201
|
+
default: false
|