aidevops 2.143.0 → 2.144.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 (4) hide show
  1. package/VERSION +1 -1
  2. package/aidevops.sh +140 -21
  3. package/package.json +1 -1
  4. package/setup.sh +1 -1
package/VERSION CHANGED
@@ -1 +1 @@
1
- 2.143.0
1
+ 2.144.0
package/aidevops.sh CHANGED
@@ -3,7 +3,7 @@
3
3
  # AI DevOps Framework CLI
4
4
  # Usage: aidevops <command> [options]
5
5
  #
6
- # Version: 2.143.0
6
+ # Version: 2.144.0
7
7
 
8
8
  set -euo pipefail
9
9
 
@@ -1295,18 +1295,104 @@ EOF
1295
1295
  # Plugins deploy to ~/.aidevops/agents/<namespace>/ (namespaced, no collisions)
1296
1296
  print_success "Created .aidevops.json"
1297
1297
 
1298
- # Create .agents symlink (or migrate from legacy .agent)
1299
- if [[ -L "$project_root/.agent" || -d "$project_root/.agent" ]]; then
1300
- # Migrate legacy .agent symlink to .agents
1298
+ # Derive repo name for scaffolding
1299
+ local repo_name
1300
+ repo_name=$(basename "$project_root")
1301
+
1302
+ # Create .agents/ directory for project-specific agent context
1303
+ # (The aidevops framework is loaded globally via ~/.aidevops/agents/ — this
1304
+ # directory is for project-specific agents, conventions, and architecture docs)
1305
+ if [[ -L "$project_root/.agents" ]]; then
1306
+ # Migrate legacy symlink to real directory
1307
+ rm -f "$project_root/.agents"
1308
+ print_info "Removed legacy .agents symlink (framework is loaded globally now)"
1309
+ fi
1310
+ # Also clean up legacy .agent symlink/directory
1311
+ if [[ -L "$project_root/.agent" ]]; then
1301
1312
  rm -f "$project_root/.agent"
1302
- ln -s "$AGENTS_DIR" "$project_root/.agents"
1303
- print_success "Migrated .agent -> .agents symlink"
1304
- elif [[ ! -e "$project_root/.agents" ]]; then
1305
- print_info "Creating .agents symlink..."
1306
- ln -s "$AGENTS_DIR" "$project_root/.agents"
1307
- print_success "Created .agents -> $AGENTS_DIR"
1308
- else
1309
- print_warning ".agents already exists, skipping symlink"
1313
+ print_info "Removed legacy .agent symlink"
1314
+ elif [[ -d "$project_root/.agent" && ! -d "$project_root/.agents" ]]; then
1315
+ mv "$project_root/.agent" "$project_root/.agents"
1316
+ print_success "Migrated .agent/ -> .agents/ directory"
1317
+ fi
1318
+
1319
+ if [[ ! -d "$project_root/.agents" ]]; then
1320
+ mkdir -p "$project_root/.agents"
1321
+ print_success "Created .agents/ directory"
1322
+ fi
1323
+
1324
+ # Scaffold .agents/AGENTS.md if missing
1325
+ if [[ ! -f "$project_root/.agents/AGENTS.md" ]]; then
1326
+ cat >"$project_root/.agents/AGENTS.md" <<'AGENTSEOF'
1327
+ # Agent Instructions
1328
+
1329
+ This directory contains project-specific agent context. The [aidevops](https://aidevops.sh)
1330
+ framework is loaded separately via the global config (`~/.aidevops/agents/`).
1331
+
1332
+ ## Purpose
1333
+
1334
+ Files in `.agents/` provide project-specific instructions that AI assistants
1335
+ read when working in this repository. Use this for:
1336
+
1337
+ - Domain-specific conventions not covered by the framework
1338
+ - Project architecture decisions and patterns
1339
+ - API design rules, data models, naming conventions
1340
+ - Integration details (third-party services, deployment targets)
1341
+
1342
+ ## Adding Agents
1343
+
1344
+ Create `.md` files in this directory for domain-specific context:
1345
+
1346
+ ```text
1347
+ .agents/
1348
+ AGENTS.md # This file - overview and index
1349
+ api-patterns.md # API design conventions
1350
+ deployment.md # Deployment procedures
1351
+ data-model.md # Database schema and relationships
1352
+ ```
1353
+
1354
+ Each file is read on demand by AI assistants when relevant to the task.
1355
+ AGENTSEOF
1356
+ print_success "Created .agents/AGENTS.md"
1357
+ fi
1358
+
1359
+ # Scaffold root AGENTS.md if missing
1360
+ if [[ ! -f "$project_root/AGENTS.md" ]]; then
1361
+ cat >"$project_root/AGENTS.md" <<ROOTAGENTSEOF
1362
+ # $repo_name
1363
+
1364
+ <!-- AI-CONTEXT-START -->
1365
+
1366
+ ## Quick Reference
1367
+
1368
+ - **Build**: \`# TODO: add build command\`
1369
+ - **Test**: \`# TODO: add test command\`
1370
+ - **Deploy**: \`# TODO: add deploy command\`
1371
+
1372
+ ## Project Overview
1373
+
1374
+ <!-- Brief description of what this project does and why it exists. -->
1375
+
1376
+ ## Architecture
1377
+
1378
+ <!-- Key architectural decisions, tech stack, directory structure. -->
1379
+
1380
+ ## Conventions
1381
+
1382
+ - Commits: [Conventional Commits](https://www.conventionalcommits.org/)
1383
+ - Branches: \`feature/\`, \`bugfix/\`, \`hotfix/\`, \`refactor/\`, \`chore/\`
1384
+
1385
+ ## Key Files
1386
+
1387
+ | File | Purpose |
1388
+ |------|---------|
1389
+ | \`.agents/AGENTS.md\` | Project-specific agent instructions |
1390
+ | \`TODO.md\` | Task tracking |
1391
+ | \`CHANGELOG.md\` | Version history |
1392
+
1393
+ <!-- AI-CONTEXT-END -->
1394
+ ROOTAGENTSEOF
1395
+ print_success "Created AGENTS.md"
1310
1396
  fi
1311
1397
 
1312
1398
  # Create planning files if enabled
@@ -1534,28 +1620,61 @@ SOPSEOF
1534
1620
  fi
1535
1621
  fi
1536
1622
 
1537
- # Add to .gitignore if needed
1623
+ # Add aidevops runtime artifacts to .gitignore
1624
+ # Note: .agents/ itself is NOT ignored — it contains committed project-specific agents.
1625
+ # Only runtime artifacts (loop state, tmp, memory) are ignored.
1538
1626
  local gitignore="$project_root/.gitignore"
1539
1627
  if [[ -f "$gitignore" ]]; then
1540
- if ! grep -q "^\.agents$" "$gitignore" 2>/dev/null; then
1628
+ local gitignore_updated=false
1629
+
1630
+ # Remove legacy bare ".agents" entry if present (was added by older versions)
1631
+ if grep -q "^\.agents$" "$gitignore" 2>/dev/null; then
1632
+ sed -i '' '/^\.agents$/d' "$gitignore" 2>/dev/null ||
1633
+ sed -i '/^\.agents$/d' "$gitignore" 2>/dev/null || true
1634
+ # Also remove the "# aidevops" comment if it's now orphaned
1635
+ sed -i '' '/^# aidevops$/{ N; /^# aidevops\n$/d; }' "$gitignore" 2>/dev/null || true
1636
+ print_info "Removed legacy bare .agents from .gitignore (now tracked)"
1637
+ gitignore_updated=true
1638
+ fi
1639
+
1640
+ # Remove legacy bare ".agent" entry if present
1641
+ if grep -q "^\.agent$" "$gitignore" 2>/dev/null; then
1642
+ sed -i '' '/^\.agent$/d' "$gitignore" 2>/dev/null ||
1643
+ sed -i '/^\.agent$/d' "$gitignore" 2>/dev/null || true
1644
+ gitignore_updated=true
1645
+ fi
1646
+
1647
+ # Add runtime artifact ignores
1648
+ if ! grep -q "^\.agents/loop-state/" "$gitignore" 2>/dev/null; then
1541
1649
  {
1542
1650
  echo ""
1543
- echo "# aidevops"
1544
- echo ".agents"
1651
+ echo "# aidevops runtime artifacts"
1652
+ echo ".agents/loop-state/"
1653
+ echo ".agents/tmp/"
1654
+ echo ".agents/memory/"
1545
1655
  } >>"$gitignore"
1546
- print_success "Added .agents to .gitignore"
1547
- # Also add legacy .agent for backward compatibility
1548
- if ! grep -q "^\.agent$" "$gitignore" 2>/dev/null; then
1549
- echo ".agent" >>"$gitignore"
1550
- fi
1656
+ print_success "Added .agents/ runtime artifact ignores to .gitignore"
1657
+ gitignore_updated=true
1551
1658
  fi
1659
+
1660
+ # Add .aidevops.json to gitignore (local config, not committed)
1661
+ if ! grep -q "^\.aidevops\.json$" "$gitignore" 2>/dev/null; then
1662
+ echo ".aidevops.json" >>"$gitignore"
1663
+ gitignore_updated=true
1664
+ fi
1665
+
1552
1666
  # Add .beads if beads is enabled
1553
1667
  if [[ "$enable_beads" == "true" ]]; then
1554
1668
  if ! grep -q "^\.beads$" "$gitignore" 2>/dev/null; then
1555
1669
  echo ".beads" >>"$gitignore"
1556
1670
  print_success "Added .beads to .gitignore"
1671
+ gitignore_updated=true
1557
1672
  fi
1558
1673
  fi
1674
+
1675
+ if [[ "$gitignore_updated" == "true" ]]; then
1676
+ print_info "Updated .gitignore"
1677
+ fi
1559
1678
  fi
1560
1679
 
1561
1680
  # Generate collaborator pointer files (lightweight AGENTS.md references)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "2.143.0",
3
+ "version": "2.144.0",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
package/setup.sh CHANGED
@@ -10,7 +10,7 @@ shopt -s inherit_errexit 2>/dev/null || true
10
10
  # AI Assistant Server Access Framework Setup Script
11
11
  # Helps developers set up the framework for their infrastructure
12
12
  #
13
- # Version: 2.143.0
13
+ # Version: 2.144.0
14
14
  #
15
15
  # Quick Install:
16
16
  # npm install -g aidevops && aidevops update (recommended)