archgraph-argo 0.6.8 → 0.7.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 (2) hide show
  1. package/install-argo.ps1 +21 -0
  2. package/package.json +1 -1
package/install-argo.ps1 CHANGED
@@ -73,6 +73,27 @@ function Add-AgentsRule {
73
73
  if (Test-Path $AgentsPath) {
74
74
  $existing = Get-Content $AgentsPath -Raw -Encoding UTF8
75
75
  if ($existing -like "*$marker*") {
76
+ # An existing ArchGraph rules block is present. Replace it with the
77
+ # current rule content while preserving any unrelated content that
78
+ # surrounds it (e.g. user-authored OpenCode instructions).
79
+ $endTag = '</ToolsGuideline>'
80
+ $markerIdx = $existing.IndexOf($marker)
81
+ if ($markerIdx -lt 0) { $markerIdx = 0 }
82
+ $startIdx = $existing.LastIndexOf('---', $markerIdx)
83
+ if ($startIdx -lt 0) { $startIdx = 0 }
84
+ $endIdx = $existing.IndexOf($endTag, $markerIdx)
85
+
86
+ $before = $existing.Substring(0, $startIdx).TrimEnd()
87
+ if ($endIdx -lt 0) {
88
+ $combined = $ruleContent
89
+ } else {
90
+ $after = $existing.Substring($endIdx + $endTag.Length)
91
+ $combined = $before
92
+ if ($combined.Length -gt 0) { $combined += "`n`n" }
93
+ $combined += $ruleContent
94
+ if ($after.Length -gt 0) { $combined += $after }
95
+ }
96
+ [System.IO.File]::WriteAllText($AgentsPath, $combined, (New-Object System.Text.UTF8Encoding $false))
76
97
  return
77
98
  }
78
99
  $combined = $existing.TrimEnd() + "`n`n" + $ruleContent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "archgraph-argo",
3
- "version": "0.6.8",
3
+ "version": "0.7.0",
4
4
  "description": "Deploy the ArchGraph ARGO toolchain, skills, and rules (schema, scripts, argo-init skill, global rule) with one command.",
5
5
  "license": "MIT",
6
6
  "bin": {