aidevops 3.8.73 → 3.8.75
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.
- package/VERSION +1 -1
- package/aidevops.sh +215 -70
- package/package.json +1 -1
- package/setup-modules/schedulers.sh +40 -0
- package/setup.sh +5 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.8.
|
|
1
|
+
3.8.75
|
package/aidevops.sh
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# AI DevOps Framework CLI
|
|
6
6
|
# Usage: aidevops <command> [options]
|
|
7
7
|
#
|
|
8
|
-
# Version: 3.8.
|
|
8
|
+
# Version: 3.8.75
|
|
9
9
|
|
|
10
10
|
set -euo pipefail
|
|
11
11
|
|
|
@@ -291,6 +291,91 @@ _compute_repo_registration_defaults() {
|
|
|
291
291
|
return 0
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
+
# Infer the init_scope for a repo when not explicitly set.
|
|
295
|
+
# Priority: .aidevops.json > repos.json entry > context inference.
|
|
296
|
+
# Returns one of: minimal, standard, public
|
|
297
|
+
# Usage: _infer_init_scope <project_root>
|
|
298
|
+
_infer_init_scope() {
|
|
299
|
+
local project_root="$1"
|
|
300
|
+
|
|
301
|
+
# 1. Check .aidevops.json
|
|
302
|
+
if [[ -f "$project_root/.aidevops.json" ]]; then
|
|
303
|
+
local json_scope
|
|
304
|
+
json_scope=$(jq -r '.init_scope // empty' "$project_root/.aidevops.json" 2>/dev/null || echo "")
|
|
305
|
+
if [[ -n "$json_scope" ]]; then
|
|
306
|
+
echo "$json_scope"
|
|
307
|
+
return 0
|
|
308
|
+
fi
|
|
309
|
+
fi
|
|
310
|
+
|
|
311
|
+
# 2. Check repos.json entry
|
|
312
|
+
if command -v jq &>/dev/null && [[ -f "${REPOS_FILE:-$HOME/.config/aidevops/repos.json}" ]]; then
|
|
313
|
+
local repos_file="${REPOS_FILE:-$HOME/.config/aidevops/repos.json}"
|
|
314
|
+
local canonical_path
|
|
315
|
+
canonical_path=$(cd "$project_root" 2>/dev/null && pwd -P) || canonical_path="$project_root"
|
|
316
|
+
local repo_scope
|
|
317
|
+
repo_scope=$(jq -r --arg path "$canonical_path" \
|
|
318
|
+
'(.initialized_repos[] | select(.path == $path) | .init_scope) // empty' \
|
|
319
|
+
"$repos_file" 2>/dev/null || echo "")
|
|
320
|
+
if [[ -n "$repo_scope" ]]; then
|
|
321
|
+
echo "$repo_scope"
|
|
322
|
+
return 0
|
|
323
|
+
fi
|
|
324
|
+
fi
|
|
325
|
+
|
|
326
|
+
# 3. Context inference
|
|
327
|
+
# local_only or no remote → minimal
|
|
328
|
+
if ! git -C "$project_root" remote get-url origin &>/dev/null 2>&1; then
|
|
329
|
+
echo "minimal"
|
|
330
|
+
return 0
|
|
331
|
+
fi
|
|
332
|
+
|
|
333
|
+
# Check repos.json for local_only flag
|
|
334
|
+
if command -v jq &>/dev/null && [[ -f "${REPOS_FILE:-$HOME/.config/aidevops/repos.json}" ]]; then
|
|
335
|
+
local repos_file="${REPOS_FILE:-$HOME/.config/aidevops/repos.json}"
|
|
336
|
+
local canonical_path
|
|
337
|
+
canonical_path=$(cd "$project_root" 2>/dev/null && pwd -P) || canonical_path="$project_root"
|
|
338
|
+
local is_local
|
|
339
|
+
is_local=$(jq -r --arg path "$canonical_path" \
|
|
340
|
+
'(.initialized_repos[] | select(.path == $path) | .local_only) // false' \
|
|
341
|
+
"$repos_file" 2>/dev/null || echo "false")
|
|
342
|
+
if [[ "$is_local" == "true" ]]; then
|
|
343
|
+
echo "minimal"
|
|
344
|
+
return 0
|
|
345
|
+
fi
|
|
346
|
+
fi
|
|
347
|
+
|
|
348
|
+
# Default: standard (backward compatible)
|
|
349
|
+
echo "standard"
|
|
350
|
+
return 0
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
# Check whether a given scope level includes a feature tier.
|
|
354
|
+
# Scope hierarchy: minimal < standard < public
|
|
355
|
+
# Usage: _scope_includes <current_scope> <required_level>
|
|
356
|
+
# Returns 0 (true) if current_scope >= required_level, 1 (false) otherwise.
|
|
357
|
+
_scope_includes() {
|
|
358
|
+
local current="$1"
|
|
359
|
+
local required="$2"
|
|
360
|
+
|
|
361
|
+
# Map scope to numeric level
|
|
362
|
+
local current_level=0 required_level=0
|
|
363
|
+
case "$current" in
|
|
364
|
+
minimal) current_level=0 ;;
|
|
365
|
+
standard) current_level=1 ;;
|
|
366
|
+
public) current_level=2 ;;
|
|
367
|
+
*) current_level=1 ;; # unknown defaults to standard
|
|
368
|
+
esac
|
|
369
|
+
case "$required" in
|
|
370
|
+
minimal) required_level=0 ;;
|
|
371
|
+
standard) required_level=1 ;;
|
|
372
|
+
public) required_level=2 ;;
|
|
373
|
+
*) required_level=1 ;;
|
|
374
|
+
esac
|
|
375
|
+
|
|
376
|
+
[[ $current_level -ge $required_level ]]
|
|
377
|
+
}
|
|
378
|
+
|
|
294
379
|
# Resolve a worktree path to its canonical main-worktree path, if applicable.
|
|
295
380
|
# Usage: resolve_canonical_repo_path <path>
|
|
296
381
|
# Prints the canonical path to stdout. If the input is already the main
|
|
@@ -402,13 +487,18 @@ register_repo() {
|
|
|
402
487
|
local DEFAULT_PRIORITY=""
|
|
403
488
|
eval "$(_compute_repo_registration_defaults "$repo_path" "$slug" "$is_local_only" "$maintainer")"
|
|
404
489
|
|
|
490
|
+
# Infer default init_scope for new registrations
|
|
491
|
+
local default_init_scope
|
|
492
|
+
default_init_scope=$(_infer_init_scope "$repo_path")
|
|
493
|
+
|
|
405
494
|
# Check if repo already registered
|
|
406
495
|
if jq -e --arg path "$repo_path" '.initialized_repos[] | select(.path == $path)' "$REPOS_FILE" &>/dev/null; then
|
|
407
|
-
# Update existing entry, preserving pulse/priority/local_only/maintainer if already set
|
|
496
|
+
# Update existing entry, preserving pulse/priority/local_only/maintainer/init_scope if already set
|
|
408
497
|
local temp_file="${REPOS_FILE}.tmp"
|
|
409
498
|
jq --arg path "$repo_path" --arg version "$version" --arg features "$features" \
|
|
410
499
|
--arg slug "$slug" --argjson local_only "$is_local_only" --arg maintainer "$maintainer" \
|
|
411
500
|
--argjson pulse_default "$DEFAULT_PULSE" --arg priority_default "$DEFAULT_PRIORITY" \
|
|
501
|
+
--arg init_scope_default "$default_init_scope" \
|
|
412
502
|
'(.initialized_repos[] | select(.path == $path)) |= (
|
|
413
503
|
. + {path: $path, version: $version, features: ($features | split(",")), updated: (now | strftime("%Y-%m-%dT%H:%M:%SZ"))}
|
|
414
504
|
| if $slug != "" then .slug = $slug else . end
|
|
@@ -416,15 +506,16 @@ register_repo() {
|
|
|
416
506
|
| if .pulse == null then .pulse = (if $local_only then false else $pulse_default end) else . end
|
|
417
507
|
| if (.priority == null or .priority == "") and $priority_default != "" then .priority = $priority_default else . end
|
|
418
508
|
| if (.maintainer == null or .maintainer == "") and $maintainer != "" then .maintainer = $maintainer else . end
|
|
509
|
+
| if (.init_scope == null or .init_scope == "") then .init_scope = $init_scope_default else . end
|
|
419
510
|
)' \
|
|
420
511
|
"$REPOS_FILE" >"$temp_file" && mv "$temp_file" "$REPOS_FILE"
|
|
421
512
|
else
|
|
422
|
-
# Add new entry with slug, defaults, and
|
|
513
|
+
# Add new entry with slug, defaults, maintainer, and init_scope
|
|
423
514
|
local temp_file="${REPOS_FILE}.tmp"
|
|
424
515
|
jq --arg path "$repo_path" --arg version "$version" --arg features "$features" \
|
|
425
516
|
--arg slug "$slug" --arg maintainer "$maintainer" \
|
|
426
517
|
--argjson local_only "$is_local_only" --argjson pulse_default "$DEFAULT_PULSE" \
|
|
427
|
-
--arg priority_default "$DEFAULT_PRIORITY" \
|
|
518
|
+
--arg priority_default "$DEFAULT_PRIORITY" --arg init_scope "$default_init_scope" \
|
|
428
519
|
'.initialized_repos += [(
|
|
429
520
|
{
|
|
430
521
|
path: $path,
|
|
@@ -432,6 +523,7 @@ register_repo() {
|
|
|
432
523
|
version: $version,
|
|
433
524
|
features: ($features | split(",")),
|
|
434
525
|
pulse: $pulse_default,
|
|
526
|
+
init_scope: $init_scope,
|
|
435
527
|
initialized: (now | strftime("%Y-%m-%dT%H:%M:%SZ"))
|
|
436
528
|
}
|
|
437
529
|
| if $slug != "" then . + {slug: $slug} else . end
|
|
@@ -1269,6 +1361,7 @@ COCEOF
|
|
|
1269
1361
|
# Creates: README.md, LICENCE, CHANGELOG.md, CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md
|
|
1270
1362
|
scaffold_repo_courtesy_files() {
|
|
1271
1363
|
local project_root="$1"
|
|
1364
|
+
local scope="${2:-standard}" # Default to standard for backward compatibility
|
|
1272
1365
|
local created=0
|
|
1273
1366
|
local repo_name
|
|
1274
1367
|
repo_name=$(basename "$project_root")
|
|
@@ -1276,21 +1369,28 @@ scaffold_repo_courtesy_files() {
|
|
|
1276
1369
|
author_name=$(git -C "$project_root" config user.name 2>/dev/null || echo "")
|
|
1277
1370
|
local current_year
|
|
1278
1371
|
current_year=$(date +%Y)
|
|
1279
|
-
print_info "Checking repo courtesy files..."
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
[[ -
|
|
1372
|
+
print_info "Checking repo courtesy files (scope: $scope)..."
|
|
1373
|
+
|
|
1374
|
+
# README.md: requires "standard" scope
|
|
1375
|
+
if _scope_includes "$scope" "standard"; then
|
|
1376
|
+
if [[ ! -f "$project_root/README.md" ]]; then
|
|
1377
|
+
local rc="# $repo_name"
|
|
1378
|
+
if [[ -f "$project_root/.aidevops.json" ]]; then
|
|
1379
|
+
local desc
|
|
1380
|
+
desc=$(jq -r '.description // empty' "$project_root/.aidevops.json" 2>/dev/null || echo "")
|
|
1381
|
+
[[ -n "$desc" ]] && rc="$rc"$'\n\n'"$desc"
|
|
1382
|
+
fi
|
|
1383
|
+
{ [[ -f "$project_root/LICENCE" ]] || [[ -f "$project_root/LICENSE" ]]; } && rc="$rc"$'\n\n'"## Licence"$'\n\n'"See [LICENCE](LICENCE) for details."
|
|
1384
|
+
printf '%s\n' "$rc" >"$project_root/README.md"
|
|
1385
|
+
((++created))
|
|
1286
1386
|
fi
|
|
1287
|
-
{ [[ -f "$project_root/LICENCE" ]] || [[ -f "$project_root/LICENSE" ]]; } && rc="$rc"$'\n\n'"## Licence"$'\n\n'"See [LICENCE](LICENCE) for details."
|
|
1288
|
-
printf '%s\n' "$rc" >"$project_root/README.md"
|
|
1289
|
-
((++created))
|
|
1290
1387
|
fi
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1388
|
+
|
|
1389
|
+
# LICENCE: requires "public" scope
|
|
1390
|
+
if _scope_includes "$scope" "public"; then
|
|
1391
|
+
if [[ ! -f "$project_root/LICENCE" ]] && [[ ! -f "$project_root/LICENSE" ]]; then
|
|
1392
|
+
local lh="${author_name:-$(whoami)}"
|
|
1393
|
+
cat >"$project_root/LICENCE" <<LICEOF
|
|
1294
1394
|
MIT License
|
|
1295
1395
|
|
|
1296
1396
|
Copyright (c) $current_year $lh
|
|
@@ -1313,10 +1413,14 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
1313
1413
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1314
1414
|
SOFTWARE.
|
|
1315
1415
|
LICEOF
|
|
1316
|
-
|
|
1416
|
+
((++created))
|
|
1417
|
+
fi
|
|
1317
1418
|
fi
|
|
1318
|
-
|
|
1319
|
-
|
|
1419
|
+
|
|
1420
|
+
# CHANGELOG.md: requires "public" scope
|
|
1421
|
+
if _scope_includes "$scope" "public"; then
|
|
1422
|
+
if [[ ! -f "$project_root/CHANGELOG.md" ]]; then
|
|
1423
|
+
cat >"$project_root/CHANGELOG.md" <<'CHEOF'
|
|
1320
1424
|
# Changelog
|
|
1321
1425
|
|
|
1322
1426
|
All notable changes to this project will be documented in this file.
|
|
@@ -1326,11 +1430,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1326
1430
|
|
|
1327
1431
|
## [Unreleased]
|
|
1328
1432
|
CHEOF
|
|
1329
|
-
|
|
1433
|
+
((++created))
|
|
1434
|
+
fi
|
|
1435
|
+
fi
|
|
1436
|
+
|
|
1437
|
+
# CONTRIBUTING.md, SECURITY.md, CODE_OF_CONDUCT.md: require "public" scope
|
|
1438
|
+
if _scope_includes "$scope" "public"; then
|
|
1439
|
+
_scaffold_contributing "$project_root" "$repo_name" && ((++created))
|
|
1440
|
+
_scaffold_security "$project_root" && ((++created))
|
|
1441
|
+
_scaffold_coc "$project_root" && ((++created))
|
|
1330
1442
|
fi
|
|
1331
|
-
|
|
1332
|
-
_scaffold_security "$project_root" && ((++created))
|
|
1333
|
-
_scaffold_coc "$project_root" && ((++created))
|
|
1443
|
+
|
|
1334
1444
|
[[ $created -gt 0 ]] && print_success "Created $created repo courtesy file(s) (README, LICENCE, CHANGELOG, etc.)" || print_info "Repo courtesy files already exist"
|
|
1335
1445
|
return 0
|
|
1336
1446
|
}
|
|
@@ -1671,6 +1781,75 @@ _init_scaffold_commands_symlinks() {
|
|
|
1671
1781
|
return 0
|
|
1672
1782
|
}
|
|
1673
1783
|
|
|
1784
|
+
# Scaffold optional files gated by init_scope (t2265).
|
|
1785
|
+
# Extracted from cmd_init to reduce nesting depth and function length.
|
|
1786
|
+
# Usage: _init_scaffold_scope_gated_files <project_root> <init_scope> <repo_name>
|
|
1787
|
+
_init_scaffold_scope_gated_files() {
|
|
1788
|
+
local project_root="$1"
|
|
1789
|
+
local init_scope="$2"
|
|
1790
|
+
local repo_name="$3"
|
|
1791
|
+
|
|
1792
|
+
# Collaborator pointer files — require standard scope
|
|
1793
|
+
if _scope_includes "$init_scope" "standard"; then
|
|
1794
|
+
local pointer_content="Read AGENTS.md for all project context and instructions."
|
|
1795
|
+
local pointer_files=(".cursorrules" ".windsurfrules" ".clinerules" ".github/copilot-instructions.md")
|
|
1796
|
+
local pointer_created=0
|
|
1797
|
+
local pf
|
|
1798
|
+
for pf in "${pointer_files[@]}"; do
|
|
1799
|
+
local pf_path="$project_root/$pf"
|
|
1800
|
+
if [[ ! -f "$pf_path" ]]; then
|
|
1801
|
+
mkdir -p "$(dirname "$pf_path")"
|
|
1802
|
+
echo "$pointer_content" >"$pf_path"
|
|
1803
|
+
((++pointer_created))
|
|
1804
|
+
fi
|
|
1805
|
+
done
|
|
1806
|
+
if [[ $pointer_created -gt 0 ]]; then
|
|
1807
|
+
print_success "Created $pointer_created collaborator pointer file(s) (.cursorrules, etc.)"
|
|
1808
|
+
else
|
|
1809
|
+
print_info "Collaborator pointer files already exist"
|
|
1810
|
+
fi
|
|
1811
|
+
else
|
|
1812
|
+
print_info "Collaborator pointer files skipped (init_scope: $init_scope)"
|
|
1813
|
+
fi
|
|
1814
|
+
|
|
1815
|
+
# DESIGN.md — requires standard scope
|
|
1816
|
+
if _scope_includes "$init_scope" "standard"; then
|
|
1817
|
+
if [[ ! -f "$project_root/DESIGN.md" ]]; then
|
|
1818
|
+
local design_template="$AGENTS_DIR/templates/DESIGN.md.template"
|
|
1819
|
+
if [[ -f "$design_template" ]]; then
|
|
1820
|
+
sed "s/{Project Name}/$repo_name/g" "$design_template" >"$project_root/DESIGN.md"
|
|
1821
|
+
print_success "Created DESIGN.md (design system skeleton — populate with tools/design/design-md.md)"
|
|
1822
|
+
fi
|
|
1823
|
+
else
|
|
1824
|
+
print_info "DESIGN.md already exists, skipping"
|
|
1825
|
+
fi
|
|
1826
|
+
else
|
|
1827
|
+
print_info "DESIGN.md skipped (init_scope: $init_scope)"
|
|
1828
|
+
fi
|
|
1829
|
+
|
|
1830
|
+
# Courtesy files (README, LICENCE, CHANGELOG, etc.) — scope handled internally
|
|
1831
|
+
scaffold_repo_courtesy_files "$project_root" "$init_scope"
|
|
1832
|
+
|
|
1833
|
+
# MODELS.md — requires standard scope
|
|
1834
|
+
if _scope_includes "$init_scope" "standard"; then
|
|
1835
|
+
local generate_models_script="$AGENTS_DIR/scripts/generate-models-md.sh"
|
|
1836
|
+
if [[ -x "$generate_models_script" ]] && command -v sqlite3 &>/dev/null; then
|
|
1837
|
+
print_info "Generating MODELS.md (model performance leaderboard)..."
|
|
1838
|
+
if "$generate_models_script" --output "$project_root/MODELS.md" --repo-path "$project_root" --quiet 2>/dev/null; then
|
|
1839
|
+
print_success "Created MODELS.md (per-repo model leaderboard)"
|
|
1840
|
+
else
|
|
1841
|
+
print_warning "MODELS.md generation failed (will be populated as tasks run)"
|
|
1842
|
+
fi
|
|
1843
|
+
else
|
|
1844
|
+
print_info "MODELS.md skipped (sqlite3 or generate script not available)"
|
|
1845
|
+
fi
|
|
1846
|
+
else
|
|
1847
|
+
print_info "MODELS.md skipped (init_scope: $init_scope)"
|
|
1848
|
+
fi
|
|
1849
|
+
|
|
1850
|
+
return 0
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1674
1853
|
# Init command - initialize aidevops in a project
|
|
1675
1854
|
cmd_init() {
|
|
1676
1855
|
local features="${1:-all}"
|
|
@@ -1711,6 +1890,12 @@ cmd_init() {
|
|
|
1711
1890
|
esac
|
|
1712
1891
|
done
|
|
1713
1892
|
|
|
1893
|
+
# Determine init_scope: minimal | standard | public
|
|
1894
|
+
# Infer from context when not set; user can override via repos.json or .aidevops.json
|
|
1895
|
+
local init_scope
|
|
1896
|
+
init_scope=$(_infer_init_scope "$project_root")
|
|
1897
|
+
print_info "Init scope: $init_scope (controls which scaffolding files are created)"
|
|
1898
|
+
|
|
1714
1899
|
# Create .aidevops.json config
|
|
1715
1900
|
local config_file="$project_root/.aidevops.json"
|
|
1716
1901
|
local aidevops_version
|
|
@@ -1721,6 +1906,7 @@ cmd_init() {
|
|
|
1721
1906
|
{
|
|
1722
1907
|
"version": "$aidevops_version",
|
|
1723
1908
|
"initialized": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
1909
|
+
"init_scope": "$init_scope",
|
|
1724
1910
|
"features": {
|
|
1725
1911
|
"planning": $enable_planning,
|
|
1726
1912
|
"git_workflow": $enable_git_workflow,
|
|
@@ -2196,51 +2382,10 @@ GITATTRSEOF
|
|
|
2196
2382
|
fi
|
|
2197
2383
|
fi
|
|
2198
2384
|
|
|
2199
|
-
#
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
for pf in "${pointer_files[@]}"; do
|
|
2204
|
-
local pf_path="$project_root/$pf"
|
|
2205
|
-
if [[ ! -f "$pf_path" ]]; then
|
|
2206
|
-
mkdir -p "$(dirname "$pf_path")"
|
|
2207
|
-
echo "$pointer_content" >"$pf_path"
|
|
2208
|
-
((++pointer_created))
|
|
2209
|
-
fi
|
|
2210
|
-
done
|
|
2211
|
-
if [[ $pointer_created -gt 0 ]]; then
|
|
2212
|
-
print_success "Created $pointer_created collaborator pointer file(s) (.cursorrules, etc.)"
|
|
2213
|
-
else
|
|
2214
|
-
print_info "Collaborator pointer files already exist"
|
|
2215
|
-
fi
|
|
2216
|
-
|
|
2217
|
-
# Seed DESIGN.md template (AI-readable design system skeleton)
|
|
2218
|
-
if [[ ! -f "$project_root/DESIGN.md" ]]; then
|
|
2219
|
-
local design_template="$AGENTS_DIR/templates/DESIGN.md.template"
|
|
2220
|
-
if [[ -f "$design_template" ]]; then
|
|
2221
|
-
# Replace {Project Name} with the repo name
|
|
2222
|
-
sed "s/{Project Name}/$repo_name/g" "$design_template" >"$project_root/DESIGN.md"
|
|
2223
|
-
print_success "Created DESIGN.md (design system skeleton — populate with tools/design/design-md.md)"
|
|
2224
|
-
fi
|
|
2225
|
-
else
|
|
2226
|
-
print_info "DESIGN.md already exists, skipping"
|
|
2227
|
-
fi
|
|
2228
|
-
|
|
2229
|
-
# Scaffold repo courtesy files (README, LICENCE, CHANGELOG, etc.)
|
|
2230
|
-
scaffold_repo_courtesy_files "$project_root"
|
|
2231
|
-
|
|
2232
|
-
# Generate MODELS.md (per-repo model performance leaderboard, t1129)
|
|
2233
|
-
local generate_models_script="$AGENTS_DIR/scripts/generate-models-md.sh"
|
|
2234
|
-
if [[ -x "$generate_models_script" ]] && command -v sqlite3 &>/dev/null; then
|
|
2235
|
-
print_info "Generating MODELS.md (model performance leaderboard)..."
|
|
2236
|
-
if "$generate_models_script" --output "$project_root/MODELS.md" --repo-path "$project_root" --quiet 2>/dev/null; then
|
|
2237
|
-
print_success "Created MODELS.md (per-repo model leaderboard)"
|
|
2238
|
-
else
|
|
2239
|
-
print_warning "MODELS.md generation failed (will be populated as tasks run)"
|
|
2240
|
-
fi
|
|
2241
|
-
else
|
|
2242
|
-
print_info "MODELS.md skipped (sqlite3 or generate script not available)"
|
|
2243
|
-
fi
|
|
2385
|
+
# Scaffold optional files gated by init_scope (collaborator pointers,
|
|
2386
|
+
# DESIGN.md, courtesy files, MODELS.md). Extracted to reduce cmd_init
|
|
2387
|
+
# nesting depth and function length (t2265).
|
|
2388
|
+
_init_scaffold_scope_gated_files "$project_root" "$init_scope" "$repo_name"
|
|
2244
2389
|
|
|
2245
2390
|
# Run security posture assessment if enabled (t1412.11)
|
|
2246
2391
|
if [[ "$enable_security" == "true" ]]; then
|
|
@@ -2325,7 +2470,7 @@ GITATTRSEOF
|
|
|
2325
2470
|
fi
|
|
2326
2471
|
|
|
2327
2472
|
echo ""
|
|
2328
|
-
print_success "AI DevOps initialized!"
|
|
2473
|
+
print_success "AI DevOps initialized! (scope: $init_scope)"
|
|
2329
2474
|
echo ""
|
|
2330
2475
|
echo "Enabled features:"
|
|
2331
2476
|
[[ "$enable_planning" == "true" ]] && echo " ✓ Planning (TODO.md, PLANS.md)"
|
package/package.json
CHANGED
|
@@ -1990,3 +1990,43 @@ setup_repo_sync() {
|
|
|
1990
1990
|
fi
|
|
1991
1991
|
return 0
|
|
1992
1992
|
}
|
|
1993
|
+
|
|
1994
|
+
# Setup r914 repo-aidevops-health scheduler if not already installed.
|
|
1995
|
+
# Daily drift keeper for repos.json: bumps stale .aidevops.json versions
|
|
1996
|
+
# and surfaces missing-folder / no-init drift for human triage.
|
|
1997
|
+
# Respects config: aidevops config set orchestration.repo_aidevops_health false
|
|
1998
|
+
setup_repo_aidevops_health() {
|
|
1999
|
+
local repo_health_script="$HOME/.aidevops/agents/scripts/repo-aidevops-health-helper.sh"
|
|
2000
|
+
if ! [[ -x "$repo_health_script" ]] || ! is_feature_enabled repo_aidevops_health 2>/dev/null; then
|
|
2001
|
+
return 0
|
|
2002
|
+
fi
|
|
2003
|
+
|
|
2004
|
+
local _repo_health_installed=false
|
|
2005
|
+
if _launchd_has_agent "sh.aidevops.repo-aidevops-health"; then
|
|
2006
|
+
_repo_health_installed=true
|
|
2007
|
+
elif crontab -l 2>/dev/null | grep -qF "aidevops-repo-aidevops-health"; then
|
|
2008
|
+
_repo_health_installed=true
|
|
2009
|
+
elif command -v systemctl >/dev/null 2>&1 &&
|
|
2010
|
+
systemctl --user is-enabled "aidevops-repo-aidevops-health.timer" >/dev/null 2>&1; then
|
|
2011
|
+
_repo_health_installed=true
|
|
2012
|
+
fi
|
|
2013
|
+
if [[ "$_repo_health_installed" == "false" ]]; then
|
|
2014
|
+
if [[ "$NON_INTERACTIVE" == "true" ]]; then
|
|
2015
|
+
bash "$repo_health_script" enable >/dev/null 2>&1 || true
|
|
2016
|
+
print_info "r914 repo-aidevops-health enabled (daily @03:30). Disable: aidevops repo-aidevops-health disable"
|
|
2017
|
+
else
|
|
2018
|
+
echo ""
|
|
2019
|
+
echo "r914 keeps \`.aidevops.json\` versions current across all registered"
|
|
2020
|
+
echo "repos and surfaces registry drift (missing folders, unregistered git"
|
|
2021
|
+
echo "repos) for human triage. Runs daily at 03:30."
|
|
2022
|
+
echo ""
|
|
2023
|
+
setup_prompt enable_repo_health "Enable daily r914 repo-aidevops-health? [Y/n]: " "Y"
|
|
2024
|
+
if [[ "$enable_repo_health" =~ ^[Yy]?$ || -z "$enable_repo_health" ]]; then
|
|
2025
|
+
bash "$repo_health_script" enable
|
|
2026
|
+
else
|
|
2027
|
+
print_info "Skipped. Enable later: aidevops repo-aidevops-health enable"
|
|
2028
|
+
fi
|
|
2029
|
+
fi
|
|
2030
|
+
fi
|
|
2031
|
+
return 0
|
|
2032
|
+
}
|
package/setup.sh
CHANGED
|
@@ -12,7 +12,7 @@ shopt -s inherit_errexit 2>/dev/null || true
|
|
|
12
12
|
# AI Assistant Server Access Framework Setup Script
|
|
13
13
|
# Helps developers set up the framework for their infrastructure
|
|
14
14
|
#
|
|
15
|
-
# Version: 3.8.
|
|
15
|
+
# Version: 3.8.75
|
|
16
16
|
#
|
|
17
17
|
# Quick Install:
|
|
18
18
|
# npm install -g aidevops && aidevops update (recommended)
|
|
@@ -1133,6 +1133,8 @@ _setup_post_setup_steps() {
|
|
|
1133
1133
|
fi
|
|
1134
1134
|
# Repo sync handles non-interactive mode internally (systemd detection fixed in GH#17861)
|
|
1135
1135
|
setup_repo_sync
|
|
1136
|
+
# r914 repo-aidevops-health — daily drift keeper (t2366)
|
|
1137
|
+
setup_repo_aidevops_health
|
|
1136
1138
|
if _should_setup_noninteractive_scheduler "Profile README" "sh.aidevops.profile-readme-update" "aidevops: profile-readme-update" "aidevops-profile-readme-update"; then
|
|
1137
1139
|
setup_profile_readme
|
|
1138
1140
|
fi
|
|
@@ -1154,6 +1156,8 @@ _setup_post_setup_steps() {
|
|
|
1154
1156
|
setup_stats_wrapper "${PULSE_ENABLED:-}"
|
|
1155
1157
|
setup_failure_miner "${PULSE_ENABLED:-}"
|
|
1156
1158
|
setup_repo_sync
|
|
1159
|
+
# r914 repo-aidevops-health — daily drift keeper (t2366)
|
|
1160
|
+
setup_repo_aidevops_health
|
|
1157
1161
|
setup_process_guard
|
|
1158
1162
|
setup_memory_pressure_monitor
|
|
1159
1163
|
setup_screen_time_snapshot
|