Skip to content

Commit c644c69

Browse files
gmoonclaude
andcommitted
Add make pre-commit and pre-push targets, add CLAUDE.md
Standardize pre-commit (prettier + lint) and pre-push (+ typecheck + test + build) Makefile targets to match CI checks and prevent push-then-fix cycles. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 1c7eb26 commit c644c69

2 files changed

Lines changed: 53 additions & 1 deletion

File tree

CLAUDE.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# CLAUDE.md
2+
3+
Instructions for Claude Code when working in this repository.
4+
5+
## Project Overview
6+
7+
**forkzero.ai** — Marketing website for Forkzero. React 19 + Vite + TypeScript SPA. Hosted on S3 (`forkzero-web-prod`) + CloudFront.
8+
9+
## Development Commands
10+
11+
```bash
12+
# Install dependencies
13+
npm ci
14+
15+
# Dev server
16+
npm run dev
17+
18+
# Pre-commit gate (ALWAYS run before committing)
19+
make pre-commit
20+
21+
# Pre-push gate (ALWAYS run before pushing)
22+
make pre-push
23+
```
24+
25+
**Important**: Always run `make pre-commit` before any commit and `make pre-push` before any push. This matches what CI checks and prevents push-then-fix cycles.
26+
27+
## Branding
28+
29+
- "Forkzero" in prose, "FORKZERO" in logo (FORK bold, ZERO thin)
30+
- Never "ForkZero"
31+
32+
## Shared Constants
33+
34+
Install URLs and commands are defined in `src/constants.ts`. Import from there rather than hardcoding URLs.

Makefile

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
.PHONY: ci install format lint typecheck build test clean
1+
.PHONY: ci install format lint typecheck build test clean pre-commit pre-push
22

3+
# Pre-commit gate: fast checks (format + lint)
4+
pre-commit: format lint
5+
@echo "Pre-commit checks passed."
6+
7+
# Pre-push gate: full checks (format + lint + typecheck + test + build)
8+
pre-push: pre-commit typecheck test build
9+
@echo "Pre-push checks passed."
10+
11+
# Full CI (same as pre-push with clean install)
312
ci: install format lint typecheck build test
413
@echo "CI passed."
514

@@ -23,3 +32,12 @@ test:
2332

2433
clean:
2534
rm -rf dist node_modules
35+
36+
help:
37+
@echo "Available targets:"
38+
@echo " make pre-commit - Check formatting + lint (run before commit)"
39+
@echo " make pre-push - Full check: format + lint + typecheck + test + build (run before push)"
40+
@echo " make ci - Full CI with clean install"
41+
@echo " make build - Build for production"
42+
@echo " make test - Run tests with coverage"
43+
@echo " make clean - Remove dist and node_modules"

0 commit comments

Comments
 (0)