| name | bootstrap |
| description | Idempotent project setup โ fresh install, update, or verify via convergence engine |
| version | 5.1.0 |
| allowed-tools | ["Read","Write","Edit","Bash","Grep","Glob"] |
| trigger | ํ๋ก์ ํธ ์ด๊ธฐํ, ํ๋ก์ ํธ ์
์
, ์ฒ์ ์ค์ , ์
๋ฐ์ดํธ, ๊ฐฑ์ , project setup, initialize project, after cloning, update, refresh |
Quick Reference
- ์์:
bash .hxsk/scripts/bootstrap.sh (๋ฉฑ๋ฑ โ ๋ฐ๋ณต ์คํ ์์ )
- ๋ชจ๋: fresh(์ด๊ธฐ) / verify(๊ฒ์ฆ) / update(๊ฐฑ์ ) โ
.hxsk/.bootstrap-version์ผ๋ก ์๋ ๊ฐ์ง
- Output:
[NEW] [UPDATED] [OK] [PASS] [FAIL] [WARN] [SKIP] ํ๊ทธ
- 2-hop:
[NEW]/[UPDATED] ํญ๋ชฉ์ ๊ด๋ จ ์ปดํฌ๋ํธ ์๋ ํ์
- ๋ฉ๋ชจ๋ฆฌ ์ ์ฅ:
md-store-memory.sh ๋ก .hxsk/memories/bootstrap/์ ๊ธฐ๋ก
Skill: Bootstrap
Goal: Idempotent project setup โ detect state, converge to target, report delta.
Scope: ์์ bash ์คํฌ๋ฆฝํธ ๊ธฐ๋ฐ. ์ธ๋ถ ์ข
์์ฑ ์์. ๋ชจ๋ ์์ด์ ํธ์์ ์คํ ๊ฐ๋ฅ.
You are a bootstrap orchestrator. Your job is to make an HExoskeleton project fully operational,
whether it's a fresh clone or an existing installation being updated.
Core responsibilities:
- Detect install mode (fresh / verify / update) via .hxsk/.bootstrap-version
- Verify system prerequisites and project structure
- Report changes with [NEW]/[UPDATED]/[OK] tags
- Provide 2-hop context for new or changed components
- Store bootstrap state in
.hxsk/memories/
Procedure
Step 0: ๋ชจ๋ ๊ฐ์ง
test -f .hxsk/.bootstrap-version && echo "EXISTS" || echo "FRESH"
- ํ์ผ ์์ โ ์ด๊ธฐ ์ค์น ๋ชจ๋. Step 1~7 ์ ์ฒด ์คํ.
- ํ์ผ ์์ โ
bash .hxsk/scripts/bootstrap.sh ์คํ. ์คํฌ๋ฆฝํธ๊ฐ ์๋์ผ๋ก verify/update ํ๋ณ.
- ๋ชจ๋ ํญ๋ชฉ
[OK] โ ์๋ฃ
[NEW]/[UPDATED] ์์ โ Step 6 (๋ฉ๋ชจ๋ฆฌ ์ ์ฅ) + Step 7 (๋ณด๊ณ ) ์คํ
Step 1: System Prerequisites Check
Run the idempotent convergence engine:
bash .hxsk/scripts/bootstrap.sh
bootstrap.sh v5.1.0 ์ถ๋ ฅ ํ๊ทธ:
[NEW] โ ์๋ก ์์ฑ๋ ์ปดํฌ๋ํธ (โณ ๊ด๋ จ: 2-hop ์ปจํ
์คํธ)
[UPDATED] โ ๋ณ๊ฒฝ ๊ฐ์ง๋ ์ปดํฌ๋ํธ (โณ ๊ด๋ จ: 2-hop ์ปจํ
์คํธ)
[OK] โ ๋ณ๊ฒฝ ์์, ์ ์
[PASS] โ ์์คํ
์๊ตฌ์ฌํญ ์ถฉ์กฑ
[FAIL] โ ํ์ ์๊ตฌ์ฌํญ ๋ฏธ์ถฉ์กฑ
[WARN] โ ์ ํ ์๊ตฌ์ฌํญ ๋ฏธ์ถฉ์กฑ
[SKIP] โ ํด๋น ์์
If exit code 1: STOP. Display the failing checks and provide installation instructions.
If exit code 0: Continue. .hxsk/.bootstrap-version ์๋ ์์ฑ/๊ฐฑ์ ๋จ.
Step 2: Environment Setup
Copy .env.example to .env if .env does not already exist:
if [ ! -f .env ]; then
cp .env.example .env
echo "Created .env from .env.example"
else
echo ".env already exists"
fi
bootstrap.sh๊ฐ ์ด๋ฏธ ์ด ์์
์ ์ํํฉ๋๋ค. Step 1์์ [NEW] .env๊ฐ ์ถ๋ ฅ๋์์ผ๋ฉด ๊ฑด๋๋ฐ์ธ์.
Step 3: Memory Directory Verification
Verify .hxsk/memories/ ๋๋ ํ ๋ฆฌ ๊ตฌ์กฐ:
ls .hxsk/memories/ | wc -l
If missing: Create directories:
mkdir -p .hxsk/memories/{architecture-decision,root-cause,debug-eliminated,debug-blocked,health-event,session-handoff,execution-summary,deviation,pattern-discovery,bootstrap,session-summary,session-snapshot,security-finding,general,_schema}
bootstrap.sh๊ฐ ์ด๋ฏธ ์ด ์์
์ ์ํํฉ๋๋ค. Step 1์์ [NEW] .hxsk/memories/๊ฐ ์ถ๋ ฅ๋์์ผ๋ฉด ๊ฑด๋๋ฐ์ธ์.
Step 4: Context Structure Initialization
Verify context management structure:
.hxsk/
โโโ reports/ # Analysis reports (REPORT-*.md)
โโโ research/ # Research documents (RESEARCH-*.md)
โโโ archive/ # Monthly archives
โโโ issues/archive/ # Completed issue archive
โโโ PATTERNS.md # Core patterns (2KB limit)
โโโ context-config.yaml # Cleanup rules
bootstrap.sh๊ฐ ์๋ ์์ฑํฉ๋๋ค.
Step 5: Codebase Analysis
Delegate to the codebase-mapper skill to analyze the project:
.hxsk/ARCHITECTURE.md
.hxsk/STACK.md
If codebase-mapper fails: Mark FAIL. Continue to Step 6.
Step 6: Memory Storage
Store the bootstrap record:
bash .hxsk/hooks/md-store-memory.sh \
"Project Bootstrap" \
"Bootstrap completed. System prerequisites verified. Memory initialized." \
"bootstrap,init,setup" \
"bootstrap" \
"bootstrap,init,setup,project" \
"Initial project bootstrap completed successfully"
If memory store fails: Mark WARN. Continue to Step 7.
Step 7: Status Report
bootstrap.sh๊ฐ ์ด๋ฏธ ๊ตฌ์กฐํ๋ ๋ณด๊ณ ์๋ฅผ ์ถ๋ ฅํฉ๋๋ค:
================================================================
BOOTSTRAP v5.1.0
MODE: fresh | verify | update (vX.X.X โ v5.1.0)
================================================================
...
MODE: {mode} | PASS: N FAIL: N WARN: N SKIP: N NEW: N UPDATED: N
RESULT: ALL REQUIRED CHECKS PASSED / FAILED
================================================================
RESULT = PASSED โ ํ๋ก์ ํธ READY.
RESULT = FAILED โ NEEDS ATTENTION.
Error Handling
| Error | Action |
|---|
| System prerequisite missing | STOP at Step 1. Print install commands |
| Memory directory missing | Auto-create (bootstrap.sh handles) |
| Schema files missing | Copy from templates or create minimal versions |
| codebase-mapper fails | FAIL the step, continue |
| Memory store fails | WARN the step, continue |
Scripts
.hxsk/scripts/bootstrap.sh: Idempotent convergence engine (fresh/verify/update 3-mode)
.hxsk/scripts/detect-language.sh: Language, package manager detection functions (optional)