---
wave: 1
depends_on: []
files_modified:
  - ".agent/scripts/sync_vendors.bat"
  - ".agent/scripts/sync_vendors.sh"
  - ".agent/scripts/extract_skills.js"
  - "bootstrap.bat"
  - "bootstrap.sh"
autonomous: true
---

# Phase 1: Zero-Pollution Pipeline Stabilization

## Objective
Fix the Master-Satellite synchronization pipeline to natively extract GSD skills, UI data, and Python MCP dependencies so that satellite repositories bootstrap via zero-click.

## Verification Criteria
- [ ] Running `bootstrap.bat` attempts to install Python `requirements.txt` targets (`browser_use`, `claude-mem`).
- [ ] Running `sync_vendors.bat` successfully runs `get-shit-done-cc` generator and Git tracks `.agent/skills/gsd-*/` and `.agent/get-shit-done/`.
- [ ] `extract_skills.js` generated `.gitignore` whitelists `!gsd-*/`.

## must_haves
- [ ] `sync_vendors.bat` and `sync_vendors.sh` must execute `npm install`, `npx uipro update` and `npx get-shit-done-cc --antigravity --local`.
- [ ] `bootstrap.bat` and `bootstrap.sh` must execute `pip install -r requirements.txt` for Python components if Python env exists.
- [ ] GSD execution binaries and folders must be tracked via `git add .agent/get-shit-done/`.

---

<task>
<read_first>
- .agent/scripts/sync_vendors.bat
- .agent/scripts/sync_vendors.sh
</read_first>
<action>
Add the local GSD extraction and uipro updating mechanism directly inside `sync_vendors.bat` and `sync_vendors.sh`. 
For the bash script (`sync_vendors.sh`), under step `[2/5] 패키지 업데이트 및 GSD, UI-UX-PRO-MAX 동기화...`:
Add:
```bash
cd .agent/env
npm install
npm update get-shit-done-cc uipro-cli
npx uipro update
npx get-shit-done-cc --antigravity --local
cd ../..
```
For the batch script (`sync_vendors.bat`), under a new step for package updates:
Add:
```bat
cd .agent\env
call npm install
call npm update get-shit-done-cc uipro-cli
call npx uipro update
call npx get-shit-done-cc --antigravity --local
cd ..\..
```
Also, change the git commit logic to track GSD:
Change `git add .agent/vendor/ .agent/skills/ .gitmodules` to `git add .agent/vendor/ .agent/skills/ .agent/get-shit-done/ .gitmodules`
</action>
<acceptance_criteria>
`grep "npx get-shit-done-cc --antigravity --local" .agent/scripts/sync_vendors.bat` exits 0.
`grep "git add" .agent/scripts/sync_vendors.bat | grep ".agent/get-shit-done/"` exits 0.
`grep "npx get-shit-done-cc --antigravity --local" .agent/scripts/sync_vendors.sh` exits 0.
`grep "git add" .agent/scripts/sync_vendors.sh | grep ".agent/get-shit-done/"` exits 0.
</acceptance_criteria>
</task>

<task>
<read_first>
- .agent/scripts/extract_skills.js
</read_first>
<action>
Modify `extract_skills.js` to whitelist `gsd-*/` skill folders in the generated `.gitignore`.
Find `const gitignoreContent = [` and add `'!gsd-*/',` below `'!mini-swe/',`.
</action>
<acceptance_criteria>
`grep "!gsd-\*/" .agent/scripts/extract_skills.js` exits 0.
</acceptance_criteria>
</task>

<task>
<read_first>
- bootstrap.bat
</read_first>
<action>
Add Python MCP auto-setup logic to `bootstrap.bat` right after the node dependencies step.
Add:
```bat
echo [4/5] Checking and Installing Python MCP Dependencies...
if defined AGENT_PYTHON_PATH (
    echo    -^> Using AGENT_PYTHON_PATH: %AGENT_PYTHON_PATH%
    if exist ".agent\vendor\browser_use\requirements.txt" (
        "%AGENT_PYTHON_PATH%" -m pip install -r ".agent\vendor\browser_use\requirements.txt"
    )
    if exist ".agent\services\claude-mem\requirements.txt" (
        "%AGENT_PYTHON_PATH%" -m pip install -r ".agent\services\claude-mem\requirements.txt"
    )
    if exist ".agent\services\mini-swe\requirements.txt" (
        "%AGENT_PYTHON_PATH%" -m pip install -r ".agent\services\mini-swe\requirements.txt"
    )
) else (
    echo    -^> Warning: AGENT_PYTHON_PATH is not defined. Skipping Python dependencies installation.
)
```
Update the final step text `[4/4]` to `[5/5]` appropriately.
</action>
<acceptance_criteria>
`grep "AGENT_PYTHON_PATH" bootstrap.bat` exits 0.
`grep "pip install -r" bootstrap.bat` exits 0.
</acceptance_criteria>
</task>

<task>
<read_first>
- bootstrap.sh
</read_first>
<action>
Add Python MCP auto-setup logic to `bootstrap.sh` right after the node dependencies step.
Add:
```bash
echo "[4/5] Checking and Installing Python MCP Dependencies..."
if [ -n "$AGENT_PYTHON_PATH" ]; then
    echo "   -> Using AGENT_PYTHON_PATH: $AGENT_PYTHON_PATH"
    if [ -f ".agent/vendor/browser_use/requirements.txt" ]; then
        "$AGENT_PYTHON_PATH" -m pip install -r ".agent/vendor/browser_use/requirements.txt"
    fi
    if [ -f ".agent/services/claude-mem/requirements.txt" ]; then
        "$AGENT_PYTHON_PATH" -m pip install -r ".agent/services/claude-mem/requirements.txt"
    fi
    if [ -f ".agent/services/mini-swe/requirements.txt" ]; then
        "$AGENT_PYTHON_PATH" -m pip install -r ".agent/services/mini-swe/requirements.txt"
    fi
else
    echo "   -> Warning: AGENT_PYTHON_PATH is not defined. Skipping Python dependencies installation."
fi
```
Update the final step text `[4/4]` to `[5/5]` appropriately.
</action>
<acceptance_criteria>
`grep "AGENT_PYTHON_PATH" bootstrap.sh` exits 0.
`grep "pip install -r" bootstrap.sh` exits 0.
</acceptance_criteria>
</task>
