a↗agentbay.AgentBay 받기
내 계정 ▾
메뉴
← 실습 안내로 돌아가기
실습 결과

가드레일 설정 및 실행

원본 다운로드 ↓

06 가드레일

티켓 구현 전에 AI Software Toolkit을 설치하세요. 단위 테스트를 필수 적용하고 시작 커밋을 기록한 뒤 정확한 리비전을 검증하세요. CRM 시작 프로젝트의 반환 결과: BLOCK: 가져오기 테스트 모음은 없는 가져오기 모듈을 불러올 수 없습니다. 기존 연락처 테스트 5개는 계속 통과합니다.

검토된 CRM-142 구현을 적용하고 README.md에 기록하세요. 변경을 검토하고 커밋한 뒤 시작 SHA를 기준으로 새 커밋에 같은 검증을 실행하세요. 완성된 프로젝트의 반환 결과: ALLOW: 단위 사례 17개가 모두 통과합니다. 두 검증 시점에서 단위 테스트 정책은 변경하지 않습니다.

예시 프로젝트에 한 번 설치

Python 3.11 이상, Node.js 24 및 Git이 필요합니다. 포함된 설정 스크립트는 AI Software Toolkit v2.3.3를 다운로드하고 릴리스 체크섬과 고정된 다이제스트를 확인한 뒤 로컬 Proof와 prepare-safe-change를 설치합니다. GitHub Actions는 비활성 상태로 유지됩니다.

python3 setup-guardrails.py --yes
git init
git add .
git commit -m "Record CRM starter with enforced unit tests"
git rev-parse HEAD
PROOF_UNIT_TEST_COMMAND="npm test" python3 .toolkit-cache/ai-toolkit.pyz check --target . --base-ref HEAD --json

위에 표시된 전체 시작 SHA를 저장하세요. 본인의 Git 작성자 정보를 사용하세요. 제공된 .gitignore는 설치한 스킬, 툴킷 다운로드 및 런타임 산출물을 제외합니다.

완료된 리비전 검증

기능을 구현하고 README.md를 갱신하세요. 커밋 전에 차이를 검토하세요.

git add index.html style.css src/app.js src/import.js docs README.md
git commit -m "Implement CRM-142 and document the import flow"
PROOF_UNIT_TEST_COMMAND="npm test" python3 .toolkit-cache/ai-toolkit.pyz check --target . --base-ref STARTER_COMMIT --json

STARTER_COMMIT를 저장한 전체 SHA로 바꾸세요. 증빙에는 이 재실행의 실제 이전/이후 리비전이 기록됩니다. 원본 앱 파일과 변경하지 않은 테스트는 게시된 CRM 실행과 일치합니다.

권고 사항도 읽으세요

완료 시점에는 변경 크기 결과가 있습니다. 추가된 것으로 집계한 줄 549개는 한도 300줄과 비교되며 한 파일의 추가 줄 305개는 한도 150줄과 비교됩니다. 변경에는 구현과 원본 선택 근거가 포함됩니다. 차이를 검토하고 임계값을 유지하세요. 문서, 저장소 및 실제 상태 검증은 통과했습니다. 나머지 권고 항목 6개는 보고된 결과가 없습니다.

ALLOW는 필수 단위 테스트 게이트의 결과입니다. 커밋, 병합 또는 배포를 수행하지 않습니다. 브라우저 검증은 앱 흐름에 대한 별도 근거입니다.

원본 파일 및 출처 세부 정보

guardrails.md · SHA-256 c1952816fb672c3a7d7e5df106ed6f6ab093dcae2da88b74a5e27824dd4adbc5

# 06 Guardrails

Install AI Software Toolkit before implementing the ticket. Enforce unit tests, record the starter commit, then check that exact revision. The CRM starter returns **BLOCK**: its import suite cannot load the missing importer. Its existing five contact tests still pass.

Apply the reviewed CRM-142 implementation and document it in README.md. Review and commit the changes, then run the same check against that new commit using the starter SHA as the base. The finished project returns **ALLOW**: all 17 unit cases pass. The unit-test policy is unchanged between checkpoints.

## Install once in the sample project

Requires Python 3.11+, Node.js 24 and Git. The included setup script downloads AI Software Toolkit v2.3.3, checks the release checksum and pinned digest, then installs local Proof and prepare-safe-change. GitHub Actions stays off.

```sh
python3 setup-guardrails.py --yes
git init
git add .
git commit -m "Record CRM starter with enforced unit tests"
git rev-parse HEAD
PROOF_UNIT_TEST_COMMAND="npm test" python3 .toolkit-cache/ai-toolkit.pyz check --target . --base-ref HEAD --json
```

Save the full starter SHA printed above. Use your own Git identity. The supplied .gitignore excludes installed skills, toolkit downloads and runtime artifacts.

## Check the finished revision

Implement the feature and update README.md. Review the diff before committing.

```sh
git add index.html style.css src/app.js src/import.js docs README.md
git commit -m "Implement CRM-142 and document the import flow"
PROOF_UNIT_TEST_COMMAND="npm test" python3 .toolkit-cache/ai-toolkit.pyz check --target . --base-ref STARTER_COMMIT --json
```

Replace STARTER_COMMIT with your saved full SHA. The receipt records the actual before and after revisions from this replay. The original application files and immutable tests match the published CRM run.

## Read the advisory too

The finished checkpoint has a change-size finding: 549 counted added lines against a 300-line budget, and 305 added lines in one file against a 150-line budget. The diff includes the implementation and its source-selection evidence. Review the diff; keep the thresholds unchanged. Documentation, repository and ground-truth checks passed. Six other advisory controls have no reported result.

ALLOW reports the enforced unit-test gate. It does not commit, merge or deploy. The browser checks are separate evidence for the application flow.