workflowslisted
Install: claude install-skill AndriyKalashnykov/flight-path
# Development Workflows
## Adding a New Endpoint
1. Create handler method on `Handler` struct in `internal/handlers/` with Swagger annotations
2. Register route in `internal/routes/` (receives `*handlers.Handler`)
3. Wire route in `main.go`
4. Run `make api-docs`
5. Write table-driven tests
6. Add Postman test case to `test/FlightPath.postman_collection.json`
7. Run: `make test && make build`
## Performance Optimization
1. `make bench-save` (baseline — saved to `benchmarks/bench_YYYYMMDD_HHMMSS.txt`)
2. Implement optimization
3. `make bench-save` (after)
4. `make bench-compare` (auto-picks latest two files, or specify `OLD=file1 NEW=file2`)
5. `make test` (verify correctness)
Benchmarks run: `go test ./internal/handlers/ -bench=. -benchmem -benchtime=3s`
## Pre-commit Checklist
Quick way:
```bash
make check # Alias for `make ci` — runs the full local pipeline (see "Local CI" below)
```
Or individual steps:
```bash
make lint # golangci-lint (60+ linters)
make sec # gosec security scanner
make vulncheck # govulncheck dependency check
make secrets # gitleaks secrets detection
make test # Unit tests
make api-docs # Regenerate Swagger docs
make build # Compile binary (depends on api-docs)
```
## Local CI
```bash
make ci # full pipeline: deps + static-check + test + integration-test + coverage + coverage-check + build + fuzz + deps-prune-check
make ci-run # run the GitHub Actions workflow locally via act