Configurar e executar proteções
Baixar original ↓06 Proteções
Instale o AI Software Toolkit antes de implementar o ticket. Exija testes unitários, registre o commit inicial e verifique aquela revisão exata. O projeto CRM inicial retorna BLOCK: a suíte de importação não consegue carregar o importador ausente. Os cinco testes existentes de contatos continuam passando.
Aplique a implementação CRM-142 revisada e documente em README.md. Revise e faça commit das alterações, depois execute a mesma verificação no novo commit usando o SHA inicial como base. O projeto concluído retorna ALLOW: todos os 17 casos unitários passam. A política de testes unitários é a mesma nos dois pontos.
Instalar uma vez no projeto de exemplo
Requer Python 3.11+, Node.js 24 e Git. O script incluído baixa AI Software Toolkit v2.3.3, verifica o checksum da versão e o digest fixado e instala Proof local e prepare-safe-change. GitHub Actions permanece desativado.
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
Salve o SHA inicial completo exibido acima. Use sua própria identidade Git. O .gitignore fornecido exclui skills instalados, downloads do toolkit e artefatos de execução.
Verificar a revisão concluída
Implemente o recurso e atualize README.md. Revise o diff antes de fazer commit.
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
Substitua STARTER_COMMIT pelo SHA completo salvo. O comprovante registra as revisões reais antes/depois desta repetição. Os arquivos originais da aplicação e testes imutáveis correspondem à execução CRM publicada.
Leia também o aviso consultivo
O ponto concluído tem uma constatação de tamanho: 549 linhas adicionadas contadas contra um limite de 300, e 305 linhas em um arquivo contra limite de 150. O diff inclui implementação e evidências de seleção de fontes. Revise o diff; mantenha os limites inalterados. Verificações de documentação, repositório e estado de referência passaram. Seis outros controles consultivos não têm resultado informado.
ALLOW informa a verificação obrigatória de testes unitários. Não faz commit, merge ou implantação. As verificações de navegador são evidências separadas para o fluxo da aplicação.
Arquivo original e detalhes da fonte
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.