Ai Claw Orchestrator: Difference between revisions

From wiki karavi
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 1: Line 1:
= راه‌اندازی Agentic Development Environment در Windows با Claw Orchestrator =
= راه‌اندازی Agentic Development Environment در Windows با Claw Orchestrator =


این راهنما برای ساخت یک محیط '''Agentic Development''' روی Windows است که چند Coding Agent مختلف را در کنار یکدیگر مدیریت می‌کند.
این راهنما برای ساخت یک محیط '''Agentic Development''' روی Windows است که چند Coding Agent مختلف را توسط '''Claw Orchestrator''' مدیریت می‌کند.


هدف این معماری استفاده از چند Coding Agent به عنوان Worker، Reviewer و Judge و مدیریت آن‌ها توسط '''Claw Orchestrator''' است.
هدف اصلی این معماری:
 
* استفاده همزمان از چند Coding Agent
* مدیریت Sessionهای Agentها
* اجرای چند Agent روی یک پروژه
* استفاده از Agentهای مختلف به عنوان Coder و Reviewer
* ایجاد Multi-Agent Council
* استفاده از LLM-as-a-Judge
* جداسازی تغییرات Agentها با Git Worktree
* انجام Build، Test، Lint و Security Check قبل از داوری LLM
* نگهداری Run History
* استفاده از Dashboard برای مدیریت سیستم
 
معماری کلی:


<pre>
<pre>
Line 20: Line 33:
└── Claw Orchestrator
└── Claw Orchestrator
         │
         │
        ├── Dashboard
         ├── Persistent Sessions
         ├── Persistent Sessions
         ├── Multi-Agent
         ├── Multi-Agent
Line 36: Line 50:
= پیش‌نیازها =
= پیش‌نیازها =


قبل از نصب Agentها بهتر است ابزارهای زیر روی Windows نصب شده باشند:
قبل از نصب Agentها بهتر است ابزارهای زیر نصب شده باشند:


{| class="wikitable"
{| class="wikitable"
Line 64: Line 78:
|-
|-
| Python
| Python
| SDKها و ابزارهای Python
| SDKهای Python
| اختیاری
| اختیاری
|}
|}


== بررسی پیش‌نیازها ==
== بررسی پیش‌نیازها ==
PowerShell را باز کنید و اجرا کنید:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 80: Line 92:
</syntaxhighlight>
</syntaxhighlight>


برای پیدا کردن executableها:
بررسی مسیر executableها:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 98: Line 110:
[https://claude.ai/ Claude]
[https://claude.ai/ Claude]


=== روش اول: PowerShell ===
=== نصب با PowerShell ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 104: Line 116:
</syntaxhighlight>
</syntaxhighlight>


=== روش دوم: CMD / curl ===
=== نصب با CMD / curl ===


<syntaxhighlight lang="bat">
<syntaxhighlight lang="bat">
Line 110: Line 122:
</syntaxhighlight>
</syntaxhighlight>


=== روش سوم: Winget ===
=== نصب با Winget ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 161: Line 173:
</syntaxhighlight>
</syntaxhighlight>


=== بررسی نصب ===
=== بررسی ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 194: Line 206:
[https://cursor.com/ Cursor]
[https://cursor.com/ Cursor]


=== نصب CLI در Windows ===
=== نصب CLI ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 200: Line 212:
</syntaxhighlight>
</syntaxhighlight>


=== بررسی نصب ===
=== بررسی ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 206: Line 218:
</syntaxhighlight>
</syntaxhighlight>


Cursor CLI ممکن است با دستور کوتاه زیر نیز در دسترس باشد:
Cursor ممکن است command کوتاه زیر را نیز ارائه کند:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 239: Line 251:
</syntaxhighlight>
</syntaxhighlight>


=== بررسی نصب ===
=== بررسی ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 274: Line 286:
</syntaxhighlight>
</syntaxhighlight>


'''نکته:''' برای استفاده معمول از Claw Orchestrator، CLI اهمیت بیشتری دارد. SDK را فقط زمانی نصب کنید که مستقیماً از Python به آن نیاز دارید.
'''نکته:''' اگر فقط قصد استفاده از Coding Agent و Claw Orchestrator را دارید، معمولاً نیازی به نصب SDK پایتون نیست.


----
----
Line 284: Line 296:
[https://opencode.ai/ OpenCode]
[https://opencode.ai/ OpenCode]


=== اجازه اجرای Install Script ===
=== تنظیم npm ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 302: Line 314:
</syntaxhighlight>
</syntaxhighlight>


=== بررسی نصب ===
=== بررسی ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 341: Line 353:
</syntaxhighlight>
</syntaxhighlight>


یا:
=== بررسی ===
 
<syntaxhighlight lang="powershell">
npm i -g freebuff
</syntaxhighlight>
 
=== بررسی نصب ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 366: Line 372:
</syntaxhighlight>
</syntaxhighlight>


'''نکته:''' در صورت نبود integration مستقیم، Freebuff می‌تواند به عنوان Custom CLI / Custom Engine در معماری مورد استفاده قرار گیرد.
'''نکته:''' اگر Freebuff integration مستقیم نداشته باشد، می‌توان اتصال آن به Orchestrator را از طریق Custom Engine بررسی کرد.


----
----
Line 372: Line 378:
= نصب Claw Orchestrator =
= نصب Claw Orchestrator =


Claw Orchestrator لایه مرکزی Orchestration در این محیط است.
Claw Orchestrator لایه مرکزی Orchestration این معماری است.
 
هدف این است که به جای اضافه کردن تعداد زیادی framework و service، Coding Agentهای موجود از طریق یک لایه مرکزی مدیریت شوند.


== نصب ==
== نصب ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 382: Line 386:
</syntaxhighlight>
</syntaxhighlight>


یا:
== بررسی نسخه ===
 
<syntaxhighlight lang="powershell">
npm i -g @enderfga/claw-orchestrator
</syntaxhighlight>
 
== بررسی نسخه ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 394: Line 392:
</syntaxhighlight>
</syntaxhighlight>


== مشاهده Help ==
== Help ===


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 400: Line 398:
</syntaxhighlight>
</syntaxhighlight>


نمونه دستورات اصلی:
نمونه دستورات:


<pre>
<pre>
clawo acp
clawo acp
clawo serve
clawo serve
clawo session-start
clawo session-start
clawo session-send
clawo session-send
Line 410: Line 409:
clawo session-list
clawo session-list
clawo session-status
clawo session-status
clawo runs
clawo session-grep
clawo session-grep
clawo session-compact
clawo session-compact
clawo runs
clawo agents-list
clawo agents-list
clawo agents-create
clawo agents-create
clawo skills-list
clawo skills-list
clawo skills-create
clawo skills-create
clawo rules-list
clawo rules-list
clawo rules-create
clawo rules-create
clawo session-team-list
clawo session-team-list
clawo session-team-send
clawo session-team-send
Line 425: Line 429:
----
----


= اجرای Standalone Claw Orchestrator =
= Engineهای Claw Orchestrator =


برای این معماری الزامی به نصب OpenClaw وجود ندارد.
برای مشاهده Engineهای نسخه نصب‌شده:


Claw Orchestrator می‌تواند Standalone اجرا شود.
<syntaxhighlight lang="powershell">
clawo session-start --help
</syntaxhighlight>
 
در نسخه 5.0.0 Engineهای زیر در CLI ارائه می‌شوند:
 
<pre>
claude
codex
codex-app
gemini
agy
cursor
opencode
custom
</pre>
 
نمونه:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo serve
clawo session-start my-agent --engine claude
</syntaxhighlight>
</syntaxhighlight>


معماری:
----
 
= مشکل npm Install Scripts =
 
در نسخه‌های جدید npm ممکن است Install Script بعضی dependencyهای Claw Orchestrator به دلایل امنیتی Block شود.
 
نمونه:


<pre>
<pre>
Claude Code ───────┐
npm warn install-scripts
Codex ─────────────┤
 
Cursor Agent ──────┤
openclaw
OpenCode ──────────┤
re2
Antigravity ───────┤
@google/genai
Freebuff / Custom ─┤
tree-sitter-bash
                  ↓
protobufjs
          Claw Orchestrator
</pre>
                  │
 
          ┌────────┼────────┐
در این شرایط ممکن است CLI کار کند ولی Server با خطایی مشابه زیر اجرا نشود:
          ↓        ↓        ↓
 
      Agents    Skills    Rules
<pre>
          │        │        │
Error: Cannot find module './build/Release/re2.node'
          └────────┼────────┘
                  ↓
            Orchestration
</pre>
</pre>


----
== رفع مشکل RE2 ==
 
اجازه اجرای Scriptهای موردنیاز:
 
<syntaxhighlight lang="powershell">
npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user
</syntaxhighlight>
 
بررسی:


= بررسی تمام CLIها =
<syntaxhighlight lang="powershell">
npm config get allow-scripts
</syntaxhighlight>


پس از نصب تمام ابزارها:
سپس:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
node --version
cd "$env:APPDATA\npm\node_modules\@enderfga\claw-orchestrator"
npm --version
npm rebuild re2
git --version
</syntaxhighlight>
 
در صورت موفقیت:
 
<pre>
rebuilt dependencies successfully
</pre>


claude --version
سپس Server را مجدداً اجرا کنید:
codex --version
opencode --version
cursor-agent --version
agy --version
freebuff --version


clawo --version
<syntaxhighlight lang="powershell">
clawo serve
</syntaxhighlight>
</syntaxhighlight>


----
----


= بررسی مسیر CLIها =
= اجرای Standalone Server =
 
برای اجرای Claw Orchestrator:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
where.exe node
clawo serve
where.exe npm
</syntaxhighlight>
where.exe git
 
نمونه خروجی:
 
<pre>
[ultraapp] runtime mode: host
[ultraapp] router on http://127.0.0.1:19000/forge/&lt;slug&gt;/
 
[embedded-server] Listening on http://127.0.0.1:18796
[embedded-server] Token file: C:\Users\USER\.openclaw\server-token
 
Standalone server running on http://127.0.0.1:18796
 
Press Ctrl+C to stop
</pre>
 
----
 
= Dashboard =


where.exe claude
پس از اجرای:
where.exe codex
where.exe opencode
where.exe cursor-agent
where.exe agy
where.exe freebuff


where.exe clawo
<syntaxhighlight lang="powershell">
clawo serve
</syntaxhighlight>
</syntaxhighlight>
Claw Orchestrator آدرس Dashboard دارای Authentication Token را در Terminal نمایش می‌دهد.
ساختار URL:
<pre>
http://127.0.0.1:18796/dashboard?token=YOUR_TOKEN
</pre>
'''هشدار امنیتی:'''
Token واقعی را:
* داخل Wiki قرار ندهید.
* داخل Git Commit نکنید.
* در Screenshot عمومی منتشر نکنید.
* برای دیگران ارسال نکنید.
Token در فایل محلی زیر نگهداری می‌شود:
<pre>
C:\Users\USERNAME\.openclaw\server-token
</pre>
بعد از Authentication، آدرس پایه Dashboard:
<pre>
http://127.0.0.1:18796/dashboard
</pre>
----
= Forge Router =
هنگام اجرای Server ممکن است Router دیگری نیز اجرا شود:
<pre>
http://127.0.0.1:19000/forge/&lt;slug&gt;/
</pre>
این Router توسط بخش Forge مورد استفاده قرار می‌گیرد.
----
= معماری Standalone =
<pre>
Claude Code ───────┐
Codex ─────────────┤
Cursor Agent ──────┤
OpenCode ──────────┤
Antigravity ───────┤
Custom Engine ─────┤
                  ↓
          Claw Orchestrator
                  │
        ┌──────────┼──────────┐
        ↓          ↓          ↓
    Sessions    Agents    Skills
        │          │          │
        └──────────┼──────────┘
                  ↓
                Rules
                  │
                  ↓
              Dashboard
</pre>


----
----
Line 500: Line 618:
= Health Check کامل =
= Health Check کامل =


برای بررسی سریع کل محیط، یک فایل با نام زیر ایجاد کنید:
برای بررسی محیط، فایل زیر را ایجاد کنید:


<pre>
<pre>
Line 506: Line 624:
</pre>
</pre>


محتوای فایل:
و محتوای زیر را در آن قرار دهید:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
$tools = @(
$tools = @(
     @{ Name = "Node.js";          Command = "node";        Args = "--version" }
     @{ Name = "Node.js";          Command = "node";        Args = @("--version") }
     @{ Name = "npm";              Command = "npm";          Args = "--version" }
     @{ Name = "npm";              Command = "npm";          Args = @("--version") }
     @{ Name = "Git";              Command = "git";          Args = "--version" }
     @{ Name = "Git";              Command = "git";          Args = @("--version") }


     @{ Name = "Claude Code";      Command = "claude";      Args = "--version" }
     @{ Name = "Claude Code";      Command = "claude";      Args = @("--version") }
     @{ Name = "Codex";            Command = "codex";        Args = "--version" }
     @{ Name = "Codex";            Command = "codex";        Args = @("--version") }
     @{ Name = "OpenCode";          Command = "opencode";    Args = "--version" }
     @{ Name = "OpenCode";          Command = "opencode";    Args = @("--version") }
     @{ Name = "Cursor Agent";      Command = "cursor-agent"; Args = "--version" }
     @{ Name = "Cursor Agent";      Command = "cursor-agent"; Args = @("--version") }
     @{ Name = "Antigravity";      Command = "agy";          Args = "--version" }
     @{ Name = "Antigravity";      Command = "agy";          Args = @("--version") }
     @{ Name = "Freebuff";          Command = "freebuff";    Args = "--version" }
     @{ Name = "Freebuff";          Command = "freebuff";    Args = @("--version") }


     @{ Name = "Claw Orchestrator"; Command = "clawo";        Args = "--version" }
     @{ Name = "Claw Orchestrator"; Command = "clawo";        Args = @("--version") }
)
)
$results = @()
function Write-Section {
    param([string]$Title)
    Write-Host ""
    Write-Host "============================================================" -ForegroundColor Cyan
    Write-Host " $Title" -ForegroundColor Cyan
    Write-Host "============================================================" -ForegroundColor Cyan
}
function Add-Result {
    param(
        [string]$Name,
        [string]$Status,
        [string]$Version = "",
        [string]$Path = ""
    )
    $script:results += [PSCustomObject]@{
        Name    = $Name
        Status  = $Status
        Version = $Version
        Path    = $Path
    }
}
Clear-Host


Write-Host ""
Write-Host ""
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "============================================================" -ForegroundColor Cyan
Write-Host "       AGENTIC DEV OS HEALTH CHECK" -ForegroundColor Cyan
Write-Host "             AGENTIC DEV OS HEALTH CHECK" -ForegroundColor Cyan
Write-Host "========================================" -ForegroundColor Cyan
Write-Host "============================================================" -ForegroundColor Cyan
Write-Host ""
 
Write-Section "CLI TOOLS"


foreach ($tool in $tools) {
foreach ($tool in $tools) {
Line 534: Line 682:
     $command = Get-Command $tool.Command -ErrorAction SilentlyContinue
     $command = Get-Command $tool.Command -ErrorAction SilentlyContinue


     if ($command) {
     if (-not $command) {
 
        Write-Host "[MISSING] " -ForegroundColor Red -NoNewline
        Write-Host $tool.Name
 
        Add-Result -Name $tool.Name -Status "MISSING"
 
        continue
    }
 
    try {
 
        $output = & $tool.Command @($tool.Args) 2>&1
 
        $version = (
            $output |
            Where-Object { $_ -ne $null } |
            Select-Object -First 1
        ).ToString().Trim()
 
        Write-Host "[OK]      " -ForegroundColor Green -NoNewline
        Write-Host "$($tool.Name) -> $version"
 
        Write-Host "          Path: " -ForegroundColor DarkGray -NoNewline
        Write-Host $command.Source -ForegroundColor DarkGray
 
        Add-Result `
            -Name $tool.Name `
            -Status "OK" `
            -Version $version `
            -Path $command.Source
    }
    catch {
 
        Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
        Write-Host "$($tool.Name) -> command exists but version check failed"
 
        Add-Result `
            -Name $tool.Name `
            -Status "WARNING" `
            -Path $command.Source
    }
 
    Write-Host ""
}
 
Write-Section "PATH CHECK"
 
$pathEntries = @(
    $env:Path -split ";" |
    ForEach-Object {
        $_.Trim().TrimEnd("\")
    } |
    Where-Object {
        $_
    }
)
 
$duplicatePaths = @(
    $pathEntries |
    Group-Object |
    Where-Object {
        $_.Count -gt 1
    }
)
 
if ($duplicatePaths.Count -eq 0) {
 
    Write-Host "[OK]      No duplicate PATH entries found." -ForegroundColor Green
 
}
else {
 
    Write-Host "[WARNING] Duplicate PATH entries found:" -ForegroundColor Yellow
 
    foreach ($duplicate in $duplicatePaths) {
 
        Write-Host "          [$($duplicate.Count)x] $($duplicate.Name)" `
            -ForegroundColor Yellow
    }
}
 
Write-Section "NPM CONFIGURATION"
 
try {
 
    $allowScripts = npm config get allow-scripts 2>$null
 
    Write-Host "allow-scripts:"
    Write-Host "  $allowScripts"
 
    $requiredScripts = @(
        "openclaw",
        "re2",
        "@google/genai",
        "tree-sitter-bash",
        "protobufjs"
    )
 
    $configuredScripts = @(
        $allowScripts -split "," |
        ForEach-Object {
            $_.Trim()
        }
    )


        try {
    foreach ($package in $requiredScripts) {


            $output = & $tool.Command $tool.Args 2>&1
        if ($configuredScripts -contains $package) {
            $version = $output | Select-Object -First 1


             Write-Host "[OK]      " -ForegroundColor Green -NoNewline
             Write-Host "[OK]      " -ForegroundColor Green -NoNewline
             Write-Host "$($tool.Name) -> $version"
             Write-Host "$package install scripts allowed"
 
        }
        else {
 
            Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
            Write-Host "$package is not in npm allow-scripts"
        }
    }
 
}
catch {
 
    Write-Host "[WARNING] Could not read npm configuration." `
        -ForegroundColor Yellow
}
 
Write-Section "CLAW ORCHESTRATOR"
 
$clawoCommand = Get-Command clawo -ErrorAction SilentlyContinue
 
if (-not $clawoCommand) {
 
    Write-Host "[MISSING] Claw Orchestrator is not installed." `
        -ForegroundColor Red
 
}
else {
 
    Write-Host "[OK]      Claw Orchestrator CLI found." `
        -ForegroundColor Green
 
    try {
 
        $npmRoot = (npm root -g).Trim()
 
        $clawoRoot = Join-Path `
            $npmRoot `
            "@enderfga\claw-orchestrator"
 
        Write-Host ""
        Write-Host "Package:"
        Write-Host "  $clawoRoot"
 
        if (Test-Path $clawoRoot) {
 
            Write-Host "[OK]      Claw Orchestrator package directory found." `
                -ForegroundColor Green
        }
 
        $re2File = Join-Path `
            $clawoRoot `
            "node_modules\re2\build\Release\re2.node"
 
        Write-Host ""
        Write-Host "RE2 Native Module:"
 
        if (Test-Path $re2File) {


             Write-Host "         Path: " -NoNewline -ForegroundColor DarkGray
             Write-Host "[OK]      re2.node found." `
             Write-Host $command.Source -ForegroundColor DarkGray
                -ForegroundColor Green
 
             Write-Host "          $re2File" `
                -ForegroundColor DarkGray


         }
         }
         catch {
         else {


             Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
             Write-Host "[ERROR]   re2.node NOT FOUND." `
            Write-Host "$($tool.Name) -> Installed, but version check failed"
                -ForegroundColor Red


            Write-Host ""
            Write-Host "Fix:"
            Write-Host 'npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user'
            Write-Host "cd `"$clawoRoot`""
            Write-Host "npm rebuild re2"
         }
         }
    }
    catch {
        Write-Host "[WARNING] Could not inspect Claw Orchestrator package." `
            -ForegroundColor Yellow
    }
}
Write-Section "CLAW SERVER"
$serverPort = 18796
$serverRunning = $false
try {
    $connection = Get-NetTCPConnection `
        -LocalPort $serverPort `
        -State Listen `
        -ErrorAction SilentlyContinue
    if ($connection) {
        $serverRunning = $true
        Write-Host "[OK]      " -ForegroundColor Green -NoNewline
        Write-Host "Claw server is listening on port $serverPort"
        Write-Host ""
        Write-Host "Server:"
        Write-Host "  http://127.0.0.1:$serverPort"


     }
     }
     else {
     else {


         Write-Host "[MISSING] " -ForegroundColor Red -NoNewline
         Write-Host "[INFO]   Claw server is not currently running." `
        Write-Host $tool.Name
            -ForegroundColor Cyan


        Write-Host ""
        Write-Host "Start with:"
        Write-Host "  clawo serve"
     }
     }
}
}
catch {


Write-Host ""
    Write-Host "[WARNING] Could not check server port." `
Write-Host "========================================" -ForegroundColor Cyan
        -ForegroundColor Yellow
Write-Host "             SUMMARY" -ForegroundColor Cyan
}
Write-Host "========================================" -ForegroundColor Cyan
 
$tokenFile = Join-Path `
    $HOME `
    ".openclaw\server-token"
 
if (Test-Path $tokenFile) {
 
    Write-Host ""
    Write-Host "[OK]      Server token file exists." `
        -ForegroundColor Green
 
    Write-Host "         $tokenFile" `
        -ForegroundColor DarkGray
}
 
if ($serverRunning) {
 
    Write-Host ""
    Write-Host "Dashboard base URL:"
    Write-Host "  http://127.0.0.1:$serverPort/dashboard"
 
    Write-Host ""
    Write-Host "NOTE: Authentication token is intentionally not displayed." `
        -ForegroundColor DarkGray
}


$installed = 0
Write-Section "SUMMARY"
$missing = 0


foreach ($tool in $tools) {
$installed = @(
    $results |
    Where-Object {
        $_.Status -eq "OK"
    }
).Count


     if (Get-Command $tool.Command -ErrorAction SilentlyContinue) {
$warnings = @(
         $installed++
     $results |
    Where-Object {
         $_.Status -eq "WARNING"
     }
     }
     else {
).Count
         $missing++
 
$missing = @(
     $results |
    Where-Object {
         $_.Status -eq "MISSING"
     }
     }
).Count


}
Write-Host "CLI Tools OK : $installed"
Write-Host "Warnings    : $warnings"
Write-Host "Missing      : $missing"
Write-Host "Total        : $($tools.Count)"


Write-Host ""
Write-Host ""


Write-Host "Installed : " -NoNewline
if (($missing -eq 0) -and ($warnings -eq 0)) {
Write-Host $installed -ForegroundColor Green


Write-Host "Missing  : " -NoNewline
    Write-Host "[READY] Agentic Development environment is ready." `
        -ForegroundColor Green
 
}
elseif ($missing -eq 0) {
 
    Write-Host "[READY WITH WARNINGS] All CLI tools are installed." `
        -ForegroundColor Yellow


if ($missing -eq 0) {
    Write-Host $missing -ForegroundColor Green
}
}
else {
else {
     Write-Host $missing -ForegroundColor Red
 
     Write-Host "[NOT READY] Some required tools are missing." `
        -ForegroundColor Red
}
}
Write-Host "Total    : $($tools.Count)"


Write-Host ""
Write-Host ""


if ($missing -eq 0) {
if ($serverRunning) {


     Write-Host "All Agentic Development tools are available." -ForegroundColor Green
     Write-Host "Claw Server : RUNNING" `
        -ForegroundColor Green


}
}
else {
else {


     Write-Host "Some tools are missing. Check the results above." -ForegroundColor Yellow
     Write-Host "Claw Server : STOPPED" `
 
        -ForegroundColor Cyan
}
}


Line 615: Line 1,010:
</syntaxhighlight>
</syntaxhighlight>


== اجرای Health Check ==
----
 
= اجرای Health Check =


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 621: Line 1,018:
</syntaxhighlight>
</syntaxhighlight>


اگر Execution Policy مانع اجرای اسکریپت شد:
اگر Execution Policy مانع اجرا شد:
 
<syntaxhighlight lang="powershell">
Get-ExecutionPolicy
</syntaxhighlight>
 
برای اجازه موقت فقط در Process جاری:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 641: Line 1,032:
----
----


= ابزارهای بررسی‌شده توسط Health Check =
= موارد بررسی‌شده توسط Health Check =


{| class="wikitable"
{| class="wikitable"
! ابزار
! بررسی
! Command
! توضیح
! کاربرد
|-
|-
| Node.js
| Node.js
| <code>node</code>
| نسخه و PATH
| JavaScript Runtime
|-
|-
| npm
| npm
| <code>npm</code>
| نسخه و PATH
| Node Package Manager
|-
|-
| Git
| Git
| <code>git</code>
| نسخه و PATH
| Version Control
|-
|-
| Claude Code
| Claude Code
| <code>claude</code>
| نسخه و PATH
| Coding Agent
|-
|-
| OpenAI Codex
| Codex
| <code>codex</code>
| نسخه و PATH
| Coding Agent
|-
|-
| OpenCode
| OpenCode
| <code>opencode</code>
| نسخه و PATH
| Coding Agent
|-
|-
| Cursor Agent
| Cursor Agent
| <code>cursor-agent</code>
| نسخه و PATH
| Coding Agent
|-
|-
| Google Antigravity
| Antigravity
| <code>agy</code>
| نسخه و PATH
| Coding Agent
|-
|-
| Freebuff
| Freebuff
| <code>freebuff</code>
| نسخه و PATH
| Coding Agent
|-
|-
| Claw Orchestrator
| Claw Orchestrator
| <code>clawo</code>
| نسخه و PATH
| Multi-Agent Orchestrator
|-
|}
| Duplicate PATH
 
| پیدا کردن مسیرهای تکراری
----
|-
 
| npm allow-scripts
= معنی وضعیت‌های Health Check =
| بررسی مجوز Native Install Scripts
 
|-
{| class="wikitable"
| RE2
! وضعیت
| بررسی وجود re2.node
! معنی
|-
|-
| <code>[OK]</code>
| Claw Server
| ابزار نصب شده و Command از طریق PATH قابل دسترسی است.
| بررسی Port 18796
|-
|-
| <code>[WARNING]</code>
| Server Token
| ابزار پیدا شده ولی Version Check با مشکل مواجه شده است.
| بررسی وجود Token File بدون نمایش Token
|-
|-
| <code>[MISSING]</code>
| Dashboard
| ابزار نصب نیست یا Command آن در PATH قرار ندارد.
| نمایش URL پایه Dashboard
|}
|}
'''نکته:''' وضعیت <code>[OK]</code> به معنی موجود بودن CLI است و الزاماً به معنی معتبر بودن Login یا Authentication نیست.
----
= نمونه خروجی Health Check =
<pre>
========================================
      AGENTIC DEV OS HEALTH CHECK
========================================
[OK]      Node.js -> v24.19.0
          Path: C:\Program Files\nodejs\node.exe
[OK]      npm -> 12.0.2
          Path: C:\Program Files\nodejs\npm.ps1
[OK]      Git -> git version 2.55.0.windows.4
          Path: C:\Program Files\Git\cmd\git.exe
[OK]      Claude Code -> 2.1.148 (Claude Code)
          Path: C:\...\claude.exe
[OK]      Codex -> codex-cli 0.148.0
          Path: C:\...\codex.ps1
[OK]      OpenCode -> 1.18.19
          Path: C:\...\opencode.exe
[OK]      Cursor Agent -> 2026.08.11-e8db854
          Path: C:\...\cursor-agent.exe
[OK]      Antigravity -> 1.1.16
          Path: C:\...\agy.exe
[OK]      Freebuff -> ...
          Path: C:\...\freebuff.ps1
[OK]      Claw Orchestrator -> 5.0.0
          Path: C:\...\clawo.ps1
========================================
              SUMMARY
========================================
Installed : 10
Missing  : 0
Total    : 10
All Agentic Development tools are available.
</pre>


----
----


= مدیریت Sessionها =
= مدیریت Sessionها =
یکی از قابلیت‌های اصلی Claw Orchestrator مدیریت Persistent Sessionهای Coding Agentها است.


== مشاهده Sessionها ==
== مشاهده Sessionها ==
Line 771: Line 1,097:
</syntaxhighlight>
</syntaxhighlight>


== مشاهده Help ==
== ساخت Session با Claude ==


قبل از ایجاد Session بهتر است Optionهای نسخه نصب‌شده را بررسی کنید:
<syntaxhighlight lang="powershell">
clawo session-start claude-main `
    --engine claude `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
 
== Codex ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo session-start --help
clawo session-start codex-main `
    --engine codex `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
</syntaxhighlight>


== ورود به پروژه ==
== Cursor ==


مثال:
<syntaxhighlight lang="powershell">
clawo session-start cursor-main `
    --engine cursor `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
 
== OpenCode ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
cd D:\Source\MyProject
clawo session-start opencode-main `
    --engine opencode `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
</syntaxhighlight>


== ایجاد Session ==
== Antigravity ==
 
نمونه:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo session-start myproject --engine claude --cwd .
clawo session-start agy-main `
    --engine agy `
    --cwd "D:\Source\MyProject"
</syntaxhighlight>
</syntaxhighlight>
'''نکته:''' Optionها و Engineهای پشتیبانی‌شده ممکن است بین نسخه‌های Claw Orchestrator تغییر کنند. همیشه خروجی <code>--help</code> نسخه نصب‌شده را بررسی کنید.


----
----


= ارسال Task به Session =
= ارسال Task =
 
مثال:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo session-send myproject "Analyze this project and identify the most important problems."
clawo session-send claude-main "Analyze this repository. Do not modify files. Explain the architecture and potential problems."
</syntaxhighlight>
</syntaxhighlight>


----
----


= مشاهده وضعیت Session =
= وضعیت Session =


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo session-status myproject
clawo session-status claude-main
</syntaxhighlight>
</syntaxhighlight>


Line 818: Line 1,160:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo session-grep myproject "error"
clawo session-grep claude-main "error"
</syntaxhighlight>
</syntaxhighlight>


Line 826: Line 1,168:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo session-compact myproject
clawo session-compact claude-main
</syntaxhighlight>
</syntaxhighlight>


Line 834: Line 1,176:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo session-stop myproject
clawo session-stop claude-main
</syntaxhighlight>
</syntaxhighlight>


Line 840: Line 1,182:


= Run Ledger =
= Run Ledger =
Claw Orchestrator دارای Durable Run Ledger است.
برای مشاهده Runها:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 849: Line 1,187:
</syntaxhighlight>
</syntaxhighlight>


این بخش برای بررسی تاریخچه Turnها و اجراهای Agentها کاربرد دارد.
Run Ledger تاریخچه اجراهای Agentها را نگهداری می‌کند.


----
----


= مدیریت Agents =
= Agents =
 
== مشاهده Agentها ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 861: Line 1,197:
</syntaxhighlight>
</syntaxhighlight>


== مشاهده Help ساخت Agent ==
برای ساخت Agent:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 869: Line 1,205:
----
----


= مدیریت Skills =
= Skills =
 
== مشاهده Skills ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 877: Line 1,211:
</syntaxhighlight>
</syntaxhighlight>


== ساخت Skill ==
برای ساخت Skill:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 885: Line 1,219:
----
----


= مدیریت Rules =
= Rules =
 
== مشاهده Rules ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 893: Line 1,225:
</syntaxhighlight>
</syntaxhighlight>


== ساخت Rule ==
برای ساخت Rule:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 901: Line 1,233:
----
----


= مدیریت Agent Team =
= Agent Teams =


== مشاهده اعضای Team ==
مشاهده اعضای Team:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo session-team-list myproject
clawo session-team-list SESSION_NAME
</syntaxhighlight>
</syntaxhighlight>


== ارسال پیام به Teammate ==
ارسال پیام:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
clawo session-team-send myproject <teammate> "Review this implementation."
clawo session-team-send SESSION_NAME TEAMMATE "Review this implementation."
</syntaxhighlight>
</syntaxhighlight>


----
----


= استفاده به عنوان Agentic Development OS =
= Git Worktree و Isolation =
 
برای اجرای همزمان چند Agent بهتر است هر Agent در Worktree مستقل کار کند.
 
<pre>
Repository
├── main
├── worktree-claude
├── worktree-codex
├── worktree-cursor
├── worktree-antigravity
└── worktree-review
</pre>
 
Claw Orchestrator نیز Option مربوط به Worktree دارد:


هدف نهایی این معماری ایجاد یک لایه بالاتر از Coding Agentها است.
<syntaxhighlight lang="powershell">
clawo session-start --help
</syntaxhighlight>
 
Option:


<pre>
<pre>
                      Developer
-w, --worktree [name]
                          │
                          ↓
                Claw Orchestrator
                          │
                  Planner / Router
                          │
      ┌──────────────────┼──────────────────┐
      │                  │                  │
      ↓                  ↓                  ↓
Claude Code            Codex          Cursor Agent
      │                  │                  │
      ├────────────── OpenCode ─────────────┤
      │                  │                  │
      ├─────────── Antigravity ─────────────┤
      │                  │                  │
      └────────────── Freebuff ─────────────┘
                          │
                          ↓
                  Automated Validation
                          │
                          ↓
                  Multi-Agent Review
                          │
                          ↓
                    LLM-as-a-Judge
                          │
                          ↓
                    Final Result
</pre>
</pre>


Line 957: Line 1,285:
= LLM-as-a-Judge =
= LLM-as-a-Judge =


یکی از کاربردهای مهم این معماری استفاده از چند مدل برای حل یا بررسی یک Task واحد است.
یکی از اهداف اصلی این معماری استفاده از Agentهای مختلف برای تولید چند Solution و سپس ارزیابی آن‌ها است.


<pre>
<pre>
Line 982: Line 1,310:
           └──────────────┼──────────────┘
           └──────────────┼──────────────┘
                         ↓
                         ↓
                    Security
                  Security Check
                         ↓
                         ↓
                     Benchmark
                     Benchmark
                         ↓
                         ↓
                    LLM Judge
                  Multi-Agent Review
                        ↓
                    LLM Judge
                         ↓
                         ↓
                   Score / Consensus
                   Score / Consensus
Line 995: Line 1,325:
----
----


= Automated Validation قبل از LLM Judge =
= ترتیب پیشنهادی ارزیابی =


بهتر است انتخاب بهترین Implementation فقط به نظر LLM وابسته نباشد.
LLM نباید تنها معیار انتخاب بهترین Implementation باشد.


ترتیب پیشنهادی:
ترتیب پیشنهادی:


<pre>
<pre>
Candidate Code
Candidate
     
 
     
 
    Build
Build
     
 
     
 
Unit Tests
Unit Tests
     
 
     
 
Integration Tests
Integration Tests
     
 
     
 
    Lint
Lint
     
 
     
 
Type Check
Type Check
     
 
     
 
Security Check
Security Check
     
 
     
 
Benchmark
Benchmark
     
 
     
 
LLM Review
LLM Review
     
 
     
 
Final Score
Final Score
</pre>
</pre>


مزیت این روش این است که معیارهای قابل اندازه‌گیری قبل از قضاوت LLM بررسی می‌شوند.
----
 
= نقش Agentها =
 
{| class="wikitable"
! Role
! Agent پیشنهادی
! وظیفه
|-
| Planner
| Claude / Codex
| تحلیل Task
|-
| Primary Coder
| Claude / Codex
| Implementation اصلی
|-
| Alternative Coder
| Cursor / OpenCode / Antigravity
| Implementation جایگزین
|-
| Reviewer
| Agent متفاوت از Coder
| Code Review
|-
| Security Reviewer
| Claude / Codex
| بررسی Security
|-
| Judge
| مدل متفاوت از تولیدکننده
| امتیازدهی
|}
 
بهتر است مدلی که Solution را تولید کرده است تنها Judge همان Solution نباشد.


----
----


= Multi-Agent Council =
= Multi-Agent Council =
برای مسائل پیچیده می‌توان چند Agent را روی یک Task اجرا کرد.


<pre>
<pre>
Line 1,048: Line 1,410:
           ┌────────────┼────────────┐
           ┌────────────┼────────────┐
           ↓            ↓            ↓
           ↓            ↓            ↓
       Claude        Codex       Gemini
       Claude        Codex       Agent C
           │            │            │
           │            │            │
           ↓            ↓            ↓
           ↓            ↓            ↓
Line 1,064: Line 1,426:
</pre>
</pre>


کاربردهای مناسب:
کاربردها:


* Architecture Design
* Architecture Design
Line 1,072: Line 1,434:
* Security Review
* Security Review
* Performance Optimization
* Performance Optimization
* انتخاب Library یا Framework
* مقایسه Implementationها
* مقایسه چند Implementation
* Pull Request Review
* بررسی Pull Request
* انتخاب Framework
* تصمیم‌گیری درباره Design Pattern
* انتخاب Design Pattern
 
----
 
= Git Worktree و Agent Isolation =
 
اگر چند Agent همزمان روی یک Repository کار کنند، بهتر است تغییرات آن‌ها از یکدیگر جدا باشند.
 
ساختار پیشنهادی:
 
<pre>
Repository
├── main
├── worktree-claude
├── worktree-codex
├── worktree-cursor
├── worktree-antigravity
└── worktree-review
</pre>
 
این معماری اجازه می‌دهد چند Agent بدون overwrite کردن فایل‌های یکدیگر روی یک Repository کار کنند.
 
----
 
= نقش پیشنهادی Agentها =
 
یک نمونه معماری:
 
{| class="wikitable"
! Role
! Agent پیشنهادی
! وظیفه
|-
| Planner
| Claude Code / Codex
| تحلیل Task و طراحی Plan
|-
| Primary Coder
| Claude Code / Codex
| Implementation اصلی
|-
| Alternative Coder
| Cursor / OpenCode / Antigravity
| تولید Implementation جایگزین
|-
| Reviewer
| Agent متفاوت از Coder
| Code Review
|-
| Security Reviewer
| Codex / Claude
| بررسی Security
|-
| Judge
| مدل متفاوت از Coder
| امتیازدهی و انتخاب نتیجه
|}
 
'''پیشنهاد:''' تا حد امکان Agent یا مدلی که کد را تولید کرده است تنها Judge همان کد نباشد.
 
----
 
= معماری پیشنهادی Judge =
 
<pre>
                    Candidate
                        │
                        ↓
              Deterministic Checks
                        │
        ┌───────────────┼───────────────┐
        ↓              ↓              ↓
      Tests          Build          Security
        │              │              │
        └───────────────┼───────────────┘
                        ↓
                    LLM Review
                        │
            ┌───────────┼───────────┐
            ↓          ↓          ↓
        Judge A    Judge B    Judge C
            │          │          │
            └───────────┼───────────┘
                        ↓
                  Weighted Score
                        │
                        ↓
                  Final Decision
</pre>


----
----
Line 1,177: Line 1,445:
== Command Not Found ==
== Command Not Found ==


اگر خطایی مشابه زیر دریافت شد:
اگر:


<pre>
<pre>
The term 'xxxx' is not recognized as a name of a cmdlet,
The term 'xxxx' is not recognized
function, script file, or executable program.
</pre>
</pre>


ابتدا:
بررسی کنید:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Get-Command xxxx
Get-Command xxxx
</syntaxhighlight>
سپس:
<syntaxhighlight lang="powershell">
where.exe xxxx
where.exe xxxx
</syntaxhighlight>
</syntaxhighlight>
Line 1,198: Line 1,460:
----
----


= بررسی PATH =
== بررسی PATH ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 1,206: Line 1,468:
----
----


= پیدا کردن PATHهای تکراری =
== پیدا کردن PATHهای تکراری ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 1,215: Line 1,477:
     Select-Object Count, Name
     Select-Object Count, Name
</syntaxhighlight>
</syntaxhighlight>
اگر خروجی خالی باشد، Duplicate مشخصی توسط این بررسی پیدا نشده است.


----
----


= نمونه رفع مشکل PATH در Windows =
= بروزرسانی =
 
اگر یک CLI نصب شده ولی PowerShell آن را پیدا نمی‌کند، ابتدا محل فایل را پیدا کنید.
 
مثال برای VS Code:
 
<syntaxhighlight lang="powershell">
Get-ChildItem "C:\Program Files","$env:LOCALAPPDATA\Programs" `
    -Filter code.cmd `
    -Recurse `
    -ErrorAction SilentlyContinue |
    Select-Object FullName
</syntaxhighlight>
 
اگر مسیر پیدا شد می‌توان آن را به PATH اضافه کرد.
 
مثال:
 
<syntaxhighlight lang="powershell">
$vsCodePath = "$env:LOCALAPPDATA\Programs\Microsoft VS Code\bin"
 
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
 
$paths = @(
    $userPath -split ';' |
    Where-Object { $_ -and $_.Trim() }
)
 
if ($paths -notcontains $vsCodePath) {
 
    $newPath = ($paths + $vsCodePath) -join ';'
 
    [Environment]::SetEnvironmentVariable(
        "Path",
        $newPath,
        "User"
    )
}
 
if (($env:Path -split ';') -notcontains $vsCodePath) {
    $env:Path += ";$vsCodePath"
}
</syntaxhighlight>
 
سپس:
 
<syntaxhighlight lang="powershell">
code --version
</syntaxhighlight>
 
----
 
= بروزرسانی ابزارها =
 
== Claude Code ==
 
اگر از installer رسمی Claude استفاده شده است، روش update رسمی همان installer را ترجیح دهید.
 
در صورت نصب npm:
 
<syntaxhighlight lang="powershell">
npm install -g @anthropic-ai/claude-code@latest
</syntaxhighlight>
 
بررسی:
 
<syntaxhighlight lang="powershell">
claude --version
</syntaxhighlight>
 
----


== OpenAI Codex ==
== Codex ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
npm install -g @openai/codex@latest
npm install -g @openai/codex@latest
</syntaxhighlight>
بررسی:
<syntaxhighlight lang="powershell">
codex --version
codex --version
</syntaxhighlight>
</syntaxhighlight>
----


== OpenCode ==
== OpenCode ==
Line 1,310: Line 1,493:
<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
npm install -g opencode-ai@latest
npm install -g opencode-ai@latest
</syntaxhighlight>
بررسی:
<syntaxhighlight lang="powershell">
opencode --version
opencode --version
</syntaxhighlight>
</syntaxhighlight>
----


== Freebuff ==
== Freebuff ==
Line 1,324: Line 1,500:
<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
npm install -g freebuff@latest
npm install -g freebuff@latest
</syntaxhighlight>
بررسی:
<syntaxhighlight lang="powershell">
freebuff --version
freebuff --version
</syntaxhighlight>
</syntaxhighlight>
----


== Claw Orchestrator ==
== Claw Orchestrator ==
Line 1,338: Line 1,507:
<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
npm install -g @enderfga/claw-orchestrator@latest
npm install -g @enderfga/claw-orchestrator@latest
</syntaxhighlight>
بررسی:
<syntaxhighlight lang="powershell">
clawo --version
clawo --version
</syntaxhighlight>
</syntaxhighlight>
Line 1,349: Line 1,513:


= نصب سریع روی سیستم جدید =
= نصب سریع روی سیستم جدید =
پس از نصب Git، Node.js و npm می‌توان CLIها را به ترتیب نصب کرد.


== Claude Code ==
== Claude Code ==
Line 1,364: Line 1,526:
</syntaxhighlight>
</syntaxhighlight>


== Google Antigravity ==
== Antigravity ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 1,377: Line 1,539:
</syntaxhighlight>
</syntaxhighlight>


== OpenAI Codex ==
== Codex ==


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 1,393: Line 1,555:
<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
npm i -g @enderfga/claw-orchestrator
npm i -g @enderfga/claw-orchestrator
</syntaxhighlight>
== مجوز Install Scriptهای Claw Orchestrator ==
<syntaxhighlight lang="powershell">
npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user
</syntaxhighlight>
در صورت نیاز:
<syntaxhighlight lang="powershell">
cd "$env:APPDATA\npm\node_modules\@enderfga\claw-orchestrator"
npm rebuild re2
</syntaxhighlight>
</syntaxhighlight>


----
----


= بررسی نهایی بعد از نصب =
= بررسی نهایی =


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
Line 1,414: Line 1,589:
</syntaxhighlight>
</syntaxhighlight>


----
سپس Health Check:
 
= بررسی Authentication =
 
بعد از اینکه Health Check بدون مشکل اجرا شد، باید Authentication هر Agent نیز بررسی شود.
 
CLIها را حداقل یک بار اجرا کنید:


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
claude
.\AgenticDevOS-Check.ps1
</syntaxhighlight>
</syntaxhighlight>


<syntaxhighlight lang="powershell">
و در نهایت Server:
codex
</syntaxhighlight>


<syntaxhighlight lang="powershell">
<syntaxhighlight lang="powershell">
opencode
clawo serve
</syntaxhighlight>
</syntaxhighlight>
<syntaxhighlight lang="powershell">
cursor-agent
</syntaxhighlight>
<syntaxhighlight lang="powershell">
agy
</syntaxhighlight>
<syntaxhighlight lang="powershell">
freebuff
</syntaxhighlight>
هر Agent باید Login یا Authentication مربوط به Provider خود را با موفقیت انجام دهد.


----
----
Line 1,460: Line 1,613:
│                        ↓                        │
│                        ↓                        │
│                Claw Orchestrator                │
│                Claw Orchestrator                │
│                        │                        │
│                Web Dashboard                  │
│                        │                        │
│                        │                        │
│                Planner / Router                │
│                Planner / Router                │
Line 1,472: Line 1,627:
│    ├─────────── Antigravity ─────────────┤    │
│    ├─────────── Antigravity ─────────────┤    │
│    │                  │                  │    │
│    │                  │                  │    │
│    └────────────── Freebuff ─────────────┘     │
│    └──────────── Custom Engines ─────────┘     │
│                        │                        │
│                        │                        │
│                        ↓                        │
│                        ↓                        │
Line 1,501: Line 1,656:
! دستور
! دستور
|-
|-
| نسخه Claw Orchestrator
| Version
| <code>clawo --version</code>
| <code>clawo --version</code>
|-
|-
Line 1,507: Line 1,662:
| <code>clawo --help</code>
| <code>clawo --help</code>
|-
|-
| اجرای Server
| Server
| <code>clawo serve</code>
| <code>clawo serve</code>
|-
|-
| مشاهده Sessionها
| Dashboard
| <code>http://127.0.0.1:18796/dashboard</code>
|-
| Sessions
| <code>clawo session-list</code>
| <code>clawo session-list</code>
|-
|-
| وضعیت Session
| ساخت Session
| <code>clawo session-status NAME</code>
| <code>clawo session-start</code>
|-
|-
| ارسال Task
| ارسال Task
| <code>clawo session-send NAME "TASK"</code>
| <code>clawo session-send</code>
|-
| وضعیت Session
| <code>clawo session-status</code>
|-
|-
| توقف Session
| توقف Session
| <code>clawo session-stop NAME</code>
| <code>clawo session-stop</code>
|-
|-
| مشاهده Runها
| History
| <code>clawo runs</code>
| <code>clawo runs</code>
|-
|-
| مشاهده Agentها
| Agents
| <code>clawo agents-list</code>
| <code>clawo agents-list</code>
|-
|-
| مشاهده Skills
| Skills
| <code>clawo skills-list</code>
| <code>clawo skills-list</code>
|-
|-
| مشاهده Rules
| Rules
| <code>clawo rules-list</code>
| <code>clawo rules-list</code>
|}
|}
Line 1,539: Line 1,700:
= نتیجه‌گیری =
= نتیجه‌گیری =


هدف این معماری ساخت یک '''Agentic Development Environment''' با حداقل تعداد نرم‌افزارها و لایه‌های اضافی است.
هدف این معماری ساخت یک '''Agentic Development Environment''' با کمترین تعداد لایه‌های اضافی و بیشترین استفاده از Coding Agentهای موجود است.


Coding Agentهای اصلی:
Coding Agentهای مورد استفاده:


* Claude Code
* Claude Code
Line 1,548: Line 1,709:
* OpenCode
* OpenCode
* Google Antigravity
* Google Antigravity
* Freebuff
* Freebuff / Custom Agents


و لایه مرکزی:
لایه مرکزی:


'''Claw Orchestrator'''
'''Claw Orchestrator'''


معماری کلی:
جریان کاری نهایی:


<pre>
<pre>
Line 1,565: Line 1,726:
Multiple Coding Agents
Multiple Coding Agents
  ↓
  ↓
Git Isolation
Git Worktree Isolation
  ↓
  ↓
Build + Tests + Lint + Security
Build + Tests + Lint + Security
Line 1,576: Line 1,737:
</pre>
</pre>


این ساختار می‌تواند در آینده با موارد زیر توسعه داده شود:
این معماری در آینده می‌تواند با موارد زیر توسعه داده شود:


* MCP
* MCP
Line 1,591: Line 1,752:
* Automated Testing
* Automated Testing
* Model Routing
* Model Routing
* Agent Teams
* Forge
'''نکته مهم:''' Coding Agentها و Claw Orchestrator با سرعت زیادی توسعه پیدا می‌کنند. قبل از Upgrade، خروجی <code>--help</code> نسخه نصب‌شده و مستندات رسمی پروژه بررسی شود.


'''نکته مهم:''' Coding Agentها، CLIها و Claw Orchestrator پروژه‌هایی با توسعه سریع هستند. قبل از نصب یا Upgrade نسخه‌های آینده، مستندات رسمی و خروجی <code>--help</code> نسخه نصب‌شده را بررسی کنید.
[[Category:Artificial Intelligence]]
[[Category:Development]]
[[Category:Windows]]
[[Category:Agentic AI]]

Latest revision as of 18:53, 20 August 2026

راه‌اندازی Agentic Development Environment در Windows با Claw Orchestrator

این راهنما برای ساخت یک محیط Agentic Development روی Windows است که چند Coding Agent مختلف را توسط Claw Orchestrator مدیریت می‌کند.

هدف اصلی این معماری:

  • استفاده همزمان از چند Coding Agent
  • مدیریت Sessionهای Agentها
  • اجرای چند Agent روی یک پروژه
  • استفاده از Agentهای مختلف به عنوان Coder و Reviewer
  • ایجاد Multi-Agent Council
  • استفاده از LLM-as-a-Judge
  • جداسازی تغییرات Agentها با Git Worktree
  • انجام Build، Test، Lint و Security Check قبل از داوری LLM
  • نگهداری Run History
  • استفاده از Dashboard برای مدیریت سیستم

معماری کلی:

Windows
│
├── Git
├── Node.js / npm
│
├── Claude Code
├── OpenAI Codex
├── Cursor Agent
├── OpenCode
├── Google Antigravity
├── Freebuff
│
└── Claw Orchestrator
        │
        ├── Dashboard
        ├── Persistent Sessions
        ├── Multi-Agent
        ├── Skills
        ├── Rules
        ├── Teams
        ├── Council
        ├── Run Ledger
        └── LLM-as-a-Judge

پیش‌نیازها

قبل از نصب Agentها بهتر است ابزارهای زیر نصب شده باشند:

ابزار کاربرد پیشنهاد
Windows سیستم‌عامل Windows 10/11 x64
PowerShell Terminal و Automation PowerShell 7
Git Version Control آخرین نسخه پایدار
Node.js JavaScript Runtime Node.js 22+
npm Package Manager همراه Node.js
Python SDKهای Python اختیاری

بررسی پیش‌نیازها

$PSVersionTable.PSVersion

node --version
npm --version
git --version

بررسی مسیر executableها:

where.exe node
where.exe npm
where.exe git

نصب Coding Agentها

Claude Code

وب‌سایت رسمی:

Claude

نصب با PowerShell

irm https://claude.ai/install.ps1 | iex

نصب با CMD / curl

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

نصب با Winget

winget install Anthropic.ClaudeCode

بررسی نصب

claude --version

اجرا

claude

بررسی سلامت

claude doctor

بررسی PATH

where.exe claude
Get-Command claude

OpenAI Codex

صفحه Codex:

OpenAI Codex

نصب

npm install -g @openai/codex

یا:

npm i -g @openai/codex

بررسی

codex --version

اجرا

codex

Login

codex login

بررسی PATH

where.exe codex
Get-Command codex

Cursor Agent

وب‌سایت رسمی:

Cursor

نصب CLI

irm 'https://cursor.com/install?win32=true' | iex

بررسی

cursor-agent --version

Cursor ممکن است command کوتاه زیر را نیز ارائه کند:

agent

بررسی PATH

where.exe cursor-agent
where.exe agent

Google Antigravity

وب‌سایت رسمی:

Google Antigravity

نصب CLI با PowerShell

irm https://antigravity.google/cli/install.ps1 | iex

نصب با curl

curl -fsSL https://antigravity.google/cli/install.cmd -o install.cmd && install.cmd && del install.cmd

بررسی

agy --version

اجرا

agy

بررسی PATH

where.exe agy
Get-Command agy

Google Antigravity SDK

در صورت نیاز به SDK پایتون:

pip install google-antigravity

بررسی:

pip show google-antigravity

نکته: اگر فقط قصد استفاده از Coding Agent و Claw Orchestrator را دارید، معمولاً نیازی به نصب SDK پایتون نیست.


OpenCode

وب‌سایت رسمی:

OpenCode

تنظیم npm

npm config set allow-scripts=opencode-ai --location=user

نصب

npm install -g opencode-ai

یا:

npm i -g opencode-ai

بررسی

opencode --version

اجرا

opencode

بررسی PATH

where.exe opencode
Get-Command opencode

Freebuff

وب‌سایت:

Freebuff

ثبت‌نام

برای ثبت‌نام می‌توانید از Referral Link زیر استفاده کنید:

ثبت‌نام در Freebuff

نصب CLI

npm install -g freebuff

بررسی

freebuff --version

اجرا

freebuff

بررسی PATH

where.exe freebuff
Get-Command freebuff

نکته: اگر Freebuff integration مستقیم نداشته باشد، می‌توان اتصال آن به Orchestrator را از طریق Custom Engine بررسی کرد.


نصب Claw Orchestrator

Claw Orchestrator لایه مرکزی Orchestration این معماری است.

نصب =

npm install -g @enderfga/claw-orchestrator

بررسی نسخه =

clawo --version

Help =

clawo --help

نمونه دستورات:

clawo acp
clawo serve

clawo session-start
clawo session-send
clawo session-stop
clawo session-list
clawo session-status
clawo session-grep
clawo session-compact

clawo runs

clawo agents-list
clawo agents-create

clawo skills-list
clawo skills-create

clawo rules-list
clawo rules-create

clawo session-team-list
clawo session-team-send

Engineهای Claw Orchestrator

برای مشاهده Engineهای نسخه نصب‌شده:

clawo session-start --help

در نسخه 5.0.0 Engineهای زیر در CLI ارائه می‌شوند:

claude
codex
codex-app
gemini
agy
cursor
opencode
custom

نمونه:

clawo session-start my-agent --engine claude

مشکل npm Install Scripts

در نسخه‌های جدید npm ممکن است Install Script بعضی dependencyهای Claw Orchestrator به دلایل امنیتی Block شود.

نمونه:

npm warn install-scripts

openclaw
re2
@google/genai
tree-sitter-bash
protobufjs

در این شرایط ممکن است CLI کار کند ولی Server با خطایی مشابه زیر اجرا نشود:

Error: Cannot find module './build/Release/re2.node'

رفع مشکل RE2

اجازه اجرای Scriptهای موردنیاز:

npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user

بررسی:

npm config get allow-scripts

سپس:

cd "$env:APPDATA\npm\node_modules\@enderfga\claw-orchestrator"
npm rebuild re2

در صورت موفقیت:

rebuilt dependencies successfully

سپس Server را مجدداً اجرا کنید:

clawo serve

اجرای Standalone Server

برای اجرای Claw Orchestrator:

clawo serve

نمونه خروجی:

[ultraapp] runtime mode: host
[ultraapp] router on http://127.0.0.1:19000/forge/<slug>/

[embedded-server] Listening on http://127.0.0.1:18796
[embedded-server] Token file: C:\Users\USER\.openclaw\server-token

Standalone server running on http://127.0.0.1:18796

Press Ctrl+C to stop

Dashboard

پس از اجرای:

clawo serve

Claw Orchestrator آدرس Dashboard دارای Authentication Token را در Terminal نمایش می‌دهد.

ساختار URL:

http://127.0.0.1:18796/dashboard?token=YOUR_TOKEN

هشدار امنیتی:

Token واقعی را:

  • داخل Wiki قرار ندهید.
  • داخل Git Commit نکنید.
  • در Screenshot عمومی منتشر نکنید.
  • برای دیگران ارسال نکنید.

Token در فایل محلی زیر نگهداری می‌شود:

C:\Users\USERNAME\.openclaw\server-token

بعد از Authentication، آدرس پایه Dashboard:

http://127.0.0.1:18796/dashboard

Forge Router

هنگام اجرای Server ممکن است Router دیگری نیز اجرا شود:

http://127.0.0.1:19000/forge/<slug>/

این Router توسط بخش Forge مورد استفاده قرار می‌گیرد.


معماری Standalone

Claude Code ───────┐
Codex ─────────────┤
Cursor Agent ──────┤
OpenCode ──────────┤
Antigravity ───────┤
Custom Engine ─────┤
                   ↓
           Claw Orchestrator
                   │
        ┌──────────┼──────────┐
        ↓          ↓          ↓
     Sessions    Agents     Skills
        │          │          │
        └──────────┼──────────┘
                   ↓
                 Rules
                   │
                   ↓
              Dashboard

Health Check کامل

برای بررسی محیط، فایل زیر را ایجاد کنید:

AgenticDevOS-Check.ps1

و محتوای زیر را در آن قرار دهید:

$tools = @(
    @{ Name = "Node.js";           Command = "node";         Args = @("--version") }
    @{ Name = "npm";               Command = "npm";          Args = @("--version") }
    @{ Name = "Git";               Command = "git";          Args = @("--version") }

    @{ Name = "Claude Code";       Command = "claude";       Args = @("--version") }
    @{ Name = "Codex";             Command = "codex";        Args = @("--version") }
    @{ Name = "OpenCode";          Command = "opencode";     Args = @("--version") }
    @{ Name = "Cursor Agent";      Command = "cursor-agent"; Args = @("--version") }
    @{ Name = "Antigravity";       Command = "agy";          Args = @("--version") }
    @{ Name = "Freebuff";          Command = "freebuff";     Args = @("--version") }

    @{ Name = "Claw Orchestrator"; Command = "clawo";        Args = @("--version") }
)

$results = @()

function Write-Section {
    param([string]$Title)

    Write-Host ""
    Write-Host "============================================================" -ForegroundColor Cyan
    Write-Host " $Title" -ForegroundColor Cyan
    Write-Host "============================================================" -ForegroundColor Cyan
}

function Add-Result {
    param(
        [string]$Name,
        [string]$Status,
        [string]$Version = "",
        [string]$Path = ""
    )

    $script:results += [PSCustomObject]@{
        Name    = $Name
        Status  = $Status
        Version = $Version
        Path    = $Path
    }
}

Clear-Host

Write-Host ""
Write-Host "============================================================" -ForegroundColor Cyan
Write-Host "             AGENTIC DEV OS HEALTH CHECK" -ForegroundColor Cyan
Write-Host "============================================================" -ForegroundColor Cyan

Write-Section "CLI TOOLS"

foreach ($tool in $tools) {

    $command = Get-Command $tool.Command -ErrorAction SilentlyContinue

    if (-not $command) {

        Write-Host "[MISSING] " -ForegroundColor Red -NoNewline
        Write-Host $tool.Name

        Add-Result -Name $tool.Name -Status "MISSING"

        continue
    }

    try {

        $output = & $tool.Command @($tool.Args) 2>&1

        $version = (
            $output |
            Where-Object { $_ -ne $null } |
            Select-Object -First 1
        ).ToString().Trim()

        Write-Host "[OK]      " -ForegroundColor Green -NoNewline
        Write-Host "$($tool.Name) -> $version"

        Write-Host "          Path: " -ForegroundColor DarkGray -NoNewline
        Write-Host $command.Source -ForegroundColor DarkGray

        Add-Result `
            -Name $tool.Name `
            -Status "OK" `
            -Version $version `
            -Path $command.Source
    }
    catch {

        Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
        Write-Host "$($tool.Name) -> command exists but version check failed"

        Add-Result `
            -Name $tool.Name `
            -Status "WARNING" `
            -Path $command.Source
    }

    Write-Host ""
}

Write-Section "PATH CHECK"

$pathEntries = @(
    $env:Path -split ";" |
    ForEach-Object {
        $_.Trim().TrimEnd("\")
    } |
    Where-Object {
        $_
    }
)

$duplicatePaths = @(
    $pathEntries |
    Group-Object |
    Where-Object {
        $_.Count -gt 1
    }
)

if ($duplicatePaths.Count -eq 0) {

    Write-Host "[OK]      No duplicate PATH entries found." -ForegroundColor Green

}
else {

    Write-Host "[WARNING] Duplicate PATH entries found:" -ForegroundColor Yellow

    foreach ($duplicate in $duplicatePaths) {

        Write-Host "          [$($duplicate.Count)x] $($duplicate.Name)" `
            -ForegroundColor Yellow
    }
}

Write-Section "NPM CONFIGURATION"

try {

    $allowScripts = npm config get allow-scripts 2>$null

    Write-Host "allow-scripts:"
    Write-Host "  $allowScripts"

    $requiredScripts = @(
        "openclaw",
        "re2",
        "@google/genai",
        "tree-sitter-bash",
        "protobufjs"
    )

    $configuredScripts = @(
        $allowScripts -split "," |
        ForEach-Object {
            $_.Trim()
        }
    )

    foreach ($package in $requiredScripts) {

        if ($configuredScripts -contains $package) {

            Write-Host "[OK]      " -ForegroundColor Green -NoNewline
            Write-Host "$package install scripts allowed"

        }
        else {

            Write-Host "[WARNING] " -ForegroundColor Yellow -NoNewline
            Write-Host "$package is not in npm allow-scripts"
        }
    }

}
catch {

    Write-Host "[WARNING] Could not read npm configuration." `
        -ForegroundColor Yellow
}

Write-Section "CLAW ORCHESTRATOR"

$clawoCommand = Get-Command clawo -ErrorAction SilentlyContinue

if (-not $clawoCommand) {

    Write-Host "[MISSING] Claw Orchestrator is not installed." `
        -ForegroundColor Red

}
else {

    Write-Host "[OK]      Claw Orchestrator CLI found." `
        -ForegroundColor Green

    try {

        $npmRoot = (npm root -g).Trim()

        $clawoRoot = Join-Path `
            $npmRoot `
            "@enderfga\claw-orchestrator"

        Write-Host ""
        Write-Host "Package:"
        Write-Host "  $clawoRoot"

        if (Test-Path $clawoRoot) {

            Write-Host "[OK]      Claw Orchestrator package directory found." `
                -ForegroundColor Green
        }

        $re2File = Join-Path `
            $clawoRoot `
            "node_modules\re2\build\Release\re2.node"

        Write-Host ""
        Write-Host "RE2 Native Module:"

        if (Test-Path $re2File) {

            Write-Host "[OK]      re2.node found." `
                -ForegroundColor Green

            Write-Host "          $re2File" `
                -ForegroundColor DarkGray

        }
        else {

            Write-Host "[ERROR]   re2.node NOT FOUND." `
                -ForegroundColor Red

            Write-Host ""
            Write-Host "Fix:"
            Write-Host 'npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user'
            Write-Host "cd `"$clawoRoot`""
            Write-Host "npm rebuild re2"
        }

    }
    catch {

        Write-Host "[WARNING] Could not inspect Claw Orchestrator package." `
            -ForegroundColor Yellow
    }
}

Write-Section "CLAW SERVER"

$serverPort = 18796
$serverRunning = $false

try {

    $connection = Get-NetTCPConnection `
        -LocalPort $serverPort `
        -State Listen `
        -ErrorAction SilentlyContinue

    if ($connection) {

        $serverRunning = $true

        Write-Host "[OK]      " -ForegroundColor Green -NoNewline
        Write-Host "Claw server is listening on port $serverPort"

        Write-Host ""
        Write-Host "Server:"
        Write-Host "  http://127.0.0.1:$serverPort"

    }
    else {

        Write-Host "[INFO]    Claw server is not currently running." `
            -ForegroundColor Cyan

        Write-Host ""
        Write-Host "Start with:"
        Write-Host "  clawo serve"
    }

}
catch {

    Write-Host "[WARNING] Could not check server port." `
        -ForegroundColor Yellow
}

$tokenFile = Join-Path `
    $HOME `
    ".openclaw\server-token"

if (Test-Path $tokenFile) {

    Write-Host ""
    Write-Host "[OK]      Server token file exists." `
        -ForegroundColor Green

    Write-Host "          $tokenFile" `
        -ForegroundColor DarkGray
}

if ($serverRunning) {

    Write-Host ""
    Write-Host "Dashboard base URL:"
    Write-Host "  http://127.0.0.1:$serverPort/dashboard"

    Write-Host ""
    Write-Host "NOTE: Authentication token is intentionally not displayed." `
        -ForegroundColor DarkGray
}

Write-Section "SUMMARY"

$installed = @(
    $results |
    Where-Object {
        $_.Status -eq "OK"
    }
).Count

$warnings = @(
    $results |
    Where-Object {
        $_.Status -eq "WARNING"
    }
).Count

$missing = @(
    $results |
    Where-Object {
        $_.Status -eq "MISSING"
    }
).Count

Write-Host "CLI Tools OK : $installed"
Write-Host "Warnings     : $warnings"
Write-Host "Missing      : $missing"
Write-Host "Total        : $($tools.Count)"

Write-Host ""

if (($missing -eq 0) -and ($warnings -eq 0)) {

    Write-Host "[READY] Agentic Development environment is ready." `
        -ForegroundColor Green

}
elseif ($missing -eq 0) {

    Write-Host "[READY WITH WARNINGS] All CLI tools are installed." `
        -ForegroundColor Yellow

}
else {

    Write-Host "[NOT READY] Some required tools are missing." `
        -ForegroundColor Red
}

Write-Host ""

if ($serverRunning) {

    Write-Host "Claw Server : RUNNING" `
        -ForegroundColor Green

}
else {

    Write-Host "Claw Server : STOPPED" `
        -ForegroundColor Cyan
}

Write-Host ""

اجرای Health Check

.\AgenticDevOS-Check.ps1

اگر Execution Policy مانع اجرا شد:

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

سپس:

.\AgenticDevOS-Check.ps1

موارد بررسی‌شده توسط Health Check

بررسی توضیح
Node.js نسخه و PATH
npm نسخه و PATH
Git نسخه و PATH
Claude Code نسخه و PATH
Codex نسخه و PATH
OpenCode نسخه و PATH
Cursor Agent نسخه و PATH
Antigravity نسخه و PATH
Freebuff نسخه و PATH
Claw Orchestrator نسخه و PATH
Duplicate PATH پیدا کردن مسیرهای تکراری
npm allow-scripts بررسی مجوز Native Install Scripts
RE2 بررسی وجود re2.node
Claw Server بررسی Port 18796
Server Token بررسی وجود Token File بدون نمایش Token
Dashboard نمایش URL پایه Dashboard

مدیریت Sessionها

مشاهده Sessionها

clawo session-list

ساخت Session با Claude

clawo session-start claude-main `
    --engine claude `
    --cwd "D:\Source\MyProject"

Codex

clawo session-start codex-main `
    --engine codex `
    --cwd "D:\Source\MyProject"

Cursor

clawo session-start cursor-main `
    --engine cursor `
    --cwd "D:\Source\MyProject"

OpenCode

clawo session-start opencode-main `
    --engine opencode `
    --cwd "D:\Source\MyProject"

Antigravity

clawo session-start agy-main `
    --engine agy `
    --cwd "D:\Source\MyProject"

ارسال Task

مثال:

clawo session-send claude-main "Analyze this repository. Do not modify files. Explain the architecture and potential problems."

وضعیت Session

clawo session-status claude-main

جستجو در History

clawo session-grep claude-main "error"

Compact کردن Session

clawo session-compact claude-main

توقف Session

clawo session-stop claude-main

Run Ledger

clawo runs

Run Ledger تاریخچه اجراهای Agentها را نگهداری می‌کند.


Agents

clawo agents-list

برای ساخت Agent:

clawo agents-create --help

Skills

clawo skills-list

برای ساخت Skill:

clawo skills-create --help

Rules

clawo rules-list

برای ساخت Rule:

clawo rules-create --help

Agent Teams

مشاهده اعضای Team:

clawo session-team-list SESSION_NAME

ارسال پیام:

clawo session-team-send SESSION_NAME TEAMMATE "Review this implementation."

Git Worktree و Isolation

برای اجرای همزمان چند Agent بهتر است هر Agent در Worktree مستقل کار کند.

Repository
│
├── main
│
├── worktree-claude
│
├── worktree-codex
│
├── worktree-cursor
│
├── worktree-antigravity
│
└── worktree-review

Claw Orchestrator نیز Option مربوط به Worktree دارد:

clawo session-start --help

Option:

-w, --worktree [name]

LLM-as-a-Judge

یکی از اهداف اصلی این معماری استفاده از Agentهای مختلف برای تولید چند Solution و سپس ارزیابی آن‌ها است.

                       TASK
                         │
                         ↓
                 Claw Orchestrator
                         │
        ┌────────────────┼────────────────┐
        ↓                ↓                ↓
  Claude Code          Codex         Antigravity
        │                │                │
        ↓                ↓                ↓
   Solution A       Solution B       Solution C
        │                │                │
        └────────────────┼────────────────┘
                         ↓
                  Automated Checks
                         │
          ┌──────────────┼──────────────┐
          ↓              ↓              ↓
        Build           Tests          Lint
          │              │              │
          └──────────────┼──────────────┘
                         ↓
                  Security Check
                         ↓
                     Benchmark
                         ↓
                  Multi-Agent Review
                         ↓
                    LLM Judge
                         ↓
                  Score / Consensus
                         ↓
                    Best Result

ترتیب پیشنهادی ارزیابی

LLM نباید تنها معیار انتخاب بهترین Implementation باشد.

ترتیب پیشنهادی:

Candidate
   │
   ↓
Build
   │
   ↓
Unit Tests
   │
   ↓
Integration Tests
   │
   ↓
Lint
   │
   ↓
Type Check
   │
   ↓
Security Check
   │
   ↓
Benchmark
   │
   ↓
LLM Review
   │
   ↓
Final Score

نقش Agentها

Role Agent پیشنهادی وظیفه
Planner Claude / Codex تحلیل Task
Primary Coder Claude / Codex Implementation اصلی
Alternative Coder Cursor / OpenCode / Antigravity Implementation جایگزین
Reviewer Agent متفاوت از Coder Code Review
Security Reviewer Claude / Codex بررسی Security
Judge مدل متفاوت از تولیدکننده امتیازدهی

بهتر است مدلی که Solution را تولید کرده است تنها Judge همان Solution نباشد.


Multi-Agent Council

                    Problem
                       │
                       ↓
                Orchestrator
                       │
          ┌────────────┼────────────┐
          ↓            ↓            ↓
       Claude        Codex       Agent C
          │            │            │
          ↓            ↓            ↓
       Plan A         Plan B       Plan C
          │            │            │
          └────────────┼────────────┘
                       ↓
                  Cross Review
                       ↓
                     Vote
                       ↓
                  Consensus
                       ↓
                 Final Decision

کاربردها:

  • Architecture Design
  • Code Review
  • Refactoring
  • Debugging
  • Security Review
  • Performance Optimization
  • مقایسه Implementationها
  • Pull Request Review
  • انتخاب Framework
  • انتخاب Design Pattern

Troubleshooting

Command Not Found

اگر:

The term 'xxxx' is not recognized

بررسی کنید:

Get-Command xxxx
where.exe xxxx

بررسی PATH

$env:Path -split ';'

پیدا کردن PATHهای تکراری

$env:Path -split ';' |
    ForEach-Object { $_.Trim().TrimEnd('\') } |
    Group-Object |
    Where-Object Count -gt 1 |
    Select-Object Count, Name

بروزرسانی

Codex

npm install -g @openai/codex@latest
codex --version

OpenCode

npm install -g opencode-ai@latest
opencode --version

Freebuff

npm install -g freebuff@latest
freebuff --version

Claw Orchestrator

npm install -g @enderfga/claw-orchestrator@latest
clawo --version

نصب سریع روی سیستم جدید

Claude Code

irm https://claude.ai/install.ps1 | iex

Cursor Agent

irm 'https://cursor.com/install?win32=true' | iex

Antigravity

irm https://antigravity.google/cli/install.ps1 | iex

OpenCode

npm config set allow-scripts=opencode-ai --location=user
npm i -g opencode-ai

Codex

npm i -g @openai/codex

Freebuff

npm i -g freebuff

Claw Orchestrator

npm i -g @enderfga/claw-orchestrator

مجوز Install Scriptهای Claw Orchestrator

npm config set allow-scripts=openclaw,re2,@google/genai,tree-sitter-bash,protobufjs --location=user

در صورت نیاز:

cd "$env:APPDATA\npm\node_modules\@enderfga\claw-orchestrator"
npm rebuild re2

بررسی نهایی

node --version
npm --version
git --version

claude --version
codex --version
opencode --version
cursor-agent --version
agy --version
freebuff --version

clawo --version

سپس Health Check:

.\AgenticDevOS-Check.ps1

و در نهایت Server:

clawo serve

معماری نهایی Agentic Development OS

┌─────────────────────────────────────────────────┐
│              Windows Development OS             │
│                                                 │
│                 Developer / User                │
│                        │                        │
│                        ↓                        │
│                Claw Orchestrator                │
│                        │                        │
│                 Web Dashboard                   │
│                        │                        │
│                Planner / Router                 │
│                        │                        │
│     ┌──────────────────┼──────────────────┐     │
│     │                  │                  │     │
│     ↓                  ↓                  ↓     │
│ Claude Code          Codex          Cursor Agent│
│     │                  │                  │     │
│     ├────────────── OpenCode ─────────────┤     │
│     │                  │                  │     │
│     ├─────────── Antigravity ─────────────┤     │
│     │                  │                  │     │
│     └──────────── Custom Engines ─────────┘     │
│                        │                        │
│                        ↓                        │
│                Git Worktree Isolation           │
│                        │                        │
│                        ↓                        │
│               Automated Validation              │
│                        │                        │
│          Build / Test / Lint / Security         │
│                        │                        │
│                        ↓                        │
│                Multi-Agent Review               │
│                        │                        │
│                        ↓                        │
│                  LLM-as-a-Judge                 │
│                        │                        │
│                        ↓                        │
│                    Best Result                  │
└─────────────────────────────────────────────────┘

خلاصه دستورات مهم

کار دستور
Version clawo --version
Help clawo --help
Server clawo serve
Dashboard http://127.0.0.1:18796/dashboard
Sessions clawo session-list
ساخت Session clawo session-start
ارسال Task clawo session-send
وضعیت Session clawo session-status
توقف Session clawo session-stop
History clawo runs
Agents clawo agents-list
Skills clawo skills-list
Rules clawo rules-list

نتیجه‌گیری

هدف این معماری ساخت یک Agentic Development Environment با کمترین تعداد لایه‌های اضافی و بیشترین استفاده از Coding Agentهای موجود است.

Coding Agentهای مورد استفاده:

  • Claude Code
  • OpenAI Codex
  • Cursor Agent
  • OpenCode
  • Google Antigravity
  • Freebuff / Custom Agents

لایه مرکزی:

Claw Orchestrator

جریان کاری نهایی:

Task
 ↓
Claw Orchestrator
 ↓
Planner / Router
 ↓
Multiple Coding Agents
 ↓
Git Worktree Isolation
 ↓
Build + Tests + Lint + Security
 ↓
Multi-Agent Review
 ↓
LLM-as-a-Judge
 ↓
Best Result

این معماری در آینده می‌تواند با موارد زیر توسعه داده شود:

  • MCP
  • Local LLM
  • CI/CD
  • Security Agents
  • Automated Code Review
  • Pull Request Review
  • Custom Agents
  • Custom Skills
  • Custom Rules
  • Multi-Agent Council
  • Benchmarking
  • Automated Testing
  • Model Routing
  • Agent Teams
  • Forge

نکته مهم: Coding Agentها و Claw Orchestrator با سرعت زیادی توسعه پیدا می‌کنند. قبل از Upgrade، خروجی --help نسخه نصب‌شده و مستندات رسمی پروژه بررسی شود.