| allowed-tools | ["Read","Write","Edit","Bash","Grep","Glob"] |
| description | Use when .hxsk/.bootstrap-version is missing (fresh install) or exists (verify/update) to initialize HExoskeleton. |
| name | bootstrap |
| trigger | ํ๋ก์ ํธ ์ด๊ธฐํ, ํ๋ก์ ํธ ์
์
, ์ฒ์ ์ค์ , ์
๋ฐ์ดํธ, ๊ฐฑ์ , project setup, initialize project, after cloning, update, refresh, bootstrap ์คํ, bootstrap.sh, ํ๊ฒฝ ์ค์ , ์์คํ
์๊ตฌ์ฌํญ ํ์ธ, prerequisite check, fresh install, verify mode, update mode, ๋ฉฑ๋ฑ์ฑ ์คํ, idempotent setup, .env ์์ฑ, ๋ฉ๋ชจ๋ฆฌ ์ด๊ธฐํ, memory init, ํ๋ก์ ํธ ์ค๋น, project ready, converge, ์ํ ๊ฐ์ง, ์ํ ํ์ธ, ์ค์น ๋ชจ๋ ๊ฐ์ง, bootstrap ์คํจ, bootstrap fail, exit code 1, system prerequisite missing, ํ์ ์๊ตฌ์ฌํญ ๋๋ฝ, codebase mapper ์คํ, codebase analysis, .hxsk ๊ตฌ์กฐ ํ์ธ, .hxsk directory check, ๋ฉ๋ชจ๋ฆฌ ๋๋ ํ ๋ฆฌ ์์ฑ, memory directory create, ์ํ ๋ณด๊ณ ์ ํ์ธ, status report, result passed, project ready ํ์ธ, fresh mode ์คํ, verify mode ์คํ, update mode ์คํ, idempotent convergence, ์๋ ด ์์ง ์คํ, ํ๊ฒฝ ๋ณ์ ๋ณต์ฌ, env example copy, ๋ฉ๋ชจ๋ฆฌ ์ ์ฅ ์คํจ, memory store fail, ๊ฒฝ๊ณ ์ฒ๋ฆฌ, warn handling, ์๋ฌ ๋ณด๊ณ , error reporting, ์ด๊ธฐ ์ค์น ๋ชจ๋, ์ด๊ธฐํ ๋ชจ๋, ํ๋ก์ ํธ ์ปจํ
์คํธ ์ด๊ธฐํ, project context init, ์คํ ๋ถ์, stack analysis, ์ํคํ
์ฒ ๋ถ์, architecture analysis |
| version | 5.1.0 |
Quick Reference
- ์คํ:
bash .hxsk/scripts/bootstrap.sh๋ก ์์ (๋ชจ๋ ์๋ ๊ฐ์ง)
- ์ฆ์ ์ค๋จ: Step 1์์
[FAIL] ๋๋ exit code 1 ๋ฐ์ ์
- ๊ฒฝ๊ณ ์งํ: codebase-mapper ์คํจ (FAIL) ๋๋ ๋ฉ๋ชจ๋ฆฌ ์ ์ฅ ์คํจ (WARN) ์ ๋ณด๊ณ ๊น์ง ๊ณ์
- ์๋ฃ ์กฐ๊ฑด: ์ต์ข
๋ณด๊ณ ์
RESULT: PASSED ํ์ธ ์ ํ๋ก์ ํธ READY
- ํ์ธ:
.hxsk/.bootstrap-version ํ์ผ ์์ฑ ์ฌ๋ถ๋ก ์ํ ๊ฒ์ฆ
Iron Laws
- NO BOOTSTRAP EXECUTION WITHOUT STATE DETECTION FIRST
- NO ENVIRONMENT SETUP WITHOUT PREREQUISITE VERIFICATION FIRST
- NO PROCESS TERMINATION WITHOUT ERROR REPORTING FIRST
- NO PROJECT READY DECLARATION WITHOUT FINAL STATUS REPORT FIRST
- NO MEMORY STORAGE FAILURE WITHOUT CONTINUATION TO REPORTING FIRST
- NO PROJECT READY DECLARATION WITHOUT CODEBASE ANALYSIS SUCCESS FIRST
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)