Files
Claude Agent 45e28e7e94 feat(workflow): Add workflow plugin v1.0.0
Git workflow, code quality, context management and testing commands:
- commit, push, pr, issue - git operations
- simplify, refactor, verify, check - code quality
- catchup, onboard, save, cleanup - context management
- test, format, sync - development utilities

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 15:23:48 +00:00

150 lines
2.5 KiB
Markdown

---
description: Run typecheck + lint + test combined
argument-hint: [--fix] - Optional flag to auto-fix lint issues
---
# Full Check
## Pre-computed Context
**Package Scripts:**
!`cat package.json 2>/dev/null | grep -E '"(check|typecheck|lint|test|validate)"' | head -8 || echo "No package.json"`
**TypeScript Config:**
!`test -f tsconfig.json && echo "tsconfig.json found" || echo "No tsconfig.json"`
**ESLint Config:**
!`ls .eslintrc* eslint.config.* 2>/dev/null | head -1 || echo "No ESLint config"`
**Python Tools:**
!`cat pyproject.toml 2>/dev/null | grep -E '\[(tool\.)?(mypy|ruff|flake8|pylint)\]' | head -3 || echo "No Python lint config"`
---
## Instructions
You are running a comprehensive check: typecheck, lint, and test in sequence.
### Execution Order
Run checks in this order (stop on first failure unless `--continue` specified):
#### 1. Type Checking
**TypeScript:**
```bash
npx tsc --noEmit
```
**Python (mypy):**
```bash
python -m mypy . 2>/dev/null || echo "mypy not configured"
```
**Python (pyright):**
```bash
npx pyright 2>/dev/null || echo "pyright not configured"
```
#### 2. Linting
**ESLint:**
```bash
npx eslint . --ext .ts,.tsx,.js,.jsx
```
With `--fix` argument:
```bash
npx eslint . --ext .ts,.tsx,.js,.jsx --fix
```
**Python (ruff):**
```bash
ruff check .
```
With fix:
```bash
ruff check --fix .
```
**Python (flake8):**
```bash
flake8 .
```
#### 3. Tests
```bash
npm test
# or
pytest
```
### Using npm Scripts
If the project has a `check` or `validate` script, prefer that:
```bash
npm run check 2>/dev/null || npm run validate 2>/dev/null
```
Common patterns:
```bash
npm run typecheck && npm run lint && npm test
```
### Report Format
```
## Check Results
### TypeScript
[PASS] No type errors
### ESLint
[PASS] No lint errors
# or
[FAIL] 3 errors, 5 warnings
- src/api.ts:15 - @typescript-eslint/no-explicit-any
- src/utils.ts:42 - no-unused-vars
### Tests
[PASS] 45 tests passed
# or
[FAIL] 2 tests failed
- UserService.test.ts > should handle null input
- ApiClient.test.ts > should retry on failure
### Summary
2/3 checks passed
```
### On Failure
If any check fails:
1. Show the specific errors
2. If `--fix` was provided, attempt auto-fixes
3. Re-run the failing check after fixes
4. Report remaining issues
---
## Quick Commands
**Check everything:**
```bash
/workflow:check
```
**Check and auto-fix:**
```bash
/workflow:check --fix
```
**Check specific phase:**
```bash
npx tsc --noEmit # just typecheck
npx eslint . # just lint
npm test # just test
```