Skip to content

명령 레퍼런스: 로컬 작업 ​

로컬 프로젝트를 분석/계획/적용/검증하는 명령들이에요. 이 명령들은 server access 없이 동작하지만, --submit/--include-server를 쓰면 server-backed global binding(--api-base-url, --project-ref, --environment)이 필요해요.

pob inspect ​

로컬 프로젝트 인벤토리/분석.

옵션필수규칙
--pathno (기본 .)symlink root 금지
--submitnoserver analysis 저장. project/environment/credential 필요
--idempotency-key--submit 시 필수cliid_[A-Za-z0-9_-]{22,64}, CLI가 생성하지 않음
--max-filesno (기본 10000)1..50000
--max-bytesno (기본 33554432)1024..134217728

스캔 규칙:

  • .git, node_modules, dist, build, .next, .nuxt, target, .pob 제외. symlink를 따라가지 않아요.
  • 파일 내용은 서버/출력에 복사하지 않아요. path, size, sha256, 분류만.
  • inventory_digest는 project-relative POSIX path를 ASCII byte-order로 정렬해 <path>\0<sha256hex>\0<size>\n로 연결한 UTF-8 bytes의 lowercase hex SHA-256이에요.
  • 한도 초과는 부분 결과를 보고하지 않고 exit 8 resource_limit_exceeded + status=blocked.
sh
pob inspect --path . --json

성공 result 예시:

json
{
  "project_root": "project_root",
  "inventory_digest": "9f2c…hex…",
  "file_count": 128,
  "total_bytes": 1048576,
  "stack_classification": "nodejs_typescript",
  "integration_level": "unknown",
  "multiplayer_readiness": "unknown",
  "payment_readiness": "unknown",
  "manifest_state": "present",
  "server_analysis_ref": null
}

unknown을 supported로 바꾸지 않는 것이 계약이에요.

pob init — 현재 BLOCKED ​

새 integration skeleton 생성. --template은 static_game 또는 typescript_game.

현재 상태

exact template file list를 닫는 계약이 없어 exit 8 contract_dependency_blocked를 반환해요. 실행되지 않아요.

pob plan ​

inspect 결과로 closed integration plan 생성.

옵션필수규칙
--pathno
--goalrepeatable, 기본 base_sdkbase_sdk/multiplayer/test_payment만
--outputno.pob/plans/ 아래 single file, overwrite 금지
  • 실행할 때마다 inspect를 내부에서 다시 수행해요.
  • plan 파일은 정확히 contract_version, plan_format_version=cli-integration-plan/v1, plan_digest, plan 네 top-level 필드만 가져요.
  • plan_digest는 plan object의 RFC 8785 canonical bytes의 SHA-256이에요.
  • --output 쓰기는 local mutation → checkpoint와 dry-run 규칙 적용.
sh
pob plan --path . --goal base_sdk --output .pob/plans/plan-1.json --json

각 step은 step_id, level(level_a/level_b/level_c), action, target_paths, approval_required, reversible, depends_on만 가져요. Level C는 자동 적용 대상이 아니에요.

현재 상태

생성되는 plan은 수동 Level B/C step만 포함해요. Level A 자동 mutation을 만들지 않아요 — 과장 없이 계획일 뿐이에요.

pob integrate ​

plan의 Level A deterministic 로컬 변경만 적용.

옵션필수규칙
--plan-fileyespob plan --output이 생성한 파일
--dry-runno변경 계획만

검증 규칙:

  • plan wrapper schema나 plan_digest 재계산이 다르면 exit 10 resource_conflict.
  • plan의 inventory_digest와 현재 inventory digest가 다르면(stale plan) exit 10 resource_conflict. 부분 적용 없음.
  • Level B/C step은 skipped로 보고. 외부 패키지 설치, npm registry access, shell 실행, code generation은 Level A가 아니에요.
  • checkpoint 생성 후 atomic write. 실패 시 checkpoint restore 시도 — restore 성공이면 exit 7 operation_failed, restore마저 실패하면 exit 12 operation_outcome_unknown + checkpoint ref.
sh
pob integrate --plan-file .pob/plans/plan-1.json --dry-run --json
pob integrate --plan-file .pob/plans/plan-1.json --json

성공 result: plan_digest, checkpoint_ref, applied_steps, skipped_steps, changed_files(path/action/before_sha256/after_sha256), post_inventory_digest, rollback_available.

pob dev — 실행되지 않음 (BLOCKED) ​

dev harness 계약이 없어 어떤 프로세스도 spawn하지 않고 exit 8 contract_dependency_blocked, details.required_contracts=["wave2-agent-sdk-contract","wave2-automation-job-contract"]를 반환해요.

pob verify ​

deterministic 정적/빌드/계약 검증 + 선택적 server validation submit.

옵션필수규칙
--profileno, 기본 sdk_contractstatic_build/sdk_contract/runtime_smoke/payment_fixture/full
--allow-local-commandsnomanifest/toolchain argv 실행을 명시 허용
--submitnoserver validation job 요청 (--idempotency-key 필수)

로컬 명령 실행 안전 규칙:

  • --allow-local-commands 없으면 어떤 build/test/dev command도 실행하지 않고 static analysis만. dynamic checks는 정직하게 not_verified.
  • 허용 시에도 free-form shell 문자열 금지. executable+argv만. child environment에 credential/token/POB_*/shell env 전달 금지.
  • 각 command는 --timeout-ms 상한. timeout은 failure.

verdict → exit 매핑은 deterministic이에요:

overall_verdictexit
pass0
fail6
not_verified6 (status=not_verified와 함께)
blocked8
sh
pob verify --path . --profile sdk_contract --json

pob doctor ​

CLI/credential/network/project 연결 진단. --include-server만 command-specific 옵션.

check inventory (closed): cli_binary, credential_broker, local_workspace, network, server_capability, project_binding, contract_version.

성공 result: overall_health(pass/fail/blocked), checks, missing_components, version_mismatches, repair_actions. unhealthy는 exit 6, blocked는 exit 8. 진단 수집 실패를 건강으로 보고하지 않아요.

sh
pob doctor --json
pob doctor --include-server --api-base-url http://127.0.0.1:8080 \
  --project-ref prj_example --environment local --json