开发与测试
grix-pre-push-checks
Select and run the smallest sufficient validation set for Grix changes before push, review handoff, or completion. Use after changing backend Go code, Flutter frontend or admin code, Python voicebridge code, Kubernetes manifests, repository scripts, documentation, decision notes, or repository-local skills.
askie · 已有 AI 审核记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add askie/grix --skill grix-pre-push-checks技能说明
name: grix-pre-push-checks description: Select and run the smallest sufficient validation set for Grix changes before push, review handoff, or completion. Use after changing backend Go code, Flutter frontend or admin code, Python voicebridge code, Kubernetes manifests, repository scripts, documentation, decision notes, or repository-local skills.
Grix Pre-push Checks
Choose checks from the changed paths. Start with a focused check and broaden only when the change crosses packages, services, clients, or contracts.
Determine the change set
- Read the repository
AGENTS.mdandCONTRIBUTING.md. - Use the user-specified or pull request base when available; otherwise compare with the merge base of
origin/mainand include local staged, unstaged, and relevant untracked files. - Group changed files by subsystem and select checks below. A cross-component contract change requires checks for every affected producer and consumer.
Select checks
backend/**: Frombackend, rungo testfor the changed package first. For cross-package changes, runAIBOT_TEST_NATS_URL=nats://127.0.0.1:1 go test ./...; addgo vet ./...andgo build ./...when shared contracts or command entrypoints change.frontend/**: Fromfrontend, run the closestflutter test <test-file-or-directory>. For shared state, navigation, protocol, or multi-feature changes, addflutter analyze --no-fatal-infosandflutter test --timeout 90s.admin/**: Fromadmin, run the closestflutter test <test-file-or-directory>. Addflutter analyze --no-fatal-infosand the fullflutter testwhen shared code or multiple features change.voicebridge/**: Fromvoicebridge, run the changed module'spython -m unittest <test_module> -v. For shared bridge behavior, run the non-network unit-test set documented invoicebridge/README.md.k8s/**: Render each affected base withkubectl kustomize <directory>whenkubectlis available. Inspect the output for secrets, selectors, probes, ports, image references, and missing configuration. Never apply manifests as a validation step..agents/skills/**: Run the skill creator'squick_validate.pyagainst each changed skill directory and inspect its metadata for accurate triggering.- Documentation and decision notes only: check links, paths, commands, and consistency with current code. Do not run application-wide tests solely for prose changes.
- Repository scripts or workflows: run the narrow script test or syntax check that exercises the changed path. Do not invoke publishing, deployment, release, upload, or credentialed jobs.
If a security-sensitive change is present and gitleaks is installed, run gitleaks detect --source .. Treat findings as blocking until they are removed or proven to match a committed narrow exception.
Safety and completion
- Do not run production, destructive, paid, real-provider, release, deployment, or credentialed checks without explicit user authorization.
- Do not broaden to all repository tests when focused evidence is sufficient.
- Treat a failed required check as blocking. Investigate the failure or clearly report why it could not be resolved.
- Report commands run, pass/fail results, and relevant checks skipped with reasons. Do not claim validation that was not executed.