Universal pre-flight check that validates project readiness
Runs comprehensive pre-flight checks to validate project readiness for commits, PRs, or releases.
/plugin marketplace add Data-Wise/craft/plugin install data-wise-craft@Data-Wise/craftRun appropriate checks for your project type and context.
/craft:check # Quick validation
/craft:check thorough # Deep validation
/craft:check --for commit # Pre-commit checks
/craft:check --for pr # Pre-PR checks
/craft:check --for release # Pre-release checks
Detects project type, git context, and worktree status:
# Check if running in a worktree
if git rev-parse --is-inside-work-tree &>/dev/null; then
git_dir=$(git rev-parse --git-dir)
if [[ "$git_dir" == *".git/worktrees/"* ]]; then
echo "š³ Running in worktree"
echo " Main repo: $(dirname $(dirname $(dirname $git_dir)))"
echo " Branch: $(git branch --show-current)"
fi
fi
Worktree-aware output:
āā /craft:check āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā Project: scribe (Node.js) ā
ā š³ Worktree: ~/.git-worktrees/scribe/feat-hud ā
ā Main: ~/projects/dev-tools/scribe ā
ā Branch: feat/mission-control-hud ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā ā Lint 0 issues ā
ā ... ā
Detects project type and runs appropriate checks:
ā Detected: Python (pyproject.toml)
Checks:
āāā ruff check . (linting)
āāā mypy . (type checking)
āāā pytest (tests)
āāā pip-audit (security)
āāā docs validation (if docs/ exists)
ā Detected: Node.js (package.json)
Checks:
āāā eslint . (linting)
āāā tsc --noEmit (types)
āāā npm test (tests)
āāā npm audit (security)
āāā docs validation (if docs/ exists)
ā Detected: R Package (DESCRIPTION)
Checks:
āāā lintr::lint_package() (linting)
āāā devtools::check() (R CMD check)
āāā testthat::test_local() (tests)
āāā pkgdown::build_site() (docs if configured)
āāā spelling::spell_check() (spelling)
ā Detected: Go (go.mod)
Checks:
āāā go vet ./... (static analysis)
āāā golangci-lint run (linting)
āāā go test ./... (tests)
āāā go mod verify (dependencies)
--for commit)āā Pre-Commit Checks āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā ā Lint: No issues ā
ā ā Tests: 45/45 passed ā
ā ā Types: No errors ā
ā ā No secrets detected ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā READY TO COMMIT ā
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
--for pr)āā Pre-PR Checks āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā ā Lint: No issues ā
ā ā Tests: 156/156 passed ā
ā ā Coverage: 87% (meets 80% threshold) ā
ā ā Types: No errors ā
ā ā No merge conflicts ā
ā ā Branch up to date with main ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā READY FOR PR ā
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
--for release)āā Pre-Release Checks āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā ā Lint: No issues (strict mode) ā
ā ā Tests: All passing (unit + integration + e2e) ā
ā ā Coverage: 87% (meets threshold) ā
ā ā Types: No errors ā
ā ā Security: No vulnerabilities ā
ā ā Docs: Valid and up-to-date ā
ā ā CHANGELOG: Updated ā
ā ā Version: Bumped correctly ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā READY FOR RELEASE ā
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
āā /craft:check āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā Project: aiterm (Python CLI) ā
ā Time: 12.4s ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā ā Lint 0 issues ā
ā ā Tests 135/135 passed ā
ā ā Types No errors ā
ā ā Git Clean working tree ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā STATUS: ALL CHECKS PASSED ā ā
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
āā /craft:check āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā®
ā Project: aiterm (Python CLI) ā
ā Time: 15.2s ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā ā Lint 3 issues ā
ā āā src/main.py:12 - Line too long ā
ā āā src/utils.py:8 - Unused import ā
ā āā tests/test_api.py:45 - Missing docstring ā
ā ā
ā ā Tests 135/135 passed ā
ā ā Types No errors ā
ā ā Git Uncommitted changes ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā¤
ā STATUS: 2 ISSUES FOUND ā
ā Fix with: /craft:code:ci-fix ā
ā°āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāÆ
Works with:
/craft:code:lint - Detailed lint results/craft:test:run - Detailed test results/craft:code:ci-fix - Auto-fix issues/craft:code:ci-local - Full CI simulation