| name | code-change-verification |
| description | Run the project verification stack after code changes. Trigger on code changes and stop on the first failure, fix it, then rerun the full stack from the top. |
| owner | any |
| trigger | code_changed |
| version | 3 |
Code Change Verification
Use this after changing runtime code, tests, build behavior, or generated outputs that affect correctness.
Workflow
- Detect the project stack from files in the repo root.
Cargo.toml -> Rust, package.json -> Node, pyproject.toml -> Python, go.mod -> Go.
- Before making or verifying any scaffold/runtime changes, first read the repo's spec/architecture/worktree layout documents (for example .swx/runtime-docs/spec.md and .swx/runtime-docs/architecture.md) and confirm the exact expected file placement, naming, shared contract boundaries, and entrypoints.
- Prefer an existing repo verification script or Make target if one already defines the full stack.
- If the implementation touches scaffolded structure or shared types, include a targeted check that the created files and imports match those conventions.
- If prior failure episodes or reviewer/gate feedback mention specific files, symbols, or behaviors, include those as targeted verification checks in addition to the standard stack before declaring success.
- Otherwise run the standard commands in order.
- Stop on the first failing command.
- Fix the failure and rerun the full stack from the beginning.
- Report the commands run and the first failing step if verification does not pass.
- Otherwise run the standard commands in order.
- Stop on the first failing command.
4a. If prior failure episodes or reviewer/gate feedback mention specific files, symbols, or behaviors, include those as targeted verification checks in addition to the standard stack before declaring success.
- Fix the failure and rerun the full stack from the beginning.
- Report the commands run and the first failing step if verification does not pass.
Standard Stacks
Rust
cargo fmt -- --check
cargo clippy -- -D warnings
cargo test --workspace
Node / TypeScript
npm run lint
npm run typecheck
npm run build
npm test
Python
ruff format --check .
ruff check .
mypy .
pytest
Go
gofmt -l .
go vet ./...
go test ./...
Output
VERIFIED: all checks passed
- or the first failing command, exit status, and the actionable error
Do not claim success without running the checks.