Workflows
The Booking Platform project uses Windsurf global workflows for automated analysis, review, and reporting. This page documents the workflows used and their report output formats.
Analyze Workflows
Analyze workflows inspect the codebase and produce structured reports. All reports use /report-format-table for tabular output.
| Workflow | Purpose | Report Format |
|---|---|---|
/analyze-project | Project structure, patterns, foundation quality | Table with 19 categories |
/analyze-features | Feature inventory and coverage | Table with category, status, description |
/analyze-code-quality | Orchestrates all analyze-* sub-workflows | Aggregated table |
/analyze-structure | File and folder structure analysis | Tree view + table |
/analyze-foundation | Type safety, code quality, state management | Table with 19 categories |
/analyze-runtime | Error, async, concurrency, logging patterns | Table with 8 categories |
/analyze-security | OWASP, auth flaws, injection, secrets | Table with severity ratings |
/analyze-database | Schema, migrations, indexes, query patterns | Table with integrity checks |
/analyze-api | API design, conventions, versioning, errors | Table with API categories |
/analyze-dependencies | Dependency graph, outdated, vulnerabilities | Table with risk levels |
/analyze-test | Test coverage, quality, patterns, E2E gaps | Table with coverage metrics |
/analyze-performance | Rendering, scalability, caching bottlenecks | Table with metrics |
/analyze-config | Config files, env vars, secrets exposure | Table with consistency checks |
/analyze-deployment | CI/CD pipeline, Dockerfile, rollback strategy | Table with deployment checks |
/analyze-documentation | README, API docs, JSDoc, changelog coverage | Table with doc coverage |
/analyze-monitoring | Observability, tracing, metrics, alerting | Table with monitoring gaps |
/analyze-dead-code | Unused exports, unreachable code, orphaned files | Table with file list |
/analyze-seo | Meta tags, structured data, sitemap, Core Web Vitals | Table with SEO score |
/analyze-uxui | Usability gaps, user experience, design trends | Table with UX categories |
Report Output Example
| Category | Status | Details | Action |
|----------|--------|---------|--------|
| Type Safety | ✅ Pass | strict mode enabled | None |
| Code Quality | ⚠️ Warning | 3 files > 250 lines | Refactor needed |
| Security | ❌ Fail | Hardcoded API key | Fix immediately |Review Workflows
Review workflows produce detailed findings with severity ratings and actionable recommendations using /report-review format.
| Workflow | Purpose | Report Format |
|---|---|---|
/deep-review | Comprehensive review across all dimensions | Severity-rated findings table |
/review-codebase-and-fix | Deep review and fix issues found | Before-after comparison table |
/review-architecture | Architecture and design pattern review | Table with architecture scores |
/review-bug-prone | Review bug-prone code before issues occur | Table with risk levels |
/review-pr | PR review before merge | Checklist + findings table |
/review-test-case | Test case quality review | Table with test metrics |
/review-test-result | Test execution result analysis | Table with pass/fail counts |
/review-release-version | Version and changelog review before release | Table with version checks |
/review-github-issue | GitHub issue analysis | Table with issue breakdown |
/review-issue-and-fix | Analyze and fix general issues | Table with fix status |
Severity Levels
| Severity | Description | Action Required |
|---|---|---|
| Critical | Security vulnerabilities, data loss risks | Fix immediately |
| High | Bugs, performance issues, broken features | Fix before merge |
| Medium | Code quality, maintainability concerns | Fix this sprint |
| Low | Style, documentation, minor improvements | Fix when convenient |
Review Report Example
## Findings
| # | Severity | File | Issue | Recommendation |
|---|----------|------|-------|----------------|
| 1 | Critical | auth.ts | Hardcoded secret | Move to env var |
| 2 | High | booking.tsx | Missing Zod validation | Add input schema |
| 3 | Medium | utils.ts | File > 250 lines | Split into modules |
| 4 | Low | README.md | Outdated version | Update version number |Code Quality Tools
The project uses the following tools for automated code quality enforcement:
| Tool | Command | Config | Purpose |
|---|---|---|---|
| Biome | bun run lint | biome.jsonc | Linting and formatting |
| ast-grep | bun run scan | sgconfig.yml + rules/ | Structural code analysis |
| Knip | bun run knip | knip.json | Unused code detection |
| TypeScript (tsc) | bun run typecheck | tsconfig.json | Type checking |
| Lefthook | Auto on git events | lefthook.yml | Git hooks enforcement |
Git Hooks
| Hook | Triggers | Actions |
|---|---|---|
pre-commit | On commit | Biome lint + format (parallel, stage_fixed: true) |
pre-push | On push | Typecheck + test (parallel) |
pre-merge-commit | On merge | Typecheck |
See Code Review for the full review checklist and ast-grep rules.
Running Workflows
bash
# Run all checks (lint + typecheck + scan)
bun run check
# Run full verify (typecheck + test + build)
bun run verify
# Run ast-grep scan
bun run scan
# Run Knip (unused code detection)
bun run knip
# Run security audit
bun run security
# Analyze dependencies
bun run deps:analyzeRelated Documentation
- Code Review — ast-grep rules and review checklist
- Test Results — Test execution results
- Contributing — Contribution guidelines
- Testing — Testing practices